Template:ETHZ Basel10

From 2010.igem.org

(Difference between revisions)
Line 1: Line 1:
__NOTOC__
__NOTOC__
<html>
<html>
-
<script type="text/javascript">
 
-
function getURL(hrefString)
 
-
{
 
-
var arr = hrefString.split('/');
 
-
return  (arr.length<2) ? hrefString : arr[arr.length-2].toLowerCase() + arr[arr.length-1].toLowerCase();             
 
-
}
 
-
 
-
function setCurrentLink(arr, crtPage)
 
-
{
 
-
for (var i=0; i<arr.length; i++)
 
-
{
 
-
if(getURL(arr[i].href) == crtPage)
 
-
{
 
-
if (arr[i].parentNode.tagName != "DIV")
 
-
{
 
-
arr[i].className = "current";
 
-
arr[i].parentNode.className = "current";
 
-
}
 
-
}
 
-
}
 
-
}
 
-
 
-
function setPage()
 
-
{
 
-
hrefString = document.location.href ? document.location.href : document.location;
 
-
 
-
if (document.getElementById("ethzheader")!=null)
 
-
setCurrentLink(document.getElementById("ethzheader").getElementsByTagName("a"), getURL(hrefString));
 
-
}
 
-
</script>
 
<style type="text/css">
<style type="text/css">
#content
#content
Line 118: Line 88:
padding-right: 2px;
padding-right: 2px;
padding-left: 2px;
padding-left: 2px;
-
}
 
-
 
-
html, body {
 
-
margin: 0;
 
-
padding: 0;
 
}
}
Line 218: Line 183:
<script language="javascript">setPage()</script>  
<script language="javascript">setPage()</script>  
</div>
</div>
 +
<div id="body">
</html>
</html>

Revision as of 20:04, 6 September 2010