Team:Columbia-Cooper-NYC

From 2012.igem.org

(Difference between revisions)
Line 15: Line 15:
|}
|}
-->
-->
 +
<html>
<html>
<head>
<head>
Line 163: Line 164:
</body>
</body>
</head>
</head>
-
 
-
<!--
 
-
<html>
 
-
<head>
 
-
<script>
 
-
 
-
var fix = 1; var delay = 2000; var modd = 0;
 
-
var bar = new menuBar();
 
-
bar.addMenu('Menu 1');
 
-
bar.addItem('entry1a.htm','Entry 1a');
 
-
bar.addItem('entry1b.htm','Entry 1b');
 
-
bar.addMenu('Menu 2');
 
-
bar.addItem('entry2a.htm','Entry 2a');
 
-
bar.addItem('entry2b.htm','Entry 2b');
 
-
 
-
var blc = '#663300';var blh = '#ffffff';var bla = '#996633';var lc = '#cccccc';var lh = '#996633';var la = '#ffffff';
 
-
function menuBar() {this.jj = -1;this.kk = 0;this.mO = new Array();this.addMenu = addMenu;this.addItem = addItem;this.writeBar = writeBar;this.writeDrop = writeDrop;}function addMenu(main) {this.mO[++this.jj] = new Object();this.mO[this.jj].main = main;this.kk = 0;this.mO[this.jj].link = new Array();this.mO[this.jj].name = new Array();}function addItem(link,name) {this.mO[this.jj].link[this.kk] = link;this.mO[this.jj].name[this.kk++] = name;}function writeBar() {for (var i=1;i <= this.mO.length; i++){document.write('<span id="navMenu'+i+'" class="mH">'+this.mO[i-1].main+'<\/span>');}}function writeDrop() {for (var i=1;i <= this.mO.length; i++){document.write('<div id="dropMenu'+i+'" class="mD">\r\n');for (var h=0;h < this.mO[i-1].link.length; h++){document.write('<a class="mL" href="'+this.mO[i-1].link[h]+'">'+this.mO[i-1].name[h]+'<\/a>\r\n');}document.write('<\/div>\r\n');}}
 
-
if (fix) window.onscroll=sMenu;window.onload=iMenu;var onm = null;var ponm = null;var podm = null;var ndm = bar.mO.length;
 
-
function posY() {return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;}
 
-
function sMenu() {document.getElementById('mB').style.top = posY() + 'px'; for (i=1; i<=ndm; i++) {menuName = 'dropMenu' + i;odm = document.getElementById(menuName); if (onm) {var yPos = onm.offsetParent.offsetTop + onm.offsetParent.offsetHeight;odm.style.top = yPos + 'px';}}}
 
-
function iMenu() {if (document.getElementById) {document.onclick = mHide; for (i=1; i<=ndm; i++) {menuName = 'dropMenu' + i; navName = 'navMenu' + i; odm = document.getElementById(menuName); onm = document.getElementById(navName); odm.style.visibility = 'hidden'; onm.onmouseover =  mHov; onm.onmouseout = mOut;} onm = null;} return;}
 
-
function  mHov(e) {if (modd) clearTimeout(modd);document.onclick = null; honm = document.getElementById(this.id); if (honm != onm) {honm.style.color = lh; honm.style.backgroundColor = blh;} menuName = 'drop' + this.id.substring(3,this.id.length); odm = document.getElementById(menuName); if (podm == odm) {mHide(); return;} if (podm != null) mHide(); onm = document.getElementById(this.id); if ((ponm != onm ) || (podm == null)) {onm.style.color = la; onm.style.backgroundColor = bla;} if (odm) {xPos = onm.offsetParent.offsetLeft + onm.offsetLeft; yPos = onm.offsetParent.offsetTop + onm.offsetParent.offsetHeight; odm.style.left = xPos + 'px'; odm.style.top = yPos + 'px'; odm.style.visibility = 'visible'; odm.onmouseover = omov; odm.onmouseout = omot; podm = odm; ponm = onm;}}
 
-
function omov() {if (modd) clearTimeout(modd);}
 
-
function omot() {modd = setTimeout('mHide()',delay);}
 
-
function mOut(e) {modd = setTimeout('mHide()',delay);document.onclick = mHide;oonm = document.getElementById(this.id); if (oonm != onm) {oonm.style.color = lc; oonm.style.backgroundColor = blc;}}
 
-
function mHide() {document.onclick = null; if (podm) {podm.style.visibility = 'hidden'; podm = null; ponm.style.color = lc; ponm.style.backgroundColor = blc;} onm = null;}
 
-
if (fix) {var ag = navigator.userAgent.toLowerCase();var isG = (ag.indexOf('gecko') != -1);var isR=0;if (isG) {t = ag.split("rv:"); isR = parseFloat(t[1]);}if (isR && isR<1) setInterval('sMenu()',50);}
 
-
</script>
 
-
</head>
 
-
 
-
<style type = "text/css">
 
-
body {margin:0px; padding:0px;}
 
-
#mB {font:bold 12px arial,Helvetica,sans-serif; text-align:left; margin-bottom:5px; position:relative; top:0px; left:0px; width:99%; overflow:hidden; border:solid 1px #663300; background-color:#663300;z-index:1000;}
 
-
.mH {color:#cccccc; text-decoration:none; white-space:nowrap; cursor:pointer; padding:5px; margin:0px; padding-right:10px; position:relative; border-right:1px solid #ffffff;}
 
-
a.mL {display:block; padding:1px 4px; border-top:1px solid #663300; text-decoration:none}
 
-
a.mL:link {color:#cc9966;}
 
-
a.mL:visited {color:#996633;}
 
-
a.mL:hover {color:#ffffff; background-color:#663300;}
 
-
a.mL:active {color:#ffffff; background-color:#cc9966;}
 
-
a.mO {display:block; padding:1px 4px; border-top:1px solid #663300; text-decoration:none}
 
-
a.mO:link {color:#cccccc;}
 
-
a.mO:visited {color:#cccccc;}
 
-
a.mO:hover {color:#ffffff;}
 
-
a.mO:active {color:#ffffff;}
 
-
.mD {color:#cc9966; font:10px arial, Helvetica, sans-serif; background-color:#ffffff; visibility:hidden; margin:0; padding:0; position:absolute; z-index:1000; top:60px; left:0; width:125px; border-style:solid; border-width:0 1px 1px; border-color:#663300;}
 
-
</style>
 
-
</html>
 
-
-->
 
-
 
-
 
-
 
-
 
-
 
-
<!--
 
-
<html>
 
-
<head>
 
-
<script>
 
-
/* Credits: Stu Nicholls */
 
-
/* URL: http://www.stunicholls.com/menu/pro_dropdown_2/stuHover.js */
 
-
 
-
stuHover = function() {
 
-
var cssRule;
 
-
var newSelector;
 
-
for (var i = 0; i < document.styleSheets.length; i++)
 
-
for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
 
-
{
 
-
cssRule = document.styleSheets[i].rules[x];
 
-
if (cssRule.selectorText.indexOf("LI:hover") >= 0)
 
-
{
 
-
newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
 
-
document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
 
-
}
 
-
}
 
-
var getElm = document.getElementById("nav").getElementsByTagName("LI");
 
-
for (var i=0; i<getElm.length; i++) {
 
-
getElm[i].onmouseover=function() {
 
-
this.className+=" iehover";
 
-
}
 
-
getElm[i].onmouseout=function() {
 
-
this.className=this.className.replace(new RegExp(" iehover\\b"), "");
 
-
}
 
-
}
 
-
}
 
-
if (window.attachEvent) window.attachEvent("onload", stuHover);
 
-
</script>
 
-
</head>
 
-
-->
 
-
 
-
 
-
 
-
<!--
 
-
<html>
 
-
<head>
 
-
<script>
 
-
<meta http-equiv="refresh" content="5;url=pagename.html">
 
-
var timeout = 500;
 
-
var closetimer = 0;
 
-
var ddmenuitem = 0;
 
-
 
-
function mopen(id)
 
-
{
 
-
// cancel close timer
 
-
mcancelclosetime();
 
-
 
-
// close old layer
 
-
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
 
-
 
-
// get new layer and show it
 
-
ddmenuitem = document.getElementById(id);
 
-
ddmenuitem.style.visibility = 'visible';
 
-
 
-
}
 
-
function mclose()
 
-
{
 
-
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
 
-
}
 
-
 
-
function mclosetime()
 
-
{
 
-
closetimer = window.setTimeout(mclose, timeout);
 
-
}
 
-
 
-
function mcancelclosetime()
 
-
{
 
-
if(closetimer)
 
-
{
 
-
window.clearTimeout(closetimer);
 
-
closetimer = null;
 
-
}
 
-
}
 
-
 
-
document.onclick = mclose;
 
-
</script>
 
-
</head>
 
-
 
-
<body>
 
-
<ul id="sddm">
 
-
    <li><a href="#"
 
-
        onmouseover="mopen('m1')"
 
-
        onmouseout="mclosetime()">Home</a>
 
-
        <div id="m1"
 
-
            onmouseover="mcancelclosetime()"
 
-
            onmouseout="mclosetime()">
 
-
        <a href="#">HTML/CSS</a>
 
-
        <a href="#">DHTML Menu</a>
 
-
        <a href="#">JavaScript</a>
 
-
        </div>
 
-
    </li>
 
-
    <li><a href="#"
 
-
        onmouseover="mopen('m2')"
 
-
        onmouseout="mclosetime()">Download</a>
 
-
        <div id="m2"
 
-
            onmouseover="mcancelclosetime()"
 
-
            onmouseout="mclosetime()">
 
-
        <a href="#">ASP Server-side</a>
 
-
        <a href="#">Pulldown navigation</a>
 
-
        <a href="#">AJAX Drop Submenu</a>
 
-
        <a href="#">DIV Cascading </a>
 
-
        </div>
 
-
    </li>
 
-
    <li><a href="#">Order</a></li>
 
-
    <li><a href="#">Help</a></li>
 
-
    <li><a href="#">Contact</a></li>
 
-
</ul>
 
-
<div style="clear:both"></div>
 
-
<body>
 
-
 
-
<style type = "text/css">
 
-
#sddm
 
-
{ margin: 0;
 
-
padding: 0;
 
-
z-index: 30}
 
-
 
-
#sddm li
 
-
{ margin: 0;
 
-
padding: 0;
 
-
list-style: none;
 
-
float: left;
 
-
font: bold 11px arial}
 
-
 
-
#sddm li a
 
-
{ display: block;
 
-
margin: 0 1px 0 0;
 
-
padding: 4px 10px;
 
-
width: 60px;
 
-
background: #5970B2;
 
-
color: #FFF;
 
-
text-align: center;
 
-
text-decoration: none}
 
-
 
-
#sddm li a:hover
 
-
{ background: #49A3FF}
 
-
 
-
#sddm div
 
-
{ position: absolute;
 
-
visibility: hidden;
 
-
margin: 0;
 
-
padding: 0;
 
-
background: #EAEBD8;
 
-
border: 1px solid #5970B2}
 
-
 
-
#sddm div a
 
-
{ position: relative;
 
-
display: block;
 
-
margin: 0;
 
-
padding: 5px 10px;
 
-
width: auto;
 
-
white-space: nowrap;
 
-
text-align: left;
 
-
text-decoration: none;
 
-
background: #EAEBD8;
 
-
color: #2875DE;
 
-
font: 11px arial}
 
-
 
-
#sddm div a:hover
 
-
{ background: #49A3FF;
 
-
color: #FFF}
 
-
 
-
 
-
<--
 
-
 

Revision as of 22:05, 16 August 2012