function getWindowHeight() {
  var windowHeight=0;
  if (typeof(window.innerHeight)=='number') {
    windowHeight=window.innerHeight;
  }
  else {
    if (document.documentElement&&document.documentElement.clientHeight) {
      windowHeight=document.documentElement.clientHeight;
    }
    else {
      if (document.body&&document.body.clientHeight) {
        windowHeight=document.body.clientHeight;
      }
    }
  }
  return windowHeight;
}
function sizeIt() {
  var footerHeight=44;
  var headerHeight=88;
  if (document.getElementById) {
    var windowHeight=getWindowHeight();
    if (windowHeight>0) {
      var imgSizer=document.getElementById("sizer");
      imgSizer.height=windowHeight-(footerHeight+headerHeight);
    }
  }
}  
function openSubmenu(btn){
  parentmenu=btn;
  btndiv=btn;
  while(parentmenu.className!="menuset"){
    parentmenu=parentmenu.parentNode;
  }
  while(btndiv.className!="menu"){
    btndiv=btndiv.parentNode;
  }
  for(x=0;x<parentmenu.childNodes.length;x++){
    if(parentmenu.childNodes[x].className=="items"){
      if(parentmenu.childNodes[x].style.visibility=="hidden"||parentmenu.childNodes[x].style.visibility==""){
        parentmenu.childNodes[x].style.visibility="visible";
        parentmenu.childNodes[x].style.display="block";
        btndiv.style.backgroundImage="URL('images/open.gif')";
      }
      else {
        parentmenu.childNodes[x].style.visibility="hidden";
        parentmenu.childNodes[x].style.display="none";
        btndiv.style.backgroundImage="URL('images/closed.gif')";
      }
    }
  }
}
