
function popwin(url) {
  win = window.top.open(url,'tntweb_popwin','width=400,height=300,resize,scrollbars=yes,toolbar=no,status=no,resizable=yes,menubar=no,location=no');
  win.creator = self;
  win.focus();
  return (win == null);
}

// JavaScript function to check a string as a "clean" e-mail
// address.
// The e-mail address is required to have an '@' and at least one
// dot (".") in the post-@ part of the name.  In addition, the only
// characters allowed are [a-zA-Z0-9.,-_]
//
// by Brian Casey, bcasey@imagiware.com
// Copyright 1996, Imagiware, Inc. and Brian Casey
// 25 Oct 96
function parseEmail(email) { 
   var i,c;

   // First check for bad characters
   for (i=0; i<email.length; i++) { 
      c = email.charAt(i);
      // This was easier to write as a positive if and JS has no "unless"
      if ( (c >= "a" && c <= "z") || 
           (c >= "A" && c <= "Z") ||
           (c >= "0" && c <= "9") ||
           (c == "@" || c == "." || c == "-" || c == "_") ) { 
         ;
      } else { 
         // Found a bad character
         alert ("The e-mail address '"+email+
                "' appears to have bad characters.");
         return false;
      }
   }

   // Now make sure it looks like <string>@<string>.<string>
   if (email.indexOf("@") < 0) {
      alert ("The e-mail address '"+email+"' doesn't seem properly formed.");
      return false;
   } else {
      var domain=email.substring(email.indexOf("@")+1,email.length-1);
      if (domain.indexOf(".") < 0) {
         alert ("The e-mail address '"+email+"' doesn't seem properly formed.");
      return false;
      }
   }

   // Everything looks okay
   return true;

}

