/* ultraflash.js embeds flash inside a document */
/* ********************* BEGIN USAGE EXAMPLE ****************** 
<SCRIPT type=text/javascript>
  var flash = 0;
  var Flash_File_Path = "hereismyswffile.swf";
  var HTML_Failover_Path = "noflash_html1.html";
  var ad_width = "600";
  var ad_height = "400";
</SCRIPT>
<SCRIPT LANGUAGE=VBScript>
  ON ERROR RESUME NEXT
  FlashInstalled = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))
  IF FlashInstalled = "True" THEN
    flash = 1
  END IF
</SCRIPT>
<SCRIPT type=text/javascript SRC="http://cache.ultramercial.com/s/ultraflash.js"></SCRIPT>
/* ********************* END USAGE EXAMPLE ****************** */
/* ********************* BEGIN CODE ****************** */
if (flash == 1) {
  document.write('<OBJECT ');
  document.write(' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
  document.write(' codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"');
  document.write(' ID=banner1'); 
  document.write(' WIDTH='+ad_width); 
  document.write(' HEIGHT='+ad_height); 
  document.write('>');
  document.write('<PARAM NAME=movie VALUE="'+Flash_File_Path+'">');
  document.write('<PARAM NAME=quality VALUE="HIGH">');
  document.write('<PARAM NAME=wmode VALUE="opaque">');
  document.write('<PARAM NAME=menu VALUE="false">');
  document.write('</OBJECT>');
} else {
  if (navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash'] && navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) {
    if (navigator.plugins["Shockwave Flash"].description.substring(16,19) >= 4) {
      ShockMode = 1;
      document.write('<EMBED ');
      document.write(' SRC="'+Flash_File_Path+'"');
      document.write(' NAME=banner1 menu=false swLiveConnect=FALSE WIDTH='+ad_width +' HEIGHT='+ad_height +' border="0"');
      document.write(' QUALITY="HIGH" MENU=FALSE');
      document.write(' TYPE="application/x-shockwave-flash"'); 
      document.write(' PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"');
      document.write('></EMBED>');
    }
  }
} 
if (flash != 1 && ShockMode != 1) {
   goURL(HTML_Failover_Path); // no Flash
}

