function(){var i,x; for 
(i=0;x=document.links[i];++i)x.style.color=[&quot;blue&quot;,&quot;red&quot;,&quot;green&quot;][sim(x,location)]; 
function sim(a,b) { if (a.hostname!=b.hostname) return 0; if (fixPath(a.pathname)!=fixPath(b.pathname) || a.search!=b.search) return 1; return 2; } 
function fixPath(p){ p = (p.charAt(0)==&quot;/&quot; ? &quot;&quot; : &quot;/&quot;) + p;/*many browsers*/ p=p.split(&quot;?&quot;)[0];/*opera*/ return p; } })