function Trim(str) {
  str = str.replace(/^[ ]+/,"");return str.replace(/[ ]+$/,"");
}

function isEmail(em) {
  if (em.search(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/)!=-1) return true; else return false;
}

function check_it(f) {
	if (Trim(f['full_name'].value)=="") {
		alert("Please enter your full name");
		return false;
	}
	if (!isEmail(f['p_email'].value)) {
		alert("Invalid e-mail address");
		return false;
	}
	return true;
}
