function validate(frm) {
	var re;
        if (frm.email.value == '' ) {
           alert('Please enter your email address.');
           return false;
        }
        re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/i;
        if (frm.email.value.match(re) == null) {
          alert('Invalid email address.');
          return false;
        }
	re = /^www\./i;
	if (frm.email.value.match(re) != null ) {
	  alert('Your email address should not contain "www." (only the part after "www.")');
	  return false;
	}
	if (frm.captcha.value.length != 4) {
	    alert('Please enter the security code shown in the image.');
	    return false;
	}
	re = /^[a-z0-9]+$/i;
	if (frm.captcha.value.match(re) == null) {
            alert('Please enter the security code shown in the image.');
            return false;
	}
}
