<script language="JavaScript" type="text/javascript">
var id_old;
function bg_click(id) {
if (id_old != id) {
document.getElementById(id).style.backgroundColor = "#00FF00";
if (id_old) document.getElementById(id_old).style.backgroundColor = "";
id_old = id;
}
}
</script>
<a href="#" id="a1" onclick="bg_click(this.id);return false">111111</a>
<a href="#" id="a2" onclick="bg_click(this.id);return false">222222</a>
<a href="#" id="a3" onclick="bg_click(this.id);return false">333333</a>
<a href="#" id="a4" onclick="bg_click(this.id);return false">444444</a>