var __currentState, __currentItem;
function getUpdate(typ,pr1,pr2,pid) {
	if(pid != "null") {
		if((typ == "state")&&(pr1 != undefined)) { 
			__currentState = pr1; 
			
			// video done.
			if(__currentState=="3") { }
		}
		
		if((typ == "item")&&(pr1 != undefined))
		{
			__currentItem = pr1; 
			setTimeout("getItemData(__currentItem)",100);
		}
	}
};

function getItemData(idx) {
	var obj = thisMovie("playlist").itemData(idx);
	document.getElementById("video_info").innerHTML = unescape (obj["description"]) ; 
};

function thisMovie(movieName) {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
};