/*

This function builds an FLV player with JW Player and SWFObject

*/

function BuildPlayer(div_id,splash,movie,filetype,width,height){
	// Do not set config options in Flashvars, use paramas
	var flashvars = {
		// File locations
		file: movie,
		image: splash,
		type: filetype,
		// Player UI
		width: width,
		height: height,
		lightcolor: "0xFFFFFF",
		backcolor: "0x62B857",
		frontcolor: "0xEEEEEE",
		screencolor: "0xEEEEEE",
		showdownload: "false",
		showdigits: "true",
		usefullscreen: "false",
		showicons: "true",
		// Player controls
		autostart: "false",
		bufferlength: "3",
		javascriptid: div_id
	};
	var params = {};
	var attributes = {};
	
	objPlayer = swfobject.embedSWF("/swf/mediaplayer.swf", div_id, width, height, "9.0.0", "/swf/expressInstall.swf", flashvars, params, attributes);
	
	//Write it out
	return objPlayer;
}
