//<!--- Version Mark = ild 2009-08-28 1:30 PM --->

//<!--- Added support for IE8 05/18/2009 --->
//<!--- Version Mark = ild 2006-08-14 1:20 PM --->

function nada(){

}

function box_center(ObjName){
	ObjWin = document.getElementById(ObjName + '_b');
	ObjShadow = document.getElementById(ObjName + '_s');
	ObjWidth = parseInt(ObjWin.style.width);
	ObjHeight = parseInt(ObjWin.style.height);
	DocumentW = currentDocW();
	DocumentH = currentDocH();

//	alert("DocW = " + DocumentW + "DocH = " + DocumentH);

	ObjWin.style.left = (DocumentW - ObjWidth) / 2;
	ObjWin.style.top = (DocumentH - ObjHeight) / 2 - 80;
	ObjShadow.style.left = (DocumentW - ObjWidth) / 2 + 8;
	ObjShadow.style.top = (DocumentH - ObjHeight) / 2 + 8 -80;

	if(parseInt(ObjWin.style.top) < 0){
		ObjWin.style.top = 15;
		ObjShadow.style.top = 23;	
	}
	keepscreen(ObjName);
}

function keepscreen(ObjName){
	ObjWin = document.getElementById(ObjName + '_b');
	ObjShadow = document.getElementById(ObjName + '_s');
	if (ObjWin.style.top != document.body.scrollTop + parseInt(ObjWin.style.top)){
		ObjWin.style.top = document.body.scrollTop + parseInt(ObjWin.style.top);
		ObjShadow.style.top = document.body.scrollTop + parseInt(ObjShadow.style.top);
	}
}

function myhidebox(ObjName, url){
	changecontent(ObjName,"");
	hidebox(ObjName);
}

function currentDocW(){
		if (IE4 || IE5)
			return(parseInt(document.body.clientWidth));
		else if(NN4)
			return(parseInt(window.innerWidth));
		else if(NN6)
			return(parseInt(window.innerWidth));
		else if(IE6 || IE7 )
			return(parseInt(document.body.clientWidth));
			//else{return(parseInt(document.body.clientHeight));}
		else if( IE8 )
			return(parseInt(document.body.clientWidth));

			var myWidth =  (screen.width) ? (screen.width+ObjWidth)/2 : 0;	// Must be left in place as myWidth is not global.
			return(myWidth);
			//return(parseInt(window.screen.availWidth));

}
function currentDocH(){
		if (IE4 || IE5)				
			return(parseInt(window.screen.availHeight));
		else if(NN4)
			return(parseInt(window.innerHeight));
		else if(NN6)
			return(parseInt(document.body.clientHeight));
		else if(IE6 || IE7 )
			return(parseInt(document.body.clientHeight));
		//	else{return(parseInt(document.body.clientHeight));}
		else if(IE8)
		//alert('IE8 ');
		
		var myHeight = (screen.height) ? (screen.height+ObjHeight)/2 : 0;
		//alert('ie8');
		return(myHeight);
				//return(parseInt(document.body.clientHeight));

		//return(parseInt(screen.height));
		//return(parseInt(window.screen.availHeight));

		
}