function check_contact(elm){
		if(validate_email(elm.cemail)==false){
				elm.cemail.focus();
				return false;
		}
		if(elm.country.value=='' || elm.country.value==null){
				elm.country.focus();
				alert("***Please choose your country***");
				return false;
		}
		if(elm.address.value=="" || elm.address.value==null){
				elm.address.focus();
				alert("***Please type your address***");
				return false;
		}
		if(elm.subject.value=='' || elm.subject.value==null){
				elm.subject.focus();
				alert("***Please type your subject***");
				return false;
		}
		if(elm.message.value=='' || elm.message.value==null){
				elm.message.focus();
				alert("***Please type the message***");
				return false;
		}
		if(elm.confirmtext.value=="" || elm.confirmtext.value==null){
				elm.confirmtext.focus();
				alert("***Please type confirm text.***\n");
				return false;
		}
		if(elm.verinum.value!=elm.confirmtext.value){
				elm.confirmtext.focus();
				alert("***Incorrect confirm text***");
				return false;
		}
return true;
}
function validate_email(fields) {
    if(-1 == fields.value.indexOf("@")) { 
       fields.focus(); 
       alert("Your email must have a '@'."); 
       return false; 
       }
    if(-1 != fields.value.indexOf(",")) { 
       fields.focus(); 
       alert("Your email must not have a ',' in it"); 
       return false; 
       }
    if(-1 != fields.value.indexOf("#")) { 
       fields.focus(); 
       alert("Your email must not have an '#' in it." ); 
       return false; 
       }
    if(-1 != fields.value.indexOf("!")) { 
       fields.focus(); 
       alert("Your email must not have a '!' in it." ); 
       return false; 
       }
    if(-1 != fields.value.indexOf(" ")) { 
       fields.focus(); 
       alert("Your email must not have a space in it." ); 
       return false; 
       }
    if(fields.value.length == (fields.value.indexOf("@")+1) ) {
       fields.focus();
       alert("Your email must have a domain name after the '@'.");
       return false;
       }

    if(fields.value.length == 0) { 
      fields.focus(); 
      alert("Please input your valide email address."); 
      return false; 
      }
	  
	if(fields.value.length == 0) { 
      fields.focus(); 
      alert("Please input your valide email address."); 
      return false; 
      }
    return true;
 }
