
function validateEmail(email) {
	var matches = email.match(/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/);
	return (matches != null && email == matches[0]);
}
function strTrim(str){
  str=str.replace(/(^\s*)|(\s*$)/g, "");
  if (str.length==0){
    return false;
  }
  return true;
}
function validateTelepnone(Number){
    var stripped = Number.replace(/[\(\)\.\-\ ]/g, '');
//strip out acceptable non-numeric characters
   if (isNaN(parseInt(stripped))){ 
     return false;
   }	 
   return true;
} 
function checkForm(){
  if( !strTrim(document.all['First_Name'].value) || !strTrim(document.all['Last_Name'].value) || !validateEmail(document.all['email'].value) ||  !validateTelepnone(document.all['Phone_Number'].value)  ){
    alert(' The fields indicated with an astrisk (*) \n are required and valid Email address.');
    return false;
  }
return true;
}
function checkFormNew(){
  if( !strTrim(document.all['First_name'].value) || !strTrim(document.all['Last_name'].value) || !strTrim(document.all['Company'].value) || !validateEmail(document.all['Email'].value)  ){
    alert(' The fields indicated with an astrisk (*) \n are required and valid Email address.');
    return false;
  }
return true;
}