Guess you are using some C# methods to access the HTML DOM. Would be useful to know which library you are using (is that built into .Net?). Anyway, I imagine this explains why it isn't working:
http://www.webmasterworld.com/javascript/3090396.htmBasically, you should use "obj.className" rather than "obj.getattribute('className')". Not sure if there is a corresponding function on whatever class "hElement" is. If not, then perhaps you can call a JavaScript function that just returns the result of "obj.className". You'd embed that JavaScript function in the HTML page you are calling, then call that JavaScript function from C# (again, I'd have to know what library you are using).