I need to put a span around the last two characters within a div.

The current structure looks like this:

```
<div id="price">3199</div>

```

I need to output something like this:

```
<div id="price">31<span id="smaller">99</span></div>

```

It's for a price in a dynamic HTML5 banner ad. I need the ability to format the final two characters smaller than the first two, but the integer from the dynamic feed is simply 3199 or 2099 etc. etc.

I've found some jQuery solutions but I need this to be plain JavaScript.

**[This fiddle](http://jsfiddle.net/arunpjohny/kF7LK/)** solves it well with jQuery, and I'm sure it doesn't need much tweaking to work without jQuery but my javascript skills can't quite crack it.