//layer sichtbar / unsichtbar mit maus-positions-abfrage
var show_timeout = 1;
var show_timeoutTime = 500; 


var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE)
	document.onmousemove = getMouseXY;
var tempX = 0;
var tempY = 0;
function getMouseXY(e) {
	if (IE) { // grab the x-y pos.s if browser is IE
	//alert(tempX);
	//hier auskommentiert und runtergesetzt
	//tempX = event.clientX + document.body.scrollLeft;
	//tempY = event.clientY + document.body.scrollTop;
	} else {  // grab the x-y pos.s if browser is NS
		tempX = e.pageX;
		tempY = e.pageY;
	}  
	
		return true;
	}
	
//sicherheitstext layer
/* xbrowser */
var ns4 = 0;
var ie4 = 0;
var w3c = 0;
var ie = 0;
var dhtml	= 0;

if (document.getElementById){
	w3c = 1;
	layerRef="document.getElementById";
	dhtml = 1;
} 
else if (document.layers) {
    ns4 = 1;
    layerRef="document.layers.";
    dhtml = 1;
}
else if (document.all) {
    ie4 = 1;
	layerRef="document.all.";	
    dhtml = 1;
}

function showTxt(whichDiv) {
		if (IE) { 
			// grab the x-y pos.s if browser is IE
			//alert(tempX);
			tempX = event.clientX + document.body.scrollLeft;
			tempY = event.clientY + document.body.scrollTop;
			}
			//alert(whichDiv);
			show_timeout = setTimeout('showDiv("' + whichDiv + '")', show_timeoutTime);
		
	}


	
function showDiv (whichDiv) {
	if (w3c && document.getElementById(whichDiv) && document.getElementById(whichDiv).style)  {
			//neue abfrage wg. zentrierung per div auf seite
			tempWidth = document.body.offsetWidth;
			if(tempWidth > 1024) {
				tempXAbstand = (tempWidth - 994) / 2;
				} else {
					tempXAbstand = 0;
					}
			getHeight = document.getElementById(whichDiv).offsetHeight;
			document.getElementById(whichDiv).style.top = tempY-getHeight-30 + "px";
			xPos =  tempX - 20 - tempXAbstand;
			document.getElementById(whichDiv).style.left = xPos + "px";
			document.getElementById(whichDiv).style.visibility = "visible";
		} else if (ie4 && document.all[whichDiv] && document.all[whichDiv].style) {
			getHeight = document.all[whichDiv].offsetHeight;
			document.all[whichDiv].style.top = tempY-getHeight-10 + "px";
			document.all[whichDiv].style.left = tempX + "px";
			document.all[whichDiv].style.visibility = "visible";
		} 

	}

function hideTxt(whichDiv) {

		 if (show_timeout != -1) { 
		 	clearTimeout(show_timeout); 
			}
			
		if (IE) { 
			// grab the x-y pos.s if browser is IE
			//alert(tempX);
			tempX = 0;
			tempY = 0;
			}
			
		 if (w3c && document.getElementById(whichDiv) && document.getElementById(whichDiv).style) {
			document.getElementById(whichDiv).style.visibility = "hidden";
		} else if (ie4 && document.all[whichDiv] && document.all[whichDiv].style) {
			document.all[whichDiv].style.visibility = "hidden";
		}
	}
