Thanx for all your help everyone and sorry about the spelling. I would code in in C but i havent got the hang of it yet.