// ---------------------------------------------------------------------------- // Private section. // // The variables and functions in this section are used internally by the script // and shouldn't be accessed directly from outside. // ---------------------------------------------------------------------------- // Global variables var items = new Array(); // array of all items in the sitemap var topItems = new Array(); // top level items only var browser = "OTHER"; // browser version (IE, NS, NS6 or OTHER) var selectedItem = null; // current selected item var style = null; // site map style var scriptURL = null; // URL to the script folder var expandTopItems = null; // true to expand top level items var mouseOverColor = null; // mouse over color var selectedColor = null; // selected color var selectedBackground = null; // selected background color // pre-load static images var blankImg = new Image(); var simpleImg = new Image(); var simplelImg = new Image(); var minusImg = new Image(); var colapseImg = new Image(); var colapselImg = new Image(); var plusImg = new Image(); var expandlImg = new Image(); var expandImg = new Image(); var spaceImg = new Image(); var treeLineImg = new Image(); // ---------------------------------------------------------------------------- // Calculates the Y coordinates of all visible sitemap items. // ---------------------------------------------------------------------------- function adjustY() { //if ( browser == "NS6" ) { // siteMapObj = document.getElementById('sitemap'); // siteMapObj.style.display = "none"; // siteMapObj.style.display = ""; //} // This was reported necessary by Mozilla, but it works better without it. if ( browser != "NS" ) return; var y = 0; var minWidth = 0; var minHeight = 0; for ( var i=0; i minWidth ) minWidth = getSiteItemObj(items[i]).clip.width; minHeight += getSiteItemObj(items[i]).clip.height; } } } document.sitemap.clip.right = minWidth; document.sitemap.clip.bottom = minHeight; } // ---------------------------------------------------------------------------- // Return the site item DOM object for the given siteItem // ---------------------------------------------------------------------------- function getSiteItemObj( siteItem ) { if ( browser == "NS6" ) return document.getElementById("item"+siteItem.id); else return siteItem.obj; } // ---------------------------------------------------------------------------- // Return the icon DOM object for the given siteItem // ---------------------------------------------------------------------------- function getIconObj( siteItem ) { if ( browser == "NS6" ) return eval("document.icon"+siteItem.id); else return siteItem.icon; } // ---------------------------------------------------------------------------- // Return the tree icon DOM object for the given siteItem // ---------------------------------------------------------------------------- function getTreeIconObj( siteItem ) { if ( browser == "NS6" ) return eval("document.treeIcon"+siteItem.id); else return siteItem.treeIcon; } // ---------------------------------------------------------------------------- // Assign the tree icon DOM object for the given siteItem // ---------------------------------------------------------------------------- function setTreeIconObj( siteItem, imgObj ) { if ( browser == "NS6" ) eval("document.treeIcon"+siteItem.id).src = imgObj.src; else siteItem.treeIcon.src = imgObj.src; } // ---------------------------------------------------------------------------- // Return the style DOM object for the given siteItem // ---------------------------------------------------------------------------- function getStyleObj( siteItem ) { if ( siteItem.text != null ) { if ( browser == "NS6" ) return document.getElementById("style"+siteItem.id).style; else return siteItem.style; } else { return null; } } // ---------------------------------------------------------------------------- // Colapses a given item, hiding its entire subtree. // ---------------------------------------------------------------------------- function colapse( siteItem ) { if ( selectedItem == siteItem ) selectItem( null ); for ( var i=0; i" ); if ( browser == "NS6" ) _writeln( "
" ); for ( var i=0; i" ); else if ( browser == "NS6" ) _writeln( "
" ); else if ( browser == "NS" ) window.onResize = restoreIcons; else return; for ( var i=0; i) tag for one item. // // Parameters: // siteItem item for which to output the link // element HTML code to write inside the anchor tag // ---------------------------------------------------------------------------- function outputItemAnchor( siteItem, element ) { var itemAnchStr = ""; itemAnchStr += ""; if ( siteItem.url == null ) itemAnchStr += "