﻿function fixbox()
{
	var maxWidth,maxHeight;
	if (self.innerHeight) // all except Explorer
	{
		maxWidth = self.innerWidth;
		maxHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
	{
		maxWidth = document.documentElement.clientWidth;
		maxHeight = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		maxWidth = document.body.clientWidth;
		maxHeight = document.body.clientHeight;
	}
	var boxTop =(maxHeight/2)-325;
	var boxLeft=(maxWidth /2)-385;
	
	if (boxTop <0) {boxTop =0;}
	if (boxLeft<0) {boxLeft=0;}
	document.getElementById("divbox1").style.top =boxTop +'px';
	document.getElementById("divbox1").style.left=boxLeft+'px';
	document.getElementById("divbox1").style.marginTop ='0px';
	document.getElementById("divbox1").style.marginLeft='0px';	
}
