Thanks to everyone who replied, in particular shawn, its now working! and I'm a little wiser