Wow that makes more sense now, I thought it looked messy but was not sure as i only know html css etc, this sort of code baffles me most of the time so i try to avoid it.
The code you are looking at was downloaded and was released in 2002 if that makes a difference to some of the variables etc.
I have to say thankyou again for the help as I am an extreme novice, I'll try working with your suggestions and see how it go's.
cheers Nathan.