var debugMode = false; //var debugMode = true; function findElementWithAttribute(tagName, attributeName, attributeValue){ var tags = document.getElementsByTagName(tagName); var attribs = null; for (var i = 0; i < tags.length; i++) { attribs = tags[i].attributes; for (j=0; j