//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 checkPhone (strng) {
var error = "";
if (strng == "") {
   error = "Please enter your Tel 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;
}

// Company
function checkCompany(strng) {
var error = "";
  if (strng.length == 0) {
    error = "Please enter your Company.\n"
//error = "Please enter your billing address.\n"
  }
return error;	  
}


//Name
function checkName(strng) {
var error = "";
  if (strng.length == 0) {
    error = "Please enter your Name.\n"
  }
return error;	  
}

//Check Address
function checkAddress(strng) {
var error = "";
  if (strng.length == 0) {
  error = "Please enter your Address.\n"
  }
return error;	  
}
//checkMailAdd
function checkMailAdd(strng) {
var error = "";
  if (strng.length == 0) {
  error = "Please enter your Mailing Address.\n"
  }
return error;	  
}


//Check Country
function checkCountry(strng) {
var error = "";
  if (strng.length == 0) {
  error = "Please enter your Country.\n"
  }
return error;	  
}


function checkCheckBox2(productinfo){

var error = "";
   if (productinfo == 0) {
       error = "Please choose which products you would like to request information for.";
    }
return error;
}
