var activeTableObj;

function showDropDown(liObj, table_id, num){
	t = _getPageOffsetTop(document.getElementById("dropDownMenuDiv"));
	l = _getPageOffsetLeft(document.getElementById("dropDownMenuDiv"));
	
	activeTableObj = tableObj = document.getElementById(table_id);
	
	if(!tableObj){
		return;
	}

	if (document.all){
		tableObj.style.left = l + (num - 1) * 140;
		tableObj.style.top = t + 47;
		tableObj.style.display	= "block";
	}
	else{
		tableObj.style.left = parseInt(l) + (num - 1) * 140 + "px";
		tableObj.style.top = parseInt(t) + 47 + "px";
		tableObj.style.display	= "block";
	}

}

function _getPageOffsetTop (el) {
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { 
		
		ot += el.offsetTop; 
	}
	return ot;
}

function _getPageOffsetLeft (el) {
	var ol=el.offsetLeft;
	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
}

function hideDropDownTable(){
	if(activeTableObj){
		activeTableObj.style.display = "none";
	}
}

function makeDropDownTableActive(tableObl){
	if(tableObl){
		tableObl.style.display = "block";
		activeTableObj = tableObl;
	}
}