// Example 3. The following example takes the user back x entries in the history list:
// <A HREF="javascript:history.go(-1 * x)">Click here</A>

function fingr(fname) {
   var nameList = "" ;
   var uname = "" ;
   var udom = "" ;
   var urlFinger = "http://www.cs.indiana.edu/finger/" ;
   pattern = /@/ ;
   nameList = fname.username.value.split (pattern) ;
   uname = nameList[0] ;
   udom = nameList[1] ;
   if ((udom != "undefined") && (udom != "")) {
      urlFinger += udom + "/" ;
      if ((uname != "undefined") && (uname != "")) {
         urlFinger += uname + "/w" ;
      }
   }
   fingerWindow = window.open(urlFinger,'_blank','toolbar,location,directories=0,status,menubar=0,scrollbars,resizable');
} // end fingr

function altawww(wwwitem) {
   wwwitem.q.value = wwwitem.q.value.toLowerCase()
   altaBase = "http://altavista.digital.com/cgi-bin/query?pg=" + "q&what=web&kl=XX&fmt=.&q=%2Bhost:" ;
   altaSrch = altaBase + wwwitem.q.value ;
   altaWindow=window.open(altaSrch,'_blank','toolbar,location,directories=0,status,menubar=0,scrollbars,resizable');
} // end altawww

function consnl(ipaddr) {
   var conswno = "" ;
   var conshunt = "" ;
   var server = "" ;
   var consfront = "" ;
   var consend = "" ;
   consfront = "http://Network-Tools.com/" ;
   consmid = ipaddr.hidmethod.value
   constarg = ipaddr.host.value
   if (ipaddr.bten.checked) {
      consmid += "&base=YES" }
   consend = "/default.asp?prog=" + consmid + "&B2=Submit&server=rs.internic.net&shared=ON&dnsn=N&rootserver=c&host=" + constarg + "&domain=" + constarg ;
//   if (ipaddr.serverno.options[0].selected) {
//      server = "1"}
//   if (ipaddr.serverno.options[1].selected) {
//      server = "2"}
//   if (ipaddr.serverno.options[2].selected) {
//      server = "3"}
//   if (ipaddr.serverno.options[3].selected) {
//      server = "4"}
//   if (ipaddr.serverno.options[4].selected) {
//      server = "5"}
   conswno = "ConsumerNet" + server + ipaddr.hidmethod.value ;
//   conshunt = consfront + server + consend + ipaddr.host.value ;
   conshunt = consfront + consend ;
   consWindow = window.open(conshunt,conswno,'toolbar,location,directories=1,status,menubar=1,scrollbars,resizable');
} // end consnl

function openNote(notename) {
   noteWin = window.open(notename,'_blank','toolbar=0,location=no,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=550,height=300');
} // end openNote

function spComplaint(notename) {
   ComplaintWin = window.open(notename,'spComplaint','toolbar=0,location=no,directories=0,status=0,menubar=1,scrollbars=0,resizable=0,width=550,height=250');
//   ComplaintWin.document.open();
//   ComplaintWin.document.write("<head><title>'Example complaint - Copy & Paste as required'</title></head>");
//   ComplaintWin.document.close();
} // end spComplaint

function openISP() {
   ISPWin = window.open('http://www.csn.net/~fjlawson/addr_table.htm','ISPlist','toolbar=1,location=no,directories=0,status=1,menubar=1,scrollbars=1,resizable=1');
} // end openISP

function ISPandComplaint() {
    openISP()
    spComplaint('spamnote.html')
} // end ISPandComplaint

function openWin(url) {
   PopUpWin = window.open(url,'newWin','toolbar=0,location=no,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=200,height=100');
   timer = setTimeout('popUpWin.close()',2000);
} // end openWin

function open_mini(url) {
   PopUpCam = window.open(url,'','toolbar=0,location=no,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=310,height=240');
} // end openWin

// start banner routines
var bannerID=0  //create a global variable named bannerID.
function banner(msg,ctrlwidth) {
//  bring msg width to form control width.
    msg = "                               "+msg
    newmsg = msg
    while (newmsg.length < ctrlwidth) {
        newmsg += msg
    }
//  Set up the form and form field.
    document.write ('<FORM NAME="Banner">')
    document.write ('<CENTER><INPUT NAME="banner" VALUE= "'+newmsg+'" SIZE= '+ctrlwidth+'></CENTER>')
    document.write ('</FORM>')
    var bannerID = null
    rollmsg()       //get the banner rolling
} // end banner

function rollmsg() {
   NowMsg=document.Banner.banner.value
   NowMsg=NowMsg.substring(1,NowMsg.length)+NowMsg.substring(0,1)
   document.Banner.banner.value = NowMsg
   bannerID=setTimeout("rollmsg()",50) 
} // end rollmsg
// end banner routines

// Begin Multi-Window Reverse Email Search script
Iaf = "http://www.iaf.net/cgi-bin/reverse?em=";
Foot = "http://www.bigfoot.com/SEARCH?SearchName=";
Info = "http://in-110.infospace.com/_1_113606212__info/Email?EE=";
// Lycos = "http://in-139.infospace.com/_1_228421007__lycos.lycos/kevdb?EE=";
// Lycos = "http://kevdb.infospace.com/info/kevdb?KCFG=email&QK=10&OTMPL=/email/email-out.html&QI="";

var singlename = "";
var nameList = "";
var uname = "";
var udom = "";
var WhoWurl = "";

function emsearch(item){
   resultsWindow=window.open('','_blank','toolbar,location=0,directories=0,status,menubar=0,scrollbars,resizable');
   resultsWindow.document.open();
   resultsWindow.document.write("<head><title>Search Results for " + singlename + "</title></head>");
   resultsWindow.document.write("<FRAMESET COLS=50%,50%>");
   resultsWindow.document.write("<FRAME NAME='frame1' SRC='" + Foot + singlename + "&FormName=BF2LOOKUP" + "&Action=E" + "'>");
   resultsWindow.document.write("<FRAME NAME='frame2' SRC='" + Info + singlename + "'>");
   resultsWindow.document.write("</FRAMESET>");
   resultsWindow.document.close();

// Create separate window for the fussy WhoWhere search engine:
   WhoWurl = "http://query1.whowhere.com/jwz/name.wsrch?name=" + uname + "&org=" + udom + "&match=inexact";
   whoWindow=window.open('','_blank','toolbar,location=0,directories=0,status,menubar=0,scrollbars,resizable,outerWidth=640,outerHeight=480');
   whoWindow.document.open();
   whoWindow.document.write("<head><title>Continue WhoWhere Search for " + singlename + "...</title></head>");
   whoWindow.document.write("<body>");
   whoWindow.document.write("<br><br>The WhoWhere search engine won't directly return search results.<br>");
   whoWindow.document.write("To accomodate this, please follow the link below to continue your search.<br><br>");
   whoWindow.document.write("<A HREF=" + WhoWurl + ">Continue Search for " + singlename + "</A>");
   whoWindow.document.write("</body>");
   whoWindow.document.close();

} // end emsearch

function emhunt(item){
   pattern = /@/
   singlename = item.username.value
   if (singlename == "") {
      alert ("Please enter an email address to search for.")
   }
   else {
      nameList = item.username.value.split (pattern)
      uname = nameList[0]
      if (uname == "undefined") {
         uname = ""
      }
      udom = nameList[1]
      if (udom == "undefined") {
         udom = ""
      }
      emsearch(item);
   }
}

// end Multi-Window Reverse Email Search script
//==========================================================
// Begin Multi-Window Reverse Phone Number Search script
Res = "http://kevdb.infospace.com/info/kevdb-g2?KCFG=US&OTMPL=/res/r1.html&QFM=P&QK=10&QP=";
Biz = "http://yp.infospace.com/info/searchyp?BP=1&BR=0&QK=20&yp_rev=1&QP=";
Fax = "http://in-103.infospace.com/info/fax?QF=";
AnyWho = "http://www.anywho.com/cgi-bin/htwpq?qtype=rfull&state=&tel=";
// Tol = "http://kevdb.infospace.com/info/kevdb?otmpl=toll_table.htm&kcfg=tf800&qp=";
// Ada = "http://adp.infousa.com/cgi-bin/abicgi/abicgi.pl?BAS_session=S08662774322339&BAS_vendor=0&BAS_type=ADP&BAS_page=101&sch_fullphone=";

function phsearch(item){
   phresultsWindow=window.open('','_blank','toolbar,location=0,directories=0,status,menubar=0,scrollbars,resizable');
   phresultsWindow.document.open();
   phresultsWindow.document.write("<head><title>Search Results for " + phtarget + "</title></head>");
   phresultsWindow.document.write("<FRAMESET ROWS=50%,50%><FRAMESET COLS=50%,50%>");
   phresultsWindow.document.write("<FRAME NAME='frame0' SRC='" + Res + phtarget + "'>");
   phresultsWindow.document.write("<FRAME NAME='frame1' SRC='" + Biz + phtarget + "'>");
   phresultsWindow.document.write("</FRAMESET>");
   phresultsWindow.document.write("<FRAMESET COLS=50%,50%>");
   phresultsWindow.document.write("<FRAME NAME='frame2' SRC='" + Fax + phtarget + "'>");
   phresultsWindow.document.write("<FRAME NAME='frame3' SRC='" + AnyWho + phtarget + "'>");
   phresultsWindow.document.write("</FRAMESET></FRAMESET>");
   phresultsWindow.document.close();

} // end phsearch

function phhunt(item){
   phtarget = item.phnumber.value
   // The following is needed for the completely hidden search form below... 
   document.reverse.tel.value = item.phnumber.value
   if (phtarget == "") {
      alert ("Please enter a phone number to search for.")
   }
   else {
      phsearch(item);
   }
}
