function megusta(idcomentario,posicion,obj,action,seccion,id,pg) {

if(action=='log') {
$('#megustahref-'+posicion).removeAttr("href");
 var total = $('#megusta-'+posicion).text();
 total = parseInt(total);
 total =  total +1 ;
 $('#megusta-'+posicion).html(total);
} else {
$('#abusohref-'+posicion).removeAttr("href");
  var total = $('#abuso-'+posicion).text();
 total = parseInt(total);
 total =  total +1 ;
 $('#abuso-'+posicion).html(total);  
}
var xmlHttp;
try {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
} catch (e) {
  // Internet Explorer
  try {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
    try {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e) {
      alert("Your browser does not support AJAX!");
      return false;
    }
  }
}
xmlHttp.onreadystatechange=function() {
  if(xmlHttp.readyState==4) {
 //   document.getElementById("unnoticias").innerHTML=xmlHttp.responseText;
  }
}
xmlHttp.open("GET","/megusta?idcomentario="+idcomentario+"&obj="+obj+"&action="+action+"&seccion="+seccion+"&id="+id+"&pg="+pg,true);
xmlHttp.send(null);
}

function cargarcalendario(mes,anho) {
var xmlHttp;
try {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
} catch (e) {
  // Internet Explorer
  try {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
    try {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e) {
      alert("Your browser does not support AJAX!");
      return false;
    }
  }
}
xmlHttp.onreadystatechange=function() {
  if(xmlHttp.readyState==4) {
    document.getElementById("calendariocharge").innerHTML=xmlHttp.responseText;
  }
}
xmlHttp.open("GET","/calendario?Month="+mes+"&Year="+anho,true);
xmlHttp.send(null);
}

function openwindow(url, myname, w, h, scroll) {
        scroll = typeof(scroll) != 'undefined' ? scroll : 'YES';
	vent=window.open(url,myname,'screenx=0,screeny=0,width=' + w + ',height=' + h +',directories=no,status=no,scrollbars=' + scroll + ',resize=yes,menubar=no,top=200,left=250');
	vent.focus();

}

