//Email
function checkEmail (strng) {
var error="";
if (strng == "") {
   error = "Please enter your Email Address.\n";
return error;
}
if (strng != "") {
   var emailFilter=/^.+@.+\..{2,3}$/;
   if (!(emailFilter.test(strng))) { 
      error = "Please enter a valid Email Address.\n";
    }
   else {
//test email for illegal characters
       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/;
         if (strng.match(illegalChars)) {
          error = "The Email Address contains illegal characters.\n";
     }  
 }
}
return error;    

}


// Tel

function checkContact (strng) {
var error = "";
if (strng == "") {
   error = "Please enter your Contact number.\n";
   return error;
}

var stripped = strng.replace(/[\(\)\.\-\ ]/g, ''); //strip out acceptable non-numeric characters
    if (isNaN(parseInt(stripped))) {
       error = "The Tel number contains illegal characters.\n";
  
    }
   // if (!(stripped.length == 8)) {
	//error = "The contact number is the wrong length.\n";
   // } 
return error;
}

// Tel

function checkYearsworked (strng) {
var error = "";
if (strng == "") {
   error = "Please enter the no of Years you worked.\n";
   return error;
}
return error;
}


//First Name
function checkFirstname(strng) {
var error = "";
  if (strng.length == 0) {
    error = "Please enter your First name.\n"
//error = "Please enter your billing address.\n"
  }
return error;	  
}

//LastName
function checkLastname(strng) {
var error = "";
  if (strng.length == 0) {
    error = "Please enter your Last name.\n"
//error = "Please enter your billing address.\n"
  }
return error;	  
}

//Check Address
function checkAddress(strng) {
var error = "";
  if (strng.length == 0) {
  error = "Please enter your Address.\n"
  }
return error;	  
}

//Check Company Name
function checkCompany(strng) {
var error = "";
  if (strng.length == 0) {
  error = "Please enter your Company Name.\n"
  }
return error;	  
}


//Check Company Name
function checkCompanyKind(strng) {
var error = "";
  if (strng.length == 0) {
  error = "Please enter the Kind of Company.\n"
  }
return error;	  
}

function checkAddress2(strng) {
var error = "";
  if (strng.length == 0) {
  error = "Please enter your Company Address.\n"
  }
return error;	  
}

//Postal Code
function checkPostalcode (strng) {
var error = "";
if (strng == "") {
   error = "Please enter your Postal code.\n";
   return error;
}

//var stripped = strng.replace(/[\(\)\.\-\ ]/g, ''); //strip out acceptable non-numeric characters
  //  if (isNaN(parseInt(stripped))) {
    //   error = "The Postal code contains illegal characters.\n";
  
    //}
   // if (!(stripped.length == 6)) {
	//error = "The postal code is the wrong length.\n";
   // } 
return error;
}

function checkDOB(strng) {
var error = "";
  if (strng.length == 0) {
    error = "Please enter your Date of Birth.\n"
  }
  if (strng.length > 10) {
    error = "Please enter your Date of Birth in DD/MM/YYYY format.\n"
  }
return error;	  
}

function checkGender(checkvalue) {
var error = "";
   if (!(checkvalue)) {
       error = "Please choose your Gender.\n";
    }
return error;
}

function checkStatus(checkvalue2) {
var error = "";
   if (!(checkvalue2)) {
       error = "Please choose your Marital Status.\n";
    }
return error;
}

function checkExperience(checkvalue3) {
var error = "";
   if (!(checkvalue3)) {
       error = "Please choose your Years of Experience.\n";
    }
return error;
}


function checkTypeofjob(checkvalue4) {
var error = "";
   if (!(checkvalue4)) {
       error = "Please choose your Type of Job.\n";
    }
return error;
}
// valid selector from dropdown list

function checkCountry(choice) {
var error = "";
    if (choice == 0) {
    error = "Please select your Country.\n";
    }    
return error;
}    

function checkQualification(choice) {
var error = "";
    if (choice == 0) {
    error = "Please select your Highest Qualification.\n";
    }    
return error;
}  

function checkCurrentjobCategory(choice) {
var error = "";
    if (choice == 0) {
    error = "Please select your Current Job Category.\n";
    }    
return error;
}   

function checkPosition(choice) {
var error = "";
    if (choice == 0) {
    error = "Please enter your the Position you sought.\n";
    }    
return error;
}   

function checkIncome(choice) {
var error = "";
    if (choice == 0) {
    error = "Please select your Current Job Income.\n";
    }    
return error;
}   
   

function checkPreferredjobCategory(choice) {
var error = "";
    if (choice == 0) {
    error = "Please select your Preferred Job Category.\n";
    }    
return error;
}

function checkBusiness(choice) {
var error = "";
    if (choice == 0) {
    error = "Please select your Company Business Nature.\n";
    }    
return error;
}   

//checkbox

function checkCheckBox(num){

var error = "";
   if (num == 0) {
       error = "Please choose your Options.\n";
    }
return error;
}


