	function sendEvent (typ,prm) {
		mPL = Layer('jsplayer');
		if (mPL) {
			mPL.sendEvent(typ,prm);
		}
	}
	function getUpdate (typ,pr1,pr2,pid) {
		if (typ == "time") {
			currentPosition = pr1;
			if ((pr2 == 0) && (pr1 > 0)) {
				if (currentState == 2) {
					if (currentItem == 0) {
						yPR[0] = false;
						yTV(yPR[2], yPR[3], yPR[4]);
					}
				}
			}
		}
		else if (typ == "state") {
			currentState = pr1;
		}
		else if (typ == "item") {
			currentItem = pr1;
		}
	}