function Buttons_T(sender,obj_id)
    ButtonTreatment(obj_id,10001,10002,10003,CloseBtnX,CloseBtnY,34,34,sender,"parom",false) 
end; 

function gameinput (sender,obj_id,attachedID)    
Buttons_T(sender,obj_id)
CursorTreatment(obj_id,sender,attachedID); 
  if sender == 30 then
    DeleteResource("lebedka2");
    DeleteResource("lebedka4"); 
    DeleteResource("lebedka");          
    setcurentleaf("parom",9,0);    
    Block_Show_Cur(false);
    if flags.lebedka then
      speciale_action(2,19);
      speciale_action(2,17,true);
      speciale_action(2,18,true);
      ActivateObject(20,false);
      Set_Anim_Cur(20,3);
      playeffect("kanat")
      StopEmiter("lebedka");
      CreatePlashechka(900000,"3037")
    end;
  return;end;
  
  if sender==16 then
    if obj_id==10 then
        counter=counter+1;
        speciale_action(2,10,true,0.6)
        speciale_action(2,14,true,0.7)
    return;end;
    if obj_id==14 then
        speciale_action(2,14,true,0.6)
        speciale_action(2,13,true,0.7)    
    return;end;
    if obj_id==13 then
        speciale_action(2,13,true,0.6)
        speciale_action(2,12,true,0.7)    
    return;end;
    if obj_id==12 then
        speciale_action(2,12,true,0.6)
        speciale_action(2,11,true,0.7)    
    return;end;    
    if obj_id==11 then
       if counter<3 then
              speciale_action(2,11,true,0.6)
            speciale_action(2,10,true,0.7)
       return;end;
           StartTimer(8882,1);
    return;end;    
  return;end;
  
  if sender == 1 then
    
    if obj_id == 5 then
      if obj.rukja ~= nil and attachedID == obj.rukja.id then
        RemObjFromMouse()
        speciale_action(2,10,true,0.7)        
        UnStoreObj(obj.rukja.id);
        flags.lebedka = true; 
        Block_Show_Cur(true);
      return; end;
      if attachedID~=-1 and ((obj.rukja~=nil and attachedID ~= obj.rukja.id) or (obj.rukja==nil ))  then
        RemObjFromMouse()  
        CreatePlashechka(900000,"1000")
      return;end;      
      CreatePlashechka(900000,"120")
    return; end;
  return ;end;
  
  
  if sender == 36 then
    if obj_id == 8882 then
       
      clear_satelite_leaf("parom");
    return; end;
  return; end;


end
function SheetSwitched(nCount)
end;