changed onbeforeunload to null for viewing interface