var showControls2=1;
var height = 333;
if (video_id != undefined) {var year=0;var driver=0;var event=0;} else video_id=0;
if (loop == undefined) var loop = "True";
if (showControls == undefined) var showControls = "True";
if (showControls=="False") {showControls2=0;height=264;}
var autostart2 = 1;
if (autostart == undefined) var autostart = "True"; else if (autostart=="False") autostart2 = 0;
var	showStatusBar2 = 1;
if (showStatusBar == undefined) var showStatusBar = "True"; else if (showStatusBar=="False") showStatusBar2 = 0;
if (video_id == undefined) var video_id=0;
var host=window.location.hostname;

document.write('<table class=autotv border=0 cellspacing=0 cellpadding=0 style="border: 0px" width=266>');
document.write('<TR><TD>');
document.write('<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject" width="266" standby="Loading Microsoft® Windows® Media Player components..." id="vPlayer">');
document.write('<PARAM NAME="FileName" VALUE="http://www.autotv.lv/play.php?year='+year+'&event='+event+'&driver='+driver+'&video_id='+video_id+'&host='+host+'">');
document.write('<PARAM NAME="ShowControls" VALUE="'+showControls+'">');
document.write('<PARAM NAME="ShowStatusBar" VALUE="'+showStatusBar+'">');
document.write('<PARAM NAME="TransparentAtStart" Value="False">');
document.write('<PARAM NAME="ClickToPlay" Value="True">');
document.write('<PARAM NAME="AutoStart" Value="'+autostart+'">');
document.write('<PARAM NAME="AnimationatStart" Value="True">');
document.write('<PARAM NAME="autoSize" Value="true">');
document.write('<PARAM NAME="displaySize" Value="False">');
document.write('<PARAM NAME="loop" Value="'+loop+'">');
document.write('<EMBED type="application/x-mplayer2" pluginspage = "http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" SRC="http://www.autotv.lv/play.php?year='+year+'&event='+event+'&driver='+driver+'&video_id='+video_id+'&host='+host+'" Name="vPlayer" Width="266" autoStart="'+autostart2+'" transparentAtStart="0" clickToPlay="1" animationAtStart="1" autoSize="0" ShowStatusBar="'+showStatusBar2+'" ShowControls="'+showControls2+'" displaySize="0" align="center">');
document.write('</EMBED>');
document.write('</object>');
document.write('</TD></TR><TR><TD align=right style="background-image: url(http://www.autotv.lv/images/embed_bottom_line.gif); background-repeat: repeat-x; background-position: top-left;" valign=top height=12><a href="http://www.autotv.lv" target="_blank"><img src="http://www.autotv.lv/images/embed_bottom.gif" border=0 height=12 width=79 alt="AUTOTV"></a></TD></table>');
var player;
try {
 if(window.ActiveXObject)  {
  player = new ActiveXObject("WMPlayer.OCX.7");
 }else if (window.GeckoActiveXObject)  {
  player = new GeckoActiveXObject("WMPlayer.OCX.7");
 }
}
catch(e){
 document.getElementById('videoStartLink').style.display='none';
}
if(player){
 var versionString = player.versionInfo;
}

function vPlay(){
 document.vPlayer.play();
 document.getElementById('videoStartLink').style.display='none';
}
