//I obviously do not know the jquery shortcuts yet.

/****************************

instead of onload,  this could (and will) be changed to a function that receives an flv file name via a pulldown or clickable object on the stage.

****************************/

function loadVideo(file) {

	var playerFlv = new SWFObject("player.swf","myplayer2","529","298","9"); //must be in the same dir as the html file that will contain the video
	playerFlv.addVariable("screencolor","white");
	//playerFlv.addVariable("image","preview.jpg");
	playerFlv.addVariable("file","flv/"+file);
	playerFlv.addVariable("controlbar","over");
	playerFlv.addVariable("autostart","true");
	playerFlv.addParam("wmode","transparent");
	playerFlv.write("player2");
	//create a javascript object to allow us send events to the flash player
	var player2 = document.getElementById("myplayer2");

}

function pause2() {
	var player2 = document.getElementById("myplayer2");
	player2.sendEvent("PLAY","false");
}

function play2() {
	var player2 = document.getElementById("myplayer2");
	player2.sendEvent("PLAY","true");
}

/******************************************
no sane way to get duration of a video, so we start at 0 and seek/reverse based on that var.
******************************************/
var position = 0;
function seek() {
	var player2 = document.getElementById("myplayer2");
	position = position + 5;
	player2.sendEvent("SEEK", position);
}
function rev() {
	var player2 = document.getElementById("myplayer2");
	position = position - 5;
	player2.sendEvent("SEEK", position);
}

