I found this little snippet of code floating around the Internet and despite its age, it still proves to be quite a handy little guy...