// JavaScript Document
function animate(obj, interval) {
 obj.velocity += 0.03;
 obj.step += obj.velocity;
 if ( obj.step >= 1.0 )
 {
 obj.step = 1.0;
 if ( Math.abs(obj.velocity) < 0.05 )
 clearInterval(interval);
 else
 obj.velocity = obj.velocity*-0.7;
 }
 obj.style.top = parseInt(-25+25*obj.step)+"px";
}

function bounce(element) {
 var elm = document.getElementById(element);
 var elm_interval;
 elm.step = 0;
 elm.velocity = 0.01;
 setTimeout(function() {elm_interval = setInterval(function(){animate(elm, elm_interval);}, 50);},1000);
}
