JavaScript DOM insertion module