var dom = document.getElementById ? true:false;
var ie4 = document.all ? true:false;

function getAbsoluteLeft(objectId) {
	o = document.getElementById(objectId)
	oLeft = o.offsetLeft            // Get left position from the parent object
	while(o.offsetParent!=null) {   // Parse the parent hierarchy up to the document element
		oParent = o.offsetParent    // Get parent object reference
		oLeft += oParent.offsetLeft // Add parent left position
		o = oParent
	}
	// Return left postion
	return oLeft
}

function getAbsoluteTop(objectId) {
	o = document.getElementById(objectId)
	oTop = o.offsetTop            // Get top position from the parent object
	while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element
		oParent = o.offsetParent  // Get parent object reference
		oTop += oParent.offsetTop // Add parent top position
		o = oParent
	}
	// Return top position
	return oTop
}

////////////////////////////////////////////////////////////////////////////////////// Not general
var d;
var dObj;
function showLayer(id,txtStr){
	
	dTop = getAbsoluteTop(id.id);
	
	dLeft = getAbsoluteLeft(id.id);
	
	if(dom){
		dObj = document.getElementById("infoLayer");
		d = document.getElementById("infoLayer").style;
		info = document.getElementById("infoStr");
		body = document.getElementById("body");
		if (document.all) body = document.body.clientWidth	
		else body = window.innerHeight;
	} else {
		dObj = document.all.infoLayer;
		d = document.all.infoLayer.style;
		info = document.all.infoStr;
	}
		info.innerHTML = txtStr;
	// HEIGHT FIX:
	
	if (document.all) {
  		topFix = 4;
	}
	else if (document.getElementById) {
  		topFix = 8
	}
	//alert(body + "#" + dObj.offsetWidth + "#" + dLeft)
	if((body-dObj.offsetWidth) < dLeft){
		
		dLeft = dLeft - dObj.offsetWidth + 8;
		dObj.innerHTML = '<table cellspacing="0" cellpadding="0" border="0"><tr><td height="1" width="1" align="right" valign="bottom"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1" width="1"></td><td height="1" class="buttonTds"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1"></td><td height="1" width="1" align="left" valign="bottom"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1" width="1"></td></tr><tr><td height="15" class="buttonTds" align="right" valign="bottom"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="8" width="1"></td><td height="15" class="buttonTdsPad" align="left"><SPAN class="txt10Awhite" id="infoStr">'+txtStr+'</SPAN></td><td height="15" class="buttonTds" align="left" valign="bottom"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="8" width="1"></td></tr><tr><td height="1" width="1" align="right" valign="bottom"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1" width="1"></td><td height="1" class="buttonTds"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1"></td><td height="1" width="1" align="left" valign="bottom" class="buttonTds"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1" width="1"></td></tr><tr><td colspan="3" align="right" valign="top"><img alt="pixel" src="layout/relaunch2008/images/flip.gif" height="5" width="7"></td></tr></table>';
	} else {
		dObj.innerHTML = '<table cellspacing="0" cellpadding="0" border="0"><tr><td height="1" width="1" align="right" valign="bottom"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1" width="1"></td><td height="1" class="buttonTds"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1"></td><td height="1" width="1" align="left" valign="bottom"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1" width="1"></td></tr><tr><td height="15" class="buttonTds" align="right" valign="bottom"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="8" width="1"></td><td height="15" class="buttonTdsPad" align="left"><SPAN class="txt10Awhite" id="infoStr">'+txtStr+'</SPAN></td><td height="15" class="buttonTds" align="left" valign="bottom"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="8" width="1"></td></tr><tr><td class="buttonTds" height="1" width="1" align="right" valign="bottom"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1" width="1"></td><td height="1" class="buttonTds"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1"></td><td height="1" width="1" align="left" valign="bottom"><img alt="pixel" src="layout/relaunch2008/images/pixel.gif" height="1" width="1"></td></tr><tr><td colspan="3" align="left" valign="top"><img alt="pixel" src="layout/relaunch2008/images/flip.gif" height="5" width="7"></td></tr></table>';
	}

	
	d.left = dLeft + (id.offsetWidth / 2) - 4;
	d.top =  dTop - dObj.offsetHeight - topFix;

	
	d.visibility = "visible";
}
