var i = 1; var num = 0.1; var j = 20; var nums = -17; function Jump(){ if(num>0){ num = num + (i*0.1); }else{ num = num - (i*0.1); } num = 0-num; var a = document.getElementById("test"); a.innerHTML ="" i++; if(i0){ nums = nums - (j*0.1); }else{ nums = nums + (j*0.1); } nums = 0-nums; var a = document.getElementById("test"); a.innerHTML ="" j--; if(j>1){ document.onload = setTimeout("Jumps()",500); } } document.onload = setTimeout("Jump()",3000);