Make sure that b object is not null and the className too.
moreover
Array.contains
is not a part ofjavascript array object, you should define an
array prototype
for it.
Array.contains[
^]
Try this code.
Sys.UI.DomElement.containsCssClass = function (b, a) {
var temp;
if (b != null || b != undefined)
if (b.className != null || b != undefined)
temp = b.className.split(" ");
return Array.contains(temp, a)