// JavaScript Document

function SetMiddleAlign(){	
	var NS = (navigator.appName=="Netscape")?true:false;
	var dvObject=document.getElementById("MainDiv");
	var scWidth=(NS)?window.innerWidth:document.body.clientWidth;//document.body.offsetHeightscreen.availHeight
	if (document.documentElement.clientHeight==0){
		var scHeight=(NS)?window.innerHeight: document.body.offsetHeight;
	}else if(this.opera){
		var scHeight=(NS)?window.innerHeight: document.body.clientHeight;
	} else{
		var scHeight=(NS)?window.innerHeight: document.documentElement.clientHeight;
	}	
	if(screen.height<parseFloat(dvObject.style.height.replace(new RegExp("px","gi"),"")) || scHeight<parseFloat(dvObject.style.height.replace(new RegExp("px","gi"),""))){
		return false;	
	}	
	var ht=(scHeight-parseFloat(dvObject.style.height.replace(new RegExp("px","gi"),"")))/2;	
	dvObject.style.top=ht+"px";		
}

