    var fadeElementId = 'mainquote';
    var initialDelay  = 2;       // seconds
    var cycleCount = 1;          // generally use 0, 1, 2 or very large number
    var delayBetweenCycles = 120;  // seconds

    var opacity = 0
      , tmr
      , step = 5;
    

    function fade(el) {
      if ((opacity >= 100 && step > 0) || (opacity <= 00 && step < 0)) {
        clearInterval(tmr);
        tmr = null;
        step = -step;
        if (cycleCount > 0) {
          setTimeout('tmr = setInterval("fade(document.getElementById(fadeElementId))", 200)', delayBetweenCycles * 1000);
          cycleCount--;
        }
        return;
      } 
      opacity += step;
      if (typeof(el.style.MozOpacity) != "undefined") {
        el.style.MozOpacity = opacity/100.0;
      }
      if (typeof(el.style.opacity) != "undefined") {
        el.style.opacity = opacity/100.0;
      }
      if (typeof(el.style.KHTMLOpacity) != "undefined") {
        el.style.KHTMLOpacity = opacity/100.0;
      }
      if (el.filters && el.filters.items && el.filters.items("DXImageTransform.Microsoft.Alpha")) {
        el.filters.items("DXImageTransform.Microsoft.Alpha").opacity = opacity;
      }
      if (el.filters && el.filters.alpha) {
        el.filters.alpha.opacity = opacity;
      }
    }
    function fadeit() {
      setTimeout('tmr = setInterval("fade(document.getElementById(fadeElementId))", 200)',initialDelay * 1000);
    }
    
    function restart() {
      if (!tmr && cycleCount == 0) { 
        cycleCount = 1;
        fadeit();
      }
    }