Note - not sure if it showed up properly, but there is a final } at the end of the pasted code - for some reason Gmail's tossed it in as part of the quoted text.
View entire thread