var agt = navigator.userAgent.toLowerCase(); var browserType; var browserVer; if (agt.indexOf("opera") != -1) { browserType = "Opera"; if (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1) { browserVer = "Opera7"; } else if (agt.indexOf("opera 8") != -1 || agt.indexOf("opera/8") != -1) { browserVer = "Opera8"; } else if (agt.indexOf("opera 9") != -1 || agt.indexOf("opera/9") != -1) { browserVer = "Opera9"; } } else if (agt.indexOf("applewebkit") != -1) { browserType = "Safari"; if (agt.indexOf("version/3") != -1) { browserVer = "Safari3"; } else if (agt.indexOf("safari/4") != -1) { browserVer = "Safari2"; } } else if (agt.indexOf("khtml") != -1) { browserType = "Konqueror"; } else if (agt.indexOf("msie") != -1) { browserType = "IE"; if (agt.indexOf("msie 6") != -1) { browserVer = "IE6"; } else if (agt.indexOf("msie 7") != -1) { browserVer = "IE7"; } } else if (agt.indexOf("gecko") != -1) { browserType = "Firefox"; if (agt.indexOf("rv:1.7") != -1) { browserVer = "Firefox1"; } else if (agt.indexOf("rv:1.8)") != -1 || agt.indexOf("rv:1.8.0") != -1) { browserVer = "Firefox15"; } else if (agt.indexOf("rv:1.8.1") != -1) { browserVer = "Firefox2"; } } function GetXPosition(item){ var position = 0; if (item.offsetWidth != null ) { while (item != document.body && item != null ){ position += item.offsetLeft; item = item.offsetParent; } ; } ; return position; } ; function GetYPosition(item){ var position = 0; if (item.offsetWidth != null ) { while (item != document.body && item != null ){ position += item.offsetTop; item = item.offsetParent; } ; } ; return position; } ; function MoveToPosition(item, x, y){ if (item.style.left != null ) { item.style.left = x + "px"; item.style.top = y + "px"; } else if (item.style.pixelLeft != null ) { item.style.pixelLeft = x; item.style.pixelTop = y; } ; } ; function ToggleMenu(id){ if (!window.document.getElementById) { return ; } ; var display = window.document.getElementById(id).style.display; if (display == "none") { display = "block"; } else { display = "none"; } window.document.getElementById(id).style.display = display; } function HideAllBut(ids, max){ if (document.getElementById) { ids.sort(function (a, b){ return a - b; } ); var number = 1; while (number < max){ if (_AN_Read_length("length", ids) > 0 && number == ids[0]) { ids.shift(); } else { document.getElementById("MGroupContent" + number).style.display = "none"; } ; number++ ; } ; } ; } var tooltipTimer = 0; function ShowTip(event, tooltipID, linkID){ if (tooltipTimer) { clearTimeout(tooltipTimer); } ; var docX = event.clientX + window.pageXOffset; var docY = event.clientY + window.pageYOffset; var showCommand = "ReallyShowTip('" + tooltipID + "', '" + linkID + "', " + docX + ", " + docY + ")"; tooltipTimer = _AN_Call_settimeout("setTimeout", window, showCommand, 1000); } function ReallyShowTip(tooltipID, linkID, docX, docY){ tooltipTimer = 0; var tooltip; var link; if (document.getElementById) { tooltip = document.getElementById(tooltipID); link = document.getElementById(linkID); } if (tooltip) { var left = GetXPosition(link); var top = GetYPosition(link); top += link.offsetHeight; if (!isFinite(top) || top == 0) { left = docX; top = docY; } top += 10; if (tooltip.offsetWidth != null ) { var width = tooltip.offsetWidth; var docWidth = document.body.clientWidth; if (left + width > docWidth) { left = docWidth - width - 1; } if (left < 0) { left = 0; } ; } MoveToPosition(tooltip, left, top); tooltip.style.visibility = "visible"; } } function HideTip(tooltipID){ if (tooltipTimer) { clearTimeout(tooltipTimer); tooltipTimer = 0; } var tooltip; if (document.getElementById) { tooltip = document.getElementById(tooltipID); } else if (document.all) { tooltip = eval(_AN_Eval("document.all['" + tooltipID + "']")); } if (tooltip) { tooltip.style.visibility = "hidden"; } } function NDOnLoad(){ if (browserVer == "IE6") { var scrollboxes = _AN_Call_getelementsbytagname("getElementsByTagName", document, 'blockquote'); if (scrollboxes.item(0)) { NDDoResize(); window.onresize = NDOnResize; } ; } ; } ; var resizeTimer = 0; function NDOnResize(){ if (resizeTimer != 0) { clearTimeout(resizeTimer); } ; resizeTimer = _AN_Call_settimeout('setTimeout', window, NDDoResize, 250); } ; function NDDoResize(){ var scrollboxes = _AN_Call_getelementsbytagname('getElementsByTagName', document, 'blockquote'); var i; var item; i = 0; while (item = scrollboxes.item(i)){ item.style.width = 100; i++ ; } ; i = 0; while (item = scrollboxes.item(i)){ item.style.width = item.parentNode.offsetWidth; i++ ; } ; clearTimeout(resizeTimer); resizeTimer = 0; } function SearchPanel(name, mode, resultsPath){ if (!name || !mode || !resultsPath) { alert("Incorrect parameters to SearchPanel."); } ; this.name = name; this.mode = mode; this.resultsPath = resultsPath; this.keyTimeout = 0; this.keyTimeoutLength = 500; this.lastSearchValue = ""; this.lastResultsPage = ""; this.deactivateTimout = 0; this.deactivateTimeoutLength = 200; this.DOMSearchField = function (){ return document.getElementById("MSearchField"); } ; this.DOMSearchType = function (){ return document.getElementById("MSearchType"); } ; this.DOMPopupSearchResults = function (){ return document.getElementById("MSearchResults"); } ; this.DOMPopupSearchResultsWindow = function (){ return document.getElementById("MSearchResultsWindow"); } ; this.DOMSearchPanel = function (){ return document.getElementById("MSearchPanel"); } ; this.OnSearchFieldFocus = function (isActive){ this.Activate(isActive); } ; this.OnSearchFieldChange = function (){ if (this.keyTimeout) { clearTimeout(this.keyTimeout); this.keyTimeout = 0; } ; var searchValue = _AN_Call_replace("replace", this.DOMSearchField().value, / +/g, ""); if (searchValue != this.lastSearchValue) { if (searchValue != "") { this.keyTimeout = _AN_Call_settimeout("setTimeout", window, this.name + ".Search()", this.keyTimeoutLength); } else { if (this.mode == "HTML") { this.DOMPopupSearchResultsWindow().style.display = "none"; } ; this.lastSearchValue = ""; } ; } ; } ; this.OnSearchTypeFocus = function (isActive){ this.Activate(isActive); } ; this.OnSearchTypeChange = function (){ var searchValue = _AN_Call_replace("replace", this.DOMSearchField().value, / +/g, ""); if (searchValue != "") { this.Search(); } ; } ; this.CloseResultsWindow = function (){ this.DOMPopupSearchResultsWindow().style.display = "none"; this.Activate(false , true ); } ; this.Search = function (){ this.keyTimeout = 0; var searchValue = _AN_Call_replace("replace", this.DOMSearchField().value, /^ +/, ""); var searchTopic = this.DOMSearchType().value; var pageExtension = searchValue.substr(0, 1); if (pageExtension.match(/^[a-z]/i)) { pageExtension = pageExtension.toUpperCase(); } else if (pageExtension.match(/^[0-9]/)) { pageExtension = 'Numbers'; } else { pageExtension = "Symbols"; } ; var resultsPage; var resultsPageWithSearch; var hasResultsPage; if (indexSectionsWithContent[searchTopic][pageExtension] == true ) { resultsPage = this.resultsPath + '/' + searchTopic + pageExtension + '.html'; resultsPageWithSearch = resultsPage + '?' + escape(searchValue); hasResultsPage = true ; } else { resultsPage = this.resultsPath + '/NoResults.html'; resultsPageWithSearch = resultsPage; hasResultsPage = false ; } ; var resultsFrame; if (this.mode == "HTML") { resultsFrame = window.frames.MSearchResults; } else if (this.mode == "FramedHTML") { resultsFrame = window.top.frames.Content; } ; if (resultsPage != this.lastResultsPage || (browserType == "IE" && hasResultsPage && (!resultsFrame.searchResults || resultsFrame.searchResults.lastMatchCount == 0))) { _AN_Write_href("href", _AN_Read_location("location", resultsFrame), false , resultsPageWithSearch); } else if (hasResultsPage) { if (resultsFrame.searchResults) { resultsFrame.searchResults.Search(searchValue); } else { _AN_Write_href("href", _AN_Read_location("location", resultsFrame), false , resultsPageWithSearch); } ; } ; var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); if (this.mode == "HTML" && domPopupSearchResultsWindow.style.display != "block") { var domSearchType = this.DOMSearchType(); var left = GetXPosition(domSearchType); var top = GetYPosition(domSearchType) + domSearchType.offsetHeight; MoveToPosition(domPopupSearchResultsWindow, left, top); domPopupSearchResultsWindow.style.display = 'block'; } ; this.lastSearchValue = searchValue; this.lastResultsPage = resultsPage; } ; this.Activate = function (isActive, ignoreDeactivateDelay){ if (isActive || (this.mode == "HTML" && this.DOMPopupSearchResultsWindow().style.display == "block")) { if (this.inactivateTimeout) { clearTimeout(this.inactivateTimeout); this.inactivateTimeout = 0; } ; this.DOMSearchPanel().className = 'MSearchPanelActive'; var searchField = this.DOMSearchField(); if (searchField.value == 'Search') { searchField.value = ""; } } else if (!ignoreDeactivateDelay) { this.inactivateTimeout = _AN_Call_settimeout("setTimeout", window, this.name + ".InactivateAfterTimeout()", this.inactivateTimeoutLength); } else { this.InactivateAfterTimeout(); } ; } ; this.InactivateAfterTimeout = function (){ this.inactivateTimeout = 0; this.DOMSearchPanel().className = 'MSearchPanelInactive'; this.DOMSearchField().value = "Search"; this.lastSearchValue = ""; this.lastResultsPage = ""; } ; } ; function SearchResults(name, mode){ this.mode = mode; this.lastMatchCount = 0; this.Toggle = function (id){ if (this.mode == "FramedHTML") { return ; } ; var parentElement = document.getElementById(id); var element = parentElement.firstChild; while (element && element != parentElement){ if (element.nodeName == 'DIV' && element.className == 'ISubIndex') { if (element.style.display == 'block') { element.style.display = "none"; } else { element.style.display = 'block'; } } ; if (element.nodeName == 'DIV' && element.hasChildNodes()) { element = element.firstChild; } else if (element.nextSibling) { element = element.nextSibling; } else { do { element = element.parentNode; } while(element && element != parentElement && !element.nextSibling)if (element && element != parentElement) { element = element.nextSibling; } ; } ; } ; } ; this.Search = function (search){ if (!search) { search = _AN_Read_search('search', _AN_Read_location('location', window)); search = search.substring(1); search = unescape(search); } ; search = _AN_Call_replace('replace', search, /^ +/, ""); search = _AN_Call_replace("replace", search, / +$/, ""); search = search.toLowerCase(); if (search.match(/[^a-z0-9]/)) { search = _AN_Call_replace("replace", search, /\_/g, "_und"); search = _AN_Call_replace("replace", search, /\ +/gi, "_spc"); search = _AN_Call_replace("replace", search, /\~/g, "_til"); search = _AN_Call_replace("replace", search, /\!/g, "_exc"); search = _AN_Call_replace("replace", search, /\@/g, "_att"); search = _AN_Call_replace("replace", search, /\#/g, "_num"); search = _AN_Call_replace("replace", search, /\$/g, "_dol"); search = _AN_Call_replace("replace", search, /\%/g, "_pct"); search = _AN_Call_replace("replace", search, /\^/g, "_car"); search = _AN_Call_replace("replace", search, /\&/g, "_amp"); search = _AN_Call_replace("replace", search, /\*/g, "_ast"); search = _AN_Call_replace("replace", search, /\(/g, "_lpa"); search = _AN_Call_replace("replace", search, /\)/g, "_rpa"); search = _AN_Call_replace("replace", search, /\-/g, "_min"); search = _AN_Call_replace("replace", search, /\+/g, "_plu"); search = _AN_Call_replace("replace", search, /\=/g, "_equ"); search = _AN_Call_replace("replace", search, /\{/g, "_lbc"); search = _AN_Call_replace("replace", search, /\}/g, "_rbc"); search = _AN_Call_replace("replace", search, /\[/g, "_lbk"); search = _AN_Call_replace("replace", search, /\]/g, "_rbk"); search = _AN_Call_replace("replace", search, /\:/g, "_col"); search = _AN_Call_replace("replace", search, /\;/g, "_sco"); search = _AN_Call_replace("replace", search, /\"/g, "_quo"); search = _AN_Call_replace("replace", search, /\'/g, "_apo"); search = _AN_Call_replace("replace", search, /\/g, "_ran"); search = _AN_Call_replace("replace", search, /\,/g, "_com"); search = _AN_Call_replace("replace", search, /\./g, "_per"); search = _AN_Call_replace("replace", search, /\?/g, "_que"); search = _AN_Call_replace("replace", search, /\//g, "_sla"); search = _AN_Call_replace("replace", search, /[^a-z0-9\_]i/gi, "_zzz"); } ; var resultRows = _AN_Call_getelementsbytagname("getElementsByTagName", document, "div"); var matches = 0; var i = 0; while (i < _AN_Read_length("length", resultRows)){ var row = resultRows.item(i); if (row.className == "SRResult") { var rowMatchName = row.id.toLowerCase(); rowMatchName = _AN_Call_replace("replace", rowMatchName, /^sr\d*_/, ''); if (_AN_Read_length('length', search) <= _AN_Read_length('length', rowMatchName) && rowMatchName.substr(0, _AN_Read_length('length', search)) == search) { row.style.display = "block"; matches++ ; } else { row.style.display = "none"; } ; } ; i++ ; } ; document.getElementById("Searching").style.display = "none"; if (matches == 0) { document.getElementById("NoMatches").style.display = "block"; } else { document.getElementById("NoMatches").style.display = "none"; } this.lastMatchCount = matches; return true ; } ; } ;