function wResize(Ereignis)
{
	
	if(!window.innerWidth){
		if(document.body && document.body.offsetWidth){
			if((document.body.offsetWidth % 2) != 0){
				window.resizeBy(1,0);
			}
		}
	}

}


	function printPage(URL){
		FENSTER = window.open(URL, "Druckansicht", "menubar=yes,status=no,resizable=yes,scrollbars=yes,width=600,height=600");
		return false;
	}

	function makeZoom(URL, WIDTH, HEIGHT){
	WIDTH = WIDTH + 20;
	HEIGHT = HEIGHT + 20;
	if(screen.width <= WIDTH){
		WIDTH = screen.width - 100;
	}

	if(screen.height <= HEIGHT){
		HEIGHT = screen.height - 100;
	}
		
		FENSTER = window.open(URL, "Bildzoom", "menubar=no,status=no,resizable=yes,scrollbars=yes,width="+ WIDTH +",height=" + HEIGHT);
	}
	
	
	
	//JS-Funktionen der Website
var MausLeft = "";
var MausTop = "";
var showOBJ = "";

function Bewegung (Ereignis) {
  if (!Ereignis)
    Ereignis = window.event;
	if (browser.ie){
        MausLeft=Ereignis.x+document.body.scrollLeft; 
        MausTop=Ereignis.y+document.body.scrollTop;	
	}else{
    	MausLeft = Ereignis.pageX;
    	MausTop = Ereignis.pageY;	
	}
	MausLeft = MausLeft + 10;
	MausTop = MausTop + 20;

	if(showOBJ && showOBJ.style) {
		showOBJ.style.top = MausTop;
		showOBJ.style.left = MausLeft;
	}

  
}

document.onmousemove = Bewegung;


function showGlossar (id){
	var obj = document.getElementById("GL"+id);
	if(obj && obj.style) {
		obj.style.display = "block";
		obj.style.top = MausTop+"px";
		obj.style.left = MausLeft+"px";
		showOBJ = obj;
	}

}

function hideGlossar (id) {
	var obj = document.getElementById("GL"+id);
	if(obj && obj.style) {
		obj.style.display = "none";
	}	
	showObj = "";

}

var toolsCurrent = "";

function showTools(id){
		
    if (toolsCurrent != "" && toolsCurrent && toolsCurrent.style) {
        toolsCurrent.style.display = 'none';
    }
    
    myObj = document.getElementById(id);
    if(myObj && myObj.style) {

		MausTop = MausTop - 35;

		obj.style.top = MausTop+"px";
		obj.style.left = MausLeft+"px"; 
        myObj.style.display="block";
    }

    toolsCurrent = myObj;
}

function switchDivStyle(id){
	obj = document.getElementById(id);
    if(obj && obj.style && obj.style.display == "block") {
    	displayed = true;
    	link = hideTools(id);
    }else{
    	link = showTools(id)
		diplayed = false;
    }	return link;
}

function hideTools(id){
    obj = document.getElementById(id);
    if(obj && obj.style) {
	    obj.style.display="none";
    }
    toolsCurrent = '';
    
}



function showRefTitle (id){
	var obj = document.getElementById("ref"+id);
	if(obj && obj.style) {
		obj.style.display = "block";
		//alert("X:"+obj.style.left+" Y:"+obj.style.top);
		obj.style.top = MausTop+"px";
		obj.style.left = MausLeft+"px";
		showOBJ = obj;
	}
}

function hideRefTitle(id) {
	var obj = document.getElementById("ref"+id);
	if(obj && obj.style) {
		obj.style.display = "none";
	}	
	showObj = "";

}
