Don't let the <script> tags bite
Web Bugs
Protecting Databases and document.cookie
O'Reilly
By: Robert Tables