
/** mijn kifid **/
function toggle2d(value)
{
    if (value)
        $("tweedeGegevens").style.display = (document.all) ? "block" : "table-row-group";
    else
        $("tweedeGegevens").style.display = "none";
}

function toggleMachtiging(value)
{
    if (value)
        $("machtigins_opties").style.display = (document.all) ? "block" :"table";
    else
        $("machtigins_opties").style.display = "none";
}


// Tooltip Uitspraken
var mdivPopup = '';

function showVraagPopup(anchorElement, p_strText, p_strGotoUrl) {
	try {
	    hidePopup();
		PopupHTML = '<div style="background-color: window; color: windowtext;">' + p_strText + '</div>';
		showPopup(anchorElement, PopupHTML);
	}
	catch (x) {}
}

function showPopup(anchorElement, innerHTML) {
	try {
		// Remove any existing popups
		if (mdivPopup != null)
			forceHidePopup();
			
		// Create the popup 
		mdivPopup = document.createElement('div');
		mdivPopup.style.position = 'absolute';
		mdivPopup.style.zIndex = 999999;
		mdivPopup.style.padding = '3px';
		mdivPopup.style.backgroundColor = '#EEEBE6';
		mdivPopup.style.color = 'infotext';
		mdivPopup.style.borderStyle = 'solid';
		mdivPopup.style.borderWidth = '1px';
		mdivPopup.style.borderColor = 'windowframe';
		mdivPopup.style.fontSize = '8pt';
		mdivPopup.style.width = '250px';
		//mdivPopup.onmouseout = hidePopup;
		
		// Insert the content of the popup
		mdivPopup.innerHTML = "<img border='0' alt='Sluiten' title='Sluiten' src='/img/ClosePopup.gif' "
			+ " style='cursor: hand; position: absolute; top: 0px; right: 0px;' onclick='forceHidePopup();'>"
			+ innerHTML;
				
		// Position the popup
		mdivPopup.style.top = (getAbsoluteTop(anchorElement) +  16) + 'px';				
		mdivPopup.style.left = (getAbsoluteLeft(anchorElement) + 20) + 'px';
		
		// Show the popup
		document.body.appendChild(mdivPopup);

	}
	catch (x) {} 
}

function hidePopup() {
	try {
		if (mdivPopup != null) {
			forceHidePopup();
		}
	}
	catch (x) {}
}

function forceHidePopup() {
	try {
		if (mdivPopup != null) {
			document.body.removeChild(mdivPopup);
			mdivPopup = null;
		}
	}
	catch (x) {}
}

function getAbsoluteLeft(element) {
	try {
		var intLeft = 0;
		var objParent = element;
		
		do {
			intLeft += objParent.offsetLeft;
			objParent = objParent.offsetParent;
		}
		while (objParent != null);
		
		return intLeft; 
	}
	catch (x) {}
}

function getAbsoluteTop(element) {
	try {
		var intTop = 0;
		var objParent = element;

		do {
			intTop += objParent.offsetTop;
			objParent = objParent.offsetParent;
		}
		while (objParent != null);
		
		return intTop; 
	}
	catch (x) {}
}

function getAbsoluteBottom(element) {
	try {
		var intBottom = 0;
		var objParent = element;

		do {
			intBottom += objParent.offsetBottom;
			objParent = objParent.offsetParent;
		}
		while (objParent != null);
		
		return intBottom; 
	}
	catch (x) {}
}


