function showA8movie(adr1,adr2)
{
	writePlayer(adr1,adr2);
}

function showA8music(fileUrl)
{
	//var fileUrl=getFileUrlFromId(musicId);  ttt
	writePlayer(fileUrl,fileUrl);

}
function imgClick(url)
{
	document.all.MediaPlayer.URL=url;
	document.all.MediaPlayer.controls.play();
}

function writePlayer(fileUrl1,fileUrl2)
{	
	document.write("<table width=\"393\" height=\"316\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"http://main.a8-img.com/common/img/vframebg.gif\">");
	document.write("  <tr>");
	document.write("    <td width=\"24\"><img src=\"http://main.a8-img.com/common/img/spacer.gif\" width=\"24\"></td>");
	document.write("    <td width=\"323\" valign=\"bottom\">");
	document.write("<OBJECT id=MediaPlayer codeBase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701ˇˇ type=application/x-oleobject height=300 width=322 classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 ˇˇˇˇstandby=\"Loading Microsoft? Windows Media? Player components...\">");
	document.write("	<PARAM NAME=\"URL\" VALUE="+fileUrl1+">");
	document.write("	<PARAM NAME=\"rate\" VALUE=\"1\">");
	document.write("	<PARAM NAME=\"balance\" VALUE=\"0\">");
	document.write("	<PARAM NAME=\"currentPosition\" VALUE=\"0\">");
	document.write("	<PARAM NAME=\"defaultFrame\" VALUE=\"\">");
	document.write("	<PARAM NAME=\"playCount\" VALUE=\"100\">");
	document.write("	<PARAM NAME=\"autoStart\" VALUE=\"1\">");
	document.write("	<PARAM NAME=\"currentMarker\" VALUE=\"0\">");
	document.write("	<PARAM NAME=\"invokeURLs\" VALUE=\"-1\">");
	document.write("	<PARAM NAME=\"baseURL\" VALUE=\"\">");
	document.write("	<PARAM NAME=\"volume\" VALUE=\"50\">");
	document.write("	<PARAM NAME=\"mute\" VALUE=\"0\">");
	document.write("	<PARAM NAME=\"uiMode\" VALUE=\"full\">");
	document.write("	<PARAM NAME=\"stretchToFit\" VALUE=\"0\">");
	document.write("	<PARAM NAME=\"windowlessVideo\" VALUE=\"0\">");
	document.write("	<PARAM NAME=\"enabled\" VALUE=\"-1\">");
	document.write("	<PARAM NAME=\"enableContextMenu\" VALUE=\"-1\">");
	document.write("	<PARAM NAME=\"fullScreen\" VALUE=\"0\">");
	document.write("	<PARAM NAME=\"SAMIStyle\" VALUE=\"\">");
	document.write("	<PARAM NAME=\"SAMILang\" VALUE=\"\">");
	document.write("	<PARAM NAME=\"SAMIFilename\" VALUE=\"\">");
	document.write("	<PARAM NAME=\"captioningID\" VALUE=\"\">");
	document.write("	<PARAM NAME=\"enableErrorDialogs\" VALUE=\"0\">");
	document.write("	<PARAM NAME=\"_cx\" VALUE=\"8467\">");
	document.write("	<PARAM NAME=\"_cy\" VALUE=\"8467\">");
	document.write(" </OBJECT>");
	document.write("	</td>");
	document.write("    <td width=\"46\" align=\"right\" valign=\"bottom\">");
	document.write("<a href='#' onclick=\"imgClick('" + fileUrl1 + "');\">");
	document.write("<img src='http://main.a8-img.com/common/img/spacer.gif' width='40' height='50' border='0'></a>");
	document.write("<a href=\"#\" onclick=\"imgClick('" + fileUrl2 + "');\">");
	document.write("<img src=\"http://main.a8-img.com/common/img/spacer.gif\" width=\"40\" height=\"50\" border=\"0\"></a><img src=\"http://main.a8-img.com/common/img/spacer.gif\" width=\"40\" height=\"67\" border=\"0\"></td>");
	document.write("  </tr>");
	document.write("</table>");
}

function getFileUrlFromId(id)
{
    
	var xml = new ActiveXObject("Microsoft.XMLHTTP");
	xml.open("GET","http://www.a8.com/a8manager/system/playlist.aspx?id=" + id,false); 
	xml.send();
	return xml.responseText;

}

function setimg(a)
{
	window.open(a.src);
}