    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);


    function RetornaTamanhoFonte()
    {
      if (is_nav2 || is_nav3 || is_nav4)
      {
          return "-1"
      }
      else
      {
          return "-1"
      }
    }

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
}

function validEmail(email) {
   invalidChars = " /:,;"


   if (email == "") {  // nao pode ser vazio
      return false
   }

   for (i = 0; i < invalidChars.length; i++) {  // contem algum char invalido
      badChar = invalidChars.charAt(i)
      if (email.indexOf(badChar, 0) > -1) {
         return false
      }
   }

   atPos = email.indexOf("@", 1)  // deve haver um simbolo "@"
   if (atPos == -1) {
      return false
   }

   if (email.indexOf("@", atPos + 1) != -1) {  // e somente um simbolo "@"
      return false
   }

   if (email.charAt(atPos - 1) == "") {  // e algo antes de "@"
      return false
   }

   periodPos = email.indexOf(".", atPos)  // e pelo menos um "." apos "@"
   if (periodPos == -1) {
      return false
   }

   if (periodPos+3 > email.length) { // deve haver pelo menos 2 chars apos "."
      return false
   }

   return true
}

