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

function gameinput (sender,obj_id,attachedID)  
Buttons_T(sender,obj_id)
CursorTreatment(obj_id,sender,attachedID);   
  if sender == 30 then
      DeleteResource("provoda_2");
      DeleteResource("provoda_b1");
      DeleteResource("provoda_b2");
      DeleteResource("provoda_7");  
    setcurentleaf("electro",19,0);    
    Block_Show_Cur(false);
    set_visible_object(202,false)
    if flags.provoda_inelectro then
       speciale_action(2,202)
    end;  
    if flags.soed_provod then
      StopEmiter("jama");
      speciale_action(2,202)
      set_visible_object(2,true)
      speciale_action(2,14);
      speciale_action(2,3)
      Set_Anim_Cur(3,2);  
      CreatePlashechka(900000,"3035")
      AddParticleToObject(3,"shitok",892,112);
      MoveEmiter("shitok",892,112);
      StartEmiter("shitok");
      StopEmiter("iskri");
    end;
  return;end;
  
  if sender == 1 then

    if obj_id == 7 then
      if obj.shnrk ~= nil and attachedID == obj.shnrk.id then
        RemObjFromMouse()
        UnStoreObj(attachedID);
        speciale_action(2,6,true);
        speciale_action(2,7,true);
        Set_Anim_Cur(7,3)
        Set_Anim_Cur(6,4)
        playeffect("shoroh")
        flags.provoda_inelectro=true;
      return; end;
      if attachedID~=-1 and ((obj.shnrk~=nil and attachedID ~= obj.shnrk.id) or (obj.shnrk==nil )) then
            RemObjFromMouse()
            CreatePlashechka(900000,"1000")
      return;end;          
      CreatePlashechka(900000,"470")
    return; end;
    if obj_id == 6 then
      if obj.izole ~= nil and attachedID == obj.izole.id then
        RemObjFromMouse()
        UnStoreObj(attachedID);
        Block_Show_Cur(true);
        playeffect("shoroh")
          flags.soed_provod = true; 
        speciale_action(2,5,true);
        speciale_action(2,6,true);
      return; end;
      if attachedID~=-1 and ((obj.izole~=nil and attachedID ~= obj.izole.id) or (obj.izole==nil )) then
            RemObjFromMouse()
            CreatePlashechka(900000,"1000")
      return;end;
    CreatePlashechka(900000,"1003")      
    return; end;
  return ;end;
  
  if sender == 16 then
    if obj_id == 5 then
      speciale_action(2,4,true);
      speciale_action(2,5,true);
    return; end;
    if obj_id == 4 then
      StartTimer(8883,1.5);
    return; end;
  return; end;
  
  if sender == 15 then
    if obj_id == 7 then
      CreatePlashechka(900000,"471")
    return; end;
  return; end;
  
  
  if sender == 36 then
    if obj_id == 8883 then
    
      clear_satelite_leaf("electro");
    return; end;
  return; end;
  
end
function SheetSwitched(nCount)
end;