Simply copy and paste the following code inside an html page and run it from a browser (tested on IE & Mozilla).
If you want to see the live result (we believe this is the best way to learn what is the script about), try it here (new window).
Note: simply change the data according to your needs and the form.
Post the first comment now
or discuss about it at this address:
Forum - Javascript