

 function turn_img(obj,direction){
      var w = obj.style.width;
      w = w.replace("px", "");
      w = parseInt(w);
      nr = obj.id;
      nr = nr.replace("obj", "");
      nr = parseInt(nr);
      
      //alert(w);
      if(w > 0 && direction > 0 ){
        w = w + ( direction * -1 );
        if(w < 0)w = 0;//alert(w);
        setTimeout("turn_img(" + obj.id + ", " + direction + ");", 30 );
      }else{
        if(w < 48){
          if(w == 0){
            direction = ( direction * -1 );
            //bild wechzeln
            
            obj.src = newimg[nr].src;
            
          }
          w = w + ( direction * -1 );
          if(w > 48)w = 48;//alert(w);
          setTimeout("turn_img(" + obj.id + ", " + direction + ");", 30 );
        }
      }
      
      obj.style.width = w + "px";
      
    }
    
    function start_turn(){
      for(i=1;i<21;i= i+10){
        setTimeout("run_turn(" + i + ");",(30*i));
      }
    }
    function run_turn(startnr){
      next = 0;
      for(n = startnr;n<startnr+10;n++){
        setTimeout("turn_img(obj" +n+ ",10 );",(150*next));
        next++;
      }
    }
   
    
    
