function LoaderBar() {
  LoaderBar.prototype.ids ++;
  this.id = this.ids;
  this.backgroundPos = 0;
};
LoaderBar.prototype.ids = 0;

LoaderBar.prototype.addLoader = function(where) {
  var div = get_by_id('status-holder-'+this.id);
  if(!div)div =  make_el('DIV',{className:'status-holder',id:'status-holder-'+this.id},where);
  this.setInterval();
  div.style.display = '';
  return div;
};

LoaderBar.prototype.setInterval = function() {
  var me = this;
  this.intervalId = setInterval(function(){me.stepLoader()},20);
};

LoaderBar.prototype.stepLoader = function() {
  var div = get_by_id('status-holder-'+this.id);
  if(div) {
    this.backgroundPos++;
    div.style.backgroundPosition = this.backgroundPos+'px 0px';
  }
};

LoaderBar.prototype.killLoader = function() {
  clearInterval(this.intervalId);
  var div = get_by_id('status-holder-'+this.id);
  div.style.display = 'none';
};
