﻿function activar_opcion(op){
    //document.getElementById('op'+op).className='active'
}
function moverMarca() {
    document.getElementById('marcapestania').scrollIntoView(true);
}
/*function busca_con_enter(e){
    tecla = (document.all) ? e.keyCode : e.which;
	if (tecla==13){buscar(); return false}
}*/
function buscar() {
    try {
        if (jQuery) {
            //jquery
            var url = '/ajax/resultados-busqueda-video.aspx?q=' + $('#txtBuscarVideo').val();
            $('#block-block-7').html('buscando...');
            $.ajax({
                url: url,
                cache: false,
                success: function(html) {
                $('#block-block-7').html(html);
                }
            });
        }
    }
    catch (err) {
        //mootools
        var url = '/ajax/resultados-busqueda-video.aspx?q=' + $('txtBuscarVideo').value;
        $('block-block-7').innerHTML = 'buscando...'
        var ajaxUR = new Ajax(url, {method: 'get', update:$('block-block-7')}).request();
    }
}
var divAnt
var tdem
function cargarcat(div,c){  
  clearInterval(tdem)
  tdem=setInterval("actmenu("+div+",'"+c+"')", 600);   
}
function actmenu(div,c){
  ocultarcat(divAnt)
  var divC=document.getElementById('divcategorias'+div)
  if(divC){/*divC.style.visibility='visible';*//*divC.style.backgroundColor=c*/ divC.className=c}  
  divAnt=div
  mostrar()    
}
function ocultarcat(div){  
  clearInterval(tdem)
  var divC=document.getElementById('divcategorias'+div)
  if(divC)divC.style.visibility='hidden'  
}
function mostrar(){
var divC=document.getElementById('divcategorias'+divAnt)
if(divC){divC.style.visibility='visible'}  
}

function abrirdivLRFB(){
if(document.getElementById('div90')){
    document.getElementById('mainInner').appendChild(document.getElementById('div90')); 
    document.getElementById('div90').style.visibility='visible'
    //document.getElementById('mainInner').scrollIntoView(true);
}
}
function divComent(op){
$("headerInner2").appendChild($("divENVXMAIL"))
//document.getElementById('divENVXMAIL').style.visibility=op;
document.getElementById('divENVXMAIL').style.visibility=op;
if(op=='hidden'){nuevoMensaje(); if($('divmg')){$('divmg').style.visibility=op}}
return false;
}
function envVideo(){
    /*if(!verificaemail($('suemail').value)){alert('Ingrese un email valido');$('suemail').focus();return false}
    if($('sunombre').value==''){alert('Ingrese el nombre de tu amigo');$('sunombre').focus();return false}    
    */
    if($('tunombre').value==''){alert('Ingresa tu nombre');$('tunombre').focus();return false}
    if(!verificaemail($('tuemail').value)){alert('Ingrese un email valido');$('tuemail').focus();return false}
    if($('destinatarios').value==''){alert('Ingrese destinatario(s)');$('destinatarios').focus();return false}
    
    if($('divmg')){
    $('divmg').style.visibility='visible'
    }else{
    divmg = document.createElement('div');
    divmg.id = "divmg";
    divmg.className='divmgc'
    $("cntg").appendChild(divmg);   
    }
    $('divmg').innerHTML = "Enviando...";
    
    var url = '/ajax/enviar_video.aspx?destinatarios=' + $('destinatarios').value + '&tunombre=' + $('tunombre').value + '&tuemail=' + $('tuemail').value + '&tumensaje=' + $('tumensaje').value + '&imgvideo=' + $('imgvideo').value + '&fotousuario=' + $('fotoUs').value + '&urlvideo=' + $('urlvideo').value + '&titulovideo=' + $('titulovideo').value + '&desvideo=' + $('desvideo').value;
    var ajaxUR = new Ajax(url, {method: 'get', update:$('divmg')}).request();

    
}
function verificaemail(mail){
	var s = mail;
	var filter=/^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/;
	if (filter.test(s)){
		return true;
	}else{
		return false;
	}
}
function nuevoMensaje(){
$('destinatarios').value=''
//$('tuemail').value=''
//$('tunombre').value=''
$('tumensaje').value=''
}
var vop=1
function  opev(op){
    copev(vop)
    $('opcont'+op).className='opd90_'
    $('bopcont'+op).style.display='block'
    vop=op
}
function copev(op){
    $('opcont'+op).className='opd90'
    $('bopcont'+op).style.display='none'    
}
function echeck(str) {
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("e-mail inválido")
		   return false
		}
		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("e-mail inválido")
		   return false
		}
		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("e-mail inválido")
		    return false
		}
		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("e-mail inválido")
		    return false
		 }
		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("e-mail inválido")
		    return false
		 }
		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("e-mail inválido")
		    return false
		 }
		 if (str.indexOf(" ")!=-1){
		    alert("e-mail inválido")
		    return false
		 }		 
 		 return true					
}
var punt_
var idcom_
var pnt_
function punt(pnt,pnt_act,idcom){
 if(getc('idsc').indexOf(idcom)>=0)return false; 
 var punt_act
 if(pnt==0) punt_act=((pnt_act)-1)
 else punt_act=eval(pnt_act)+1
 
 punt_=punt_act
 idcom_=idcom
 pnt_=pnt
 var params="puntuacion="+punt_act+"&idcomentario="+idcom
 var ajaxC = new Ajax('/ajax/puntuacion_comentario_videos.aspx',{method: 'post',data:params,onComplete: function(request){		        
    if(request==1){        
        setc('idsc',getc('idsc')+idcom_+'|',2)        
        $('lbpunt_'+idcom_).className=(punt_<0)?'projo':'pverde';
	    $('lbpunt_'+idcom_).innerHTML=(punt_>0)?'+'+punt_:punt_;
	    
	    var divpunt= document.createElement('div');
        divpunt.id = "divpunt";
        divpunt.className='divpunt'
        $('divpunt_'+idcom_).appendChild(divpunt);   
	    
	        
	    if(pnt_==0){
	        $('lnk_pn_'+idcom_).className='punt_negHover'        
	    }else{
	        $('lnk_pp_'+idcom_).className='punt_posHover'
	    }
    }
    }});ajaxC.request();
 
}
function resp_com(id,ind,xind){
    $('btncancelar').style.visibility='visible'
    $('divcomm_'+id).appendChild($('commentvideo'));         
    $('idcomentario').value=id
    $('ind').value=ind 
}
function can_env_com(){        
    $('btncancelar').style.visibility='hidden'
    $('box_dvideo').appendChild($('commentvideo'));  
    $('idcomentario').value='0'
    $('ind').value='-1' 
}
function setc(name,value,texp){var cookie_string = name + "=" + escape ( value );var now=new Date();if(texp==1){var expires =new Date(now.getTime()+1000*60*5);}if(texp==2){var expires =new Date(now.getTime()+1000*60*60*24);}cookie_string += "; expires=" + expires.toGMTString();document.cookie = cookie_string;}
function getc(cn){var results = document.cookie.match('(^|;) ?' + cn + '=([^;]*)(;|$)');if(results){return (unescape(results[2]));}else{return '|1|';}}
function checkForm(frm,idv){
    if(getc('idsv').indexOf(idv)>=0)return false; 
	var emailID=frm.mail
	if ((frm.name.value==null)||(frm.name.value=="")){
		alert("Por favor ingrese su nombre")
		frm.name.focus()
		return false
	}
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Por favor ingrese su e-mail")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}		 
    if (frm.subject.value=="" || frm.comment.value==""){		
		return false
	}
	setc('idsv',getc('idsv')+idv+'|',1)
	/*if('<%=idcliente%>'==0){
	        if(confirm("Ud. no ha iniciado sesión. \n Desea iniciar ahora?")){
	            self.location.href='/login?u=http://<%=Request.Url.Host%>/videos/<%=link%>/'
	            return false
	        }else{
		    return false;
		    }
    }*/
    
    /*if('<%=idcliente%>'==0){
        $('divlog').style.display='block'
        return false;
    } */  
    
    
	return true
}

/****************** ratings ********************/
var m_arrStrRatings = new Array("Deficiente", "Nada especial", "Es recomendable verlo", "Bastante bueno", "¡Impresionante!");
var m_rating = 0;
var m_canRate = false;
var m_nvotes = 0;
var m_onrating = false;
var m_videoRating = 0;
function voteRating(){}
function setStars(n){
  if(!m_canRate){
    alert('Usted ya no puede calificar');
    return;
  }
  if(m_onrating) return;
  m_onrating = true;
  var params = "v=" + m_videoRating + "&r=" + n;
  var ajaxC = new Ajax('/ajax/_videoRating.aspx',{method: 'post',data:params,onComplete: function(request){		        
    if(request==1){
      m_rating = (m_rating*m_nvotes + n)/(m_nvotes+1);
      m_nvotes++;
      m_canRate = false;
      resetStars();
    }else{
      alert('No se pudo actualizar su voto');
    }
    m_onrating = false;
  }}).request();
}
function showStars(n){
  if(m_canRate) {
    for(i=1; i <= 5; i++){
      $('star__' + i).style.backgroundPosition = (i<=n? '0px':'-75px') + ' 0px';
    }
    $('defaultRatingMessage').innerHTML = m_arrStrRatings[n-1];
  }
}
function resetStars(){
  ent = Math.floor(m_rating);
  dec = Math.floor((m_rating-ent)*100);
  if(dec > 75){
      ent ++;
      dec = 0;
  }else if(dec > 25) {
      dec = 5
  }else{
    dec = 0
  }
  for(i=1; i <= 5; i++){
    if(ent == i-1 && dec == 5){
      $('star__' + i).style.backgroundPosition = '-60px -15px';
    }else{
      $('star__' + i).style.backgroundPosition = (i<=ent? '0px':'-75px') + ' 0px';
    }
  }
  $('defaultRatingMessage').innerHTML = m_nvotes + ' Calificaciones';
  if(!m_canClickNoPlay){$('btnNoPlay').style.display = 'none';}
}
var m_canClickNoPlay = true;
function clickNoPlay(){
  if(!m_canClickNoPlay) return;
  m_canClickNoPlay = false;

  var params = "v=" + m_videoRating;
  var ajaxC = new Ajax('/ajax/_videoNoRep.aspx',{method: 'post',data:params,onComplete: function(request){		        
    if(request==1){
      alert('Gracias por Informarnos del Error de este video... en Breve sera corregido.');
    }else{
      alert('No se pudo actualizar su calificación');
    }
  }}).request();
  $('btnNoPlay').style.display = 'none';
}
/**************** end ratings ******************/
var nrovidrel
      var vidact=1
      var xdesp=326
      var recx=0
      var tmprecx=0
      var IDIntMovX
      var setInt=36
      function cl_int(){clearInterval(IDIntMovX)}
      function movdiv(f){
        var psa=0
        if(f=='+'){if(eval(Math.abs(recx))<((nrovidrel-1)*xdesp)){recx-=xdesp;psa=1}}
        if(f=='-'){if(recx!=0){recx+=xdesp;psa=1}}              
        if(psa==1){IDIntMovX = setInterval("movx('"+f+"')",10);psa=0}        
      }
      function movx(f){
        if(f=='+'){tmprecx=eval(tmprecx-setInt);if(Math.abs(tmprecx)>=Math.abs(recx)){cl_int();tmprecx=recx}}
        if(f=='-'){tmprecx=eval(tmprecx+setInt);if((Math.abs(tmprecx)<=Math.abs(recx)) || tmprecx>0  ){cl_int();tmprecx=recx}}
        $('divLVR').style.left=tmprecx+'px'        
      }
      function init_nrovidrel(){var divsVID=$('divLVR').getElementsByTagName('div');nrovidrel=divsVID.length}
      function rndv() { var rnd = Math.floor(Math.random() * (nrovidrel - 1)); if ($('lnkVR' + rnd)) self.location = $('lnkVR' + rnd).href }



//RELATED VIDEO

var vRelated = 1
var messageRelated
var act_x = 0
var IdIntervalRelated
function showRelatedTime() {
    clearInterval(IdIntervalRelated)
    if (act_x == 0) {
        
        $("bockvideo").setStyle("background-color", "transparent");
        $("bockvideo2").setStyle("background-color", "transparent");
        $("bockvideo").setStyle("visibility", "hidden");
        $("bockvideo2").setStyle("visibility", "hidden");
        IdIntervalRelated = setInterval("mostrarrel()", 1000);
        act_x = 1;
        //IdIntervalRelated = setInterval("showRelated()", 500);
        
    }
    else {

        IdIntervalRelated = setInterval("showRelated()", 500);
        act_x = 0;
    }
}
function mostrarrel() {
    $("bockvideo").setStyle("background-color", "#fff");
    $("bockvideo2").setStyle("background-color", "#fff");
    $("bockvideo").setStyle("visibility", "visible");
    $("bockvideo2").setStyle("visibility", "visible");
}
function hiddenRelatedTime() {
    clearInterval(IdIntervalRelated)
    IdIntervalRelated = setInterval("mostrarrel()", 1000);

}

function showRelated() {
    
    clearInterval(IdIntervalRelated)
    IdIntervalRelated = setInterval("mostrarrel()", 0);
  if (vRelated == 1) {
      if ($('lRelatedVideo')) {
          $('lRelatedVideo').style.visibility = 'visible'
          //defrels();
      } else {
          var layerVideo = document.createElement('div');
          var ListVideo = $('relsvideos').innerHTML;
          ListVideo = ListVideo.replace(/zRelate2/g, 'zRelate')
          ListVideo = ListVideo.replace(/<A title=/g, '<A onmouseover=showRelated() title=')
          layerVideo.id = 'lRelatedVideo';
          layerVideo.className = 'lRelatedVideo';
          $('bodyp').appendChild(layerVideo);
          layerVideo.innerHTML = ListVideo;
          //layerVideo.innerHTML = '<span class=titleVRelatedRep>' + messageRelated + '</span>' + ListVideo;
          addevent(layerVideo);
          defrels();
          //alert("asd" + $('lRelatedVideo').innerHTML);
      }
  } else {
      //
  }
}
function hiddenRelated() {
  if ($('lRelatedVideo')) $('lRelatedVideo').style.visibility = 'hidden'
}
function addevent(ob) {
  if (ob.addEventListener) {
      ob.addEventListener("mouseover", showRelated, false);
      ob.addEventListener("mouseout", hiddenRelated, false);
  } else if (ob.attachEvent) {
      ob.attachEvent("onmouseover", showRelated);
      ob.attachEvent("onmouseout", hiddenRelated);
  } else {
      ob.onmouseover = showRelated;
      ob.onmouseout = hiddenRelated;
  }
}
function showLayerMSG() {
  if ($('IdLayerALT')) {
      $('IdLayerALT').style.display = 'block'
  } else {
      var layerALT = document.createElement("div")
      layerALT.id = 'IdLayerALT';
      layerALT.className = "layerALT"
      layerALT.innerHTML = 'Subscribete y recibiras videos de (humor, musicales, actualidad etc) en tu email completamente gratis.<br>Escribe tu email y has clic en el boton <b>"Subscribe"</b>.<br>Luego revisa tu cuenta de email porque te llegara un correo para que puedas activar la subscripcion y asi podamos enviarte los videos del dia.<br><b>Nota:</b> Si no activas la subscripcion no podremos enviarte los videos'
      $('zFeedBurner').appendChild(layerALT)
  }
}
function hiddenLayerMSG() {
  $('IdLayerALT').style.display = 'none'
}


//pestañas videosyt

var _id = 1

function lmas_act(id) {
    
    $('mm_' + _id).removeClass('md_' + _id);
    $('mm_' + _id).addClass('m_' + _id);
    $('cmm_' + _id).setStyle('display', 'none')
    
    $('mm_' + id).removeClass('m_' + id);
    $('mm_' + id).addClass('md_' + id);
    $('cmm_' + id).setStyle('display', 'block')
    
    _id = id;
}
// fin pestañas videoyt

//inicio videos de autor

var ayt_visible = false;
var ayt_click = false;
var ayt_posx = 0;

function mostrar_videosautor(autor) {
    if (ayt_visible) {
        $('watch-more-from-user').setStyle('display', 'none')
        ayt_visible = false;
    }
    else {
        if (ayt_click) {
            //mostrar div
            $('watch-more-from-user').setStyle('display', 'block')
            ayt_visible = true;
        }
        else {
            //mootools
            var url = '/ajax/videos_autor.aspx?autor=' + autor;
            $('watch-more-from-user').setStyle('display', 'block')
            ayt_visible = true;
            $('watch-more-from-user').innerHTML = '<center><br />Cargando Videos de: <b>' + autor.toUpperCase() +'</b><br /><img src="/images/cargando.gif" /><br /><br /></center>'
            var ajaxUR = new Ajax(url, { method: 'get', update: $('watch-more-from-user') }).request();
            ayt_click = true;
        }
    }

    if (ayt_visible) {
        $('btnxpand').setStyle('background-position', '-12px 0px')
    }
    else {
        $('btnxpand').setStyle('background-position', '0px 0px')
    }
    
    return false;
}


var yta_nropags = 4;
var yta_pagact = 1;
var yta_xdesp = 896;
var yta_recx = 0;
var yta_tmprecx = 0;
var yta_IDIntMovX
var yta_setInt = 36;
function yta_cl_int() { clearInterval(yta_IDIntMovX) }
function yta_movdiv(f) {
    //alert(f);
    //$('yt-uix-desp').style.left = '100px';
    var yta_psa = 0
    if (f == '+') { if (eval(Math.abs(yta_recx)) < ((yta_nropags - 1) * yta_xdesp)) { yta_recx -= yta_xdesp; yta_psa = 1; yta_pagact += 1; yta_marcarboton(yta_pagact - 1); } }
    if (f == '-') { if (yta_recx != 0) { yta_recx += yta_xdesp; yta_psa = 1; yta_pagact -= 1; yta_marcarboton(yta_pagact + 1); } }
    if (yta_psa == 1) { yta_IDIntMovX = setInterval("yta_movx('" + f + "')", 10); yta_psa = 0; }
}
function yta_movx(f) {
    if (f == '+') { yta_tmprecx = eval(yta_tmprecx - yta_setInt); if (Math.abs(yta_tmprecx) >= Math.abs(yta_recx)) { yta_cl_int(); yta_tmprecx = yta_recx } }
    if (f == '-') { yta_tmprecx = eval(yta_tmprecx + yta_setInt); if ((Math.abs(yta_tmprecx) <= Math.abs(yta_recx)) || yta_tmprecx > 0) { yta_cl_int(); yta_tmprecx = yta_recx } }
    $('yt-uix-desp').style.left = yta_tmprecx + 'px';
}
function yta_init(pags) {
    yta_nropags = pags;
    //var ydivsVID = $('watch-more-from-user').getElementsByTagName('ul'); yta_nropag = ydivsVID.length; alert(divsVID.length);
    if (navigator.userAgent.indexOf("irefox") != -1) {
        $('btnxpand').setStyle('margin-bottom', '5px');
    }
}

function yta_changepag(pag) {
    var dir = '';
    var cant = 0;
    if (pag > yta_pagact) {
        dir = '+';
        cant = pag - yta_pagact;
    }
    else {
        dir = '-';
        cant = yta_pagact - pag;
    }
    if (pag != yta_pagact) {
        while (cant > 0) {
            yta_movdiv(dir);
            cant -= 1;
        }
    }
}
function yta_marcarboton(pag_ant) {
    //alert(yta_nropags + '-' + yta_pagact);
    if (yta_pagact > 0 && yta_pagact <= yta_nropags) {
        $('yta-btn' + pag_ant).removeClass('yt-uix-pager-selected');
        $('yta-btn' + yta_pagact).addClass('yt-uix-pager-selected');
    }
    
}

//fin videos de autor


var xdesp = 543;
var video_x = 641;
var video_y = 385;
var pad_x = 0;
function cambiarTamanio() {
    if (video_x == 641) {
        video_x = 840;
        video_y = 505;
        pad_x = 60;
        $("txtcamb").removeClass('maximizarv');
        $("txtcamb").addClass('minimizarv');
        $("txtcamb").setText('Reducir Video');
    }
    else {
        video_x = 641;
        video_y = 385;
        pad_x = 0;
        $("txtcamb").removeClass('minimizarv');
        $("txtcamb").addClass('maximizarv');
        $("txtcamb").setText('Ampliar Video');
    }

    $("mediaspace").setStyle("width", video_x);
    $("mediaspace").setStyle("height", video_y);

    $("mediaspace").setStyle("padding-right", pad_x);
    $("mediaspace").setStyle("padding-left", pad_x);
    $("mediaspace").setStyle("background-color", "#000");

    $("videosRel").setStyle("width", video_x + (pad_x * 2));
    if ($("divRel")) $("divRel").setStyle("width", video_x + (pad_x * 2) - 2);
    if ($("itemsRel")) $("itemsRel").setStyle("width", video_x + (pad_x * 2) - 98);

    $("bockvideo").setStyle("width", video_x);
    $("bockvideo").setStyle("height", video_y - 85);
    $("bockvideo").setStyle("margin-left", pad_x);

    $("bockvideo2").setStyle("top", video_y - 85);
    $("bockvideo2").setStyle("width", video_x - 151);
    $("bockvideo2").setStyle("margin-left", pad_x);

    if ($("lRelatedVideo")) $("lRelatedVideo").setStyle("width", video_x - 50);
    if ($("lRelatedVideo")) $("lRelatedVideo").setStyle("height", video_y - 45);
    if ($("lRelatedVideo")) $("lRelatedVideo").setStyle("margin-left", pad_x);

    return false;
}

function defrels() {
    if ($("lRelatedVideo")) $("lRelatedVideo").setStyle("width", video_x - 50);
    if ($("lRelatedVideo")) $("lRelatedVideo").setStyle("height", video_y - 45);
    if ($("lRelatedVideo")) $("lRelatedVideo").setStyle("margin-left", pad_x);
}

var m_canLike = true;
var m_onLike = false;
var m_mLike = true;
var m_maxLike = true;
var m_contLike = 0;
var m_contUnLike = 0;
function activarActionBar(obj) {
    $('likes-bar').toggleClass('likes-bar_act');
    $('dislikes-bar').toggleClass('dislikes-bar_act');
    $(obj).toggleClass('btn_act');
    $('altBar').toggleClass('alt_act');
}
function activarBtnLike(obj) {
    if (m_mLike) {
        $('btnLike').toggleClass('btnLike_act');
        $(obj).toggleClass('btn_act');
    }
    $('altLike').toggleClass('alt_act');
}
function activarBtnUnLike(obj) {
    if (m_mLike) {
        $('btnUnLike').toggleClass('btnUnLike_act');
        $(obj).toggleClass('btn_act');
    }
    $('altUnLike').toggleClass('alt_act');
}
function votarLike(id, v, obj) {
    if (!m_canLike) {
        alert('Usted ya no puede calificar');
        return;
    }
    if (m_onLike) return;

    m_onLike = true;
    var params = "idv=" + id + "&vlike=" + v;
    var ajaxC = new Ajax('/ajax/_videoLike.aspx', { method: 'post', data: params, onComplete: function(request) {
        if (request > 0) {
            m_canLike = false;
            m_mLike = false;
            //alert('se realizo el voto');
            if (v > 0) {
                $('btnLike').addClass('btnLike_act');
                valor = $('likes-bar').getStyle("width").replace("%", "");
                if (valor < 100) { valor = parseInt(valor) + 2; }
                $('likes-bar').setStyle("width", valor + '%');
                m_contLike = m_contLike + 1;
            }
            else {
                $('btnUnLike').addClass('btnUnLike_act');
                valor = $('dislikes-bar').getStyle("width").replace("%", "");
                if (valor < 100) { valor = parseInt(valor) + 2; }
                $('dislikes-bar').setStyle("width", valor + '%');
                m_contUnLike = m_contUnLike + 1;
            }
            $('altBar').innerHTML = '<p>' + m_contLike + ' gustó, ' + m_contUnLike + ' no gustó</p>';
        } else {
            alert('No se pudo actualizar su voto');
        }
        m_onLike = false;
    }
    }).request();
}
