Node.insertBefore()

var hr = document.createElement("hr");
hr.style.borderColor="#000";
var body=document.getElementsByTagName("body")[0];
body.insertBefore(hr,body.childNodes[2]);

Node.insertBefore - MDN