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.

1940 lines
72 KiB

  1. // Filename: shared.js
  2. // Version shared.js for windows server 2003
  3. // version for 2.2.3
  4. //************************************************ Shared components path setting *****************************************
  5. //*******************************************************************************************************************
  6. // Date 11/07/01
  7. //
  8. set_path = "" + document.URL
  9. ntshared = set_path.indexOf("::/")
  10. if (ntshared == -1) {
  11. var moniker= "ms-its:";
  12. var sSharedCHM = moniker+"uddi.mmc.chm::/";
  13. }
  14. else
  15. {
  16. path = set_path.substring(0,ntshared)
  17. path = path.toLowerCase()
  18. ntshared = path.lastIndexOf("\\")
  19. var moniker = path.substring(0,ntshared)+ "\\";
  20. //var ntshared = moniker.lastIndexOf("\\")
  21. //var moniker = moniker.substring(0,ntshared) + "\\";
  22. var sSharedCHM= moniker+"uddi.mmc.chm::/";
  23. }
  24. //************************************************ EVENT HANDLING ********************************************
  25. //*******************************************************************************************************************
  26. // re-directs to the proper event-driven functions.
  27. // window.onload = load_object;
  28. window.onload = loadPage;
  29. document.onclick= onclickTriage;
  30. document.onmouseover= gettingHot;
  31. document.onmouseout= gettingCold;
  32. window.onunload=saveChecklistState;
  33. window.onresize= resizeDiv;
  34. window.onbeforeprint = set_to_print;
  35. window.onafterprint = reset_form;
  36. //******************************************** USER-DEFINED GLOBAL VARIABLES ************************************
  37. //********************************************************************************************************************
  38. // The images listed below can all be changed by the user.
  39. var isIE5 = (navigator.appVersion.indexOf("MSIE 5")>0) || (navigator.appVersion.indexOf("MSIE")>0 && parseInt(navigator.appVersion)> 4);
  40. var isIE55 = (navigator.appVersion.indexOf("MSIE 5.5")>0);
  41. if (isIE5 && isIE55) isIE5 = false;
  42. var isIE6 = (navigator.appVersion.indexOf("MSIE 6")>0);
  43. var isIE4 = (navigator.appVersion.indexOf("MSIE 4")>0);
  44. if (isIE4){
  45. var moniker= "ms-its:"; // moniker= ""; for flat files
  46. var sSharedCHM= moniker+"ntshared.chm::/";
  47. }
  48. if (!isIE5 && !isIE55 && !isIE4 && !isIE6) {
  49. isIE6 = true;
  50. }
  51. var sShortcutTip= "";
  52. var gifwithin = false;
  53. if(!isIE4){
  54. xmldoc = new ActiveXObject("microsoft.XMLDOM");
  55. xmldoc.async = false;
  56. xmldoc.load(sSharedCHM + "alttext.xml");
  57. var Alt_sPreviousTip= xmldoc.getElementsByTagName("sPreviousTip")
  58. var Alt_sNextTip= xmldoc.getElementsByTagName("sNextTip")
  59. var Alt_sExpandTip= xmldoc.getElementsByTagName("sExpandTip")
  60. var Alt_sPopupTip= xmldoc.getElementsByTagName("sPopupTip")
  61. var hld_path2reuse= xmldoc.getElementsByTagName("path2reuse")
  62. var hld_path2glossary= xmldoc.getElementsByTagName("path2glossary")
  63. var hld_rel_gif = xmldoc.getElementsByTagName("reltopgif")
  64. var hld_chmName = xmldoc.getElementsByTagName("chmName")
  65. var hld_emailer = xmldoc.getElementsByTagName("emailer")
  66. var hld_sendtext = xmldoc.getElementsByTagName("sendtext")
  67. var hld_sendto = xmldoc.getElementsByTagName("sendto")
  68. //<SMARTHELP>
  69. var defaultStartMode;
  70. var defaultCPanelMode;
  71. var smartErrorTextNode;
  72. var smartErrorText;
  73. var xmldocSKUSettings;
  74. // Grab the ALTTEXT.XML enteries for smart span classes.
  75. // Get SKU specific defaults.
  76. var defaultSKUSettingsURL = xmldoc.documentElement.selectSingleNode("smartreusabletext");
  77. if (defaultSKUSettingsURL != null) {
  78. if (defaultSKUSettingsURL.text == sSharedCHM + "alttext.xml") {
  79. xmldocSKUSettings = xmldoc;
  80. } else {
  81. xmldocSKUSettings = new ActiveXObject("microsoft.XMLDOM");
  82. xmldocSKUSettings.async = false;
  83. xmldocSKUSettings.load(moniker + defaultSKUSettingsURL.text);
  84. }
  85. if (xmldocSKUSettings.documentElement != null) {
  86. defaultStartMode = xmldocSKUSettings.documentElement.selectSingleNode("smartstartdefault");
  87. defaultCPanelMode = xmldocSKUSettings.documentElement.selectSingleNode("smartcpaneldefault");
  88. smartErrorTextNode = xmldocSKUSettings.documentElement.selectSingleNode("smarterrortext");
  89. smartErrorText = smartErrorTextNode ? smartErrorTextNode.text : "XOXOX";
  90. }
  91. } // (defaultSKUSettingsURL != NULL)
  92. //</SMARTHELP>
  93. var sPreviousTip="" + Alt_sPreviousTip.item(0).nodeTypedValue
  94. var sNextTip="" + Alt_sNextTip.item(0).nodeTypedValue
  95. var sExpandTip="" + Alt_sExpandTip.item(0).nodeTypedValue
  96. var sPopupTip="" + Alt_sPopupTip.item(0).nodeTypedValue
  97. var path2reuse="" + hld_path2reuse.item(0).nodeTypedValue
  98. var path2glossary="" + hld_path2glossary.item(0).nodeTypedValue
  99. var rel_gif="" + hld_rel_gif.item(0).nodeTypedValue
  100. var chmName="" + hld_chmName.item(0).nodeTypedValue+"::/"
  101. var emailer="" + hld_emailer.item(0).nodeTypedValue
  102. var sendtext="" + hld_sendtext.item(0).nodeTypedValue
  103. var sendto="" + hld_sendto.item(0).nodeTypedValue
  104. var xmldom = new ActiveXObject("microsoft.XMLDOM");
  105. xmldom.async = false;
  106. //if (!xmlLoaded) {
  107. xmldoc = new ActiveXObject("microsoft.XMLDOM");
  108. // Init Properties
  109. xmldoc.async = false;
  110. xmldoc.validateOnParse = false; // improve perf
  111. xmldoc.resolveExternals = false;
  112. xmldoc.preserveWhiteSpace = false;
  113. // Load Document
  114. xmldoc.load(moniker + path2reuse + "reusable.xml");
  115. // if (xmldoc == null || xmldoc.documentElement == null) return; // couldn't open reusable.xml
  116. xmlLoaded = true;
  117. // }
  118. } // skip all this because ie4 doesn't support xml.
  119. else
  120. {
  121. var sPreviousTip=""
  122. var sNextTip=""
  123. var sExpandTip=""
  124. var sPopupTip=""
  125. var rel_gif="no"
  126. }
  127. var closed = sSharedCHM + "plusCold.gif"; //image used for collapsed item in callExpand()
  128. var closedHot = sSharedCHM + "plusHot.gif"; //hot image used for collapsed item in callExpand()
  129. var expand = sSharedCHM + "minusCold.gif"; //image used for expanded item in callExpand()
  130. var expandHot = sSharedCHM + "minusHot.gif"; //hot image used for expanded item in callExpand()
  131. var previousCold= sSharedCHM + "previousCold.gif";
  132. var previousHot= sSharedCHM + "previousHot.gif";
  133. var nextCold= sSharedCHM + "nextCold.gif";
  134. var nextHot= sSharedCHM + "nextHot.gif";
  135. var shortcutCold= sSharedCHM + "shortcutCold.gif";
  136. var shortcutHot= sSharedCHM + "shortcutHot.gif";
  137. var popupCold= sSharedCHM + "popupCold.gif";
  138. var popupHot= sSharedCHM + "popupHot.gif";
  139. var emptyImg= sSharedCHM + "empty.gif"; //image used for empty expand
  140. var noteImg= sSharedCHM + "note.gif"; //image used for notes
  141. var tipImg= sSharedCHM + "tip.gif"; //image used for tips
  142. var warningImg= sSharedCHM + "warning.gif"; //image used for warnings
  143. var cautionImg= sSharedCHM + "caution.gif"; //image used for cautions
  144. var importantImg= sSharedCHM + "important.gif"; //image used for important notice
  145. var relTopicsImg= sSharedCHM + "rel_top.gif"; //image used for important notice
  146. var branchImg= sSharedCHM + "elle.gif";
  147. var branchImg_RTL= sSharedCHM + "elle_rtl.gif";
  148. //******************************************** GLOBAL VARIABLES ******************************************
  149. //********************************************************************************************************
  150. var joejoe = false;
  151. var printing = false;
  152. var single = "FALSE";
  153. var scroller = "FALSE";
  154. var valet = "FALSE";
  155. var isRTL= (document.dir=="rtl");
  156. var imgStyleRTL= "";
  157. if (isRTL) imgStyleRTL=" style='filter:flipH' ";
  158. var sActX_TDC= "CLASSID='CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83'"; //Tabular Data Control for reusable text data
  159. var sSharedReusableTextFile= sSharedCHM + "reusable.xml"; // common reusable text file
  160. var sSharedReusableTextFileRecord= "para"; //reusable text record
  161. var numbers= /\d/g; //javascript regular expression
  162. var spaces= /\s/g; //javascript regular expression
  163. var semicolon= /;/g; //javascript regular expression
  164. var isPersistent= false;
  165. //******************************************** INITIALIZATION *************************************************
  166. //******************************************************************************************************************
  167. function list_them(){
  168. var envelope = sSharedCHM +'envelope.gif';
  169. var server = "<DIV Class='FeedbackBar'><SPAN Class='webOnly'><IMG SRC=" + envelope + " ALT='' BORDER='0'></SPAN><SPAN Class='webOnly' Style='position:relative; top:-1; left:1; color:#333333;'>&nbsp;" + sendtext + "&nbsp;";
  170. server += "<a href='mailto:" + sendto + "?subject=HELP: ";
  171. server += document.title + "'";
  172. server += ">" + sendto + "</a></SPAN></DIV>";
  173. var i;
  174. for (i=0; i < document.all.length; i++){
  175. if ((document.all[i].tagName == "P") ||
  176. (document.all[i].tagName == "H1")||
  177. (document.all[i].tagName == "H6")){
  178. document.all[i].outerHTML = server + document.all[i].outerHTML;
  179. i = document.all.length;
  180. }
  181. }
  182. }
  183. //*** loadPage **********************************************************************************************
  184. // Adds the default image tags and re-usable text to the HTML page.
  185. function loadPage(){
  186. if (printing == true) return;
  187. if (emailer == "yes" ) list_them();
  188. isPersistent= (document.all.item("checklist")!=null) && ((isIE5) || (isIE55) ||(isIE6));
  189. setPreviousNext();
  190. resizeDiv();
  191. if (isPersistent) getChecklistState();
  192. load_object();
  193. addReusableText();
  194. insertImages();
  195. }
  196. //****** setPreviousNext ************************************************************************ *********************************************************************************************
  197. // insert previous/next navbar
  198. // called by: <div id="nav">@@HTMLsequenceFile.txt or .lst@@</div>
  199. function setPreviousNext(){
  200. var oNav = document.all.item("nav");
  201. if (oNav == null ) return;
  202. var sPreviousALT= sPreviousTip;
  203. var sNextALT= sNextTip;
  204. var sHTMLfile= oNav.innerHTML;
  205. var imgPrev= "<IMG SRC='"+previousCold+"' BORDER=0 ALT='"+ sPreviousALT +"' ALIGN='top' "+ imgStyleRTL +">";
  206. var imgNext= "<IMG SRC='"+nextCold+"' BORDER=0 ALT='"+ sNextALT + "' ALIGN='top' "+ imgStyleRTL +">";
  207. var previousNextObject= "<OBJECT ID='HTMlist' WIDTH=100 HEIGHT=51 " + sActX_TDC +"><param name='DataURL' value='"
  208. +sHTMLfile +"'><param name='UseHeader' value=True></OBJECT>";
  209. oNav.innerHTML= "<TABLE WIDTH='100%' STYLE='margin-top:0;' cellspacing=0>"
  210. + "<TR><TD style='text-align=left; background-color:transparent'><A ID='previousLink' HREF='#' REL='previous' CLASS='navbar'>"
  211. +imgPrev + "</A></TD><TD width='100%' align='center'></td><TD style='text-align=right; background-color:transparent'><A ID='nextLink' HREF='#' REL='next' CLASS='navbar'>"
  212. +imgNext+ "</A></TD></TR></TABLE>";
  213. document.body.innerHTML= document.body.innerHTML + previousNextObject;
  214. findPageSeq();
  215. if (printing == true) return;
  216. var thisLoc= document.location.href +"#";
  217. if (previousLink.href== thisLoc) previousLink.style.display="none";
  218. else previousLink.style.display="block";
  219. if (nextLink.href== thisLoc) nextLink.style.display="none";
  220. else nextLink.style.display="block";
  221. }
  222. function findPageSeq() {
  223. var rs= HTMlist.recordset;
  224. var thisLoc= document.location.href;
  225. var iLoc= thisLoc.lastIndexOf("/");
  226. if (iLoc > 0) thisLoc= thisLoc.substring(iLoc+1, thisLoc.length);
  227. if (nav.style == "[object]") {
  228. nav.style.visibility="hidden";
  229. printing = false;
  230. }
  231. else
  232. {
  233. printing = true;
  234. return;
  235. }
  236. rs.moveFirst();
  237. while (!rs.EOF) {
  238. if (thisLoc == rs.fields("HTMfiles").value){
  239. nav.style.visibility="visible";
  240. rs.MoveNext();
  241. break;
  242. }
  243. previousLink.href=rs.fields("HTMfiles").value;
  244. rs.moveNext();
  245. }
  246. if (!rs.EOF) nextLink.href=rs.fields("HTMfiles").value;
  247. }
  248. //******Re-usable text *********************************************************************************************
  249. // Inserts the Tabular Data Control (TDC) object at the end of the page
  250. // Inserts "re-usable text" from the txt file at: <span id="@@CHM_name@@@@index#@@" class="reuse"></span>
  251. // e.g.<span id="printing4" class="reuse"></span> for record#4 in the printing.txt in printing.chm.
  252. // <SMARTREUSABLETEXT>
  253. // addReusableText() - called during document load to find all references
  254. // render time bound <SPAN> contents. Extracts content resources from reusable.xml.
  255. //
  256. // "class" names bound (reuse, smart)
  257. // "reuse" static lookup of commonly referred to text.
  258. // "smart" dynamic lookup of navigation text relevent
  259. // to the shell presentation of the start menu
  260. // and the control panel, (simple and classic), for the logged on user.
  261. // Requires inserting custom <OBJECT> supported by Help and Support Services viewer.
  262. // Currently not available from HTML Help control. 2000/01/12.
  263. //
  264. function smarthelperror(){
  265. // alert("error - error")
  266. addReusableText();
  267. insertImages();
  268. return true;
  269. // alert("error - error")
  270. }
  271. //var obj = window.document.createElement("OBJECT");
  272. function load_object(){
  273. if(!isIE6) return;
  274. //window.onerror = smarthelperror;
  275. try{
  276. var obj = window.document.createElement("OBJECT");
  277. var sActX_PCHealth = "CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7";
  278. objLoaded = true;
  279. obj.width = 1;
  280. obj.height = 1;
  281. obj = document.body.insertAdjacentElement("beforeEnd", obj)
  282. obj.id = "pchealth";
  283. obj.classid = sActX_PCHealth;
  284. // alert("success")
  285. }
  286. catch(e){}
  287. }
  288. function addReusableText(){
  289. if (isIE4) return; // no reusable text for IE4
  290. var coll = document.all.tags("SPAN");
  291. var xmlLoaded = false;
  292. var control = null;
  293. var thisID;
  294. var strKey;
  295. var text;
  296. // original error text
  297. text = "OXO";
  298. //<SMARTREUSABLETEXT>
  299. //queried state of shell presentation for start menu and control panel.
  300. var menuSimple = false;
  301. var controlSimple = false;
  302. // holds calculated lookup suffixes for smart class items.
  303. var strSuffixStartMenuOnly = "";
  304. var strSuffixStartMenuAndControlPanel = "";
  305. // smart class UserSettings Interface classid
  306. var sActX_PCHealth = "CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7";
  307. // smart class lookup suffixes per shell presentation mode.
  308. // TODO: Findout where these constants are best documented.
  309. var strMenuClassic = "_smclassic";
  310. var strMenuSimple = "_smsimple";
  311. var strCPanelClassic = "_cpclassic";
  312. var strCPanelSimple = "_cpsimple";
  313. // only attempt to query once per rendering
  314. var bPresentationModeQueried = false;
  315. //</SMARTREUSABLETEXT>
  316. span_count = coll.length;
  317. // Check every span in the document.
  318. for (var i=0; i< span_count; i++) {
  319. var thisSpan = coll[i];
  320. var spanClass = thisSpan.className.toLowerCase();
  321. if (spanClass == "reuse" || spanClass == "smart") {
  322. if (isRTL) thisSpan.dir = "rtl";
  323. if (thisSpan.id == null) break;
  324. // strKey is the key we'll use to look up the replaceable text in the XML file
  325. strKey = thisSpan.id.toLowerCase();
  326. // skip smart tags when defaults are not present
  327. if ((defaultSKUSettingsURL != null) && (xmldocSKUSettings.documentElement != null)) {
  328. if (spanClass == "smart") {
  329. // Query Presentation Mode once per rendering.
  330. if (!bPresentationModeQueried) {
  331. bPresentationModeQueried=true;
  332. // Set To Defaults
  333. if (defaultStartMode != null) {
  334. menuSimple = (defaultStartMode.text == strMenuSimple);
  335. } else {
  336. menuSimple = true;
  337. }
  338. if (defaultCPanelMode != null) {
  339. controlSimple = (defaultCPanelMode.text == strCPanelSimple);
  340. } else {
  341. controlSimple = true;
  342. }
  343. // alert("inside of reuse")
  344. // Get the current user's presentation settings
  345. // Attempt to read smart help values from system
  346. var test = window.document.all("pchealth");
  347. if (test != null) {
  348. if (test.UserSettings != null) {
  349. menuSimple = test.UserSettings.IsStartPanelOn;
  350. controlSimple = test.UserSettings.IsWebViewBarricadeOn;
  351. }
  352. else
  353. {
  354. menuSimple = (defaultStartMode.text == strMenuSimple)
  355. controlSimple = (defaultCPanelMode.text == strCPanelSimple);
  356. }
  357. }// (test != null)
  358. }// (!bPresentationModeQueried)
  359. // get the error text to display
  360. text = smartErrorText;
  361. // Build key suffixes. One for start menu only and one for start menu and control panel.
  362. strSuffixStartMenuOnly = (menuSimple ? strMenuSimple : strMenuClassic);
  363. strSuffixStartMenuAndControlPanel = strSuffixStartMenuOnly + (controlSimple ? strCPanelSimple : strCPanelClassic);
  364. // The actual key could have either strSuffixStartMenuOnly or strSuffixStartMenuAndControlPanel suffixes.
  365. // strSuffixStartMenuAndControlPanel has precedence over strSuffixStartMenuOnly
  366. strKey = strKey + strSuffixStartMenuAndControlPanel;
  367. //alert(strKey)
  368. }//if (spanClass == "smart")
  369. }// ((defaultSKUSettingsURL != null) && (xmldocSKUSettings.documentElement != null))
  370. // Lookup XML node containing reference
  371. var strNodeSelector = "glossSection/entry[@entryID='" + strKey + "']/scopeDef/def";
  372. var node = xmldoc.documentElement.selectSingleNode(strNodeSelector);
  373. // if we haven't found the node yet, try the other suffix if this is a smart span
  374. if (node == null && spanClass == "smart" && (defaultSKUSettingsURL != null) && (xmldocSKUSettings.documentElement != null)) {
  375. // one more try--use the other suffix
  376. strKey = thisSpan.id.toLowerCase() + strSuffixStartMenuOnly;
  377. strNodeSelector = "glossSection/entry[@entryID='" + strKey + "']/scopeDef/def";
  378. node = xmldoc.documentElement.selectSingleNode(strNodeSelector);
  379. }
  380. // okay, we found the node, get the text
  381. // alert(coll.length)
  382. if (node != null) {
  383. // replace the span's contents with the reusable text
  384. thisSpan.insertAdjacentHTML("BeforeBegin",node.text);
  385. // var coll = document.all.tags("SPAN");
  386. thisSpan.className = "anything"
  387. thisSpan.innerHTML = "";
  388. //alert(node.text)
  389. //thisSpan.innerHTML = node.text;
  390. } else {
  391. // error shown by this OXO
  392. thisSpan.innerHTML = text;
  393. }
  394. } // if (spanClass == "reuse" || spanClass == "smart")
  395. }// for
  396. }// addReusableText()
  397. // <SMARTREUSABLETEXT>
  398. //****** insertImages *********************************************************************************************
  399. // Inserts shared images in User-Defined Variables section and thumbnails.
  400. var booking = false;
  401. function insertImages(){
  402. if (printing == false) booking = true;
  403. if (printing == true && booking == true ) {
  404. booking = false;
  405. return;
  406. }
  407. // insert alert icons
  408. var collP = document.all.tags("P");
  409. for (var i=0; i<collP.length; i++) {
  410. if (collP[i].className.toLowerCase()=="note") collP[i].innerHTML ="<img class='alert' src='"+noteImg+"' "+ imgStyleRTL +"> " + collP[i].innerHTML;
  411. else if (collP[i].className.toLowerCase()=="warning") collP[i].innerHTML ="<img class='alert' src='"+warningImg+"'> " + collP[i].innerHTML;
  412. else if (collP[i].className.toLowerCase()=="caution") collP[i].innerHTML ="<img class='alert' src='"+cautionImg+"'> " + collP[i].innerHTML;
  413. else if (collP[i].className.toLowerCase()=="tip") collP[i].innerHTML ="<img class='alert' src='"+tipImg+"'> " + collP[i].innerHTML;
  414. else if (collP[i].className.toLowerCase()=="important") collP[i].innerHTML ="<img class='alert' src='"+importantImg+"'> " + collP[i].innerHTML;
  415. else if (collP[i].className.toLowerCase()=="empty") collP[i].innerHTML ="<img class='alert' src='"+emptyImg+"'> " + collP[i].innerHTML;
  416. if (collP[i].className.toLowerCase()=="reltopics" && rel_gif == "yes") {
  417. collP[i].outerHTML ="<img class='relTopics' src='"+relTopicsImg+"'> " + collP[i].outerHTML;
  418. }
  419. }
  420. //alert(printing)
  421. //alert(isIE55)
  422. //indents for Navigation Tree
  423. var collUL = document.all.tags("UL");
  424. if (!printing) {
  425. for (var i=0; i<collUL.length; i++) {
  426. var indent= 0;
  427. if (collUL[i].className.toLowerCase()=="navtree"){
  428. if (isRTL) collUL[i].style.listStyleImage= "url('" + branchImg_RTL + "')";
  429. else collUL[i].style.listStyleImage= "url('" + branchImg + "')";
  430. for (var j = 0; j < collUL[i].children.length; j++)
  431. if (collUL[i].children[j].className.toLowerCase()=="branch"){
  432. if (isRTL) collUL[i].children[j].style.marginRight= (indent +'em');
  433. else collUL[i].children[j].style.marginLeft= (indent +'em');
  434. indent= indent + 0.75;
  435. }
  436. }
  437. }
  438. }
  439. for (var i=0; i < document.anchors.length; i++){
  440. var imgInsert="";
  441. var imgStyle= "";
  442. var imgSpace= "<span class='space'></span>";
  443. var oBefore=document.anchors[i].parentElement.tagName;
  444. var oAnchor= document.anchors[i].id.toLowerCase();
  445. // insert RELTOPICS icons
  446. if (rel_gif == "yes"){
  447. if (oAnchor=="reltopics")
  448. if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "reltopics")
  449. imgInsert= ""; // not to re-insert when persistent
  450. else imgInsert= "<img class='relTopics' src='"+relTopicsImg+"'>" + imgSpace;
  451. }
  452. // insert SHORTCUT icons
  453. if (oAnchor=="shortcut") {
  454. document.anchors[i].title= sShortcutTip;
  455. if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "shortcut")
  456. imgInsert= ""; // not to re-insert when persistent
  457. else imgInsert= "<img class='shortcut' src='"+shortcutCold+"' "+ imgStyleRTL+ ">" + imgSpace;
  458. }
  459. // insert POPUP icons
  460. else if (oAnchor=="wpopup" || oAnchor=="wpopupweb") document.anchors[i].title= sPopupTip;
  461. else if (document.anchors[i].className.toLowerCase()=="popupicon")
  462. if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "popup")
  463. imgInsert= ""; // not to re-insert when persistent
  464. else imgInsert= "<img class='popup' src='"+popupCold+"'>" + imgSpace;
  465. // insert EXPAND icons
  466. else if (oAnchor=="expand") {
  467. document.anchors[i].title= sExpandTip;
  468. if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "expand")
  469. imgInsert= ""; // not to re-insert when persistent
  470. else{
  471. if (document.anchors[i].parentElement.offsetLeft == document.anchors[i].offsetLeft) {
  472. imgSpace= "<span class='space' style='width:0'></span>";
  473. if (isRTL){ document.anchors[i].parentElement.style.marginRight= "1.5em"; imgStyle=" style=margin-right:'-1.5em'";}
  474. else { document.anchors[i].parentElement.style.marginLeft= "1.5em"; imgStyle=" style=margin-left:'-1.5em'";}
  475. }
  476. imgInsert= "<img class='expand' src='"+ closed +"' "+imgStyle+">" +imgSpace;
  477. }
  478. }
  479. // insert thumbnail images
  480. else if (oAnchor=="thumbnail" || oAnchor=="thumbnailweb"){
  481. var sAltText = document.anchors[i].innerHTML;
  482. gifwithin = true;
  483. var sThumbnailText = document.anchors[i].title;
  484. var oImg = document.anchors[i].href.toLowerCase();
  485. if (oAnchor=="thumbnail")
  486. var sThumbnailImg= moniker + getURL(oImg);
  487. else var sThumbnailImg = document.anchors[i].href.toLowerCase();
  488. found = sAltText.indexOf("BACKGROUND-COLOR:")
  489. if (found != -1) {
  490. stop_p = sAltText.indexOf(">");
  491. sAltText = sAltText.substring(stop_p + 1, sAltText.length);
  492. stop_p = sAltText.indexOf("</FONT>");
  493. Highlighted = sAltText.substring(0,stop_p)
  494. sAltText = Highlighted + sAltText.substring(stop_p + 7, sAltText.length);
  495. }
  496. document.anchors[i].outerHTML = "<DIV id='thumbDiv' class='thumbnail'>"+document.anchors[i].outerHTML+"</div>";
  497. document.anchors[i].innerHTML = "<img class='thumbnail' src='" + sThumbnailImg + "' alt= ' " + sAltText + "'><p>" +sThumbnailText+"</p>";
  498. if (isRTL) thumbDiv.style.styleFloat= "right";
  499. }
  500. document.anchors[i].innerHTML = imgInsert + document.anchors[i].innerHTML;
  501. if (isRTL) document.anchors[i].dir="rtl";
  502. }
  503. }
  504. //***** onclickTriage ****************************************************************************************
  505. // redirects to the appropriate function based on the ID of the clicked <A> tag.
  506. function onclickTriage(){
  507. var e= window.event.srcElement;
  508. // if the innerHTML in the <a> tag is encapsulated by a style tag or hightlighted in the word seach,
  509. // the parentElement is called.
  510. if ((isIE55 || isIE6) && printing == true) {
  511. printing = false;
  512. reset_form();
  513. }
  514. for (var i=0; i < 5; i++)
  515. if (e.tagName!="A" && e.parentElement!=null) e= e.parentElement;
  516. eID= e.id.toLowerCase();
  517. if (popupOpen) closePopup();
  518. // expand image in a new window
  519. if (eID=="thumbnail" || eID=="pophtm") popNewWindow(e);
  520. else if (eID=="thumbnailweb") callThumbnailWeb(e);
  521. else if (eID=="wpopup") callPopup(e);
  522. else if (eID=="wpopupweb") callPopupWeb(e);
  523. else if (eID=="shortcut") callShortcut(e);
  524. else if (eID=="reltopics") callRelatedTopics(e);
  525. else if (eID=="altloc") callAltLocation(e);
  526. else if (eID=="expand") callExpand(e);
  527. // added to support Randy's Quad method code
  528. else QuadDocumentClick()
  529. // ******************************
  530. }
  531. //*** gettingHot ****************************************************************************************
  532. // Makes all the required changes for mouseover.
  533. function gettingHot() {
  534. var e = window.event.srcElement;
  535. if (e.id.toLowerCase()=="cold") e.id ="hot";
  536. else if (e.src== previousCold) e.src = previousHot;
  537. else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== previousCold) e.children.tags("IMG")(0).src= previousHot;
  538. else if (e.src== nextCold) e.src = nextHot;
  539. else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== nextCold) e.children.tags("IMG")(0).src= nextHot;
  540. else if (e.className.toLowerCase()=="shortcut" && e.tagName=="IMG") e.src = shortcutHot; //<img> tags have a class
  541. else if (e.id.toLowerCase()=="shortcut") e.children.tags("IMG")(0).src = shortcutHot; //<a> tags have an ID
  542. else if (e.className.toLowerCase()=="popup" && e.tagName=="IMG") e.src = popupHot; //<img> tags have a class
  543. else if (e.className.toLowerCase()=="popupicon") e.children.tags("IMG")(0).src = popupHot; //<a> tags have an ID
  544. else if ((e.className.toLowerCase()=="expand" && e.tagName=="IMG") ||( e.id.toLowerCase()=="expand")) expandGoesHot(e);
  545. // Added to support Quad Method **************************
  546. if (e != null && e.firstChild != null &&
  547. e.firstChild.tagName != null &&
  548. e.firstChild.tagName.toLowerCase() == "input" &&
  549. e.firstChild.type.toLowerCase() == "radio" &&
  550. e.parentElement.className != "indentGray"){
  551. QuadDocumentMouseOver()
  552. }
  553. // *****************************
  554. }
  555. //*** gettingCold **************************************************************************************
  556. // Initial state for mouseout.
  557. function gettingCold() {
  558. var e = window.event.srcElement;
  559. if (e.id.toLowerCase()=="hot") e.id ="cold";
  560. else if (e.src== previousHot) e.src = previousCold;
  561. else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== previousHot) e.children.tags("IMG")(0).src= previousCold;
  562. else if (e.src== nextHot) e.src = nextCold;
  563. else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== nextHot) e.children.tags("IMG")(0).src= nextCold;
  564. else if (e.className.toLowerCase()=="shortcut" && e.tagName=="IMG") e.src = shortcutCold; //<img> tags have a class
  565. else if (e.id.toLowerCase()=="shortcut") e.children.tags("IMG")(0).src= shortcutCold; //<a> tags have an ID
  566. else if (e.className.toLowerCase()=="popup" && e.tagName=="IMG") e.src = popupCold; //<img> tags have a class
  567. else if (e.className.toLowerCase()=="popupicon") e.children.tags("IMG")(0).src= popupCold; //<a> tags have an ID
  568. else if ((e.className.toLowerCase()=="expand" && e.tagName=="IMG") ||( e.id.toLowerCase()=="expand")) expandGoesCold(e);
  569. // Added to support Quad Method **************************
  570. if (e != null && e.firstChild != null &&
  571. e.firstChild.tagName != null &&
  572. e.firstChild.tagName.toLowerCase() == "input" &&
  573. e.firstChild.type.toLowerCase() == "radio" &&
  574. e.parentElement.className != "indentGray"){
  575. QuadDocumentMouseOver()
  576. }
  577. // *****************************
  578. }
  579. //****************************************** OBJECT CONSTRUCTION **************************************
  580. //*****************************************************************************************************
  581. // Uses an A tag to pass parameters between an HTML page and this script.
  582. // Creates an ActiveX Object from these parameters, appends the Object to the end of the page,
  583. // and clicks it. These objects relate to HTMLHelp environment and information about them can be found on the http://HTMLHelp site.
  584. // Object construction variables *********************************************************************
  585. var sParamCHM,sParamFILE, sParamEXEC, sParamMETA,iEND;
  586. var sActX_HH= " type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11' ";
  587. //*** callPopup ***************************************************************************************
  588. // creates an object from an <A> tag HREF, the object inserts a winhelp popup
  589. // called by: <A ID="wPopup" HREF="HELP=@@file_name.hlp@@ TOPIC=@@topic#@@">@@Popup text@@</A>
  590. var joker = false;
  591. var blague = true;
  592. function callPopup(eventSrc) {
  593. if (popupOpen) closePopup();
  594. var ntsharedAdded= false; // make sure the object is only added once
  595. var CHMspecificAdded= false; // make sure the object is only added once
  596. var coll = document.all.tags("SPAN");
  597. var sIndex,sText=" ",sFile,sFileID,dataBindingObject;
  598. var e= eventSrc;
  599. var eH= unescape(e);
  600. eH = eH.toLowerCase();
  601. var eH_= eH.toLowerCase();
  602. if(event){
  603. event.returnValue = false;
  604. }
  605. found = false;
  606. var iTOPIC = eH.lastIndexOf("topic=");
  607. if (iTOPIC==-1) return;
  608. sParamTOPIC = eH.substring((iTOPIC+6),eH.length);
  609. if (!isIE4){
  610. if (!joejoe){
  611. xmldom.load(moniker + path2glossary + "glossary.xml");
  612. joejoe = true;
  613. }
  614. var o=0;
  615. var node = "";
  616. node = xmldom.selectSingleNode("glossary/glossSection/entry[@entryID='" + sParamTOPIC + "']");
  617. if(node!=null)
  618. {
  619. found = true;
  620. var ralf = "";
  621. ralf = node.getElementsByTagName("term")
  622. sText = "<DIV CLASS='PopTerm'>" + ralf.item(0).nodeTypedValue + "</DIV>";
  623. ralf = node.getElementsByTagName("para")
  624. if (ralf.length != 0){
  625. sText = sText + "<DIV CLASS='PopDef'>" + ralf.item(0).nodeTypedValue;
  626. sText = sText + "</DIV>";
  627. }
  628. seealsos = node.getElementsByTagName("seeAlso");
  629. var o=0;
  630. look_at = xmldom.getElementsByTagName("glossary/locSection/locItem[@locItemID = 'SeeAlso']");
  631. while (o < seealsos.length){
  632. sIndex = seealsos.item(o).getAttribute("seeAlsoTermID");
  633. node = xmldom.selectSingleNode("glossary/glossSection/entry[@entryID='" + sIndex + "']");
  634. ralf = node.getElementsByTagName("term");
  635. sTerm = ralf.item(0).nodeTypedValue;
  636. if (o == 0) {
  637. sText = sText + "<DIV CLASS='PopSeeAlso'>" + look_at.item(0).nodeTypedValue + "&nbsp;"
  638. // sIndex = "<Input type=submit tabindex=1 value=hhhh onclick='jscript:alert(oPopup.sIndex.innerHTML)'>"
  639. sIndex = "<A ID='wPopup' HREF='HELP=glossary.hlp TOPIC=" + sIndex + "' bite_me='1'>" + sTerm + "</a>"
  640. }
  641. else
  642. {
  643. sIndex = ", <A ID='wPopup' HREF='HELP=glossary.hlp TOPIC=" + sIndex + "' bite_me='1'>" + sTerm + "</a>"
  644. }
  645. o++;
  646. sText = sText + sIndex
  647. }
  648. definition = xmldom.getElementsByTagName("glossary/locSection/locItem[@locItemID = 'See']");
  649. seeentrys = node.getElementsByTagName("seeEntry");
  650. while (o < seeentrys.length){
  651. sIndex = seeentrys.item(o).getAttribute("seeTermID");
  652. node = xmldom.selectSingleNode("glossary/glossSection/entry[@entryID='" + sIndex + "']");
  653. ralf = node.getElementsByTagName("term");
  654. sTerm = ralf.item(0).nodeTypedValue;
  655. if (o == 0) {
  656. sText = sText + "<DIV CLASS='PopSeeAlso'>" + definition.item(0).nodeTypedValue + "&nbsp;"
  657. // sIndex = "<Input type=submit tabindex=1 value=hhhh onclick='jscript:alert(oPopup.sIndex.innerHTML)'>"
  658. sIndex = "<A ID='wPopup' HREF='HELP=glossary.hlp TOPIC=" + sIndex + "' bite_me='1'>" + sTerm + "</a>"
  659. }
  660. else
  661. {
  662. sIndex = ", <A ID='wPopup' HREF='HELP=glossary.hlp TOPIC=" + sIndex + "' bite_me='1'>" + sTerm + "</a>"
  663. }
  664. o++;
  665. sText = sText + sIndex
  666. }
  667. }
  668. if (o != 0) sText = sText + "</DIV>"
  669. if ((isIE55 || isIE6) && found){
  670. var oPopup = false
  671. var oPopup = window.createPopup();
  672. var strScript = "<script language='JScript'> function clickPopup(){if (event.srcElement.tagName.toLowerCase() == 'a') parent.callPopup(event.srcElement.href); window.PopObject.hide(); return false;}</script>";
  673. var strDoc = oPopup.document.body.outerHTML.toLowerCase()
  674. oPopup.document.write(strDoc.replace("></body>", " onclick=\"clickPopup()\">" + strScript + "</body>"));
  675. //oPopup.document.write(strDoc.replace("></body>", " onclick=\"clickPopup()\, onkeypress=\"process_closePopup()\">" + strScript + "</body>"));
  676. oPopup.document.createStyleSheet(sSharedCHM + "coUA.css"); // Apply the stylesheet.
  677. var oPopBody = oPopup.document.body;
  678. //oPopBody.style.backgroundColor = '#FFFFCC';
  679. // oPopBody.style.border = "solid black 1px";
  680. oPopBody.style.margin = "0 0 0 0";
  681. if (isRTL) oPopBody.innerHTML = "<SPAN DIR='RTL' class='XMLPopup'>" + sText + "</SPAN>" // need to add the style class here.
  682. else oPopBody.innerHTML = "<SPAN class='XMLPopup'>" + sText + "</SPAN>"
  683. // alert(oPopBody.innerHTML)
  684. if (window.event){
  685. joker = window.event.srcElement;
  686. }
  687. oPopup.show(0, 0, 400, 8, joker); // Show the popup at an arbitrary size.
  688. var textSize = oPopBody.createTextRange();
  689. var wPop = textSize.boundingWidth + oPopBody.offsetWidth - oPopBody.clientWidth; // Get the size of the text.
  690. var hPop = oPopBody.scrollHeight;
  691. oPopup.hide();
  692. oPopup.document.parentWindow.PopParent = window;
  693. oPopup.document.parentWindow.PopObject = oPopup;
  694. oPopup.show(0, 1, wPop , hPop, joker);
  695. //oPopup.document.focus(oPopup.document.body.JOKER);
  696. return;
  697. }
  698. if (found){
  699. if (blague){
  700. document.body.insertAdjacentHTML("beforeEnd", "<DIV id='wPopupWeb' CLASS='popup'>" + sText + "</DIV>");
  701. blague = false;
  702. }
  703. window.wPopupWeb.innerHTML = sText;
  704. callPopupWeb(e);
  705. return;
  706. }
  707. } // for support of IE4 disable xml popups
  708. var iTOPIC = eH_.lastIndexOf("topic=");
  709. if (iTOPIC==-1) return;
  710. sParamTOPIC = eH.substring((iTOPIC+6),eH.length); // extracts the topic for item2
  711. var iHELP = eH_.lastIndexOf("help=");
  712. if (iHELP==-1) return;
  713. sParamHELP = eH.substring(iHELP+5,iTOPIC); // extracts the help file for item1
  714. if (document.hhPopup) document.hhPopup.outerHTML = ""; // if hhPopup object exists, clears it
  715. var h= "<object id='hhPopup'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='WinHelp, Popup'>";
  716. h= h + "<param name='Item1' value='" + sParamHELP + "'><param name='Item2' value='" + sParamTOPIC + "'></object>";
  717. document.body.insertAdjacentHTML("beforeEnd", h);
  718. document.hhPopup.hhclick();
  719. }
  720. //*** callAltLocation******************************************************************************
  721. // creates an object from an <A> tag HREF, the object will navigate to the alternate location if the first location is not found.
  722. // called from: <A ID="altLoc" HREF="CHM=@@1st_chm_name.chm;Alt_chm_name.chm@@ FILE=@@1st_file_name.htm;Alt_file_name.htm@@">@@Link text here@@</A>
  723. function callAltLocation(eventSrc) {
  724. var e= eventSrc;
  725. var eH= unescape(e.href);
  726. var eH_= eH.toLowerCase();
  727. var sFILEarray,sCHMarray;
  728. event.returnValue = false;
  729. // var sParamTXT= e.innerHTML;
  730. // sParamTXT= sParamTXT.replace(semicolon,"");
  731. var sParamTXT= "";
  732. var iFILE = eH_.lastIndexOf("file=");
  733. if (iFILE==-1) return;
  734. sParamFILE= eH.substring((iFILE+5),eH.length); // extracts the 2 HTM files
  735. sParamFILE= sParamFILE.replace(spaces,"");
  736. iSPLIT= sParamFILE.match(semicolon);
  737. if (iSPLIT)
  738. sFILEarray = sParamFILE.split(";"); // separates the 2 HTM files
  739. else return;
  740. var iCHM = eH_.lastIndexOf("chm=");
  741. if(iCHM==-1) return;
  742. else sParamCHM = eH.substring(iCHM+4,iFILE); // extracts the 2 CHM's
  743. sParamCHM= sParamCHM.replace(spaces,"");
  744. iSPLIT= sParamCHM.match(semicolon);
  745. if (iSPLIT)
  746. sCHMarray= sParamCHM.split(";"); // separates the 2 CHM's
  747. else return;
  748. sParamFILE= moniker + sCHMarray[0]+ "::/" + sFILEarray[0] + ";" + moniker + sCHMarray[1]+ "::/" + sFILEarray[1];
  749. if (document.hhAlt) document.hhAlt.outerHTML = ""; // if hhAlt object exists, clears it
  750. var h= "<object id='hhAlt'"+ sActX_HH + "STYLE='display:none'><PARAM NAME='Command' VALUE='Related Topics'>";
  751. h= h + "<param name='Item1' value='" + sParamTXT +";" + sParamFILE + "'></object>";
  752. document.body.insertAdjacentHTML("beforeEnd", h);
  753. document.hhAlt.hhclick();
  754. }
  755. //*** callRelatedTopics******************************************************************************
  756. // creates an object from an <A> tag HREF, the object inserts a popup of the related topics to select
  757. // called from: <A ID="relTopics" HREF="CHM=@@chm_name1.chm;chm_name2.chm@@ META=@@a_filename1;a_filename2@@">Related Topics</A>
  758. function callRelatedTopics(eventSrc) {
  759. var e= eventSrc;
  760. var eH= unescape(e.href);
  761. var eH_= eH.toLowerCase();
  762. event.returnValue = false;
  763. var iMETA = eH_.lastIndexOf("meta=");
  764. if (iMETA==-1) return;
  765. sParamMETA = eH.substring((iMETA+5),eH.length); // extracts the META keywords for item2
  766. var iCHM = eH_.lastIndexOf("chm=");
  767. if(iCHM==-1) sParamCHM = "";
  768. else sParamCHM = eH.substring(iCHM+4,iMETA); // extracts the CHM files for item1
  769. if (document.hhRel) document.hhRel.outerHTML = ""; // if hhRel object exists, clears it
  770. var h= "<object id='hhRel'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='ALink,MENU'>";
  771. h= h + "<param name='Item1' value='" + sParamCHM + "'><param name='Item2' value='" + sParamMETA + "'></object>";
  772. document.body.insertAdjacentHTML("beforeEnd", h);
  773. document.hhRel.hhclick();
  774. }
  775. //*** popNewWindow***************************************************************************************
  776. // creates an object from an <A> tag HREF, the object then opens a new window from the image URL found in the HREF
  777. // called from: <a id="thumbnail" title="Enlarge figure" href="CHM=NTArt.chm FILE=@@image_name.gif@@">@@alt text here@@</A>
  778. // the thumbnail image is loaded by loadPage();
  779. function popNewWindow(eventSrc) {
  780. var eH= eventSrc.href;
  781. event.returnValue = false;
  782. // extracts the thumbnail image URL from the <a> tag HREF
  783. sParamFILE = getURL(eH);
  784. if (sParamFILE=="") return;
  785. // sParamFILE = moniker + sParamFILE;
  786. // sParamFILE = moniker + sParamFILE;
  787. //alert(sParamFILE)
  788. // callThumbnailWeb(sParamFFILE)
  789. // if the hhWindow object exists, clears it
  790. if (document.hhWindow) document.hhWindow.outerHTML = "";
  791. var h = "<object id='hhWindow'"+ sActX_HH +" STYLE='display:none'><param name='Command' value='Related Topics'>";
  792. h = h + "<param name='Window' value='$global_largeart'><param name='Item1' value='$global_largeart;" + moniker + sParamFILE+ "'> </object>";
  793. document.body.insertAdjacentHTML("beforeEnd", h);
  794. document.hhWindow.hhclick();
  795. }
  796. //*** callShortcut ***************************************************************************************
  797. // creates an object from an <A> tag, the object then calls the executable code
  798. // called from: <A ID="shortcut" HREF="EXEC=@@executable_name.exe@@ CHM=ntshared.chm FILE=@@error_file_name.htm@@">@@Shortcut text@@</A>
  799. // the shortcut image is loaded by loadInitialImg();
  800. function callShortcut(eventSrc) {
  801. var e= eventSrc;
  802. var eH= unescape(e.href);
  803. var eH_= eH.toLowerCase();
  804. event.returnValue = false;
  805. // extracts the error file URL from the <a> tag HREF
  806. iEND= eH.length;
  807. sParamFILE = getURL(eH);
  808. var iEXEC = eH_.lastIndexOf("exec=");
  809. var endstr = eH.lastIndexOf(",");
  810. var sstr = eH.substring(endstr + 1, iEND);
  811. var matchstr = "";
  812. for(i=endstr + 1;i< iEND; i++) //added 3/25/2002 by marissam to compensate for extra comma in shortcut calls in snippet
  813. matchstr = matchstr + " ";
  814. if(sstr == matchstr)
  815. {
  816. iEND = iEND - (iEND-endstr);
  817. }
  818. if (iEXEC==-1) return;
  819. else sParamEXEC = eH.substring(iEXEC+5,iEND);
  820. // alert("this is it-" + sParamEXEC + "-sParamExec"); // extracts the executable for item1
  821. if (document.hhShortcut) document.hhShortcut.outerHTML = ""; // if the hhShortcut object exists, clears it
  822. var h = "<object id='hhShortcut'"+ sActX_HH +" STYLE='display:none'> <param name='Command' value='ShortCut'>";
  823. if(sParamFILE != "") h = h + "<param name='Window' value='" + moniker + sParamFILE+ "'>";
  824. h = h + "<param name='Item1' value='" + sParamEXEC + "'><param name='Item2' value='msg,1,1'></object>";
  825. document.body.insertAdjacentHTML("beforeEnd", h);
  826. document.hhShortcut.hhclick();
  827. }
  828. //**************************************** EXPAND FUNCTIONS *********************************************************
  829. //********************************************************************************************************************
  830. //** callExpand **************************************************************************************************
  831. // This expands & collapses (based on current state) "expandable" nodes as they are clicked.
  832. // Called by: <A ID="expand" href="#">@@Hot text@@</A>
  833. // Followed by: <div class="expand">
  834. function callExpand(eventSrc) {
  835. var e= eventSrc;
  836. event.returnValue = false; // prevents navigating for <A> tag
  837. var oExpandable = getExpandable(e);
  838. var oImg = getImage(e);
  839. if (oExpandable.style.display == "block")
  840. doCollapse(oExpandable, oImg);
  841. else doExpand(oExpandable, oImg);
  842. }
  843. //** expandGoesHot *********************************************************************************************
  844. // Returns expand image to hot.
  845. function expandGoesHot(eventSrc){
  846. var e= eventSrc;
  847. //alert(e.outerHTML);
  848. var oExpandable = getExpandable(e);
  849. var oImg = getImage(e);
  850. //alert (oImg.src)
  851. if (oExpandable == false){
  852. plus_or_minus = oImg.src.indexOf("minus")
  853. if (plus_or_minus == -1){
  854. //alert(plus_or_minus)
  855. oImg.src = closedHot
  856. }
  857. else
  858. {
  859. oImg.src = expandHot;
  860. //alert(plus_or_minus)
  861. }
  862. return;
  863. }
  864. if (!isIE4){
  865. if (oExpandable.style.display == "block"){
  866. oImg.src = expandHot;
  867. //alert(oImg.src)
  868. }
  869. else oImg.src = closedHot;
  870. }
  871. }
  872. //** expandGoesCold *********************************************************************************************
  873. // Returns expand image to cold.
  874. function expandGoesCold(eventSrc){
  875. var e= eventSrc;
  876. var oExpandable = getExpandable(e);
  877. var oImg = getImage(e);
  878. // alert (oImg.src)
  879. if (oExpandable == false){
  880. plus_or_minus = oImg.src.indexOf("minus")
  881. if (plus_or_minus == -1){
  882. //alert(plus_or_minus)
  883. oImg.src = closed
  884. }
  885. else
  886. {
  887. oImg.src = expand;
  888. //alert(plus_or_minus)
  889. }
  890. return;
  891. }
  892. if (!isIE4){
  893. if (oExpandable.style.display == "block") oImg.src = expand;
  894. else oImg.src = closed;
  895. }
  896. }
  897. //** getExpandable *****************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  898. // Determine if the element is an expandable node or a child of one.
  899. function getExpandable(eventSrc){
  900. var e = eventSrc;
  901. var iNextTag, oExpandable;
  902. for (var i=1;i<4; i++){
  903. iNextTag= e.sourceIndex+e.children.length+i;
  904. oExpandable= document.all(iNextTag);
  905. if (oExpandable.className.toLowerCase()=="expand" || iNextTag == document.all.length)
  906. return oExpandable
  907. break;
  908. }
  909. return false;
  910. }
  911. //** getImage ***********************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  912. // Find the first image in the children of the current srcElement.
  913. // (allows the image to be placed anywhere inside the <A HREF> tag)
  914. function getImage(header) {
  915. var oImg = header;
  916. if(oImg.tagName != "IMG") oImg=oImg.children.tags("IMG")(0);
  917. return oImg;
  918. }
  919. //**** expandAll *******************************************************************************************************
  920. // Will expand or collapse all "expandable" nodes when clicked. [calls closeAll()]
  921. // called by: <A HREF="#" onclick="expandAll();">expand all</A>
  922. var stateExpand = false; //applies to the page
  923. //**** ****************************************************************************************************************
  924. function expandAll() {
  925. var oExpandToggle, oImg;
  926. var expandAllMsg = "expand all"; //message returned when CloseAll() is invoked
  927. var closeAllMsg = "close all"; //message returned when ExpandAll() is invoked
  928. var e= window.event.srcElement;
  929. event.returnValue = false;
  930. for (var i=0; i< document.anchors.length; i++){
  931. oExpandToggle = document.anchors[i];
  932. if (oExpandToggle.id.toLowerCase() == "expand"){
  933. oExpandable = getExpandable(oExpandToggle);
  934. oImg = getImage(oExpandToggle);
  935. if (stateExpand == true) doCollapse(oExpandable, oImg);
  936. else doExpand(oExpandable, oImg);
  937. }
  938. }
  939. if (stateExpand == true) {
  940. stateExpand = false;
  941. e.innerText= expandAllMsg;
  942. }
  943. else {
  944. stateExpand = true;
  945. e.innerText= closeAllMsg;
  946. }
  947. }
  948. //**** doExpand *******************************************************************************************************
  949. // Expands expandable block & changes image
  950. var redo = false;
  951. function doExpand(oToExpand, oToChange) {
  952. var oExpandable= oToExpand;
  953. var oImg= oToChange;
  954. // if (printing == "TRUE") return;
  955. oImg.src = expand;
  956. oExpandable.style.display = "block";
  957. if (!redo && isIE4) {
  958. // alert("what")
  959. redo = true;
  960. // focus(oToExpand);
  961. doExpand(oToExpand, oToChange);
  962. }
  963. }
  964. //**** doCollapse *****************************************************************************************************
  965. // Collapses expandable block & changes image
  966. function doCollapse(oToCollapse, oToChange) {
  967. // if (printing == "TRUE") return;
  968. var oExpandable= oToCollapse;
  969. var oImg= oToChange;
  970. oExpandable.style.display = "none";
  971. oImg.src = closed;
  972. }
  973. //*******************************************************************************************************
  974. //******* WEB FUNCTIONS **************************************************************************
  975. //*******************************************************************************************************
  976. //**** callThumbnailWeb **************************************************************************************
  977. function callThumbnailWeb(eventSrc) {
  978. var e= eventSrc;
  979. event.returnValue = false;
  980. var thumbnailWin= window.open (e.href, "height=450, width=600, left=10, top=10, dependent=yes, resizable=yes, status=no, directories=no, titlebar=no, toolbar=yes, menubar=no, location=no","true");
  981. thumbnailWin.document.write ("<html><head><title>Windows 2000</title></head><body><img src='"+e.href+"'></body></html>");
  982. return;
  983. }
  984. //*********************************************************************************************************
  985. //*********************************************************************************************************
  986. var popupOpen= false; //state of popups
  987. var posX, posY; //coordinates of popups
  988. var oPopup; //object to be used as popup content
  989. //**** callPopupWeb **************************************************************************************
  990. // the web popups have been converted from the object winHelp popup for the web.
  991. // called by: <A ID="wPopupWeb" HREF="#">@@Popup text@@</A>
  992. // followed by: <div class="popup">Popup content</div>
  993. function callPopupWeb(eventSrc) {
  994. var e= eventSrc;
  995. // find the popup <div> that follows <a id="wPopupWeb"></a>
  996. findPopup(e);
  997. if (!e.bite_me) positionPopup(e)
  998. oPopup.style.visibility = "visible";
  999. // document.focus(e)
  1000. popupOpen = true;
  1001. return;
  1002. }
  1003. //**** findPopup ****************************************************************************************
  1004. function findPopup(oX){
  1005. var e= oX;
  1006. var iNextTag;
  1007. for (var i=1;i<document.all.length; i++){
  1008. iNextTag= e.sourceIndex + i;
  1009. oPopup= document.all(iNextTag);
  1010. if (oPopup.className.toLowerCase()=="popup" || iNextTag == document.all.length)
  1011. break;
  1012. }
  1013. if (iNextTag != document.all.length) {
  1014. posX = window.event.clientX;
  1015. posY = window.event.clientY + document.body.scrollTop+10;
  1016. }
  1017. if (popupOpen) closePopup();
  1018. }
  1019. //**** positionPopup ************************************************************************************
  1020. // Set size and position of popup.
  1021. // If it is off the page, move up, but not past the very top of the page.
  1022. function positionPopup(oX){
  1023. var e= oX;
  1024. var popupOffsetWidth = oPopup.offsetWidth;
  1025. //determine if popup will be offscreen to right
  1026. var rightlimit = posX + popupOffsetWidth;
  1027. if (rightlimit >= document.body.clientWidth)
  1028. posX -= (rightlimit - document.body.clientWidth);
  1029. if (posX < 0) posX = 0;
  1030. //position popup
  1031. oPopup.style.top = posY;
  1032. oPopup.style.left = posX;
  1033. var pageBottom = document.body.scrollTop + document.body.clientHeight;
  1034. var popupHeight = oPopup.offsetHeight;
  1035. if (popupHeight + posY >= pageBottom) {
  1036. if (popupHeight <= document.body.clientHeight)
  1037. oPopup.style.top = pageBottom - popupHeight;
  1038. else
  1039. oPopup.style.top = document.body.scrollTop;
  1040. }
  1041. }
  1042. //**** closePopup ****************************************************************************************
  1043. // Close Popup
  1044. function closePopup() {
  1045. oPopup.style.visibility = "hidden";
  1046. popupOpen = false;
  1047. return;
  1048. }
  1049. //********************************************* GENERAL FUNCTIONS ************************************************
  1050. //**************************************************************************************************************************
  1051. //***ajustImg *************************************************************************************************************
  1052. // expands an image to the with of the window or shrinks it to 90px
  1053. function ajustImg(eventSrc) {
  1054. var e= eventSrc;
  1055. var fullWidth= document.body.offsetWidth;
  1056. fullWidth = fullWidth - 50;
  1057. if (e.style.pixelWidth==90)
  1058. e.style.pixelWidth=fullWidth;
  1059. else e.style.pixelWidth=90;
  1060. }
  1061. //** getURL **************************************[used in callShortcut, popNewWindow& loadPage]********
  1062. // extracts the file location (CHM::/HTM) URL
  1063. function getURL(sHREF) {
  1064. var spaces= /\s/g
  1065. var eH = unescape(sHREF);
  1066. eH = eH.replace(spaces,"");
  1067. var eH_= eH.toLowerCase();
  1068. var sParamFILE= "";
  1069. var sParamCHM= "";
  1070. var iFILE= eH_.lastIndexOf("file=");
  1071. if (iFILE!=-1){
  1072. iEND= iFILE +1;
  1073. sParamFILE = eH.substring(iFILE+5,eH.length);
  1074. }
  1075. var iCHM = eH_.lastIndexOf("chm=");
  1076. gifwithin = false;
  1077. if (gifwithin){
  1078. gifwithin = false;
  1079. var con_mmc;
  1080. var doc_mmc;
  1081. doc_mmc = " " + document.location;
  1082. doc_mmc = doc_mmc.toLowerCase();
  1083. if (iCHM!=-1){
  1084. iEND = iCHM +1; // iEND used by callShortcut
  1085. sParamCHM = eH.substring(iCHM+4, iFILE);
  1086. con_mmc = doc_mmc.indexOf(sParamCHM);
  1087. if (con_mmc != -1){
  1088. sParamCHM = "";
  1089. iCHM = -1;
  1090. sParamFILE= sParamCHM+sParamFILE;
  1091. }
  1092. }
  1093. }
  1094. if (iCHM!=-1){
  1095. iEND = iCHM +1; // iEND used by callShortcut
  1096. sParamCHM = eH.substring(iCHM+4, iFILE);
  1097. sParamFILE= sParamCHM+"::/"+sParamFILE;
  1098. }
  1099. return sParamFILE;
  1100. }
  1101. //****************************************************************************************************************************
  1102. //******************************************** IE5 PERSISTENCE *************************************************************
  1103. //****************************************************************************************************************************
  1104. var oTD,iTD; // persistence
  1105. //****** Persistence for userData *********************************************************************************************
  1106. function getChecklistState(){
  1107. var pageID= addID();
  1108. if (checklist.all== "[object]") {
  1109. oTD=checklist.all.tags("INPUT");
  1110. iTD= oTD.length;
  1111. }
  1112. else
  1113. {
  1114. printing = true;
  1115. isPersistent = false;
  1116. return;
  1117. }
  1118. if (iTD == 0){
  1119. printing = true;
  1120. isPersistent = false;
  1121. return;
  1122. }
  1123. // routine added to fix a bug in the ocx 06/14/99
  1124. lct = document.location + ".";
  1125. xax = 10;
  1126. xax = lct.indexOf("mk:@MSITStore");
  1127. if (xax != -1) {
  1128. lct = "ms-its:" + lct.substring(14,lct.length-1);
  1129. // alert("before reload : " + document.location);
  1130. // alert("replace with : " + lct);
  1131. isPersistent = false;
  1132. document.location.replace(lct);
  1133. isPersistent = true;
  1134. // alert("after reload : " + document.location);
  1135. }
  1136. else
  1137. {
  1138. checklist.load("oXMLStore");
  1139. }
  1140. // routine added to fix a bug in the ocx 06/14/99
  1141. if (checklist.getAttribute("sPersist"+pageID+"0"))
  1142. for (i=0; i<iTD; i++){
  1143. if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  1144. checkboxValue= checklist.getAttribute("sPersist"+pageID+i);
  1145. if (checkboxValue=="yes") oTD[i].checked=true;
  1146. else oTD[i].checked=false;
  1147. }// if
  1148. if (oTD[i].type =="text")
  1149. oTD[i].value= checklist.getAttribute("sPersist"+pageID+i);
  1150. }// for
  1151. } // end persistence
  1152. //** saveChecklistState *************************************************************************************************************
  1153. function saveChecklistState(){
  1154. var pageID= addID();
  1155. if (!isPersistent) return;
  1156. // you will need this document.location
  1157. for (i=0; i<iTD; i++){
  1158. if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  1159. if (oTD[i].checked) checkboxValue="yes";
  1160. else checkboxValue="no";
  1161. checklist.setAttribute("sPersist"+pageID+i, checkboxValue);
  1162. }// if
  1163. if (oTD[i].type =="text")
  1164. checklist.setAttribute("sPersist"+pageID+i, oTD[i].value);
  1165. } // for
  1166. // routine added to fix a bug in the ocx 06/14/99
  1167. lct = document.location + ".";
  1168. xax = 10;
  1169. xax = lct.indexOf("mk:@MSITStore");
  1170. if (xax != -1) {
  1171. lct = "ms-its:" + lct.substring(14,lct.length-1);
  1172. // alert("before reload : " + document.location);
  1173. // alert("replace with : " + lct);
  1174. isPersistent = false;
  1175. document.location.replace(lct);
  1176. isPersistent = true;
  1177. // alert("after reload : " + document.location);
  1178. }
  1179. else
  1180. {
  1181. checklist.save("oXMLStore");
  1182. }
  1183. // routine added to fix a bug in the ocx 06/14/99
  1184. }//end function
  1185. //** resizeDiv *******************************[used with callPopupWeb, setPreviousNext}****************************************************
  1186. // resize the page when the <div class=nav></div> && <div class=text></div> are found
  1187. function resizeDiv(){
  1188. if (printing == true) return;
  1189. var oNav = document.all.item("nav");
  1190. var oText= document.all.item("text");
  1191. if (popupOpen) closePopup();
  1192. if (oText == null) return;
  1193. if (oNav != null){
  1194. document.all.nav.style.width= document.body.offsetWidth;
  1195. document.all.text.style.width= document.body.offsetWidth-4;
  1196. document.all.text.style.top= document.all.nav.offsetHeight;
  1197. if (document.body.offsetHeight > document.all.nav.offsetHeight)
  1198. document.all.text.style.height= document.body.offsetHeight - document.all.nav.offsetHeight;
  1199. else document.all.text.style.height=0;
  1200. }
  1201. }
  1202. //** addID *************************************************************************************************************
  1203. function addID(){
  1204. var locID = document.location.href;
  1205. var iHTM = locID.lastIndexOf(".htm");
  1206. var iName=locID.lastIndexOf("/");
  1207. locID = locID.substring(iName+1,iHTM);
  1208. return locID;
  1209. }
  1210. //** set_to_print ***************
  1211. function set_to_print(){
  1212. // alert(printing)
  1213. if (printing == true) return
  1214. var i;
  1215. var isIE5 = (navigator.appVersion.indexOf("MSIE 5")>0) || (navigator.appVersion.indexOf("MSIE")>0 && parseInt(navigator.appVersion)> 4);
  1216. var isIE55 = (navigator.appVersion.indexOf("MSIE 5.5")>0);
  1217. if (isIE5 && isIE55) isIE5 = false;
  1218. var isIE6 = (navigator.appVersion.indexOf("MSIE 6")>0);
  1219. var isIE4 = (navigator.appVersion.indexOf("MSIE 4")>0);
  1220. if (!isIE5 && !isIE55 && !isIE4 && !isIE6) {
  1221. isIE6 = true;
  1222. }
  1223. // trying
  1224. printing = true;
  1225. if (isIE55){
  1226. addReusableText();
  1227. insertImages_4_print();
  1228. }
  1229. if (isIE6){
  1230. addReusableText();
  1231. insertImages_4_print();
  1232. }
  1233. // to fix printing
  1234. isPersistent= (document.all.item("checklist")!=null) && ((isIE5) || (isIE6) || (isIE55));
  1235. setPreviousNext();
  1236. resizeDiv();
  1237. // if (isPersistent) getChecklistState();
  1238. if (window.text) {
  1239. if (!window.text.style){
  1240. scroller = "FALSE";
  1241. }
  1242. else
  1243. {
  1244. document.all.text.style.height = "auto";
  1245. scroller = "TRUE";
  1246. }
  1247. }
  1248. var thisLoc= document.location.href;
  1249. thisLoc = thisLoc.indexOf("glossary.htm")
  1250. if (thisLoc != -1){
  1251. return;
  1252. }
  1253. // alert("in print")
  1254. // alert(isIE6)
  1255. for (i=0; i < document.all.length; i++){
  1256. if (document.all[i].id == "expand") {
  1257. // callExpand(document.all[i]); // no longer needed since the coua_print.css does this now.
  1258. single = "TRUE";
  1259. }
  1260. if (document.all[i].tagName == "BODY") {
  1261. document.all[i].scroll = "auto";
  1262. }
  1263. if (document.all[i].tagName == "A" && scroller != "TRUE") {
  1264. joe = " " + document.all[i].outerHTML
  1265. joe = joe.toLowerCase();
  1266. joe = joe.indexOf("href=")
  1267. if(joe == -1){
  1268. document.all[i].outerHTML = "<A NAME=''>" + document.all[i].innerHTML + "</a>";
  1269. }
  1270. else
  1271. {
  1272. document.all[i].outerHTML = "<A HREF=''>" + document.all[i].innerHTML + "</a>";
  1273. }
  1274. }
  1275. }
  1276. // reset_form();
  1277. }
  1278. //** used to reset a page if needed ********************
  1279. function reset_form(){
  1280. printing = false;
  1281. document.location.reload();
  1282. }
  1283. //** on error routine *********************************
  1284. function errorHandler() {
  1285. // alert("Error Handled");
  1286. return true;
  1287. }
  1288. // ******************************* this function is to help ie55 and ie6 to print these images ******
  1289. booking = false;
  1290. function insertImages_4_print(){
  1291. window.onerror = errorHandler
  1292. // if (isIE6) return
  1293. // if (isIE55) return
  1294. if (!printing) booking = true;
  1295. if (printing == true && booking == true ) {
  1296. booking = false;
  1297. return;
  1298. }
  1299. var collP = document.all.tags("P");
  1300. for (var i=0; i<collP.length; i++) {
  1301. if (collP[i].className.toLowerCase()=="note") collP[i].innerHTML ="<img class='alert' src='"+noteImg+"' "+ imgStyleRTL +"> " + collP[i].innerHTML;
  1302. else if (collP[i].className.toLowerCase()=="warning") collP[i].innerHTML ="<img class='alert' src='"+warningImg+"'> " + collP[i].innerHTML;
  1303. else if (collP[i].className.toLowerCase()=="caution") collP[i].innerHTML ="<img class='alert' src='"+cautionImg+"'> " + collP[i].innerHTML;
  1304. else if (collP[i].className.toLowerCase()=="tip") collP[i].innerHTML ="<img class='alert' src='"+tipImg+"'> " + collP[i].innerHTML;
  1305. else if (collP[i].className.toLowerCase()=="important") collP[i].innerHTML ="<img class='alert' src='"+importantImg+"'> " + collP[i].innerHTML;
  1306. else if (collP[i].className.toLowerCase()=="empty") collP[i].innerHTML ="<img class='alert' src='"+emptyImg+"'> " + collP[i].innerHTML;
  1307. if (collP[i].className.toLowerCase()=="reltopics" && rel_gif == "yes") {
  1308. collP[i].outerHTML ="<img class='relTopics' src='"+relTopicsImg+"'> " + collP[i].outerHTML;
  1309. }
  1310. }
  1311. //alert(printing)
  1312. //alert(isIE55)
  1313. //indents for Navigation Tree
  1314. var collUL = document.all.tags("UL");
  1315. if (!printing) {
  1316. for (var i=0; i<collUL.length; i++) {
  1317. var indent= 0;
  1318. if (collUL[i].className.toLowerCase()=="navtree"){
  1319. if (isRTL) collUL[i].style.listStyleImage= "url('" + branchImg_RTL + "')";
  1320. else collUL[i].style.listStyleImage= "url('" + branchImg + "')";
  1321. for (var j = 0; j < collUL[i].children.length; j++)
  1322. if (collUL[i].children[j].className.toLowerCase()=="branch"){
  1323. if (isRTL) collUL[i].children[j].style.marginRight= (indent +'em');
  1324. else collUL[i].children[j].style.marginLeft= (indent +'em');
  1325. indent= indent + 0.75;
  1326. }
  1327. }
  1328. }
  1329. }
  1330. for (var i=0; i < document.anchors.length; i++){
  1331. var imgInsert="";
  1332. var imgStyle= "";
  1333. var imgSpace= "<span class='space'></span>";
  1334. var oBefore=document.anchors[i].parentElement.tagName;
  1335. var oAnchor= document.anchors[i].id.toLowerCase();
  1336. // insert RELTOPICS icons
  1337. if (rel_gif == "yes"){
  1338. if (oAnchor=="reltopics")
  1339. if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "reltopics")
  1340. imgInsert= ""; // not to re-insert when persistent
  1341. else imgInsert= "<img class='relTopics' src='"+relTopicsImg+"'>" + imgSpace;
  1342. }
  1343. // insert SHORTCUT icons
  1344. if (oAnchor=="shortcut") {
  1345. document.anchors[i].title= sShortcutTip;
  1346. if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "shortcut")
  1347. imgInsert= ""; // not to re-insert when persistent
  1348. else imgInsert= "<img class='shortcut' src='"+shortcutCold+"' "+ imgStyleRTL+ ">" + imgSpace;
  1349. }
  1350. // insert POPUP icons
  1351. else if (oAnchor=="wpopup" || oAnchor=="wpopupweb") document.anchors[i].title= sPopupTip;
  1352. else if (document.anchors[i].className.toLowerCase()=="popupicon")
  1353. if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "popup")
  1354. imgInsert= ""; // not to re-insert when persistent
  1355. else imgInsert= "<img class='popup' src='"+popupCold+"'>" + imgSpace;
  1356. // insert EXPAND icons
  1357. else if (oAnchor=="expand") {
  1358. document.anchors[i].title= sExpandTip;
  1359. if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "expand")
  1360. imgInsert= ""; // not to re-insert when persistent
  1361. else{
  1362. if (document.anchors[i].parentElement.offsetLeft == document.anchors[i].offsetLeft) {
  1363. imgSpace= "<span class='space' style='width:0'></span>";
  1364. if (isRTL){ document.anchors[i].parentElement.style.marginRight= "1.5em"; imgStyle=" style=margin-right:'-1.5em'";}
  1365. else { document.anchors[i].parentElement.style.marginLeft= "1.5em"; imgStyle=" style=margin-left:'-1.5em'";}
  1366. }
  1367. imgInsert= "<img class='expand' src='"+ closed +"' "+imgStyle+">" +imgSpace;
  1368. }
  1369. }
  1370. // insert thumbnail images
  1371. else if (oAnchor=="thumbnail" || oAnchor=="thumbnailweb"){
  1372. var sAltText = document.anchors[i].innerHTML;
  1373. gifwithin = true;
  1374. var sThumbnailText = document.anchors[i].title;
  1375. var oImg = document.anchors[i].href.toLowerCase();
  1376. if (oAnchor=="thumbnail")
  1377. var sThumbnailImg= moniker + getURL(oImg);
  1378. else var sThumbnailImg = document.anchors[i].href.toLowerCase();
  1379. found = sAltText.indexOf("BACKGROUND-COLOR:")
  1380. if (found != -1) {
  1381. stop_p = sAltText.indexOf(">");
  1382. sAltText = sAltText.substring(stop_p + 1, sAltText.length);
  1383. stop_p = sAltText.indexOf("</FONT>");
  1384. Highlighted = sAltText.substring(0,stop_p)
  1385. sAltText = Highlighted + sAltText.substring(stop_p + 7, sAltText.length);
  1386. }
  1387. document.anchors[i].outerHTML = "<DIV id='thumbDiv' class='thumbnail'>"+document.anchors[i].outerHTML+"</div>";
  1388. document.anchors[i].innerHTML = "<img class='thumbnail' src='" + sThumbnailImg + "' alt= ' " + sAltText + "'><p>" +sThumbnailText+"</p>";
  1389. if (isRTL) thumbDiv.style.styleFloat= "right";
  1390. }
  1391. document.anchors[i].innerHTML = imgInsert + document.anchors[i].innerHTML;
  1392. if (isRTL) document.anchors[i].dir="rtl";
  1393. }
  1394. }
  1395. //** quad method code -- Witten by Randy Feinger, morphed to work inside of shared.js
  1396. function QuadDocumentMouseOver()
  1397. {
  1398. var elem = event.srcElement;
  1399. // If the first childe of the source element is a radio button and
  1400. // the parent element isn't grayed, change the cursor to a hand
  1401. // or back to the original as appropriate.
  1402. if (elem != null && elem.firstChild != null &&
  1403. elem.firstChild.tagName != null &&
  1404. elem.firstChild.tagName.toLowerCase() == "input" &&
  1405. elem.firstChild.type.toLowerCase() == "radio" &&
  1406. elem.parentElement.className != "indentGray")
  1407. {
  1408. if (elem.style.cursor == "hand")
  1409. elem.style.cursor = "auto";
  1410. else
  1411. elem.style.cursor = "hand";
  1412. }
  1413. }
  1414. function QuadDocumentClick()
  1415. {
  1416. // Don't process clicks on grayed text.
  1417. if (event.srcElement.parentElement.className == "indentGray")
  1418. return;
  1419. // INPUT elements should be wrapped by another element such as a SPAN, DIV, or P.
  1420. var elem = event.srcElement.firstChild;
  1421. // If this is a radio button...
  1422. if (elem != null && elem.tagName != null && elem.tagName.toLowerCase() == "input" && elem.type == "radio")
  1423. {
  1424. // check it.
  1425. elem.checked = true;
  1426. }
  1427. else
  1428. {
  1429. // Otherwise, set elem to the event's source element.
  1430. elem = event.srcElement;
  1431. }
  1432. // Call OnElementClick() and pass in the source element, and the name token
  1433. // used to mark a top-level clickable element such as a radio button.
  1434. OnElementClick(elem, "row1");
  1435. }
  1436. function OnElementClick(srcElem, token)
  1437. {
  1438. var elemTagName = srcElem.tagName; // Tag name of the source element.
  1439. var collElements1 = document.all.item(srcElem.name); // Collection of elements with the same name property as the source element.
  1440. var n = srcElem.sourceIndex; // The source index of the source element.
  1441. var elemGroup = srcElem.group; // The (dynamic) group property for the source element.
  1442. var elemID = srcElem.id; // The source element's ID.
  1443. var i, j, k; // Loop variables.
  1444. // If there are no elements with the same name as the source element, or
  1445. // if the source element isn't part of a group, exit the function.
  1446. if (collElements1 == null || elemGroup == null || collElements1.length == null)
  1447. return;
  1448. // Make sure the source element's name contains the designated token
  1449. // so we know it's top-level element that should be processed.
  1450. if (srcElem.name.toLowerCase().indexOf(token) != -1)
  1451. {
  1452. // Loop through the collection of
  1453. for (i = 0; i < collElements1.length; i++)
  1454. {
  1455. // Go up one level and then down a level in the element hierarchy to find
  1456. // the container (parent) element for the clickable sub-elements (radio buttons).
  1457. var oNextElement = collElements1(i).parentElement.nextSibling;
  1458. // If there is no such element, get the next element in the collection.
  1459. if (oNextElement == null || oNextElement.tagName == null)
  1460. continue;
  1461. // Get the collection of all the elements within the container element that
  1462. // have the same tag name as the source element.
  1463. var collElements2 = oNextElement.all.tags(elemTagName);
  1464. // Make sure the collection is valid.
  1465. if (collElements2 == null || collElements2.length == 0)
  1466. continue;
  1467. // Loop through the collection of sub-elements within the container element.
  1468. for (j = 0; j < collElements2.length; j++)
  1469. {
  1470. // If the current element in the collection is not the
  1471. // source element, disable it and make the text gray.
  1472. if (collElements1(i).sourceIndex != n)
  1473. {
  1474. oNextElement.className = "indentGray"
  1475. collElements2(j).disabled = true;
  1476. }
  1477. else // Otherwise, enable the element and make the text black.
  1478. {
  1479. oNextElement.className = "indentBlack"
  1480. collElements2(j).disabled = false;
  1481. // Set the ID for the checked (selected) element for use below.
  1482. if (collElements2(j).tagName.toLowerCase() == "input" &&
  1483. collElements2(j).type.toLowerCase() == "radio" &&
  1484. collElements2(j).checked == true)
  1485. {
  1486. elemID = collElements2(j).id;
  1487. }
  1488. }
  1489. }
  1490. }
  1491. }
  1492. // Get the collection of all of the elements with the same tag name as that
  1493. // of the source element.
  1494. var collElements2 = document.all.tags(elemTagName);
  1495. // Make sure the collection is valid.
  1496. if (collElements2 == null || collElements2.length == 0)
  1497. return;
  1498. // Loop through the collection of elements.
  1499. for (i = 0; i < collElements2.length; i++)
  1500. {
  1501. // Get the collection of all elements with the same ID as the
  1502. // current item in the collection.
  1503. var collAssocElems = document.all(collElements2(i).id);
  1504. // Make sure the collection is valid.
  1505. if (collAssocElems == null || collAssocElems.length == 0)
  1506. continue;
  1507. // Loop through the collection of same-named elements.
  1508. for (j = 0; j < collAssocElems.length; j++)
  1509. {
  1510. // If the tag name for the current element is different than that for the source element,
  1511. // and the current element is part of the same group as the source element,
  1512. // hide or display the element as appropriate.
  1513. if (collAssocElems(j).tagName != elemTagName && collAssocElems(j).group == elemGroup)
  1514. {
  1515. // Hide the element unless the current element's ID matches the ID of the element
  1516. // that has been checked (selected).
  1517. collAssocElems(j).style.display = ((collAssocElems(j).id == elemID) ? "block" : "none")
  1518. }
  1519. }
  1520. }
  1521. }