/*
	here's a list of params that can be used
	
	NOTE!  requires swfobject!!
	
	params: {
		width: number - required.  Width of the flv.
		height: number - required.  Height of the flv.
		flv: string - required.  Source of the flv file you want to play.
		src: number - optional.  Source of the toobplayer swf.  will default to /3rd-party/toobPlayer/toobPlayer.swf
		previewImg: string - optional.  Source of the preview image.
		id: number - optional.  If you have multiple videos on a page, a unique id is required.
	}

*/

function toobPlayer(params) {
	var str = "";
	
	if(params.id == undefined) {
		params.id = "toobPlayer";
	}
	
	if(params.src == undefined) {
		params.src = "/3rd-party/toobPlayer/toobPlayer.swf";
	}
		
	
	params.skinHeight = 18;			//TO BE MODIFIED PER SKIN.  This is the additional height of the playback bar.  params.height is to be the final height of the <object>
	params.height += params.skinHeight;
	
	str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+params.width+'" height="'+params.height+'" id="'+params.id+'">';
	str += '<param name="wmode" value="transparent" />';
	str += '<param name="movie" value="'+params.src+'" />';
	str += '<param name="flashvars" value="src='+params.flv+'&autoPlay=false&previewImageUrl='+params.previewImg+'" />';
	str += 	'<!--[if !IE]>-->';
	str += 	'<object type="application/x-shockwave-flash" data="'+params.src+'" width="'+params.width+'" height="'+params.height+'">';
	str += 		'<param name="flashvars" value="src='+params.flv+'&autoPlay=false&previewImageUrl='+params.previewImg+'" />';
	str += 	'<!--<![endif]-->';
	str += 		'Please get the latest Adobe Flash Player<br /> to view this content <br /><br />';
	str += 		'<a href="http://www.adobe.com/go/getflashplayer" target="_blank">';
	str += 			'<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" border="0" />';
	str += 		'</a>';
	str += 	'<!--[if !IE]>-->';
	str += 	'</object>';
	str += 	'<!--<![endif]-->';
	str += '</object>';
	
	swfobject.registerObject(params.id, "8.0.0");
	
	document.write(str);
}
