You could chop the thermometer into pieces and fit them into a table so that you have one TD for the middle bar (the bit that moves up and down)
Then you make two images, one white and one blue, of one pixel high, and the width of the bar itself.
Then you print the bar, and in the center cell you print the two images. For thw white image you force the height to the "empty" height of the bar, and for the blue you enter the height that the thermometer should indicate.
This is just a fast hack, it would be nicer (but slower)
to make an image of the thermometer, load that into a GD image, draw the center bar over the image, and print the GD image back to the browser.
but like I said, this is probably not something you want to do for every pageview, but you could use it to create a new image every time the values change.