// You are free to use this script for any commerical or private use.  You are prohibited from selling any part within.
var SearchWord;
var FindWord;
var result = 0;
var Final = new Array();
var WritePage;
var ShowPage;
var search = new Array();
var site = new Array();

// This is where you can edit the colors and the font along with some other things in order for the script to fit your site.
var websitetitle="Search by word or topic";
var websiteurl="word";
var objectbg="#dddddd";
var tableborder="#000000";
var tablewidth="75%";
var resultbg="#eeeeee";
var headerbg="#eeeeee";
var objecttext="#000000";
var headertitle="#7A8BA3";
var searchtext="#000080";
var searchborder="#000000";
var searchbg="#ffffff";
var searchsitetext="#000000";
var buttonbg="#c0c0c0";
var buttontext="#000000";
var buttonborder="#000000";
var resulttext="#000000";
var fortext="#000000";
var font="Verdana";
var linecolor="#808080";


document.write("<div align='center'><center>\n" +
               "<table border='0' cellpadding='5' cellspacing='0' width='" + tablewidth + "' height='50' style='border: 1px solid " + tableborder + "' bgcolor='" + headerbg + "'>\n" +
               "<tr>\n" +
               "<td width='50%'><font face='" + font + "' color='" + headertitle + "'><big><strong><big>" + websitetitle + "</big></strong></big></font></td>\n" +
               "<td width='50%'><div align='right'><table border='0' cellpadding='0' cellspacing='0'>\n" +
               "<tr>\n" +
               "<td colspan='3'><strong><small><small><font face='" + font + "'>Search " + websiteurl + ": </font></small></small></strong></td>\n" +
               "</tr>\n" +
               "<tr>\n" +
               "<td><input type='text' name='searchbox' size='20' style='font-family: " + font + "; font-size: xx-small; background-color: " + searchbg + "; color: " + searchtext + "; font-weight: bold; border-left: 2px solid " + searchborder + "; border-right: 1px solid " + searchborder + "; border-top: 2px solid " + searchborder + "; border-bottom: 1px solid " + searchborder + "'></td>\n" +
               "<td width='3'></td>\n" +
               "<td><input type='button' value='Ok' onclick='SearchSite(searchbox.value.toLowerCase())' style='font-family: " + font + "; font-size: xx-small; background-color: " + buttonbg + "; color: " + buttontext + "; font-weight: bold; border: 1px solid " + buttonborder + "'></td>\n" +
               "</tr>\n" +
               "</table>\n" +
               "</div></td>\n" +
               "</tr>\n" +
               "</table>\n" +
               "</center></div><div id='searchresult'></div>")


// This is where you add your own links and keywords. As for now you are limited to 15 keywords. and the number(#) in
//brackets must begin with 0 and count from there. When creating your keywords you do not have to have exactly 15 words you
//may have less in the event that you do have less then make sure you add extra "|" to the end as if there were 15 words.

// search[#]="word1|word2|word3|word4|word5|word6|word7|word8|word9|word10|word11|word12|word13|word14|word15"
// site[#]="title|url|description"

search[0]="logscan|ezlog|rapidaudit|federal|outsource|regulations|transmission|contact|mission|design|family|hos||||||||"
site[0]="Scanware Home|http://www.scanware.com|A Full Family of Log Compliance Solutions"

search[1]="logscan|ezlog|rapidaudit|cost|productivity|special|log|canada|canadian|products|fleet|outsource|prices|audit||||||"
site[1]="Scanware Products|http://www.scanware.com/html_files/products.html|Logscan Family of Compliance Products"

search[2]="rule|rules|ezlog|logscan|hos|logviewer|newencrypt|update|add-on|program|new|download|support|||||||"
site[2]="Downloads Add-ons Updates|http://www.scanware.com/html_files/downloads.html|Download programs, updates and add-ons"

search[3]="broadband|internet|ezlog|logs|dsl|t-1|connection|online|access|machine|fast|speed|explorer|||||||"
site[3]="Ezlog Transmission|http://www.scanware.com/html_files/ezlog_transmission.html|Ezlog now transmits at higher speeds then ever"

search[4]="false|fuel|comdata|efs|turnpike|check|files|verify|documents|test|violation|||||||||"
site[4]="Falsification checking|http://www.scanware.com/html_files/logscan_verify.htm|Logscan & Ezlog easily checks for false logs"

search[5]="logscan|express|productive|windows|email|false|affordable|accurate|social|flexable|reports|network|hardware|logs||||||"
site[5]="Logscan Express Highlights|http://www.scanware.com/html_files/logscan_express_highlights2.html|View a complete list of Logscan Express highlights"

search[6]="|contact|phone|sales|form|hours|fax|email|website|||||||||||"
site[6]="Contact Scanware|http://www.scanware.com/html_files/contact.html|Methods to contact Scanware"

search[7]="survey|wish|customer|new|check|input||||||||||||||"
site[7]="Products survey|http://www.scanware.com/html_files/survey_home.html|Take surveys about current or requested products"

search[8]="logscan|plus|productive|windows|email|false|affordable|accurate|social|flexable|reports|network|hardware|logs||||||"
site[8]="Logscan Plus Highlights|http://www.scanware.com/html_files/logscan_highlights2.html|View a complete list of Logscan Plus highlights"

search[9]="logscan|freedom|productive|windows|email|false|affordable|accurate|social|flexable|reports|network|hardware|logs||||||"
site[9]="Logscan Freedom Highlights|http://www.scanware.com/html_files/logscan_freedom_highlights2.html|View a complete list of Logscan Freedom highlights"

search[10]="|ezlog|highlights|internet|logs|false|fuel|accurate|social|scanner|flexable|support|hardware|canada|outsource|xp|2000|browser|windows|office"
site[10]="Ezlog Machine Highlights|http://www.scanware.com/html_files/ezlog_highlights2.html|View a complete list of Ezlog Machine highlights."

search[11]="|ezlog|highlights|internet|logs|false|fuel|accurate|social|scanner|flexable|support|hardware|canada|outsource|xp|2000|browser|windows|office"
site[11]="Ezlog Scan Highlights|http://www.scanware.com/html_files/ezlog_scan_highlights2.html|View a complete list of Ezlog Scan highlights."

search[12]="|ezlog|highlights|internet|logs|mail|fuel|accurate|point|rules|flexable|support|canada|easy|outsource|cost|dvir|browser|windows|rapid"
site[12]="Ezlog Mail Highlights|http://www.scanware.com/html_files/ezlog_mail_highlights2.html|View a complete list of Ezlog Mail highlights."

search[13]="compare|logscan|log|scanner|twain|kofax|import|co-driver|rules|canada|reports|discipline|grid|time|drivers|access|border|production|Statistics|key"
site[13]="Logscan Family Comparison Chart |http://www.scanware.com/html_files/logscan_checklist2.html|Compare Logscan products"

search[14]="compare|ezlog|log|scanner|twain|kofax|import|co-driver|rules|canada|reports|discipline|grid|time|drivers|access|border|dvir|outsource|turn"
site[14]="Ezlog Family Comparison Chart |http://www.scanware.com/html_files/logscan_checklist2.html|Compare Ezlog products"

search[15]="report|drivers|group|summary|missing|analysis|log|logs|audited|audit|reports|letters|discipline|falsification|fuel|chart|compare|print|view|driver"
site[15]="Reports Comparison Chart |http://www.scanware.com/html_files/logscan_checklist2.html|Compare Available Reports"

search[16]="point|pointtopoint|validation|services|ezlog|analysis|log|logs|audited|audit|reports|letters|pc*miler|pcmiler|scientific|productivity|violation|alk|fleet|driver"
site[16]="Point to Point Log Validation |http://www.scanware.com/html_files/point_to_point.htm|Point to Point Log Validation for Ezlog Auditing Services"



function SearchSite(wrd){

  for (i = 0; i < search.length; i++){
    for (a = 0; a < 19; a++){ // If you need to use more keywords for each site change the number to one less than how many you need in this case we use 15 keywords so we use the number 14
      FindWord = search[i].split("|")[a]
      for (n = 0; n < wrd.length; n++){
        SearchWord = wrd.split(" ")[n]
        if(FindWord == SearchWord){
          Final[i] = "<tr>\n<td bgcolor='" + objectbg + "' colspan='2'><font face='" + font + "' size='2'><a href='" + site[i].split("|")[1] + "' target='_top'><b>" + site[i].split("|")[0] + "</b></a> : " + site[i].split("|")[1] + "<br><hr size='1' color='" + linecolor + "'><font face='" + font + "' size='1'>" + site[i].split("|")[2] + "</font></td>\n</tr>\n";
        }
      }
    }
  }

  WritePage = "<center><table width='" + tablewidth + "' cellpadding='5' cellspacing='1' bgcolor='" + tableborder + "'><tr>\n<td bgcolor='" + resultbg + "'>\n<table border='0' width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n<td><p align='left'><font face='" + font + "' size='2'>Searched " + websiteurl + " for <b>" + wrd + "</b>.</font></p></td>\n<td><p align='right'><font face='" + font + "' size='2'><span id='pagecount'></span></font></p></td>\n</tr></table></td></tr>"

  for (i = 0; i < Final.length; i++){
    if(Final[i] != null) { 
      WritePage= WritePage + Final[i];
      result=result+1;
    }
  }

  WritePage = WritePage + "</table></center>"
  searchresult.innerHTML=WritePage;
  pagecount.innerHTML = "Results <b>" + result + "</b> of <b>" + site.length + "</b> pages."

  SearchWord = null;
  FindWord = null;
  result = 0;
  for(i = 0; i < search.length; i++){
    Final[i] = null;
  }

}
