How about you write the script and if you get any problems, you post here. I doubt anyone here is just going to write you are script.

If thats what you want, go here.