Prova questo fresco fresco
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Prova</title>
<style type="text/css">
#centro {
width: 500px;
/* START */
height:50px;
line-height:50px;
margin:0px auto;
border: thin solid #EAEAEA;
background-color: #393939;
color: #F9F9F9;
text-align: center;
}
</style>
<script type="text/javascript">
function allunga(start,stop,speed,el){
var startHeight= start;
var stopHeight= stop;
var timeoutID = window.setInterval(f, speed);
var self= el;
function f(){
if(stop>start){
start++;
var tmp= start;
self.style.height= tmp+'px';
}
else {
window.clearTimeout(timeoutID);
}
}
}
</script>
</head>
<body>
<div id="centro">
<a onclick="allunga(50,300,10,this.parentNode)">centro</a>
</div>
</body>
</html>