function CheckForm()
{
  var Email = new String;
  Email = document.forms[0].Email.value;

  if(document.forms[0].Name.value == "") {
     window.alert("Please enter your Name and send again");
     document.forms[0].Name.focus();
     return false;
  }
 
  if(document.forms[0].address.value == "") {
     window.alert("Please enter your Address and send again");
     document.forms[0].address.focus();
     return false;
  }
if(document.forms[0].country.value == "") {
     window.alert("Please enter your Country and send again");
     document.forms[0].country.focus();
     return false;
  }
  if (Email == "")  {
     window.alert("Please fill the e-mail address");
     document.forms[0].Email.focus();
     return false;
  }
  
  else {
   
     if (!IsSign("@", Email)) {
        window.alert("The email that you have entered is wrong format. Please use correct e-mail. eg:admin@homeplanprofessional.com");  
        document.forms[0].Email.focus();
        return false;
     }
     if (!IsSign(".", Email)) {
        window.alert("The email that you have entered is wrong format. Please use correct e-mail. eg: name@domain.com");  
        document.forms[0].Email.focus();
        return false;
     }  
	 if(document.forms[0].phone.value == "") {
     window.alert("Please enter your Phone Number and send again");
     document.forms[0].phone.focus();
     return false;
  }
  if(document.forms[0].comments.value == "") {
     window.alert("Please enter your Comments and send again");
     document.forms[0].comments.focus();
     return false;
  }
     return true;
  }
}

function IsSign(symbol, str)
{
   var l = str.length;

   for (var i = 0; i <= l; i++)  
     if (str.charAt(i) == symbol)  return true;
  return false;
}

