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("mostik2");
      DeleteResource("mostik3");
      DeleteResource("mostik4");     
      DeleteResource("mostik5");
      DeleteResource("mostik6");     
      DeleteResource("mostik7");     
      DeleteResource("mostik8");     
    setcurentleaf("parom",9,0);    
    Block_Show_Cur(false);
    if flags.mostik then
      neighbors.john_house.lock = false;
      CreatePlashechka(900000,"3043")
      neighbors.chulan.lock = false;
      neighbors_func("john_house")
      speciale_action(2,10);
      speciale_action(2,8);
      StopEmiter("mostik");
    end;
  return;end;
  
  if sender == 1 then
    
    if obj_id == 8 then
      if obj.verev ~= nil and attachedID == obj.verev.id then
        RemObjFromMouse()
        UnStoreObj(attachedID);
        flags.prim_verevka = true;
        playeffect("verevka") 
        speciale_action(2,8,true,2.5);
        speciale_action(2,7,true,2.5);
        Set_Anim_Cur(7,4)
        CreatePlashechka(900000,"194")
      return; end;
      if attachedID~=-1 and ((obj.verev~=nil and attachedID ~= obj.verev.id) or (obj.verev==nil ))  then
        RemObjFromMouse()
        CreatePlashechka(900000,"1000")
      return;end;    
        CreatePlashechka(900000,"121")      
    return; end;
    
    if obj_id == 7 then
        if obj.dosk ~= nil and attachedID == obj.dosk.id then
          RemObjFromMouse()
          UnStoreObj(attachedID);
          playeffect("krepim") 
          speciale_action(2,5,true,2.5);
          Block_Show_Cur(true);
           flags.mostik = true;
          StartTimer(8882,3);
        return; end;
          if attachedID~=-1 and ((obj.dosk~=nil and attachedID ~= obj.dosk.id) or (obj.dosk==nil ))  then
            RemObjFromMouse()
            CreatePlashechka(900000,"1000")
          return;end;      
    CreatePlashechka(900000,"195")          
    return; end;
    
  return ;end;
  
  
  if sender == 36 then

    if obj_id == 8882 then
     
      Block_Show_Cur(false);
      clear_satelite_leaf("parom");
    return; end;
  return; end;
  
end
function SheetSwitched(nCount)
end;