var errfound = false;
function ValidLength(item, len) {
   return (item.length >= len);
}
function ValidEmail(item) {
   if (!ValidLength(item, 5)) return false;
   if (item.indexOf ('@', 0) == -1) return false;
   return true;
}
function error(elem, text) {
   if (errfound) return;
   window.alert(text);
   elem.select();
   elem.focus();
   errfound = true;
}
function Validate() {
   errfound = false;
   if (!ValidLength(document.mailinglist.name.value,2))
      error(document.mailinglist.name.value,"Please fill in your name.");
   if (!ValidEmail(document.mailinglist.email.value))
      error(document.mailinglist.email, "Please fill in a valid e-mailaddress.");
   return !errfound;
}

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
name = document.mailinglist.name.value;
email = document.mailinglist.email.value;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
url = mypage + "?name=" + name + "&email=" + email;
win = window.open(url, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}