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 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 iCurrentTop = flevDivPositionValue(sContentDivID, 'top');   
	var iScrollTop = (-1 * flevDivPositionValue(sContentDivID, 'height'));   
	var iScrollBottom = flevDivPositionValue(sContainerDivID, 'height');   
	var iCurrentLeft = flevDivPositionValue(sContentDivID, 'left');  
	if (iStartScrolling) {   
		if (iCurrentTop >= iScrollTop) {flevMoveDiv(sContentDivID, String(iCurrentLeft), String(iCurrentTop-iPixels));}	// Continue scrolling   
		else {flevMoveDiv(sContentDivID, String(iCurrentLeft), String(iScrollBottom));}	// Re-position scrolling layer at bottom of containing layer  
		docObj.scrollTimeout = setTimeout("flevAutoScrollDivs(" + iStartScrolling + "," + iPixels + "," + iDelay + ")", iDelay);   
	}   
}