getElementsByClassName
if(!Element.prototype.hasOwnProperty("getElementsByClassName")){ Element.prototype.getElementsByClassName = function(className,tag){ tag = tag ? tag : "*"; var elements = [],childNodes = this.getElementsByTagName(tag); for(var i=0,length=childNodes.length;i0 && childNodes[i].className.indexOf(className)!=-1){ elements[elements.length] = childNodes[i]; } } return elements; }}