//check for flash
var flashversion = 7;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= flashversion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+flashversion+'")))\n');
	document.write('</SCRIPT\> \n'); 
}

function playSWF(file,id,vars,width,height,wmode,bgcolor,baseurl)	{
			document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
			document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ');
			document.write(' ID='+id+' WIDTH='+width+'px; HEIGHT='+height+'px>' );
			document.write(' <PARAM NAME="allowScriptAccess" VALUE="sameDomain" /> <PARAM NAME=movie VALUE="'+file+'"> <PARAM NAME=FlashVars VALUE="page_vars='+vars+'"> <PARAM NAME=menu VALUE=true>  <PARAM NAME="BASE" VALUE='+baseurl+'> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode value='+wmode+'> <PARAM NAME=bgcolor VALUE='+bgcolor+'>'); 
				if(navigator.userAgent.indexOf("Opera")==-1)	{
					document.write(' <EMBED src="'+file+'" FlashVars="page_vars='+vars+'" wmode='+wmode+' menu=true quality=high bgcolor='+bgcolor+'');
					document.write(' swLiveConnect=FALSE allowScriptAccess="sameDomain" NAME='+id+' WIDTH='+width+'px HEIGHT='+height+'px');
					document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" BASE='+baseurl+'>');
					document.write(' </EMBED>');
				}
				else	{
					document.write(' <EMBED src="'+file+'" FlashVars="page_vars='+vars+'" wmode='+wmode+' menu=true quality=high bgcolor='+bgcolor+'');
					document.write(' swLiveConnect=FALSE allowScriptAccess="sameDomain" ID='+id+' WIDTH='+width+'px HEIGHT='+height+'px');
					document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" BASE='+baseurl+'>');
					document.write(' </EMBED>');
				}
			document.write(' </OBJECT>');
}