Added handling for before unload in anticipation of saving jsmol molecule orientation.