Please post your code. It's usually easier to fix up a code that you've already got than to make one from scratch. Plus by working with your code, we can show what chnages were made and why.

P.S.: Don't forget to use the Code tags