// JavaScript Document

/* be friendly to the plants and animals */
function addLoadEvent(f) { 
	var old = window.onload;
	if (typeof old != 'function') window.onload = f
	else { window.onload = function() { old(); f() }}
}


function flashObject(flvwidth, flvheight, videoname) {
			 var url = videoname;
             var flvplayer = document.getElementById('flashvideo');
			flvplayer.innerHTML = '<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash>This presentation requires the latest version of Adobe Flash.</a>';
			var so = new SWFObject('FLVPlayer_Progressive.swf', "FLVPlayer", flvwidth, flvheight, "8", "#cccccc");
			so.addVariable("MM_ComponentVersion", "1");
			so.addVariable("skinName", "Clear_Skin_2");
			so.addVariable("streamName", url.replace(/\.flv/,''));
			so.addVariable("autoPlay", "True");
			so.addVariable("autoRewind", "false");
			so.addParam("wmode", "transparent");
			so.addParam("quality", "high");
			so.write(flvplayer);

			 
}

//addLoadEvent(function(){flashObject(600, 333, "/ucb/wp-content/uploads/brother/monday.flv");});
//addLoadEvent(function(){flashObject(768, 426, "/ucb/wp-content/uploads/brother/thursday.flv");});
 
//------ OBJECT TAG WITH FLVPlayer_Progressive.swf
/*
                flvplayer.innerHTML = '<object width="'+flvwidth+'" height="'+flvheight+'" id="FLVPlayer">' +
						'<param name="player" value="FLVPlayer_Progressive.swf" />' +
						'<param name="FlashVars" value="&skinName=Clear_Skin_2&streamName='+url.replace(/\.flv/,'')+'&autoPlay=false&autoRewind=true" />' +
						'<param name="quality" value="high" />' +
						'<param name="bgcolor" value="#000000" />' +
						'<param name="wmode" value="transparent" />' +
						'<embed src="FLVPlayer_Progressive.swf" quality="high" bgcolor="#000000" wmode="transparent" type="application/x-shockwave-flash" FlashVars="&skinName=Clear_Skin_2&streamName='+url.replace(/\.flv/,'')+'&autoPlay=false&autoRewind=true" width="'+flvwidth+'" height="'+flvheight+'" name="FLVPLayer" />' +
						'</object>';
						alert("hello");
               // this.el.innerHTML = flvplayer.innerHTML;
*/
