pgo - I know, it's someone else's code, I'm going to fix it once I've sorted this out...
emil - thanks, that's beautiful. But there's still a 1px white line now...
And while I'm here I don't suppose anyone knows how to use WinSCP to delete files owned by "web" not "me" and without group write permissions?