
function writeSwf()
{
	var flashVars = "inBrowser=true&" + location.search.substring(1);
			
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="100%" HEIGHT="100%">');
	document.write('<PARAM NAME="movie" VALUE="index.swf">'); 
	document.write('<param name="quality" value="HIGH" />' );
	document.write('<PARAM NAME="menu" VALUE="false">');
	document.write('<PARAM NAME="bgcolor" VALUE="#FFFFFF">');					
	document.write('<PARAM NAME="FlashVars" VALUE="' + flashVars + '">');		
	document.write('<EMBED src="index.swf" menu="false" bgcolor="#FFFFFF" quality="high" WIDTH="100%" HEIGHT="100%" FlashVars="' + flashVars + '" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.write('</OBJECT>');

	window.onresize = setSiteHeight;
	setSiteHeight();
}


function setSiteHeight() 
{
	var x,y;
	
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}

	// force vertical scrolling if needed
	var minHeight = 730;
	var h = (y < minHeight ) ? minHeight : y;
	
	if(document.all && !document.getElementById) 
	{
 		document.all['theID'].style.pixelHeight = h;
	
	}else{
		document.getElementById('theID').style.height = h;
	}
	
}
