				
				//Clear Textbox--------------------------------------------------------------------------------------------
					function clearBox(id,replaceval){
						
						if(document.getElementById(id).value==replaceval)
							{
								document.getElementById(id).value='';
							}
					}
				//---------------------------------------------------------------------------------------------------------
			
				//Check All------------------------------------------------------------------------------------------------
					function checkAll(checkname, exby) {
					  for (i = 0; i < checkname.length; i++)
					  checkname[i].checked = exby.checked? true:false
					}

					function checkBoxListCheckAll(cbControl, state) {
					    var chkBoxList = document.getElementById(cbControl);
					    var chkBoxCount = chkBoxList.getElementsByTagName("input");

					    for (var i = 0; i < chkBoxCount.length; i++) {
					        chkBoxCount[i].checked = state;
					    }
					}
				//---------------------------------------------------------------------------------------------------------
			
				//Show's or Hide's a Div Based on the Value of 'actionword'------------------------------------------------
					function ChangeStatus(id,layid,actionword){
						var dropDownValue = document.getElementById(id).value;
						
						if (actionword.indexOf(dropDownValue) != -1){
							document.getElementById(layid).style.display = "block";
						}
						else {
							document.getElementById(layid).style.display = "none";
						}	
					}

				//Show's or Hide's a Div and changes the label text Based on Key/Value Object 'actionwords'
					function ChangeStatusArray(id, layid, labelId, actionwords) {
					    var dropDownValue = document.getElementById(id).value;
					    var div = document.getElementById(layid);
					    var label = document.getElementById(labelId);

					    for (var index in actionwords) {
					        if (index.indexOf(dropDownValue) != -1) {
					            label.innerHTML = actionwords[index];
					            div.style.display = "block";

					            return;
					        }
					    }

					    div.style.display = "none";
					}    
				
				//Show's or Hide's an object if the value does not equal the 'actionword'----------------------------------
					function ChangeStatusExclusive(id, layid, actionword) {
					    var dropDownValue = document.getElementById(id).value;

					    if (actionword.indexOf(dropDownValue) != -1) {
					        document.getElementById(layid).style.display = "none";
					    }
					    else {
					        document.getElementById(layid).style.display = "";
					    }	
					}
					
				//---------------------------------------------------------------------------------------------------------
				
				//Show's or Hide's a Div Based on the Value of 'actionword'------------------------------------------------
					function ChangeStatusRadio(id,layid,actionword){
						
						
						varstr = "document.acctInfo."+id+".length";
						varstr2 = eval(varstr);
						
						for (var i=0; i < varstr2; i++)
							   {
							   varstr = "document.acctInfo."+id+"[i].checked";
							   if (eval(varstr))
								  {
								  varstr = "document.acctInfo."+id+"[i].value";
								  var rad_val = eval(varstr);
								  
								  }
							   }
						if (rad_val == "Yes")
							{
								document.getElementById(layid).style.display = "block";
							}
						else
							{
								document.getElementById(layid).style.display = "none";
							}
						
					
					}
				//---------------------------------------------------------------------------------------------------------
				
				
				
				
				
				//Makes Followup Question Visible, Changes Text of Followup Question  -------------------------------------
					function ChangeFollowUpDiv(id,layid,actionword,promptP,promptText){
							
						var dropDownValue = document.getElementById(id).value;
						if (actionword.indexOf(dropDownValue) != -1){
							document.getElementById(layid).style.display = "block";
						}
						else {
							document.getElementById(layid).style.display = "none";
						}
						
						
						//Change Prompt Text
							keyValues 		= actionword.split(",");
							promptValues 	= promptText.split(",");
							for (i=0;i<keyValues.length;i++)	//Get the key number of the selected option
								{
									textval = keyValues[i];
									if (textval.trim() == dropDownValue){
											selKey = i;
										}
								
								}
							//Use the key number to display the corresponding prompt text:
								document.getElementById(promptP).innerHTML = promptValues[selKey];
						
					}
				//--------------------------------------------------------------------------------------------------------
				
				
				//String Trimming Function -------------------------------------------------------------------------------
					String.prototype.trim = function () {
						return this.replace(/^\s*/, "").replace(/\s*$/, "");
					}
				//--------------------------------------------------------------------------------------------------------
				
				
				//Layer Visibility:
				
				function SwapLayer(layid1,layid2){
					document.getElementById(layid1).style.display = "block";
					document.getElementById(layid2).style.display = "none";
				}

				function SwapLayers(showLayer, hideLayers) {
				    document.getElementById(showLayer).style.display = "block";

				    for (var i = 0; i < hideLayers.length; i++) {
				        document.getElementById(hideLayers[i]).style.display = "none";
				    }
				}
				
				function HideContent(d) {
					document.getElementById(d).style.display = "none";
				}
					
				function ShowContent(d) {
					document.getElementById(d).style.display = "block";
				}
				
				function ReverseDisplay(d,e) {
							if(document.getElementById(d).style.display == "none") 
								{ 
									document.getElementById(d).style.display = "block"; 
									document.getElementById(e).style.display = "none"; 
								}
							else 
								{ 
									document.getElementById(d).style.display = "none"; 
									document.getElementById(e).style.display = "block"; 
								}
				}
//Layer Show/Hide At Mouse Position:----------------------------------------------------------------------
				/*
				THIS CURRENTLY DOESN'T WORK IN IE
				
				*/







				
				/*
				Example Implementation:
				<div id="showWorkout" style="background: white; display: block; position: absolute; display: none; width: 100px; height: 100px;">
					Test
				</div>
				<img src="images_Page/ico_MoreInfo_Green.gif" align="right" onMouseOver="javascript:ShowContentAtMousePosition('showWorkout'); return true"  onMouseOut="javascript:HideContentAtMousePosition('showWorkout'); return true;">
				*/
			
				var cX = 0; var cY = 0;
			
				function HideContentAtMousePosition(d) 
					{
						if(d.length < 1) { return; }

						document.getElementById(d).style.display = "none";
					}
				function ShowContentAtMousePosition(d,vposition) 
					{
						if(d.length < 1) { return; }
						var dd = document.getElementById(d);
						AssignPosition(dd,vposition);
						dd.style.display = "block";
					}	

							function UpdateCursorPosition(e)
								{ 
									cX = e.pageX; 
									cY = e.pageY;
								}
							function UpdateCursorPositionDocAll(e)
								{ 
									cX = event.clientX; 
									cY = event.clientY;
								}
							if(document.all) 
								{ 
									document.onmousemove = UpdateCursorPositionDocAll; 


								}
							else 
								{ 
									document.onmousemove = UpdateCursorPosition; 
								}
							
							function rename_AssignPosition(d,vposition) {
							d.style.left = (cX+10) + "px";
							if ((cX+10)>600)
								{
									d.style.left = (cX-550) + "px"
								}
							if (!vposition)
								{
									vposition=0;
								}
							d.style.top = (cY-vposition) + "px";
							}

							
							function HideContentTimed(d)
								{
									setTimeout("HideContent(" + d + ")",1000);		


								}
					
			//--------------------------------------------------------------------------------------------------------
									
					
					
