Avoid a javascript error on IE 8