var CurrentMenuAreaName; var CurrentMenuAreaHeight; var CurrentCategoryAreaName; var CurrentCategoryAreaHeight; //This function is used to hide and show sections of the menu function MenuAreaClick(MenuAreaName) { if (CurrentMenuAreaName != null) { // If there is a current displayed item if (CurrentMenuAreaName == MenuAreaName) return; // If this Menu is already displayed exit oMenuArea = document.getElementById(CurrentMenuAreaName); // Locate the MenuArea currently on display oMenuArea.style.display = 'none'; // Hide the area } oMenuArea = document.getElementById(MenuAreaName); // Locate the new MenuArea to display oMenuArea.style.overflow = 'visible'; oMenuArea.style.display = 'inline'; // Show the area so we can record its height CurrentMenuAreaHeight = oMenuArea.offsetHeight; CurrentMenuAreaName = MenuAreaName; // record the height and name oMenuArea.style.overflow = 'hidden'; oMenuArea.style.height = 1; // Ask the MenuArea to crop content //alert("Expanding " + MenuAreaName + " Target Height: " + CurrentMenuAreaHeight); setTimeout("ExpandHeight('" + MenuAreaName + "'," + CurrentMenuAreaHeight + ");", 1); } //This function is used to hide and show sections of the Category function CategoryAreaClick(CategoryAreaName) { if (CurrentCategoryAreaName != null) { // If there is a current displayed item if (CurrentCategoryAreaName == CategoryAreaName) return; // If this category is already displayed exit oCategoryArea = document.getElementById(CurrentCategoryAreaName); // Locate the CategoryArea currently on display oCategoryArea.style.display = 'none'; // Hide the area } oCategoryArea = document.getElementById(CategoryAreaName); // Locate the new CategoryArea to display oCategoryArea.style.overflow = 'visible'; oCategoryArea.style.display = 'inline'; // Show the area so we can record its height CurrentCategoryAreaHeight = oCategoryArea.offsetHeight; CurrentCategoryAreaName = CategoryAreaName; // record the height and name oCategoryArea.style.overflow = 'hidden'; oCategoryArea.style.height = 1; // Ask the CategoryArea to crop content //alert("Expanding " + CategoryAreaName + " Target Height: " + CurrentCategoryAreaHeight); setTimeout("ExpandHeight('" + CategoryAreaName + "'," + CurrentCategoryAreaHeight + ");", 1); } function ExpandHeight(ObjectName, DesiredHeight) { ObjectID = ObjectName; // Cache the objectID h = DesiredHeight; //alert(h); Object = document.getElementById(ObjectName); if (Object.offsetHeight < DesiredHeight) { // If the object is not tall enough Object.style.height = Object.offsetHeight + 10; // Increase the height by 1 pixel setTimeout("ExpandHeight(ObjectID,h);", 1); // Recursively call the function to increase the height further } } function popUp(path, width, height) { window.open( path, "", "height = " + height + ", width = " + width + ",toolbar=no,location=no,status=no,menubar=no,scrollbars=yes" ) }