function printFlashObject(ID, objectAttributes, FlashSRC, MoreParams) {

	if( (navigator.userAgent).indexOf("Macintosh")>0 && (navigator.userAgent).indexOf("Firefox")>0 )
		MoreParams = MoreParams.replace("<param name=\"wmode\" value=\"transparent\">", "");
	
	html = "";
	html += "\n"+ ('<object '+ (ID ? "name1='"+ID+"'" : "") +' '+ (ID ? "id='"+ID+"'" : "") +' '+ objectAttributes +' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0">');
	html += "\n"+ ('<param name=movie value="'+ FlashSRC +'" />');
	if(MoreParams)
		html += "\n"+ (MoreParams);
	html += "\n"+ ("<param name=quality value=high />");
	html += "\n"+ ("<param name=wmode value=transparent />");
	html += "\n"+ ("<param name=allowFullScreen value=true />");	
	if(MoreParams) {
		MoreParamsEmbed = MoreParams.replace("<param name=\"", "");
		MoreParamsEmbed = MoreParamsEmbed.replace("\" value=", "=");
		MoreParamsEmbed = MoreParamsEmbed.replace(">", "");
	}
	else
		MoreParamsEmbed = "";

	html += "\n"+ ('<embed '+ (ID ? "name='"+ID+"'" : "") +' '+ (ID ? "id1='"+ID+"'" : "") +' '+ objectAttributes +' '+ MoreParamsEmbed +' src="'+ FlashSRC +'" quality=high allowFullScreen=true wmode=transparent ');
	html += "\n"+ ("pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\">");
	html += "\n"+ ("</embed>");
	html += "\n"+ ("</object>");
//alert(html);
	document.writeln(html);
}

function printFLVPlayer(source, width, height, quality) {

//	flash_version = detectFlash();

	if(!FlashDetect.versionAtLeast(9, 0, 115)) {
		document.writeln("<center style=\"padding:10px\">");
		getFlashMessage(9, 0, 115);
		//printFlashError(FlashDetect.major +"."+ FlashDetect.minor +" "+ FlashDetect.revisionStr, "9.0 r115");
		document.writeln("</center>");
		return false;
	}


	flvplayer_src = "WSPlayer.swf";

/*	if(flash_version >= 9)
		flvplayer_src = "WSPlayer.swf";
	else {
		if(!height)
			height = "93%";
		else {
			if(isNaN(height-20)) {
				height = height.substring(0, height.length-1);
				height = height - 4;
				height += "%";
			}
			else
				height = height - 20;
		}

		flvplayer_src = "WSPlayerV8.swf";
	}
*/

	if(!width)
		width = "100%";
	if(!height)
		height = "100%";

//	if (quality == "high") {
		printFlashObject("FLVPlayer", "width=\""+ width +"\" height=\""+ height +"\"", "/flash/"+ flvplayer_src +"?websurg_fo=test.websurg.com&autostart=true&streaming=1&domain="+ "rtmp%3A%2F%2Fcp28575.edgefcs.net%2Fondemand%2F" +"&source="+ source);
//	} else {
//		printFlashObject("FLVPlayer", "width=\""+ width +"\" height=\""+ height +"\"", "/flash/"+ flvplayer_src +"?websurg_fo=test.websurg.com&autostart=true&source="+ source);
//	}
		
/*	if(flash_version < 9)
		document.writeln("<div class=little>To view the video in fullscreen, please install <a target=_blank href=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">Flash Player 9</a></div>");
*/


}
