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.

197 lines
4.5 KiB

  1. <HTML>
  2. <HEAD>
  3. <!-- Copyright � 2001 Microsoft Corporation. All rights reserved. --></HEAD>
  4. <STYLE>
  5. body
  6. {
  7. background-color: threedface;
  8. color: buttontext;
  9. font-family:verdana;
  10. font-size:smaller;
  11. scroll:no;
  12. }
  13. table
  14. {
  15. background-color: #FFFFC2;
  16. font-size: 11;
  17. border-style: none;
  18. border-width: 0px;
  19. }
  20. td
  21. {
  22. vertical-align: top;
  23. border-style : none;
  24. border-width : 0px;
  25. padding : 0px;
  26. }
  27. input.edit
  28. {
  29. font-family: verdana;
  30. border-style:solid;
  31. border-width: 1px;
  32. background-color: #F0C8B4;
  33. height:1.75em;
  34. }
  35. input.btn
  36. {
  37. font-family: verdana;
  38. cursor:hand;
  39. border-style:solid;
  40. border-width: 1px;
  41. background-color: buttonface;
  42. height:1.75em;
  43. width:6em;
  44. margin-bottom:1ex;
  45. }
  46. .title
  47. {
  48. font-family:Verdana,Arial;
  49. font-size:11;
  50. font-weight:Bold;
  51. color:DarkGreen;
  52. text-decoration: underline;
  53. }
  54. .context
  55. {
  56. font-family:Verdana,Arial;
  57. font-size:11;
  58. color:#000000;
  59. }
  60. .recommend
  61. {
  62. font-family:Verdana,Arial;
  63. font-size:11;
  64. color:#000000;
  65. }
  66. </STYLE>
  67. </Head>
  68. <BODY tabindex="-1">
  69. <Div id="main">
  70. <table width="100%" height="98%" border="0" align="center" style="table-layout:fixed;">
  71. <tr><td>
  72. <DIV id="divLoading">
  73. <H5><CENTER><U>Replacement Guideline</U></CENTER></H5>
  74. </DIV>
  75. <div id="GuideLines" style="Display:">
  76. </div>
  77. </td></tr></table>
  78. </Div>
  79. </BODY>
  80. </HTML>
  81. <SCRIPT>
  82. // Create the xml object and load the results file
  83. var g_xmlObj = new ActiveXObject("Msxml2.DOMDocument");
  84. var g_root;
  85. var g_xmlfile = parent.GetXmlFile();
  86. function InitializeComment(strTerm)
  87. {
  88. LoadXML();
  89. PopulateComment(strTerm);
  90. }
  91. function LoadXML()
  92. {
  93. g_xmlObj.async = false;
  94. g_xmlObj.load(g_xmlfile);
  95. g_root = g_xmlObj.documentElement;
  96. }
  97. function PopulateComment(strTerm)
  98. {
  99. var htmlStr;
  100. var cnt;
  101. // Check if strTerm is blank
  102. if (strTerm == "")
  103. {
  104. htmlStr = "Term not found";
  105. DisplayComment(htmlStr);
  106. return;
  107. }
  108. // Get the Term from the xml document
  109. var xpath = "TermTbl/Term[@Term='" + strTerm + "']";
  110. var TermNode = g_root.selectSingleNode(xpath);
  111. if ( !TermNode )
  112. {
  113. htmlStr = "Term not found";
  114. DisplayComment(htmlStr);
  115. return;
  116. }
  117. var objActions = TermNode.selectSingleNode("Actions");
  118. // Construct the replacement guideline text
  119. htmlStr = "<Table border='0' width='100%' style='table-layout:fixed;'>";
  120. cnt = 1;
  121. for ( var i=0; (objActions) && i<objActions.childNodes.length; ++i )
  122. {
  123. var Action = objActions.childNodes(i);
  124. if (Action.tagName == "Context")
  125. {
  126. var Context = Action.text;
  127. var Recommend;
  128. if ( ++i < objActions.childNodes.length )
  129. Recommend = objActions.childNodes(i).text;
  130. htmlStr = htmlStr + "<Tr><Td>";
  131. htmlStr = htmlStr + "<Span class=title>" + cnt + ") Context:" + "</Span><Br>";
  132. htmlStr = htmlStr + "<Span Class=context>" + Context + "</Span>";
  133. htmlStr = htmlStr + "<Table width='90%' align='right' style='table-layout:fixed;'><Tr><Td>";
  134. htmlStr = htmlStr + "<Span class=title>Action:</Span><Br>";
  135. htmlStr = htmlStr + "<Span class=recommend>" + Recommend + "</Span>";
  136. htmlStr = htmlStr + "</Td></Tr></Table>";
  137. htmlStr = htmlStr + "<Br><Br></Td></Tr>";
  138. cnt = cnt + 1;
  139. }
  140. }
  141. var comment = TermNode.selectSingleNode("Comment");
  142. var commentText;
  143. var url;
  144. if ( comment )
  145. {
  146. commentText = comment.text;
  147. var iPos = commentText.search(/http/);
  148. if ( -1 != iPos )
  149. {
  150. url = commentText.substring(iPos, commentText.length);
  151. url = "<A href=" + url + " target=_blank>" + url + "</A>";
  152. commentText = commentText.substring(0, iPos-1);
  153. }
  154. htmlStr = htmlStr + "<Tr><Td style='word-wrap:break-word;'>";
  155. htmlStr = htmlStr + "<Span class=title>Why?</Span><Br>";
  156. htmlStr = htmlStr + "<Span Class=context>" + commentText
  157. if ( (url) && (url.length > 1) )
  158. htmlStr = htmlStr + url
  159. htmlStr = htmlStr + "</Span>";
  160. htmlStr = htmlStr + "</Td></Tr>";
  161. }
  162. htmlStr = htmlStr + "</Table>";
  163. DisplayComment(htmlStr);
  164. }
  165. function DisplayComment(htmlStr)
  166. {
  167. GuideLines.innerHTML = htmlStr;
  168. GuideLines.style.display = "";
  169. }
  170. </SCRIPT>