The current script is 465 lines so I don't really want to copy it here and take up so much space. I did post it for download here (opens new window)