// JavaScript Document
// Only script specific to this form goes here.
// General-purpose routines are in a separate file.
  function validateOnSubmit() {
    var elem;
    var errs=0;
    // execute all element validations in reverse order, so focus gets
    // set to the first one in error.
    if (!validatePresent(document.forms.frmSubscribe.txtCaptcha,  'inf_captcha'))        errs += 1; 
    if (!validateConfirm(document.forms.frmSubscribe.cboTerms,  'inf_terms'))        errs += 1; 
    if (!validatePresent(document.forms.frmSubscribe.txtPhone,  'inf_phone'))        errs += 1; 
    if (!validatePresent(document.forms.frmSubscribe.txtPassword,  'inf_password'))        errs += 1; 
    if (!validateEmail  (document.forms.frmSubscribe.txtEmail, 'inf_email', true)) errs += 1; 
    if (!validatePresent(document.forms.frmSubscribe.txtLastName,  'inf_lastname'))        errs += 1; 
    if (!validatePresent(document.forms.frmSubscribe.txtFirstName,  'inf_firstname'))        errs += 1; 
	
    if (errs>1)  alert('There are fields which need correction before sending');
    if (errs==1) alert('There is a field which needs correction before sending');

    return (errs==0);
  };