
var i;
	function updateList(){
  
  if(isRunning) {
		showLoad(1500);
    
        newpost = unescape(agent.call("","live",""));
        
        if( newpost.length>100) {
          
	        for( i=28; i>0; i-- ) document.getElementById('item'+(i+1).toString()).innerHTML=document.getElementById('item'+i.toString()).innerHTML;
            window.setTimeout("fillDiv('"+escape(newpost)+"')",0);
        }
        window.setTimeout("updateList()",3000);
       /* new Effect.Highlight("item1");*/
        
        document.getElementById('item1').style.visible = "none";
        }
    }

    function fillDiv(content){
	        document.getElementById('item1').innerHTML=unescape(content);
	        window.setTimeout("swoosh(0)",0);
	}

    function swoosh(fader){
    	 fader =fader+0.3;
       document.getElementById('item1').style.opacity=fader.toString(); 
       if( fader<1 ) window.setTimeout("swoosh("+fader+")",88);
      
    }
    
    function swoosh_n(fader, item){
    	 fader =fader+0.3;
       document.getElementById("item"+i+"").style.opacity=fader.toString(); 
       if( fader<1 ) window.setTimeout("swoosh_n("+fader+", "+i+")",88);
      
    }
    
     function swoosh_list(fader, item){
    	 fader =fader+0.3;
       document.getElementById("item"+i+"").style.opacity=fader.toString(); 
       if( fader<1 ) window.setTimeout("swoosh_n("+fader+", "+i+")",88);
      
    }
    
    function start() {
    
      for( i=28; i>0; i-- ) {
      setTimeout(new Effect.Appear('item'+(i)), 200);
         setTimeout(new Effect.Appear('item'+(i+1)), 200);
      }
    
    
    }
    
     function showLoad(time){
        new Effect.Appear("loadingGFX");
        window.setTimeout("hideLoad()",time);
    }
    
     function hideLoad(){
         new Effect.Fade("loadingGFX");
    }
    
    function startUpdate() {
    start();
    isRunning = true;
    document.getElementById('stop').style.display = "inline";
     document.getElementById('play').style.display = "none";
    window.setTimeout('updateList()',2000);
    }
    
    function stopUpdate() {
    if(isRunning) {
    document.getElementById('play').style.display = "inline";
    document.getElementById('stop').style.display = "none";
    isRunning = false;
    }
    }
    
    