Template:Paris2009 menu5

From 2009.igem.org

(Difference between revisions)
Line 1: Line 1:
-
<div id="menu">
+
<html>
-
<ul>
+
<head>
-
<li class="menu_header">&nbsp;</li>
+
<script type="text/javascript">
-
<li >[[Team:Paris#top |. Home .]]</li>
+
<!--
-
<li class="menu_footer">&nbsp;</li>
+
/* This script and many more are available free online at
-
</ul>
+
The JavaScript Source :: http://javascript.internet.com
 +
Created by: Travis Beckham :: http://www.squidfingers.com | http://www.podlob.com */
-
<ul>
+
/* Coded by Travis Beckham
-
<li class="menu_header">&nbsp;</li>
+
  http://www.squidfingers.com | http://www.podlob.com
-
<li >[[Team:Paris/Production_overview#top |. Production .]]</li>
+
  version date: 06/02/03
-
<li class="menu_footer">&nbsp;</li>
+
  If want to use this code, feel free to do so, but please leave this message intact. */
-
</ul>
+
-
<ul>
+
// Node Functions
-
<li class="menu_header">&nbsp;</li>
+
-
<li >[[Team:Paris/Addressing_overview#top |. Addressing .]]</li>
+
-
<li class="menu_footer">&nbsp;</li>
+
-
</ul>
+
-
<ul>
+
if(!window.Node){
-
<li class="menu_header">&nbsp;</li>
+
  var Node = {ELEMENT_NODE : 1, TEXT_NODE : 3};
-
<li >[[Team:Paris/Transduction_overview#top |. Reception .]]</li>
+
}
-
<li class="menu_footer">&nbsp;</li>
+
-
</ul>
+
-
<ul>
+
function checkNode(node, filter){
-
<li class="menu_header">. Tool .</li>
+
  return (filter == null || node.nodeType == Node[filter] || node.nodeName.toUpperCase() == filter.toUpperCase());
-
<li>[[Team:Paris/Tool_introduction#top | Introduction]]</li>
+
}
-
<li>[[Team:Paris/Tool_DataBase#top | Data Base]]</li>
+
 
-
<li>[[Team:Paris/Tool_OSXSoft#top | Software OSX]]</li>
+
function getChildren(node, filter){
-
<li>[[Team:Paris/Tool_iPhone#top | iPhone]]</li>
+
  var result = new Array();
-
<li class="menu_footer">&nbsp;</li>
+
  var children = node.childNodes;
-
</ul>
+
  for(var i = 0; i < children.length; i++){
 +
    if(checkNode(children[i], filter)) result[result.length] = children[i];
 +
  }
 +
  return result;
 +
}
 +
 
 +
function getChildrenByElement(node){
 +
  return getChildren(node, "ELEMENT_NODE");
 +
}
 +
 
 +
function getFirstChild(node, filter){
 +
  var child;
 +
  var children = node.childNodes;
 +
  for(var i = 0; i < children.length; i++){
 +
    child = children[i];
 +
    if(checkNode(child, filter)) return child;
 +
  }
 +
  return null;
 +
}
 +
 
 +
function getFirstChildByText(node){
 +
  return getFirstChild(node, "TEXT_NODE");
 +
}
 +
 
 +
function getNextSibling(node, filter){
 +
  for(var sibling = node.nextSibling; sibling != null; sibling = sibling.nextSibling){
 +
    if(checkNode(sibling, filter)) return sibling;
 +
  }
 +
  return null;
 +
}
 +
function getNextSiblingByElement(node){
 +
        return getNextSibling(node, "ELEMENT_NODE");
 +
}
 +
 
 +
// Menu Functions & Properties
 +
 
 +
var activeMenu = null;
 +
 
 +
function showMenu() {
 +
  if(activeMenu){
 +
    activeMenu.className = "";
 +
    getNextSiblingByElement(activeMenu).style.display = "none";
 +
  }
 +
  if(this == activeMenu){
 +
    activeMenu = null;
 +
  } else {
 +
    this.className = "active";
 +
    getNextSiblingByElement(this).style.display = "block";
 +
    activeMenu = this;
 +
  }
 +
  return false;
 +
}
 +
 
 +
function initMenu(){
 +
  var menus, menu, text, a, i;
 +
  menus = getChildrenByElement(document.getElementById("menu"));
 +
  for(i = 0; i < menus.length; i++){
 +
    menu = menus[i];
 +
    text = getFirstChildByText(menu);
 +
    a = document.createElement("a");
 +
    menu.replaceChild(a, text);
 +
    a.appendChild(text);
 +
    a.href = "#";
 +
    a.onclick = showMenu;
 +
    a.onfocus = function(){this.blur()};
 +
  }
 +
}
-
<ul>
+
if(document.createElement) window.onload = initMenu;
-
<li class="menu_header">&nbsp;</li>
+
//-->
-
<li >[[Team:Paris/Ethics_ethicallabbook#top |. Ethics .]]</li>
+
</script>
-
<li class="menu_footer">&nbsp;</li>
+
</head>
 +
<body>
 +
<table>
 +
<ul id="menu">
 +
  <li class="menu_header">&nbsp;
 +
<hr>
 +
  <li class="title">. Home .
 +
    <ol class="none">
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris#top">&nbsp;Synopsis</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Brainstorm#top">&nbsp;Brainstorm</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Project#top">&nbsp;OMV Project</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Conclusion#top">&nbsp;Conclusion</a></li>
 +
    </ol>
 +
  </li>
 +
  <li class="title">. Production .
 +
    <ol class="none">
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Production_overview#top">&nbsp;Overview</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Production_modeling#top">&nbsp;Modeling</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Production_design#top">&nbsp;Parts design</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Production_testing#top">&nbsp;Testing</a></li>
 +
    </ol>
 +
  </li>
 +
  <li class="title">. Addressing .
 +
    <ol class="none">
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Addressing_overview#top">&nbsp;Overview</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Addressing_modeling#top">&nbsp;Modeling</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Addressing_design#top">&nbsp;Parts design</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Addressing_testing#top">&nbsp;Testing</a></li>
 +
    </ol>
 +
  </li>
 +
  <li class="title">. Reception .
 +
    <ol class="none">
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Transduction_overview#top">&nbsp;Overview</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Transduction_modeling#top">&nbsp;Modeling</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Transduction_design#top">&nbsp;Parts design</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Transduction_testing#top">&nbsp;Testing</a></li>
 +
    </ol>
 +
  </li>
 +
  <li class="title">. Ethics .
 +
    <ol class="block">
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Ethics_ethicallabbook#top">&nbsp;Ethical Lab book</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Ethics_Materials#top">&nbsp;Materials</a></li>
 +
    </ol>
 +
  </li>
 +
  <li class="title">. Tool .
 +
    <ol class="none">
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Tool_introduction#top">&nbsp;Introduction</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Tool_DataBase#top ">&nbsp;Data Base</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Tool_OSXSoft#top">&nbsp;Software OSX</a></li>
 +
      <li class="sub"><a href="https://2009.igem.org/Team:Paris/Tool_iPhone#top">&nbsp;iPhone</a></li>
 +
    </ol>
 +
<hr>
 +
  <li class="menu_footer">&nbsp;</li>
</ul>
</ul>
 +
</table>
 +
</body>
-
</div>
+
</html>
<div id="paris_content_wrapper">
<div id="paris_content_wrapper">
<div id=paris_content_boxtop></div>
<div id=paris_content_boxtop></div>
<div id="paris_content">
<div id="paris_content">

Revision as of 15:19, 27 August 2009