Added better compatability with multiple browsers