<!--
///////////////////////////////////////////////////////////////////////
// Standard Dreamweaver behaviors 
///////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////
// FlevOOware behaviors (www.flevooware.nl)
///////////////////////////////////////////////////////////////////////

function flevTrimSpaces(sString) {
   // removes leading, trailing and 'within' spaces from the passed string
   var sReturn = sString;
   var sChar = sReturn.substring(0, 1);
   while (sChar == " ") { // Check for spaces at the beginning of the string
      sReturn = sReturn.substring(1, sReturn.length);
      sChar = sReturn.substring(0, 1);
   }
   sChar = sReturn.substring(sReturn.length-1, sReturn.length);
   while (sChar == " ") { // Check for spaces at the end of the string
      sReturn = sReturn.substring(0, sReturn.length-1);
      sChar = sReturn.substring(sReturn.length-1, sReturn.length);
   }
   while (sReturn.indexOf(" ") != -1) { // Look for spaces within the string
      sReturn = sReturn.substring(0, sReturn.indexOf(" ")) + sReturn.substring(sReturn.indexOf(" ")+1, sReturn.length);
   }
   return sReturn;
}

function flvS1(v1){//v1.0
var v2=v1.indexOf("?"),v3=(v2>-1)?v1.substring(v2+1):"";var v4=(v3!="")?v1.substring(0,v2):v1;var v5=(v3!="")?parent.frames[v3].document:document;var v6=0,v7=0,v8;if (v5.layers){var v9=false,v6=v7=0;v8=v5.anchors[v4];if (v8){v9=true;}else {if (v5.layers.length>0){for (j=0;j<v5.layers.length;j++){v8=v5.layers[j].document.anchors[v4];if (v8){v9=true;v6=v5.layers[j].left;v7=v5.layers[j].top;break}}}}this.x=v6+v8.x;this.y=v7+v8.y;return;}if (v5.all){v8=v5.all[v4];}else if (v5.getElementById){v8=v5.getElementById(v4);if (!v8){var v10=v5.getElementsByName(v4);v8=v10[0];}}else {this.x=0;this.y=0;return;}if (v8){v6+=v8.offsetLeft;v7+=v8.offsetTop;while (v8.offsetParent){v8=v8.offsetParent;v6+=v8.offsetLeft;v7+=v8.offsetTop;}}this.x=v6;this.y=v7;}

function flvS3(v1){//v1.3
var v2=MM_findObj(v1);if (!v2){this.x=this.y=this.h=this.w=0;return;}var v3,v4,v5,v6,v7=(document.layers)?v2:v2.style;v3=isNaN(parseInt(v7.left))?v2.offsetLeft:parseInt(v7.left);v4=isNaN(parseInt(v7.top))?v2.offsetTop:parseInt(v7.top);if (v2.offsetHeight){v5=v2.offsetHeight;v6=v2.offsetWidth;}else if (document.layers){v5=v7.clip.height;v6=v7.clip.width;}else {v5=v6=0;}this.x=parseInt(v3);this.y=parseInt(v4);this.h=parseInt(v5);this.w=parseInt(v6);}

function flvS4(){//v1.0
var v1=arguments,v2=v1[0],v3=v1[1],v4=MM_findObj(v2),v5=v6=0;if (!v4&&document.all){v4=document.all[v2];}if (!v4){this.x=0;this.y=0;return;}var v7=(document.getElementById||document.all),v8=document.layers,v9=v2.indexOf("?");if (v9>-1){v2=v2.substring(0,v9);}if (v8){for (var v10=0;v10<v8.length;v10++){var v11="document."+v8[v10].id;if (eval(v11+".document."+v2)){v5=eval(v11+".left");v6=eval(v11+".top");break;}}}if (v7){v5+=v4.offsetLeft;v6+=v4.offsetTop;while (v4.offsetParent){v4=v4.offsetParent;v5+=v4.offsetLeft;v6+=v4.offsetTop;}}else if (v8){v5+=v4.x;v6+=v4.y;}this.x=v5;this.y=v6;}

function flvS8(v1,v2,v3){//v1.0
var v4=(document.layers)?v1:v1.style;var v5=flvS5();eval("v4.left='"+v2+v5+"'");eval("v4.top='"+v3+v5+"'");}

function flvS5(){//v1.0
var v1=((parseInt(navigator.appVersion)>4||navigator.userAgent.indexOf("MSIE")>-1)&&(!window.opera))?"px":"";return v1;}

function flvS6(){//v1.0
var v1=(arguments.length>0)?arguments[0]:window;if (v1.innerWidth){this.x=v1.pageXOffset;this.y=v1.pageYOffset;}else {v1=v1.document;if (v1.documentElement&&v1.documentElement.clientWidth){this.x=v1.documentElement.scrollLeft;this.y=v1.documentElement.scrollTop;}else if (v1.body){this.x=v1.body.scrollLeft;this.y=v1.body.scrollTop;}else {this.x=0;this.y=0;}}}

function flevGetDivProperty() { // v1.0
	// Copyright 2002, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl)
	this.opera = (window.opera); this.ns4 = (document.layers); this.ie = (document.all);
	this.ns6 = (document.getElementById && !document.all && !this.opera);
    var sV = "", sD = arguments[0], oD = MM_findObj(sD), sP = arguments[1]; if (oD == null) {return 0;}
	var sF = (sD.indexOf("?") > 0) ? sD.substring(sD.indexOf("?")+1) : "";
	if ((sF != "") && (this.ie)) {sD = "parent.frames['" + sF + "']." + sD.substring(0,sD.indexOf("?"));}
	if ((sP == "left") || (sP == "top")) {
		if (!this.ns4) {oD = oD.style;} sV = eval("oD." + sP);
		if ((this.ie) && (sV == "")) { // IE (on PC) bug with nested layers
			if (sP == "top") { sV = eval(sD + ".offsetTop");} 
			else { sV = eval(sD + ".offsetLeft");}}}
	else {if (this.opera) {oD = oD.style;
			if (sP == "height") { sV = oD.pixelHeight;} 
			else if (sP == "width") { sV = oD.pixelWidth;}}
		else if (this.ns4) {sV = eval("oD.clip." + sP);} 
		else if (this.ns6) {sV = document.defaultView.getComputedStyle(oD, "").getPropertyValue(sP);} 
	    else if (this.ie) { 
			if (sP == "width") {sV = eval(sD + ".offsetWidth");} 
			else if (sP == "height") {sV = eval(sD + ".offsetHeight");}}}
	sV = (sV == "") ? 0 : sV; if (isNaN(sV)) {if (sV.indexOf('px') > 0) { sV = sV.substring(0,sV.indexOf('px'));}} 
	return parseInt(sV); 
}

function flevMoveDiv(sD, sX, sY){ // v1.4
	// Copyright 2002, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl)
	var	oD = MM_findObj(sD), sS=""; if (!oD) {return;}
	if (!document.layers) {oD = oD.style;} // not NS4.x 
	if((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1) && (!window.opera)) {sS="px";}
	if (sX != "") {eval("oD.left = '" + sX + sS + "'");}
	if (sY != "") {eval("oD.top = '" + sY + sS + "'");}
}

function flevAutoScrollDivs() { // v1.2
    // Copyright 2002, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl)
    var aA = arguments, iA = aA.length, oD = MM_findObj('AutoScrollContainer'); if (!oD) {return;}
    if (oD.scrollTimeout != null) {clearTimeout(oD.scrollTimeout);}
    var sID1 = 'AutoScrollContainer', sID2 = 'AutoScrollContent';   
    var iSS = (iA > 0) ? parseInt(aA[0]) : 1, iPx = (iA > 1) ? parseInt(aA[1]) : 1;   
    var iMs = (iA > 2) ? parseInt(aA[2]) : 50;   
    var iST = (-1 * flevGetDivProperty(sID2, 'height')), iSB = flevGetDivProperty(sID1, 'height');   
    var iCX = flevGetDivProperty(sID2, 'left'), iCY = flevGetDivProperty(sID2, 'top');  
    if (iSS) {
	if (iCY >= iST) {	// Continue scrolling 
	    flevMoveDiv(sID2, String(iCX), String(iCY-iPx));
	}  
	else {	// Re-position scrolling layer at bottom of container 
	    flevMoveDiv(sID2, String(iCX), String(iSB));
	} 
	oD.scrollTimeout = setTimeout("flevAutoScrollDivs(" + iSS + "," + iPx + "," + iMs + ")", iMs);
    }   
}


