userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);

   function validForm(userForm) {
      if (document.subscriberForm.name.value == '') {
         alert("Please enter your name");
         return false;
      }

      if (document.subscriberForm.tel.value == '') {
         alert("Please enter your telephone number");
         return false;
      }

      if (document.subscriberForm.email.value == '') {
         alert("Please enter an e-mail address,\nWe need your e-mail address to put you on the list");
         return false;
      }

      if (!validEmail(document.subscriberForm.email.value)) {
         alert("This doesn't appear to be a valid e-mail address,\nWe need your e-mail address to put you on the list");
         return false;
      }

      if (document.subscriberForm.job.value == '') {
         alert("Please enter your Job title");
         return false;
      }

      if (document.subscriberForm.publication.value == '') {
         alert("Please enter your Publication name");
         return false;
      }
   }

   function validEmail(email) {
      invalidChars = " /:,;";

      if (email == "") {
         return false;                           // cant be just spaces
      }

      for (i=0; i<invalidChars.length; i++) {   // are there any invalid characters
         badChar = invalidChars.charAt(i);
         if (email.indexOf(badChar,0) > -1) {
            return false;
         }
      }
      atPos = email.indexOf("@",1);              // there must be only one "@" sign
      if (atPos == -1) {
         return false;
      }
      if (email.indexOf("@",atPos+1) != -1) {    // only one "@" symbol please
         return false;
      }
      dotPos = email.indexOf(".",atPos);
      if (dotPos == -1) {                        // one "." after the "@"
         return false;
      }
      if (dotPos+3 > email.length) {             // must be at least 2 chars after the "."
         return false;
      }
      return true;
   }

   function isNum(passedVal) {

      if (passedVal == "") {
         return false;
      }
      for (i=0; i<passedVal.length; i++) {
         if (passedVal.charAt(i)<'0') {
            return false;
         }
         if (passedVal.charAt(i)>'9') {
            return false;
         }
       }
       return true;
   }

