From time to time the question of using sidenotes rather than footnotes in OpenOffice arises. In case it may be of use, the following URL points to a JavaScript implementation for Adobe Indesign; how this might transfer to OpenOffice I cannot say. I have no time to work on it for the foreseeable future, but here it is for the curious.
The code is contained in sidenotes.zip, at the bottom of the note. The sidenotes.indd file in the archive is a sample file for testing under Indesign, so need not cause any concern; it could be substituted with an .odt file for testing. On the same page there are links to other sidenote discussions also for Adobe Indesign, which may also be of use.
http://www.kahrel.plus.com/indesign/sidenotes.html