﻿// File JScript
// allunga leftcol2  al 100% del div maincontainer (il primo contenitore)
function allocateSidebarHeight() {
var contentDom = document.getElementById("maincontainer");
var sidebarDom = document.getElementById("leftcol2");
//var sidebarDomright = document.getElementById("col3");
//alert(contentDom.offsetHeight);
if((contentDom.offsetHeight-0) > sidebarDom.offsetHeight) {
sidebarDom.style.height = (contentDom.offsetHeight-800)+"px"; }
//if((contentDom.offsetHeight-345) > sidebarDomright.offsetHeight) {
//sidebarDomright.style.height = (contentDom.offsetHeight-345)+"px"; }
}

startList = function() {
if (document.all&&document.getElementById) {
    navRoot = document.getElementById("maincontainer");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() { this.className+=" over"; }
node.onmouseout=function() { this.className=this.className.replace(" over", ""); } } } }
allocateSidebarHeight(); }

window.onload=startList;