/* Static menu script II (By maXimus, maximus@nsimail.com)
Modified slightly/ permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com */

//configure below variable for menu width, position on page
var menuwidth=110
var offsetleft=5
var offsettop=90

var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

function makeStatic() {
   if (ie4) {object1.style.pixelTop=document.body.scrollTop+offsettop}
      else if (ns6) {document.getElementById("object1").style.top=window.pageYOffset+offsettop}
      else if (ns4) {eval(document.object1.top=eval(window.pageYOffset+offsettop));}
   setTimeout("makeStatic()",10);
   }

if (ie4||ns6) {document.write('<Span align="center" id="object1" style="position:absolute; top:20; left:'+offsetleft+'; z-index:5;cursor:hand;background-color:black;"><Table border=1 width="'+menuwidth+'" cellpadding=0 cellspacing=0 bordercolor=black bgcolor=white>')}
   else if (ns4){document.write('<Layer top="20" name="object1" left="'+offsetleft+'" bgcolor=black><Table border=0 cellpadding=0 cellspacing=1><Tr><Td><Table border=0 cellpadding=0 cellspacing="0" width="'+menuwidth+'">')}

if (ns6||ie4||ns4)
document.write('<Tr><Td bgcolor=550059 bordercolordark=99CCFF bordercolorlight=003399><P><Center><Img src=images/menuTitle.gif width=93 height=60 border=0></Td></Tr>') 

var menui = new Array();
var menul = new Array();

//configure below for menu items. Extend list as desired

menui[0]="Home";
menui[1]="Course Info";
menui[2]="Course Outline";
menui[3]="Matlab Tricks";
menui[4]="Class Notes";
menui[5]="Assignments";
menui[6]="HW1";
menui[7]="HW2";
menui[8]="HW3";
menui[9]="HW4";
menui[10]="HW5";
menui[11]="HW6";
menui[12]="HW7";

menul[0]="index.html";
menul[1]="info.html";
menul[2]="outline.html";
menul[3]="matlabTricks.html";
menul[4]="notes.html";
menul[5]="assignments.html";
menul[6]="hw1.html";
menul[7]="hw2.html";
menul[8]="hw3.html";
menul[9]="hw4.html";
menul[10]="hw5.html";
menul[11]="hw6.html";
menul[12]="hw7.html";

for (i=0;i<=menui.length-1;i++)
   if (ie4||ns6) {document.write('<Tr><Td bgcolor=888888 bordercolor=000000 onclick="location=\''+menul[i]+'\'" onmouseover="className=\'menuh\'" onMouseout="className=\'menu\'"><Center><Font face=arial size=2>'+menui[i]+'</Font></Td></Tr>')}
      else if (ns4){document.write('<Tr><Td bgcolor=888888><Ilayer><Layer width="'+menuwidth+'" onmouseover="bgColor=\'BBBBBB\'" onmouseout="bgColor=\'888888\'"><Center><Font face=arial size=2 color=FFFFFF><A href="'+menul[i]+'" class=menulinks>'+menui[i]+'</A></Center></Layer></Ilayer></td></tr>')}

if (ie4||ns6) {document.write('</Table></Span>')}
   else if (ns4){document.write('</Table></Td></Tr></Table></Layer>')}

function menu3(){
   if (ns6||ie4||ns4)
      makeStatic()
   }

window.onload=menu3


