var lastFoot;
var footFlag = false;

function showFoot( footId, e ) {
	if (footFlag == true)
		hideFoot( lastFoot );

	lastFoot = footId;
	footFlag = true;

	var winWidth = document.width ? document.width : document.body && document.body.scrollWidth ? document.body.scrollWidth : null;
	var winHeight = document.height ? document.height : document.body && document.body.offsetHeight ? document.body.offsetHeight : null;

    if (e != '') {
        if (document.layers) {
            x = e.pageX;
            y = e.pageY;
        }
        else if (document.all) {
            x = e.clientX + document.body.scrollLeft;
            y = e.clientY + document.body.scrollTop;
        }
        else if (document.getElementById) {
            x = e.pageX;
            y = e.pageY;
        }
    }

	if (x > (winWidth / 2))
		x -= 300;
	
	if (y > (winHeight / 2))
		y -= 50;
	x = x+20;
	y = y+20;
    if (document.layers && document.layers[footId] != null) {
        document.layers[footId].left = x;
        document.layers[footId].top = y;
    }
    else if (document.all) {
        document.all[footId].style.posLeft = x;
        document.all[footId].style.posTop = y+40;
    }
	else {
        document.getElementById(footId).style.left = x+"px";
        document.getElementById(footId).style.top = y+"px";
	}

    if (document.layers && document.layers[footId] != null)
        document.layers[footId].visibility = 'visible';
    else if (document.all)
        document.all[footId].style.visibility = 'visible';
	else
		document.getElementById(footId).style.visibility = 'visible';

}

function hideFoot( footId ) {
    if (document.layers && document.layers[footId] != null)
        document.layers[footId].visibility = 'hidden';
    else if (document.all)
        document.all[footId].style.visibility = 'hidden';
	else
		document.getElementById(footId).style.visibility = 'hidden';

	footFlag = false;
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------


