2007-03-09 17:16:17 +00:00
|
|
|
|
|
|
|
var columnIDs;
|
|
|
|
|
|
|
|
function init () {
|
|
|
|
setHeight ('menu', columnIDs);
|
|
|
|
}
|
|
|
|
|
|
|
|
function doResize () {
|
|
|
|
setHeight ('menu', columnIDs);
|
|
|
|
}
|
|
|
|
|
|
|
|
function setHeight (myTarget, columns) {
|
|
|
|
if (document.getElementById) {
|
|
|
|
var targetID = document.getElementById (myTarget);
|
|
|
|
var maxHeight = targetID.offsetHeight;
|
|
|
|
var divCount = columns.length;
|
|
|
|
var i = 0;
|
|
|
|
|
|
|
|
// we only want to resize if the level 2 CSS has been loaded
|
|
|
|
if (window.getComputedStyle) { // got NS/Mozilla/Firefox
|
|
|
|
var targetStyle = window.getComputedStyle (targetID, "");
|
|
|
|
|
|
|
|
if (targetStyle.getPropertyValue ('background-color') == 'transparent') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} else if (targetID.currentStyle) { // got IE
|
|
|
|
if (targetID.currentStyle.backgroundColor == 'transparent') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// the divs array contains references to each column's div element.
|
|
|
|
var divs = new Array (divCount);
|
|
|
|
for (i = 0; i < divCount; i++) {
|
|
|
|
divs[i] = document.getElementById (columns[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
// determine the maximum height out of all columns specified
|
|
|
|
for (i = 0; i < divs.length; i++) {
|
|
|
|
if (maxHeight < divs[i].offsetHeight) {
|
2007-03-09 21:24:02 +00:00
|
|
|
maxHeight = divs[i].offsetHeight + 2;
|
2007-03-09 17:16:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// set the target column to that maximum height
|
2007-03-09 21:24:02 +00:00
|
|
|
targetID.style.height = maxHeight + 'px';
|
2007-03-09 17:16:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* for Mozilla */
|
|
|
|
if (document.addEventListener) {
|
|
|
|
document.addEventListener ("DOMContentLoaded", init, null);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* for Internet Explorer */
|
|
|
|
/*@cc_on @*/
|
|
|
|
/*@if (@_win32)
|
|
|
|
document.write ("<script defer src=ie_onload.js><"+"/script>");
|
|
|
|
/*@end @*/
|
|
|
|
|
|
|
|
/* for other browsers */
|
|
|
|
window.onload = init;
|
|
|
|
window.onresize = doResize;
|
|
|
|
|