var FlashMovie = false;
var window_x = 0;
var window_y = 0;

var flash_w = 990;
var flash_h = 578;

// function to calculate size and pass through to flash
function sendSize()
{
	  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_x = (myWidth <= flash_w)? flash_w:myWidth;
	  window_y = (myHeight <= flash_h)? flash_h: myHeight;
	  
	  var size = window_x + ":" + window_y;
	
	
	  
	  FlashMovie.SetVariable("/:windowSize", size);

}

// function to retrieve flash object
function getFlashMovieObject(movieName)
{
	  if (window.document[movieName])
	  {
			return window.document[movieName];
	  }
	  if (navigator.appName.indexOf("Microsoft Internet")==-1)
	  {
			if (document.embeds && document.embeds[movieName])
			return document.embeds[movieName];
	  }
	  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
	  {
			return document.getElementById(movieName);
	  }
}

// flash caller
function sendToFlash()
{
	if (FlashMovie == false)
	{
		FlashMovie = getFlashMovieObject('myMovie');
	}
	sendSize();
}