
function validacion_agente ()
{	

// FORMULARIO AGENTE 

	if(window.document.form3.nombre.value=="")
	{
	   alert("Ingrese su nombre"); 
       window.document.form3.nombre.focus(); 
       return; 
    } 
	if(window.document.form3.domicilio.value=="")
	{
	   alert("Ingrese su domicilio"); 
       window.document.form3.domicilio.focus(); 
       return; 
    }
	
	var1 = parseInt(window.document.form3.fono.value, 10)   
	if(window.document.form3.fono.value == "")
	{
		alert("Por favor ingrese su telefono");
		window.document.form3.fono.focus();
		return;
	}
	else
	    	 //valida que sean numeros   
    	if ( isNaN(var1)  ) 
		{   
        	alert("Solo valores numericos, en el campo Telefono")   
        	return true;
		}
	
	var2 = parseInt(window.document.form3.movil.value, 10)   
	if(window.document.form3.movil.value == "")
	{
		alert("Por favor ingrese su telefono movil");
		window.document.form3.movil.focus();
		return;
	}
	else
	    	 //valida que sean numeros   
    	if ( isNaN(var2)  ) 
		{   
        	alert("Solo valores numericos, en el campo Movil")   
        	return true;
		}
	
	if(window.document.form3.correo.value=="")
	{
		alert("Por favor ingrese su direccion e-mail."); 
		window.document.form3.correo.focus();return;
	}

	if (window.document.form3.correo.value.indexOf('@', 1) == -1 || window.document.form3.correo.value.indexOf('.', window.document.form3.correo.value.indexOf('@', 0)) == -1) 
	{
		alert("Direccion de e-mail invalida."); 
		window.document.form3.correo.focus(); return;
	}	
	window.document.form3.submit();	

}	
	
	
//FORMULARIO CONTATISTA	
function validacion_contratista ()
{	

	if(window.document.form4.nombre.value=="")
	{
	   alert("Ingrese su nombre"); 
       window.document.form4.nombre.focus(); 
       return; 
    } 
	if(window.document.form4.domicilio.value=="")
	{
	   alert("Ingrese su domicilio"); 
       window.document.form4.domicilio.focus(); 
       return; 
    }
	
	var1 = parseInt(window.document.form4.fono.value, 10)   
	if(window.document.form4.fono.value == "")
	{
		alert("Por favor ingrese su telefono");
		window.document.form4.fono.focus();
		return;
	}
	else
	    	 //valida que sean numeros   
    	if ( isNaN(var1)  ) 
		{   
        	alert("Solo valores numericos, en el campo Telefono")   
        	return true;
		}
	
	var2 = parseInt(window.document.form4.movil.value, 10)   
	if(window.document.form4.movil.value == "")
	{
		alert("Por favor ingrese su telefono movil");
		window.document.form4.movil.focus();
		return;
	}
	else
	    	 //valida que sean numeros   
    	if ( isNaN(var2)  ) 
		{   
        	alert("Solo valores numericos, en el campo Movil")   
        	return true;
		}
	
	if(window.document.form4.correo.value=="")
	{
		alert("Por favor ingrese su direccion e-mail."); 
		window.document.form4.correo.focus();return;
	}

	if (window.document.form4.correo.value.indexOf('@', 1) == -1 || 
	window.document.form4.correo.value.indexOf('.', window.document.form4.correo.value.indexOf('@', 0)) == -1) 
	{
		alert("Direccion de e-mail invalida."); 
		window.document.form4.correo.focus(); return;
	}	
		
	
		
	

window.document.form4.submit();
}

	
	
//FORMULARIO RESERVA ON LINE
function validacion_reserva_online ()
{	

	if(window.document.form2.nombre.value=="")
	{
	   alert("Ingrese su nombre"); 
       window.document.form2.nombre.focus(); 
       return; 
    } 
	if(window.document.form2.correo.value=="")
	{
		alert("Por favor ingrese su direccion e-mail."); 
		window.document.form2.correo.focus();return;
	}

	if (window.document.form2.correo.value.indexOf('@', 1) == -1 || 
	window.document.form2.correo.value.indexOf('.', window.document.form2.correo.value.indexOf('@', 0)) == -1) 
	{
		alert("Direccion de e-mail invalida."); 
		window.document.form2.correo.focus(); return;
	}	
		
	if(window.document.form2.empresa.value=="")
	{
	   alert("Ingrese su empresa"); 
       window.document.form2.empresa.focus(); 
       return; 
    } 
	
	var5 = parseInt(window.document.form2.fono.value, 10)   
	if(window.document.form2.fono.value == "")
	{
		alert("Por favor ingrese su telefono");
		window.document.form2.fono.focus();
		return;
	}
	else
	    	 //valida que sean numeros   
    	if ( isNaN(var5)  ) 
		{   
        	alert("Solo valores numericos, en el campo Telefono")   
        	return true;
		}
	
	var6 = parseInt(window.document.form2.movil.value, 10)   
	if(window.document.form2.movil.value == "")
	{
		alert("Por favor ingrese su telefono movil");
		window.document.form2.movil.focus();
		return;
	}
	else
	    	 //valida que sean numeros   
    	if ( isNaN(var6)  ) 
		{   
        	alert("Solo valores numericos, en el campo Movil")   
        	return true;
		}

	window.document.form2.submit();
}



