I was using class as a variable so I changed var class to var item_class.
Now it works in Netscape when it renders as Firefox but not when it renders as IE.
Now I get this message from IE7
Error: Object doesn't support this property or method
This is driving me crazy!