function open800x600() {
   noteWin = window.open('http://www.csn.net/~fjlawson/','win800x600','toolbar=1,location=yes,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=800,height=600');
} // end openNote


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
// Start of search engine script
Yahoo = "http://search.yahoo.com/bin/search?p=";
Magellan = "http://www.mckinley.com/search.gw?c=web&look=magellan&search=";
Point = "http://www.lycos.com/cgi-bin/pursuit?query=";
Snap = "http://www.snap.com/search/directory/results/1,61,home-0,00.html?tag=st.sn.fdsb&keyword=";
Alta = "http://www.altavista.digital.com/cgi-bin/query?pg=q&what=web&q=";
Bot = "http://www.hotbot.com/?SW=web&SM=MC&DE=1&DC=25&RG=NA&_v=2&MT=";
Lycos = "http://www.lycos.com/cgi-bin/pursuit?query=";
Excite = "http://www.excite.com/search.gw?searchType=Concept&search=";
Crawler = "http://www.webcrawler.com/cgi-bin/WebQuery?searchText=";
InfoSeek = "http://guide-p.infoseek.com/Titles?qt=";
DejaNews = "http://www.dejanews.com/dnquery.xp?QRY=";
LookSmart = "http://www.looksmart.com/r_search?look=&key=";
NorLight = "http://www.northernlight.com/nlquery.fcg?si=&cb=0&cc=&us=025&sb.x=47&sb.y=12&qr=";
MetaCrawler = "http://www.metacrawler.com/crawler?general=";
SavvySearch = "http://www.savvysearch.com/search?q=";
Jeeves = "http://www.ask.com/main/askjeeves.asp?ask=";
Dictionary = "http://work.ucsd.edu:5141/cgi-bin/http_webster?method=exact&isindex=";
Thesaurus = "http://www.wordsmyth.net/cgi-bin/simplesearch.cgi?matchtype=fuzzy&matchid=-1&retall=1&matchent=";
Encyclopedia = "http://www.encyclopedia.com/cgi-bin/search.cgi?search=";
Bartlett = "http://www.bartleby.com/cgi/AT-bartlebysearch.cgi?backlink=http://www.bartleby.com:80/excite/AT-bartlebyquery.html&bltext=Bartleby&sp=sp&search=";
Galaxy = "http://www.einet.net/cgi-bin/wais-text-multi?keywords=";
var got=0;
var url = "";
var plus="";
var mag="";
function search4(item){
        stringPlus();
        resultsWindow=window.open();
        resultsWindow.document.open();
        resultsWindow.document.write("<head><title>Search Results for " + item.text.value + "</title></head>");
  resultsWindow.document.write("<FRAMESET ROWS=50%,50%><FRAMESET COLS=50%,50%><FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'><FRAME NAME='frame1' SRC='" + computeFrameSrc(1) + "'></FRAMESET>");
        resultsWindow.document.write("<FRAMESET COLS=50%,50%><FRAME NAME='frame2' SRC='" + computeFrameSrc(2) + "'><FRAME NAME='frame3' SRC='" + computeFrameSrc(3) + "'></FRAMESET></FRAMESET>");
        resultsWindow.document.close();
        got = 0;
}
function search2(item){
        stringPlus();
        resultsWindow=window.open();
        resultsWindow.document.open();
        resultsWindow.document.write("<head><title>Search Results for " + item.text.value + "</title></head>");
  resultsWindow.document.write("<FRAMESET ROWS=50%,50%><FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'><FRAME NAME='frame1' SRC='" + computeFrameSrc(1) + "'></FRAMESET>");
        resultsWindow.document.close();
        got = 0;
}
function stringPlus(){
        for (var j=0; j < window.document.choose4.text.value.length; j++){
                if (window.document.choose4.text.value.charAt(j) == " ")
                        mag += "+";
                else
                        mag += window.document.choose4.text.value.charAt(j);}
}
function numChecked(item){
        plus = escape(item.text.value);
        var h=0;
        num=0;
        for (var l=0; l < item.check1.length; l++) {
                if (item.check1[l].checked){
                                h++;
                        if (h++ <= 4){
                                if (l == "0"){num = 1;}
                                else if (l == "1"){num = 2;}
                                else if (l == "2"){num = 3;}
                                else if (l == "3"){num = 4;}
                                else if (l == "4"){num = 5;}
                                else if (l == "5"){num = 6;}
                                else if (l == "6"){num = 7;}
                                else if (l == "7"){num = 8;}
                                else if (l == "8"){num = 9;}
                                else if (l == "9"){num = 10;}
                                else if (l == "10"){num = 11;}
                                else if (l == "11"){num = 12;}
                                else if (l == "12"){num = 13;}
                                else if (l == "13"){num = 14;}
                                else if (l == "14"){num = 15;}
                                else if (l == "15"){num = 16;}
                                else if (l == "16"){num = 17;}
                                else if (l == "17"){num = 18;}
                                else if (l == "18"){num = 19;}
                                else if (l == "19"){num = 20;}
                               }
                }
        }
        if (h == 2)
                Results(num-1);
        else if (h == 4)
                search2(item);
        else
                search4(item);
}
function computeFrameSrc(num){
        var k=-1;
        for (var j=got; j < document.choose4.check1.length; j++) {
                if (document.choose4.check1[j].checked){
                                k++;
                        if (k++ <= num){
                                if (j == "0"){
                                        url = Yahoo + plus;
                                        got = 1;}
                                else if (j == "1"){
                                        url = Magellan + plus;
                                        got = 2;}
                                else if (j == "2"){
                                        url = Point + plus;
                                        got = 3;}
                                else if (j == "3"){
                                        url = Snap + plus;
                                        got = 4;}
                                else if (j == "4"){
                                        url = Alta + plus + "&mode=and";
                                        got = 5;}
                                else if (j == "5"){
                                        url = Bot + plus;
                                        got = 6;}
                                else if (j == "6"){
                                        url = Lycos + plus + "&backlink=217&maxhits=25";
                                        got = 7;}
                                else if (j == "7"){
                                        url = Excite + plus + "&category=default&mode=relevance&showqbe=1&display=html3,hb";
                                        got = 8;}
                                else if (j == "8"){
                                        url = Crawler + plus + "&maxHits=25";
                                        got = 9;}
                                else if (j == "9"){
                                        url = InfoSeek + plus + "&col=WW";
                                        got = 10;}
                                else if (j == "10"){
                                        url = DejaNews + plus + "&DBS=2&defaultOp=AND&maxhits=25&ST=QS&format=terse";
                                        got = 11;}
                                else if (j == "11"){
                                        url = LookSmart + plus;
                                        got = 12;}
                                else if (j == "12"){
                                        url = NorLight + plus;
                                        got = 13;}
                                else if (j == "13"){
                                        url = MetaCrawler + plus + "&logic=0Žion=The+World&orgType=Any&maxwait=1&score=0";
                                        got = 14;}
                                else if (j == "14"){
                                        url = SavvySearch + plus + "&op=a&cat=";
                                        got = 15;}
                                else if (j == "15"){
                                        url = Jeeves + plus;
                                        got = 16;}
                                else if (j == "16"){
                                        url = Dictionary + plus;
                                        got = 17;}
                                else if (j == "17"){
                                        url = Thesaurus + plus;
                                        got = 18;}
                                else if (j == "18"){
                                        url = Encyclopedia + plus;
                                        got = 19;}
                                else if (j == "19"){
                                        url = Bartlett + plus;
                                        got = 20;}
                                return url;
                                }
                }
        }
//        url = "http://www.csn.net/~fjlawson/empty.html";
        url = "about:null";
        return url;
}
function Results(place){
        stringPlus();
        resultsWin = open("","results");
        if (place == "0")
                url = Yahoo + plus;
        else if (place == "1")
                url = Magellan + plus;
        else if (place == "2")
                url = Point + plus;
        else if (place == "3")
                url = Snap + plus;
        else if (place == "4")
                url = Alta + plus + "&mode=and";
        else if (place == "5")
                url = Bot + plus;
        else if (place == "6")
                url = Lycos + plus + "&backlink=217&maxhits=25";
        else if (place == "7")
                url = Excite + plus + "&category=default&mode=relevance&showqbe=1&display=html3,hb";
        else if (place == "8")
                url = Crawler + plus + "&maxHits=25";
        else if (place == "9")
                url = InfoSeek + plus + "&col=WW";
        else if (place == "10")
                url = DejaNews + plus + "&defaultOp=AND&svcclass=dncurrent&maxhits=25";
        else if (place == "11")
                url = LookSmart + plus;
        else if (place == "12")
                url = NorLight + plus;
        else if (place == "13")
                url = MetaCrawler + plus + "&logic=0Žion=The+World&orgType=Any&maxwait=1&score=0";
        else if (place == "14")
                url = SavvySearch + plus + "&op=a&cat=";
        else if (place == "15")
                url = Jeeves + plus;
        else if (place == "16")
                url = Dictionary + plus;
        else if (place == "17")
                url = Thesaurus + plus;
        else if (place == "18")
                url = Encyclopedia + plus;
        else if (place == "19")
                url = Bartlett + plus;
        resultsWin.location = url;
} // end search4
