// JavaScript Document


window.onresize = function () {

	FindWindowSize();
	
}



function FindWindowSize() {
	
	var mainStageHeight = window.document.curtis_green.GetVariable("mainStageHeight");
	
	//window.alert(mainStageHeight);
	
	var myWidth = 0, myHeight = 0;
	 
	 if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	 } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	 } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	 }
  	// window.alert( 'Width = ' + myWidth );
  	//window.alert(mainStageHeight);
  

	SendDataToFlashMovie(myWidth, myHeight);
  	UpdatePageHeight(mainStageHeight, myHeight);
	
}

function SendDataToFlashMovie(myWidth, myHeight)
{	
  	window.document.curtis_green.SetVariable("varMessage", myWidth + ":" + myHeight);
	currentURL = document.location.href.split("?");
	subpage = currentURL[1];
	//window.document.curtis_green.SetVariable("varCurrentURL", subpage);
}


// used to set scroll bar window
function UpdatePageHeight(mainStageHeight, browserStageHeight) 
{
	
	if ( browserStageHeight < mainStageHeight ) {
		scrollDiv = document.getElementById('myFlashBox');
		scrollDiv.style.height = mainStageHeight + 'px';
		
	
	} else {
		scrollDiv = document.getElementById('myFlashBox');
		scrollDiv.style.height = browserStageHeight + 'px';
		
	}
	
	
}

function changeURL(url) {
		
		//currentURL = document.location.href.split("?");
		//document.location = currentURL[0]+ "?" + url;


}