What do you not understand about the examples you already found on the web? The general idea is that we help you to solve problems here, not write your code for you. If you try and fail then I'll be happy to help further but if I've pointed you in the right direction, I do expect that you'll try first.