Grabbed a couple scripts from http://answers.google.com//threadview?id=29290