Implimented SGWindow.Main