Advertisement
Guest User

Help!

a guest
May 3rd, 2013
776
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.30 KB | None | 0 0
  1. <html><head>
  2. <meta http-equiv="content-type" content="text/html; charset=windows-1252" />
  3. <title> Search Engine </title>
  4. <script>
  5.  
  6. <!-- Begin copyright - This must be retained and posted as is to use this script -->
  7.  
  8. <!--// This Script was created by Satadip Dutta.
  9. // Email: sat_dutta@post1.com / satadipd@inf.com
  10. // URL:http://dutta.home.ml.org
  11. // Version 1.1-IExp
  12. // Please honor my hard work, if you use a variant of this in your page,
  13. // then please email me :) and keep these comments in the Script.
  14. // This code is Copyright (c) 1997 Satadip Dutta
  15. // all rights reserved.
  16. // License is granted to user to reuse this code on their own Web site
  17. // if, and only if, this entire copyright notice is included. The Web Site
  18. // containing this script must be a not-for-profit ( non-commercial ) web site.
  19. // Exclusive written permission must be obtained before using this version of the search engine
  20. //-->
  21.  
  22. <!-- End copyright - This must be retained and posted as is to use this script -->
  23.  
  24. title = new Object();
  25. desc = new Object();
  26. links= new Object();
  27. matched= new Object();
  28. keywords= new Object();
  29. found= new Object();
  30. var temp=0;
  31.  
  32. title[0]=11
  33.  
  34. keywords[0]=0
  35.  
  36. found[0]=0
  37.  
  38. title[1]="Home Page of Age Help "
  39. desc[1]="Welcome to the Age Help Site, Our Goal is to Give you a Helping Hand with your Finances "
  40. links[1]="http://www.agehelp.org.uk/"
  41. matched[1]=0
  42.  
  43. title[11]="Our Services, Annuities, Equity Release, Whole life cover, long Term Care, probate and wills, bereavment, savings, benefits for the elderly"
  44. desc[11]=" This page is dedicated to showing the user what different types of advice that we cover.. Anything from Annuities to Benefits for the Elderly"
  45. links[11]="http://www.agehelp.org.uk/#!our-services/cpsk"
  46. matched[11]=0
  47.  
  48. title[3]="Contact Us, email, facebook, twitter"
  49. desc[3]=" This page allows a user to contact us with any querys or follow us on social media"
  50. links[3]="http://www.agehelp.org.uk/#!contact-us/c1zp3"
  51. matched[3]=0
  52.  
  53. title[4]="Annuities, Investment linked annuities, Fixed Term Annuities, Enhanced Annuities, Income Drawdown"
  54. desc[4]="This page is dedicated to all of our different types of annuities from Fixed term to Income Drawdown"
  55. links[4]="http://www.agehelp.org.uk/#!annuities-/c1ik3"
  56. matched[4]=0
  57.  
  58. title[5]="Equity Release, Lifetime Mortgages, Home Reversion Plan, Draw Down Mortgages, Intrest only lifetime mortgages"
  59. desc[5]="This Section of the website is dedicated to the different types of equity release that is avalible"
  60. links[5]="http://www.agehelp.org.uk/#!equity-release/c1ujl"
  61. matched[5]=0
  62.  
  63. title[6]="Whole Life Cover, Life Insurance, over 50's Cover"
  64. desc[6]="this section of the site is dedicated to whole life cover/over 50's"
  65. links[6]="http://www.agehelp.org.uk/#!wholelife/c20qw"
  66. matched[6]=0
  67.  
  68. title[7]="Probate, wills, Death, testament, "
  69. desc[7]="this section of the site is dedicated to helping you manage after a loved ones passing and what you need to do after it has happened"
  70. links[7]="http://www.agehelp.org.uk/#!probate-and-wills/cg2j"
  71. matched[7]=0
  72.  
  73. title[8]="Long term Care, Carers, Funding"
  74. desc[8]="This section of the site is dedicated to helping you understand your options if you or a loved one is looking to go into long term care"
  75. links[8]="http://www.agehelp.org.uk/#!long-term-care/c1b3p"
  76. matched[8]=0
  77.  
  78. title[9]="Bereavement, Death, loved one, benefit"
  79. desc[9]="This part of the site is dedicated to explaining what you can do after losing a loved one"
  80. links[9]="http://www.agehelp.org.uk/#!bereavement/c1rcw"
  81. matched[9]=0
  82.  
  83. title[10]="Savings, Bank Accounts, NS&I, Premium Bonds savings bonds, cash isa's sharia, index linked savings account, investmenst, national savings and investments"
  84. desc[10]="This section of the site is dedicated to breaking down what different ways there are to save you money"
  85. links[10]="http://www.agehelp.org.uk/#!savings-/c1h7r"
  86. matched[10]=0
  87.  
  88. title[2]="Benefits for the elderly,State Pension, Council tax reductions??, Health Benefits, Pension Credits?, Attendance Allowance, Carer's Allowance, Disability living Allowance, Employment and Support Allowance, Help with Extra Expenses?, Help With Heating cost, Housing Benefits "
  89. desc[2]="This section of the website is dedicated to all of the different types of benefits that you can claim"
  90. links[2]="http://www.agehelp.org.uk/#!benefits-for-the-elderly-/c1an4"
  91. matched[2]=0
  92.  
  93. function search(){
  94. var skeyword=document.searchengine.keywords.value.toLowerCase();
  95. var check=1;
  96. var pos=0;
  97. var i=0;
  98. var j=0;
  99. var itemp=0;
  100. var config='';
  101. while (true)
  102. {
  103. if (skeyword.indexOf("+") == -1 )
  104. {
  105. keywords[check]=skeyword;
  106. break;
  107. }
  108. pos=skeyword.indexOf("+");
  109. if (skeyword !="+")
  110. {
  111. keywords[check]=skeyword.substring(0,pos);
  112. check++;
  113. }
  114. else
  115. {
  116. check--;
  117. break;
  118. }
  119. skeyword=skeyword.substring(pos+1, skeyword.length);
  120. if (skeyword.length ==0)
  121. {
  122. check--;
  123. break;
  124. }
  125. }
  126. keywords[0]=check;
  127. for ( i=1; i<=keywords[0];i++)
  128. {
  129. for (j=1;j<=title[0];j++)
  130. {
  131. if (title[j].toLowerCase().indexOf(keywords[i]) > -1 )
  132. {
  133. matched[j]++;
  134. }
  135. }
  136. }
  137. for (i=1;i<=title[0];i++)
  138. {
  139. if (matched[i] > 0 )
  140. {
  141. found[0]++;
  142. // increment the found
  143. found[found[0]]=i;
  144. }
  145. }
  146. for (i=1;i<=found[0]-1;i++)
  147. {
  148. for(j=i+1;j<=found[0];j++)
  149. {
  150. if ( matched[found[i]]< matched[found[j]] )
  151. {
  152. temp= found[j];
  153. found[j]=found[i];
  154. found[i]=temp;
  155. }
  156. }
  157. }
  158. output = self;
  159. output.document.write('<html>');
  160. output.document.write('<head>');
  161. output.document.write('<script>');
  162. output.document.write('window.onerror=new Function("return true")');
  163. output.document.write('<\/script>');
  164. output.document.write('<title> Search Results </title>');
  165. output.document.write('</head>');
  166. output.document.write('<BODY bgcolor=#67c8c5 text=#000000 link=#990099 vlink =#339966 >');
  167.  
  168. output.document.write('<center> <h1> Search Results </h1></center>');
  169. output.document.write('<hr>');
  170. output.document.write(' The Keyword(s) you searched :: '.big() )
  171. for (i=1; i<=keywords[0]; i++)
  172. {
  173. output.document.write( keywords[i].bold() +" ");
  174. }
  175. output.document.write('<br>');
  176.  
  177. if (found[0]==0)
  178. {
  179. output.document.write('<hr>');
  180. output.document.write("<b>No matches resulted in this search </b> <br>");
  181. output.document.write("You may close the results and reduce the length/number of the keywords <br>");
  182. }
  183. else
  184. {
  185. output.document.write(" <hr> <b> The Results of the search are : </b> ");
  186. output.document.write( found[0] +" Entries found ".italics());
  187. output.document.write("<table border=1 width=100%>");
  188. for (i=1; i<=found[0];i++)
  189. {
  190. output.document.write("<tr><td valign=top bgcolor=#67c8c5>");
  191. output.document.write("<h3>" +i +"</h3>");
  192. output.document.write("<td valign=top>");
  193. itemp=found[i];
  194. output.document.write(desc[itemp].bold() +"<br>" + links[itemp].link(links[itemp])+ "<br>");
  195. temp= (matched[itemp]/keywords[0])*100
  196. output.document.write("<i> Matched with keywords :: " +temp+" % </i>" );
  197. matched[itemp]=0
  198.  
  199. }
  200. found[0]=0;
  201. output.document.write("</table>");
  202. }
  203. output.document.write ('This search was created by &copy <a href="http:\\dutta.home.ml.org"> Satadip Dutta</a> 1997');
  204. output.document.write ("<hr>");
  205. output.document.write ('To return to the search <a href="http://www.agehelp.org.uk/#!search/c20jc"> Click Here</a> .. .');
  206. output.document.write("<center><h1>Age Help</h1><center>");
  207. output.document.write ("</body></html>");
  208. output.document.close();
  209. }
  210. </script>
  211. </head>
  212. <body alink="#6600AA" bgcolor="#67c8c5" link="#0000FF" text="black" vlink="#6600AA" target="_parent" />
  213. <center>
  214. <h1>Search Engine</h1>
  215. </center>
  216. <hr>
  217. This is a search engine will allow you to <br> look through the site for key words
  218. <hr>
  219. <p>
  220. </p>
  221. <table border="0" cellpadding="5" cellspacing="5">
  222. <tbody><tr>
  223. <td align="left" width="20%">
  224. This search is NOT case sensitive.
  225. </td>
  226. <td align="left" width="80%">
  227. Put "+" between keywords if you are using more than one keywords
  228. </td>
  229. </tr>
  230. </tbody></table>
  231.  
  232.  
  233. <form name="searchengine" onSubmit="search()">
  234.  
  235. <center>
  236. Keywords:
  237. <input name="keywords" maxlength="50" type="text">
  238. <input name="go" value="SEARCH" onClick="search()" type="submit">
  239. <br>
  240. <hr>
  241. <font size="1">
  242. This search was created by © <a href="http://dutta.home.ml.org/">Satadip Dutta</a> 1997<br>
  243. </font>
  244. </center>
  245. </form>
  246. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement