
window.onload = function()	{
	$("btnSolicitaInfo").onclick = solicitarInfo;
	$("elBoton").style.display = "";
	$("gracias").style.display = "none";
	$("errCampos").style.display = "none";
	}
	

function solicitarInfo()	{
	var err=0;
	//alert("Hola");
	if($("email").value == "") {
	$("errCampos").style.display = "";
	$("email").style.backgroundColor= "#FFD9D9"
	$("email").focus();
	err=1;
	} else {
		if(emailCheck($("email").value) == false)	{
		$("errCampos").style.display = "";
		$("email").style.backgroundColor= "#FFD9D9"
		alert("El formato de EMAIL no es correcto");
		$("email").focus();
		
		err=1;
		}
	}
	
	if($("telefono").value == "") {
	$("errCampos").style.display = "";
	$("telefono").style.backgroundColor= "#FFD9D9"
	$("telefono").focus();
	err=1;
	}
	
	if($("nombre").value == "") {
	$("errCampos").style.display = "";
	$("nombre").style.backgroundColor= "#FFD9D9"
	$("nombre").focus();
	err=1;
	}
	
	if (err!=1)	{
		
		var valores = $("formaSolicitarInfo").serialize();
		$Ajax("SolicitarInfo.asp",
			{metodo: $metodo.POST,
			divCargando: "divCargando",
			parametros: valores,
			onfinish: formularioEnviado});
	}
	
	//if (err!=1)	{
	//	return true;
	//} else {
	//	return false;
	//}
}

function errorMSG()	{
	alert("Error de envio:"+id);
}

function formularioEnviado()	{
	//alert("listo");
	$("errCampos").style.display = "none";
	$("tabla").style.display= "none";
	$("gracias").style.display = "";
	
	

	
}

function solicitarEmpleo()	{
	var err=0;
	
	if($("emailEmpleo").value == "") {
	$("errCamposEmpleo").style.display = "";
	$("emailEmpleo").style.backgroundColor= "#FFD9D9"
	$("emailEmpleo").focus();
	err=1;
	} else {
		if(emailCheck($("emailEmpleo").value) == false)	{
		$("errCamposEmpleo").style.display = "";
		$("emailEmpleo").style.backgroundColor= "#FFD9D9"
		$("emailEmpleo").focus();
		err=1;
		}
	}
	
	if($("telefonoEmpleo").value == "") {
	$("errCamposEmpleo").style.display = "";
	$("telefonoEmpleo").style.backgroundColor= "#FFD9D9"
	$("telefonoEmpleo").focus();
	err=1;
	}
	
	if($("nombreEmpleo").value == "") {
	$("errCamposEmpleo").style.display = "";
	$("nombreEmpleo").style.backgroundColor= "#FFD9D9"
	$("nombreEmpleo").focus();
	err=1;
	}
	
	if (err!=1)	{
		
		var valores = $("formaEmpleo").serialize();
		$Ajax("solicitaEmpleo.asp",
			{metodo: $metodo.POST,
			divCargando: "divCargando",
			parametros: valores,
			onfinish: formularioEnviadoEmpleos});
	}
	
	//if (err!=1)	{
	//	return true;
	//} else {
	//	return false;
	//}
}

function formularioEnviadoEmpleos()	{
	Modalbox.hide()
}
<!-- Begin
function emailCheck(txt) {
//txt=document.isn.email.value;
if (txt.indexOf("@")<3){
	//alert("Lo siento, la cuenta de correo parece errónea. Por favor, "
	//+" comprueba el prefijo y el signo '@'.");
	return false;
}
if ((txt.indexOf(".com")<5)&&(txt.indexOf(".org")<5)&&(txt.indexOf(".tv")<5)
&&(txt.indexOf(".gov")<5)&&(txt.indexOf(".net")<5)&&(txt.indexOf(".gob")<5)
&&(txt.indexOf(".mil")<5)&&(txt.indexOf(".edu")<5)){
	//alert("Lo siento. Pero esa cuenta de correo parece errónea. Por favor,"
	//+" comprueba el sufijo (que debe incluir alguna terminación como: "
	//+".com, .edu, .net, .org, .gov o .mil)");
	return false;
   }
	//return alert("La dirección es (aparentemente) correcta");
return true;
}
// End -->
function abrirHelp()	{
	alert("Estamos mejorando el sistema de CHAT \nPronto lo tendremos en línea\n\nPuede ponerse en contacto con nostros al: \nTeléfono: (55)5233-6600\nEmail: ventas@abarden.com");
}