function detectFlash(){	

	if (navigator.plugins){							
		if (navigator.plugins["Shockwave Flash 2.0"] 	
		|| navigator.plugins["Shockwave Flash"]){		

			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
		
			var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
			flash2Installed = flashVersion == 2;		
			flash3Installed = flashVersion == 3;
			flash4Installed = flashVersion == 4;
			flash5Installed = flashVersion == 5;
			flash6Installed = flashVersion == 6;
		}
	}
	

	for (var i = 2; i <= maxVersion; i++) {	
		if (eval("flash" + i + "Installed") == true) actualVersion = i;
	}

	if(navigator.userAgent.indexOf("WebTV") != -1) actualVersion = 2;	

	if (actualVersion >= requiredVersion) { 		
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="125" HEIGHT="85">')
    	//----------------------------------------------------------------------------------
		// the destination of the SWF must go in the line of code below this comment
		//------------------------------------------------------------------------------------
		document.write('<PARAM NAME="movie" VALUE="/bannerads/overseas_filing/gh_banner_os_filing.swf">')
    	document.write('<PARAM NAME="quality" VALUE="high">')
		//-----------------------------------------------------------------------------------
		// the destination of the SWF must go in the line of code below this comment
		//-----------------------------------------------------------------------------------
    	document.write('<EMBED src="/bannerads/overseas_filing/gh_banner_os_filing.swf" quality="high" WIDTH="125" HEIGHT="85" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">')
    	document.write('</EMBED></OBJECT>')
	} else {	
		//-----------------------------------------------------------------------------------
		// the destination of the GIF must go in the line of code below this comment
		//-----------------------------------------------------------------------------------
	   	document.write('<a href="#" onClick="commandCode()"><img src="/bannerads/overseas_filing/gh_banner_os_filing.gif" width="125" height="85" border="0"></a>')
	}
}
detectFlash();	
