Tested to work in Safari 1.2, IE5.0+, Mozilla 0.9.9+, Opera 7+; much credit to mmmbeer on #javascript for the cleanliness.