<!--
    //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", "");
				}
			}
		}
	}
}
	//window.onload=startList;
//-->
<!--
	//LOGIN - VALIDATE LOGIN FORM FIELDS
	function ValEmail() {
	var email = document.Form2.Email.value;
	var emailchar = document.Form2.Email.value.indexOf("@");
	var rulesval = document.Form2.RulesVal.value;
	if ((email == "") || (emailchar == -1)) 
	{
	alert ("Please provide a valid email address.");
	document.Form2.Email.focus();
	return (false);
	}
	if (rulesval == 0)
	{
	alert ("You must read the Official Rules to proceed.");
	document.Form2.Rules.focus();
	return (false);
	}
	return (true);
}
//-->
<!--
	//LOGIN - VALIDATE LOGIN FORM FIELDS
	function ValLogIn() {
	var username = document.Form3.UserName.value;
	var password = document.Form3.Password.value;
	if (username == "") 
	{
	alert ("Please enter a value for the \"User ID\" field.");
	document.Form3.UserName.focus();
	return (false);
	}
	if (password == "")
	{
	alert("Please enter a value for the \"Password\" field.");
	document.Form3.Password.focus();
	return (false);
	}
	return (true);
}
//-->
<!--
	//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;
	}
}
//-->
<!--
	//LOGIN - HANDLE CHECK BOX VALUE VALIDATION 2
	function OKRules() {
	var rules = document.Form2.Rules.value;
	var rulesval = document.Form2.RulesVal.value;
	if ((rules == 1) && (rulesval == 0))
		{
		document.Form2.RulesVal.value = 1;
		}
	else
		{
		document.Form2.RulesVal.value = 0;
	}
}
//-->
<!--
	//OPEN POP-UP
	function PopWin(NewLocation, HVal, WVal) {
	window.open(NewLocation, "NewWindow", "left=50,top=50,width=" + WVal 
	+ ",height=" + HVal + ",scrollbars=yes,status=no,toolbar=no");	
}
//-->
<!--
	//GO TO NEW LOCATION IN PARENT WINDOW
	function GoTo(NewLocation) {
	self.opener.location = NewLocation;
	parent.close();	
	}
//-->
<!--
	//DETERMINE WAIVER VAL
	function WaiverOption() {
	var waiveroption = document.Form2.WaiverAccept.value;
	
	if (waiveroption == 0) 
	{
	document.Form2.WaiverAccept.value = 1;
	}
	if (waiveroption == 1)
	{
	document.Form2.WaiverAccept.value = 0;
	}    
}
//-->
<!--
	function CheckForm() {
	var rswaiver = document.Form2.WaiverAccept.value;
	if (rswaiver == 0)
	{
    alert("You must agree to proceed.");
    document.Form2.ckWaiver.focus();
    return (false);
    }
return (true); 
}
//-->
<!--
	//LEAVING SITE ALERT
	function popAlert(confURL, winStatus) {
	var popconf = confirm("You will be redirected to a site that is not part of the " +
		"First National Bank in Amboy Website. To continue please select 'OK' " +
		"or choose another menu option to continue browsing our site.");
		
	if (popconf == true)
	{
		if (winStatus == 1)
		{
		window.location = confURL;
		}
		if (winStatus == 2)
		{
		window.open(confURL);
		}	
	}
}
//-->
<!--
	//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.php", 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=\"PopWin('fnb_forecast.htm', 575, 400)\">" + desc + "</a>";
		    document.getElementById("strtemp").innerHTML = temp;
		}
  		else
		{
			document.getElementById("strdesc").innerHTML = "No Weather Information Available";
		    document.getElementById("strtemp").innerHTML = "";
    	}
  	}
}
//-->
