// JavaScript Document

window.onresize=alertSize;



function alertSize() {
  var screenHeight;
  var screenWidth;
  var contentHeight=document.getElementById("content").offsetHeight;
  
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    screenWidth = window.innerWidth;
    screenHeight = window.innerHeight;

	if (screenHeight< (contentHeight+120+110+20)) {
	document.getElementById("bottomnav").style.top = (contentHeight+120+110)+"px"; 
	document.getElementById("footer").style.top = (contentHeight+120)+"px"; 
	document.getElementById("footer").style.left = (screenWidth-900)/2+"px"; 
	document.getElementById("main").style.left = (screenWidth-900)/2+"px"; 
	document.getElementById("main").style.height= (contentHeight+120+110+20)+"px";
	document.getElementById("shadow").style.left = (screenWidth-918)/2+"px";
	document.getElementById("shadow").style.height= (contentHeight+120+110+20)+"px";//content+topnav+bottom+footer 
	document.getElementById("background").style.height= (contentHeight+120+110+20)+"px";
 
	} else  {
	document.getElementById("bottomnav").style.top = (screenHeight-20)+"px"; 
	document.getElementById("footer").style.top = (screenHeight-130)+"px";
	document.getElementById("footer").style.left = (screenWidth-900)/2+"px";
	document.getElementById("main").style.left = (screenWidth-900)/2+"px"; 
	document.getElementById("main").style.height= screenHeight+"px"; 
	document.getElementById("shadow").style.left = (screenWidth-918)/2+"px"; 
	document.getElementById("shadow").style.height= screenHeight+"px"; 
	document.getElementById("background").style.height= screenHeight+"px";  
	} 
	
	
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    screenWidth = document.documentElement.clientWidth;
    screenHeight = document.documentElement.clientHeight;
	
	
	if (screenHeight< (contentHeight+120+110+20)) {
	document.getElementById("bottomnav").style.top = (contentHeight+120+110)+"px"; 
	document.getElementById("footer").style.top = (contentHeight+120)+"px"; 
	document.getElementById("footer").style.left = (screenWidth-900)/2+"px"; 
	document.getElementById("main").style.left = (screenWidth-900)/2+"px"; 
	document.getElementById("main").style.height= (contentHeight+120+110+20)+"px";
	document.getElementById("shadow").style.left = (screenWidth-918)/2+"px";
	document.getElementById("shadow").style.height= (contentHeight+120+110+20)+"px";//content+topnav+bottom+footer 
	document.getElementById("background").style.height= (contentHeight+120+110+20)+"px";
 
	} else  {
	document.getElementById("bottomnav").style.top = (screenHeight-20)+"px"; 
	document.getElementById("footer").style.top = (screenHeight-130)+"px";
	document.getElementById("footer").style.left = (screenWidth-900)/2+"px";
	document.getElementById("main").style.left = (screenWidth-900)/2+"px"; 
	document.getElementById("main").style.height= screenHeight+"px"; 
	document.getElementById("shadow").style.left = (screenWidth-918)/2+"px"; 
	document.getElementById("shadow").style.height= screenHeight+"px"; 
	document.getElementById("background").style.height= screenHeight+"px";  
	} 
}
}

