function showmedia(strURL,intWidth,intHeight) {
	
	if(!intWidth) intWidth=533;
	if(!intHeight) intHeight=354;
	
	var strMedia="";
	var strType='';

	var re = new RegExp("\.[a-z0-9]+$","ig");

	var strExtend = re.exec(strURL);
	strExtend="|"+String(strExtend).toLowerCase()+"|";
	
		if(String("|.swf|").indexOf(strExtend)>=0){strType="SWF"};
		if(String("|.mov|.qt|").indexOf(strExtend)>=0){strType="QT"};
		if(String("|.wmv|.wmp|.wm|.avi|.mp4|.mpg|.mpeg|.m3u|.pls|.wvx|.wax|.wmx|").indexOf(strExtend)>=0){strType="WMV"};
		if(String("|.asf|.asx|.mpa|.mp2|.m1a|.m2a|.aac|").indexOf(strExtend)>=0){strType="WMA"};
		if(String("|.wav|.mp3|.wma|").indexOf(strExtend)>=0){strType="MP3"};
		if(String("|.rm|.ram|.rmvb|.rpm|.amr|.3gp|.3gpp|.3g2|.3gp2|.rt|.rp|.smi|.smil|").indexOf(strExtend)>=0){strType="RM"};
		if(String("|.ra|").indexOf(strExtend)>=0){strType="RA"};
	

		switch(strType){
			case "MP3":
			var Mp3t_id=Math.round(Math.random()*10000);
				strMedia="<object type=\"application/x-shockwave-flash\" data=\"./includes/audioplayer.swf\" width=\"290px\" height=\"24px\" id=\"audioplayer"+Mp3t_id+"\"><param name=\"movie\" value=\"./templates/audioplayer.swf\" /><param name=\"FlashVars\" value=\"playerID="+Mp3t_id+"&soundFile="+strURL+"\"/><param name=\"quality\" value=\"high\" /><param name=\"menu\" value=\"false\" /><param name=\"wmode\" value=\"transparent\" /></object>";
				break;			
			case "SWF":
				strMedia="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\""+intWidth+"\" height=\""+intHeight+"\"><param name=\"wmode\" value=\"Opaque\"><param name=\"movie\" value=\""+strURL+"\"><param name=\"quality\" value=\"high\"><param name=\"play\" value=\"true\"><embed wmode=\"Opaque\" src=\""+strURL+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+intWidth+"\" height=\""+intHeight+"\" play=\"true\"></embed></object>";
				break;
			case "QT":
				strMedia="<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\" width=\""+intWidth+"\" height=\""+intHeight+"\" ><param name=\"wmode\" value=\"Opaque\"><param name=\"src\" value=\""+strURL+"\" ><param name=\"autoplay\" value=\"true\" ><embed wmode=\"Opaque\" src=\"qtmimetype.pntg\" type=\"image/x-macpaint\"pluginspage=\"http://www.apple.com/quicktime/download\" qtsrc=\""+strURL+"\" width=\""+intHeight+"\" height=\""+intHeight+"\" autoplay=\"true\" ></embed></object>";
				break;
			case "WMV":
				strMedia="<object classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" width=\""+intWidth+"\" height=\""+intHeight+"\"><param name=\"wmode\" value=\"Opaque\"><param name=\"ShowStatusBar\" value=\"-1\"><param wmode=\"Opaque\" name=\"AutoStart\" value=\"true\"><param name=\"Filename\" value=\""+strURL+"\"><embed type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" src=\""+strURL+"\" autostart=\"true\" width=\""+intWidth+"\" height=\""+intHeight+"\"></embed></object>";
				break;
			case "WMA":
				strMedia="<object classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" height=\""+intHeight+"\" width=\""+intWidth+"\"><param name=\"wmode\" value=\"Opaque\"><param name=\"ShowStatusBar\" value=\"-1\"><param name=\"AutoStart\" value=\"true\"><param name=\"Filename\" value=\""+strURL+"\"><embed wmode=\"Opaque\" type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" src=\""+strURL+"\" autostart=\"true\" width=\""+intWidth+"\" height=\""+intHeight+"\"></embed></object>";
				break;
			case "RM":
				strMedia="<object classid=\"clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA\" width=\""+intWidth+"\" height=\""+intHeight+"\"><param name=\"wmode\" value=\"Opaque\"><param name=\"src\" value=\""+strURL+"\"><param name=\"controls\" value=\"imagewindow\"><param name=\"console\" value=\"one\"><param name=\"AutoStart\" value=\"true\"><embed wmode=\"Opaque\" src=\""+strURL+"\" width=\""+intWidth+"\" height=\""+intHeight+"\" type=\"audio/x-pn-realaudio-plugin\" nojava=\"true\" controls=\"imagewindow,ControlPanel,StatusBar\" console=\"one\" autostart=\"true\"></object>";
				break;
			case "RA":
				strMedia="<object classid=\"clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA\" width=\""+intWidth+"\" height=\""+intHeight+"\"><param name=\"wmode\" value=\"Opaque\"><param name=\"src\" value=\""+strURL+"\"><param name=\"controls\" value=\"ControlPanel\"><param name=\"console\" value=\"one\"><param name=\"AutoStart\" value=\"true\"><embed wmode=\"Opaque\" src=\""+strURL+"\" type=\"audio/x-pn-realaudio-plugin\" nojava=\"true\" controls=\"ControlPanel,StatusBar\" console=\"one\" autostart=\"true\" width=\""+intWidth+"\" height=\""+intHeight+"\"></object>";
				break;
			default:
			strMedia="<embed wmode=\"Opaque\" width=\""+intWidth+"\" height=\""+intHeight+"\" class=\"embed\" src=\""+strURL+"\">";	
	}
	document.write(strMedia);
}