function MenuSelect( url ){	if( url != "" ){			window.open(url);	}}function underlineLink(a,nav){	if(nav=="Top")	a.className="topbannerunderline";	if (nav=="Bottom")	a.className="bottomnavunderline";	if (nav=="listItemNav")	a.className="listitemnavunderline";}function removeUnderline(a,nav){	if(nav=="Top")	a.className="topbanner";	if (nav=="Bottom")	a.className="bottomnavnounderline";	if (nav=="listItemNav")	a.className="listitemnavnounderline";}//Function to remove all HTML Tags from string//The JavaScript Source :: http://javascript.internet.com//Created by: Robert Nyman :: http://robertnyman.com/ */function removeHTMLTags(id){    if(document.getElementById && document.getElementById(id)){        var strInputCode = document.getElementById(id).innerHTML;        /*              This line is optional, it replaces escaped brackets with real ones,              i.e. &lt; is replaced with < and &gt; is replaced with >        */         strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){             return (p1 == "lt")? "<" : ">";        });        var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");        alert("Output text:\n" + strTagStrippedText);   // Use the alert below if you want to show the input and the output text   //        alert("Input code:\n" + strInputCode + "\n\nOutput text:\n" + strTagStrippedText);    }}//Sara Pollack 7/19/07 - modified submitQuery function so that keypress of enter is recognized in firefox;//Added evt, func, and params parameters.function submitQuery(evt, func, params){  evt = (evt) ? evt : (window.event) ? event : null;  if (evt)  {    var charCode = (evt.charCode) ? evt.charCode :                   ((evt.keyCode) ? evt.keyCode :                   ((evt.which) ? evt.which : 0));    if (charCode == 13) func(params)  }    }/* Create a new XMLHttpRequest object to talk to the Web server */var xmlHttp = false;if(window.XMLHttpRequest){   xmlHttp= new XMLHttpRequest();} else if(window.ActiveXObject){   xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");} var totalDivs=1;var openTabId="";function toggleDivisionMainMenu(divTabId){	document.forms[0].DivisionTab.value=divTabId;		  for(var a=1;a <= 5; a++){		var tab = "DivTab" + a;	 		if(tab==divTabId){					setTabBgColor("#778899",divTabId);		}		else{			if(tab==openTabId){				setTabBgColor("#9CBCDA",tab);			}		}						}	openTabId=divTabId;	var db=document.forms[0].DbPath.value;	var siteSection=document.forms[0].SiteSection.value;		if(siteSection=="DivTabClick"){		// user clicked on a division tab					location.href=  "/" + db +"/HomePage?OpenForm&Division=" + divTabId;	}else{	// Build the URL to connect to  	var url = "/"+db+"/LoadTopNavMenuFields?OpenAgent&Tab=" + divTabId; 	 // Open a connection to the server  	xmlHttp.open("GET", url, true); 	 // Setup a function for the server to run when it's done 	 xmlHttp.onreadystatechange = updateFields;	  // Send the request	 xmlHttp.send(null);  		} }//Set the clicked tab's background colorfunction setTabBgColor(color,divTabId){	idTab = document.getElementById(divTabId);	corners=idTab.getElementsByTagName('b');	for (var i =0;i < corners.length; i++) {		if(corners[i].className!="corner"){			corners[i].style.backgroundColor=color;			corners[i].style.borderLeft=color;						corners[i].style.borderRight=color;			corners[i].style.borderBottom=color;		}	}	var tabBg=idTab.getElementsByTagName('div');	for (var i =0;i<tabBg.length; i++) {		if(tabBg[i].className=="cornerfg"){			tabBg[i].style.backgroundColor=color;					tabBg[i].style.border="1px solid " +color;		}	}}function updateFields() {/*Updates TopNavMenu fields based on division tab selection*/  if (xmlHttp.readyState == 4) {  	if (xmlHttp.status == 200) {    		var response = xmlHttp.responseXML;    		//myWindow=window.open('','','width=200,height=100')//myWindow.document.write(xmlHttp.responseText)//myWindow.focus();		//alert(xmlHttp.responseText);    		var strError=response.getElementsByTagName('Error')[0].firstChild.data;    		if(strError!="error"){    		fieldName="";    		fieldVal="";    		prepareForDropdowns();		mtDropDown.registry = [];		totalSubMenuCount=0;    			for( var x = 0; x <response.getElementsByTagName("field").length; x++ ) {    			    				fieldName=response.getElementsByTagName('field')[x].firstChild.data;    				fieldVal=response.getElementsByTagName('fieldVal')[x].firstChild.data;    				field=eval("document.forms[0]."+fieldName);    				if(field!=null){    					field.value=fieldVal;    				    					if(fieldName.indexOf("MenuLinks")!=-1){    						eval(fieldVal);    						    					}    				    					for (var i=1;i<=7;i++){    				    				    		if(fieldName.indexOf("MenuHeader"+i) != -1){							var fieldId = document.getElementById(fieldName+"_disp");							if (fieldId!=null){								fieldId.innerHTML = fieldVal;							}						}						if(fieldName.indexOf("MenuHeaderLink"+i) != -1){							var fieldId = document.getElementById(fieldName+"_disp");							if (fieldId!=null){								fieldId.innerHTML = fieldVal;							}						}						if(fieldName.indexOf("MenuLinks"+i) != -1){													var mLinks = document.forms[0].MenuLinks.value;							document.forms[0].MenuLinks.value = mLinks + fieldVal;												}					} //loop though menulinks				} //field not null    			}	//loop through fields	} //no error	mtDropDown.renderAll();	init();	//alert(document.forms[0].MenuLinks.value ); 	 }	}}function getLink(myId) {	var spanId = document.getElementById(myId);	location.href=spanId.innerHTML.unescapeHTML();}//Purpose of tweakHomePageLayout() function://to recover page after division switchfunction  tweakHomePageLayout(){ docWidth=780;//this is the section with the top rounded corners	document.getElementById('topRoundedCorners').style.width=docWidth+"px";//this is the section with the main content of the page contained in the iframe	document.getElementById('Divframe').style.width=(docWidth)+"px";	//makes the bottom portion with rounded corners wider to fit the width of the content.	document.getElementById('BottomNav').style.width=docWidth +"px";//adjusts width of portion above top division navigation 	document.getElementById('topnavA').style.width=docWidth +"px";//this is the portion with the division navigator	document.getElementById('topnavB').style.width=docWidth + "px";	//document.getElementById('topnavB').parentNode.parentNode.parentNode.style.width=docWidth +"px";//move whole thing over a bit to left	var leftMargin=((window.size().width-docWidth)/2);	var leftMarginPx=leftMargin>10?leftMargin + "px":"10px";	entirePgContent=document.getElementById('entirePage');	entirePgContent.style.left=leftMarginPx;}	function returnOffsetWidth(elm){  	var divWidth=0;	if(elm.offsetWidth){		divWidth=elm.offsetWidth;	} 	else if(elm.style.pixelWidth){ 		divWidth=elm.style.pixelWidth; 	}   	return(divWidth);}