function getText(hoo) {
var A= [], next, T, pa, i;
if (!hoo) return A;
if (hoo.nodeType== 3 && /\w+/.test(hoo.data)) A.push(hoo);
else if (hoo.hasChildNodes()){
pa= hoo.childNodes, i= 0;
while (pa[i]){
next= pa[i++];
T= next.nodeType;
if (T== 3) {
if (/\w+/.test(next.data)) A.push(next);
}
else if (T== 1) A=A.concat(arguments.callee(next));
}
}
return A;
}
function listSort(){
var U= document.getElementsByTagName('ul');
var L= U.length,tem,A;
while(L--){
U2= U[L];
if(U2.className== "cls_top_results"){
A= getText(U2);
A.sort(function(a,b){
a= a.data.toLowerCase().replace(/^ */g,'');
b= b.data.toLowerCase().replace(/^ */g,'');
if(a== b)return 0;
return a > b? 1 : -1;
})
}
while(A.length){
hoo= A.pop();
while(hoo && hoo.nodeName!= 'LI') hoo=hoo.parentNode;
if(hoo) U2.insertBefore(hoo,U2.firstChild);
}
}
}