Prototype has a very useful function which is not well documented, Element.inset. Element.insert is a very powerful prototype function which lets you insert a element in one of 4 positions, before, after, top, bottom of an element.
If we wanted to insert an element after a element we would use this code:
Expanding this further:
Where hook is the element we want before our created element
This code will add our Hello World text after the div with the id of hook.