More javascript fixes

Some hackish code to make the overlay not fade if there is another
dialog incoming