<script>
var timer1 = null;
var oDiv1 = document.getElementById("div1");
Move(oDiv1, timer1);
var timer2 = null;
var oDiv3 = document.getElementById("div3");
Move(oDiv3, timer2);
function Move(oDiv, timer) {
oDiv.onmouseover = function () {
if (oDiv.offsetHeight < 390) {
clearInterval(timer);
timer = window.setInterval(function () {
oDiv.style.height = (oDiv.offsetHeight + 10) + 'px';
if (oDiv.offsetHeight >= 400) {
clearInterval(timer);
}
}, 20);
}
};
oDiv.onmouseout = function () {
if (oDiv.offsetHeight > 50) {
clearInterval(timer);
timer = window.setInterval(function () {
oDiv.style.height = (oDiv.offsetHeight - 10) + 'px';
if (oDiv.offsetHeight <= 50) {
clearInterval(timer);
}
}, 20);
}
};
}
</script>