var button_margins = '325px'; 
var short_image    = "url(/img/deprecatedhome540.jpg)";
var default_height = '655px';

function getHeight() {
	var maximum = 655;
	var lowResHeight = 540;
	var val =getWindowHeight();
	var _height = val;
	if(val >= maximum){
		return maximum;
	}
	return lowResHeight;
}


function resizeFlash(){
	if(height < 655 ){
		 document.getElementById("flash_wrapper").style.height=height+'px';
		 document.getElementById("content_wrapper").style.height=height+'px';
		
		 // deal with the deprecated content
		 document.getElementById("homeTourButton").style.marginTop = button_margins;
		 document.getElementById("homeFlashButton").style.marginTop = button_margins;
		 document.getElementById('flash_wrapper').style.backgroundImage = short_image;
	} else {
		document.getElementById("flash_wrapper").style.height=default_height;
	}
}



function getWindowHeight() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerHeight ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
return myHeight;	
}