function comInitObj(num) {
        totalMenus = num;
	for (i = 1; i <= totalMenus; i++) { 
	    whichEl = "com_pd" + i;
	    whichEl = document.getElementById(whichEl);
	    if(whichEl) {
                whichEl.onmouseover = comOverLayer;
	        whichEl.onmouseout = comOutLayer;
	    }
	}
}

function comShowLayer(showEl,event) {
    var y_offset = 17;
    clearTimeout(comtimer);
    comHideAllLayers();

    var whichEl = document.getElementById(showEl);
    var myObject = document.anchors[showEl + "A"];
    while (myObject.offsetParent) {
        comcmTop  = comcmTop  + myObject.offsetTop;
	comcmLeft = comcmLeft + myObject.offsetLeft;
	myObject = myObject.offsetParent
    }
    comcmTop = comcmTop + y_offset;

    whichEl.style.visibility = "visible";
    whichEl.style.top = comcmTop;
    if (comcmLeft > 600) { comcmLeft = 600 }
    whichEl.style.left = comcmLeft;

    comcmTop = 0;
    comcmLeft = 0;
}

function comHideAllLayers() {
	for (i = 1; i <= totalMenus; i++) { 
		whichEl = "com_pd" + i;
		whichEl = document.getElementById(whichEl);
		if (!comisOver && whichEl) {
			whichEl.style.visibility = "hidden";
		}		
	}
}

function comOverLayer() { clearTimeout(comtimer); comisOver = true; }

function comOutLayer() { 
	clearTimeout(comtimer);
	comisOver = false; 
	comtimer = setTimeout("comHideAllLayers()",300);
}


