function ScrollData(width, img_width, delimiter_width, delimiter_color, div_name, in_arr){
  isDOM=(document.getElementById)?true:false
  this.number_of_images = in_arr.length;
  this.width=width;
  this.img_width = img_width;
  this.delimiter_width = delimiter_width;
  this.delimiter_color = delimiter_color;

  this.shift = 0;
  this.data_width=this.number_of_images*this.img_width+(this.number_of_images-1)*this.delimiter_width;

  this.in_arr = in_arr;
  this.div_name = div_name;

  this.in_action = false;

  this.step = 10;

  if(!isDOM){
    return false
  }

  return true
}

ScrollData.prototype.update_div = function(div,html) {
   var layer = (document.getElementById)? document.getElementById(div) : document.all[div];
   if(layer && layer.innerHTML) {
     layer.innerHTML = html;
   }
}

ScrollData.prototype.create = function() {
  html = '<nobr>';
  for (i=0; i<this.number_of_images; i++) {
    if (i<this.number_of_images-1) {
      html = html + '<a href="'+this.in_arr[i][0]+'"><img src="'+this.in_arr[i][1]+'" border="0" style="border-right: '+this.delimiter_width+'px solid #'+this.delimiter_color+';"></a>';
    }else{
      html = html + '<a href="'+this.in_arr[i][0]+'"><img src="'+this.in_arr[i][1]+'" border="0"></a>';
    }
  }
  html = html+'</nobr>';
  this.update_div(this.div_name, html);
}

ScrollData.prototype.move = function() {
   var layer = (document.getElementById)? document.getElementById(this.div_name) : document.all[this.div_name];
   if(layer && layer.style) {
     layer.style.left = '-'+this.shift+'px';
   }
}

ScrollData.prototype.shift_right = function() {
  if (this.data_width-this.shift>this.width) {
    this.shift = this.shift+this.step;
    if (this.data_width-this.shift<this.width) {
      this.shift = this.data_width - this.width;
    }
    this.move();
  }
}

ScrollData.prototype.shift_left = function() {
  if (this.shift>0) {
    this.shift = this.shift-this.step;
    if (this.shift<0) {
      this.shift = 0;
    }
    this.move();
  }
}