Crossbrowser DOM helper