function showMenu(visparam, objId, totRows){
	var divObj = document.getElementById('submenu_'+ objId);
	var liObj = document.getElementById('mainli_'+ objId);
	var subGrpDv1 = document.getElementById('subgrdiv1_'+ objId);
	var subGrpDv2 = document.getElementById('subgrdiv2_'+ objId);
	var subDepDv1 = document.getElementById('subdeptdiv1_'+ objId);
	var subDepDv2 = document.getElementById('subdeptdiv2_'+ objId);
	var divLeft = findPosX(liObj);
	var subDivWidth = 180 * parseInt(totRows,10);
	var screenWidth = (screen.width - 8);
	var rightWidth = parseInt(screenWidth,10) - parseInt(divLeft,10);
	
	if(visparam == 1){
		if(rightWidth < subDivWidth){
			divObj.style.left = (divLeft - 115) + 'px';
			divObj.style.width = subDivWidth + 'px';
		}else{
			divObj.style.left = divLeft + 'px';
		}
		if(totRows == 1){
			var mainDivWidth = document.getElementById('mainli_'+ objId).offsetWidth;
			if(subGrpDv1){
				if(mainDivWidth > 150){
					subGrpDv1.style.width = mainDivWidth +'px';
				}
			}else if(subDepDv1){
				if(mainDivWidth > 150){
					subDepDv1.style.width = mainDivWidth +'px';
				}
			}
		}
		divObj.style.top = parseInt(findPosY(liObj),10) + 24 + 'px';
		divObj.style.visibility = 'visible';
		divObj.style.display = 'block';
		divObj.style.width = subDivWidth + 'px';
		divHeight = "";
		divHeight = divObj.offsetHeight;
		if(subGrpDv1){
			subGrpDv1.style.height = divHeight +'px';
		}	
		if(subGrpDv2){
			subGrpDv2.style.height = divHeight +'px';
		}	
		if(subDepDv1){
// 			alert(divHeight);
			subDepDv1.style.height = divHeight +'px';
		}
		if(subDepDv2){
			subDepDv2.style.height = divHeight +'px';
		}
	}else{
		divObj.style.visibility = 'hidden';
		divObj.style.display = 'none';
	}
	
}

function findPosX(obj){
	var curleft = 0;
	if (obj.offsetParent){
		while (obj.offsetParent){
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}else if (obj.x){
		curleft += obj.x;
	}
	return curleft;
}

function findPosY(obj){
	var curtop = 0;
	if (obj.offsetParent){
		while (obj.offsetParent){
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}else if (obj.x){
		curtop += obj.x;
	}
	return curtop;
}

function CommonNorOver(imgObj, typeVal, siteType, imgName){
	var ObjVal = document.getElementById(imgObj);
	if(typeVal == 1){ //over img
		ObjVal.src = _globalDocRoot + "webImages-"+ siteType +"/" + imgName; 
	}else{ //Nor img
		ObjVal.src = _globalDocRoot + "webImages-"+ siteType +"/" + imgName; 
	}
}
