You are missing an EndIF on your If ($Sizexx... sections. Then place your NEXT at the end of each section, and it should work for you.
_________________________
Today is the tomorrow you worried about yesterday.