
var inline_movie_path = "flash.uat.edu/flv/video";
var inline_movie_flv_controller = "tv_inline.swf";
/* Config: General Flash Objects Location */
var inline_flashobj_path = "/tv/";
var TV_InlineFlashWidth = 360;
var TV_InlineFlashHeight = 280;

function render_tvInline(start_movie) {
	var content = "";
	//the DetectFlashVer() function and its associated functions are located in page_control.js, as would be expected they
	//detect which version of Flash and display one thing or the other
	if (DetectFlashVer(9,0,0)) {
		/* Ghetto Flash Fix */
		content = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + TV_InlineFlashWidth + "\" height=\"" + TV_InlineFlashHeight + "\" id=\"tv_movie_object\" align=\"middle\" style=\"z-index: 100\" VIEWASTEXT>";
		content += "<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
		content += "<param name=\"movie\" value=\""+inline_flashobj_path+inline_movie_flv_controller+"\" />";
		content += "<param name=\"loop\" value=\"false\" />";
		content += "<param name=\"quality\" value=\"high\" />";
		content += "<param name=\"bgcolor\" value=\"#000000\" />";
		content += "<param name=\"wmode\" value=\"transparent\" />";
		content += "<param name=\"align\" value=\"center\" />";
		content += "<param name=\"FlashVars\" value=\"moviepath="+inline_movie_path+"&moviename=" + start_movie + "\" />";
		content += "<embed src=\""+inline_flashobj_path+inline_movie_flv_controller+"\" FlashVars=\"moviepath="+inline_movie_path+"&moviename=" + start_movie + "\" wmode=\"transparent\" loop=\"false\" quality=\"high\" bgcolor=\"#000000\" align=\"center\" width=\"" + TV_InlineFlashWidth + "\" height=\"" + TV_InlineFlashHeight + "\" name=\"tv_movie_object\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
		content += "</object>";
	}
	else {
		content = "<div style='padding:5px;margin:5px;width:100%;height:100%;'><table class='media_type_2_colored_shell' height='100%'><tr><td valign='center' align='center'>";
      	content += "<h1 style='padding-top:7px;margin-top:7px;'>This content requires Adobe Flash Player 9. <a href='http://www.adobe.com/products/flashplayer/'><span style='text-decoration:underline'>Dowload the flash player here.</span></a></h1>";
     	content += "</td></tr></table></div>";
	}
	document.write(content);
}

//there's a seperate function for the CBF editor because it needs to return the content instead of writing it
function render_tvCBF(start_movie) {
	var content = "";
	//the DetectFlashVer() function and its associated functions are located in page_control.js, as would be expected they
	//detect which version of Flash and display one thing or the other
	if (DetectFlashVer(9,0,0)) {
		/* Ghetto Flash Fix */
		content = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + TV_InlineFlashWidth + "\" height=\"" + TV_InlineFlashHeight + "\" id=\"tv_movie_object\" align=\"middle\" VIEWASTEXT>";
		content += "<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
		content += "<param name=\"movie\" value=\""+inline_flashobj_path+inline_movie_flv_controller+"\" />";
		content += "<param name=\"loop\" value=\"false\" />";
		content += "<param name=\"quality\" value=\"high\" />";
		content += "<param name=\"bgcolor\" value=\"#000000\" />";
		content += "<param name=\"wmode\" value=\"transparent\" />";
		content += "<param name=\"FlashVars\" value=\"moviepath="+inline_movie_path+"&moviename=" + start_movie + "\" />";
		content += "<embed src=\""+inline_flashobj_path+inline_movie_flv_controller+"\" FlashVars=\"moviepath="+inline_movie_path+"&moviename=" + start_movie + "\" wmode=\"transparent\" loop=\"false\" quality=\"high\" bgcolor=\"#000000\" width=\"" + TV_InlineFlashWidth + "\" height=\"" + TV_InlineFlashHeight + "\" name=\"tv_movie_object\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
		content += "</object>";
	}
	else {
		content = "<div style='padding:5px;margin:5px;width:100%;height:100%;'><table class='media_type_2_colored_shell' height='100%'><tr><td valign='center' align='center'>";
      	content += "<h1 style='padding-top:7px;margin-top:7px;'>This content requires Adobe Flash Player 9. <a href='http://www.adobe.com/products/flashplayer/'><span style='text-decoration:underline'>Dowload the flash player here.</span></a></h1>";
     	content += "</td></tr></table></div>";
	}
	return content;
}
