// ---------------------------------------------------
// TEST FOR NETSCAPE BROWSERS
// ---------------------------------------------------
var agt=navigator.userAgent.toLowerCase();

// *** NETSCAPE  ***
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));


// ----------------------------------------------------
// CHANGE COLORS 
// ----------------------------------------------------
// Changes button color on mouseover/mouseout
// --------------------------------------------------
function change(color){
	event.srcElement.style.backgroundColor = color
}

// ----------------------------------------------------
// GO LINK
// ----------------------------------------------------
// Opens external links in a new window
// ----------------------------------------------------
function GoLink(url) {
	window.open(url);
}

// ----------------------------------------------------
// NOTIFY USER
// ----------------------------------------------------
// if a page is being updated or not available
// ----------------------------------------------------
function NotifyUser(){
	alert("This page is currently being updated.\nPlease check again later.")
}



// --------------------------------
// SHOW
// --------------------------------
// popup window to show these items
// --------------------------------
var scroll = false
var popW, popH, screenY, screenX;
var win

var currentpath = "http://www.co.charlotte.fl.us/clrkinfo/"


function Show(what) { 
	// the following code prevents a popup window
	// from displaying in Netscape so test for NN
	if (is_nav != true) {
		// only allow one child window open at a time
		if (win != null && win.open) {
		win.close();
		}
	}
	screenY = 600
	screenX = 800
	

	if (what == "PURPOSE") {
		url = currentpath + "includes/purpose.htm"
		popW = 350
		popH = 200
	} else if (what == "VALUES") {
		url = currentpath + "includes/values.htm"
		popW = 610
		popH = 400
	} else if (what == "VISION") {
	   url =  currentpath + "includes/vision.htm"
	   popW = 350
	   popH = 300
	   scroll= true
	} else {
		return;
	}
	scr = ((scroll) ? "scrollbars," : "");
	win = window.open(url,'','scrollbars,'+'width=' + popW + ',height='+popH+',top='+(screenY-popH)/2+',left='+(screenX-popW)/2);
	
  	if (!win.opener)
         win.opener = self; 
}
