var currentItem;

	function getUpdate(typ,pr1,pr2,pid) {
		if(typ == "item") { currentItem = pr1; setTimeout("getItemData(currentItem)",100); }
	};

	function getItemData(idx) {
		var obj = thisMovie("playerId").itemData(idx);
		document.getElementById("theEmbedCode").innerHTML = "&nbsp;&nbsp;embed: <input onclick=\"this.select()\" type=\"text\" name=\"\" value=\"&lt;object width=&quot;425&quot; height=&quot;289&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.pbs.org/kqed/oceanadventures/video/embed/" + obj["id"] + "&quot;&gt;&lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.pbs.org/kqed/oceanadventures/video/embed/" + obj["id"] + "&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;425&quot; height=&quot;289&quot;&gt;&lt;/embed&gt;&lt;/object&gt;\" />"; 
		document.getElementById("theTitle").innerHTML = obj["title"]; 
	};

	// 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];
		}
	};