var myPlayer, seek;
function playerReady(obj) {
	myPlayer = document.getElementById(obj['id']);
}

function jumpTo(timecode) {
	myPlayer.sendEvent('PLAY', true);
	seek = timecode;
	addListeners();
	return false;
}

//...loop until we get a valid playlist so we know that the player is really ready, then add the TIME Listener
function addListeners() {
	try {
	  playlist = myPlayer.getPlaylist();
	}catch(e){
	  setTimeout("addListeners();", 100);
	}
	
	myPlayer.addModelListener('TIME', 'timeMonitor');
};

//...seek to the desired position once the player has started playing (position > 0)
function timeMonitor(obj) {
	if((obj.position > 0) && (seek !== null)) {
	  myPlayer.sendEvent('SEEK', seek);
	  seek = null;
	}
};
