// JavaScript Document
function nuevoAjax(){ 
	var xmlhttp=false;
 	try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e) {try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(E){xmlhttp=false;}if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){xmlhttp=new XMLHttpRequest();}}return xmlhttp;
}

function votar(t, v){ 
	var ajax=nuevoAjax();
	var destino = document.getElementById('response');
	ajax.open("POST", "acciones/procesarVoto.php",true);
	ajax.onreadystatechange=function() { if (ajax.readyState==4) { destino.innerHTML = ajax.responseText; }else{ destino.innerHTML = 'votando...'; }}
	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("v="+v+"&t="+t);
}

function mandarMail(destino, e, t){
	var ajax=nuevoAjax();
	ajax.open("POST", "acciones/recomendar.php",true);
	ajax.onreadystatechange=function() { if (ajax.readyState==4) { destino.innerHTML = ajax.responseText; }else{ destino.innerHTML = 'procesando envio...'; }}
	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("e="+e+"&t="+t);

}