function ImageInfo( src, width, height, htmlObj, htmlLink )
{
  this.src = src;
  this.width = width;
  this.height = height;
  this.current_width = width;
  this.current_height = height;

  this.htmlObj = htmlObj;
  this.htmlObj.src = this.src;
  this.htmlObj.width = this.current_width;
  this.htmlObj.height = this.current_height;

  this.htmlLink = htmlLink;
  this.htmlLink.title = this.src;
  this.htmlLink.href = this.src;
}

ImageInfo.prototype.set_opacity = function( oopacity )
{
  this.htmlObj.style.opacity = oopacity / 100;
  this.htmlObj.style.MozOpacity = oopacity / 100;
  this.htmlObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity='+oopacity+')';
  this.htmlObj.style.filter = 'alpha(opacity='+oopacity+')';
}

ImageInfo.prototype.set_position = function( x, y )
{
      this.htmlObj.style.position = "absolute";
      this.htmlObj.style.left = x + "px";
      this.htmlObj.style.top = y + "px";
}

ImageInfo.prototype.set_size = function( w, h )
{
  this.current_width = w;
  this.current_height = h;
  
  this.htmlObj.width = this.current_width;
  this.htmlObj.height = this.current_height;
}

ImageInfo.prototype.get_image = function()
{
  return this.htmlObj;
}

ImageInfo.prototype.set_link = function( src )
{
  this.src = src;
}

ImageInfo.prototype.hide = function()
{
  this.htmlObj.style.visibility = 'hidden';
}

ImageInfo.prototype.show = function()
{
  this.htmlObj.style.visibility = 'visible';

  if (this.src) {
  var vars = this.src.split("_");
  var found = vars[0].split("\/");

  this.htmlLink.title = found[3];
  this.htmlLink.href = this.src ;
  }
}
