function echeck(str) {
var at="@";var dot=".";var lat=str.indexOf(at);var lstr=str.length;if(str.indexOf(at)==-1){return false;}
if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr){return false;}
if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr){return false;}
if(str.indexOf(at,(lat+1))!=-1){return false;}
if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot){return false;}
if(str.indexOf(dot,(lat+2))==-1){return false;}
if(str.indexOf(" ")!=-1){return false;}
return true;}

function validate(support)
{
 if ( support.contactperson.value == '' )
 {
  alert("You must enter your Full Name");
  return false;
 }
 else if ( support.country.value == '' )
 {
  alert("You must enter your Country");
  return false;
 }
  else if ( echeck(support.email.value) == false )
 {
  alert("You must enter your Email Address");
  return false;
 }
   else if ( support.problem.value == '' )
 {
  alert("Please type your message to send");
  return false;
 }
  else if (support.yest.value.toLowerCase() != 'yes')
 {
  alert("Please type YES without quotes if all information is correct");
  support.yest.style.background="#ff8080";
  return false;
 }

 return true;
}


