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 CONTACTO(A,B,C,D,E,F,G){
	resul = document.getElementById('formulario_contacto');
	resul.innerHTML="<table width='425' border='0' align='center' cellspacing='0' cellpadding='0'><tr><td width='128'></td><td width='287' height='120'></td></tr><tr><td align='center' style='background-color:#1a1a1a'><img src='img/icon/procesando.gif' width='128' height='128' /></td><td height='61' align='center' style='background-color:#1a1a1a; font-size:37px;color:#fff'><b>Procesando...</b></td></tr><tr><td></td><td height='120'></td></tr></table>";
	
	ajax=nuevoAjax();
	ajax.open("POST", "modulos/contacto/xt_contacto.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			resul.innerHTML = ajax.responseText
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajax.send("company="+A+"&nombre="+B+"&telefono="+C+"&correo="+D+"&mensaje="+E+"&pais="+F+"&dir="+G);
}


function pagina(A){
	resul = document.getElementById('resultadox');
	ajax=nuevoAjax();
    ajax.open("POST", "experiencia.htm",true);
	ajax.onreadystatechange=function() {
	if (ajax.readyState==4) {resul.innerHTML = ajax.responseText}  }
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajax.send("pagina="+A);
	

}



/************************************************************************************************************/

function Contactox(){
	resul = document.getElementById('resultado');
	ajax=nuevoAjax();
    ajax.open("POST", "../contacto/list_contact.php",true);
	 
	ajax.onreadystatechange=function() {
	if (ajax.readyState==4) {resul.innerHTML = ajax.responseText}  }
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajax.send(null);
}

function OBSERVAR(A){
	resul = document.getElementById('resultado');
	ajax=nuevoAjax();
    ajax.open("POST", "../contacto/observar_contact.php",true);
	ajax.onreadystatechange=function() {
	if (ajax.readyState==4) {resul.innerHTML = ajax.responseText}  }
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajax.send("idx="+A);
}

function ELIMINAR(A){
	resul = document.getElementById('resultado');
	ajax=nuevoAjax();
    ajax.open("POST", "../contacto/eliminar_contact.php",true);
	ajax.onreadystatechange=function() {
	if (ajax.readyState==4) {resul.innerHTML = ajax.responseText}  }
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajax.send("idx2="+A);
}


function RESPONDER(A,B,C){
	resul = document.getElementById('resultado');
	ajax=nuevoAjax();
    ajax.open("POST", "../contacto/responder_contact.php",true);
	ajax.onreadystatechange=function() {
	if (ajax.readyState==4) {resul.innerHTML = ajax.responseText}  }
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    ajax.send("email="+A+"&resp="+B+"&idx3="+C);
}
