var current_player = null; 
var NUMBER_PLAYS=5;

function playerReady(thePlayer) {
	alert('hello');
	if (thePlayer)
		thePlayer.addModelListener("STATE", "stateListener");
}
function stateListener(obj) {
	//IDLE, BUFFERING, PLAYING, PAUSED, COMPLETED
	//alert(obj.id);
	currentState = obj.newstate; 
	previousState = obj.oldstate;
} 