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.

318 lines
8.6 KiB

  1. <HTML XMLNS:helpcenter>
  2. <HEAD>
  3. <!--
  4. Copyright (c) 2000 Microsoft Corporation
  5. -->
  6. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=windows-1252">
  7. <META HTTP-EQUIV=PICS-Label CONTENT='(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l comment "RSACi North America Server" by "[email protected]" r (n 0 s 0 v 0 l 0))'>
  8. <META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
  9. <OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
  10. <LINK ID=Stylesheet_Ref0 href="hcp://system/css/shared.css" rel=STYLESHEET type=text/css>
  11. <LINK ID=Stylesheet_Ref1 href="hcp://system/css/Behaviors.css" rel=STYLESHEET type=text/css>
  12. <SCRIPT ID=Script1_noloc SRC="hcp://system/scripts/Common.js"></SCRIPT>
  13. <STYLE>
  14. .sys-font-body-gray
  15. {
  16. color : graytext;
  17. }
  18. .layout-checkbox
  19. {
  20. padding-left : 7px;
  21. }
  22. .layout-index1
  23. {
  24. padding-left : 11px;
  25. padding-right : 5px;
  26. }
  27. .layout-index2
  28. {
  29. padding-right : 11px;
  30. }
  31. </STYLE>
  32. </HEAD>
  33. <BODY SCROLL=NO>
  34. <IFRAME NAME='HelpCtrContents' style='position:absolute; display:none'></IFRAME>
  35. <TABLE border=0 cellpadding=0 cellspacing=0 WIDTH=100% HEIGHT=100% style="table-layout: fixed">
  36. <TR class="sys-font-body" style="height: 3em;padding-top:11px;" id=idContextAreaOuter>
  37. <TD class="sys-lhp-bgcolor-scope">
  38. <DIV id=idContextAreaOuter2 NOWRAP style='width: 100%; text-overflow: ellipsis; overflow: hidden;'>
  39. <DIV id=idSubsite class='sys-font-body sys-color-body layout-checkbox' style='display: none'>
  40. <INPUT id=idSubsite_State TYPE=checkbox onclick='context_subsite_onclick()'>
  41. <LABEL id=idSubsite_State_l FOR="idSubsite" class="sys-font-body">Search only <SPAN id=idSubsite_Title></SPAN></LABEL>
  42. </DIV>
  43. <DIV id=idIndex class='sys-font-body sys-color-body' style='display: none'>
  44. <TABLE border=0 cellpadding=0 cellspacing=0 WIDTH=100% HEIGHT=100%>
  45. <TR>
  46. <TD id=noloc1 class='layout-index1'><DIV NOWRAP class="sys-font-body" id=locIndex>Current index&nbsp</DIV></TD>
  47. <TD id=noloc2 class='layout-index2' WIDTH=100%>
  48. <SELECT id=idIndex_State NAME="INDEX" TITLE="Select one index" SIZE="1" onchange='context_index_onchange()' style="width: 100%"></SELECT>
  49. </TD>
  50. </TR>
  51. </TABLE>
  52. </DIV>
  53. </DIV>
  54. </TD>
  55. <TD class="sys-lhp-bgcolor-scope" WIDTH=3px>
  56. </TD>
  57. </TR>
  58. <TR>
  59. <TD>
  60. <IFRAME id=idSubpanels NAME='SubPanels' WIDTH=100% HEIGHT=100%></IFRAME>
  61. </TD>
  62. <TD WIDTH=3px HEIGHT=100% style='cursor: col-resize' class="sys-header-gradient-V" id=noloc3>
  63. <SPAN style='width: 3px; height: 100%; behavior : url(#default#pch_handle)'>&nbsp;</SPAN>
  64. </TD>
  65. </TR>
  66. </TABLE>
  67. </BODY>
  68. <SCRIPT>
  69. //
  70. // localizable variables/filenames
  71. //
  72. var L_SystemIndex_Text = "Main Index";
  73. var L_SubsiteEnabled_Text = "Specifies whether to search only the topics that reside in this category. This option only limits the search results displayed under 'Suggested Topics'.";
  74. var L_SubsiteDisabled_Text = "Specifies whether to search only the topics that reside in this category. To use this option, click 'Set search options', and then select 'Suggested Topics'.";
  75. var L_SubsiteSearch_Text = "Search only ";
  76. ////////////////////////////////////////////////////////////////////////////////
  77. var g_SUBSITE_node = "";
  78. var g_SUBSITE_visible = false;
  79. var g_SUBSITE_checked = (pchealth.UserSettings.IsDesktopVersion);
  80. var g_INDEX_visible = false;
  81. var g_INDEX_selection = [];
  82. var g_INDEX_current = -1;
  83. var g_INDEX_system = "<SYSTEM>";
  84. var g_NAVBAR = pchealth.UI_NavBar.content.parentWindow;
  85. idSubsite_State.status = g_SUBSITE_checked;
  86. function SubsiteStatus()
  87. {
  88. // Check if semgr has been initialized
  89. if(g_NAVBAR.GetWrapperVar( "SEMgrInit" ) == "true")
  90. {
  91. // If already initialized, get the search engine manager and extract keyword engine to see if it is enabled
  92. var oWrapper = g_NAVBAR.FindWrapper( g_NAVBAR.ID_KEYWORD );
  93. if(oWrapper)
  94. {
  95. EnableSubsite( oWrapper.Enabled );
  96. }
  97. }
  98. else
  99. {
  100. // If not initialized, read the value from the registry
  101. var fEnabled;
  102. try { fEnabled = pchealth.RegRead( GetSearchEngineConfig() + g_NAVBAR.ID_KEYWORD + "\\" + "Enabled" ) != "false"; } catch(e) { fEnabled = true; }
  103. EnableSubsite( fEnabled );
  104. }
  105. }
  106. function EnableSubsite(bEnable)
  107. {
  108. if (bEnable)
  109. {
  110. idSubsite.title = L_SubsiteEnabled_Text;
  111. idSubsite_State.disabled = false;
  112. idSubsite_State_l.className = "sys-font-body";
  113. }
  114. else
  115. {
  116. idSubsite.title = L_SubsiteDisabled_Text;
  117. idSubsite_State.disabled = true;
  118. idSubsite_State_l.className = "sys-font-body sys-font-body-gray";
  119. }
  120. }
  121. ////////////////////////////////////////
  122. function context_UpdateBanner()
  123. {
  124. var ctx = pchealth.HelpSession.CurrentContext;
  125. if(ctx.ContextName == "SUBSITE")
  126. {
  127. if(ctx.ContextInfo)
  128. {
  129. var arr = ctx.ContextInfo.split( " " );
  130. if(arr[0] != "")
  131. {
  132. try
  133. {
  134. var node = pchealth.Database.LookupNode( arr[0] );
  135. idSubsite_State.title = L_SubsiteSearch_Text + node(1).Title;
  136. idSubsite_Title.innerText = node(1).Title;
  137. g_SUBSITE_node = arr[0];
  138. g_SUBSITE_visible = true;
  139. g_INDEX_visible = false;
  140. SubsiteStatus();
  141. }
  142. catch(e)
  143. {
  144. }
  145. }
  146. }
  147. }
  148. else if(ctx.ContextName == "SEARCH")
  149. {
  150. ; // Maintain state.
  151. }
  152. else
  153. {
  154. g_SUBSITE_node = null;
  155. g_SUBSITE_visible = false;
  156. }
  157. if(ctx.ContextName == "INDEX")
  158. {
  159. g_SUBSITE_visible = false;
  160. if(ctx.ContextInfo)
  161. {
  162. g_INDEX_selection = ctx.ContextInfo.split( " " );
  163. }
  164. else if(pchealth.UserSettings.Scope)
  165. {
  166. g_INDEX_selection = [ pchealth.UserSettings.Scope, g_INDEX_system ];
  167. }
  168. else
  169. {
  170. g_INDEX_selection = [];
  171. }
  172. if(g_INDEX_selection.length > 0)
  173. {
  174. g_INDEX_visible = true;
  175. }
  176. else
  177. {
  178. g_INDEX_visible = false;
  179. }
  180. }
  181. else
  182. {
  183. g_INDEX_visible = false;
  184. g_INDEX_selection = null;
  185. g_INDEX_current = -1;
  186. }
  187. context_update();
  188. }
  189. function context_subsite_onclick()
  190. {
  191. g_SUBSITE_checked = idSubsite_State.status;
  192. idSubsite.title = g_SUBSITE_checked ? L_SubsiteEnabled_Text : L_SubsiteDisabled_Text;
  193. context_update();
  194. }
  195. function context_index_onchange()
  196. {
  197. g_INDEX_current = idIndex_State.options[idIndex_State.selectedIndex].value;
  198. context_update();
  199. }
  200. function context_update()
  201. {
  202. var ctx = pchealth.HelpSession.CurrentContext;
  203. var i;
  204. pchealth.UI_NavBar.content.parentWindow.SetWrapperVar( "SUBSITE", g_SUBSITE_checked ? g_SUBSITE_node : "" );
  205. {
  206. var options = idIndex_State.options;
  207. while(options.length) options.remove( 0 );
  208. for(i in g_INDEX_selection)
  209. {
  210. var text;
  211. try
  212. {
  213. var id = g_INDEX_selection[i];
  214. var fSys = (id == g_INDEX_system);
  215. text = pchealth.UserSettings.IndexDisplayName( fSys ? null : id );
  216. if(text == "")
  217. {
  218. text = fSys ? L_SystemIndex_Text : null;
  219. }
  220. }
  221. catch(e)
  222. {
  223. text = null;
  224. }
  225. if(text)
  226. {
  227. var oOption = document.createElement("OPTION");
  228. options.add( oOption );
  229. oOption.innerText = text;
  230. oOption.value = i;
  231. if(g_INDEX_current == -1) g_INDEX_current = i;
  232. if(i == g_INDEX_current)
  233. {
  234. oOption.selected = true;
  235. }
  236. }
  237. }
  238. if(options.length < 2) g_INDEX_visible = false;
  239. }
  240. if(ctx.ContextName == "INDEX")
  241. {
  242. try
  243. {
  244. idSubpanels.index_Show( g_INDEX_current != -1 ? g_INDEX_selection[g_INDEX_current] : null );
  245. }
  246. catch(e)
  247. {
  248. }
  249. }
  250. idContextAreaOuter.style.display = (g_SUBSITE_visible | g_INDEX_visible) ? "" : "none";
  251. idSubsite .style.display = g_SUBSITE_visible ? "" : "none";
  252. idIndex .style.display = g_INDEX_visible ? "" : "none";
  253. }
  254. </SCRIPT>
  255. <helpcenter:events id=idEvents onContextSwitch="context_UpdateBanner();" onPersistLoad="context_UpdateBanner();" onTravelDone="context_UpdateBanner();" />
  256. <helpcenter:state id=idState identity="Context" />
  257. </HTML>