var debug = false;	//zeigt die Scrollposition in der Statuszeile an

function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
function getWindowWidth() {
			var windowWidth = 0;
			if (typeof(window.innerWidth) == 'number') {
				windowWidth = window.innerWidth;
			}
			else {
				if (document.documentElement && document.documentElement.clientWidth) {
					windowWidth = document.documentElement.clientWidth;
				}
				else {
					if (document.body && document.body.clientWidth) {
						windowWidth = document.body.clientWidth;
					}
				}
			}
			return windowWidth;
		}
function setzentrieren() {
    if (document.getElementById) {
        var windowHeight = getWindowHeight();
        var windowWidth = getWindowWidth();
        if (windowHeight > 0) {
            var zentrierenElement = document.getElementById('zentrieren');
            var zentrierenHeight = zentrierenElement.offsetHeight;
            var zentrierenWidth = zentrierenElement.offsetWidth;
            if (windowHeight - zentrierenHeight > 0)
                zentrierenElement.style.top = ((windowHeight / 2) - (zentrierenHeight / 2)) + 'px';
            if (windowWidth - zentrierenWidth > 0)
            	zentrierenElement.style.left = ((windowWidth / 2) - (zentrierenWidth / 2)) + 'px';
        }
        zentrierenElement.style.position = 'absolute';
        zentrierenElement.style.visibility = "visible";
        contentElement = document.getElementById("noscroll");
        contentElement.style.visibility = "visible";
    }
}
//window.onload = function() {
//  setzentrieren();
//}
window.onresize = function() {
    setzentrieren();
}
function init() {
	setzentrieren();
	if (document.forms[0]) {
		for (var i=0; i<document.forms[0].elements.length; i++) {
			if (document.forms[0].elements[i].type!='hidden') {
				document.forms[0].elements[i].focus();
				break;
			}
		}
	}
	initScroll();
}

// scroll- and clipfunction

function initScroll() {
	if (document.getElementById) {
	    mainLayer = document.getElementById(idMainLayer);
        textLayer = document.getElementById(idInnerLayer);
        textLyr = textLayer.style;
        textWidth = parseInt(textLyr.width);
        textHeight = parseInt(textLyr.height);
        showScrollButtons = upperLimit < 0;
        if (showScrollButtons) {
        	var scrUp = document.getElementById("scrollupLayer");
        	var scrDn = document.getElementById("scrolldnLayer");
        	if (scrUp && scrDn) {
        		scrUp.style.left = (parseInt(textLyr.left)+parseInt(textLyr.width)+5)+"px";
        		scrDn.style.left = scrUp.style.left;
        		scrUp.style.top = textLyr.top;
        		scrDn.style.top = (parseInt(textLyr.top)+parseInt(textLyr.height)-parseInt(scrDn.style.height))+"px";
        		scrUp.style.visibility = "visible";
        		scrDn.style.visibility = "visible";
        	}
        }
    }
}

var idMainLayer = "zentrieren";
var idInnerLayer = "noscroll";

var upperLimit = -0;	//Wie weit darf der Inhalt gescrollt werden? NEGATIVER WERT!!! (Höhe des Inhaltes - Höhe der Anzeige)*-1

var textWidth = 0;		//Breite des Scroll-Divs
var textHeight = 0;		//Höhe des Scroll-Divs		--- wird beides in initScroll() gesetzt (muß per style="width:xxx,height:xxx" im Layer stehen)
var showScrollButtons = false;
var cliptop = 75;
var loop = true;
var direction = "up";
var speed = 2;
var timer1 = null;
var textLayer = false;
var textLyr = false;
var mainLayer = false;

function scroll(dir,spd) {
    direction = dir;
    speed = spd;
    var y_pos = parseInt(textLyr.top);
    if(direction == "dn" && y_pos > upperLimit+cliptop) {
        textLyr.top = y_pos-speed > upperLimit+cliptop ? (y_pos-speed)+"px" : (upperLimit+cliptop)+"px"
        if (is.ns4){ /*
            document.textLayer.clip.top = (page.top-(parseInt(dummyLyr.top)+cliptop))*(-1);
            document.textLayer.clip.right = 490;
            document.textLayer.clip.bottom = (page.top-(parseInt(dummyLyr.top)+cliptop))*(-1)+366;
            document.textLayer.clip.left = 0; */
        }
        else if (is.ie || is.ns6){
            ctop = (parseInt(textLyr.top)-cliptop)*-1;
            cbottom = ((parseInt(textLyr.top)-cliptop)*-1)+textHeight;
            cright = textWidth;
            cleft = 0;
            textLayer.style.clip = 'rect(' + ctop + 'px ' + cright + 'px ' + cbottom + 'px ' + cleft + 'px)';
        }
        clearTimeout(timer1);
        if(loop == true) {
            timer1 = setTimeout("scroll(direction,speed)", 1);
        }
    }
    else if(direction == "up" && y_pos < cliptop){
        textLyr.top = y_pos+speed < cliptop ? (y_pos+speed)+"px" : cliptop+"px";
        if (is.ns4){ /*
            document.textLayer.clip.top = (page.top-(parseInt(dummyLyr.top)+cliptop))*(-1);
            document.textLayer.clip.right = 490;
            document.textLayer.clip.bottom = (page.top-(parseInt(dummyLyr.top)+cliptop))*(-1)+366;
            document.textLayer.clip.left = 0; */
        }
        else if (is.ie || is.ns6){
            ctop = (parseInt(textLyr.top)-cliptop)*-1;
            cbottom = ((parseInt(textLyr.top)-cliptop)*-1)+textHeight;
            cright = textWidth;
            cleft = 0;
            textLayer.style.clip = 'rect(' + ctop + 'px ' + cright + 'px ' + cbottom + 'px ' + cleft + 'px)';
        }
        clearTimeout(timer1);
        if(loop == true) {
            timer1 = setTimeout("scroll(direction,speed)", 1);
        }
    }
    if (debug)
    	window.status = (y_pos-cliptop)*-1;
}

function scrollwheel() {
	if (window.event && window.event.wheelDelta) {
		loop = false;
	    if (event.wheelDelta > 0)
            scroll("up",22);	//hochscrollen
        else
            scroll("dn",22);
    }
}

// Right Mouse Click fuer Bilddownload verbieten

//  function right(e) {
//    if (navigator.appName == 'Netscape' && (e.which == 2 || e.which == 3)) {
//      alert('Copyright © Protina Pharmazeutische GmbH 2004, Ismaning. Alle Rechte vorbehalten.');
//      return false;
//    }
//    else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button==2 || event.button == 3)) {
//      alert('Copyright © Protina Pharmazeutische GmbH 2004, Ismaning. Alle Rechte vorbehalten.');
//    return false;
//   }
//    return true;
//  }

document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;




<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->



function preload() {

  if (!document.images) return;

  var ar = new Array();

  var arguments = preload.arguments;

  for (var i = 0; i < arguments.length; i++) {

    ar = new Image();

    ar.src = arguments;

  }

}



function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' muss eine gültige Emailadresse sein.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' muss aus Zahlen bestehen.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' wird benötigt.\n'; }
  } if (errors) alert('Folgende Fehler sind aufgetreten:\n'+errors);
  document.MM_returnValue = (errors == '');
}






