Код:
<script type="text/javascript">
var we=document.getElementsByTagName("ul")
var x=0
for (x=0; x<=(we.length-1); x++)
{if (we[x].innerHTML.indexOf("pa-online")!=-1)
{we[x].getElementsByClassName('pa-online')[0].innerHTML = "<img src='Картинка ON' />"}
else if ((we[x].innerHTML.indexOf("pa-online")==-1)&&(we[x].innerHTML.indexOf("pa-author")!=-1)){
we[x].innerHTML=we[x].innerHTML+"<img src='Картинка OFF' />"}}
</script>