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

function gameinput (sender,obj_id,attachedID)    
Buttons_T(sender,obj_id)
CursorTreatment(obj_id,sender,attachedID);
  if sender == 30 then
      DeleteResource("lab_rugje1");
      DeleteResource("lab_rugje2");   
      DeleteResource("lab_rugje5");
    setcurentleaf("laborator",2,0);
    if flags.lab_rugje then
      flags.help_dulo = true;
      speciale_action(2,15);
      Set_Anim_Cur(15,2);
    AddParticleToObject(15,"p2",148,34);
    MoveEmiter("p2",148,34);
    StartEmiter("p2");        
      CreatePlashechka(900040,"40")
      IfTableClose()
    end;
    Block_Show_Cur(false);
  return;end;
  
  if sender==8 and not flags.palochka then
    RemObjFromMouse()
    if pal then
        SetObjectPosition(55,2000,2000)
        speciale_action(2,5)
    end;
  end;
  
  if sender == 1 then

    if obj_id == 5 then
      speciale_action(2,5)
      Set_Anim_Cur(5,3);
      pal=true
      AddObjToMouse(55)
    return; end;
    if obj_id == 6 then
    if     attachedID == 55 then
      RemObjFromMouse()
      SetObjectPosition(55,2000,2000)
      Set_Anim_Cur(6,3);
      ActivateObject(6,false)
      speciale_action(2,4,true);
      Set_Anim_Cur(4,2);
      flags.palochka=true
     return;end;  
      if attachedID~=-1 and attachedID ~= 5 then
            RemObjFromMouse()
            CreatePlashechka(900000,"1000")
      return;end;     
       CreatePlashechka(900000,"607")      
    return; end;
    if obj_id == 4 then
      riss=true;
        flags.lab_rugje = true;
      Block_Show_Cur(true);
      StartTimer(8881,0.6);
    return; end;
  return ;end;
  
  if sender == 26 and obj_id==900040 then
    Block_Show_Cur(true);
    StartTimer(8881,0.6);
  return; end;
 
  if sender == 36 then
    if obj_id == 8881 then
      Block_Show_Cur(false);
    
      clear_satelite_leaf("laborator");
      UnStoreObj(obj.vint.id);
    return; end;
  return; end;
  

end
function SheetSwitched(nCount)
end;