function stat(txt) { window.status = txt }

function fnPopUp(OpenURL) {
      nwin=window.open(OpenURL,'displayWindow','toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=yes,width=700,height=250');
      //nwin.window.focus();
}

function rmFramer(topURL) {
      // This code removes unwanted frames
      if (top.frames.length > 1) {
         top.location=topURL;
      }
}

function wrtBaseMeta(baseURL) {
      document.write( '<BASE href="' + baseURL + '">' )
}


function NS4reloadFix() {
      NS4rlf = document.layers;
      if (NS4rlf) {
         origWidth = innerWidth;
         origHeight = innerHeight;
         onresize = reDo;
      }
}

function reDo() {
      if (innerWidth != origWidth || innerHeight != origHeight) {
         location.reload();
      }
}

function GetQS() {
      endnote=""
      if ((((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4)) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)))) {
         if (self.location.href.indexOf("?") !=-1) {
            endnote=self.location.href.substring(self.location.href.indexOf("?") + 1,self.location.href.length);
         }
      }
      return endnote;
}

function rtdl(sVer,sEm) {
      if ((sVer == '') || (sVer == null)) {
         location.href="cgi-bin/rt3dlist.exe";
      } else if (((sEm == '') || (sEm == null)) && ((GetQS() == '') || (GetQS()=='x'))) {
         location.href="cgi-bin/rt3dlist.exe?" + sVer;
      } else if ((sEm == '') || (sEm == null)) {
         location.href="cgi-bin/rt3dlist.exe?" + sVer + "::" + GetQS();
      } else {
         location.href="cgi-bin/rt3dlist.exe?" + sVer + "::" + sEm;
      }
}

function updinfo() {
         if (document.dlemfrm.email.value !='') {
            document.upinfrm.oldemail.value = document.dlemfrm.email.value;
            document.upinfrm.submit();
         }
}

function rtdownback() {
         if (document.frmUserInfo.email.value !='') {
            document.frmBackToDown.email.value = document.frmUserInfo.email.value;
         }
         document.frmBackToDown.submit();
}

function pickstate(idx) {
         if ((idx >= 0) && (idx < 72)) {
            document.frmUserInfo.state.options[idx].selected = true;
         }
}

function pickcountry(idx) {
         if ((idx >= 0) && (idx < 250)) {
            document.frmUserInfo.country.options[idx].selected = true;
         }
}


//Run these functions now

NS4reloadFix();

rmFramer();

