<!--
function scroller() {
	this.speed = 10;
	this.delay = 4000;

	this.isFirst = true;		//
	this.isRoll = true;			//mouse over rolling stop (onMouseOver = false, onMouseOut = true)
	this.status = false;		//data insert
	this.amount = 0;			//increase height ++
	this.rollCount = 3;		//scroll count
	this.roll = 0;				//data total count

	this.index = 1;				//progress data num
	
	this.height = 20;			//height

	this.itemCount = 0;
	this.itemList = new Array();

	this.O = null;
	this.A = setAdd;
	this.R = setRollCount;
	this.H = setHeight;
	this.I = setInit;
	this.D = scrollData;
	this.S = scrollStart;
}


//data add
function setAdd(content) {
	this.itemList[this.itemCount] = "<table width=100% border=0 cellpadding=0 cellspacing=0><tr height=" + this.height + " valign=top><td style=\"text-align:left\">" + content + "</td></tr></table>";
	this.itemCount++;
}


//height
function setHeight(height) {
	this.height = height;
}

//roll look
function setRollCount(count) {
	this.rollCount = count;
	this.index = this.rollCount
}


//init
function setInit(id) {
	this.O = document.getElementById(id);
	this.D();
	this.S();
}


//set data 
function scrollData() {
	var i = 0;
	var j = 0;
	var m = 0;
	
	if(!this.status) {
		
		//first
		m = (this.itemCount % this.rollCount);

		if(m != 0) {
			for(i = (this.itemCount - m); i < this.itemCount; i++) {
				this.O.innerHTML += this.itemList[i];
				this.roll++;
			}
		}
		
		//original
		for(j = 0; j < 2; j++) {

			for(i = 0; i < this.itemCount; i++) {
				this.O.innerHTML += this.itemList[i];
				this.roll++;
			}

		}
		
		//last
		if(m != 0) {
			for(i = 0; i < (this.rollCount - m); i++) {
				this.O.innerHTML += this.itemList[i];
				this.roll++;
			}
		}
		
		this.status = true;
		this.O.scrollTop = 0;
		this.amount = 0;
	}
	
}


//scroll start
function scrollStart() {
	if(this.status) {
		
		if(this.isRoll || this.amount  > 0) {

			if(!this.isFirst) this.O.scrollTop++;
			
			this.amount++;		//height

			//Don't scroll for only first
			if(this.isFirst && this.amount == this.height) {
				this.amount = 0;
				this.isFirst = false;
			}

			if(this.amount == this.height) {		//this.amount + 'px' == this.O.style.height
				this.amount = 0;
				this.index++;

				if(this.index >= this.roll) {		//this.itemCount - 1
					this.O.scrollTop = 0;
					this.amount = 0;
					this.index = this.rollCount;	//roll count first
				}
					
				setTimeout("_s.S();", this.delay);

			} else {
				setTimeout("_s.S();", this.speed);
			}

		} else {
			setTimeout("_s.S();", this.delay);
		}
	}
}
//-->