﻿function GetSiteSearchResults(newWindow,frameObject,frameObjectName,fontFace,fontSize,fontColour,linkFace,linkSize,linkColour)
{
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(\" understand that your privacy utmost importance information strictly confidential sizes catered take moment discover mysteries behind sexy lingerie collections feel sexy impress partner remember keep mystery \",\" mysterious secrets first name surname e-mail address details \",\" irish model agency records holiday property carr hendrick \",\" privacy policy take privacy customers data very seriously committed protecting your will only information that collect about lawfully accordance with data protection laws reasons firstly process order create site second retain payment contract renewal purposes type includes your name address phone number email address never sensitive credit card form banking details unless authorise provide personal individual user history associates third party without first obtaining permission hold accurate date check emailing find inaccuracies delete correct promptly which held securely internal security policy have other questions comments regarding please contact \",\" bustiers corsets baby dolls camisoles match sets chemises mini dresses robes gowns costumes garter belts panties thongs chain mail rhinestone lingerie misc bridal teddies \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" 80509 lace corset with under wire pushup cups boning detachable garter straps matching panty \",\" 80464 floral embroidered sheer bustier with underwire pushup cups hook back closure adjustable straps matching panty \",\" 80003 stretch lace corset underwire padded cups hook front adjustable shoulder garter straps g-string included \");");
d.write("var pageMap = new Array(\"Home\",\"Contact\",\"Links\",\"Privacy Policy\",\"Shop\",\"Bustiers / Corsets\",\"Panties\",\"BabyDolls\",\"ChainMail\",\"Bridal\",\"Camermises\",\"Camisoles\",\"Costumes\",\"Garter Belts\",\"Gowns\",\"Match Sets\",\"Robes\",\"Teddies\",\"80509\",\"80464\",\"80003\");");
d.write("var linkMap = new Array(\"index.html\",\"page3.html\",\"page4.html\",\"page5.html\",\"page5a.html\",\"page6.html\",\"page7.html\",\"page8.html\",\"page9.html\",\"page10.html\",\"page11.html\",\"page12.html\",\"page13.html\",\"page14.html\",\"page15.html\",\"page16.html\",\"page17.html\",\"page18.html\",\"page19.html\",\"page20.html\",\"page21.html\");");
d.write("var preMap = new Array(\"  We understand that your privacy is of the utmost importance. All information is strictly confidential.   All sizes catered for.       Take a moment to discover the mysteries behind                  \",\"Mysterious Secrets First name Surname E-mail Address Details \",\"Irish Model Agency J. V. C. Records Irish Holiday Property J. V. Carr Bob Hendrick \",\"Privacy Policy  We take the privacy of our customers data very seriously and are committed to protecting your privacy.   We will only use the information that we collect about you lawfully (in accorda\",\"Bustiers  Corsets Baby Dolls Camisoles Match Sets Chemises  Mini Dresses Robes  Gowns  Costumes Garter Belts Panties / Thongs Chain Mail  Rhinestone Lingerie Misc Bridal Teddies \",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"80509 - Lace corset top with under wire pushup cups and boning. Detachable garter straps and matching panty                                      €19.99 \",\"80464 - Floral embroidered sheer bustier with underwire  pushup cups.  Hook and eye back closure. Adjustable straps.  Matching embroidered boy cut panty  \",\"80003 - Stretch lace corset has underwire padded cups, hook & eye front,  adjustable shoulder and garter straps. G-string included  \");");
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+\" result(s) found for search term: \"+searchTerms+\"<br><br>\"+results;");
d.write("}");
d.write("wpDoSearch(\""+sTerms+"\");");
d.write("</script>");
d.write("</body></html>");
d.close();
}