Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

244 lines
6.7 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
  2. <HTML>
  3. <HEAD>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <TITLE>Internet Explorer Search Setup</TITLE>
  6. <!-- Search Assistant OC -->
  7. <object id=srchAsst CLASSID='clsid:B45FF030-4447-11D2-85DE-00C04FA35C89' HEIGHT=0 width=0> </OBJECT>
  8. <STYLE type=text/css>
  9. .basic { font: 8pt MS Sans Serif; color: black }
  10. .title { font: bold 16pt verdana; color: #0099FF }
  11. .spot { font: bold 8pt verdana; color: white; background: #0099FF; width: 140px; line-height: 16px; height: 18px}
  12. .logo { font: 8pt MS Sans Serif; color: #FF6600 }
  13. .mini { font: bold 8pt verdana; color: #0099FF; line-height: 15px; height: 18px; width: 100%; border: solid 1px #969696; }
  14. .box {width: 100%; border-left: solid 1px; border-right: solid 1px;border-bottom: solid 1px; border-color: #969696;}
  15. </STYLE>
  16. <META content='"MSHTML 5.00.0809.1100"' name=GENERATOR></HEAD>
  17. <BODY class=basic id=base leftMargin=6 link=#ff6600 rightMargin=1 topMargin=4>
  18. <SCRIPT language=javascript src="provider.js"></SCRIPT>
  19. <SCRIPT>
  20. function DumpTable( cat, title, explain )
  21. {
  22. var str = "";
  23. var first = true;
  24. var count = 0;
  25. for (var e in gEngineList) {
  26. var eng = gEngineList[e];
  27. if (eng.cat == cat) {
  28. count++;
  29. if (first) {
  30. str += '<table width=100% cellspacing=0>';
  31. }
  32. str += '<tr>';
  33. if (first) {
  34. str += '<td width=160 nowrap><div class=mini>&nbsp;' + title +
  35. '</div><td colspan=99>\
  36. <div style="position:relative; margin-left: -2; top: 40%; width: 100%;border-top: solid 1px #969696"></div><tr>';
  37. str += '<td class=basic width = 160 rowspan=99 valign=top>' + explain ;
  38. }
  39. str += '<td valign=top><a class=logo id=' + eng.id +
  40. ' href="javascript:EM(\'' + eng.id + '\')" onfocus = "Entree();" onmouseover="window.status=\'\'">' + eng.name + '</a>';
  41. if (first) {
  42. str += '<td class=basic valign=top align=left width=45% rowspan=99>';
  43. if (cat == "usp") {
  44. str += '<div style="margin-top: -3"><label for=user1url>Address</label>\
  45. <input id=user1url type=text class=basic size=40 value="' +
  46. GetProp("user1URL") +
  47. '" onchange=\'SetProp("user1URL", this.value);\'\
  48. onkeyup=\'if (window.event.keyCode == 13) {SetProp("user1URL", this.value);EM("USER");}\'></div>';
  49. }
  50. else {
  51. str += '<span id=' + cat +
  52. ' style="position: absolute; border: solid 1px #0099FF; display: none;"></span>';
  53. }
  54. str += '<td width=8>';
  55. first=false;
  56. }
  57. }
  58. }
  59. if (!first) {
  60. while (count++ < 5) str += '<tr><td>&nbsp;';
  61. str += '</table><tr><tr><td>';
  62. }
  63. document.write( str );
  64. }
  65. var asynch = null;
  66. var asyncher;
  67. function ToolTip( )
  68. {
  69. var eng = gEngineList[ asyncher ];
  70. document.all[eng.cat].innerHTML = "<div style='margin: 6; cursor: hand' onclick=EM('" +
  71. eng.id +
  72. "')><div style='margin: 6'><center>\
  73. <img id=stamp width=80 height=32 src=logos/" + eng.id +
  74. ".gif alt='" + eng.name + "'></center></div>" + eng.help + "</div>";
  75. document.all[eng.cat].style.display = "";
  76. asynch = null;
  77. for (var i in gCategoryList) {
  78. var cat = gCategoryList[i];
  79. if (eng.cat != cat.id && cat.id != "usp")
  80. document.all[cat.id].style.display = "none";
  81. }
  82. }
  83. function Entree()
  84. {
  85. var hit = window.event.srcElement;
  86. if (hit != null && hit.className == "logo" && hit.id.substring(0,4) != "USER") {
  87. if (asynch != null) window.clearTimeout( asynch );
  88. asyncher = hit.id;
  89. asynch = window.setTimeout( "ToolTip()", 100 );
  90. }
  91. }
  92. document.onmouseover = Entree;
  93. function EM( engineID ) {
  94. if (engineID == "USER") {
  95. var url = GetProp("user1URL");
  96. if (url == "") {
  97. alert("Please enter a valid, complete address in the space provided (i.e. www.yourSearchProvider.com).");
  98. return;
  99. }
  100. if (url.indexOf(":") == -1) {
  101. url = "http://" + url;
  102. SetProp("user1URL", url);
  103. user1url.value = url;
  104. }
  105. SetUserSP( url );
  106. }
  107. var eng = gEngineList[ engineID ];
  108. srchAsst.SetDefaultSearchURL(eng.url);
  109. var mruMax = 50;
  110. var menuMax = 5;
  111. var engineMax = 10;
  112. srchAsst.NavigateToDefaultSearch();
  113. var mru = engineID + "," + GetProp("engineMRU");
  114. for (var i in gEngineList) gEngineList[i].count = 0;
  115. var offset = 0;
  116. var count = 0;
  117. while (true) {
  118. var next = mru.indexOf(",", offset);
  119. if (next < 0) break;
  120. count = count + 1;
  121. if (count > mruMax) {
  122. mru = mru.substring( 0, offset );
  123. break;
  124. }
  125. var mruID = mru.substring( offset, next );
  126. if (gEngineList[mruID] != null)
  127. gEngineList[mruID].count++;
  128. offset = next + 1;
  129. }
  130. if (gEngineList[engineID].count >= engineMax)
  131. mru = GetProp("engineMRU");
  132. gEngineList[engineID].count = 1000;
  133. SetProp("engineMRU", mru );
  134. for (var count=1; count<=menuMax; count++) {
  135. var highest = 0;
  136. var best;
  137. for (var i in gEngineList) {
  138. if (gEngineList[i].count > highest) {
  139. highest = gEngineList[i].count
  140. best = gEngineList[i];
  141. }
  142. }
  143. if (highest > 0)
  144. best.count = -99;
  145. }
  146. count = 1;
  147. for (var i in gEngineList) {
  148. var best = gEngineList[i];
  149. if (best.count == -99) {
  150. SetProp("sp" + count, best.id );
  151. count++;
  152. }
  153. }
  154. SetProp("sp" + count, "");
  155. SetProp("engine", engineID );
  156. // srchAsst.SetDefaultSearchUrl("");
  157. }
  158. if (parent.location.href != location.href)
  159. parent.location.href = "picksrch.htm";
  160. srchAsst.NavigateToDefaultSearch();
  161. </SCRIPT>
  162. <TABLE cellSpacing=8>
  163. <TR>
  164. <TD align=middle vAlign=center width=72><IMG id=id0001 alt="Internet Explorer Search" height=80
  165. src="picker.gif" width=80>
  166. <TD class=title id=id0002>Choose a Search Provider<BR><SPAN class=basic>Choose one
  167. from the complete list of Internet Explorer search engine providers
  168. below, click on the <SPAN class=logo id=USERexempt>Name</SPAN>, and
  169. enter your query as prompted in the Search Explorer Bar to the left.
  170. </TABLE>
  171. <BR>
  172. <TABLE cellSpacing=8>
  173. <TD rowSpan=99 vAlign=top width=160>
  174. <DIV class=spot id=id0003 style="MARGIN-TOP: 2px">&nbsp;Search Spotlight </DIV>
  175. <TABLE cellPadding=4 cellSpacing=2 class=box style="WIDTH: 140px">
  176. <TR>
  177. <TD align=middle>
  178. <SCRIPT>
  179. var today = new Date();
  180. var index = today.getSeconds() % gNumEngines;
  181. for (var spot in gEngineList) if (index-- == 0) break;
  182. document.write( '<a href=\'' + 'javascript:EM("' + spot + '")\'>' );
  183. document.write( '<img border=0 src="' + "logos/" + spot + ".gif" + '" alt="' + gEngineList[spot].name + '"></a><tr><td class=basic>' );
  184. document.write( gEngineList[spot].help );
  185. </SCRIPT>
  186. </TD></TABLE>
  187. <TD>
  188. <SCRIPT>
  189. for (id in gCategoryList) {
  190. var cat = gCategoryList[id];
  191. DumpTable( cat.id, cat.name, cat.help );
  192. }
  193. </SCRIPT>
  194. </TABLE>
  195. </BODY></HTML>