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

function gameinput (sender,obj_id,attachedID)    
Buttons_T(sender,obj_id)
CursorTreatment(obj_id,sender,attachedID);
  if sender == 30 then
      DeleteResource("vent");
      DeleteResource("ventil_police6");        
      DeleteResource("kartochka");  
    setcurentleaf("police",4,0);
    Block_Show_Cur(false);
    if flags.ventil then
      flags.help_plastik = true;
      speciale_action(2,42);
      ActivateObject(44,false);
      Set_Anim_Cur(44,3);
      StopEmiter("polka");
    end;
  return;end;
  
  
  if sender==50 then
      Block_Show_Cur(true);
      StartTimer(8881,0.5);  
  return;end;
  
  if sender == 1 then

    if obj_id == 4 then
      if obj.pinct ~= nil and attachedID == obj.pinct.id then
        RemObjFromMouse()
        UnStoreObj(attachedID);
        flags.card_access=true;
        Set_Anim_Cur(4,3);
        speciale_action(2,obj.krthc.id,true);
        speciale_action(2,4,true);        
        Set_Anim_Cur(obj.krthc.id,4);
      return; end;
      if attachedID~=-1 and ((obj.pinct~=nil and attachedID ~= obj.pinct.id) or (obj.pinct==nil ))  then
        RemObjFromMouse()
        CreatePlashechka(900000,"1000")
      return;end;    
    CreatePlashechka(900000,"182")      
    return; end;
    
    if obj_id == obj.krthc.id then
        RemObjFromMouse()
        playeffect("vizitka")
        flags.ventil = true;
        StoreObj(obj.krtch.id,obj_id,"125",335,350,"krta",291,239)        
    return; end;
    
  return ;end;
  
  if sender == 100 then

  return; end;
  
  if sender == 36 then

    if obj_id == 8881 then
      Block_Show_Cur(false);
      
      clear_satelite_leaf("police");      
    return; end;

  return; end;


end
function SheetSwitched(nCount)
end;