The syntax for setTimeout() is
Code:
setTimeout("yourfunction()", milliseconds);
So, I would try something like this:
Code:
function divSize()
{
var element = document.getElementById("expand");
if(hValue>0){
heightChange(element, hValue);
hValue = hValue - 1;
setTimeout("divSize()", 100);
}
}
You'll have to mess with that 100 milliseconds to see what works smoothly for you, but that should be about the implementation for what you want.