function showmenu(menu)
{
	if (document.getElementById)
	{
		parent.frames.main.document.getElementById(menu).style.display='block';
	}
	else if (document.all && !document.getElementById)
	{
		parent.frames.main.document[menu].style.visibility='visible';
	}
}


 function DivShow(articles_id) {

	var obj;
	
	var FensterBreite;
	var DivBreite;


//	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
//	y = (document.all) ? window.event.y + document.body.scrollTop : e.pageY;


	if (window.innerWidth) //if browser supports window.innerWidth
	{		
		FensterBreite = window.innerWidth + document.body.scrollLeft;
		FensterHoehe = window.innerHeight + document.body.scrollTop;
	}	
	else if (document.all) //else if browser supports document.all (IE 4+)
	{		
		FensterBreite = document.body.clientWidth + document.body.scrollLeft;
		FensterHoehe = document.body.clientHeight + document.body.scrollTop;
	}	

	DivBreite = document.getElementById('picture_overlay_div').offsetWidth;
	DivHoehe = document.getElementById('picture_overlay_div').offsetHeight;
		
	x=0;
	y=0;

	obj = document.getElementById("picture_overlay_div");
 	picture_overlay_image.src = articles_id;
 	document.getElementById("picture_overlay_image").src = articles_id;

	if (document.all) 
	{
		xMousePos = window.event.x + document.body.scrollLeft
		yMousePos = window.event.y + document.body.scrollTop
	}
	
	if ( (FensterBreite - xMousePos) > DivBreite + 30  )
		obj.style.left = xMousePos + 10; 
	else
		obj.style.left = xMousePos - (DivBreite + 10); 


	if ( (FensterHoehe - yMousePos) > DivHoehe + 10  )
		obj.style.top = yMousePos + 10; 
	else
		obj.style.top = yMousePos - (DivHoehe + 10); 

	// ####### alert("FensterHoehe - yMousePos:" + (FensterHoehe - yMousePos) + " # yMousePos:" + yMousePos + " # DivHoehe:" + DivHoehe);
	//document.body.scrollTop;
	
	//obj.style.top = yMousePos + 10; 
	
	// document.getElementById('picture_overlay_div').offsetWidth // DIV BREITE
	
	obj.style.visibility = "visible";
	
 	}

 function DivHide() 
 	{
		var obj;
		obj = document.getElementById("picture_overlay_div");
		obj.style.visibility = "hidden";
 	}





/* ------ AB HIER ERMITTELT DER SCRIPT DEN MOUSEPOSITION BEI ALLEN BROWSERN --------------- */

	/* xMousePos + 20 */
	/* yMousePos + 20 */

begin();
function begin(){	
	//attachInfoElement();
	//installTagListeners();
	oldOnmousemove= document.onmousemove;
	if (document.all) { // Internet Explorer
	    yFromMouse=17;
	    xFromMouse=2;
	    //document.onmousemove = captureMousePosition;	
	} else if (document.getElementById) { // Netcsape 6 + Mozilla
	    yFromMouse=21;
	    xFromMouse=2;
	    document.onmousemove = captureMousePosition;		
	}
}
function captureMousePosition(e) {
    if ( document.documentElement&& window.event&& document.documentElement.clientWidth>0 ){
	// IE6 (sometimes)
	xMousePos = window.event.x+ document.documentElement.scrollLeft; 
        yMousePos = window.event.y+document.documentElement.scrollTop;
        xMousePosMax = document.documentElement.clientWidth+document.documentElement.scrollLeft;
        yMousePosMax = document.documentElement.clientHeight+document.documentElement.scrollTop-12;        	
   } else if (document.all) {
        // When the page scrolls in IE, the event's mouse position
        // reflects the position from the top/left of the screen the
        // user is looking at. scrollLeft/Top is the amount the user
        // has scrolled into the page. clientWidth/Height is the height/
        // width of the current page the user is looking at. So, to be
        // consistent with Netscape (above), add the scroll offsets to
        // both so we end up with an absolute value on the page, no
        // matter if the user has scrolled or not.        
	xMousePos = window.event.x+document.body.scrollLeft;
        yMousePos = window.event.y+document.body.scrollTop;
        xMousePosMax = document.body.clientWidth+document.body.scrollLeft;
        yMousePosMax = document.body.clientHeight+document.body.scrollTop;
    } else if (document.getElementById) {
        // Netscape 6 behaves the same as Netscape 4 in this regard
        xMousePos = e.pageX;
        yMousePos = e.pageY;
        xMousePosMax = window.innerWidth+window.pageXOffset;
        yMousePosMax = window.innerHeight+window.pageYOffset;
    }
	//moveElements();	
	//if( oldOnmousemove!=null ){		
	//	oldOnmousemove(e);
	//}
}

