var ua= navigator.userAgent;
var OPERA = (ua.indexOf("Opera") > 0) ? true : false;
var OMNI = (ua.indexOf("Omni") > 0) ? true : false;
var MAC = (navigator.platform.indexOf("PPC") > 0) ? true : false;
var WIN = (navigator.platform=="Win32") ? true : false;
var getID =document.getElementById ? true : false;
var IE5_0, IE5,IE6,IE5_5,N4,N5,NS6,MAC_IE5,MOZ,browserName=navigator.appName.substring(0,navigator.appName.indexOf(" ") > 4 ? navigator.appName.indexOf(" ") : navigator.appName.length);
if(!OPERA && !OMNI){
	IE6 = (ua.indexOf("MSIE 6") > 0) ? true : false;
	IE5_0 = (ua.indexOf("MSIE 5.0") > 0) ? true : false;
	IE5_5 = (ua.indexOf("MSIE 5.5") > 0) ? true : false;
	IE5 = (ua.indexOf("MSIE 5") > 0  || IE6 || IE5_5) ? true : false;
	N4 = (document.layers) ? 1 : 0;
	NS6= N5 = (ua.indexOf("Gecko") > 0) ? true : false;
	MAC_IE5 = (MAC && IE5) ? 1 : 0;
	MAC_IE5_1b = (MAC && ua.indexOf("MSIE 5.1b") >= 0) ? 1 : 0;
	WIN_IE5= IE5 && !MAC;
	MOZ= N5 && !(ua.indexOf("Netscape") > 0) ? true : false;
}

else{
	if(OMNI) browserName= "OmniWeb";
}


function hideLoadingPage() {
if (document.getElementById) {  // DOM3 = IE5, NS6
	document.getElementById('hidepage').style.visibility = 'hidden';
}
else {
	if (document.layers) {  // Netscape 4
		document.hidepage.visibility = 'hidden';
	}
	else {  // IE 4
		document.all.hidepage.style.visibility = 'hidden';
	}
}
}

function popUp(w, h, page) {
newWin=window.open(page, 'popup', 'width = '+w+',height = '+h+',directories = no,location = no,menubar = no,resizable = yes,scrollbars = yes,status = yes,toolbar = no');
newWin.focus();
return false;
}

function zonepopup() {
  el = document.getElementById("zonepopup");
  el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible";
}

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}
