//

function flvS3(v1){//v1.5  // This function sets up the Content Div size and position
	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, v8=document, v9=navigator.appVersion; 
	v3=isNaN(parseInt(v7.left))?v2.offsetLeft:parseInt(v7.left); 
	v4=isNaN(parseInt(v7.top))?v2.offsetTop:parseInt(v7.top);
	if (v9.indexOf("MSIE 5")>-1&&v9.indexOf("Mac")>-1){
		if (v2.parentElement.tagName=="BODY"){
			v3+=parseInt(v8.body.leftMargin);
			v4+=parseInt(v8.body.topMargin);
		}
	}
	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 flvS8(v1,v2,v3){//v1.1 // repeats at each line moved
	var v4=(document.layers)?v1:v1.style, v5=flvS5();
	v4.left=v2+v5;
	v4.top=v3+v5;
}

function flvS5(){//v1.1
return (document.layers||window.opera)?"":"px";}

function flvS11(){//v1.0
	if (!Array.prototype.shift){
		Array.prototype.shift=function(){
								  var v1=this[0];
								  this.reverse();
								  this.length=Math.max(this.length-1,0);
								  this.reverse();
								  return v1;
							  }
	}
	if (!Array.prototype.unshift){
		Array.prototype.unshift=function(){
									var v2=arguments;this.reverse();
									for(var v3=v2.length-1; v3>=0; v3--){
										this[this.length]=v2[v3];
									}
									this.reverse();
									return this.length;
								}
	}
	if (!Array.prototype.push){
		Array.prototype.push=function(){
								var v2=arguments;
								for(var v3=v2.length-1; v3>=0; v3--){
									this[this.length]=v2[v3];
								}
								return this.length;
							}
	}
	if (!Array.prototype.pop){
		Array.prototype.pop=function(){
								var v4=this[this.length-1];
								this.length=Math.max(this.length-1,0);
								return v4;
							}
	}
}

function dmxFSG2(){//v1.16 // THIS CALLS FSG11 to move the divs
	var v1=arguments, v2=v1[0], v3=document;
	if (v3.SG18&&v3.SG18[v2]){
		var v4=v3.SG18[v2], v5="dmx"+v2, v6=(v1.length>2)?v1[2]:v4.SG26, v7=(v1.length>3)?v1[3]:v4.SG31;
		v4.SG22=(v1.length>1&&v1[1]!=2)?v1[1]:v4.SG22;
		if (v4.SG37==1){
			dmxFSG11(v2,v4.SG22,v6,v7); // calls the one line move routine
		} else {
			dmxFSG12(v2,v4.SG22,v6,v7); // do nothing!
		}
	}
	return false;
}

function dmxFSG3(){//v1.16 Performs Stop and Go button routines
	var v1=document, v2=arguments;
	var v3=(v2.length>0)?(isNaN(parseInt(v2[0]))?0:v2[0]):0;
	if (!v1.SG18){
		return false;
	}
	if (v3==0){
		if (v1.SG36){
			v3=v1.SG36;
			v1.SG36=null;
			if (v1.layers){
				v1.releaseEvents(Event.MOUSEMOVE);
				v1.releaseEvents(Event.MOUSEUP);
			}
			v1.onmousemove=null;
			v1.onmouseup=null;
		} else {
			return false;
		}
	}
	if (v3>0&&v1.SG18[v3]){
		var v4=v1.SG18[v3];
		if (v4.SG19!=null){
			clearTimeout(v4.SG19);
		}
	}
	return false;
}

function dmxFSG13(){//v1.16
var v1=arguments[0],v2=document.SG18[v1],v3,v4,v5;if (v2.SG40.length>1){if (v2.SG37==1){var v6=v2.SG40[0][1].y;for (var v7=0;v7<v2.SG40.length;v7++){v2.SG40[v7][1].y=v6;v6+=v2.SG40[v7][1].h;}}else {var v8=v2.SG40[0][1].x;for (var v7=0;v7<v2.SG40.length;v7++){v2.SG40[v7][1].x=v8;v8+=v2.SG40[v7][1].w;}}}for (var v7=0;v7<v2.SG40.length;v7++){v3=v2.SG40[v7][0];v5=v2.SG40[v7][1];v4=MM_findObj(v3);flvS8(v4,v5.x,v5.y);}v3="dmx"+v1+"Thumb";v4=MM_findObj(v3);if (v4){flvS8(v4,v2.SG4,v2.SG3);}}

function dmxFSG4(){//v1.16  // Moves the scroll in response to wheel on mouse
	event.cancelBubble=true;
	var v1=arguments[0], v2=document;
	if (v2.SG18&&v2.SG18[v1]){
		var v3=v2.SG18[v1], v4=(v3.SG37==1), v5=16,v6=v3.SG31, v2=document;
		v2.SG1=v1;
		var v7="dmx"+v1+"Scroller", v8=MM_findObj(v7);
		if (event.wheelDelta>=120){
			if (v4){
				dmxFSG11(v1,1,v5,v6); // scroll line once
			} else {
				dmxFSG12(v1,1,v5,v6); // do nothing
			}
		} else if (event.wheelDelta<=-120){
			if (v4){
				dmxFSG11(v1,0,v5,v6); // scroll line once
			} else {
				dmxFSG12(v1,0,v5,v6); // do nothing
			}
		}
	v2.SG1=null;
	}
}

function dmxFSG1(){//v1.16
// Copyright 2003, Marja Ribbers (FlevOOware.nl), George Petrov (DMXzone.com)
	var v1=arguments, v2=v1[0],v3="dmx"+v2, v4=v3+"Scroller";
	if (!MM_findObj(v4)){ alert("Scroller Genie nr. "+v2+" not found!"); return; }
	var v5=new Object(), v6=new flvS3(v4), v7=document, v8, v9;
	var v10=new flvS3(v3+'Thumb'), v11=new flvS3(v3+'Slider');
	if (!v7.SG18) { v7.SG18=new Array(); }
	v7.SG18[v2]=v5;
	flvS11();
	v5.SG33=v4;
	v5.SG37=v1[1];
	v5.SG22=0;
	v5.SG26=v1[2];
	v5.SG31=v1[3];     // sets speed of scroll
	v5.SG12=v1[4];
	v5.SG43=v1[5];
	v5.SG27=v1[6]; // reads the delay between scrolls
	v5.SG28=v1[7];
	v5.SG25=0;
	v5.SG45=(v1.length>8&&v1[8]!="")?true :false;
	v5.SG17=(v1.length>12)?v1[12]:1;
	v5.SG30=v6.x;
	v5.SG29=v6.y;
	v5.SG14=v11.x;
	v5.SG13=v11.y;
	v5.SG15=v11.w;
	v5.SG16=v11.h;
	v5.SG4=v10.x;
	v5.SG3=v10.y;
	v5.SG5=v10.w;
	v5.SG9=v10.h;
	v5.SG6=v10.y;
	v5.SG10=(v5.SG37==1)?v10.y+(v11.h-v10.h):v10.y;
	v5.SG8=v10.x;
	v5.SG7=(v5.SG37==1)?v10.x:v10.x+(v11.w-v10.w);
	dmxFSG7(v2);
	if (v5.SG12>0){ dmxFSG15(v2); }
	var v12=v3+"Thumb", v13=MM_findObj(v12);
	if (v13){ 
		if (v7.layers){ 
			v13.captureEvents(Event.MOUSEDOWN);
			v13.captureEvents(Event.MOUSEUP);
		}
		v13.onmousedown=dmxFSG9;
		v13.onmouseup=dmxFSG3;
	}
	var v14=v3+"Slider", v15=MM_findObj(v14);
	if (v15){
		if (v7.layers){
			v15.document.captureEvents(Event.CLICK);
		}
		v15.onclick=dmxFSG10;
	}
	if (v5.SG45){ dmxFSG14(v5,v1[8],v1[9],v1[10],v1[11]); }
	if (v5.SG43>0){ 
		v9="dmxFSG2("+v2+",0)"; 
		setTimeout(v9,v5.SG27); // v9 sets function and then it sets the delay between divs
	} 
}




function dmxFSG7(){//v1.16 This is the div setup routine - finds and names all content divs
	var v1=document, v2=arguments, v3=v2[0], v4=(v2.length>1)?v2[1]:true, v5="dmx"+v3, v6=v1.SG18[v3], v7, v8, v9, v10;
	var v11=new flvS3(v5+'Container');
	v6.SG42=v11.h;
	v6.SG41=v11.w;
	var v12=true, v13=1, v14=0, v15=0, v16=0, v17=0, v7, v18, v19;
	var v20=(v6.SG37==1)?true :false;
	if (v4){
		v6.SG40=new Array(); // v6 holds the number ov dmx1Content divs
		while (v12){
			v18=v5+"Content"+v13; // v18 = "dmx"+1+"Content"+1 etc
			v7=MM_findObj(v18);
			if (v7){
				v19=new flvS3(v18);
				v6.SG40[v6.SG40.length]=new Array(v18,v19); // v6.SG40[1] = "dmx1Content1",x.y.h.w  - is each divs values
			} else {
				v12=false;
			}
			v13++;
		}
	}
	for (var v21=0; v21<v6.SG40.length; v21++) {
		v10=new flvS3(v6.SG40[v21][0]);
		v19=v6.SG40[v21][1];
		v19.w=v10.w;
		v19.h=v10.h;
		v7=MM_findObj(v6.SG40[v21][0]);
		v9=(v6.SG17==0&&v21>0)?"hidden":"visible";
		v19.SG2=(v6.SG17==0&&v21>0)?0:1;
		v8=(v1.layers)?v7:v7.style;
		v8.visibility=v9;                // loops and hides all subsequent divs
		if ((v6.SG17==1)||(v21==0)){
			v19.x=v14;v19.y=v15;
			if (v20){
				v15+=v19.h;
				v16=Math.max(v16,v19.w);
				v17+=v19.h;
			} else {
				v14+=v19.w;
				v16+=v19.w;
				v17=Math.max(v17,v19.h);
			}
		}
	}
	v6.SG39=v17;
	v6.SG38=v16;
	v6.SG23=(v17<v11.h)?0:-1*(v17-v11.h);
	v6.SG20=(v16<v11.w)?0:-1*(v16-v11.w);
	if (v6.SG37==1){
		v6.SG21=(v6.SG16-v6.SG9)/(v17-v11.h);
	} else {
		v6.SG21=(v6.SG15-v6.SG5)/(v16-v11.w);
	}
	if (v6.SG21<0) {
		v6.SG21=0;
	}
	if (v6.SG35){
		dmxFSG27(v3);
	}
}

function dmxFSG24(){//v1.16
	var v1=document, v2=arguments, v3=v2[0], v4=parseInt(v2[1]), v5=parseInt(v2[2]), v6, v7, v8;
	dmxFSG3(v3);
	if (v1.SG18&&v1.SG18[v3]){
		v6=v1.SG18[v3];
		if (isNaN(v5)){
			v5=1;
		}
		if (v5==1){
			v8=(v6.SG17==1)?true :false;
			dmxFSG7(v3,v8);
		}
		v7=v6.SG40[0][1];
		if (v6.SG37==1){
			v4=(v5==0)?(v7.y+v4):v4;
			v7.y=v4;
			if (v7.y>0){v7.y=0;
		} else if (v7.y<v6.SG23){
			v7.y=v6.SG23;
		}
		v6.SG3=v6.SG6-(v4*v6.SG21);
		if (v6.SG3<v6.SG6){
			v6.SG3=v6.SG6;
		} else if (v6.SG3>v6.SG10){
			v6.SG3=v6.SG10;
		}
	} else {
		v4=(v5==0)?(v7.x+v4):v4;
		v7.x=v4;
		if (v7.x>0){
			v7.x=0;
		} else if (v7.x<v6.SG20){
			v7.x=v6.SG20;
		}
		v6.SG4=v6.SG8-(v4*v6.SG21);
		if (v6.SG4<v6.SG8){
			v6.SG4=v6.SG8;
		} else if (v6.SG4>v6.SG7){
			v6.SG4=v6.SG7;
		}
	}
	dmxFSG13(v3);
	}
}

function dmxFSG5(){//v1.16
var v1=arguments[0],v2=document,v3;dmxFSG3(v1);if (v2.SG18&&v2.SG18[v1]){dmxFSG24(v1,0,1);}}

function dmxFSG6(){//v1.16
var v1=arguments[0],v2=document,v3,v4;dmxFSG3(v1);if (v2.SG18&&v2.SG18[v1]){v4=v2.SG18[v1];v3=(v4.SG37==1)?v4.SG23:v4.SG20;dmxFSG24(v1,v3,1);}}

function dmxFSG11(){//v1.16
	var v1=document, v2=arguments, v3=v2[0], v4=v2[1], v5=v2[2], v6=v2[3];
	var v7="dmx"+v3+"Content", v8=v1.SG18[v3], v9=false, v10=v5;
	var v11=v8.SG40[0][1];
	if (v8.SG19!=null){
		clearTimeout(v8.SG19);
	}
	v6=(v6==v8.SG27)?v8.SG31:v6;
	if (v8.SG27>0&&v8.SG28>0){
		var v12=dmxFSG21(v8,v5,v6);
		v10=v12[0];
		v6=v12[1];
	}
	if (v4==1){
		if (v8.SG43<2) {
			if (v11.y<0) {
				v11.y=v11.y+v10;
				v8.SG3=v8.SG3-(v5*v8.SG21);
				if (v11.y>0){ v11.y=0; }
				if (v8.SG3<v8.SG6){ v8.SG3=v8.SG6; }
				v9=true;
				if (v8.SG40.length>1) {
					if (v8.SG27>0&&v8.SG28==0){
						v6=v8.SG27;
					}
				}
			} else {
				v11.y=0;v8.SG3=v8.SG6;
			}
		} else {
			v9=true;
			v11.y=v11.y+v10;
			if (v8.SG40.length>1){
				var v13=v8.SG40[v8.SG40.length-1][1];
				v13.y=v13.y+v10;
				if (v11.y>0&&v13.y>v8.SG42){
					var v14=v8.SG40.pop();
					v8.SG40.unshift(v14);
					v11=v8.SG40[0][1];
					v11.y=-1*v11.h;
					if (v8.SG27>0&&v8.SG28==0){
						v6=v8.SG27;
					}
				}
			} else {
				if (v11.y>v8.SG42){ v11.y=-1*v11.h; }
			}
		}
	} else {
		if (v8.SG43<2){
			if (v11.y>v8.SG23){
				v11.y=v11.y-v10;
				v8.SG3=v8.SG3+(v5*v8.SG21);
				if (v11.y<v8.SG23){
					v11.y=v8.SG23;
					v8.SG3=v8.SG10;
				}
				v9=true;
			} else {
				v11.y=v8.SG23;
				v8.SG3=v8.SG10;
			}
		} else {
			v9=true;
			v11.y=v11.y-v10;
			if (Math.abs(v11.y)>v11.h){
				if (v8.SG40.length>1){
					var v14=v8.SG40.shift();
					v8.SG40.push(v14);
					v11=v8.SG40[0][1];
					v11.y=v11.y-v10;
					if (v8.SG27>0&&v8.SG28==0){
						v6=v8.SG27;
					}
				} else {
					v11.y=v8.SG42;
				}
			}
		}
	}
	dmxFSG13(v3);
	if (!v9&&v8.SG43==1){
		v4=(v4==1)?0:1;
		v8.SG22=v4;
		v8.SG25=0;
		v9=true;
	}
	if (v9){
		if (v1.SG1==null){
			var v15="dmxFSG11("+v3+","+v4+","+v5+","+v6+")";
			v8.SG19=setTimeout(v15,v6);
		}
	}
	
	return false;  // MOVES THE DIV UP ONE LINE AT A TIME!
}

function flvS10(){//v1.0 Initial rotine - decides what the user has set for scroller
	var v1=arguments, v2=MM_findObj(v1[0]);
	if (!v2){ return; }
	var v3,v4=v1[1], v5=v1[2];
	var v6=(v1.length>3)?parseInt(v1[3]):0;
	var v7=(v1.length>4)?parseInt(v1[4]):0;
	switch (v5){
		case 0:v3=new flvS3(v4); break;
		case 1:v3=new flvS4(v4); break;
		case 2:v3=new flvS1(v4); break;
	}
	var v8=v3.x+v6, v9=v3.y+v7;
	flvS8(v2,v8,v9);
}

function dmxFSG22(){//v1.16 Initial routine
	var v1=document;
	for (var v2=1; v2<v1.SG18.length; v2++){
			var v3=v1.SG18[v2];
			if (v3.SG45){
				flvS10(v3.SG33,v3.SG49,v3.SG46,v3.SG48,v3.SG47);
			}
		}
	}

function dmxFSG14(){//v1.16 // repositions scroller when window size changed?
var v1=arguments,v2=v1[0],v3=document,v4=window;v2.SG49=v1[1];v2.SG46=v1[2];v2.SG48=v1[3];v2.SG47=v1[4];flvS10(v2.SG33,v2.SG49,v2.SG46,v2.SG48,v2.SG47);if (!v3.SG44){v3.SG44=true;var v4=window,v5=false;if (v3.getElementById&&v3.createElement){if (v4.addEventListener){v4.addEventListener("resize",dmxFSG22,true);}else if (v4.attachEvent){v4.attachEvent("onresize",dmxFSG22);}else {v5=true;}}if (v5){var v6=(v4.onresize)?v4.onresize:function (){};v4.onresize=function (){v6();dmxFSG22();};}}}

function flvS1(v1){//v1.1 // sorts out position of scroller on screen
	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, v9=navigator.appVersion;
	if (v5.layers){
		var v10=false, v6=v7=0;
		v8=v5.anchors[v4];
		if (v8){
			v10=true;
		} else {
			if (v5.layers.length>0){
				for (j=0;j<v5.layers.length;j++){
					v8=v5.layers[j].document.anchors[v4];
					if (v8){
						v10=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 v11=v5.getElementsByName(v4);
			v8=v11[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;
		}
	}
	if (v9.indexOf("MSIE 5")>-1&&v9.indexOf("Mac")>-1){
		v6+=parseInt(v5.body.leftMargin);
		v7+=parseInt(v5.body.topMargin);
	}
	this.x=v6;
	this.y=v7;
}
