// 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+115+20+100)) {
	document.getElementById("bottomnav").style.top = (contentHeight+115)+"px"; 
	document.getElementById("footer").style.top = (contentHeight+115+15)+"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+115+20)+"px";
	document.getElementById("shadow").style.left = (screenWidth-960)/2+"px";
	document.getElementById("shadow").style.height= (contentHeight+115+15+100)+"px";//content+topnav+bottom+footer
 
	} else  {
	document.getElementById("bottomnav").style.top = (contentHeight+115)+"px"; 
	document.getElementById("footer").style.top = (screenHeight-100)+"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-100)+"px"; 
	document.getElementById("shadow").style.left = (screenWidth-960)/2+"px"; 
	document.getElementById("shadow").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+115+20+100)) {
	document.getElementById("bottomnav").style.top = (contentHeight+115)+"px"; 
	document.getElementById("footer").style.top = (contentHeight+115+15)+"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+115+20)+"px"; //content+topnav+bottom+footer
	document.getElementById("shadow").style.left = (screenWidth-960)/2+"px";
	document.getElementById("shadow").style.height= (contentHeight+115+15+100)+"px";
 
	} else  {
	document.getElementById("bottomnav").style.top = (contentHeight+115)+"px"; 
	document.getElementById("footer").style.top = (screenHeight-100)+"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-100)+"px"; 
	document.getElementById("shadow").style.left = (screenWidth-960)/2+"px"; 
	document.getElementById("shadow").style.height= screenHeight+"px"; 

	} 

}
}

