function init() { 

  if(document.getElementById && document.createTextNode) { 
    var menu = document.getElementById('menu'); 
    var anchors = menu.getElementsByTagName('a'); 
    for(var i=0, length=anchors.length;i<length;i++) { 
      anchors[i].onmouseover= function() { 
        var spot = -1; 
        this.setAttribute('spot', spot); 
        this.style.backgroundPosition= '15px 0px'; 
      } 
      anchors[i].onmouseout= function() { 
        var spot = 15; 
        this.setAttribute('spot', spot); 
      } 
    } 
    animate(); 
  } 
} 

function animate() { 
  var menu = document.getElementById('menu'); 
  var anchors = menu.getElementsByTagName('a'); 


  for(var i=0, length=anchors.length;i<length;i++) { 
    var spot = anchors[i].getAttribute('spot'); 
    if (spot>0) { 
      spot = spot - 2; 
      if(spot<0) spot = 0; 
      anchors[i].style.backgroundPosition= spot+'px 0px'; 
      anchors[i].setAttribute('spot', spot); 
    } 
  } 

  setTimeout(animate, 4); 
} 
window.onload=init;