//------------------------------------------------------------------------------
//        File:  jiggle.js
//  Programmer:  http://www.dynamicdrive.com/dynamicindex10/tremble.htm
//     Written:  04-26-2005
//     Revised:  04-26-2005
//------------------------------------------------------------------------------
// <span id="jiggle0" class="jiggle">
//    <b>Looking for JavaScripts?</b>
// </span>
//------------------------------------------------------------------------------
// To apply the effect to multiple messages on the page, repeat step 2, 
// but increment the ID attribute of the <span> from "jiggle0" to "jiggle1"
//  etc, depending on the number of messages.
//------------------------------------------------------------------------------


//----- GLOBAL VARIABLES -------------------------------------------------------
var ns6=document.getElementById&&!document.all
var ie=document.all

var customcollect=new Array()
var i=0

//----- JIGGLEIT FUNCTION ------------------------------------------------------

function jiggleit(num)
{
   if((!document.all&&!document.getElementById))
   {
      return;
   }

   customcollect[num].style.left = 
      ((parseInt(customcollect[num].style.left) == -1) ? 
         customcollect[num].style.left = 1 : 
         customcollect[num].style.left= -1);
}

//----- JIGGLE_INIT FUNCTION ---------------------------------------------------

function jiggle_init()
{
   if (ie)
   {
      while (eval("document.all.jiggle"+i)!=null)
      {
         customcollect[i]= eval("document.all.jiggle"+i)
         i++
      } 
   }
   else if (ns6)
   {
      while (document.getElementById("jiggle"+i)!=null)
      {
         customcollect[i]= document.getElementById("jiggle"+i)
         i++
      }
   }

   if (customcollect.length==1)
   {
      setInterval("jiggleit(0)",80)
   }
   else if (customcollect.length>1)
   {
      for (y=0;y<customcollect.length;y++)
      {
         var tempvariable='setInterval("jiggleit('+y+')",'+'100)'
         eval(tempvariable)
      }
   }

   return;
}

//------------------------------------------------------------------------------

window.onload=jiggle_init

//------------------------------------------------------------------------------

