Untested (on iphone) but maybe a float:right style in the img tag?

<script type="text/javascript">
...
bobexample.setStatus('<img src="open.png" style="float:right" /> ', '<img src="close.png"...