<!-- hide the script from old browsers --
Yahoo = "http://search.yahoo.com/bin/search?p=";
Alta = "http://www.altavista.com/web/results?itag=wrx&q=";
Lycos = "http://www.lycos.com/cgi-bin/pursuit?query=";
Crawler = "http://www.webcrawler.com/cgi-bin/WebQuery?searchText=";
DejaNews = "http://search.dejanews.com/dnquery.xp?query=";
Dogpile = "http://www.dogpile.com/texis/search?q=";
MetaCrawler = "http://www.metacrawler.com/info.metac/search/web/";
Excite = "http://msxml.excite.com/info.xcite/search/web/";
Google = "http://www.google.com/search?hl=en&q=";
var got=0;
var url = "";
var plus="";
var mag="";

function search4(item){
        stringPlus();
        resultsWindow=window.open('', 'simulsearch', 'toolbar=no,location=no,directories=no,status=no,menubar=no,width=1000,height=715,resizable=1,scrollbars=auto');
        resultsWindow.document.open();
        resultsWindow.document.write("<head><title>Close this window to return to SimulSearch II</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('', 'simulsearch', 'toolbar=no,location=no,directories=no,status=no,menubar=no,width=1000,height=715,resizable=1,scrollbars=auto');
        resultsWindow.document.open();
        resultsWindow.document.write("<head><title>Close this window to return to SimulSearch II</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;}
                                }
                }
        }
        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 = Google + plus;
                                        got = 2;}
                                else if (j == "2"){
                                        url = Alta + plus + "&mode=and";
                                        got = 3;}
                                else if (j == "3"){
                                        url = Lycos + plus + "&backlink=217&maxhits=25";
                                        got = 4;}
                                else if (j == "4"){
                                        url = Excite + plus + "&category=default&mode=relevance&showqbe=1&display=html3,hb";
                                        got = 5;}
                                else if (j == "5"){
                                        url = Crawler + plus + "&maxHits=25";
                                        got = 6;}
                                else if (j == "6"){
                                        url = DejaNews + plus + "&defaultOp=AND&svcclass=dncurrent&maxhits=25";
                                        got = 7;}
                                else if (j == "7"){
                                        url = MetaCrawler + plus + "&logic=0Žion=The+World&orgType=Any&maxwait=1&score=0";
                                        got = 8;}
                                else if (j == "8"){
                                        url = Dogpile + plus + "&fs=web&ss=stop&to=forty";
                                        got = 9;}
                                return url;
                                }
                }
        }
        url = "http://www.personalcompass.com/empty.html";
        return url;
}
function Results(place){
        stringPlus();
        resultsWin = open("","results");
        if (place == "0")
                url = Yahoo + plus;
        else if (place == "1")
                url = Google + plus;
        else if (place == "2")
                url = Alta + plus + "&mode=and";
        else if (place == "3")
                url = Lycos + plus + "&backlink=217&maxhits=25";
        else if (place == "4")
                url = Excite + plus + "&category=default&mode=relevance&showqbe=1&display=html3,hb";
        else if (place == "5")
                url = Crawler + plus + "&maxHits=25";
        else if (place == "6")
                url = DejaNews + plus + "&defaultOp=AND&svcclass=dncurrent&maxhits=25";
        else if (place == "7")
                url = MetaCrawler + plus + "&logic=0Žion=The+World&orgType=Any&maxwait=1&score=0";
        else if (place == "8")
                url = Dogpile + plus + "&fs=web&ss=stop&to=forty";
        resultsWin.location = url;
}
//--end hiding here -->

//code for page
//<script language="JavaScript" src="http://autopedia.com/js/APmulti_search.js"></script>
