Changing colour of borderBottom on top location address
<p>I'm making a very basic menu for my site and I have used the border-bottom property to underline the items. What I want is to highlight the underline pink if you're on a certain page. I've used custom "url" elements and "link" attributes. I would like it so if the user is on page1 the page1 item would underline pink. Here's what I've tried so far:</p>

<pre><code>&lt;script&gt;
function col(){if(top.location.href==document.getElementsByTagName("url")[1].link){this.style.borderBottom="solid #F05";};}
&lt;/script&gt;
</code></pre>

<p>^ That was completely wrong, I was testing with a bit of code from W3Schools.
I also tried:</p>

<pre><code>&lt;script&gt;
function menuCol(url){if(top.location == url){this.style.borderBottom="solid #F05";};}
&lt;/script&gt;
</code></pre>

<p>^ This one worked but I had to include "[PAGE NO]" on every page so the script could match the IDs of the page and URL element.</p>

<p>Does anyone know how I can actually make this work without having to put in pageID tags in?</p>

<p>----- Edit -----
Sorry, I'm not exactly sure how to put the problem into words but here's the page and source code (currently):</p>

<p><a href="http://3659905.webs.com/ExternalPages/Desktop/Menubar_test.htm" rel="nofollow">http://3659905.webs.com/ExternalPages/Desktop/Menubar_test.htm</a></p>

<pre><code>&lt;head&gt;
&lt;title&gt;Menu&lt;/title&gt;

&lt;noframes&gt;&lt;/noframes&gt;&lt;noscript&gt;&lt;/noscript&gt;&lt;!-- --&gt;&lt;script type="text/javascript" src="http://www.freewebs.com/p.js"&gt;&lt;/script&gt;&lt;script&gt;&lt;/script&gt;

&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;script language="JavaScript" src="http://images.freewebs.com/JS/Freebar/bar_sidegrey.js"&gt;&lt;/script&gt;

&lt;script&gt;
$(document).ready(function(){
$("url").click(function(){
top.location.href="http://"+$(this).attr("link")
});
});
&lt;/script&gt;

&lt;script&gt;
function col(){if(top.location.href==document.getElementsByTagName("url")[1].link){this.style.borderBottom="solid #F05";};}
&lt;/script&gt;

&lt;style&gt;
url{text-decoration:none;font-size:15px;padding:3px;border-bottom:solid #AAA;}
url:hover{cursor:pointer;border-bottom:solid #FFF}

body{background:black;color:white;font-family:arial;cursor:default;}
&lt;/style&gt;
&lt;/head&gt;



&lt;body onselectstart="return false;" oncontextmenu="return false;" onload="col();"&gt;
&lt;center&gt;

&lt;url link="3s.uk.to"&gt;Home&lt;/url&gt;
&lt;url link="3apps.uk.to"&gt;App Store&lt;/url&gt;
&lt;url link="3659905.webs.com/ExternalPages/Desktop/Menubar_test.htm"&gt;Menu Test&lt;/url&gt;

&lt;/center&gt;
&lt;/body&gt;
</code></pre>
