
// ==============================================================================
function ShowTooltip(evt, header, tekst)
// ==============================================================================
{
	document.getElementById("infoheader").innerHTML=header; 				
	document.getElementById("infotext").innerHTML=tekst; 				

	//var x = parseInt(mouseX(evt)) + parseInt(document.body.scrollLeft) + 10;
	//var y = parseInt(mouseX(evt)) + parseInt(document.body.scrollTop) + 10;
	var x = parseInt(mouseX(evt)) + 1;
	var y = parseInt(mouseY(evt)) + 1;

    var infoPopupObj = document.getElementById("infoPopup");
	infoPopupObj.style.display = "block";
	
	infoPopupObj.style.left = parseInt(x) + 'px';
	infoPopupObj.style.top = parseInt(y) + 'px';
} 

// ==============================================================================
function HideTooltip()
// ==============================================================================
{
	document.getElementById("infoPopup").style.display="none";
}

// ==============================================================================
function mouseX(evt)
// ==============================================================================
{
    if (evt.pageX) 
        return evt.pageX;
    else if (evt.clientX)
        return evt.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
    else 
        return null;
}

// ==============================================================================
function mouseY(evt)
// ==============================================================================
{
    if (evt.pageY) 
        return evt.pageY;
    else if (evt.clientY)
        return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
    else 
        return null;
}

// ==============================================================================
function openPopup(url)
// ==============================================================================
{
    open(url, "Info", "resize=no, directories=no,toolbar=no,menubar=no,scrollbars=yes,location=no,height=650px,width=550px");
}

// ==============================================================================
function setMinHeight()
// ==============================================================================
{    
    document.getElementById("body").style.minHeight="400px";    
}

// ==============================================================================
function IsDirty(isDirty) 
// ==============================================================================
{
    if (isDirty!= null &&  isDirty.toLowerCase() == 'true')
    {
        return confirm("Alle niet opgeslagen ingevulde gegevens gaan verloren.\n \nWilt u toch doorgaan?");
    }
}
