--
theAnchorText = spans[i].innerHTML;
theTitle = spans[i].title.toLowerCase().replace(/^\s+|\s+$/g,"");
theURL = theTitle ;
spans[i].innerHTML = '<a href="' + theURL + '" class="' + spans[i].className + '">' + theAnchorText + '</a>';
spans[i].removeAttribute('title');
++
var a = document.createElement('a');
a.href = spans[i].title.toLowerCase().replace(/^\s+|\s+$/g,"");
a.className = spans[i].className;
while(span[i].hasChildNodes()) a.appendChild(span[i].firstChild);
span[i].parentNode.replaceChild(a, span[i]);