element
if (d.offsetHeight)
divHeight = d.offsetHeight;
else if (d.style.pixelHeight)
divHeight = d.style.pixelHeight;
else
{
// added the time out for use when resizing is happening onload (like in rad window)
if (MatchColumnsSemaphore)
MatchColumnsSemaphore = false;
else
{
window.setTimeout(matchColumns, 500);
MatchColumnsSemaphore = true;
return;
}
}
// calculate maximum height
maxHeight = Math.max(maxHeight, divHeight);
}
}
// assign maximum height value to all of container
elements
for (var i = 0; i < contDivs.length; i++)
contDivs[i].style.height = maxHeight + "px";
}
// Runs the script when page loads
window.onload = function()
{
if (document.getElementsByTagName)
matchColumns();
}
// Set the next fields value and append additional values
function setNextAppend(theField)
{
theForm = theField.form;
for (i = 0; i < theForm.elements.length; i++)
{
if (theForm.elements[i].id == theField.id)
{
theForm.elements[i + 1].value += '\n' + theField.value;
break;
}
}
}
// Set the next fields value without appending
function setNext(theField)
{
theForm = theField.form;
for (i = 0; i < theForm.elements.length; i++)
{
if (theForm.elements[i].id == theField.id)
{
theForm.elements[i + 1].value = theField.value;
break;
}
}
}
// Input type button on panels that need to handle navigating
function ButtonNavigate(url)
{
if (url != "")
location.href = url;
}
//= 0)
{
this.isIE = true;
this.version = parseFloat(ua.substr(i + s.length));
return;
}
s = "Netscape6/";
if ((i = ua.indexOf(s)) >= 0)
{
this.isNS = true;
this.version = parseFloat(ua.substr(i + s.length));
return;
}
// Treat any other "Gecko" browser as NS 6.1.
s = "Gecko";
if ((i = ua.indexOf(s)) >= 0)
{
this.isNS = true;
this.version = 6.1;
return;
}
}
var browser = new Browser();
//----------------------------------------------------------------------------
// Code for handling the menu bar and active button.
//----------------------------------------------------------------------------
var activeButton = null;
/* [MODIFIED] This code commented out, not needed for activate/deactivate
on mouseover.
// Capture mouse clicks on the page so any active button can be
// deactivated.
if (browser.isIE)
document.onmousedown = pageMousedown;
else
document.addEventListener("mousedown", pageMousedown, true);
function pageMousedown(event) {
var el;
// If there is no active button, exit.
if (activeButton == null)
return;
// Find the element that was clicked on.
if (browser.isIE)
el = window.event.srcElement;
else
el = (event.target.tagName ? event.target : event.target.parentNode);
// If the active button was clicked on, exit.
if (el == activeButton)
return;
// If the element is not part of a menu, reset and clear the active
// button.
if (getContainerWith(el, "DIV", "menu") == null) {
resetButton(activeButton);
activeButton = null;
}
}
[END MODIFIED] */
function buttonClick(event, menuId)
{
var button;
// Get the target button element.
if (browser.isIE)
button = window.event.srcElement;
else
button = event.currentTarget;
// Blur focus from the link to remove that annoying outline.
button.blur();
// Associate the named menu to this button if not already done.
// Additionally, initialize menu display.
if (button.menu == null)
{
button.menu = document.getElementById(menuId);
if (button.menu.isInitialized == null)
menuInit(button.menu);
}
// [MODIFIED] Added for activate/deactivate on mouseover.
// Set mouseout event handler for the button, if not already done.
if (button.onmouseout == null)
button.onmouseout = buttonOrMenuMouseout;
// Exit if this button is the currently active one.
if (button == activeButton)
return false;
// [END MODIFIED]
// Reset the currently active button, if any.
if (activeButton != null)
resetButton(activeButton);
// Activate this button, unless it was the currently active one.
if (button != activeButton)
{
depressButton(button);
activeButton = button;
}
else
activeButton = null;
return false;
}
function buttonMouseover(event, menuId)
{
var button;
// [MODIFIED] Added for activate/deactivate on mouseover.
// Activates this button's menu if no other is currently active.
if (activeButton == null)
{
buttonClick(event, menuId);
return;
}
// [END MODIFIED]
// Find the target button element.
if (browser.isIE)
button = window.event.srcElement;
else
button = event.currentTarget;
// If any other button menu is active, make this one active instead.
if (activeButton != null && activeButton != button)
buttonClick(event, menuId);
}
function depressButton(button)
{
var x, y;
// Update the button's style class to make it look like it's
// depressed.
button.className += " menuButtonActive";
// [MODIFIED] Added for activate/deactivate on mouseover.
// MODIFIED - R.Wenger 9/22/04 - attache event because the code below won't if there is already another event there (e.g., rollover)
button.attachEvent('onmouseout', buttonOrMenuMouseout);
// Set mouseout event handler for the button, if not already done.
if (button.onmouseout == null)
button.onmouseout = buttonOrMenuMouseout;
if (button.menu.onmouseout == null)
button.menu.onmouseout = buttonOrMenuMouseout;
// [END MODIFIED]
// Position the associated drop down menu under the button and
// show it.
x = getPageOffsetLeft(button);
y = getPageOffsetTop(button) + button.offsetHeight;
// For IE, adjust position.
if (browser.isIE)
{
x += button.offsetParent.clientLeft;
y += button.offsetParent.clientTop;
}
// [MODIFIED] Adjust menu position if it pops up off screen [JG 1/22/05]
var menuRight = 0;
var menuBottom = 0;
var bodyRight = document.body.offsetLeft + document.body.offsetWidth - 30; // -30 for the scroll bar;
var bodyBottom = document.body.offsetTop + document.body.offsetHeight - 30; // -30 for the scroll bar;
var parent = getParent(button.menu);
var menuOffsetLeft = x + getPageOffsetLeft(parent)
var menuOffsetTop = y + getPageOffsetTop(parent) + parent.offsetHeight;
if (browser.isIE)
{
menuRight = menuOffsetLeft + button.menu.clientWidth;
menuBottom = menuOffsetTop + button.menu.clientHeight;
}
else
{
// i don't know how to get the width and height for
// DIV elements on non-IE browsers, so just assume
// width to be 100 pixels and height to be 300
menuRight = menuOffsetLeft + 100;
menuBottom = menuOffsetTop + 300;
}
if (menuRight > bodyRight)
{
x -= (menuRight - bodyRight);
menuRight = x + button.menu.clientWidth;
}
if (menuBottom > bodyBottom)
{
//y -= (menuBottom - bodyBottom);
menuBottom = y + button.menu.clientHeight;
}
// [END MODIFIED]
// Set menu position and make it visible
button.menu.style.left = x + "px";
button.menu.style.top = y + "px";
button.menu.style.visibility = "visible";
// [MODIFIED] Added to hide