var firsttime = true; 
var loaded = 0;
var oX = new Object; 
var oY = new Object;

function objDiv(oDiv,oOwner,oAnchor,bVisible){
	oOwner=(!oOwner) ? '':'document.'+oOwner+'.'										
	this.el=objClient.dom?document.getElementById(oDiv):objClient.ie4?document.all[oDiv]:objClient.ns4?eval(oOwner+'document.'+oDiv):0;
	this.css=objClient.dom?document.getElementById(oDiv).style:objClient.ie4?document.all[oDiv].style:objClient.ns4?eval(oOwner+'document.'+oDiv):0;		
	this.height=objClient.ns4?this.css.document.height:this.el.offsetHeight 
	this.width=objClient.ns4?this.css.document.width:this.el.offsetWidth
	this.clipHeight=objClient.ns4?this.css.clip.height:this.el.offsetHeight
	//this.cx=(this.width/2)
	//this.cy=(this.height/2)
	if (firsttime){
		this.origtop=(objClient.ns4 || objClient.iemac && !objClient.ie5)?this.css.top:eval(this.css.top.slice(0,this.css.top.length-2));
		this.origleft=(objClient.ns4 || objClient.iemac && !objClient.ie5)?this.css.left:eval(this.css.left.slice(0,this.css.left.length-2));
		if (objClient.ns5mac){
			this.origtop=eval(this.css.top.slice(0,this.css.top.length-2));
			this.origleft=eval(this.css.left.slice(0,this.css.left.length-2));
		}
		oX[this.el.id]=this.origleft;	
		oY[this.el.id]=this.origtop;
	}
	else{	
		this.origleft=oX[this.el.id];	
		this.origtop=oY[this.el.id];
	}
	if(oAnchor){
		this.anchor=objClient.dom?document.getElementById(oAnchor):objClient.ie4?document.all[oAnchor]:objClient.ns4?eval(oOwner+'document.'+oAnchor):0;
		this.anchorleft=objClient.dom?this.anchor.offsetLeft+document.body.offsetLeft-2:objClient.ie4?this.anchor.offsetLeft:objClient.ns4?this.anchor.x-2:0;
		this.anchortop=objClient.dom?this.anchor.offsetTop+document.body.offsetTop+this.anchor.offsetHeight:objClient.ie4?this.anchor.offsetTop+this.anchor.offsetHeight:objClient.ns4?this.anchor.y+this.anchor.height:0;
		if(objClient.browser == 'ie'){
			if(!objClient.ie4mac){
				objTemp = this.anchor.offsetParent;
				while (objTemp != null)
				{
	          			this.anchortop+=objTemp.offsetTop; 
       					this.anchorleft+=objTemp.offsetLeft;
  					objTemp = objTemp.offsetParent;
				}
				this.anchortop-=0;
			}
			else{
				this.anchorleft+=document.all['main'].offsetLeft;
				this.anchortop+=document.all['main'].offsetTop + 59;
				if(this.anchor.id=='student')this.anchorleft+=18;
				if(this.anchor.id=='advanced')this.anchorleft+=138;
				if(this.el.id=='description'){
					this.anchorleft=0;
					this.anchortop=59;
				}
			}
		}
		this.newleft=this.origleft;
		this.newtop=this.origtop;
	}
	this.newleft+=this.anchorleft;
	this.newtop+=this.anchortop;
	this.newright=this.newleft+this.width;
	this.newbottom=this.newtop+this.height;
	moveDiv(this.newleft,this.newtop,this.el.id);
	if(!objClient.ie5mac){
		this.css.overflow='auto';
	}
	this.css.visibility=(bVisible)?'visible':'hidden';
	return this

}
function showDiv(oDiv,oOwner){
	oTemp=objClient.dom?document.getElementById(oDiv).style:objClient.ie4?document.all[oDiv].style:objClient.ns4?oOwner?document[oOwner].document[oDiv]:document[oDiv]:0; 	
	oTemp.visibility='visible';
}
function hideDiv(oDiv,oOwner){	
	oTemp=objClient.dom?document.getElementById(oDiv).style:objClient.ie4?document.all[oDiv].style:objClient.ns4?oOwner?document[oOwner].document[oDiv]:document[oDiv]:0; 	
	oTemp.visibility='hidden';
}
function moveDiv(iX,iY,oDiv,oOwner){ 
	oTemp=objClient.dom?document.getElementById(oDiv).style:objClient.ie4?document.all[oDiv].style:objClient.ns4?oOwner?document[oOwner].document[oDiv]:document[oDiv]:0; 	
	oTemp.left=iX;	
	oTemp.top=iY;
}
function getWindowInfo(){
	objClient.x=0; 	
	objClient.y=0;
	objClient.width=(objClient.ns4 || objClient.ns5)?window.innerWidth:document.body.clientWidth;
	objClient.height=(objClient.ns4 || objClient.ns5)?window.innerHeight:document.body.clientHeight;
	//objClient.cy=Math.round(objClient.height/2);	
	//objClient.cx=Math.round(objClient.width/2);
}
function refreshDiv() {
	if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {if (document.oWindow.XY.windowWidth != window.innerWidth || document.oWindow.XY.windowHeight != window.innerHeight) {	history.go(0);  	}	}
	else{ history.go(0); }
}
function setupRefreshDiv() {
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {    
		if (typeof document.oWindow == 'undefined'){      document.oWindow = new Object;    }
    if (typeof document.oWindow.F == 'undefined') {      
			document.oWindow.XY = new Object;      
			document.oWindow.XY.windowWidth = window.innerWidth;	      
			document.oWindow.XY.windowHeight = window.innerHeight;    }
    window.onresize = refreshDiv;
  }
	else{ window.onresize = refreshDiv;}
}
setupRefreshDiv()
