window.onload = function() {
var div1 = document.getElementById('div1');
div1.onmouseover = function(){
startMove(this,400);
}
div1.onmouseout = function(){
startMove(this,200);
}
function startMove(obj, iTarget) {
clearInterval(obj.timer);
obj.timer = setInterval(
function() {
var speed = (iTarget-obj.offsetHeight)/3;
obj.style.height = obj.offsetHeight + speed + 'px';
obj.style.width = obj.offsetWidth + speed + 'px';
}, 30)
};
}