function anchorIn(objThis) {
	try {
		objThis.style.backgroundColor="#A6A5A5";
	} catch (e) {}
}

function anchorOut(objThis,intMenu) {
	try {
		if ( gintHighlightedCell == intMenu )
			objThis.style.backgroundColor="#868585";
		else
			objThis.style.backgroundColor="#666";
	} catch (e) {}
}

function anchorInO(objThis, intApt) {
	var objDivRate;
	try {
		var objX = findPosX(objThis);
		var objY = findPosY(objThis);
		
		var scrollY = document.body.scrollTop;
		var scrollX = document.body.scrollLeft;
		
		var screenX = document.body.clientWidth;

		var newX
		var newY

		if ( scrollY > 75 )
			newY = objY + 25;			
		else
			newY = scrollY;
		
		newX = objX/3;
		if ( (screenX-newX) < 600 ) {
			newX = screenX-600;
			}
			
		objDivRate = document.getElementById("divRatesFlat" + intApt);
		objDivRate.style.display = "";
		objDivRate.style.top = newY;
		objDivRate.style.left = newX;

		
		var xx 
//		xx = "objX=" + objX + " objY=" + objY + "\n";
//		xx = xx  + "newX=" + newX + " newY=" + newY + "\n";
//		xx = xx  + "Scroll values for the BODY" + "\n";
//		xx = xx + "   scrollLeft = " + document.body.scrollLeft + "\n";
//		xx = xx + "   scrollTop = " + document.body.scrollTop + "\n";
//		xx = xx + "   scrollHeight = " + document.body.scrollHeight + "\n";
//		xx = xx + "   scrollWidth = " + document.body.scrollWidth + "\n";
//		xx = xx + " clientHeight for the BODY: " + document.body.clientHeight + "\n";
//		xx = xx + " clientWidth for the BODY:" + document.body.clientWidth + "\n";
//		xx = xx + " clientTop for the BODY:" + document.body.clientTop + "\n";
//		xx = xx + " clientLeft for the BODY:" + document.body.clientLeft + "\n";
//		alert( "" + xx );
	} catch (e) {}
}

function anchorOutO(intApt) {
	var objDivRate;
	try {
		objDivRate = document.getElementById("divRatesFlat" + intApt);
		objDivRate.style.display = "none";
	} catch (e) {}
}

function highlightedCell(intMenu) {
	try {
		var objThis;
		objThis = document.getElementById("menu" + intMenu);
		objThis.style.backgroundColor="#868585";
		return intMenu;
	} catch (e) {}
}

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.y)
		curtop += obj.y;
	return curtop;
}



function anchorInX(objThis, intApt) {
	var objDivRate;
	try {
		objDivRate = document.getElementById("divPicture" + intApt);
		//objDivRate.style.display = "";
		divPicture1a.innerHTML = objDivRate.innerHTML;
		//divPicture1a.style.display = "";
		//var newX = findPosX(objThis);
		//var newY = findPosY(objThis);
		//setTimeout("anchorOutX(" + intApt + ")", 2000);		
		//alert(newX + ' ' + newY );
		//alert( "" + objThis..offsetLeft );
		//divRates.innerText = "" + objThis.offsetLeft;
	} catch (e) {}
}

function anchorOutX(intApt) {
	var objDivRate;
	try {
		objDivRate = document.getElementById("divPicture" + intApt);
		objDivRate.style.display = "none";
	} catch (e) {}
}

//----------
