function player(file,type,flashvars,h,w) {
	var fileurl = "http://images.listenarabic.com/asx/"+file;
	var height = (h < 10) ? ((h == 0 || h == 2 || h == 3) ? 400 : 40) : h;
	var width = (w==null || w==undefined) ? 500 : w;

  	var 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>';
	
	var 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 >';
	
	var 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>';

	$(document).ready(function() {
		if (type == 'asx')
		//writit(asx,'obj');
		$("#obj").html(asx);
		else if (type == 'ram')
		//writit(ram,'obj');
		$("#obj").html(ram);
		else if (type == 'swf')
		$("#obj").html(swf);
		//writit(swf,'obj');
	});
	/*
	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();
	}
}
*/
