	/********************************************************************************
	The implementation of this script was made by www.coffeecode.ch
	********************************************************************************/
	// spez NS4
	MM_reloadPage(true);
	// browsertyp
	var bw;
	// Layeranzahl
	var anzLayer;
	// Layerversatz bei Browserwindow > 1024x768
	var layerVersatz;
	
	// initialisierungsfunktion Parameterübergabe mit ('01&02&05') etz
	function initialisieren(vParamString){
	// browserweiche: analysiert den Browser und gibt dessen Typ zurück
	bw = new checkBrowser();
	if(vParamString!='')
		{
			// weitere initialisierungsfunktionen mit parametern (initx = function('param'))
			var init01 = "eventLoader()";
			// ausführen der initialisierungsfunktionen
			var aParameter = vParamString.split("&");
			for(i=0; i<aParameter.length; i++)
			{
			ausfuehren =eval("init"+aParameter[i]);
			eval(ausfuehren);
			}
		}
	}
		
	// Logo laden für Logowechsel
	logo_off = new Image();
	logo_off.src="/img/design/logo_off.gif";
	logo_on = new Image();
	logo_on.src="/img/design/logo_on.gif";
	
	/* Wichtig: gehört zu einmitten.js das am Schluss einer webseite eingebaut wird!
 	* wird benötigt um absolut definierte Layer bei grossen Browserfenstern einzumitten */
	
	function verschieben(versatz){
		if (anzLayer==16){
			var mitteLayName = new Array ("seiteninhalt","logoBild","up","down","drag","ruler","contentClip");
			var mitteLayPos = new Array (0,111,722,722,721,721,250);
			for( i=0; i<=6; i++){
				FWCenterLayer(mitteLayName[i],mitteLayPos[i],versatz);
			}
		}
		else if (anzLayer==17){
			var mitteLayName = new Array ("seiteninhalt","logoBild","up","down","drag","ruler","contentClip");
			var mitteLayPos = new Array (0,111,881,881,880,881,490);
			for( i=0; i<=6; i++){
				FWCenterLayer(mitteLayName[i],mitteLayPos[i],versatz);
			}
		}
		else if (anzLayer==19){
			var mitteLayName = new Array ("seiteninhalt","logoBild","up","down","drag","ruler","contentClip");
			var mitteLayPos = new Array (0,111,881,881,880,881,615);
			for( i=0; i<=6; i++){
				FWCenterLayer(mitteLayName[i],mitteLayPos[i],versatz);
			}
		}
	}
	// Layer einmitten
	function FWCenterLayer(lay, startPos, versatz)
	{
		layerVersatz = versatz;
		if (lay != "") 
		{
			var obj = FWFindLayer(lay); 
			obj.left = (startPos + versatz);
			obj.visibility = 'visible';
		}
	}
	
	function FWFindLayer(lay)
	{
		if (lay)
		{
			if (document.layers) 
				return document[lay];
			else if (document.getElementById)
				return document.getElementById(lay).style;
			else if (document.all) 
				return document.all[lay].style;
		}
		return null;
	}
	
	// Browser detection
	var dom = document.getElementById ? true:false;
	var nn4 = document.layers ? true:false;
	var ie4 = document.all ? true:false;
	
	var mouseY; // Mouse Y position onclick
	var mouseX; // Mouse X position onclick
	
	var clickUp = false; // If click on up-arrow
	var clickDown = false; // If click on down-arrow
	var clickDrag = false; // If click on scrollbar
	var clickAbove = false; // If click above scrollbar
	var clickBelow = false; // If click below scrollbar
	
	var timer = setTimeout("",500); // Repeat variable
	var upL; // Up-arrow X
	var upT; // Up-arrow Y
	var downL; // Down-arrow X
	var downT; // Down-arrow Y
	var dragL; // Scrollbar X
	var dragT; // Scrollbar Y
	var rulerL; // Ruler X
	var rulerT; // Ruler Y
	var contentT; // Content layer Y;
	var contentH; // Content height
	var contentClipH; // Content clip height
	var scrollLength; // Number of pixels scrollbar should move
	var startY; // Keeps track of offset between mouse and span
	
	// DesignVariablen
	var upH = 12; // Height of up-arrow
	var upW = 12; // Width of up-arrow
	var downH = 12; // Height of down-arrow
	var downW = 12; // Width of down-arrow
	var dragH = 28; // Height of scrollbar
	var dragW = 14; // Width of scrollbar
	var scrollH = 341; // Height of scrollbar
	var speed = 4; // Scroll speed

	/********************************************************************************
	Copyright (C) 1999 Thomas Brattli
	This script is made by and copyrighted to Thomas Brattli at www.bratta.com
	Visit for more great scripts. This may be used freely as long as this msg is intact!
	I will also appriciate any links you could give me.
	********************************************************************************/
	function checkBrowser()
	{
		this.ver=navigator.appVersion;
		this.dom=document.getElementById?1:0;
		this.ie4=(document.all && !this.dom)?1:0;
		this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
		this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
		this.ns4=(document.layers && !this.dom)?1:0;
		this.ns5=(this.dom && parseInt(this.ver) >= 5)?1:0;
		this.ns6=(document.getElementById && !document.all)?1:0;
		this.ns7=(navigator.userAgent.search("Netscape/7.1")!= -1)?1:0;
		this.opera=(document.all&& !document.styleSheets)?1:0;
		this.bw=(this.ie4 || this.ie5 || this.ie6 ||this.ns4 || this.ns5 || this.ns6 || this.ns7 || this.opera)
		return this
	}
  
	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
		if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
   		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
 		else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	
	// Onmouseover Logo Bildwechsel
	function logochange(div,bild)
	{
	if(bw.ns4){window.document.eval(div).document.images[bild].src=eval(bild+'_on').src;}
	else{window.document.images[bild].src=eval(bild+'_on').src;}
	}
	
	function zurueck(div,bild)
	{
	if(bw.ns4){window.document.eval(div).document.images[bild].src=eval(bild+'_off').src;}
	else{window.document.images[bild].src=eval(bild+'_off').src;}
	}
	
	// Rahmen
	function rahmenSetzen(vLayerName)
	{
	vStyle = bw.ie4||bw.ie5?document.all[vLayerName].style:bw.ns4?eval('document.'+vLayerName):bw.ns5||bw.ns6||bw.ie6||bw.ns7?document.getElementById(vLayerName).style:0;
	locater = window.document.URL.indexOf(".");
	seite = window.document.URL.substr((locater-2),2);
		if(seite - (Math.floor(seite/5)*5) == 0)
		{vStyle.top = (33+(Math.floor(seite/5)-1)*73);
		vStyle.left = (251+ 4*73);}
		else{vStyle.top = (33+(Math.floor(seite/5))*73);
		vStyle.left = (251+ ((seite - (Math.floor(seite/5)*5))-1)*73);}
	}
	
	/*******************************************************************************
	follwwing script made by geeeet@ghtml.com
	Keep these two lines and you're free to use this code
	********************************************************************************/
	
	// Known bugs :
	// If ie4.5 mac, please press apple-t to remove sidebar, otherwise everything is pushed 20px to the right...
	
	// Mousedown
	function down(e){
		if((document.layers && e.which!=1) || (document.all && event.button!=1)) return true; // Enables the right mousebutton
		getMouse(e);
		startY = (mouseY - dragT);
		
		// If click on up-arrow
		if(mouseX >= upL && (mouseX <= (upL + upW)) && mouseY >= upT && (mouseY <= (upT + upH))){
			clickUp = true;
			return scrollUp();
		}	
		// Else if click on down-arrow
		else if(mouseX >= downL && (mouseX <= (downL + downW)) && mouseY >= downT && (mouseY <= (downT + downH))){
			clickDown = true;
			return scrollDown();
		}
		// Else if click on scrollbar
		else if(mouseX >= dragL && (mouseX <= (dragL + dragW)) && mouseY >= dragT && (mouseY <= (dragT + dragH))){
			clickDrag = true;
			return false;
		}
		else if(mouseX >= dragL && (mouseX <= (dragL + dragW)) && mouseY >= rulerT && (mouseY <= (rulerT + scrollH))){
			// If click above drag
			if(mouseY < dragT){
				clickAbove = true;
				clickUp = true;
				return scrollUp();
			}
			// Else click below drag
			else{
				clickBelow = true;
				clickDown = true;
				return scrollDown();
			}
		}
		// If no scrolling is to take place
		else{
			return true;
		}
	}
	
	// Drag function
	function move(e){
		if(clickDrag && contentH > contentClipH){
			getMouse(e);
			dragT = (mouseY - startY);
			
			if(dragT < (rulerT))
				dragT = rulerT;		
			if(dragT > (rulerT + scrollH - dragH))
				dragT = (rulerT + scrollH - dragH);
			
			contentT = ((dragT - rulerT)*(1/scrollLength));
			contentT = eval('-' + contentT);
	
			moveTo();
			
			// So ie-pc doesn't select gifs
			if(ie4)
				return false;
		}
	}
	
	function up(){
		clearTimeout(timer);
		// Resetting variables
		clickUp = false;
		clickDown = false;
		clickDrag = false;
		clickAbove = false;
		clickBelow = false;
		return true;
	}
	
	// Reads content layer top
	function getT(){
		if(ie4)
			contentT = document.all.content.style.pixelTop;
		else if(nn4)
			contentT = document.contentClip.document.content.top;
		else if(dom)
			contentT = parseInt(document.getElementById("content").style.top);
	}
	
	// Reads mouse X and Y coordinates
	function getMouse(e){
		if(ie4){
			mouseY = event.clientY + document.body.scrollTop;
			mouseX = event.clientX + document.body.scrollLeft;
		}
		else if(nn4 || dom){
			mouseY = e.pageY;
			mouseX = e.pageX;
		}
	}
	
	// Moves the layer
	function moveTo(){
		if(ie4){
			document.all.content.style.top = contentT;
			document.all.ruler.style.top = dragT;
			document.all.drag.style.top = dragT;
		}
		else if(nn4){
			document.contentClip.document.content.top = contentT;
			document.ruler.top = dragT;
			document.drag.top = dragT;
		}
		else if(dom){
			document.getElementById("content").style.top = contentT + "px";
			document.getElementById("drag").style.top = dragT + "px";
			document.getElementById("ruler").style.top = dragT + "px";
		}
	}
	
	// Scrolls up
	function scrollUp(){
		getT();
		
		if(clickAbove){
			if(dragT <= (mouseY-(dragH/2)))
				return up();
		}
		
		if(clickUp){
			if(contentT < 0){		
				dragT = dragT - (speed*scrollLength);
				
				if(dragT < (rulerT))
					dragT = rulerT;
					
				contentT = contentT + speed;
				if(contentT > 0)
					contentT = 0;
				
				moveTo();
				timer = setTimeout("scrollUp()",25);
			}
		}
		return false;
	}
	
	// Scrolls down
	function scrollDown(){
		getT();
		
		if(clickBelow){
			if(dragT >= (mouseY-(dragH/2)))
				return up();
		}
	
		if(clickDown){
			if(contentT > -(contentH - contentClipH)){			
				dragT = dragT + (speed*scrollLength);
				if(dragT > (rulerT + scrollH - dragH))
					dragT = (rulerT + scrollH - dragH);
				
				contentT = contentT - speed;
				if(contentT < -(contentH - contentClipH))
					contentT = -(contentH - contentClipH);
				
				moveTo();
				timer = setTimeout("scrollDown()",25);
			}
		}
		return false;
	}
	
	// reloads page to position the layers again
	function reloadPage(){
		location.reload();
	}
	
	// Preload
	function eventLoader(){
		if(ie4){
			// Up-arrow X and Y variables
			upL = document.all.up.style.pixelLeft;
			upT = document.all.up.style.pixelTop;		
			// Down-arrow X and Y variables
			downL = document.all.down.style.pixelLeft;
			downT = document.all.down.style.pixelTop;
			// Scrollbar X and Y variables
			dragL = document.all.drag.style.pixelLeft;
			dragT = document.all.drag.style.pixelTop;		
			// Ruler Y variable
			rulerT = document.all.ruler.style.pixelTop;		
			// Height of content layer and clip layer
			contentH = parseInt(document.all.content.scrollHeight);
			contentClipH = parseInt(document.all.contentClip.style.height);
		}
		else if(nn4){
			// Up-arrow X and Y variables
			upL = document.up.left;
			upT = document.up.top;		
			// Down-arrow X and Y variables
			downL = document.down.left;
			downT = document.down.top;		
			// Scrollbar X and Y variables
			dragL = document.drag.left;
			dragT = document.drag.top;		
			// Ruler Y variable
			rulerT = document.ruler.top;
			// Height of content layer and clip layer
			contentH = document.contentClip.document.content.clip.bottom;
			contentClipH = document.contentClip.clip.bottom;
		}
		else if(dom){
			// Up-arrow X and Y variables
			upL = parseInt(document.getElementById("up").style.left);
			upT = parseInt(document.getElementById("up").style.top);
			// Down-arrow X and Y variables
			downL = parseInt(document.getElementById("down").style.left);
			downT = parseInt(document.getElementById("down").style.top);
			// Scrollbar X and Y variables
			dragL = parseInt(document.getElementById("drag").style.left);
			dragT = parseInt(document.getElementById("drag").style.top);
			// Ruler Y variable
			rulerT = parseInt(document.getElementById("ruler").style.top);
			// Height of content layer and clip layer
			contentH = parseInt(document.getElementById("content").offsetHeight);
			contentClipH = parseInt(document.getElementById("contentClip").offsetHeight);
			document.getElementById("content").style.top = 0 + "px";
			
		}
		// Number of pixels scrollbar should move
		scrollLength = ((scrollH-dragH)/(contentH-contentClipH));
		// Initializes event capturing
		if(nn4){
			document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
			window.onresize = reloadPage;
		}
		document.onmousedown = down;
		document.onmousemove = move;
		document.onmouseup = up;
	}
	
	// öffnet das Druck Popup
	function openPopup(url){
		window.open(url, "popup","width=500,height=600");
	}
