<!--
	//BRANDING AREA ROTATOR
	// this array consists of the id attributes of the divs we wish to alternate between
		divs_to_fade = new Array('branding_0', 'branding_1', 'branding_2', 'branding_3', 'branding_4'); 
		//, 'branding_4'
		
	// the starting index in the above array. It should be set to the value of the div which doesn't have the CSS Display property set to "none"
	x = 0;
	
	// the number of milliseconds between swaps.  Default is five seconds.
	wait = 6000;
	
	// change button state
	function changeState(sID) {
		var curScreen = (sID);
		var lastScreen = document.frmLastScreen.lastScreen.value;
		if (curScreen >= 5) { //5
			curScreen = 0
		}
		//alert(curScreen);
		document.frmLastScreen.lastScreen.value = curScreen;
		document.getElementById('btnbrand' + curScreen).style.backgroundImage = "url(images/btn_brand_" + curScreen + "_alt.gif)";
		document.getElementById('btnbrand' + lastScreen).style.backgroundImage = "url(images/btn_brand_" + lastScreen + ".gif)";
	}

	// 'play' function
	function getBackNext() {
		var cur = x;
		x++;
		changeState(x);  /** DEV **/
		if (x == 5) { /* 5 - PHYSICAL NUMBER OF SCREENS */
			x = 0;  /* (x == 'LAST SCREEN') THEN FORWARD TO 1ST */
		} 
		Effect.Fade(divs_to_fade[cur], { duration:1, from:1.0, to:0.0 });
		Effect.Appear(divs_to_fade[x], { duration:1, from:0.0, to:1.0 });
		startPage();
}
	// go to specific screen
	function getDiv(divID) {
		var cur = x;
		changeState(divID);  /** DEV **/
		if (cur != divID) {
		Effect.Fade(divs_to_fade[cur], { duration:1, from:1.0, to:0.0 });
		Effect.Appear(divs_to_fade[divID], { duration:1, from:0.0, to:1.0 });
		}
		x = divID;
}
	// the function that performs the fade
	function swapFade() {
		Effect.Fade(divs_to_fade[x], { duration:1, from:1.0, to:0.0 });
		x++;
		changeState(x);  /** DEV **/
		if (x == 5) {  /* 5 - PHYSICAL NUMBER OF SCREENS */
			x = 0;
			clearInterval(timerID);
		}
		Effect.Appear(divs_to_fade[x], { duration:1, from:0.0, to:1.0 });
}
	// the onload event handler that starts the fading.
	function startPage() {
		timerID = setInterval('swapFade()', wait);
}
// reset branding area on page onload 
	function pgReset() {
		document.frmLastScreen.lastScreen.value = 0;
}
//-->
<!--
    //ROLL OVER FOR IE 6
    //startList = function() {
    function startList() {
    if (document.all&&document.getElementById) 
    {
    	navRoot = document.getElementById("nav");
    	for (i=0; i<navRoot.childNodes.length; i++) 
    	{
    		node = navRoot.childNodes[i];
    		if (node.nodeName=="LI") 
    		{
    			node.onmouseover=function() 
    			{
    				this.className+=" over";
    			}
				node.onmouseout=function() {
				this.className=this.className.replace(" over", "");
				}
			}
		}
		//2ND NAVIGATION BAR
		//navRoot2 = document.getElementById("nav2");
		//for (i=0; i<navRoot2.childNodes.length; i++)
    	//{
    		//node = navRoot2.childNodes[i];
    		//if (node.nodeName=="LI") 
    		//{
    			//node.onmouseover=function()
    			//{
    				//this.className+=" over";
    			//}
				//node.onmouseout=function() {
				//this.className=this.className.replace(" over", "");
				//}
			//}
		//}
	}
}
	//window.onload=startList;
//-->
<!--
	function jumpMenu() { 
	var newIndex = document.frmJumpMenu.cboPage.selectedIndex;
	if ( newIndex == 0 ) { 
		alert( "Please select a location!" ); 
	} 
	else { 
		cururl = document.frmJumpMenu.cboPage.options[ newIndex ].value;
		window.location.assign( cururl ); 
	} 
} 
//-->
<!--
	//LOAD CUSTOM TEXT COLUMN BACKGROUND
	function customBackground(bgImg) {
		document.getElementById('textcolsubwide').style.backgroundImage = "url(uploads/" + bgImg + ")";
}
//-->
<!--
	//TABBED BOXES
	function changeTabsOn(tab) {
	document.getElementById(tab).style.backgroundPosition = "0 0";
}
	function changeTabsOff(tab) {
	document.getElementById(tab).style.backgroundPosition = "0 -26px";
}
	function showTab(tab) {
	document.getElementById('centertab1').style.display = "none";
	document.getElementById('centertab2').style.display = "none";
	document.getElementById('centertab3').style.display = "none";
	document.getElementById('centertab4').style.display = "none";
	document.getElementById(tab).style.display = "block";
}
//-->
<!--
	//LOGIN - HANDLE CHECK BOX VALUE VALIDATION
	function RemPass() {
	var remember = document.Form3.Remember.value;
	var checkval = document.Form3.CheckVal.value;
	if ((remember == 1) && (checkval == 0))
		{
		document.Form3.CheckVal.value = 1;
		}
	else
		{
		document.Form3.CheckVal.value = 0;
	}
}
//-->
<!--
	//OPEN POP-UP W/URL
	function PopWin(NewLocation, LocationLink, WVal, HVal) {
	window.open(NewLocation + "?url=" + LocationLink, "NewWindow", "width=" + WVal 
	+ ",height=" + HVal + ",scrollbars=yes,status=no,toolbar=no");	
}
//-->
<!--
	//OPEN POP-UP
	function PopWinAlt(NewLocation, WVal, HVal) {
	window.open(NewLocation, "NewWindow", "width=" + WVal 
	+ ",height=" + HVal + ",scrollbars=yes,status=no,toolbar=no");	
}
//-->
<!--
	//GO TO NEW LOCATION IN PARENT WINDOW
	function GoTo(NewLocation) {
	self.opener.open(NewLocation);
	parent.close();	
	}
//-->
<!--
	//WEATHER BUG
	function loadXML() {
		
		xmlhttp = null;
		
		// code for Mozilla, etc.
		if (window.XMLHttpRequest) {
			xmlhttp = new XMLHttpRequest();
			if (xmlhttp.overrideMimeType) {
				xmlhttp.overrideMimeType("text/xml");
			}
		}
		// code for IE
		else if (window.ActiveXObject) {
			try {
                xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        	} 
        		catch (e) {
            try {
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            } 
            	catch (e) {}
            }
        } 
		if (xmlhttp!=null) {
			xmlhttp.onreadystatechange = state_Change;
			xmlhttp.open("GET", "weatherbug/weatherbug.asp", true);
			xmlhttp.send(null);
		}
		else {
			alert("Your browser does not support XMLHTTP.");
		}
}
	function state_Change() {
		
	// if xmlhttp shows "loaded"
	if (xmlhttp.readyState == 4) {
		
  		// if "OK"
		if (xmlhttp.status == 200) {
			var xmlStr = xmlhttp.responseXML.documentElement;
			var icon = "url(weatherbug/images/" + 
				xmlStr.getElementsByTagName("icon_url_name")[0].firstChild.data + ")";	
			var desc = xmlStr.getElementsByTagName("weather")[0].firstChild.data;
			var temp = xmlStr.getElementsByTagName("temp_f")[0].firstChild.data + "&deg;";
			if (String(desc).length <= 26) {
				desc = desc;
			}
			else {
				desc = String(desc).substring(0, 23) + "...";
			}
			document.getElementById("iconpos").style.backgroundImage = icon;
		    document.getElementById("strdesc").innerHTML = "<a href=\"javascript:void(0);\" " +
		    	"onclick=\"PopWinAlt('pop_forecast.htm', 400, 600)\" class=\"desclink\">" + desc + "</a>";
		    document.getElementById("strtemp").innerHTML = temp;
		}
  		else
		{
			document.getElementById("strdesc").innerHTML = "No Weather Information Available";
		    document.getElementById("strtemp").innerHTML = "";
    	}
  	}
}
//-->
<!--
	//VALIDATE REQUIRED FORM FIELDS
	function CheckForm() {
	var fullname = document.frmContact.txtFullName.value;
	var email = document.frmContact.txtEmail.value;
	var emailchar = document.frmContact.txtEmail.value.indexOf("@");
	var phone = document.frmContact.txtPhone.value;
	
	if (fullname == "")
	{
	alert ("Please provide a your Full Name.");
	document.frmContact.txtFullName.focus();
	return (false);
	}
	if ((email == "") || (emailchar == -1)) 
	{
	alert ("Please provide a valid Email Address.");
	document.frmContact.txtEmail.focus();
	return (false);
	}
	if (phone == "")
	{
	alert ("Please provide your Phone Number.");
	document.frmContact.txtPhone.focus();
	return (false);
	}
	return (true);
}
//-->
<!--
	//VALIDATE OPT-OUT REQUIRED FORM FIELDS
	function CheckOptOutForm() {
	var firstname = document.frmContact.txtFirstName.value;
	var lastname = document.frmContact.txtLastName.value
	var ssn4 = document.frmContact.txtSSN4.value;
	var acct4 = document.frmContact.txtAcct4.value;
	var address = document.frmContact.txtAddress1.value;
	var city = document.frmContact.txtCity.value;
	var state = document.frmContact.txtState.value;
	var zip = document.frmContact.txtZip.value;
	
	if (firstname == "")
	{
	alert ("Please provide your First Name.");
	document.frmContact.txtFirstName.focus();
	return (false);
	}
	if (lastname == "")
	{
	alert ("Please provide your Last Name.");
	document.frmContact.txtLastName.focus();
	return (false);
	}
	if ((ssn4 == "") || (isNaN(ssn4) == true) || (ssn4.length < 4))
	{
	alert ("Please provide the last 4 digits of your SSN.");
	document.frmContact.txtSSN4.focus();
	return (false);
	}
	if ((acct4 == "") || (isNaN(acct4) == true) || (acct4.length < 4))
	{
	alert ("Please provide the last 4 digits of your Account #.");
	document.frmContact.txtAcct4.focus();
	return (false);
	}
	if (address == "")
	{
	alert ("Please provide your Address.");
	document.frmContact.txtAddress1.focus();
	return (false);
	}
	if (city == "")
	{
	alert ("Please provide your City.");
	document.frmContact.txtCity.focus();
	return (false);
	}
	if (state == "")
	{
	alert ("Please provide your State.");
	document.frmContact.txtState.focus();
	return (false);
	}
	if (zip == "")
	{
	alert ("Please provide your Zip Code.");
	document.frmContact.txtZip.focus();
	return (false);
	}
	return (true);
}
//-->
<!--
	//CHANGE LOCATION DETAIL IMAGE
	function changeImage(imgID) {
	var currentID = document.currentLocation.currentID.value;
	if (imgID != currentID) {
		// new image fades in	
		//Effect.Appear('locationdetail' + imgID, { duration:1, from:0.0, to:1.0 });
		document.getElementById('locationdetail' + imgID).style.display = "block";
		document.getElementById('loctxthoriz' + imgID).style.display = "block";	

		// current image fades out
		//Effect.Fade('locationdetail' + currentID, { duration:1, from:1.0, to:0.0 });
		document.getElementById('locationdetail' + currentID).style.display = "none";
		document.getElementById('loctxthoriz' + currentID).style.display = "none";
		
		document.currentLocation.currentID.value = imgID;
	}
}
	//RESET LOCATION DETAIL IMAGE
	function returnImage() {
	var currentID = document.currentLocation.currentID.value;
	document.getElementById('locationdetail' + currentID).style.visibility = "hidden";
	document.getElementById('locationdetail1').style.visibility = "visible";
	document.currentLocation.currentID.value = "1";
}
//-->
