var xmlHttp3

function enviarAmigo()
{ 
	xmlHttp3=GetXmlHttpObject3()
//alert("clickeado")
	if (xmlHttp3==null){
		alert ("Browser does not support HTTP Request")
	return	}
	
	email = document.forma.txtDescripcion.value;
	pagina = document.forma.txtPagina.value;
	sucorreo =  document.forma.txtSuCorreo.value;
	sunombre =  document.forma.txtSuNombre.value;
	xmlHttp3.onreadystatechange = function() { 
        if (xmlHttp3.readyState==4)
            if (xmlHttp3.status==200)
                stateChanged3(xmlHttp3,email,pagina,sucorreo,sunombre)
				}
	xmlHttp3.open("POST","archivos/enviaramigo.php",true)
	xmlHttp3.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlHttp3.send("q="+email+"&p="+pagina+"&suc="+sucorreo+"&sun="+sunombre)
	return CerrarVentana();
}


function stateChanged3(xmlHttp,email,pagina) { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
	}
}


function GetXmlHttpObject3()
{
	var xmlHttp3=null;
	try	{
			xmlHttp3=new XMLHttpRequest();
		}

	catch (e) {
 //Internet Explorer
				try
					{
						xmlHttp3=new ActiveXObject("Msxml2.XMLHTTP");
					}
	catch (e) {
			xmlHttp3=new ActiveXObject("Microsoft.XMLHTTP");
			  }
		}
return xmlHttp3;
}
