function Scroller(num, count) {
  this.screen_amount = 28;
  this.status = 0;
  this.num = num;
  this.count = count;
  this.main = document.getElementById("main_"+num);
  this.container = document.getElementById("main_"+num).getElementsByTagName("div")[1];
  this.max_status = Math.floor(this.count/this.screen_amount);
  
  this.render_scroller = render_scroller;
  this.move_left=move_left;
  this.move_right=move_right;
}
function render_scroller(){
  /*if(this.count > this.screen_amount){
    this.main.innerHTML += '<a class="left_arrow left_arrow_disabled" onclick="$sc_'+this.num+'.move_left()"></a><a class="right_arrow" onclick="$sc_'+this.num+'.move_right()"></a>'
  }*/
}
function move_left() {
    if (this.status > 0) {
    this.main.getElementsByTagName("div")[1].getElementsByTagName("div")[0].style.left = (-1*(this.status*350)+350)+"px";
	this.main.getElementsByTagName("a")[2].className = "right_arrow";
	this.status --;
    if(this.status == 0)
	  this.main.getElementsByTagName("a")[1].className = "left_arrow left_arrow_disabled";
  }
}
function move_right() {
  if(this.status < this.max_status){
    this.main.getElementsByTagName("div")[1].getElementsByTagName("div")[0].style.left = this.status*350-350+"px";
	this.main.getElementsByTagName("a")[1].className = "left_arrow";
	this.status ++;
	if(this.status == this.max_status)
	  this.main.getElementsByTagName("a")[2].className = "right_arrow right_arrow_disabled";
  }
}

