рабочий пример: http://kachay.ucoz.org/load/27-1-0-185
-------------------------------------------------
<a onclick=sorrta()>Sort_АЯ</a> | <a onclick=sorrtz()>Sort_ЯА</a><br>
<ul>
<li>Вася
<li>Петя
<li>Аня
<li>Юра
</ul> <script>
var myar= new Array();
var li1=document.getElementsByTagName('li');
function sorrta() {
for(var li2=0;li2<li1.length;li2++) {
myar[li2]=li1[li2].innerHTML;
}
myar.sort();
for(var li3=0;li3<myar.length;li3++) {
li1[li3].innerHTML=myar[li3];
}
}
function sorrtz() {
for(var li2=0;li2<li1.length;li2++) {
myar[li2]=li1[li2].innerHTML;
}
myar.sort();
myar.reverse();
for(var li3=0;li3<myar.length;li3++) {
li1[li3].innerHTML=myar[li3];
}
}
</script>