var htmlstr_m = "", flag=true, mouse=1, speed=1, wait=2000, temp=0, m_amount=30, m_top=30;
var ctnt=new Array(), i=0, j=0, cnt=0, ctntCount=0;
var tempStr = "";

function startText_m() {
	for (i=0; i<ctnt.length; i++) {
		insertText_m(i);	
	}
	window.setTimeout("scroll_m()",wait);
}
var runCnt=0;
function scroll_m() {
//alert("scroll_m = " + runCnt++);
	if (mouse && flag) {
		for (i=0;i<ctnt.length;i++) {
			temp++;
			tmp = document.getElementById('scroll_area'+i);
			//tmp.left = parseInt(tmp.left) - 1;
			tmp.style.top = (parseInt(tmp.style.top) - 1) + "px";
			
			if (parseInt(tmp.style.top) <= m_top*(-1)) {
				tmp.style.top = (m_top*(ctnt.length-1)) + "px";
			}

			if (temp>(m_amount-1)*ctnt.length) {
				flag=false;
				temp=0;
				window.setTimeout("flag=true;temp=0;",wait);
			}
		}
	}
	
	window.setTimeout("scroll_m()",speed);
}

function insertText_m(i) {
	var scrollInnerStr = "";
	var scrollObj = document.getElementById("scroll_div");
	if(scrollObj) {
		htmlstr_m = scrollObj.innerHTML;
		htmlstr_m+='<div style="left:0px; height:'+(m_amount+0)+'px; position: absolute; top:'+((m_top)*i)+'px;padding:0 0 0 0" id="scroll_area'+i+'">\n';
		htmlstr_m+=ctnt[i]+'\n'+'</div>\n';
		
		scrollObj.innerHTML = htmlstr_m;
		
		//document.write(htmlstr_m);
		//alert(i + " " + htmlstr_m);
	}
}
	