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 = "orange";          //the second color
var glowColor3 = "yellow";          //the third color
var glowColor4 = "lime";            //4th color
var glowColor5 = "blue";            //5th color
var glowColor6 = "yellow";         //last color      
 
var i = to;
var j = 0;	 

function textPulseUp ()
{
   if (!document.all)
      return
   if (i < to)
   {
      theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
      i++;
      theTimeout = setTimeout('textPulseUp()',delay);
      return 0;
   }
   if (i = to)
   {
      theTimeout = setTimeout('textPulseDown()',delay);
      return 0;
   }
}

function textPulseDown()
{
   if (!document.all)
      return
   if (i > from)
   {
      theText.style.filter = "Glow(Color=" + glowColor2 + ", Strength=" + i + ")";
      i--;
      theTimeout = setTimeout('textPulseDown()',delay);
      return 0;
   }
   if (i = from)
   {
      theTimeout = setTimeout('textPulseUp2()',delay);
      return 0;
   }
}

function textPulseUp2()
{
   if (!document.all)
      return
   if (i < to)
   {
      theText.style.filter = "Glow(Color=" + glowColor3 + ", Strength=" + i + ")";
      i++;
      theTimeout = setTimeout('textPulseUp2()',delay);
      return 0;
   }
   if (i = to)
   {
      theTimeout = setTimeout('textPulseDown2()',delay);
      return 0;
   }
}

function textPulseDown2()
{
   if (!document.all)
      return
   if (i > from)
   {
      theText.style.filter = "Glow(Color=" + glowColor4 + ", Strength=" + i + ")";
      i--;
      theTimeout = setTimeout('textPulseDown2()',delay);
      return 0;
   }
   if (i = from)
   {
      theTimeout = setTimeout('textPulseUp3()',delay);
      return 0;
   }
}

function textPulseUp3()
{
   if (!document.all)
      return
   if (i < to)
   {
      theText.style.filter = "Glow(Color=" + glowColor5 + ", Strength=" + i + ")";
      i++;
      theTimeout = setTimeout('textPulseUp3()',delay);
      return 0;
   }
   if (i = to)
   {
      theTimeout = setTimeout('textPulseDown3()',delay);
      return 0;
   }
}

function textPulseDown3()
{
   if (!document.all)
      return
   if (i > from)
   {
      theText.style.filter = "Glow(Color=" + glowColor6 + ", Strength=" + i + ")";
      i--;
      theTimeout = setTimeout('textPulseDown3()',delay);
      return 0;
   }
   if (i = from)
   {
      theTimeout = setTimeout('textPulseUp()',delay);
      return 0;
   }
}
