<ul id="gsTabsWDN" class="wdn_tabs disableSwitching">
<li><a href="index.shtml">Intro</a></li>
<li><a href="degrees.shtml">Degree Equivalency</a></li>
<li><a href="deadlines.shtml">Deadlines</a></li>
<li><a href="finances.shtml">Finances</a></li>
<li><a href="english.shtml">English Proficiency</a></li>
<li><a href="immigration.shtml">Immigration</a></li>
<li><a href="usa.shtml">Arriving in the US</a></li>
</ul>
<!--#include virtual="tabs.html" -->// Usage: <ul id="gsTabsWDN" class="wdn_tabs disableSwitching"><li><a href="foo.shtml">Foo</a></li></ul>
// Tab anchors must use "index.shtml" instead of "./" because WDN's components will trigger errors referencing "#./".
if (document.getElementById('gsTabsWDN')) {
var url = window.location.href; // IE returns relative URL as in html, Moz/FF/Saf/Opera return full/absolute URL.
if (url.substr(url.length-4)!="html") url="index.shtml"; // Can't use url.substr(-4) because IE returns the entire string.
var lis = document.getElementById('gsTabsWDN').getElementsByTagName('li');
for (i=0; i<lis.length; i++) {
anch = lis[i].getElementsByTagName('a')[0];
anch.innerHTML="<span>"+anch.innerHTML+"</span>";
href = anch.getAttribute("href"); // IE returns full/absolute URL, Moz/FF/Saf/Opera return relative URL as in html.
lis[i].className = (url.indexOf(href)>-1 || href.indexOf(url)>-1) ? "selected" : "";
}
}
Users browsing this forum: No registered users and 0 guests