// Detect if browser is Netscape 3 + or IE 4 +
	bName = navigator.appName;
	bVer = parseInt(navigator.appVersion);
    if ((bName == "Netscape" && bVer >= 3) || 
        (bName == "Microsoft Internet Explorer" && bVer >= 4)) br = "n3"; 
    else br = "n2";

    if (br== "n3") { 				


		home_01_off	 			= new Image();
		home_01_off.src			= "http://www.cityofgrassvalley.com/services/images/home/home_01_off.gif";
		home_01_on     			= new Image();
		home_01_on.src 			= "http://www.cityofgrassvalley.com/services/images/home/home_01_on.gif";	
		
		home_02_off	 			= new Image();
		home_02_off.src			= "http://www.cityofgrassvalley.com/services/images/home/home_02_off.gif";
		home_02_on     			= new Image();
		home_02_on.src 			= "http://www.cityofgrassvalley.com/services/images/home/home_02_on.gif";	
		
		home_03_off	 			= new Image();
		home_03_off.src			= "http://www.cityofgrassvalley.com/services/images/home/home_03_off.gif";
		home_03_on     			= new Image();
		home_03_on.src 			= "http://www.cityofgrassvalley.com/services/images/home/home_03_on.gif";	
		
		home_04_off	 			= new Image();
		home_04_off.src			= "http://www.cityofgrassvalley.com/services/images/home/home_04_off.gif";
		home_04_on     			= new Image();
		home_04_on.src 			= "http://www.cityofgrassvalley.com/services/images/home/home_04_on.gif";

		level2_01_off	 		= new Image();
		level2_01_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_01_off.gif";
		level2_01_on     		= new Image();
		level2_01_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_01_on.gif";	
		
		level2_02_off	 		= new Image();
		level2_02_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_02_off.gif";
		level2_02_on     		= new Image();
		level2_02_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_02_on.gif";	
		
		level2_03_off	 		= new Image();
		level2_03_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_03_off.gif";
		level2_03_on     		= new Image();
		level2_03_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_03_on.gif";	
		
		level2_04_off	 		= new Image();
		level2_04_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_04_off.gif";
		level2_04_on     		= new Image();
		level2_04_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_04_on.gif";
		
		level2_05_off	 		= new Image();
		level2_05_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_05_off.gif";
		level2_05_on     		= new Image();
		level2_05_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_05_on.gif";

		level2_06_off	 		= new Image();
		level2_06_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_06_off.gif";
		level2_06_on     		= new Image();
		level2_06_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_06_on.gif";	

		level2_06a_off	 		= new Image();
		level2_06a_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_06a_off.gif";
		level2_06a_on     		= new Image();
		level2_06a_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_06a_on.gif";	
		
		level2_07_off	 		= new Image();
		level2_07_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_07_off.gif";
		level2_07_on     		= new Image();
		level2_07_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_07_on.gif";	
		
		level2_08_off	 		= new Image();
		level2_08_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_08_off.gif";
		level2_08_on     		= new Image();
		level2_08_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_08_on.gif";	
		
		level2_08a_off	 		= new Image();
		level2_08a_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_08a_off.gif";
		level2_08a_on     		= new Image();
		level2_08a_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_08a_on.gif";	
		
		level2_09_off	 		= new Image();
		level2_09_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_09_off.gif";
		level2_09_on     		= new Image();
		level2_09_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_09_on.gif";
		
		level2_10_off	 		= new Image();
		level2_10_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_10_off.gif";
		level2_10_on     		= new Image();
		level2_10_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_10_on.gif";
		
		level2_11_off	 		= new Image();
		level2_11_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_11_off.gif";
		level2_11_on     		= new Image();
		level2_11_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_11_on.gif";	
		
		level2_12_off	 		= new Image();
		level2_12_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_12_off.gif";
		level2_12_on     		= new Image();
		level2_12_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_12_on.gif";	
		
		level2_13_off	 		= new Image();
		level2_13_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_13_off.gif";
		level2_13_on     		= new Image();
		level2_13_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_13_on.gif";	

		level2_14_off	 		= new Image();
		level2_14_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_14_off.gif";
		level2_14_on     		= new Image();
		level2_14_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_14_on.gif";
		
		level2_15_off	 		= new Image();
		level2_15_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_15_off.gif";
		level2_15_on     		= new Image();
		level2_15_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_15_on.gif";

		level2_16_off	 		= new Image();
		level2_16_off.src		= "http://www.cityofgrassvalley.com/services/images/level2/level2_16_off.gif";
		level2_16_on     		= new Image();
		level2_16_on.src 		= "http://www.cityofgrassvalley.com/services/images/level2/level2_16_on.gif";	


	}
		
	function imgOn(imgName){
		if (br == "n3"){
    	document[imgName].src = eval(imgName + "_on.src");
		}
	}
	function imgOff(imgName) {
    	if (br == "n3") {
		document[imgName].src = eval(imgName + "_off.src");
		}
	}	
	// -->

//----------------------------------------------
 function sendForm() {
		return confirm("Is all the information correct?\n Hit OK to submit or CANCEL to make changes.");
	}

 function openWin(URL,W,H,scroll){ 		
 		var properties = "height=" + H + ",width=" + W + ",scrollbars=" + scroll + ",resizable=yes,status=no,toolbar=no,menubar=no,top=100,left=100";
		var popup = window.open("http://www.cityofgrassvalley.com/" + URL,"win",properties);
		popup.focus();
	}
//------------------------------------------------	
// Search form validation
function isSearch() {
		if (searchform.Searchterms.value == "" || searchform.Searchterms.value == "Enter Key Word") {
    		alert("Please enter a word or phrase before searching.");
    		searchform.Searchterms.focus();
    		return false;
    	}
		}
function clearSearch() {
		if (searchform.Searchterms.value == "Enter Key Word") {
    		searchform.Searchterms.value = "";
    		searchform.Searchterms.focus();    		
    	}
		}
//-------------------------------------------------
// Popup for city council members
var ccpopup;
function ccpopup(filename){
var path = 'http://www.cityofgrassvalley.com/services/departments/admin/';
var ccpopup;
var height=480;
var width=480;
var left=(screen.width/2)-(480/2);
var top=(screen.height/2)-(160/2);
var startleft=50;
var starttop=50;
ccpopup = window.open(path + filename, "ccpopup","height="+height+",width="+width+",top="+starttop+",left="+startleft+",location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=no,directories=no");
ccpopup.focus();
}
// <a href="#council" onclick="ccpopup(pagename.php);">Click Here</a>

//-------------------------------------------------------------
//popup script for calendar //
	function calWin() {
		URL = "http://www.cityofgrassvalley.com/cgi-bin/cityof/cal/fire/calendar.pl";
		var name = "cWindow";
		var properties = "toolbar=no, width=650, height=500, status=no, scrollbars=yes, resizable=yes, menubar=yes, top=10, left=10";
		cWindow = window.open(URL,name,properties);
		this.cWindow.focus();
		}
//---------------------------------------------------------
// popup for newsletter images, called from newsletter html pages
// takes image path as argument and returns a html page with that image (with closewindow  button)
var Pwin
function newsletterWin(image) { 
	var pwin = "http://www.cityofgrassvalley.com/cgi-bin/cityof/newsletters/show_newsletter_image.cgi?image=" + image;
Pwin = window.open(pwin,'Pwin','width=710,height=500,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,top=10,left=10');
this.Pwin.focus(); 
}
//----------------------------------------------------------
// Used in the Information page shortcuts.php
// WEP breaks the backslash so put this here
var announce = "You are being directed to \"General Announcements\"\nTo view an announcement specific to a department please visit that department";
//--------------------------------------

