
function objMediaPlayer(url, w, h) {
tmp = window.location.pathname;
//alert(tmp);
if ((n = tmp.lastIndexOf("/")) != -1) {
    url = tmp.substring(0, n+1) + url;
}

	document.open();

// for Windows Media Player 7 or later
	document.write('<object id="MediaPlayer" width="' + w +  '" height="' + h +  '" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6">\n');
	document.write('<param name="URL" value="' + url +  '">\n');
	document.write('<param name="uiMode" value="full">\n');

// for Windows Media Player 6.4
//	document.write('<object id="MediaPlayer" width="' + w +  '" height="' + h +  '" classid="clsid:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" standby="Loading Windows Media Player components..." type="application/x-oleobject">\n');
//	document.write('<param name="filename" value="' + url + '">\n');
//	document.write('<param name="AutoSize" value="true">\n');	//add
//	document.write('<param name="DisplaySize" value="0">\n');	// 4=mpFitToSize 0=mpDefaultSize
//	document.write('<param name="ShowStatusBar" value="true">\n');	//add

	document.write('<param name="AutoStart" value="true">\n');
	document.write('<param name="EnableContextMenu" value="false">\n');

// for Netscape and so on (Windows Media Player 6.4)
	document.write('<embed type="application/x-mplayer2" name="MediaPlayer" width="' + w + '" height="' + h + '" ');
	document.write(' src="',url,'" ');
//	document.write(' AutoSize="1" ');	//add
//	document.write(' DisplaySize="0" ');	// 4=mpFitToSize 0=mpDefaultSize
//	document.write(' ShowStatusBar="1" ');	//add
	document.write(' AutoStart="1" ');
	document.write(' EnableContextMenu="0" ');
	document.write(' >\n');
	document.write('</embed>\n');

	document.write('</object>\n');

	document.close();
}

