<!-- Code after this will be ignored by older browsers
function validate_form() {
  validity = true; // assume valid
  <!--if (!check_empty(document.form.realname.value)) -->
  <!--      { validity = false; alert('Name field is empty!'); } -->
  if (!check_empty(document.form.JOB.value))
        { validity = false; alert('Job Title field is empty!'); }	
  if (!check_empty(document.form.COMPANY.value))
        { validity = false; alert('Company field is empty!'); }		
 <!-- if (!check_email(document.form.email.value)) -->
 <!--       { validity = false; alert('Email address is invalid!'); } -->
  if (!check_empty(document.form.DETAILS.value))
        { validity = false; alert('Details field is empty!'); }
  if (validity)
      validity = true;
        alert ("Needed entries have been verified. "
                + "Your form is now being passed to your browser's ["
				+ document.form.recipient.value 
                + "]Mail Delivery Sub-System.");
  return validity;
}

function check_empty(text) {
  return (text.length > 0); // returns false if empty
}

function check_email(address) {
  if ((address == "")
    || (address.indexOf ('@') == -1)
    || (address.indexOf ('.') == -1))
      return false;
  return true;
}

function check_url(address) {
  if ((address == "")

    || (address.indexOf ('http://') == -1)
    || (address.indexOf ('.') == -1))
      return false;
  return true;
}

function ValidSurname (name, chirp)
  { var okay = true;
    if (name.value.length < 2)  
          okay = false;
    if ( (! okay) && chirp )
         { alert ("Hmm. '"
                  + name.value
                  + "' - a very strange surname. Try again!");
           name.select();
           name.focus();
         };
    return okay;
  }

function ValidText (name, chirp)
  { var okay = true;
    if (name.value.length < 1)  
          okay = false;
    if ( (! okay) && chirp )
         { alert ("Hmm. '"
                  + name.value
                  + "' - a very strange surname. Try again!");
           name.select();
           name.focus();
         };
    return okay;
}

function ValidEmail (addr, chirp)
  { var fail = false;
    if (addr.value.length == 0) return false;
    var atpos = addr.value.indexOf('@',0);
    if( (addr.value.length < 5) || (atpos == -1)  )
        fail = true;              // too short or no '@'
    if (! fail)
       { if (addr.value.indexOf('.',atpos) == -1)
            fail = true;          // no '.' in address after the @
       };
    if ( (fail) && (chirp) )
        { alert ("Warning!\n The email address "
                 + addr.name
				 + addr.value
                 + " is invalid!");
          addr.select();
          addr.focus();
        };
    return (! fail);
  }
  
 function CheckInput (thisform)
  { var errors = 0;                             //error count
    var duditem = "";                           //remember where it failed!
    var message = "\n";                         //error message

  if (! ValidEmail (thisform.email, false) )
        { errors ++;
		  duditem = thisform.email;
          message += "Your email address is invalid!\n"; 
        };

  if (! ValidText (thisform.name1, false) )
        { if (errors == 0) {
		    duditem = thisform.name1;
		  }
		  errors ++;
          message += "Your name appears blank!\n"; 
        };
		
  if (! ValidText (thisform.telephone, false) )
    	{ if (errors == 0) {
		    duditem = thisform.telephone;
		  }
		  errors ++;
          message += "Your telephone number appears blank!\n"; 
        };

  if (errors == 0)
     { if ( ! confirm ("Dear "
                   + thisform.name1.value + " "
                   + "\nYour form is about to submitted."
                   + "\n Are you sure you want to do this?" ) )
           { errors ++; };
     } else
     { message += "\nPlease FIX THIS AND RETRY\n(Click on OK, fix errors)!";
       if (errors == 1)
           { alert  ("There was an error in your submission\n"
                     + message);
           } else
           { alert ("There were errors in your form\n" + message);
           };
       duditem.select();
       duditem.focus();
     };

  if (errors != 0) return (false);
  return (true);      
  }

// Stop Hiding Code Here -->
