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

function gameinput (sender,obj_id,attachedID)    
CursorTreatment(obj_id,sender,attachedID);
Buttons_T(sender,obj_id)
  if sender == 30 then
      DeleteResource("zavareno_2");
      DeleteResource("zavareno");    
      DeleteResource("zavareno_5");       
      DeleteResource("zavareno_8");    
    neighbors.electro.lock=false;      
    LoadLocation("electro");        
    setcurentleaf("koridor",15,0);    
    Block_Show_Cur(false);
    if flags.zavareno then
      CreatePlashechka(900000,"3048")
      StartEmiter("zavareno");
      speciale_action(2,13);
      speciale_action(2,8);
      ActivateObject(8,true);
      Set_Anim_Cur(8,14);      
    end;
  return;end;
  
  if sender == 1 then
    if obj_id == 9 then
      if obj.bolgar ~= nil and attachedID == obj.bolgar.id then
        RemObjFromMouse()
        UnStoreObj(attachedID);
        Block_Show_Cur(true);
        speciale_action(2,8,true,2.5);
         flags.zavareno = true;
          AddParticleToObject(9,"turbina",640,585);
          MoveEmiter("turbina",640,585);
          StartEmiter("turbina");    
         playeffect("turbinka")
      return; end;
      if attachedID~=-1 and ((obj.bolgar~=nil and attachedID ~= obj.bolgar.id) or (obj.bolgar==nil ))  then
        RemObjFromMouse()
        CreatePlashechka(900000,"1000")
      return;end;    
        CreatePlashechka(900000,"453")      
    return; end;
  return ;end;
  
  if sender == 16 then
    if obj_id == 8 then
      speciale_action(2,7,true,2.5);
      speciale_action(2,8,true,2.5);
    return; end;               
    if obj_id == 7 then        
      speciale_action(2,6,true,3);
      speciale_action(2,7,true,3);
    return; end;             
    if obj_id == 6 then      
      speciale_action(2,5,true,3);
      speciale_action(2,6,true,3);
    return; end;            
    if obj_id == 5 then    
      speciale_action(2,4,true,3);
      speciale_action(2,5,true,3);
     
      StopEmiter("turbina");    
      StartTimer(8882,1.5);
    return; end;
  return; end;
  
  
  if sender == 36 then
    if obj_id == 8882 then
      
      clear_satelite_leaf("koridor");
    return; end;
  return; end;
  


end
function SheetSwitched(nCount)
end;