function trapPlayerErrors() { 
player=document.getElementById("WinMedia"); 
player.attachEvent("error",handlePlayerErrors); 
//player.attachEvent("playstatechange",handlePlayerStateChange); 
player.attachEvent("statuschange",handleStatusChange); 
player.attachEvent("scriptcommand",handleScriptCommand); 
} 

function handlePlayerErrors(error_object) { 
alert("En este momento hay demasiados usuarios conectados. Por favor intente nuevamente dentro de unos minutos."); 
} 

function handlePlayerStateChange(playstate_value) { 
alert("The playstate changed to " + playstate_value ); 
} 

function handleStatusChange(new_status_value) { 
alert("The status changed to " + new_status_value ); 
} 

function handleScriptCommand(commandType, commandText) { 
alert("Script command sent of type " + commandType + " with value " + commandText ); 
} 

function Hola() { 
alert('Un error ha ocurrido'); 
} 
