<!--

function scroller(objectId,clipId,clipTop,clipRight,clipBottom,clipLeft) {
	if (document.getElementById) {
		this.object=document.getElementById(objectId);
		this.height=this.object.offsetHeight;
		this.width=this.object.offsetWidth;

		if (clipTop > 0 || clipRight > 0 || clipBottom > 0 || clipLeft > 0) {
			this.clipTop=clipTop; 
			this.clipRight=clipRight; 
			this.clipBottom=clipBottom; 
			this.clipLeft=clipLeft;
		} else { 
			this.clipTop=0; 
			this.clipRight=document.getElementById(clipId).offsetWidth; 
			this.clipBottom=document.getElementById(clipId).offsetHeight;  
			this.clipLeft=0;
		}
	} else if (document.all) {
		this.object=document.all[objectId];
		this.height=this.object.offsetHeight;
		this.width=this.object.offsetWidth;

		if (clipTop > 0 || clipRight > 0 || clipBottom > 0 || clipLeft > 0) {
			this.clipTop=clipTop; 
			this.clipRight=clipRight; 
			this.clipBottom=clipBottom; 
			this.clipLeft=clipLeft;
		} else { 
			this.clipTop=0; 
			this.clipRight=document.all[clipId].offsetWidth; 
			this.clipBottom=document.all[clipId].offsetHeight;  
			this.clipLeft=0;
		}
	} else if (document.layers) {
	    	this.object=document.layers[clipId].document.layers[objectId];
		this.height=this.object.document.height;
		this.width=this.object.document.width;

		if (clipTop > 0 || clipRight > 0 || clipBottom > 0 || clipLeft > 0) {
			this.clipTop=clipTop; 
			this.clipRight=clipRight; 
			this.clipBottom=clipBottom; 
			this.clipLeft=clipLeft;
		} else { 
			this.clipTop=0; 
			this.clipRight=document.layers[clipId].document.width; 
			this.clipBottom=document.layers[clipId].document.height; 
			this.clipLeft=0;
		}
	} else {
		this.object=document;
		this.height=0;
		this.width=0;

		if (clipTop > 0 || clipRight > 0 || clipBottom > 0 || clipLeft > 0) {
			this.clipTop=clipTop; 
			this.clipRight=clipRight; 
			this.clipBottom=clipBottom; 
			this.clipLeft=clipLeft;
		} else { 
			this.clipTop=0; 
			this.clipRight=32767; 
			this.clipBottom=32767; 
			this.clipLeft=0;
		}
	}

	if      (document.layers)   this.object.visibility="hide";
	else if (this.object.style) this.object.style.visibility="hidden";
	else                        this.object.visibility="hidden";

	this.x=this.clipLeft;
	this.y=this.clipTop;
	this.tx=this.clipLeft;
	this.ty=this.clipTop;
	this.vx=0;
	this.vy=0;
	this.scrolling=0;
	this.target=0;
	this.timeout=0;
	this.type="";
	this._exit=__nullExit;

	this.init=_scrollInit;
	this.up=_scrollUp;
	this.right=_scrollRight;
	this.down=_scrollDown;
	this.left=_scrollLeft;
	this.to=_scrollTo;
	this.setStep=_scrollSetStep;
	this.stop=_scrollStop;
	this.resume=_scrollResume;

	this.timer;
	this._move=__move;
		
	this.id="__scrollObject"+objectId;
	eval(this.id+"=this");
	return this;
}

function __move() {
	var exit="";

	if (this.scrolling) {
		this.x+=this.vx;
		this.y+=this.vy;

		if (this.target) {
			if (Math.abs(this.tx-this.x) < Math.abs(this.vx)+25e-2 &&
                            Math.abs(this.ty-this.y) < Math.abs(this.vy)+25e-2) {
				this.x=this.tx;
				this.y=this.ty;
				this.target=0;
				this.scrolling=0;
				exit="target";
			}
		}

		if (this.type == "hide") {
			if (this.x < this.clipLeft-this.width) {
				this.x=this.clipLeft-this.width;
				this.scrolling=0;
				exit="hide";
			} else if (this.x > this.clipRight) {
				this.x=this.clipRight;
				this.scrolling=0;
				exit="hide";
			}
			if (this.y < this.clipTop-this.height) {
				this.y=this.clipTop-this.height;
				this.scrolling=0;
				exit="hide";
			} else if (this.y > this.clipBottom) {
				this.y=this.clipBottom;
				this.scrolling=0;
				exit="hide";
			}
		} else if (this.type == "wrap") {
			if (this.x < this.clipLeft-this.width) { 
				this.x=this.clipRight;
				exit="wrap";
			} else if (this.x > this.clipRight) { 
				this.x=this.clipLeft-this.width;
				exit="wrap";
			}
			if (this.y < this.clipTop-this.height) { 
				this.y=this.clipBottom;
				exit="wrap";
			} else if (this.y > this.clipBottom) { 
				this.y=this.clipTop-this.height;
				exit="wrap";
			}
		} else if (this.type == "bump") {
			if (this.x < this.clipLeft) {
				this.x=this.clipLeft;
				this.vx=-this.vx;
				exit="bump";
			} else if (this.x > this.clipRight-this.width) {
				this.x=this.clipRight-this.width;
				this.vx=-this.vx;
				exit="bump";
			}
			if (this.y < this.clipTop) {
				this.y=this.clipTop;
				this.vy=-this.vy;
				exit="bump";
			} else if (this.y > this.clipBottom-this.height) {
				this.y=this.clipBottom-this.height;
				this.vy=-this.vy;
				exit="bump";
			}
		} else if (this.type == "stop") {
			if (this.x < this.clipLeft) {
				this.x=this.clipLeft;
				this.scrolling=0;
				exit="stop";
			} else if (this.x > this.clipRight-this.width) {
				this.x=this.clipRight-this.width;
				this.scrolling=0;
				exit="stop";
			}
			if (this.y < this.clipTop) {
				this.y=this.clipTop;
				this.scrolling=0;
				exit="stop";
			} else if (this.y > this.clipBottom-this.height) {
				this.y=this.clipBottom-this.height;
				this.scrolling=0;
				exit="stop";
			}
		}

		if (document.layers) {
			this.object.moveTo(this.x,this.y);
		} else if (this.object.style) {
			this.object.style.left=this.x+"px";
			this.object.style.top=this.y+"px";
		} else {
			this.object.left=this.x;
			this.object.top=this.y;
		}
	}

	if (exit && (this._exit != __nullExit)) var timer=setTimeout(this.id+"._exit('"+exit+"')", 1);

	if (this.timer) clearTimeout(this.timer);
	if (this.scrolling) this.timer=setTimeout(this.id+"._move()", this.timeout);
}

function __nullExit() {
	return true;
}

function _scrollInit(x, y, type, timeout, exit) {
	if (x) this.x=this.clipLeft+x;
	else   this.x=this.clipLeft;

	if (y) this.y=this.clipTop+y;
	else   this.y=this.clipTop;

	this.tx=this.x;
	this.ty=this.y;
	this.target=0;
	this.vx=0;
	this.vy=0;
	this.scrolling=1;

	if (type) this.type=type; 
	else      this.type='';

	if (timeout) this.timeout=timeout; 
	else         this.timeout=20;
	
	this._exit=__nullExit;
	this._move();
	if (exit) this._exit=exit;

	if      (document.layers)   this.object.visibility="show";
	else if (this.object.style) this.object.style.visibility="visible";
	else                        this.object.visibility="visible";
}

function _scrollUp(px) {
	if (px) this.vy=-px; 
	else    this.vy=-1;
	this.vx=0;
	this.scrolling=1;
	this._move();
}

function _scrollRight(px) {
	if (px) this.vx=px; 
	else    this.vx=1;
	this.vy=0;
	this.scrolling=1;
	this._move();
}

function _scrollDown(px) {
	if (px) this.vy=px; 
	else    this.vy=1;
	this.vx=0;
	this.scrolling=1;
	this._move();
}

function _scrollLeft(px) {
	if (px) this.vx=-px; 
	else    this.vx=-1;
	this.vy=0;
	this.scrolling=1;
	this._move();
}

function _scrollSetStep(pxx,pxy) {
	if (this.vx >= 0) this.vx=pxx;
	else              this.vx=-pxx;
	if (this.vy >= 0) this.vy=pxy;
	else              this.vy=-pxy;
	this.scrolling=1;
	this._move();
}

function _scrollTo(tx,ty,steps) {
	this.tx=this.clipLeft+tx;
	this.ty=this.clipTop+ty;
	this.vx=(this.tx-this.x)/steps;
	this.vy=(this.ty-this.y)/steps;
	this.target=1;
	this.scrolling=1;
	this._move();
}

function _scrollStop() {
	this.scrolling=0;
	this._move();
}

function _scrollResume() {		
	this.scrolling=1;
	this._move();
}

//-->