//basic browser detect
DOM = (document.getElementById) ? true : false;
NS4 = (document.layers) ? true : false;
IE = (document.all) ? true : false;
IE4 = IE && !DOM;
NS = (navigator.appName=="Netscape") ? true : false;
NS6 = NS && DOM;
MAC = (navigator.appVersion.indexOf("Mac") != -1);
//image rollover
function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj + 'On = new Image()')
		eval(imgObj + 'On.src = imgSrc + "_on.gif"')
		eval(imgObj + 'Off = new Image()')
		eval(imgObj + 'Off.src = imgSrc + "_off.gif"')
	}
}
function img_act(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "On.src");
	}
}
function img_inact(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "Off.src");
	}
}
function select_act(imgName,obj) {
	if (document.images) {
		obj.src = "/images/global/gl_butt_" + imgName + "_on.gif";
	}
}
function select_inact(imgName,obj) {
	if (document.images) {
		obj.src = "/images/global/gl_butt_" + imgName + "_off.gif";
	}
}
//dropdown jump
function dropdown(obj){
   var id = obj.value;
   if (id != "") {
		window.open(id);
	}
}
//popup window
function openWindow(windowURL,windowName,windowWidth,windowHeight,scrollBars) {
	newWindow = window.open(windowURL,windowName,'width='+windowWidth+',height='+windowHeight+',toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollbars='+scrollBars+',resizable=0');
   newWindow.moveTo((screen.width-windowWidth)/2,(screen.height-windowHeight)/2)
	newWindow.focus(); 
}
//delete confirm alert
function confirmation() {
	if (!confirm("Do you really want to delete?")) {
		return false;
	} else {
		return true;
	}
}
//make sure users enter item in search box
function searchValidate(obj) {
   var szSearchString;
   szSearchString =	obj.search.value;
   if (szSearchString == "" || szSearchString.length < 3){
      alert("Please enter a search word of at least 3 characters in length.");
      obj.search.focus();
      return false;
   } else {
      return true;
   }
}

