function RightPuff(id, allpuffs, scont, ncont, bcont, url, hide) {

  var heights = {small:20, normal:50, big:160};
  var offsets = {small:10, normal:15, big:30};
  var thisref = this;
  allpuffs.push(this);

  this.setup = function() {
    //var params = {id:id, className:"puff_outer", onmouseover:function(e){thisref.focus(e);}, onmouseout:function(e){thisref.blur(e);}};
    var params = {id:id, className:"puff_outer" };
    if (url.length > 0)
      params.onclick = function(){gotoPage(url);};
    this.maindiv = N$CA("div", N$('contentRight_inner'), params, {height:heights.big + offsets.big + "px", overflow:"hidden", display:(hide ? "none" : "block")});
    N$CA('div', this.maindiv, {className:'puff_top', innerHTML:"&nbsp;"});
    var mid = N$CA('div', this.maindiv, {className:'puff_mid'});
    this.content = N$CA('div', mid, {className:'puff_content'}, {height:heights.big+"px", overflow:"hidden"});
    this.smallcontent = N$CA('div', this.content, {innerHTML:scont}, {height:heights.small+"px", display:"none"});
    this.normalcontent = N$CA('div', this.content, {innerHTML:ncont}, {height:heights.normal+"px", display:"none"});
    this.bigcontent = N$CA('div', this.content, {innerHTML:bcont}, {height:heights.big+"px", display:"block"});
    N$CA('div', this.maindiv, {className:'puff_bottom', innerHTML:"&nbsp;"});

    this.visdiv = this.bigcontent;
  }

  this.openCurrent = function(curr) {
    if (this.visdiv != curr) {
      this.visdiv.style.display = "none";
      this.visdiv = curr;
      this.visdiv.style.display = "block";
    }
  }

  this.resizeMain = function(h) {
    this.maindiv.nextheight = h;
    setTimeout(function(){thisref.animDiv(thisref.maindiv, 10);}, 10);
  }

  this.animDiv = function(div, step) {
    var currh = parseInt(div.style.height);
    if (currh > div.nextheight) {
      currh -= step;
      if (currh < div.nextheight) currh = div.nextheight;
      div.style.height = currh + "px";
      if (currh != div.nextheight)
        setTimeout(function(){thisref.animDiv(div, step);}, 10);
    }
    else {
      currh += step;
      if (currh > div.nextheight) currh = div.nextheight;
      div.style.height = currh + "px";
      if (currh != div.nextheight)
        setTimeout(function(){thisref.animDiv(div, step);}, 10);
    }
  }

  this.makeBig = function(pos) {
    this.maindiv.nextheight = heights.big + offsets.big;
    this.animDiv(this.maindiv, 20);
    this.content.nextheight = heights.big;
    this.animDiv(this.content, 10);
    this.openCurrent(this.bigcontent);
  }

  this.makeNormal = function() {
    this.maindiv.nextheight = heights.normal + offsets.normal;
    this.animDiv(this.maindiv, 20);
    this.content.nextheight = heights.normal;
    this.animDiv(this.content, 10);
    this.openCurrent(this.normalcontent);
  }

  this.makeSmall = function() {
    this.maindiv.nextheight = heights.normal + offsets.small;
    this.animDiv(this.maindiv, 10);
    this.content.nextheight = heights.small;
    this.animDiv(this.content, 10);
    this.openCurrent(this.smallcontent);
  }

  this.focus = function() {
    if (this.visdiv != this.bigcontent) {
      for (var i=0; i < allpuffs.length; i++)
        if (allpuffs[i] != this) allpuffs[i].makeSmall();
      this.makeBig();
    }
  }

  this.blur = function(e) {
    for (var i=0; i < allpuffs.length; i++)
      allpuffs[i].makeNormal();
  }

  this.setup();
}
