pageLoaded = false
var timeID,
active = 0,
subMenu,
imageSrc,
image;

function Show (x) {
	if ( active )
		Delete()
	if ( x != '' ) {
		if ( document.getElementById ) {
		document.getElementById(x).style.visibility = "visible";
		}
		else if ( document.layers )
			document.layers[x].visibility = "show"
		else if ( document.all )
			document.all[x].style.visibility = "visible";
	}
	subMenu  = x;
	active = 1;
}

function Release() {
	if ( subMenu != '' )
		timeID = setTimeout( Delete, 1000 );
}

function Delete() {
	Hide( subMenu )
	clearTimeout( timeID )
	active = 0;
}

function Hide( x ) {
	if ( x != '' ) {
		if ( document.getElementById )
			document.getElementById(x).style.visibility = "hidden";
		else if ( document.layers )
			document.layers[x].visibility = "hide";
		else if ( document.all )
			document.all[x].style.visibility = "hidden";
	}
}

function Hold() {
	clearTimeout(timeID)
}

function map() {
	window.status = "Please, click the menu!"
}

function land(ref, target) {
	lowtarget=target.toLowerCase();
	if (lowtarget=="_self") window.location=loc
	else {
		if (lowtarget=="_top") top.location=loc
		else {
			if (lowtarget=="_blank") window.open(loc)
			else {
				if (lowtarget=="_parent") parent.location=loc
				else {
					parent.frames[target].location=loc
				}
			}
		}
	}
}



function jump(menu) {
	ref=menu.choice.options[menu.choice.selectedIndex].value
	splitc=ref.lastIndexOf("*");
	target="";
	if (splitc!=-1) {
		loc=ref.substring(0,splitc)
		target=ref.substring(splitc+1,1000)
	} else {
		loc=ref
		target="_self"
	}
	if (ref != "")
		land(loc,target)
}

// Netscape4 fix resize bug
function WM_netscapeCssFix() {
	if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight)
		document.location = document.location;
}

function WM_netscapeCssFixCheckIn() {
	if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
		if (typeof document.WM == 'undefined') {
			document.WM = new Object;
		}
		if (typeof document.WM.WM_scaleFont == 'undefined') {
			document.WM.WM_netscapeCssFix = new Object;
			document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
			document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
		}
		window.onresize = WM_netscapeCssFix;
	}
}

WM_netscapeCssFixCheckIn();

function macIEResizer() {
	window.location.reload(true)
}

if (document.all) {
	if (navigator.userAgent.indexOf("Mac") >= 0) window.onresize = macIEResizer;
}

 function openwindow( url, pars, name ) {
 var w = window.open( url, name, pars );
 w.focus();
}
// catch all errors...
//window.onerror = new Function ("return true")

