// ---------------------------------------------------------------------
// InsertFlashWithDetection
// ---------------------------------------------------------------------


  function PopUp(mypage, myname, w, h, scroll){
		
	  var winl = (screen.width - w) / 2;
	  var wint = (screen.height - h) / 2;
	  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
	  win = window.open(mypage, myname, winprops);
	  
	  if(parseInt(navigator.appVersion) >= 4){
		win.window.focus();
	  }
  }


var FlashCanPlay;
function InsertFlashWithDetection(FlashSrc, ImageSrc, Width, Height, Version, Align, BgColor, WMode, Quality, CreateDownloadLink, FlashId) {
	FlashCanPlay=false;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		for (var i = 0; i < words.length; ++i) {
			if (isNaN(parseInt(words[i]))) continue;
			var PluginVersion = words[i]; 
		}
		FlashCanPlay = PluginVersion >= Version;
	} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
		document.write('<scr' + 'ipt language=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
		document.write('on error resume next \n');
		document.write('FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+Version+'")))\n');
		document.write('</scr' + 'ipt\> \n');
	}

	if ( FlashCanPlay ) {
		var FlashSrcBase=FlashSrc.substr(0, FlashSrc.lastIndexOf('/'));
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
		document.write(' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+Version+',0,0,0"');
		document.write(' width="'+Width+'"');
		document.write(' height="'+Height+'"');
		document.write(' align="'+Align+'"');
		document.write(' base="'+FlashSrcBase+'"');
		document.write(' id="'+FlashId+'"');
		document.write('>');
		document.write('<param name="allowScriptAccess" value="sameDomain">');
		document.write('<param name="menu" value="false">');
		document.write('<param name="movie" value="'+FlashSrc+'">');
		document.write('<param name="wmode" value="'+WMode+'">');
		document.write('<param name="quality" value="'+Quality+'">');
		document.write('<param name="bgcolor" value="'+BgColor+'">');
		document.write('<embed pluginspage="http://www.macromedia.com/go/getflashplayer"');
		document.write(' allowscriptaccess="sameDomain"');
		document.write(' type="application/x-shockwave-flash"');
		document.write(' menu="false"');
		document.write(' src="'+FlashSrc+'"');
		document.write(' base="'+FlashSrcBase+'"');
		document.write(' width="'+Width+'"');
		document.write(' height="'+Height+'"');
		document.write(' align="'+Align+'"');
		document.write(' wmode="'+WMode+'"');
		document.write(' quality="'+Quality+'"');
		document.write(' bgcolor="'+BgColor+'"');
		document.write('</embed>');
		document.write('</object>');
	} else if ( ImageSrc ) {
		if ( typeof(CreateDownloadLink)=='undefined' ) CreateDownloadLink=false;
		if ( CreateDownloadLink ) {
			document.write('<a href="http://www.macromedia.com/go/getflashplayer"><img src="'+ImageSrc+'" alt="" width="'+Width+'" height="'+Height+'" border="0" align="'+Align+'"></a>');
		} else {
			document.write('<img src="'+ImageSrc+'" alt="" width="'+Width+'" height="'+Height+'" border="0" align="'+Align+'">');
		}
	}
} // InsertFlashWithDetection