
function setLayout(){
  var offset = 0;
  if (NS && dom) {offset=20}
  if (DHTML){
    bodyHeight = getBodyHeight();
    bodyWidth = getBodyWidth();	
    if (IE4 || IE5 || (NS && dom)) {menuRightPadding = getWidth("searchcell") + getWidth("gocell");}
    setLeft ("corporate", bodyWidth - 450 - menuRightPadding - offset);
    setLeft ("products", bodyWidth - 400 - menuRightPadding - offset);
    setLeft ("support", bodyWidth - 300 - menuRightPadding - offset);
    setLeft ("alliances", bodyWidth - 450 - menuRightPadding - offset);
    setLeft ("industry", bodyWidth - 400 - menuRightPadding - offset);
    setLeft ("training", bodyWidth - 300 - menuRightPadding - offset);
    }		
  }

function getBodyHeight (){
  if (DHTML) {
    if (IE4 || IE5) {
      return document.body.clientHeight;
      } // else NN4 && dom
    else if (NS6) {
      return innerHeight -1; //compensate for scrollbar at bottom
      }
    }
    return null;
  }

function getBodyWidth (){
  if (DHTML) {
    if (IE4 || IE5) {
      return document.body.clientWidth;
      } // else NN4 && dom
    return innerWidth;
   }
   return null;
  }

function getHeight(objName) {
  if (DHTML) {
    if (IE4 || IE5) return eval(objName + ".offsetHeight");
    else if (dom) {
      obj = document.getElementById(objName);
      return parseInt(document.defaultView.getComputedStyle(obj, "").getPropertyValue("height"));
      }
    }
   return null;
  }

function getWidth(objName) {
  if (DHTML) {
    if (IE4 || IE5) return eval(objName + ".offsetWidth");
    if (dom) {
      obj = document.getElementById(objName);
      return parseInt(document.defaultView.getComputedStyle(obj, "").getPropertyValue("width"));
      }
   }
   return null;
}

function setTop(objName, val) {
  if (DHTML) {
    if (IE4 || IE5 || dom ){
      document.getElementById(objName).style.top = val + "px";
      }
    }
  }

function setLeft(objName, val) {
  if (DHTML) {
    if (IE4 || IE5 || dom ){
      document.getElementById(objName).style.left = val + "px";
      }
    }
  }

function setWidth(obj, val) {
  if (DHTML) {
    if (IE4 || IE5) {
      eval(obj + ".style.width=" + val);
      }
    else if (dom) {
      document.getElementById(obj).style.width = val + "px";
      }
    }
  }

function setHeight(obj, val) {
  if (DHTML) {
    if (IE4 || IE5) {
      eval(obj + ".style.height=" + val);
      }
	else if (dom) {
      document.getElementById(obj).style.height = val + "px";
      }
   }
}

function hideIt (obj) {
  if (DHTML) {
    if (IE4 || IE5 || dom) {
      obj = (IE4) ? eval(obj) : document.getElementById(obj);
      obj.style.visibility = "hidden";
      if ((navigator.appVersion.indexOf("MSIE 5.0") != -1) || (navigator.userAgent.indexOf("Opera") != 1)) {
        iii = document.body.getElementsByTagName("iframe");
        if (iii.length > 0) { // show all IFRAMEs after menu-browsing is completed
          for (i=0; i<iii.length; i++) {
            if (iii.item(i).src != "about:blank") {
              iii.item(i).style.display="block" ;
              }
      		  }						
		      }
        }
      }
    }
  }


function showIt(obj) {
  if (DHTML) {
    if (IE4 || IE5 || dom) {
      obj = (IE4) ? eval(obj) : document.getElementById(obj);
      obj.style.visibility = "visible";
      if ((navigator.appVersion.indexOf("MSIE 5.0") != -1) || (navigator.userAgent.indexOf("Opera") != -1)) {
        iii = document.body.getElementsByTagName("iframe");
        if (iii.length > 0) { // hide all IFRAMEs from IE5.0* and Opera 7+ while menus showing because they won't stay behind menus
          for (i=0; i<iii.length; i++) {iii.item(i).style.display="none";}
	         }
        }
      }
    }
  }

function revealSubmenu (xx){
  hideIt ("corporate");
  hideIt ("products");
  hideIt ("support");
  hideIt ("alliances");
  hideIt ("industry");
  hideIt ("training");
  if (xx != "home") {showIt (xx);}
  }

function init(){
  MM_preloadImages('/images/nav/nav02-02-on.gif','/images/nav/nav03-03-on.gif','/images/nav/nav04-04-on.gif','/images/nav/nav05-05-on.gif','/images/nav/nav07-01-on.gif','/images/nav/training-on.gif');
  menusReady=true;
  }