I've commented out the browser detection so that i can read the errors in FF function rephr() { //if(navigator.appVersion.indexOf('MSIE')>0) { var hrs = document.getElementsByTagName('HR'); for(var i = 0; i < hrs.length; i++) { var newdiv = document.createElement('div'); newdiv.className = "hr_replace"; creatediv = appendChild(newdiv); hrs[i].parentNode.replaceChild(creatediv, hrs[i]); } //} }