function setbackcolor(el){
	el.style.background = "#cccc99";
	var ival = el.id;
	var o = document.getElementById("sub" + ival);
	if (o != null) {
		var Loc = getLocation(el);
		o.style.left = Loc.x + "px";
		o.style.top = Loc.y + 20 + "px";
		o.style.zIndex = 0;
		showsubmenu(o);
	}
}
function resetbackcolor(el){
	el.style.background = "#ffffff";
	var ival = el.id;
	var o = document.getElementById("sub" + ival);
	if (o != null) {
		hidesubmenu(o);
	}
}
function setrowcolor(el){
	el.style.background = "#cccc99";
}
function resetrowcolor(el){
	el.style.background = "#ffffff";
}
function showsubmenu(el){
	el.style.visibility = "visible";
}
function hidesubmenu(el){
	el.style.visibility = "hidden";
}
function getLocation(el) {
	var elLoc = {x:0,y:0};
	//the offsetLeft & offsetTop return the left and top position
	//of the element relative to the parent container.  
	while(el) {
		elLoc.x += el.offsetLeft;
		elLoc.y += el.offsetTop;
		el = el.offsetParent;
	}
	return elLoc;	
}

