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 guardarContact(){
	var names, motivo, mensaje, envio, contenedor;
	contenedor = document.getElementById('sugerencias_contact');
	names = document.getElementById('names').value;
	motivo = document.getElementById('motivo').value;
	email = document.getElementById('email').value;
	mensaje = document.getElementById('mensaje').value;
	envio = document.getElementById('envio').value;

			ajax=nuevoAjax();
			ajax.open("POST", "./scriptes/guardar_contactenos.php",true);
			ajax.onreadystatechange=function() {
				if (ajax.readyState==1) { // si el estado es 1, quiere decir que está cargando el contenido
					 contenedor.innerHTML="<br><br><div id=loading class=ver13 align=center>Procesando información un momento porfavor...<br><img src=./img/loaders.gif></div>";
				}else if (ajax.readyState==4) {
					contenedor.innerHTML = ajax.responseText
				}
			}
			ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			ajax.send("names="+names+"&motivo="+motivo+"&email="+email+"&mensaje="+mensaje+"&envio="+envio)	
}