I remember a script that does exactly what you need from my old scripting HTML days. I'll try to find it.
Meanwhile
www.webmonkey.com has always been my no.1 resource for scripting and HTML and I've never been disappointed by them.
ADD] Found that script from back then. Howeverthe site has grown and is not free anymore. Sorry
[ 09-09-2003, 04:55 AM: Message edited by: Faceman ]