var path='', l=location.toString();l=l.substring(l.indexOf('marcosch.com')+13);l=l.split('/');for(i=1;i<l.length;++i)path+="../";
if(location.toString().indexOf("file:///Macintosh")==0)path="";

//configure below variable for menu width, position on page
var menuwidth="100%";
var offsetleft=0
var offsettop=0

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()",0);
}

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

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

menui[0]="Home";
menui[1]="Projects";
menui[2]="C.V.";
menui[3]="Links";
menui[4]="Contact";

menul[0]="index.htm";
menul[1]="projects.htm";
menul[2]="cv.htm";
menul[3]="links.htm";
menul[4]="contact.htm";

if (ie4||ns6) {document.write('<span align=center id="object1" style="position:absolute; top:0; left:'+offsetleft+';"><TABLE width="'+menuwidth+'" BORDER=0 CELLPADDING=0 CELLSPACING=0><TR>')}
else if (ns4){ document.write('<LAYER top="0" name="object1" left="'+offsetleft+'" BGCOLOR=white><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="'+menuwidth+'"><TR>')}

for (i=0;i<=menui.length-1;i++)
if (ie4||ns6) {document.write('<TD class=nav onclick="location=\''+path+menul[i]+'\'" align=center>'+menui[i]+'</TD>')}
else if (ns4){document.write('<TD><ILAYER><LAYER width="'+menuwidth+'"><CENTER><A HREF="'+menul[i]+'" class=menulinks>'+menui[i]+'</A></CENTER></LAYER></ILAYER></TD>')}

if (ie4||ns6) {document.write('<td width=150 class=nav>&nbsp;</td></TR></TABLE></span>')}
else if (ns4){document.write('<td width=150 class=nav>&nbsp;</td></TR></TABLE></LAYER>')}

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

window.onload=menu



