
function image_list(names) {
  this.current = 0;
  this.images = new Array();
  this.cycle = cycle_list;
  this.get_current_img = current_img;
  for (var i = 0; i < names.length; i++) {
     this.images[i] = new Image();
     this.images[i].src = names[i];
  }
} 

function cycle_list(dir) {
   var k = this.current;
   var m = this.images.length - 1;
   if (m>0) {
       if (dir > 0) { k++; } else {k--;}
       if (k > m) { k = 0; }
       if (k < 0) { k = m; }
       this.current = k;
   }
}

function current_img() {
    return this.images[this.current];
}

function swap_img(name,img) {
	if (document.images) {
		document[name].src = img.src;
	}
}

function img_cycle(direction,img_name,list) {
    list.cycle(direction);
    var img = list.get_current_img();
    swap_img(img_name,img);
}






   var imgb_normal = new Image();
   imgb_normal.src = "img/imgb_normal.gif";
   var imgb_plus = new Image();
   imgb_plus.src = "img/imgb_plus.gif";
   var imgb_minus = new Image();
   imgb_minus.src = "img/imgb_minus.gif";





 

