/*
AutoGrow = Class.create();
AutoGrow.prototype = {
  initialize: function(element,options) {
    this.textarea = $(element);
 
    this.options       = options || {};
    this.dummy         = null;
    this.interval        = null;
    this.line_height     = this.options.lineHeight || parseFloat(element.getStyle('line-height'));
    this.min_height       = this.options.minHeight || parseFloat(element.getStyle('min-height'));
    this.max_height       = this.options.maxHeight || parseFloat(element.getStyle('max-height'));;
    this.textarea       = element;
    
    if(this.line_height == NaN)
     this.line_height = 0;
 
    var self = this;      
    this.textarea.setStyle({overflow: 'hidden', display: 'block'});
    this.textarea.observe('focus', function() { self.startExpand() } );
    this.textarea.observe('blur', function() { self.stopExpand() });
    this.checkExpand();  
  },
 
  startExpand: function() {
    var self = this;
    this.interval = window.setInterval(function() {self.checkExpand()}, 400);
  },
 
  stopExpand: function() {
    clearInterval(this.interval);  
  },
 
  checkExpand: function() {
 
    if (this.dummy == null)
    {
      this.dummy = new Element('div');
      $$('body')[0].insert(this.dummy);
    }
    
    // Needs to be set each time in case styles are changed by something else :[
    this.dummy.setStyle({
                    fontSize: this.textarea.getStyle('font-size'),
                    fontFamily: this.textarea.getStyle('font-family'),
                    width: this.textarea.getWidth() - 5 + 'px',
                    padding: this.textarea.getStyle('padding'),
                    lineHeight: this.line_height + 'px',
                    overflowX: 'hidden',
                    position: 'absolute',
                    top: '0px',
                    left: '-9999px'
                    });
 
    // Strip HTML tags
    var html = this.textarea.value.replace(/(<|>)/g, '');
    
    // IE is different, as per usual
    if (Prototype.Browser.IE)
    {
      html = html.replace(/\n/g, '<BR>new');
    }
    else
    {
      html = html.replace(/\n/g, '<br>new');
    }
    
    if (this.dummy.innerHTML != html)
    {
      this.dummy.innerHTML = html
      
      if (this.max_height > 0 && (this.dummy.getHeight() + this.line_height > this.max_height))
      {
        this.textarea.setStyle({overflowY: 'auto'});  
      }
      else
      {
        this.textarea.setStyle({overflowY: 'hidden'});
        if (this.textarea.getHeight() < this.dummy.getHeight() + this.line_height || (this.dummy.getHeight() < this.textarea.getHeight()))
        {  
          this.textarea.setStyle({height: (this.dummy.getHeight() + this.line_height) + 'px'});
        }
      }
    }
  }
}
 
Element.addMethods('TEXTAREA',{
  autoGrow: function(element,options) {
    element = $(element);
    ag = new AutoGrow(element,options);
    return element;
  }
}
);
*/
function update_comment_count(size){
  if ($('comment-count')){
    $('comment-count').update(size);
  }
  if ($('comment-count-top')){
    $('comment-count-top').update(size);
  }
}