function handleHttpResponse(id_coment) { 
	
	if (http.readyState == 4) { 
		if (http.status == 200) { 
			if (http.responseText.indexOf('invalid') == -1) {
            	results = http.responseText; 
				alert(id_coment);
            	document.getElementById("gustan_"+id_coment).innerHTML = results;
            	enProceso = false;
          	}
       	}
    }
}
function marca_gusta(alias,id_coment) {
	
	if (!enProceso && http) {
		//alert(alias)
		alert(id_coment)
		var rr = Math.round(Math.random()*1000);
       var url = "/foro/index.asp?alias="+ alias +"&id_coment="+ id_coment+"&rr=" + rr;
	   
       http.open("GET", url, true);
       http.onreadystatechange = handleHttpResponse(id_coment);
       enProceso = true;
       http.send(null);
    }
	return false;
}



function getHTTPObject(){
	var xmlhttp=false; 
/* Compatibilidad con FireFox, Opera y cualquier otro BUEN navegador */
	if(typeof(XMLHttpRequest) != 'undefined'){
    	try{
      		var xmlhttp = new XMLHttpRequest();
    	}
    	catch(e){ }
  	}else{
    /* Compatibilidad para el navegador más ASQUEROSO del planeta [ IE ] */
    	try{
      		var xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
    	}
    	catch(e){
      		var xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
    	}
  	}
  	return xmlhttp;
}



var enProceso = false; // lo usamos para ver si hay un proceso activo
var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest

