function player(file,type,flashvars,media) {
	fileurl = "http://images.listenarabic.com/asx/"+file;
	width = 500;
	if (media == 0 || media == 2 || media == 3)
		height = 400;
	else
		height = 40;
  	asx = '<object width="'+width+'" height="'+height+'" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" name="mediaplayer1"  id="mediaplayer1">';
	asx += ' <param name="Filename" value="'+fileurl+'">';
	asx += '<param name="EnableContextMenu" value="1">';
	asx += ' <param name="AutoStart" value="True">';
	asx += ' <param name="ShowControls" value="true">';
	asx += '<param name="ShowStatusBar" value="true">';
	asx += ' <param name="ShowDisplay" value="false">';
	asx += '<param name="volume" value="100">';
	asx += '<param name="uiMode" value="full">';
	asx += '<param name="windowlessVideo" value="0">';
	asx += '<param name="stretchtofit" value="1">';
	asx += '<param name="fullScreen" value="-1">';
	asx += '<PARAM NAME="EnableFullScreenControls" VALUE="true"> ';
	asx += '<param name="AutoRewind" value="True">';
	asx += '<param name="enableErrorDialogs" value="0">';
	asx += '<embed pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&" src="'+fileurl+'" width='+width+'" height="'+height+'" autostart="True" showcontrols="True" showstatusbar="False"  showdisplay="true" autorewind="True" enableContextMenu=1 windowlessVideo=1 uiMode=full stretchToFit=1 fullscreen=0> </embed>';
	asx += '</object>';
	ram = '<EMBED src="'+fileurl+'" width="'+width+'" height="'+height+'" ';
	ram += ' type=audio/x-pn-realaudio-plugin AUTOSTART="TRUE" ';
	ram += ' CONTROLS="imagewindow" EnableFullScreenControls="true">';
	ram += '<EMBED SRC="'+fileurl+'" type=audio/x-pn-realaudio-plugin CONTROLS=ControlPanel WIDTH="'+width+'" HEIGHT="25" CONSOLE=1 NOJAVA=true >';
	
	swf = '<embed type="application/x-shockwave-flash" ';
	swf += 'src="' +file+'" ';
	swf += 'bgcolor="#2b333c" quality="high" allowfullscreen="true" allowscriptaccess="always" ';
	swf += 'wmode="window" flashvars="'+flashvars+'" ';
	swf += 'height="'+height+'" width="'+width+'"></embed>';

	if (type == 'asx')
	writit(asx,'obj');
	else if (type == 'ram')
	writit(ram,'obj');
	else if (type == 'swf')
	writit(swf,'obj');
}
  
function writit(text,id) {
	if (document.getElementById) {
			x = document.getElementById(id);
			x.innerHTML = '';
			x.innerHTML = text;
	}
	else if (document.all) {
			x = document.all[id];
			x.innerHTML = text;
	}
	else if (document.layers) {
			x = document.layers[id];
			text2 = '<p>' + text + '</p>';
			x.document.open();
			x.document.write(text2);
			x.document.close();
	}
}