var lastMenuNr=false;

function menuSwitch(menuNr) {

    if(menuNr==lastMenuNr) return;

    if(lastMenuNr!==false) {
	oldObj=this.document.getElementById("subMenu"+lastMenuNr);
	if(oldObj) {
	    oldObj.style.display='none';
	}
    }
    
    objTd=this.document.getElementById("menu"+menuNr);
    left=objTd.offsetLeft;
    left=left+85;
    obj=this.document.getElementById("subMenu"+menuNr);
    if(obj) {
     if(obj.style.left!=left+'px') {
	obj.style.left=left+'px';
     }
	obj.style.display='block';
    }

    lastMenuNr=menuNr;
}

function menuSwitchOff() {

    if(lastMenuNr!==false) {
	oldObj=this.document.getElementById("subMenu"+lastMenuNr);
	if(oldObj) {
	    oldObj.style.display='none';
	    lastMenuNr=false;
	}
    }
}

var orgSize=0;

function checkSizeX() {

    windowHeight=document.documentElement.clientHeight;
    newHeight=windowHeight-251-24-24;

    obj2=document.getElementById('content');
    if(orgSize!=0) {
	obj2.style.height=(orgSize-1)+"px";
    }
    if(obj2.offsetHeight<newHeight) {
	orgSize=obj2.offsetHeight;
	obj2.style.height=(newHeight-1)+"px";
    } 

        obj=document.getElementById('contentText');
    obj.style.height=(newHeight-1)+"px";  
}
