//globals
var layerRef="null",layerStyleRef="null",styleSwitch="null",leftSwitch="null",topSwitch="null",show="show",hide="hide",height,width;
var newPageName = "default.asp";
var contentFrame= "";

explorer = (document.all) ? true:false;
netscape = (document.layers) ? true:false;
dom = (document.getElementById) ? true:false;

var left = Math.round(screen.availWidth/2)
var top = Math.round(screen.availHeight/2)
var windowCount = 0


//run Imediately
if(explorer){
	//width = document.body.clientWidth;
	//height = document.body.clientHeight;

	layerStyleRef="layer.style.";
	layerRef="document.all";
	styleSwitch=".style";
	leftSwitch=".pixelLeft";
	topSwitch=".pixelTop";
	show = "visible";
	hide = "hidden";
}

if(netscape){
	width = window.innerWidth;
	height = window.innerHeight;
	layerStyleRef="layer.";
	layerRef="document.layers";
	styleSwitch="";
	leftSwitch=".left";
	topSwitch=".top";
	show = "show";
	hide = "hide";
}

if(dom){
	layerRef="document.getElementById";
	styleSwitch=".style";
	leftSwitch=".left";
	topSwitch=".top";
	show = "visible";
	hide = "hidden";
}

//----------layer functions----------------
function getLayerReference(layerName){
	if(netscape || (explorer && !dom))
		return (layerRef+"['"+layerName+"']");
	else
		return (layerRef+"('"+layerName+"')");
}

function testLayer(layerName){
	ret = (getLayerReference(layerName)+styleSwitch+'.display;');
	return ret;
}

function showLayer(layerName){
	eval(getLayerReference(layerName)+styleSwitch+'.display="";');
}
	
function hideLayer(layerName){
	eval(getLayerReference(layerName)+styleSwitch+'.display="none";');
}



//----------CSS functions----------------
function setHeading(id){
	if ((document.getElementById)&&(document.getElementById(id)!=null)){
		var nodeObj = document.getElementById(id)
		nodeObj.style.fontWeight = 'bolder';
	}
}

function setStyle(id){
	if ((document.getElementById)&&(document.getElementById(id)!=null)){
		var nodeObj = document.getElementById(id)
		nodeObj.style.fontWeight = 'normal';
	}
}

