var timer; var newval=0; var obj; var obj2; function showothers(){ document.getElementById("keymore1").style.display="none"; document.getElementById("keymore2").disabled=false; document.getElementById("keymore2").style.display=""; timer = setInterval('RunSlide()', 30); } function RunSlide(){ obj = document.getElementById("otherkeys"); obj2 = document.getElementById("otherkeys2"); newval += 5; obj.style.height = newval+'px'; if (newval >= 80){ clearInterval(timer); timer = null; obj2.style.display = ''; document.getElementById("keymore2").disabled=true; } } function closeothers(){ document.getElementById("keymore1").disabled=false; document.getElementById("keymore1").style.display=""; document.getElementById("keymore2").style.display="none"; timer2 = setInterval('RunSlide2()', 30); } function RunSlide2(){ obj = document.getElementById("otherkeys"); obj2 = document.getElementById("otherkeys2"); obj2.style.display = 'none'; newval -= 5; obj.style.height = newval+'px'; if (newval <= 0){ clearInterval(timer2); timer = null; document.getElementById("keymore1").disabled=true; } }