
ScrollStatus = new Array();

var agt = navigator.userAgent.toLowerCase();
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));

function scrollup( the_div ) { 
     var tag;	
     if ( ScrollStatus[the_div]["Counter"] > 1) {
          ScrollStatus[the_div]["is_in_progress"] = 1;
          ScrollStatus[the_div]["Counter"]--;
          ScrollStatus[the_div]["Counter"]--;

          document.getElementById(the_div).style.height = ScrollStatus[the_div]["Counter"]+'px'; 

          tag = "scrollup('"+the_div+"')";
          aktiv = window.setTimeout(tag,1); 
         }
     else {
          ScrollStatus[the_div]["is_in_progress"] = 0;
         }
    } 

function scrolldown( the_div ) {
     var tag;	
     if ( ScrollStatus[the_div]["Counter"] < ScrollStatus[the_div]["num_pixel"]) {
          ScrollStatus[the_div]["is_in_progress"] = 1;
          ScrollStatus[the_div]["Counter"]++;
          ScrollStatus[the_div]["Counter"]++;

          document.getElementById(the_div).style.height = ScrollStatus[the_div]["Counter"]+'px'; 
	
          tag = "scrolldown('"+the_div+"')";
          aktiv = window.setTimeout(tag,1); 
         }
     else {
          ScrollStatus[the_div]["is_in_progress"] = 0;
         }
    } 

function inverseScrollStatus( the_div, num_pixel ) {
     if (!ScrollStatus[the_div]) {
          ScrollStatus[the_div] = new Array();
          ScrollStatus[the_div]["Counter"] = 0;
          ScrollStatus[the_div]["is_in_progress"] = 0;
          ScrollStatus[the_div]["num_pixel"] = num_pixel;
	}
     if (ScrollStatus[the_div]["is_in_progress"] == 0 && ScrollStatus[the_div]["Counter"] < 10) {
          scrolldown( the_div );
         }
     else if (ScrollStatus[the_div]["is_in_progress"] == 0 && ScrollStatus[the_div]["Counter"] > 10) {
          if (!is_ie){
               scrollup( the_div );
	      }
         }
    }

