Template:ETHZ Basel10 css
From 2010.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
<html> | <html> | ||
<head> | <head> | ||
- | <script type="text/javascript" src= | + | <script type="text/javascript"> |
+ | |||
+ | var _gaq = _gaq || []; | ||
+ | _gaq.push(['_setAccount', 'UA-19289516-1']); | ||
+ | _gaq.push(['_trackPageview']); | ||
+ | |||
+ | (function() { | ||
+ | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | ||
+ | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | ||
+ | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | ||
+ | })(); | ||
+ | |||
+ | function getURL(subhrefString) | ||
+ | { | ||
+ | var arr_sub = subhrefString.split('#'); | ||
+ | var hrefString = arr_sub[0]; | ||
+ | var arr = hrefString[0].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"> | ||
/* | /* |
Latest revision as of 12:40, 24 October 2010