 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)) >= 7;
}
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.7")))\n');
		document.write('<\/SCRIPT> \n');
}

if ( plugin ) {

	var flashTags = '<object type="application/x-shockwave-flash" '
	    +'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
		+'codebase="https://download.macromedia.com/pub/shockwave/cabs'
		+'/flash/swflash.cab#version=6,0,0,0"\n '
		+'width="' +document.hiddenForm.flashWidth.value +'" \n'
		+'height="' +document.hiddenForm.flashHeight.value +'" \n'
		+'title="' +document.hiddenForm.imageToolTip.value +'" \n'
		+'id="MyMovie" > \n'
	    +'<param name="movie" value="' +document.hiddenForm.flash.value +'"/> \n'
	    +'<param name="quality" value="high"/> \n'
	    +'<param name="bgcolor" value="#ffffff"/> \n'
	    +'<param name="FlashVars" VALUE="xmlFile=' +document.hiddenForm.flashXML.value +'&swirls=' +document.hiddenForm.swirls.value +'"/> \n'
	    +'<embed src="'+document.hiddenForm.flash.value +'"\n FlashVars="xmlFile=' +document.hiddenForm.flashXML.value +'&swirls=' +document.hiddenForm.swirls.value +'" \n'
	+'width="' +document.hiddenForm.flashWidth.value +'"\n height="' +document.hiddenForm.flashHeight.value +'" quality="high" bgcolor="#ffffff" \n'
	+'name="MyMovie" \n'
	+'type="application/x-shockwave-flash" \n'
	+'pluginspage="https://www.macromedia.com/go/getflashplayer"> \n'
	+'</embed> \n'
	+'</object> \n'
	
	document.write(flashTags);
	//alert(flashTags);
}else{
	
	
	var noFlashTags = '<A  HREF = "' +document.hiddenForm.imageLink.value +'" >\n '
				      + ' <img  id="imgs" src="' +document.hiddenForm.graphic.value +'">\n '
				      + '</A>';
	document.write(noFlashTags);
	

}
