// --- (c) 2007, script code by www.doran.be

function obj(el) {
	if (typeof el == 'string') { el = document.getElementById(el); }
	return el;
	}

function obj_showhide(objid) {
	if (document.getElementById(objid)) {
		if (document.getElementById(objid).style.display == 'none') {
			document.getElementById(objid).style.display = 'block';
		} else {
			document.getElementById(objid).style.display = 'none';
			}
		}
	}

function getAbsPos(theCurrObj) {
	posLeft = 0;
	posTop = 0;
	if (theCurrObj) {
		if (document.getElementById) {
			posLeft = theCurrObj.offsetLeft;
			posTop = theCurrObj.offsetTop;
			var theObjParent = theCurrObj.offsetParent;  
			while (theObjParent != null) {
				posLeft += theObjParent.offsetLeft;
				posTop += theObjParent.offsetTop;
				theObjParent = theObjParent.offsetParent;
				}
		} else if (document.all) {
			posLeft = theCurrObj.style.pixelLeft;
			posTop = theCurrObj.style.pixelTop;
			var theObjParent = theCurrObj.parentElement;  
			while (theObjParent != null) {
				posLeft += theObjParent.style.pixelLeft;
				posTop += theObjParent.style.pixelTop;
				theObjParent = theObjParent.parentElement;
				}
			}
		}
	return new Array(posLeft,posTop);
	}