function writePlayer(playerurl, pwidth, pheight) {
var WMP7;

if(window.ActiveXObject)
{
    WMP7 = new ActiveXObject("WMPlayer.OCX.7");
}
else if (window.GeckoActiveXObject)
{
     //WMP7 = new GeckoActiveXObject("WMPlayer.OCX.7");
}

// Windows Media Player 7 Code
if ( WMP7 )
{
     document.write ('<OBJECT ID=mplayer ');
     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="' + pwidth + '" height="' + pheight + '" >');
     document.write ('<PARAM NAME="url" VALUE="' + playerurl + '" />');
     document.write ('<PARAM NAME="AutoStart" VALUE="true" />');
	 document.write ('<PARAM NAME="StretchToFit" VALUE="true" />');
     document.write ('<PARAM NAME="ShowControls" VALUE="false" />');
     document.write ('<PARAM NAME="uiMode" VALUE="none" />');
     document.write ('<PARAM NAME="ShowStatusBar" VALUE="true" />');
     document.write ('<PARAM NAME="ShowDisplay" VALUE="false" />');
     document.write ('<PARAM NAME="EnableContextMenu" VALUE="false" />');
     document.write ('</OBJECT>');
}

// Windows Media Player 6.4 Code
else
{

  	document.write ('<embed id="mplayer" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" ');
  	document.write (' src="' + playerurl + '" ')
  	document.write (' name="mplayer" ')
  	document.write (' AutoStart="1" ')
  	document.write (' Width="' + pwidth + '" ')
  	document.write (' Height="' + pheight + '" ')
  	document.write (' transparentAtStart="0" ')
  	document.write (' animationAtStart="0" ')
  	document.write (' ShowControls="0" ')
  	document.write (' autoSize="0" ')
  	document.write (' displaySize="0"></embed>')

}


}