Function WindowExists()

Returns true if the window is open