<!--

if (document.images) {

	home_on = new Image(59,30); home_on.src = "/common/images/navbar/nb_home_o.gif";
	home_off = new Image(59,30); home_off.src = "/common/images/navbar/nb_home.gif";
	dept_on = new Image (100,30); dept_on.src = "/common/images/navbar/nb_dept_o.gif"
	dept_off = new Image (100,30); dept_off.src = "/common/images/navbar/nb_dept.gif"
	employees_on = new Image (87,30); employees_on.src = "/common/images/navbar/nb_employees_o.gif"
	employees_off = new Image (87,30); employees_off.src = "/common/images/navbar/nb_employees.gif"
	news_on = new Image (55,30); news_on.src = "/common/images/navbar/nb_news_o.gif"
	news_off = new Image (55,30); news_off.src = "/common/images/navbar/nb_news.gif"
	faq_on = new Image (48,30); faq_on.src = "/common/images/navbar/nb_faq_o.gif"
	faq_off = new Image (48,30); faq_off.src = "/common/images/navbar/nb_faq.gif"
	tourism_on = new Image (71,30); tourism_on.src = "/common/images/navbar/nb_tourism_o.gif"
	tourism_off = new Image (71,30); tourism_off.src = "/common/images/navbar/nb_tourism.gif"
	records_on = new Image (107,30); records_on.src = "/common/images/navbar/nb_records_o.gif"
	records_off = new Image (107,30); records_off.src = "/common/images/navbar/nb_records.gif"
	go_on = new Image (32,30); go_on.src = "/common/images/navbar/nb_go_o.gif"
	go_off = new Image (32,30); go_off.src = "/common/images/navbar/nb_go.gif"
	econ_on = new Image (161,30); econ_on.src = "/common/images/navbar/nb_econ_o.gif"
	econ_off = new Image (161,30); econ_off.src = "/common/images/navbar/nb_econ.gif"
	appcom_on = new Image (162,30); appcom_on.src = "/common/images/navbar/nb_appcom_o.gif"
	appcom_off = new Image (162,30); appcom_off.src = "/common/images/navbar/nb_appcom.gif"
	gis_on = new Image (46,30); gis_on.src = "/common/images/navbar/nb_gis_o.gif"
	gis_off = new Image (46,30); gis_off.src = "/common/images/navbar/nb_gis.gif"
	}

function swapImage(id,name){
  if (document.images) {
	document.images[id].src=eval(name+".src");
  	}
}

// initialize global var for new window object
//   so it can be accessed by all functions on the page 

	var newWind;

// set flag to help out with special handling for window closing //

	var isIE3 = (navigator.appVersion.indexOf("MSIE 3") != -1) ? true : false;

function openWindow(fileUrl,winWidth,winHeight){

	// close subwindow, including ugly workaround for IE3 //

	if (isIE3) {

	// if window is already open, nothing appears to happen //
	//   but if not, the subwindow flashes momentarily (yech!) //
	   
		newWind = window.open("","subwindow",'HEIGHT=' + winWidth + ',WIDTH=' + winHeight);
        }
        if (newWind && !newWind.closed) {
                newWind.close();
        }

	// make the new window and put some stuff in it //
	
	newWind=window.open(fileUrl,"subwindow",'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=' + winWidth + ',height=' + winHeight);
}

function printThis(docURL){
	
	URL='/common/php/pageprint.php?page=' + escape(docURL);
	openWindow(URL,'640','480');
	
}

function mailThis(docURL){
	
	URL='/common/php/email_site.php?link=' + escape(docURL);
	openWindow(URL,'640','550');

}

// This next little bit of code tests whether the user accepts cookies.
function checkCookie() {
	var acceptsCookies = false;
	if(document.cookie == '') {
	    document.cookie = 'acceptsCookies=yes'; // Try to set a cookie.
	    if(document.cookie.indexOf('acceptsCookies=yes') != -1) {
		acceptsCookies = true;
		//setCookie("acceptsCookies","true","","/","",""); 
	    }// If it succeeds, set variable
	} else { // there was already a cookie
	  acceptsCookies = true;
	}
	return(acceptsCookies);
}

function setCookie(name,value,expires,path,domain,secure) {
    if (cookiesEnabled) { // Don't waste your time if the browser doesn't accept cookies.
	
	    document.cookie = name + "=" +escape(value) +
    	    ( (expires) ? ";expires=" + expires.toGMTString() : "") +
        	( (path) ? ";path=" + path : "") + 
        	( (domain) ? ";domain=" + domain : "") +
        	( (secure) ? ";secure" : "");
    }
}

function readCookie(name) {
    if(document.cookie == '') { // there's no cookie, so go no further
	return false; 
    } else { // there is a cookie
	var firstChar, lastChar;
	var theBigCookie = document.cookie;
	firstChar = theBigCookie.indexOf(name);	// find the start of 'name'
	var NN2Hack = firstChar + name.length;
	if((firstChar != -1) && (theBigCookie.charAt(NN2Hack) == '=')) { // if you found the cookie
	    firstChar += name.length + 1; // skip 'name' and '='
	    lastChar = theBigCookie.indexOf(';', firstChar); // Find the end of the value string (i.e. the next ';').
	    if(lastChar == -1) lastChar = theBigCookie.length;
	    return unescape(theBigCookie.substring(firstChar, lastChar));
	} else { // If there was no cookie of that name, return false.
	    return false;
	}
    }	
} // readCookie

function killCookie(name, path, domain) {
  var theValue = readCookie(name); // We need the value to kill the cookie
  if(theValue) {
      document.cookie = name + '=' + theValue + '; expires=Fri, 13-Apr-1970 00:00:00 GMT' + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:''); // set an already-expired cookie
  }
} // killCookie

var cookiesEnabled=checkCookie();

//-->
