
function printFlashObject1(ID, objectAttributes, FlashSRC, MoreParams) {
	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=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>");
	document.writeln(html);
}

function printFLVPlayer1(source, width, height, quality) {

	flash_version = detectFlash();

	if(flash_version < 8) {
		document.writeln("<center style=\"border:1px solid #CCC; padding:10px\">");
		printFlashError(flash_version, 8);
		document.writeln("</center>");
		return false;
	}
	

	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") {
		printFlashObject1("FLVPlayer", "width=\""+ width +"\" height=\""+ height +"\"", "/flash/"+ flvplayer_src +"?autostart=true&streaming=1&source="+ source);
	} else {
		printFlashObject1("FLVPlayer", "width=\""+ width +"\" height=\""+ height +"\"", "/flash/"+ flvplayer_src +"?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>");


}

