// JavaScript Document
function validacion() {
    valor1 = document.getElementById("company").value;
    valor2 = document.getElementById("jobt").value;
    valor3 = document.getElementById("fname").value;
    valor4 = document.getElementById("lname").value;
    valor5 = document.getElementById("city").value;
    valor6 = document.getElementById("country").value;
    valor7 = document.getElementById("zipcode").value;
    valor8 = document.getElementById("phone").value;
    valor9 = document.getElementById("email").value;
    if( valor1 == null || valor1.length == 0 || /^\s+$/.test(valor1) ) {
            alert('[ERROR] Los campos marcados con * son obligatorios');
            return false;
    }
    if( valor2 == null || valor2.length == 0 || /^\s+$/.test(valor2) ) {
            alert('[ERROR] Los campos marcados con * son obligatorios');
            return false;
    }
    if( valor3 == null || valor3.length == 0 || /^\s+$/.test(valor3) ) {
            alert('[ERROR] Los campos marcados con * son obligatorios');
            return false;
    }
    if( valor4 == null || valor4.length == 0 || /^\s+$/.test(valor4) ) {
            alert('[ERROR] Los campos marcados con * son obligatorios');
            return false;
    }
    if( valor5 == null || valor5.length == 0 || /^\s+$/.test(valor5) ) {
            alert('[ERROR] Los campos marcados con * son obligatorios');
            return false;
    }
    if( valor6 == null || valor6.length == 0 || /^\s+$/.test(valor6) ) {
            alert('[ERROR] Los campos marcados con * son obligatorios');
            return false;
    }
    if (isNaN(valor7)) {
            alert('[ERROR] El campo Zip Code solo acepta valores Numericos');
            return false;
   }
    if( valor8 == null || valor8.length == 0 || /^\s+$/.test(valor8) ) {
            alert('[ERROR] Los campos marcados con * son obligatorios');
            return false;
    }
    if( !(/\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/.test(valor9)) ) {
            alert('[ERROR] La direccion de Email no es valida');
            return false;
    }
}
