// Resize the usable object dimesions according to window size.

var maxWidth;
var maxHeight;
var height;
function center (){
	if (!document.getElementById){
		return;
	}
	var object = document.getElementById("container")
	//alert (window.innerWidth + " " + document.body.offsetWidth)
	if (window.innerWidth){
		//Firefox  etc.
		object.style.top =  String(window.innerHeight/2 - 300) + "px";
	} else if (document.body.clientWidth){
		//Windows
		object.style.top =  Math.max(0, document.body.clientHeight/2 - 300);
	}	
}

var centerTempFunc = window.onload;
window.onload = function(){
	if (typeof (centerTempFunc) == "function"){
		try{
			centerTempFunc();
		} catch(e){}
	}
	center();
}
window.onresize = function(){
	center();
}
	
