
function datosServidor(){};datosServidor.prototype.iniciar=function(){try{this._xh=new XMLHttpRequest();}catch(e){var _ieModelos=new Array('MSXML2.XMLHTTP.5.0','MSXML2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP');var success=false;for(var i=0;i<_ieModelos.length&&!success;i++){try{this._xh=new ActiveXObject(_ieModelos[i]);success=true;}catch(e){}}
if(!success){return false;}
return true;}
return false;}
datosServidor.prototype.ocupado=function(){estadoActual=this._xh.readyState;return(estadoActual&&(estadoActual<4));}
datosServidor.prototype.procesa=function(){if(this._xh.readyState==4&&this._xh.status==200){this.procesado=true;}}
datosServidor.prototype.enviar=function(urlget,datos){if(!this._xh){this.iniciar();}
if(!this.ocupado()){this._xh.open("GET",urlget,false);this._xh.send(datos);if(this._xh.readyState==4&&this._xh.status==200){return this._xh.responseText;}}
return false;}
function _gr(reqseccion,divcont){remotos=new datosServidor;nt=remotos.enviar(reqseccion,"");document.getElementById(divcont).innerHTML=nt;}
var urlBase="galleryValorationRun.php?";function rateImg(rating,imgId){document.getElementById('zonaEstrellada').innerHTML="<table width='100%'><tr><td width='100%' align='center'><img src='/img/general/ajax-loader.gif'> <small>Cargando...</small> </td></tr></table>";remotos=new datosServidor;nt=remotos.enviar('/sections/gallery/galleryValorationRun.php?rating='+rating+'&imgId='+imgId+'&ms='+new Date().getTime());rating=rating*17;document.getElementById('zonaEstrellada').innerHTML=nt;document.getElementById('current-rating').style.width=rating+'px';}
function ratePlayer(rating,PlayerId,MatchId){document.getElementById("player"+PlayerId).innerHTML="<table width='100%'><tr><td width='100%' align='center'><img src='/img/general/ajax-loader.gif'> <small>Cargando...</small></td></tr></table>";remotos=new datosServidor;nt=remotos.enviar('/sections/partido/partido-valoracionrun.php?rating='+rating+'&jugador_id='+PlayerId+'&partido_id='+MatchId+'&ms='+new Date().getTime());document.getElementById("player"+PlayerId).innerHTML=nt;}
function rateUser(rating,userId,rutaSite){document.getElementById('user-rating').innerHTML="<table width='100%'><tr><td width='100%' align='center'><img src='"+rutaSite+"img/general/ajax-loader.gif'> <small>Cargando...</small></td></tr></table>";remotos=new datosServidor;nt=remotos.enviar('/js/user-valoracionrun.php?rating='+rating+'&userId='+userId+'&ms='+new Date().getTime());rating=rating*25;document.getElementById('user-rating').innerHTML=nt;document.getElementById('current-rating-user').style.width=rating+'px';}
function rateJugador(rating,jugadorId){remotos=new datosServidor;nt=remotos.enviar('/js/jugador-valoracionrun.php?rating='+rating+'&jugadorId='+jugadorId+'&ms='+new Date().getTime());rating=rating*25;document.getElementById('current-rating-user').style.width=rating+'px';document.getElementById('rating-total').innerHTML=nt;}