// JavaScript Document
function activate_player(id,path,type){
	if (type==1){
		var divID = 'player_'+id;
		var playerpath ='player_mp3_maxi.swf';
		var so = new SWFObject(playerpath , 'mymovie_'+id, 300, 20, '8');
		//window["so_"+id].addParam('allowScriptAccess','always');
		//window["so_"+id].addParam('swliveconnect','true');
		so.addParam('wmode','transparent');
		so.addVariable('mp3', path);
		so.addVariable('showstop', 1);
		so.addVariable('showvolume', 1);
		so.write(divID);
		the_div = document.getElementById('player_'+id);
		the_div.style.height="auto";
		the_div.style.lineHeight="14px";
		the_div.style.paddingLeft="0";
		document.getElementById("extra_"+id).style.display="block";
		//alert(document.getElementById('player_'+id).innerHTML);
		//the_div.innerHTML += '<div style="padding-left:50px;" id="extra_'+id+'"><a href="javascript:close_('+id+')">[x]Close</a></div>';
		//alert(the_div.innerHTML);
	}else if(type==2){
		document.getElementById('player_'+id).innerHTML = '<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="496" height="440" codebase="http:\/\/www.microsoft.com\/Windows\/MediaPlayer\/"><param name="Filename" value="'+path+'"\/><param name="AutoStart" value="true"\/><param name="ShowControls" value="true"\/><param name="BufferingTime" value="2"\/><param name="ShowStatusBar" value="true"\/><param name="AutoSize" value="true"\/><param name="InvokeURLs" value="false"\/><embed src="'+path+'" type="application\/x-mplayer2" autostart="1" enabled="1" showstatusbar="1" showdisplay="1" showcontrols="1" pluginspage="http:\/\/www.microsoft.com\/Windows\/MediaPlayer\/" CODEBASE="http:\/\/activex.microsoft.com\/activex\/controls\/mplayer\/en\/nsmp2inf.cab#Version=6,0,0,0" width="496" height="370"><\/embed><\/object>';
		document.getElementById("extra_"+id).style.display="block";
	}else if(type==3){
		//document.getElementById('player_'+id).innerHTML = '<object width="425" height="344"><param name="movie" value="'+path+'&hl=en_US&fs=1&"><\/param><param name="allowFullScreen" value="true"><\/param><param name="allowscriptaccess" value="always"><\/param><embed src="'+path+'&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"><\/embed><\/object>';
		document.getElementById('player_'+id).innerHTML = '<object width="425" height="344"><param name="movie" value="'+path+'&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="'+path+'&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>';
		document.getElementById("extra_"+id).style.display="block";
	}else if(type==4){
		location.href=path;	
	}
	return;
}
function close_(id){
	document.getElementById('player_'+id).innerHTML = "<!--e-->";
	document.getElementById('player_'+id).style.height="0";
	document.getElementById('player_'+id).style.lineHeight="0";
	document.getElementById('player_'+id).style.border="none";
	document.getElementById('player_'+id).style.margin="0";
	document.getElementById('player_'+id).style.padding="0";
	document.getElementById("extra_"+id).style.display="none";
}
