Cross-browser JavaScript