I just bought BlitzPlus... Help, please!

BlitzPlus Forums/BlitzPlus Beginners Area/I just bought BlitzPlus... Help, please!

I made a code for the base of a program, and need help. It seems as though every time I close a tool window, I close the whole program. Could someone fix this code so that closing the window that comes up when you click File> New doesn't close the entire program. Here is the code:
------------------------------------------------------------
;program by Paul Herz

Global filename
filename="project2"

Window1=CreateWindow("Program",500,300,400,300)
SetMinWindowSize Window1,400,300
SetStatusText Window1,"©2008 ÆroBlu Software"

menu=WindowMenu(Window1)
file=CreateMenu("File",0,menu)

CreateMenu("New",1,file)
CreateMenu("Open",2,file)
CreateMenu("",0,file)
CreateMenu("Save",3,file)
CreateMenu("Save as...",4,file)
CreateMenu("",0,file)
CreateMenu("Quit",5,file)

Function newfilewindow()
file=CreateWindow("TEST",525,335,350,240,0,17)

End Function

UpdateWindowMenu Window1
;--->>MAIN<>LOOP<<---;
Repeat


id=WaitEvent()

If ID=$803 Then End

If ID=$1001 Then
EID=EventData()
Select EID
Case 1
newfilewindow()
Case 2
AppTitle("Open")
Notify("Open")

Case 3
AppTitle("Save")
Notify("Save")

Case 4
AppTitle("Save as...")
Notify("Save as...")

Case 5
AppTitle("Are You Sure?")
result=Confirm("Are You Sure You Want to Quit?",True)
If result=1 Then
End
Else
EndIf

End Select

EndIf

Forever

End