var aktMarkePopup = '';

function showMarkePopup(obj, popupIdSuffix) {
	try {
		if (aktMarkePopup != popupIdSuffix) {
			restoreDefaults();
			
			getEl('marke_popup_'+popupIdSuffix).style.left = (getMarkeXPos(obj)-31) + 'px';
			getEl('marke_popup_'+popupIdSuffix).style.top = (getMarkeYPos(obj)-9) + 'px';
			getEl('spalte_mitte').className = 'marke_disabled';
			getEl('marke_popup_'+popupIdSuffix).style.display = 'block';
			aktMarkePopup = popupIdSuffix;						
		}
	} catch(e) {}
}

function getMarkeXPos(obj) {
	try {
		leftGes = obj.offsetLeft;
		while (obj.offsetParent) {
			obj = obj.offsetParent;
			leftGes = leftGes + obj.offsetLeft;
		}
		return leftGes;
	} catch(e) {}
}

function getMarkeYPos(obj) {
	try {
		topGes = obj.offsetTop;
		while (obj.offsetParent) {
			obj = obj.offsetParent;
			topGes = topGes + obj.offsetTop;
		}
		return topGes;
	} catch(e) {}
}

function restoreDefaults() {
	try {
		getEl('spalte_mitte').className = 'marke_enabled';
		if (aktMarkePopup!='') {
			getEl('marke_popup_'+aktMarkePopup).style.display = 'none';
			aktMarkePopup = '';
		}
	} catch(e) {}
}



