﻿function GetSiteSearchResults(newWindow,frameObject,frameObjectName,fontFace,fontSize,fontColour,linkFace,linkSize,linkColour,resultsText)
{
var sTerms="";
var iDepth = 0;
var sURL = new String(document.location);
if (sURL.indexOf("?") > 0)
{
var arrParams = sURL.split("?");
var arrURLParams = arrParams[1].split("&");
for (var i=0;i<arrURLParams.length;i++)
{
var sParam = arrURLParams[i].split("=");
var sValue = unescape(sParam[1]);
if( sParam[0] == frameObjectName)
	sTerms = sValue;
if( sParam[0] == "depth")
	iDepth = parseInt(sValue);
}
}
var d=frameObject.document;
if (sTerms=="") {d.open(); d.write("<html><head></head><body style=\"background: transparent;\"></body></html>"); d.close();return;}
var sBack=""; for (i=0; i<iDepth; i++) sBack+='..\\\\';
d.open();
d.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
d.write("<html lang=\"en\">");
d.write("<head>");
d.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">");
d.write("</head>");
d.write("<body style=\"margin: 0px 0px 0px 0px; font-family: "+fontFace+"; font-size: "+fontSize+"; color: "+fontColour+"; background: transparent;\">");
d.write("<div id=\"wpSearchResults\"></div>");
d.write("<script type=\"text/javascript\">");
d.write("var wordMap = new Array(\" after many years being with talking newspaper seeing transition digital became obvious that software needed load pendrives going specialised expensive this would expense smaller organisations decided develop some this been used long time local organisation just create master those using dedicated copiers produce listeners hubs \",\" useful links scarborough talkingnews blind partially sighted society 000webhost \",\" keith tingle albert street scarborough north yorkshire yo12 01723 377524 name e-mail address comments enter characters shown email \",\" \",\" downloads pendrive loader quick guide manual demo demo will only load file each type news full version unlimited \",\" loader easy program loading files multiple pendrives media cards players copy from master penddrive this ideal method talking newspapers churches groups that need make copies same maybe family that load onto each children's childrens more details works click screen below loader quantity click picture large image main screen help works startup \",\" pendrive loader easy program loading files multiple pendrives media cards players copy from hard drive master penddrive this ideal method talking newspapers churches groups that need make copies same publications drive will announcement pendrive both loaded listener know second publication there more details works click help screen below pendrive loader quantity click picture large image main screen help about startup view download quick guide manual demo \",\" pendrive loader easy program loading files multiple pendrives media cards players copy from hard drive master penddrive this ideal method talking newspapers churches groups that need make copies same seven simultaneously which makes faster drives more details works click help screen below pendrive loader click picture large image main screen help about startup quantity \");");
d.write("var pageMap = new Array(\"Ktingle.co.uk Home Page\",\"Links\",\"Contact\",\"Search\",\"Downloads\",\"MP3 Loader\",\"PenDrive Loader V2.0\",\"7 Way PenDrive Loader\");");
d.write("var linkMap = new Array(\"index.html\",\"Links.html\",\"contact.html\",\"Search.html\",\"downloads/downloads.html\",\"products/software/mp3loader.html\",\"products/software/pdloaderv2.html\",\"products/software/7waypdl.html\");");
d.write("var preMap = new Array(\"After many years of being with a Talking Newspaper, and seeing the transition to the digital era. It became obvious that the software needed to load PenDrives was going to be specialised and expensive\",\"USEFUL LINKS Scarborough TalkingNews Scarborough Blind Partially Sighted Society 000webhost.com \",\"Keith Tingle  3 Albert Street SCARBOROUGH North Yorkshire YO12 7HW  Tel: 01723 377524 Name E-mail Address Comments Enter Characters shown EMAIL \",\"\",\"DOWNLOADS: PenDrive Loader V2.0 Quick Guide  PenDrive Loader V2.0 Manual  PenDrive Loader V2.0 DEMO The Demo will Only Load One File of each type (News or Mag) to each PenDrive. The Full version is Un\",\"MP3 Loader is an easy to use program for loading MP3 files to multiple USB PenDrives, Media Cards or MP3 Players.  You can copy files from a Master PendDrive etc.  This program is an ideal method for \",\"Pendrive Loader is an easy to use program for loading MP3 files to multiple USB PenDrives, Media Cards or MP3 Players. You can copy files from a Hard Drive or a Master PendDrive etc.  This program is \",\"The 7 Way Pendrive Loader is an easy to use program for loading MP3 files to multiple USB PenDrives, Media Cards or MP3 Players. You can copy files from a Hard Drive or a Master PendDrive etc.  This p\");");
d.write("function doNav(ind)");
d.write("{");
if (newWindow)
d.write("		 window.open(\""+sBack+"\"+linkMap[ind],\"_blank\");");
else
d.write("		 parent.window.location.href=linkMap[ind];");
d.write("}");
d.write("function wpDoSearch(searchTerms){");
d.write("var terms = searchTerms.split(\" \");");
d.write("if (terms==\"\") return;");
d.write("var results = \"\";");
d.write("var resultscount = 0;");
d.write("for (var i=0; i<wordMap.length; i++)");
d.write("{");
d.write("			var found=true;");
d.write("			for (var j=0; j<terms.length; j++)");
d.write("					if (wordMap[i].indexOf(terms[j].toLowerCase())==-1) found=false;");
d.write("			if (found)");
d.write("			{");
d.write("				 results+=\"<a style=\\\"cursor: pointer; font-family: "+linkFace+"; font-size: "+linkSize+"; color: "+linkColour+"; \\\" onclick=\\\"doNav(\"+i+\");\\\"><u>\"+pageMap[i]+\"</u></a><br>\"+preMap[i]+\"...<br><br>\";");
d.write("				 resultscount++;");
d.write("			}");
d.write("}");
d.write("document.getElementById(\"wpSearchResults\").innerHTML=resultscount+\" "+resultsText+" \"+searchTerms+\"<br><br>\"+results;");
d.write("}");
while(sTerms.indexOf("\"") != -1 ) {
sTerms = sTerms.replace("\"","");
};
d.write("wpDoSearch(\""+sTerms+"\");");
d.write("</script>");
d.write("</body></html>");
d.close();
}