Leaked source code of windows server 2003
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.

960 lines
24 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. <STYLE>
  13. .Search-Logo
  14. {
  15. margin-left : 11px;
  16. margin-right : 11px;
  17. }
  18. .Search-Input
  19. {
  20. border : 1px solid black;
  21. height : 24px;
  22. margin-right : 0px;
  23. margin-bottom: 4px;
  24. }
  25. .Search-Button
  26. {
  27. cursor : hand;
  28. behavior : url(#default#pch_bitmap);
  29. width : 24px;
  30. height : 24px;
  31. background-color : transparent;
  32. border : 0px;
  33. padding : 0px;
  34. margin-bottom : 4px;
  35. }
  36. .Logo
  37. {
  38. margin-left : 22px;
  39. width : 24px;
  40. height : 24px;
  41. }
  42. .LogoSKU
  43. {
  44. margin-left : 6px;
  45. margin-right : 11px;
  46. }
  47. </STYLE>
  48. </HEAD>
  49. <BODY SCROLL=NO class="sys-header-bgcolor" oncontextmenu="return check_cm();" onselectstart="return check_cm();">
  50. <OBJECT tabIndex=-1 ID=idTB CLASSID="CLSID:FC7D9E08-3F9E-11d3-93C0-00C04F72DAF7" WIDTH=100%>
  51. <PARAM id=NoLoc1 name="Definition" value="NavBar.xml">
  52. </OBJECT>
  53. <DIV id=noloc NOWRAP style="width: 100%; height: 3em; position: relative">
  54. <TABLE border=0 cellpadding=0 cellspacing=0 WIDTH=100% HEIGHT=100% class="sys-font-body">
  55. <TR>
  56. <TD style="padding-top: 10px" valign=middle id=idSearchLogoCell>
  57. <SPAN class="sys-font-heading3 sys-header-color" tabIndex=-1><DIV NOWRAP id=idSearchLogo class="Search-Logo">Search</DIV></SPAN>
  58. </TD>
  59. <TD style="padding-top: 10px" valign=bottom id=noloc1>
  60. <INPUT tabIndex=10 id=idSrcInput accesskey="S" maxLength=256 class="Search-Input" onkeypress="onKeyPress_SearchInput();" title="Type or paste your search term(s)." class="sys-font-body">&nbsp;
  61. <BUTTON tabIndex=11 id=idSrcButton class="Search-Button" onclick="onClick_Search();" title="Start searching."
  62. SRCNORMAL="hcp://system/images/24x24/arrow_green_normal.bmp"
  63. SRCMOUSEOVER="hcp://system/images/24x24/arrow_green_mouseover.bmp"
  64. SRCMOUSEDOWN="hcp://system/images/24x24/arrow_green_mousedown.bmp">
  65. </BUTTON>
  66. </TD>
  67. <TD VALIGN=middle ALIGN=right WIDTH=100%>
  68. <TABLE border=0 cellpadding=0 cellspacing=0 WIDTH=100% HEIGHT=100%>
  69. <TR>
  70. <TD ROWSPAN=1 VALIGN=middle ALIGN=right WIDTH=100% id=noloc2>
  71. <helpcenter:bitmap id=noloc3 tabIndex=-1 class="Logo" AutoRTL="true" SRCNORMAL="hcp://system/images/32x32/logo.bmp"></helpcenter:bitmap>
  72. </TD>
  73. <TD VALIGN=middle>
  74. <DIV id=idAppLogo class="sys-header-color-logo" NOWRAP style="overflow: hidden">
  75. <DIV id=idAppLogo2 class="LogoSKU sys-font-heading1" NOWRAP>Help and Support Center</DIV>
  76. </DIV>
  77. </TD>
  78. </TR>
  79. </TABLE>
  80. </TD>
  81. </TR>
  82. <TR>
  83. <TD id=noloc4>
  84. &nbsp;
  85. </TD>
  86. <TD id=locSearchAdv HEIGHT=24px valign=top>
  87. <DIV NOWRAP id=idSrcAdv><A class="sys-link-header" href="none" onclick="onClick_AdvSearch();">Set search options</A></DIV>
  88. </TD>
  89. <TD id=locAppLogo valign=top ALIGN=right>
  90. <DIV id=idAppLogo class="LogoSKU sys-header-color-logo" NOWRAP style="overflow: hidden">
  91. <DIV id=idAppLogo3 NOWRAP></DIV>
  92. </DIV>
  93. </TD>
  94. </TR>
  95. </TABLE>
  96. </DIV>
  97. <DIV id=noloc5 style="overflow: hidden; width: 100%; height: 3px" class="sys-header-gradient-H"></DIV>
  98. </BODY>
  99. <SCRIPT ID=Script1_noloc SRC="hcp://system/scripts/Common.js"></SCRIPT>
  100. <SCRIPT>
  101. /////////////////////////////////////////////////////////////////////////////
  102. //
  103. // localizable variables/filenames
  104. //
  105. var L_QueryTooLong_Message = "Your search text is too long. Type a shorter phrase, or just a few keywords.";
  106. var L_MissingSearch_Message = "You should enter at least one keyword.";
  107. var L_Back_Message = "&Back";
  108. var L_Forward_Message = "&Forward";
  109. var L_SelectAll_Message = "&Select All";
  110. var L_Print_Message = "&Print";
  111. var L_PrintMulti_Message = "&Print...";
  112. var L_Refresh_Message = "&Refresh";
  113. var L_Properties_Message = "Proper&ties";
  114. var L_AddFavorites_Message = "&Add To Favorites";
  115. var L_FavoriteAdded_Message = "This page has been added to your Help and Support Favorites list.";
  116. var L_FavoriteDupe_Message = "You already have a Favorite link to this topic.";
  117. ////////////////////
  118. var g_options = pchealth.UserSettings.Options;
  119. var g_FirstRun = true;
  120. ////////////////////////////////////////////////////////////////////////////////
  121. // Search Engine Wrapper Variable Save State
  122. var g_aSearchVar = new Array();
  123. var g_semgr = null;
  124. var ID_PSSONLINEWRAPPER = "D23D0028-A543-4767-B4AA-1581D8E1CDB2";
  125. var ID_FTS = "9A22481C-1795-46f3-8CCA-7D78E9E54112";
  126. var ID_KEYWORD = "9488F2E9-47AF-46da-AE4A-86372DEBD56C";
  127. g_aSearchVar["HCPrevQuery"] = "";
  128. // *************************************************
  129. // Server DCR : Add option to select default wrapper
  130. // Begin
  131. var REGKEY_WRAPPER_DISPLAY = "HKCU\\SOFTWARE\\Microsoft\\PCHealth\\HelpSvc\\WrapperDisplay";
  132. function GetDefaultWrapper()
  133. {
  134. var idWrapperDisplay = "";
  135. try
  136. {
  137. var idWrapperDisplay = pchealth.RegRead( REGKEY_WRAPPER_DISPLAY );
  138. }
  139. catch (e)
  140. {
  141. idWrapperDisplay = "";
  142. }
  143. return idWrapperDisplay;
  144. }
  145. function SetDefaultWrapper(idWrapper)
  146. {
  147. if (idWrapper == "")
  148. return;
  149. try
  150. {
  151. pchealth.RegWrite( REGKEY_WRAPPER_DISPLAY, idWrapper );
  152. }
  153. catch(e)
  154. {
  155. ;
  156. }
  157. return;
  158. }
  159. // End
  160. // Server DCR : Add option to select default wrapper
  161. // *************************************************
  162. function GetSearchEngineConfig()
  163. {
  164. var sku = pchealth.UserSettings.CurrentSKU;
  165. return "HKCU\\SOFTWARE\\Microsoft\\PCHealth\\HelpCtr\\UserSettings\\SearchParam\\" + sku.SKU + "\\" + sku.Language + "\\";
  166. }
  167. function GetSearchEngineManager()
  168. {
  169. // Check if SKU has changed or g_semgr is null
  170. if(g_semgr == null)
  171. {
  172. g_semgr = pchealth.CreateObject_SearchEngineMgr();
  173. }
  174. else
  175. {
  176. try { g_semgr.AbortQuery(); } catch(e) {}
  177. }
  178. return g_semgr;
  179. }
  180. function SetWrapperVar(strIndex, Value)
  181. {
  182. g_bSaved = true;
  183. g_aSearchVar[strIndex] = Value;
  184. }
  185. function GetWrapperVar(strIndex)
  186. {
  187. return g_aSearchVar[strIndex];
  188. }
  189. function FindWrapper( strID )
  190. {
  191. try
  192. {
  193. // Find the wrapper
  194. for(var oEnumEngine = new Enumerator( GetSearchEngineManager().EnumEngine() ); !oEnumEngine.atEnd(); oEnumEngine.moveNext())
  195. {
  196. var oWrapper = oEnumEngine.item();
  197. if(oWrapper.ID == strID)
  198. {
  199. return oWrapper;
  200. }
  201. }
  202. }
  203. catch(e)
  204. {
  205. }
  206. return null;
  207. }
  208. ////////////////////////////////////////////////////////////////////////////////
  209. function CancelEvent()
  210. {
  211. event.cancelBubble = true;
  212. event.returnValue = false;
  213. }
  214. /////////////////////////////////////////////////////////////////////////////
  215. function ProcessToolbarCommands( tb, id, extra )
  216. {
  217. if(CanProceed())
  218. {
  219. switch(id)
  220. {
  221. case "BACK":
  222. if(pchealth.HelpSession.IsValid( -1 ))
  223. {
  224. pchealth.HelpSession.Back( 1 );
  225. }
  226. break;
  227. case "FORWARD":
  228. if(pchealth.HelpSession.IsValid( 1 ))
  229. {
  230. pchealth.HelpSession.Forward( 1 );
  231. }
  232. break;
  233. case "PRINT":
  234. try
  235. {
  236. pchealth.Print( null, true );
  237. }
  238. catch(e)
  239. {
  240. }
  241. break;
  242. case "HOME":
  243. pchealth.HelpSession.ChangeContext( "homepage" );
  244. break;
  245. case "INDEX":
  246. pchealth.HelpSession.ChangeContext( "index" );
  247. break;
  248. case "FAVORITES":
  249. pchealth.HelpSession.ChangeContext( "favorites" );
  250. break;
  251. case "HISTORY":
  252. pchealth.HelpSession.ChangeContext( "history" );
  253. break;
  254. case "OPTIONS":
  255. pchealth.HelpSession.ChangeContext( "options" );
  256. break;
  257. case "SUPPORT":
  258. pchealth.HelpSession.ChangeContext( "channels" );
  259. break;
  260. case "SEARCH":
  261. {
  262. var query = idSrcInput.value;
  263. if(query.length > 256)
  264. {
  265. pchealth.MessageBox( L_QueryTooLong_Message, "OK" );
  266. idSrcInput.focus();
  267. }
  268. else if(query == "")
  269. {
  270. pchealth.MessageBox( L_MissingSearch_Message, "OK" );
  271. idSrcInput.focus();
  272. }
  273. else
  274. {
  275. pchealth.HelpSession.ChangeContext( "search", query );
  276. }
  277. }
  278. break;
  279. case "LAYOUT_SMALL": onClick_ChangeView( "contentonly" ); break;
  280. case "LAYOUT_LARGE": onClick_ChangeView( "normal" ); break;
  281. case "ADDFAVORITE":
  282. {
  283. var fav = pchealth.UserSettings.Favorites;
  284. var url = extra ? extra : pchealth.HelpSession.CurrentContext.URL;
  285. if(fnFavorites_IsValid( url ))
  286. {
  287. if(fav.IsDuplicate( url ))
  288. {
  289. pchealth.MessageBox( L_FavoriteDupe_Message, "OK" );
  290. }
  291. else
  292. {
  293. fav.Add( url );
  294. pchealth.MessageBox( L_FavoriteAdded_Message, "OK" );
  295. }
  296. }
  297. }
  298. break;
  299. }
  300. }
  301. }
  302. ////////////////////////////////////////////////////////////////////////////////
  303. function onKeyPress_SearchInput()
  304. {
  305. if(event.keyCode == 13) onClick_Search();
  306. }
  307. function onClick_Search()
  308. {
  309. CancelEvent();
  310. ProcessToolbarCommands( idTB, "SEARCH" );
  311. }
  312. function onClick_AdvSearch()
  313. {
  314. CancelEvent();
  315. if(CanProceed())
  316. {
  317. pchealth.HelpSession.ChangeContext( "search", "", "hcp://system/panels/advsearch.htm" );
  318. }
  319. }
  320. ////////////////////////////////////////////////////////////////////////////////
  321. var oState = new Object();
  322. oState.fMiniView = false;
  323. oState.fInit = false;
  324. function onClick_ChangeView( option )
  325. {
  326. var navbar = pchealth.UI_NavBar;
  327. var win;
  328. var posX;
  329. var posY;
  330. var dimW;
  331. var dimH;
  332. var place;
  333. //
  334. // If the application is shutting down, "external" is no longer available, so quit.
  335. //
  336. try
  337. {
  338. win = navbar.content.parentWindow.external.window;
  339. }
  340. catch(e)
  341. {
  342. return;
  343. }
  344. if(!win.places.currentPlace) return; // Not initialized
  345. if(win.places.currentPlace.name == "ContentOnly")
  346. {
  347. if(option && option == "contentonly") return; // Already content only view.
  348. if(oState.fInit == false)
  349. {
  350. // We didn't shrink, so restore some default shape...
  351. oState.left = win.x;
  352. oState.top = win.y;
  353. oState.width = win.width;
  354. oState.height = win.height + 80;
  355. oState.maximized = win.maximized;
  356. oState.place = "FullWindow";
  357. oState.fMiniView = true;
  358. oState.fInit = true;
  359. }
  360. if(oState.fMiniView == false) return; // We didn't shrink...
  361. posX = oState.left;
  362. posY = oState.top;
  363. dimW = oState.width;
  364. dimH = oState.height;
  365. fMax = oState.maximized;
  366. place = oState.place;
  367. oState.fMiniView = false;
  368. }
  369. else
  370. {
  371. if(option && option == "normal") return; // Already normal view.
  372. if(oState.fMiniView == true) return; // We did already shrink...
  373. var contents = pchealth.UI_Contents; if(contents.visible == false) contents = pchealth.UI_HHWindow;
  374. var mininavbar = pchealth.UI_MiniNavBar;
  375. var extraW = win.width - navbar.width;
  376. var extraH = win.height - navbar.height - mininavbar.height - contents.height;
  377. oState.left = win.x;
  378. oState.top = win.y;
  379. oState.width = win.width;
  380. oState.height = win.height;
  381. oState.maximized = win.maximized;
  382. oState.place = window.external.places.currentPlace.name;
  383. oState.fMiniView = true;
  384. oState.fInit = true;
  385. if(document.documentElement.dir == "rtl")
  386. {
  387. posX = oState.left /*- contents.x*/;
  388. }
  389. else
  390. {
  391. posX = oState.left + contents.x;
  392. }
  393. posY = oState.top + mininavbar.y;
  394. dimW = contents.width + extraW;
  395. dimH = contents.height + mininavbar.height + extraH;
  396. fMax = false;
  397. place = "ContentOnly";
  398. }
  399. window.external.panels.lockLayout();
  400. window.external.places.transitionTo( place );
  401. win.maximized = fMax;
  402. win.setWindowDimensions( posX, posY, dimW, dimH );
  403. window.external.panels.unlockLayout();
  404. SetButtonsState();
  405. }
  406. ////////////////////////////////////////////////////////////////////////////////
  407. function fnFavorites_IsValid( url )
  408. {
  409. if(!url) return false;
  410. if(url.match( /^hcp:\/\/system/i )) return false;
  411. if(url.match( /^hcp:\/\/services/i )) return true;
  412. if(url.match( /^http:/i )) return true;
  413. if(url.match( /^https:/i )) return true;
  414. if(url.match( /^hcp:/i )) return true;
  415. if(url.match( /^its:/i )) return true;
  416. if(url.match( /^ms-its:/i )) return true;
  417. if(url.match( /^mk:@MSITStore:/i )) return true;
  418. return false;
  419. }
  420. function fnPrint_IsValid( url )
  421. {
  422. if(!url) return false;
  423. if(fnFavorites_IsValid( url ) == false)
  424. {
  425. if(url.match( /^hcp:\/\/system\/panels/i )) return false;
  426. if(url.match( /^hcp:\/\/system\/scripts/i )) return false;
  427. if(url.match( /^hcp:\/\/system\/errors/i )) return false;
  428. if(url.match( /^hcp:\/\/system\/css/i )) return false;
  429. }
  430. return true;
  431. }
  432. function PopupPrintDialog( mode, data )
  433. {
  434. var state = new Object();
  435. state.Mode = mode;
  436. state.Data = data;
  437. state.fEmpty = true;
  438. state.Single = null;
  439. state.Topics = null;
  440. state.Nodes = null;
  441. state.num = 0;
  442. state.seen = [];
  443. state.isValid = fnPrint_IsValid;
  444. return window.showModalDialog( "hcp://system/dialogs/print.dlg", state, "dialogWidth: 40em; dialogHeight: 17em; help:no; resizable:no; status:no" );
  445. }
  446. function DoCommonContextMenu( id, mode, data )
  447. {
  448. var cm = pchealth.CreateObject_ContextMenu();
  449. var pageToProcessPrint = null;
  450. var pageToProcessFav = null;
  451. if(id == 4) return "DELEGATE"; // CONTEXT_MENU_TEXTSELECT
  452. cm.AddItem ( L_Back_Message , "BACK" , pchealth.HelpSession.IsValid( -1 ) ? MF_ENABLED : MF_GRAYED );
  453. cm.AddItem ( L_Forward_Message, "FORWARD", pchealth.HelpSession.IsValid( 1 ) ? MF_ENABLED : MF_GRAYED );
  454. cm.AddSeparator( );
  455. if(id != -1)
  456. {
  457. cm.AddItem ( L_SelectAll_Message, "SELECTALL", MF_ENABLED );
  458. cm.AddSeparator( );
  459. }
  460. if(mode == "subsite" && data.Entry == "") // It's actually a single topic.
  461. {
  462. mode = "normal";
  463. data = data.TopicURL;
  464. }
  465. if(mode == "normal")
  466. {
  467. if(!data) data = pchealth.HelpSession.CurrentContext.URL;
  468. if(data && fnPrint_IsValid( data ))
  469. {
  470. pageToProcessPrint = data;
  471. }
  472. if(data && fnFavorites_IsValid( data ))
  473. {
  474. pageToProcessFav = data;
  475. }
  476. }
  477. if(mode == "subsite")
  478. {
  479. cm.AddItem( L_PrintMulti_Message, "PRINT", data ? MF_ENABLED : MF_GRAYED );
  480. }
  481. else
  482. {
  483. cm.AddItem( L_Print_Message, "PRINT", pageToProcessPrint ? MF_ENABLED : MF_GRAYED );
  484. }
  485. cm.AddItem( L_Refresh_Message, "REFRESH", pageToProcessFav ? MF_ENABLED : MF_GRAYED );
  486. cm.AddSeparator( );
  487. cm.AddItem ( L_AddFavorites_Message, "ADDFAVORITE", pageToProcessFav ? MF_ENABLED : MF_GRAYED );
  488. if(id != -1)
  489. {
  490. cm.AddSeparator( );
  491. cm.AddItem ( L_Properties_Message, "PROPERTIES", MF_ENABLED );
  492. }
  493. var res = cm.Display();
  494. switch(res)
  495. {
  496. case "BACK":
  497. window.setTimeout( "pchealth.HelpSession.Back( 1 );", 10 );
  498. break;
  499. case "FORWARD":
  500. window.setTimeout( "pchealth.HelpSession.Forward( 1 );", 10 );
  501. break;
  502. case "PRINT":
  503. if(mode == "subsite")
  504. {
  505. PopupPrintDialog( "subsite", data );
  506. }
  507. if(mode == "normal")
  508. {
  509. ProcessToolbarCommands( idTB, "PRINT" );
  510. }
  511. break;
  512. case "ADDFAVORITE":
  513. if(pageToProcessFav)
  514. {
  515. ProcessToolbarCommands( idTB, "ADDFAVORITE", pageToProcessFav );
  516. }
  517. break;
  518. default:
  519. return res;
  520. }
  521. return "";
  522. }
  523. function isinput( src )
  524. {
  525. if(src)
  526. {
  527. switch(src.tagName.toUpperCase())
  528. {
  529. case "INPUT" :
  530. case "SELECT" :
  531. case "TEXTAREA":
  532. return true;
  533. }
  534. }
  535. return false;
  536. }
  537. function check_cm()
  538. {
  539. if(isinput( event.srcElement )) return true;
  540. event.cancelBubble = true;
  541. event.returnValue = false;
  542. return false;
  543. }
  544. function GlobalContextMenu( id, src, x, y )
  545. {
  546. if(isinput( src )) return "DELEGATE";
  547. return DoCommonContextMenu( id, "normal", src.tagName == "A" ? src.href : null );
  548. }
  549. ////////////////////////////////////////
  550. function navbar_BeforeNavigate()
  551. {
  552. // Only redirect if NOT an history navigation.
  553. if(pchealth.HelpSession.IsNavigating()) return;
  554. var data = event.srcElement.data;
  555. var url = data.URL;
  556. var fRedirect = false;
  557. //
  558. // Old compatibility stuff.
  559. //
  560. if(data.URL == "hcp://system/channels.htm")
  561. {
  562. data.Cancel = true;
  563. pchealth.HelpSession.ChangeContext( "Channels", "" );
  564. return;
  565. }
  566. }
  567. function CanProceed()
  568. {
  569. if(pchealth.HelpSession.IsNavigating()) return false;
  570. return true;
  571. }
  572. function navbar_UpdateButtons()
  573. {
  574. SetButtonsState();
  575. }
  576. function SetButtonsState()
  577. {
  578. idTB.SetState( "BACK" , pchealth.HelpSession.IsValid( -1 ) );
  579. idTB.SetState( "FORWARD", pchealth.HelpSession.IsValid( 1 ) );
  580. }
  581. function BuildPage()
  582. {
  583. navbar_OptionsChanged();
  584. UpdateEdition();
  585. }
  586. function UpdateEdition()
  587. {
  588. idAppLogo3.innerText = pchealth.UserSettings.CurrentSKU.DisplayName;
  589. }
  590. ////////////////////////////////////////////////////////////////////////////////
  591. function debug_BuildTree( doc )
  592. {
  593. var strStruct = "<HTML><TITLE>Document Tree</TITLE><BODY>" + debug_BuildNode( doc ) + "</BODY></HTML>";
  594. try
  595. {
  596. var fso = new ActiveXObject( "Scripting.FileSystemObject" );
  597. var tfolder = fso.GetSpecialFolder( 2 );
  598. var name = fso.GetTempName();
  599. var file = fso.CreateTextFile( tfolder + "\\" + name, true );
  600. file.Write( strStruct );
  601. file.Close( );
  602. window.showModalDialog( tfolder + "\\" + name, "", "dialogWidth:500px; dialogHeight:500px; help:no; resizable:yes; status:no" );
  603. fso.DeleteFile( tfolder + "\\" + name );
  604. }
  605. catch(e)
  606. {
  607. }
  608. }
  609. function debug_BuildNode( node )
  610. {
  611. var strStruct = "<DIV>" + node.tagName + "<BR>";
  612. var iSeen = false;
  613. var tags = node.childNodes;
  614. // Walk through every element in the document.
  615. for(var i = 0; i < tags.length; i++)
  616. {
  617. var obj = tags[i];
  618. if(iSeen == false)
  619. {
  620. strStruct += "<TABLE BORDER CELLPADDING=5><TR>";
  621. iSeen = true;
  622. }
  623. if(obj.tagName)
  624. {
  625. strStruct += "<TD>" + debug_BuildNode( obj ) + "</TD>";
  626. }
  627. else
  628. {
  629. strStruct += "<TD>" + obj.nodeValue + "</TD>";
  630. }
  631. }
  632. if(iSeen)
  633. {
  634. strStruct += "</TR></TABLE>";
  635. }
  636. return strStruct + "</DIV>";
  637. }
  638. function navbar_ContextSwitch()
  639. {
  640. var ctx = pchealth.HelpSession.CurrentContext;
  641. if(ctx.ContextName == "SUBSITE") UpdateEdition();
  642. navbar_UpdateButtons();
  643. }
  644. function navbar_TravelDone()
  645. {
  646. navbar_UpdateButtons();
  647. if(g_FirstRun)
  648. {
  649. g_FirstRun = false;
  650. if(pchealth.UI_NavBar.visible)
  651. {
  652. window.setTimeout( "idSrcInput.focus();", 100 );
  653. }
  654. }
  655. }
  656. function navbar_Shutdown()
  657. {
  658. if(pchealth.UI_NavBar.visible == false)
  659. {
  660. switch(external.places.currentPlace.name)
  661. {
  662. case "KioskMode":
  663. break;
  664. default:
  665. onClick_ChangeView();
  666. break;
  667. }
  668. }
  669. if(g_semgr)
  670. {
  671. try { g_semgr.AbortQuery(); } catch(e) {}
  672. }
  673. }
  674. function navbar_SwitchedHelpFiles()
  675. {
  676. // throw away previous g_semgr
  677. g_aSearchVar = new Array();
  678. g_semgr = null;
  679. UpdateEdition();
  680. }
  681. function navbar_OptionsChanged()
  682. {
  683. idTB.SetVisibility( "FAVORITES", g_options.ShowFavorites );
  684. idTB.SetVisibility( "HISTORY" , g_options.ShowHistory );
  685. if(idTB.Mode != g_options.TextLabels)
  686. {
  687. idTB.Mode = g_options.TextLabels;
  688. }
  689. }
  690. ////////////////////////////////////////////////////////////////////////////////
  691. //
  692. // Code for validating an outside link
  693. //
  694. function SanitizeLink( strLink )
  695. {
  696. var reScript = new RegExp( "(javascript:|vbscript:|<|>)", "i");
  697. if(reScript.test( strLink))
  698. {
  699. return null;
  700. }
  701. var reAppHTTP = new RegExp( "^(app:http:)", "i" );
  702. if(reAppHTTP.test( strLink ))
  703. {
  704. var strURL = strLink.slice( 9 );
  705. var strParsedURL = pchealth.TextHelpers.ParseURL( strURL );
  706. var strBase = strParsedURL.BasePart;
  707. strBase = pchealth.TextHelpers.URLUnescape( strBase, true );
  708. strBase = pchealth.TextHelpers.URLEscape( strBase, true );
  709. strParsedURL.BasePart = strBase;
  710. var strFinalURL = strParsedURL.BuildFullURL();
  711. return( "app:http:" + strFinalURL );
  712. }
  713. var reHCPNews = new RegExp( "^(hcp://)", "i" );
  714. if(reHCPNews.test( strLink ))
  715. {
  716. var strURL = strLink.slice( 6 );
  717. var strParsedURL = pchealth.TextHelpers.ParseURL( strURL );
  718. var strBase = strParsedURL.BasePart;
  719. strBase = pchealth.TextHelpers.URLUnescape( strBase, true );
  720. strBase = pchealth.TextHelpers.URLEscape( strBase, true );
  721. strParsedURL.BasePart = strBase;
  722. var strFinalURL = strParsedURL.BuildFullURL();
  723. return( "hcp://" + strFinalURL );
  724. }
  725. var reHTTP = new RegExp( "^(http:)", "i" );
  726. if(reHTTP.test( strLink ))
  727. {
  728. var strURL = strLink.slice( 5 );
  729. var strParsedURL = pchealth.TextHelpers.ParseURL( strURL );
  730. var strBase = strParsedURL.BasePart;
  731. strBase = pchealth.TextHelpers.URLUnescape( strBase, true );
  732. strBase = pchealth.TextHelpers.URLEscape( strBase, true );
  733. strParsedURL.BasePart = strBase;
  734. var strFinalURL = strParsedURL.BuildFullURL();
  735. return( "http:" + strFinalURL );
  736. }
  737. var reAppHTTPs = new RegExp( "^(app:https:)", "i" );
  738. if(reAppHTTPs.test( strLink ))
  739. {
  740. var strURL = strLink.slice( 10 );
  741. var strParsedURL = pchealth.TextHelpers.ParseURL( strURL );
  742. var strBase = strParsedURL.BasePart;
  743. strBase = pchealth.TextHelpers.URLUnescape( strBase, true );
  744. strBase = pchealth.TextHelpers.URLEscape( strBase, true );
  745. strParsedURL.BasePart = strBase;
  746. var strFinalURL = strParsedURL.BuildFullURL();
  747. return( "app:https:" + strFinalURL );
  748. }
  749. var reHTTPs = new RegExp( "^(https:)", "i" );
  750. if(reHTTPs.test( strLink ))
  751. {
  752. var strURL = strLink.slice( 6 );
  753. var strParsedURL = pchealth.TextHelpers.ParseURL( strURL );
  754. var strBase = strParsedURL.BasePart;
  755. strBase = pchealth.TextHelpers.URLUnescape( strBase, true );
  756. strBase = pchealth.TextHelpers.URLEscape( strBase, true );
  757. strParsedURL.BasePart = strBase;
  758. var strFinalURL = strParsedURL.BuildFullURL();
  759. return( "https:" + strFinalURL );
  760. }
  761. return null;
  762. }
  763. BuildPage();
  764. </SCRIPT>
  765. <SCRIPT LANGUAGE="JScript" EVENT="onCommand( tb, id )" FOR="idTB">
  766. ProcessToolbarCommands( tb, id );
  767. </SCRIPT>
  768. <helpcenter:events id=idEvents onBeforeNavigate="navbar_BeforeNavigate();" onContextSwitch="navbar_ContextSwitch();" onTravelDone="navbar_TravelDone();" onShutdown="navbar_Shutdown();" onSwitchedHelpFiles="navbar_SwitchedHelpFiles()" onOptionsChanged="navbar_OptionsChanged()" />
  769. <helpcenter:state id=idState identity="NavBar" />
  770. </HTML>