I wonder if it would be nice to put this into a javascript file. Seems it would be nice to remove the pattern of inline javascript as it is heavily frowned upon. If you need any help with this let me know and I can help out.