if (document.getElementById) {
	prefix = 'document.getElementById(\"';
	suffix = '\").style';
}
else if (document.layers) {
		prefix = 'document.layers[\"';
		suffix = '\"]';
}
else {
	prefix = 'document.all[\"';
	suffix = '\"].style';
}

function TurnOn_Layer(thisLayer)
{
	document.location = "#top";
	
	var display;
	display = eval(prefix + thisLayer + suffix + '.display');
	//alert(display);
	if ((display != 'block') && (display != 'inline') && (display != 'hidden') && (display != '') ) 
	{

		// Opera 4.0 to 6.0 will always return undefined
		eval(prefix + thisLayer + suffix + '.visibility=""');
		//eval(prefix + thisLayer + suffix + '.display="block"');
	}
	else {
		eval(prefix + thisLayer + suffix + '.visibility="visible"');
	}
}

function TurnOff_Layer(thisLayer)
{
	document.location = "#top";
	
	var display;
	display = eval(prefix + thisLayer + suffix + '.display');
	//alert(display);
	if ((display != 'block') && (display != 'inline') && (display != 'hidden') && (display != '') ) 
	{

		// Opera 4.0 to 6.0 will always return undefined
		eval(prefix + thisLayer + suffix + '.visibility="hidden"');
		//eval(prefix + thisLayer + suffix + '.display="none"');
	}
	else {
		eval(prefix + thisLayer + suffix + '.visibility="hidden"');
		//eval(prefix + thisLayer + suffix + '.display="none"');
	}
}

function NewWindow(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable,location=yes,menubar=yes,directories=yes,toolbar=yes'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


function NewWindow_No_loc(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable,location=no'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

