function Buttons_T(sender,obj_id)
   ButtonTreatment(obj_id,10001,10002,10003,CloseBtnX,CloseBtnY,CloseWidth,CloseHeight,sender,"john_house",true)
   ButtonTreatment(obj_id,10021,10022,10023,HelpBtnX,HelpBtnY,HelpWidth,HelpHeight,sender,"john_house",true,317,200,150)
   if skip then
    ButtonTreatment(obj_id,10011,10012,10013,SkipBtnX,SkipBtnY,111,31,sender,"john_house",true)
   end;  
end; 

function gameinput (sender,obj_id,attachedID)    
CursorTreatment(obj_id,sender,attachedID); 
Buttons_T(sender,obj_id)   

  if sender == 33 then
  if obj_id==7777778 then
  del_object_from_game(7777778)
  Block_Show_Cur(false)
  return;end;  
  return;end;
  if sender == 30 then
      DeleteResource("kukufka2");
      DeleteResource("kukufka3");
      DeleteResource("kukufka_all");       
      DeleteResource("kukufka6");         
    setcurentleaf("john_house",11,0);    
    Block_Show_Cur(false);
    if flags.kukufka then
      StopEmiter("statuj");
      ActivateObject(11,false);
      ActivateObject(12,false);
      Set_Anim_Cur(11,3);
      Set_Anim_Cur(12,3);
    end;
  return;end;
  
  if sender==16 then
    if obj_id==10 then
        direction="left"
        speciale_action(2,10,true,0.3)
        speciale_action(2,12,true,0.4)    
    return;end;

    if obj_id==11 then
        direction="right"
        speciale_action(2,11,true,0.3)
        speciale_action(2,12,true,0.4)    
    return;end;
    
    if obj_id==12 then
        counter=counter+1;
        if counter>=3 then
            ActivateObject(12,true);
            kekuk=true;
            WaitRender()
        
        return;end;
        if direction=="left" then
            speciale_action(2,11,true,0.4)
            speciale_action(2,12,true,0.3)
        return;end;
        if direction=="right" then
            speciale_action(2,10,true,0.4)
            speciale_action(2,12,true,0.3)            
        return;end;        
    return;end;    
  return;end;
  
  
  if sender==50 then
        Block_Show_Cur(true);
      StartTimer(8882,1);
  return;end;
  
  if sender == 1 then

    if obj_id == 12 then
      if attachedID ~= -1 then
        RemObjFromMouse()
      end;    
       flags.kukufka = true;
      StoreObj(obj.kekuk.id,12,"65",335,360,"kluch1",317,223)
    return; end;
  return ;end;
  
  if sender == 100 then
    if kekuk then
        kekuk=false
        Set_Anim_Cur(12,4)
    return;end;
    if from4asiki then
    from4asiki=false
    SetAlfa(7777778,1,0,0.5)
end;    
    StartTimer(88811,1);
  return; end;
  
  if sender == 36 then
    if obj_id == 88811 then
      Block_Show_Cur(false);
      speciale_action(2,4,true);
      playeffect("kuku")
      speciale_action(2,10,true,0.4)
    return; end;
    if obj_id == 8882 then
     
      clear_satelite_leaf("john_house");
    return; end;
  return; end;
end
function SheetSwitched(nCount)
end;