I hate IE6, in fact I wish microsoft would force out a patch that killed the damn thing stone dead. The following script works fine in IE > 6 & FF,WebKit(chrome etal) without issue; any ideas?
(function getElementsByClass(searchClass) {
node = document;
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
var count = 1;
for (i = 0, j = 0; i < elsLen; i++) {
if ( pattern.test(els[i].className) ) {
var re1='.*?'; // Non-greedy match on filler
var re2='(\\\'.*?\\\')'; // Single Quote String 1
var p = new RegExp(re1+re2,["i"]);
var m = p.exec(els[i].getAttribute("onclick"));
var popURL = "";
if (m != null)
{
var strng1=m[1];
popURL = strng1.replace(/'/g,'');
}
els[i].setAttribute("href", popURL + "?keepthis=true&tb_iframe=true&height=430&width=400");
els[i].setAttribute("class", "thickbox");
els[i].removeAttribute("onclick");
j++;
count++;
}
}
// return count; Ignore the return
})("vtthickbox");