var d = document
var NN6
function init(){
	if (d.layers){
		screenW			=	innerWidth/100-.16;
		screenH			=	innerHeight/100;
		styleSwitch		=	"";
		pageTop			=	"pageYOffset";
		px				=	"";
		objTop			=	".top";
		objLeft			=   ".left";
		objWidth		=   ".clip.width";
		objHeight		=   ".clip.height";
		bgColor			=   "document.bgColor";

		initWindowWidth =   window.innerWidth
		initWindowHeight=   window.innerHeight

		function sizeChange(){
			if(navigator.appName == "Netscape" && initWindowWidth != window.innerWidth || initWindowHeight != window.innerHeight){
				d.location = d.location;
			}
		}
		window.onresize = sizeChange
	}
	if (d.all){
		screenW			= 	document.body.clientWidth/100;		
		screenH			= 	document.body.clientHeight/100;
		styleSwitch		=	".style";
		pageTop			=	"document.body.scrollTop";
		px				=	"px";
		objTop			=	".offsetTop";
		objLeft			=	".offsetLeft";
		objWidth 		= 	".clientWidth";
		objHeight 		= 	".clientHeight";
		bgColor			= 	"style.backgroundColor";

		window.onresize = new Function("d.location = self.location")
	
	}else if(d.getElementById){//NN6 only

		screenW			= 	(innerWidth-10)/100;		
		screenH			= 	(innerHeight)/100;
		styleSwitch		=	".style";
		pageTop			=	"pageYOffset";
		px				=	"px";
		objTop			=	".offsetTop"
		objLeft			=   ".offsetLeft"
		objWidth 		= 	".offsetWidth";
		objHeight 		= 	".offsetHeight";
		bgColor			= 	"style.backgroundColor";
		NN6				=   true
		window.onresize = new Function("d.location = self.location")
	}
}

//--------------function called to initialise browser variables---------------

init()

//----------


if(d.all || (d.all&& d.getElementById)){d.body.onload=onloadhandler}
else{self.onload=onloadhandler}



loadEvents = new Array()

function onloadhandler(){for(var e in loadEvents)eval(loadEvents[e])}

function findObj(n,d){
	var p,i,x;  
	if(!d) d=document; 
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
//alert(n.substring(p+1))
    	d=parent.frames[n.substring(p+1)].document; 
		n=n.substring(0,p);
	}
	if(!(x=d[n])){
		if(d.getElementById)x=d.getElementById(n)
		else if(d.all)x=d.all[n]
	}
	for (i=0;!x&&i < d.forms.length;i++)x=d.forms[i][n]
	for(i=0;!x&&d.layers&&i < d.layers.length;i++){x=findObj(n,d.layers[i].document);}
	return x;
}
