\r
<div id="sideBottom">\r
<ul id="navlist">\r
-<li id="navPos"><a href="#">Position</a></li>\r
-<li id="navGrav"><a href="#">Gravity</a></li>\r
-<li id="navAcou"><a href="#">Acoustics</a></li>\r
+<li id="navPos"><a href="#" onclick="switchModule('Pos');">Position</a></li>\r
+<li id="navGrav"><a href="#" onclick="switchModule('Grav');">Gravity</a></li>\r
+<li id="navAcou"><a href="#" onclick="switchModule('Acou');">Acoustics</a></li>\r
</ul>\r
</div>\r
\r
<div id="sideRemark">\r
-<a href="http://www.startrek.com/">STAR TREK</a> and related items are trademarks of <a href="http://www.paramount.com/">Paramount Pictures</a>.\r
+<a href="http://www.startrek.com/">STAR TREK</a> and related items are\r
+trademarks of <a href="http://www.paramount.com/">Paramount Pictures</a>.\r
</div>\r
</div>\r
\r
<div id="mainSepBottom"></div>\r
\r
<div id="mainContent">\r
+<section id="sectNull">\r
<p>This is the main area for tricorder output.</p>\r
+</section>\r
+<section id="sectPos">\r
+<p>This is the main area for position tricorder output.</p>\r
+</section>\r
+<section id="sectGrav">\r
+<p>This is the main area for gravity tricorder output.</p>\r
+</section>\r
+<section id="sectAcou">\r
+<p>This is the main area for acoustics tricorder output.</p>\r
+</section>\r
</div>\r
\r
</body>\r
gStardate.textContent = sdateval.toFixed(1);
setTimeout(updateStardate, 5*60*1000);
-}
\ No newline at end of file
+}
+
+function switchModule(modname) {
+ var sections = document.getElementsByTagName('section');
+ for (var i = 0; i <= sections.length - 1; i++) {
+ sections[i].classList.remove("active");
+ }
+ var navs = document.getElementById('navlist').children;
+ for (var i = 0; i <= navs.length - 1; i++) {
+ navs[i].classList.remove("active");
+ }
+
+ document.getElementById("nav" + modname).classList.add("active");
+ document.getElementById("sect" + modname).classList.add("active");
+}
#navlist > li:hover,
#navlist > li:active,
#navlist > li:hover > a,
-#navlist li:active > a,
+#navlist > li:active > a,
#navlist > li > a:hover,
#navlist > li > a:active {
background-color: #FFCF00;
color: #000000;
}
+#navlist > li.active,
+#navlist > li.active > a {
+ background-color: #008484;
+ color: #FFCF00;
+}
+
#navPos, #navPos > a {
background-color: #FF9F00;
color: #000000;
overflow: auto;
border: none;
}
+
+section {
+ display: none;
+}
+
+section.active {
+ display: block;
+}