function play_intro() {
   var intro_span = '<span style="float:right; width:330"><span align="center" id="loading"></span><object border="0" id="Player"  classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/x-oleobject" width="314" height="250"><param name="url" value="http://www.ieah.com/intro.wmv"><param name="uiMode" value="none"><param name="ShowPositionControls" value="0"><param name="AnimationAtStart" value="0"><param name="ShowStatusBar" value="0"><param name="ShowControls" value="0"><param name="AutoStart" value="1"><param name="AutoRewind" value="0"></object><div align="center"><a href="javascript:skip_intro();" class="eightred">Skip Intro</a></div></span>';
   
   var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
   var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;

   if(isIE && isWin){
      var WMP7 = 0;
      try {
         WMP7 = new ActiveXObject('WMPlayer.OCX');
      }
      catch(ex) {
         document.getElementById("intro").innerHTML = photo_span;
         return;
      }

      if(WMP7) {
         document.getElementById("intro").innerHTML = intro_span;
         return;
      }
      else {
         document.getElementById("intro").innerHTML = photo_span;
         return;
      }
   }
   else {
      document.getElementById("intro").innerHTML = photo_span;
      return;
   }
}

function skip_intro() {
   document.getElementById("intro").innerHTML = photo_span;
}

function show_race_replay(video_file) {
   var WMP7;
   
   if ( navigator.appName != "Netscape" ){
      try {
        WMP7 = new ActiveXObject('WMPlayer.OCX');
      }
      catch(e) {
   
      }
   }
   
   // Windows Media Player 7 Code
   if ( WMP7 )
   {
        document.write ('<OBJECT border=1 ID=MediaPlayer ');
        document.write (' CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6');
        document.write (' standby="Loading Microsoft Windows Media Player components..."');
        document.write (' TYPE="application/x-oleobject" width="325" height="325">');
        document.write ('<PARAM NAME="url" VALUE="' + video_file + '">');
        document.write ('<param name="ShowPositionControls" value="0">');
        document.write ('<param name="AnimationAtStart" value="0">');
        document.write ('<PARAM NAME="ShowStatusBar" VALUE="0">');
        document.write ('<PARAM NAME="ShowControls" VALUE="1">');
        document.write ('<PARAM NAME="AutoStart" VALUE="1">');
        document.write ('<PARAM NAME="AutoRewind" VALUE="1">');
        document.write ('</OBJECT>');
   }
   
   // Windows Media Player 6.4 Code
   else
   {
        //IE Code
        document.write ('<OBJECT border=1 ID=MediaPlayer ');
        document.write ('CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 ');
        document.write ('CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 ');
        document.write ('standby="Loading Microsoft Windows Media Player components..." ');
        document.write ('TYPE="application/x-oleobject" width="325" height="306">');
        document.write ('<PARAM NAME="FileName" VALUE="' + video_file + '">');
        document.write ('<param name="ShowPositionControls" value="0">');
        document.write ('<param name="AnimationAtStart" value="0">');
        document.write ('<PARAM NAME="ShowStatusBar" VALUE="0">');
        document.write ('<PARAM NAME="ShowControls" VALUE="1">');
        document.write ('<PARAM NAME="AutoStart" VALUE="1">');
        document.write ('<PARAM NAME="AutoRewind" VALUE="1">');
   
        //Netscape code
        document.write ('    <Embed type="application/x-mplayer2"');
        document.write ('        pluginspage="http://www.microsoft.com/windows/windowsmedia/"');
        document.write ('        filename="' + video_file + '"');
        document.write ('        src="' + video_file + '"');
        document.write ('        Name=MediaPlayer');
        document.write ('        ShowPositionControls=0');
        document.write ('        AnimationAtStart=0');
        document.write ('        ShowStatusBar=0');
        document.write ('        ShowControls=1');
        document.write ('        AutoStart=1');
        document.write ('        AutoRewind=1');
        document.write ('        width=325');
        document.write ('        height=306>');
        document.write ('    </embed>');
   
        document.write ('</OBJECT>');
   }
}
