Hi, I'm trying to create link that when a user clicks it, it will highlight the link with a bgcolor of blue, while when the user clicks on another link, the previous link will unhighlight and highlight the new link which was clicked.

What I've been trying had got me into this:

PHP Code:
<script language="JavaScript">
<!--

function 
highlight( )
{
    
undohighlight();
    
    var 
oObj event.srcElement;
    
oObj.style.color "#FFFFFF";
     
oObj.style.background "#000066";
}

function 
undohighlight()
{
     var 
i
     
for (013i++)
    {
           if(
i.style.color == "#FFFFFF")
     }
}
//-->
</script> 
Code:
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="body">
  <tr> 
    <td><img src="http://localhost/images/pic.gif"></td>
    <td><div onClick="highlight( );">Link 1</div></td>
  </tr>
  <tr> 
    <td><img src="http://localhost/images/pic.gif"></td>
    <td><div onClick="highlight( );">Link 2</div></td>
  </tr>
</table>
For this snippets, its working on the highlighting part, but I've no idea how to get the unhighlighting work.
I've done lots of search on google but no luck. Hope someone could help me here. Thanks in advanced.