Dear all,

I want to highlight first 10 nofollow links on my webpage and I am using the below javascript code

<script type="text/javascript">
function highlight()
{
var attr = document.getElementsByTagName("a")[0];
if (attr.getAttributeNode("rel").value=="nofollow")
{
attr.style.color = "#00a3cc";
}
}

function loop()
{
for (var i=0; i<=10; i++)
{
highlight();
}
}
</script>

It just work fine for the first nofollow link, rest remains unchanged, it means the loop is not working.
What needs to be modified? I'm calling loop() function on body load.

please help