/* This javascript allows the side navigation rollovers to work */
start = function() {
  startList("sidenav");
  divLoader();
}
function startList(id)
{ if (document.getElementById)
  { var navLI = document.getElementById(id).getElementsByTagName("li");
    for (i=0; i<navLI.length; i++)
    { node = navLI[i];
      node.onmouseover=function()
      { this.className+="over";  }
      node.onmouseout=function()
      { this.className=this.className.replace("over", ""); }  
    }
  }
}

/* This function copys contents of iframes to divs.
 * Matching frames and divs must have the same class name.
 */
function divLoader()
{ var allDivs = document.getElementsByTagName('div');
  var allFrames = document.getElementsByTagName('iframe');
  if ((allDivs.length > 0) && (allFrames.length > 0))
  { for (i=0; i<allFrames.length; i++)
    { var divCounter = 0;
      while (allFrames[i].className != allDivs[divCounter].className)
      { divCounter = divCounter + 1; }
      if ((allDivs[divCounter].className != "") && (allFrames[i].className == allDivs[divCounter].className))
      { allDivs[divCounter].innerHTML = frames[i].document.body.innerHTML; }
    }
  }
}

window.onload=start;