<!-- JW PLAYER CONTROL FUNCTION -->

	var currentItem;

	function sendEvent(typ,prm) {
		//thisMovie("thePlayerId");
		document.getElementById("thePlayerId").sendEvent(typ,prm);
	};
	
	function loadFile(fil,tit,lnk,img,fid) {
		thisMovie("thePlayerId").loadFile(fil,tit,lnk,img,fid);
	};
	
	function getUpdate(typ,pr1,pr2,pid) {
		if(typ == "item") { currentItem = pr1; setTimeout("getItemData(currentItem)",100); }
	};
	
	function getItemData(idx) { 
		//self.parent.showUpdate("item: "+idx);
		showUpdate("item: "+idx);
	};
	
	// This is a javascript handler for the player and is always needed.
	function thisMovie(movieName) {
	    if(navigator.appName.indexOf("Microsoft") != -1) {
			alert("window");
			return window[movieName];
		} else {
			alert("document");
			return document[movieName];
		}
	}

