function scroll_m() {
var i=0, j=0;

  if (mouse && flag) {
    for (i=0;i<ctnt.length;i++) {
      temp++;
      tmp = document.getElementById('scroll_area'+i).style;
      tmp.left = parseInt(tmp.left) - 1;
      if (parseInt(tmp.left) <= m_left*(-1)) {
        tmp.left = m_left*(ctnt.length-1);
      }

      if (temp>(m_amount-1)*ctnt.length) {
	flag=false;
        temp=0;
        window.setTimeout("flag=true;temp=0;",wait);
      }
    }
  }
  window.setTimeout("scroll_m()",speed);
}

function scroll_t() {
var i=0, j=0;
  if (mouse2 && flag2) {
    for (i=0;i<ctnt.length;i++) {
      temp2++;
      tmp = document.getElementById('scroll_area2'+i).style;
      tmp.top = parseInt(tmp.top) - 1;
      if (parseInt(tmp.top) <= m_top*(-1)) {
        tmp.top = m_top*(ctnt.length-1);
      }

      if (temp2>(m_amount2-1)*ctnt.length) {
	flag2=false;
        temp2=0;
        window.setTimeout("flag2=true;temp2=0;",wait);
      }
    }
  }
  window.setTimeout("scroll_t()",speed);
}

function startText_m(direction) {

	if (direction == "top") {
	  for (i=0; i<ctnt.length; i++) insertText_m(i);
  window.setTimeout("scroll_t()",wait);
	} else {
	  for (i=0; i<ctnt.length; i++) insertText_m(i);
	  window.setTimeout("scroll_m()",wait);
	}

}
