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


function gameinput (sender,obj_id,attachedID)    
Buttons_T(sender,obj_id)
CursorTreatment(obj_id,sender,attachedID); 
  if sender == 30 then
    effect_jama = false;
      DeleteResource("jama3");
      DeleteResource("yama1");     
      DeleteResource("jama8");
      DeleteResource("yama2");
     setcurentleaf("mayor_yard",6,0);        
    if flags.jama then
      proval=true
      WaitRender()    
    return; end;

    Block_Show_Cur(false);

  return;end;
  
  if sender == 100 then
    neighbors.secret_room.lock=false;
  return; end;
  
  if sender == 16 then
  
       if obj_id==12 then
        if counter<3 then
        speciale_action(2,obj_id,true,0.7);
        speciale_action(2,15,true,1);
        return;end;
      return;end; 
  
      if obj_id==15 then
        counter=counter+1;
        playeffect("kopaem")
        speciale_action(2,15,true,0.7);
        speciale_action(2,14,true,1);
      return;end;

      if obj_id==14 then
        speciale_action(2,14,true,0.7);
        speciale_action(2,13,true,1);
      return;end;

      if obj_id==13 then
        if counter==1 then
            speciale_action(2,13,true,0.7);
            speciale_action(2,12,true,1);
            speciale_action(2,11,true,1);
            speciale_action(2,17,true,1);
        return;end;
        if counter==2 then
            speciale_action(2,13,true,0.7);
            speciale_action(2,12,true,1);
            speciale_action(2,10,true,1);
            speciale_action(2,16,true,1);
        return;end;        
        if counter==3 then
            speciale_action(2,13,true,0.7);
            speciale_action(2,12,true,1);
            speciale_action(2,18,true,1);
        StartTimer(8882,0.5);
        return;end;            
      return;end;      

  return; end;
  
  if sender == 1 then

    
    if obj_id == 7 then
      if obj.lopat ~= nil and attachedID == obj.lopat.id then
        RemObjFromMouse()
        UnStoreObj(attachedID);
        speciale_action(2,15,true,1);
        Block_Show_Cur(true);
      return; end;
      if attachedID~=-1 and ((obj.lopat~=nil and attachedID ~= obj.lopat.id) or (obj.lopat==nil ))  then
        RemObjFromMouse()
        CreatePlashechka(900000,"1000")
      return;end;    
    CreatePlashechka(900000,"112")      
    return; end;

  return ;end;
  
  if sender == 36 then

    if obj_id == 8882 then
      flags.jama = true;
      ShowMenu(false);
      AddGlobalFade(99999999,0);
      speciale_action(4,99999999)
      SetAlfa(99999999,0,1,0.3)      
      StartTimer(888100,1);
    return; end;
    if obj_id == 888100 then
      clear_satelite_leaf("mayor_yard");
    return; end;
  return; end;

   
end
function SheetSwitched(nCount)
end;