var menuVisible = false; var evenColumns = false; var firstHeight = 0; var firstObject = ''; Event.observe(window,'load', function () { if (evenColumns) { $$('div.whitebox').each(function(i) { if (firstHeight==0) { firstHeight = i.down().getDimensions().height; firstObject = i.down(); } else { if (i.down().getDimensions().height>firstHeight) { firstObject.style.height = i.down().getDimensions().height+'px'; } else { i.down().style.height=firstObject.style.height+'px'; } firstHeight = 0; firstObject = ''; } }); } $$('div.roundy').each(function (i) { if (i.hasClassName('button')) { if (i.up(1).id=='leftcolumn') { var div = document.createElement('div'); div.style.cssFloat='left'; div.style.styleFloat='left'; div.style.backgroundImage='url(img/bluebutton_left.png)'; div.style.width='21px'; div.style.height='56px'; div.style.backgroundRepeat='no-repeat'; i.up().insertBefore(div, i); var div = document.createElement('div'); div.style.cssFloat='left'; div.style.styleFloat='left'; div.style.backgroundImage='url(img/bluebutton_right.png)'; div.style.width='21px'; div.style.height='56px'; div.style.backgroundRepeat='no-repeat'; i.up().appendChild(div); } if (i.up(1).id=='rightcolumn') { var div = document.createElement('div'); div.style.cssFloat='left'; div.style.styleFloat='left'; div.style.backgroundImage='url(img/orangebutton_left.png)'; div.style.width='21px'; div.style.height='56px'; div.style.backgroundRepeat='no-repeat'; i.up().insertBefore(div, i); var div = document.createElement('div'); div.style.cssFloat='left'; div.style.styleFloat='left'; div.style.backgroundImage='url(img/orangebutton_right.png)'; div.style.width='21px'; div.style.height='56px'; div.style.backgroundRepeat='no-repeat'; i.up().appendChild(div); } } else { if (i.up().id=='leftcolumn') { var div = document.createElement('div'); div.style.backgroundImage='url(img/cupleft.png)'; div.style.width='601px'; div.style.height='17px'; div.style.backgroundRepeat='no-repeat'; i.insertBefore(div, i.down()); var div = document.createElement('div'); div.style.backgroundImage='url(img/cupleft.png)'; div.style.width='601px'; div.style.height='17px'; div.style.backgroundRepeat='no-repeat'; div.style.backgroundPosition='0 -17px'; i.appendChild(div); } if (i.up().id=='rightcolumn') { var div = document.createElement('div'); div.style.backgroundImage='url(img/cupright.png)'; div.style.width='601px'; div.style.height='17px'; div.style.backgroundRepeat='no-repeat'; i.insertBefore(div, i.down()); var div = document.createElement('div'); div.style.backgroundImage='url(img/cupright.png)'; div.style.width='601px'; div.style.height='17px'; div.style.backgroundRepeat='no-repeat'; div.style.backgroundPosition='0 -17px'; i.appendChild(div); } } }); var subMenus = 0; $$('ul.submenu').each(function(i) { subMenus++; i.id='sub_'+subMenus; }); $$('#tabs a').each(function (i) { if (i.up(1).className!='submenu') { var mouseOn = function () { this.up().style.backgroundImage='url(img/tab_on.gif)'; if (this.next()) { var coords = this.up().cumulativeOffset(); this.next().style.top=coords[1]+49+'px'; this.next().style.left=coords[0]-41+'px'; var myId = this.next().id; this.next().onmouseout= function () { if (menuVisible) { var e = arguments[0] || window.event; var tg = (window.event) ? e.srcElement : e.target; var reltg = (e.relatedTarget) ? e.relatedTarget : e.toElement; if (reltg.nodeName!='LI' && reltg.nodeName!='A') { $(myId).hide(); this.up().style.backgroundImage='url(img/trans.gif)'; menuVisible=false; } } }; this.next().onmouseover= function () { menuVisible = true; this.up().style.backgroundImage='url(img/tab_on.gif)'; }; $$('ul.submenu').each(function(j) { if (j.id!=myId) { j.hide(); } }); $$('#'+myId+' li').each(function(k) { k.style.margin=0; k.style.padding=0; k.style.height='15px'; k.style.paddingTop='5px'; k.style.paddingBottom='5px'; }); this.next().show(); } } var mouseOff = function () { this.up().style.backgroundImage='url(img/trans.gif)'; } i.onmouseover = mouseOn; i.onmouseout = mouseOff; } }); });