// JavaScript Document

function validate_form()
{
	if(document.getElementById("name").value == "")
	{
	alert("Please insert your Name");	
	document.getElementById("name").focus();
	return false;
	}
	
		if(document.getElementById("email").value == "")
	{
	alert("Please insert your E-mail");	
	document.getElementById("email").focus();
	return false;			
	}
	else{
	if(validarEmail(document.getElementById("email").value) == "no")
	{
	alert("Please insert your E-mail the following way name@domain.com");	
	document.getElementById("email").focus();
	return false;	
	}
	}
	
		if(document.getElementById("phone").value == "")
	{
	alert("Please insert your Phone");	
	document.getElementById("phone").focus();
	return false;
	}
	
    document.form1.action = "contactus.asp";
    document.form1.submit();
}



function validarEmail(valor) {
    if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor)){
    } 
	else {
   return ("no");
  }
 }