I know you can probably write this a little simpler (less code, that is, but maybe not more simpler looking):

EDIT....read your post incorrectly...will be right back......