scusate se domando ancora ma sarò scemo, ma non sono riuscito ad adeguare la tua funzione al codice che già avevo

ho fatto cosi dove $ è la funzione getelementbyid:
Codice PHP:
  var timer false;
  function 
setval(x,fx){
        var 
m=(x<fx)?1:-1;
        
x=x+((2+(((fx-x)/4)*m))/(2*0.8))*m;
        if((
m>&& x>fx)||(m<&& x<fx)) x=fx;
       return 
x;
    }
      
  function 
setH(arriva){
      
//altezza del frame in questo momento
    
var iframeH = $('content').style.height;
    
setval(parseInt(iframeH),arriva);    
    var 
fine iframeH h+'px';
        
    if(
h!=arriva){
      
timer setTimeout("setH("+arriva+")"50);
    }
  }
    
  function 
iframescroll(){
    var 
contentH 500;
    
/*$('content').contentWindow.document.body.scrollHeight;*/
    
if(timerclearTimeout(timer);
    
setH(contentH);
  } 
<iframe style="height:10px; width:100%;" id="content" name="iframe" onLoad="iframescroll();" src="forum.php"
scrolling="no" frameborder="0" height="1" allowtransparency="true">Il tuo Browser non supporta gli iframe.</iframe>

non so' come mai ma non riesco a farlo andare!!