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.
Comment on Re^4: Parsing un-encoded ampersand in XHTML
Gah! If you downloaded the program - and really don't want to bothered fighting with the appalling code - then I would suggest instead that you go grab The NMS Simple Search which will probably do what you want. (Plus we are happier to support it :)