<!-- <![CDATA[
xponsor.highlight = {
  createObject: function(elementId, config) {
    return {
      normalColor: document.getElementById(elementId).style.backgroundColor,
      colorHighlight: ((typeof(config) != 'undefined' && typeof(config.colorHighlight) != 'undefined') ? config.colorHighlight : 'red'),
      refElement: document.getElementById(elementId),
      timer: null,
      isHighlighted: false,
      curNbBlink: 0,
      maxNbBlinks: 3,

      changeColor: function(color) {
        this.refElement.style.background = color;
      },

      blink: function() {
        if (this.isHighlighted)
        {
          this.isHighlighted = false;
          this.changeColor(this.normalColor);
          if (++this.curNbBlink >= this.maxNbBlinks)
          {
            this.curNbBlink = 0;
            clearInterval(this.timer);
          }
        }
        else
        {
          this.isHighlighted = true;
          this.changeColor(this.colorHighlight);
        }
      },

      highlight: function() {
        var scope = this;
        if (this.timer)
        {
            clearInterval(this.timer);
        }
        this.timer = setInterval(function(){ scope.blink(); }, 200);
      }
    }
  }
};
// ]]> -->
