isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
NS4 = (document.layers) ? true : false;
IEmac = ((document.all)&&(isMac)) ? true : false;
IE4plus = (document.all) ? true : false;
IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;
IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
ver4 = (NS4 || IE4plus) ? true : false;
NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {this.className+=" over";}
node.onmouseout=function() {this.className=this.className.replace(" over", "");}
}}}}
SafeAddOnload(startList);

var gSafeOnload = new Array();
function SafeAddOnload(f){
  if (IEmac && IE4)	{window.onload = SafeOnload;gSafeOnload[gSafeOnload.length] = f;}
	else if (window.onload){
		if (window.onload != SafeOnload){gSafeOnload[0] = window.onload;window.onload = SafeOnload;}		
		gSafeOnload[gSafeOnload.length] = f;
	}
	else window.onload = f;
}
function SafeOnload(){for (var i=0;i<gSafeOnload.length;i++) gSafeOnload[i]();}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val.value=="") {
		errors += "no email entered";
	}
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } 
  if (errors) {alert('Ooops!\nYou seem to have mistyped your email address.')
  
  }else{
  signupWindow = window.open('','signup','width=430,height=600,scrollbars=yes');
  signupWindow.document.write("<html><head><title>Processing subscription</title></head><p style='font-family: Arial, Helvetica, sans-serif; font-size: 12px;'>processing...</p>");
  };
  document.MM_returnValue = (errors == '');
}
