function validate_review(frm) { if(ncis_empty(frm.ncname.value)) { alert('Please specify name'); frm.ncname.focus(); return (false); } if(!ncis_empty(frm.ncemail.value) && (!emailCheck( frm.ncemail.value) )) { frm.ncemail.focus(); return (false); } if(ncis_empty(frm.image_code.value)) { alert("Please specify validation code"); frm.image_code.focus(); return(false); } return true; } function validate_report(form) { if(!ncis_empty(form.ncemail.value) && (!emailCheck( form.ncemail.value) )) { form.ncemail.focus(); return (false); } if(ncis_empty(form.image_code.value)) { alert("Please specify validation code"); form.image_code.focus(); return(false); } return true; } function validate_contactus(form) { if (ncis_empty(form.fname.value)) { alert('Please Specify First Name!'); form.fname.focus(); return false; }else if(form.fname.value.match(/[&<>]+/)) { alert("Please remove Invalid characters from First Name (e.g. & < >)"); form.fname.focus(); return(false); } if(ncis_empty(form.lname.value)) { alert('Please Specify Last Name!'); form.lname.focus(); return false; }else if(form.lname.value.match(/[&<>]+/)) { alert("Please remove Invalid characters from Last Name (e.g. & < >)"); form.lname.focus(); return(false); } if(!form.email.value.match(/[a-zA-Z\.\@\d\_]/)) { alert('Invalid e-mail address.'); form.email.focus(); return false; }else if (!emailCheck (form.email.value) ) { form.email.focus(); return (false); }else if(form.email.value.match(/[&<>]+/)) { alert("Please remove Invalid characters from Email (e.g. & < >)"); form.email.focus(); return(false); } if(form.url.value.match(/[&<>]+/)) { alert("Please remove Invalid characters from URL (e.g. & < >)"); form.url.focus(); return(false); } if (ncis_empty(form.title.value)) { alert('Please Specify Subject.'); form.title.focus(); return false; }else if(form.title.value.match(/[&<>]+/)) { alert("Please remove Invalid characters from Subject (e.g. & < >)"); form.title.focus(); return(false); } if (ncis_empty(form.comments.value)) { alert('Please Specify Comments/Feedback.'); form.comments.focus(); return false; }else if(form.comments.value.match(/[&<>]+/)) { alert("Please remove Invalid characters from Comments/Feedback (e.g. & < >)"); form.comments.focus(); return(false); } if(ncis_empty(form.image_code.value)) { alert("Please specify validation code"); form.image_code.focus(); return(false); } return true; }