if(navigator.userAgent.indexOf('MSIE') != -1) {
	var oPopup = window.createPopup();
}

function fInfo(a_InfoTextHTML, a_event)
{
	// Get cursor position with respect to the page.
	var x;
	var y;

	if(navigator.userAgent.indexOf('MSIE') == -1)
	{
		x = a_event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft + 3;
		y = a_event.clientY + document.documentElement.scrollTop + document.body.scrollTop;

		// Popup voor Firefox en Co.
		document.getElementById("info").innerHTML= "<table class='info'><tr><td>" + a_InfoTextHTML + "</td></tr></table>";
		document.getElementById("info").style.display = "";
		document.getElementById("info").style.position="absolute";
		document.getElementById("info").style.left= eval(x) + 'px'; 
		document.getElementById("info").style.top= eval(y) + 'px';
		document.getElementById("info").style.zIndex="2000";	
		document.getElementById("info").style.width="220px";
		document.getElementById("info").style.border= "1px solid #000";
	}
	else
	{
		x = a_event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft + 3;
		y = a_event.clientY;

		// Popup voor IE alleen
		oPopup = window.createPopup();
		var oPopBody = oPopup.document.body;
		var popHeight;

		// Vul de popup met de stylesheet waardes
		for (intTeller=0;intTeller<document.styleSheets.length;intTeller++) 
		{
    			if (document.styleSheets(intTeller).owningElement.tagName == "STYLE" )
    			{
        			for ( j = 0; j < document.styleSheets(intTeller).imports.length; j++ )
					oPopup.document.createStyleSheet(document.styleSheets(intTeller).imports(j).href);
    			}
		}
		
		// Vul de popup met de tekst
		oPopBody.innerHTML= "<table id='info' class='info'><tr><td>" + a_InfoTextHTML + "</td></tr></table>";  
		oPopBody.style.border = "1px solid #000";

    		// Laat de popup even zien om de hoogte te bepalen
		oPopup.show(0, 0, 220, 0);
		popHeight = oPopBody.scrollHeight;
		oPopup.hide();

		// Laat de definieve popup zien
		oPopup.show(x, y, 220, popHeight, document.body);
	}
}

function fHideInfo()
{
	// Controleer of de layer moet worden weggehaald
	if (document.getElementById("info").style.display == "")
	{
		document.getElementById("info").style.display = "none";
	}

	// Haal de popup venster weg
	if(navigator.userAgent.indexOf('MSIE') != -1)
	{
		oPopup.hide();
	}
}

function fInfoSpan(a_Span,a_Xdev,a_Ydev,a_Height,a_Width)
{
	var x;
	var y;
	
	x = a_Xdev;
	y = a_Ydev;

	a_Span.style.display="";
	a_Span.style.position="absolute";
	a_Span.style.left= eval(x) + 'px'; 
	a_Span.style.top= eval(y) + 'px';
	a_Span.style.height= eval(a_Height) + 'px';
	a_Span.style.width= eval(a_Width) + 'px';
}

function fHideInfoSpan(a_Span)
{
	a_Span.style.display = "none";
}


function fInfoButton(a_InfoTextHTML, a_Width, a_event)
{
	// Get cursor position with respect to the page.
	var x;
	var y;

    x = a_event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft + 3;
    y = a_event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
	
	document.getElementById("info").innerHTML= "<table class='info' id='tblInfo'><tr valign=top><td><div onmouseout='fHideInfo();'>" + a_InfoTextHTML + "</div></td></tr></table>";
	document.getElementById("info").style.display = ""
	document.getElementById("info").style.position="absolute"
	// kan ik m van de button afhouden???
	document.getElementById("info").style.left= eval(x - 100) + 'px'; 
	document.getElementById("info").style.top= eval(y - 25) + 'px';
	document.getElementById("info").style.zIndex="2000";	
	document.getElementById("info").style.width= eval(a_Width) + 'px';
	document.getElementById("info").style.border= "1px solid #000";
	document.getElementById("tblInfo").style.width= eval(a_Width) + 'px';
}

function fInfoPopup(a_InfoTextHTML, a_event)
{
	// Get cursor position with respect to the page.
	var x;
	var y;
    	x = a_event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft + 15;
    	y = a_event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
	document.getElementById("info").innerHTML= "<table class='info'><tr><td>" + a_InfoTextHTML + "</td></tr></table>";
	document.getElementById("info").style.display = ""
	document.getElementById("info").style.position="absolute"
	document.getElementById("info").style.left= eval(x) + 'px'; 
	document.getElementById("info").style.top= eval(y) + 'px';
	document.getElementById("info").style.zIndex="2000";	
	document.getElementById("info").style.width="220px";
	document.getElementById("info").style.border= "1px solid #000";
}

function fInfoPopupIframe(a_InfoTextHTML, a_event)
{
	// Get cursor position with respect to the page.
	var x;
	var y;
    	x = a_event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft + 15;
    	y = a_event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
	document.getElementById("info").innerHTML= "<table class='info'><tr><td>" + a_InfoTextHTML + "</td></tr></table>";
	document.getElementById("info").style.display = ""
	document.getElementById("info").style.position="absolute"
	document.getElementById("info").style.left= eval(x) + 'px'; 
	document.getElementById("info").style.top= eval(y) + 'px';
	document.getElementById("info").style.zIndex="2000";	
	document.getElementById("info").style.width="50%";
}

function fHideInfoPopup()
{
	document.getElementById("info").style.display = "none";
}

function fShowPopupWindow(a_strLayer, a_strCloseButton_caption, a_strActionButton_caption, a_strActionButton_action)
{
	var objWindow;

	objWindow = window.open('/forms/frmPopup.asp?Layer=' + a_strLayer + '&CloseButton=' + a_strCloseButton_caption + '&ActionButton=' + a_strActionButton_caption + '&ActionButtonAction=' + a_strActionButton_action, 'Popup','toolbars=0,scrollbars=0,status=0,menubars=0,resizable=0,titlebar=0,left=10,top=10,dependent,dialog');
}

