/* JavaScript für Seiten */

// Schaltet einen klappbaren Bereich um
function toggleFold(id) {
    var eImg = document.getElementById('fi' + id);
    var eDiv = document.getElementById('fd' + id);
    if (eDiv.style.display == 'none') {
        eDiv.style.display = 'block';
        eImg.src = 'images/foldOpen.gif';
        eDiv.scrollIntoView();
    } else {
        eDiv.style.display = 'none';
        eImg.src = 'images/foldClose.gif';
    }
}


// aktuelle Mausposition
var isNav = (navigator.appName.indexOf("Netscape") != -1);
var mouseX;
var mouseY;

function handlerMouseMove(evt) {
	//0007585
	try {
		mouseX = (isNav) ? evt.pageX : event.clientX + document.body.scrollLeft;
		mouseY = (isNav) ? evt.pageY : event.clientY + document.body.scrollTop;
	}
	catch(err){
	}
}

if (isNav) {
    document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMouseMove;


// Anzeigen und verstecken von Fuß-/Endnoten
function showNote(id) {
    var eDiv = document.getElementById(id);
    eDiv.style.left = mouseX + 'px';
    eDiv.style.top = mouseY + 'px';
    eDiv.style.display = 'block';
}

function hideNote(id) {
    var eDiv = document.getElementById(id);
    eDiv.style.display = 'none';
}
