function displayToolTip(anchor) {

	// Find the tooltip associated with the menu anchor.
	var tooltip = document.getElementById(anchor.parentNode.id + 'ToolTip');

	// Calculate the anchor position of the menu item
	var anchorPos = new anchorPosition(anchor);

	// Determine it's left and top positions.
	if (anchor.parentNode.id.indexOf("side") > -1) {
		tooltip.style.left = (anchorPos.left + 100) + "px";
		tooltip.style.top = ((anchorPos.top > 10)? anchorPos.top - 10 : anchorPos.top) + "px";
	}
	else {
		tooltip.style.left = (anchorPos.left + 10) + "px";
		tooltip.style.top = ((anchorPos.top > 27)? anchorPos.top - 27 : anchorPos.top) + "px";
	}
	
	// Show or hide the tool tip.
	tooltip.style.display = (tooltip.style.display == "none" || tooltip.style.display == "")? "block" : "none";
	
	if (tooltip.style.display == "block") {
		if ((tooltip.offsetLeft + tooltip.offsetWidth) > document.body.offsetWidth) {
			tooltip.style.left = (780 - (tooltip.offsetWidth + 10)) + "px";	
		}
	}	
}

function anchorPosition(anchor) {
	this.left = 0;
	this.top = 0;

	if (anchor.offsetParent) {
		this.left = anchor.offsetLeft;
		this.top = anchor.offsetTop;
		
		while (anchor = anchor.offsetParent) {
			this.left += anchor.offsetLeft;
			this.top += anchor.offsetTop;
		}
	}
}