I found the solution online.

http://www.west-wind.com/weblog/posts/581253.aspx