function flevDivPositionValue(sDiv, sProperty) { // v2.1, Marja Ribbers-de Vroed, FlevOOware
	this.opera = (window.opera); // Opera 5+
	this.ns4 = (document.layers); // Netscape 4.x
	this.ns6 = (document.getElementById && !document.all && !this.opera); // Netscape 6+
	this.ie = (document.all);  // Internet Explorer 4+
    var sValue = ""; docObj = eval("MM_findObj('" + sDiv + "')"); if (docObj == null) {return 0;}
	if ((sProperty == "left") || (sProperty == "top")) {
		if (!this.ns4) {docObj = docObj.style;} 
		sValue = eval("docObj." + sProperty);
		if ((this.ie) && (sValue == "")) { // IE (on PC) bug with nested layers
			if (sProperty == "top") { sValue = eval(sDiv + ".offsetTop"); } 
			else { sValue = eval(sDiv + ".offsetLeft"); } 
		};
	}
	else {
		if (this.opera) {
			docObj = docObj.style;
			if (sProperty == "height") { sValue = docObj.pixelHeight; } 
			else if (sProperty == "width") { sValue = docObj.pixelWidth; } 
		}
		else if (this.ns4) {sValue = eval("docObj.clip." + sProperty);} 
		else if (this.ns6) {sValue = document.defaultView.getComputedStyle(docObj, "").getPropertyValue(sProperty); } 
	    else if (this.ie) { 
			if (sProperty == "width") { sValue = eval(sDiv + ".offsetWidth"); } 
			else if (sProperty == "height") { sValue = eval(sDiv + ".offsetHeight"); } 
		}
   	}
	sValue = (sValue == "") ? 0 : sValue; 
	if (isNaN(sValue)) { if (sValue.indexOf('px') > 0) { sValue = sValue.substring(0,sValue.indexOf('px')); } } 
	return parseInt(sValue); 
}

function flevMoveDiv(sDivID, sLeft, sTop){ // v1.3, Marja Ribbers-de Vroed, FlevOOware
	var	docObj = eval("MM_findObj('" + sDivID + "')"), sSuffix=""; 
	if (!document.layers) {docObj = docObj.style;} // not NS4.x 
	if((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1) && (!window.opera)) {sSuffix="px";}
	if (sLeft != "") {eval("docObj.left = '" + sLeft + sSuffix + "'");}
	if (sTop != "") {eval("docObj.top = '" + sTop + sSuffix + "'");}
}

function flevAutoScrollDivs() { // v1.11, Marja Ribbers-de Vroed, FlevOOware	
	var iArgs = flevAutoScrollDivs.arguments.length;   
	var docObj = MM_findObj('AutoScrollContainer'); if (!docObj) {return;}
	if (docObj.scrollTimeout != null) {clearTimeout(docObj.scrollTimeout);}
	var sContainerDivID = 'AutoScrollContainer';   
	var sContentDivID = 'AutoScrollContent';   	    	
	var iStartScrolling = (iArgs > 0) ? parseInt(flevAutoScrollDivs.arguments[0]) : 1;  
	var iPixels = (iArgs > 1) ? parseInt(flevAutoScrollDivs.arguments[1]) : 1;   
	var iDelay = (iArgs > 2) ? parseInt(flevAutoScrollDivs.arguments[2]) : 50;   
	var iSichtbereichshoehe = (iArgs > 3) ? parseInt(flevAutoScrollDivs.arguments[3]) : 160;   
	var iErsterAufruf = (iArgs > 4) ? parseInt(flevAutoScrollDivs.arguments[4]) : 0;  //initial wird gesagt, jetzt gehts los, intern dann nicht mehr 
// Erweitert um einen Aufrufparameter, der die Fensterhöhe mitgibt, 
// damit der Text am unteren Ende sauber einfliesst
	var iCurrentTop = flevDivPositionValue(sContentDivID, 'top');   
	var iScrollTop = (-1 * flevDivPositionValue(sContentDivID, 'height'));   
	var iScrollBottom = flevDivPositionValue(sContainerDivID, 'height');   
	var iCurrentLeft = flevDivPositionValue(sContentDivID, 'left');  		
	if (iStartScrolling) {   
		if(iErsterAufruf == 1 ){					
			flevMoveDiv(sContentDivID, String(iCurrentLeft), String(iSichtbereichshoehe));
		}else{
		
			if (iCurrentTop >= iScrollTop ) {
				flevMoveDiv(sContentDivID, String(iCurrentLeft), String(iCurrentTop-iPixels));
				}	// Continue scrolling   

// da ist ein Bug drin. Die Startposition vergrössert sich in jedem Durchgang um die eigene Grösse
// iScrollBottom muß um die Grösse des Contents verringert werden.
// diese steht in -1*iScrollTop
			else {
				flevMoveDiv(sContentDivID, String(iCurrentLeft), String(iSichtbereichshoehe));
			}	// Re-position scrolling layer at bottom of containing layer  
		}
		docObj.scrollTimeout = setTimeout("flevAutoScrollDivs(" + iStartScrolling + "," + iPixels + "," + iDelay + ","+iSichtbereichshoehe+")", iDelay);   
	}   
}

function MM_checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL) { //v4.0
  var newURL='', verStr=navigator.appVersion, app=navigator.appName, version = parseFloat(verStr);
  if (app.indexOf('Netscape') != -1) {
    if (version >= NSvers) {if (NSpass>0) newURL=(NSpass==1)?URL:altURL;}
    else {if (NSnoPass>0) newURL=(NSnoPass==1)?URL:altURL;}
  } else if (app.indexOf('Microsoft') != -1) {
    if (version >= IEvers || verStr.indexOf(IEvers) != -1)
     {if (IEpass>0) newURL=(IEpass==1)?URL:altURL;}
    else {if (IEnoPass>0) newURL=(IEnoPass==1)?URL:altURL;}
  } else if (OBpass>0) newURL=(OBpass==1)?URL:altURL;
  if (newURL) { window.location=unescape(newURL); document.MM_returnValue=false; }
}
