begin
LM_Initialize;
repeat
if (mode <> 'create') and (mode <> 'load') and (listload = false) then begin
repeat
clrscr_display;
Menu_Main_Mouse;
command_main;
until (mode = 'create') or (mode = 'load') or (mode = 'quit');
end;
if listload = true then begin
repeat
clrscr_display;
gotoxy(2,2);
menu_load_mouse;
command_load;
until (mode = 'quit') or (mode = 'load') or (mode = 'play') or (mode = 'list');
end;
if (mode = 'create') and (listload = false) then Create_Playlist;
if mode = 'load' then Load_Playlist;
if (mode = 'play') and (listload = true) then Play_Playlist;
if mode = 'quit' then cmd := 'quit';
if (mode = 'list') and (listload = true) then ListItems;
until cmd = 'quit';
LM_Quit;
end.