function startText() {
	for (i=0; i<ctnt_cnt; i++) insertText(i);
	window.setTimeout("scroll()",wait);
}

function scroll() {
	if (mouse && flag) {
		for (i=0;i<ctnt_cnt;i++) {
			temp++;
			tmp = document.getElementById('scroll_area'+i).style;
			tmp.top = parseInt(tmp.top)-speed;
			if (parseInt(tmp.top) <= height*(-1)) {
				tmp.top = height*(ctnt_cnt-1);
			}
			if (temp>(amount-1)*ctnt_cnt) {
				flag=false;
				temp=0;
				window.setTimeout("flag=true;temp=0;",wait);
			}
		}
	}
	window.setTimeout("scroll()",1);
}

function insertText(i) {
	htmlstr='<div style="left: 0px; width: 99%; position: absolute; top: '+(height*i)+'px" id="scroll_area'+i+'">\n';
	htmlstr+=ctnt[i]+'\n'+'</div>\n';
	document.write(htmlstr);
}
