var currentVidItem; var showVidFlag=false;

function sendEvent(typ,prm) { thisMovie("videoPlayerId").sendEvent(typ,prm); };


function getUpdate(typ,pr1,pr2,pid) {
	if(typ == "item") { currentVidItem = pr1; }
};


// This is a javascript handler for the player and is always needed.
function thisMovie(movieName) {
    if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
};

function createVideoPlayer(theFile) {
	var s = new SWFObject("/flash/mediaplayer.swf","videoPlayerId","550","300","1");
	s.addParam("allowfullscreen","true");
	s.addVariable("file",theFile);
	s.addVariable("width","550");
	s.addVariable("height","300");
	s.addVariable("displaywidth","350");
	s.addVariable("overstretch","fit");

	s.addVariable("showicons","false");
	s.addVariable("autostart","false");

	s.addVariable("enablejs","true");
	s.addVariable("javascriptid","videoPlayerId");
	
	s.addVariable("backcolor", "0x666600)");
	s.addVariable("frontcolor", "0x999900");
	s.addVariable("lightcolor", "0xFFFF33");
	s.addVariable("screencolor", "0x999900");
	s.write("videoplaceholder");
}


function createVidWindow(adr) { 
  showFlag=true;
  sendEvent("stop");
  var pWin=window.open(adr, "playerWin", "width=550,height=300,left=100,top=200,resizable=yes");
  pWin.focus();
}