var from = 5;                       //the animation start value
var to = 11;                        //the animation end value
var delay = 55;                     //the animation speed
var glowColor = "red";              //the first color
var glowColor2 = "blue";            //the second color
var glowColor3 = "yellow";          //the third color
var glowColor4 = "yellow";          //4th color
var glowColor5 = "lime";            //5th color
var glowColor6 = "orange";          //last color


var i = to;
var j = 0;	 

function textPulseUpOferta ()
{
   if (!document.all)
      return
   if (i < to)
   {
      oferta.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
      i++;
      theTimeout = setTimeout('textPulseUpOferta()',delay);
      return 0;
   }
   if (i = to)
   {
      theTimeout = setTimeout('textPulseDownOferta()',delay);
      return 0;
   }
}

function textPulseDownOferta()
{
   if (!document.all)
      return
   if (i > from)
   {
      oferta.style.filter = "Glow(Color=" + glowColor2 + ", Strength=" + i + ")";
      i--;
      theTimeout = setTimeout('textPulseDownOferta()',delay);
      return 0;
   }
   if (i = from)
   {
      theTimeout = setTimeout('textPulseUp2Oferta()',delay);
      return 0;
   }
}

function textPulseUp2Oferta()
{
   if (!document.all)
      return
   if (i < to)
   {
      oferta.style.filter = "Glow(Color=" + glowColor3 + ", Strength=" + i + ")";
      i++;
      theTimeout = setTimeout('textPulseUp2Oferta()',delay);
      return 0;
   }
   if (i = to)
   {
      theTimeout = setTimeout('textPulseDown2Oferta()',delay);
      return 0;
   }
}

function textPulseDown2Oferta()
{
   if (!document.all)
      return
   if (i > from)
   {
      oferta.style.filter = "Glow(Color=" + glowColor4 + ", Strength=" + i + ")";
      i--;
      theTimeout = setTimeout('textPulseDown2Oferta()',delay);
      return 0;
   }
   if (i = from)
   {
      theTimeout = setTimeout('textPulseUp3Oferta()',delay);
      return 0;
   }
}

function textPulseUp3Oferta()
{
   if (!document.all)
      return
   if (i < to)
   {
      oferta.style.filter = "Glow(Color=" + glowColor5 + ", Strength=" + i + ")";
      i++;
      theTimeout = setTimeout('textPulseUp3Oferta()',delay);
      return 0;
   }
   if (i = to)
   {
      theTimeout = setTimeout('textPulseDown3Oferta()',delay);
      return 0;
   }
}

function textPulseDown3Oferta()
{
   if (!document.all)
      return
   if (i > from)
   {
      oferta.style.filter = "Glow(Color=" + glowColor6 + ", Strength=" + i + ")";
      i--;
      theTimeout = setTimeout('textPulseDown3Oferta()',delay);
      return 0;
   }
   if (i = from)
   {
      theTimeout = setTimeout('textPulseUpOferta()',delay);
      return 0;
   }
}
