this is not css menu writer code, nor is it valid.
a ul tag must contain li elements.
and the span tag should go around the anchor:
there are no LI elements here:
<ul>
<a href="{SITEURL}index.php?sort=3" rel="3"><span>{L_a004}</span></a>
<a href="{SITEURL}index.php?sort=0" rel="0"><span>{L_a001}</span></a>
<a href="{SITEURL}index.php?sort=4" rel="4"><span>{L_a005}</span></a>
<a href="{SITEURL}index.php?sort=2" rel="2"><span>{L_a003}</span></a>
<a href="{SITEURL}index.php?sort=5" rel="5"><span>{L_a006}</span></a>
<a href="{SITEURL}index.php?sort=1" rel="1"><span>{L_a002}</span></a>
</ul>
each a tag should be inside an li tag, for example:
<li><span><a href="{SITEURL}index.php?sort=3" rel="3">{L_a004}</a></span></li>