var currentItem; var showFlag=false;

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


function getUpdate(typ,pr1,pr2,pid) {
	if(typ == "item") { currentItem = 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 createPlayer(theFile) {
	var s = new SWFObject("/flash/mediaplayer.swf","thePlayerId","350","180","1");
	s.addParam("allowfullscreen","true");
	s.addVariable("file",theFile);
	s.addVariable("width","350");
	s.addVariable("height","180");
	s.addVariable("displaywidth","140");
	s.addVariable("overstretch","fit");

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

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


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