alert at close and window draggable