From 2010.igem.org
(Difference between revisions)
|
|
Line 1: |
Line 1: |
| <html> | | <html> |
| <head> | | <head> |
- | <script type="text/javascript"> | + | <script type="text/javascript" src="https://static.igem.org/mediawiki/2010/8/89/ETHZ_Basel10_js.txt"></script> |
- | 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("subnavigation")!=null)
| + | |
- | setCurrentLink(document.getElementById("subnavigation").getElementsByTagName("a"), getURL(hrefString));
| + | |
- | }
| + | |
- | </script> | + | |
| <style type="text/css"> | | <style type="text/css"> |
| /* | | /* |
Revision as of 11:20, 9 September 2010