﻿function showPLayer_song(link)
{
	height =0;
	width =0;

	var WMP7;
	try
	{
		if ( navigator.appName != "Netscape" )
		{
			WMP7 = new ActiveXObject('WMPlayer.OCX');
		}
	}
	catch (error)
	{
		;
	}
	var HTML = '';

	//  IE
	if ( WMP7 )
	{
	
		HTML +=  ('<object type="application/x-oleobject" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" width=' + width + ' height="' + height + '" name="MediaPlayer"> ');
		HTML +=  ('<PARAM NAME="URL" VALUE="'+link+'">');
		HTML +=  ('<param name="EnableContextMenu" value="1">');
		HTML +=  ('<param name="uiMode" value="full">');	
		HTML +=  ('<param name="stretchToFit" value="True">');	
		HTML +=  ('<param name="AnimationAtStart" value="true">');	
		HTML +=  ('<param name="playcount" value="10">');
		HTML +=  ('<PARAM NAME="Volume" VALUE="100">');
		
		HTML +=  ('<embed name="MediaPlayer" src="'+link+'" type="application/x-mplayer2" width="' + width + '" height="' + height + '" align="center"'); 	  
		HTML +=  (' border="0" autostart="1" transparentatstart="1" animationatstart="1" showcontrols="true" showaudiocontrols="1" showpositioncontrols="1" enablecontextmenu="1" autosize="1" showstatusbar="1" displaysize="false" playcount="10"> ');
		
		HTML +=  ('</embed></OBJECT>');		
	
	}

	//   firefox
	else
	{
		HTML +=  ('<OBJECT name="MediaPlayer" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" ');
		HTML +=  ('codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" ');
		HTML +=  ('width="' + width + '" height="'+height+'"');
		HTML +=  ('standby="Loading Microsoft Windows Media Player components..." ');
		HTML +=  ('type="application/x-oleobject" VIEWASTEXT> ');
		HTML +=  ('<PARAM NAME="FileName"           VALUE="'+link+'">');
		HTML +=  ('<PARAM NAME="TransparentAtStart" Value="true">');
		HTML +=  ('<PARAM NAME="AutoStart"          Value="true">');
		HTML +=  ('<PARAM NAME="AnimationatStart"   Value="true">');
		HTML +=  ('<PARAM NAME="ShowControls"       Value="true">');
		HTML +=  ('<PARAM NAME="ShowDisplay"	 value ="true">');
		HTML +=  ('<PARAM NAME="playCount" VALUE="999">');
		HTML +=  ('<PARAM NAME="displaySize" 	 Value="1">');
		HTML +=  ('<PARAM NAME="Volume" VALUE="100">');
		HTML +=  ('<Embed type="application/x-mplayer2" ');
		HTML +=  ('pluginspage= ');
		HTML +=  ('"http://www.microsoft.com/Windows/MediaPlayer/" ');
		HTML +=  ('src="'+link+'" ');
		HTML +=  ('Name=MediaPlayer ');
		HTML +=  ('transparentAtStart=1 ');
		HTML +=  ('autostart=1 ');
		HTML +=  ('playcount=999 ');
		HTML +=  ('volume=100');
		HTML +=  ('animationAtStart=1 ');
		HTML +=  ('width="' + width + '" height="'+height+'"');	
		HTML +=  ('displaySize=1></embed></OBJECT> ');
	}	
		
	return HTML;	
}


