Ok, this is what you need, but what is the question?
Pheraps are you expecting someone to give you the full source code?
If this is the matter, be aware that nobody will do your work for you! To get an answer on this forum you should follow these rules:
- make your own searches and try to make your assignment
- show an effort in coding
- post a detailed question about a single problem that you are experiencing: describe what you are trying to do, add a code snippet of significant lines, describe why they doesn't work as you expected