﻿
/*
 * menuOpened values:
 *			- home: 'home'
 *			- about this course: 'about'
 *			- lecture schedule: 'lectures'
 *			- tutorial schedule: 'tutorial'
 *			- some techniques: 'techniques'
 *			- importnat dates & grading scheme: 'dates'
 *			- marks: 'marks'
 *			- glossary: 'glossary'
 *			- faq: 'faq'
 *			- contact information: 'contact'
 */

function loadMenu(menuOpened) {
	
	if (!document.layers)
	document.write('<div id="Floater" style="position:absolute">');
	
	document.write('<layer id="Floater">');
	document.write('<table border="0" cellspacing="0" cellpadding="0" width="150"><tr><td>');
	document.write('<img src="picts/menu-top.gif"><br />');
	
	// home
	document.write('</td></tr><tr><td>');
	document.write('<a href="index.html" class="menu">Home</a>');

	// information
	document.write('</td></tr><tr><td>');
	document.write('<a href="info.htm" class="menu">Information</a>');	
 
	// lectures	
	document.write('</td></tr><tr><td>');
	document.write('<a href="lectures.htm" class="menu">Lecture Schedule</a>');

	// tutorials	
	document.write('</td></tr><tr><td>');
	document.write('<a href="tutorials.htm" class="menu">Tutorial Schedule</a>');
	
	// pdf
	document.write('</td></tr><tr><td>');
	document.write('<a href="allpdf.htm" title="Lectures, Tutorials,.. in PDF format" class="menu">All PDF</a>');

	// animations	
	document.write('</td></tr><tr><td>');
	document.write('<a href="animations.htm" class="menu">Animations</a>');

	// techniques	
	document.write('</td></tr><tr><td>');
	document.write('<a href="techniques.htm" class="menu">Techniques</a>');
	 
	// dates
	document.write('</td></tr><tr><td>');
	document.write('<a href="dates.htm" class="menuHigher">Important Dates &amp; <br />&nbsp;&nbsp;&nbsp;Grading Scheme</a>');
	
	// contact
	document.write('</td></tr><tr><td>');
	document.write('<a href="contact.htm" class="menu">Contact Information</a>');
	
	document.write('</td></tr><tr><td>');
	document.write('<img src="picts/menuHigher.gif"><br />');
	
	// top
	document.write('</td></tr><tr><td>');
	document.write('<a href="#top" class="menu">Top</a>');
	
	
	
	document.write('</td></tr></table>');
	document.write('</layer>');
	
	
	// NOTE: If you add links you will need to alter the "placeY" 82 number below
	
	
	if (!document.layers)
	document.write('</div>');

	JSFX_FloatTopDiv();
}	


function JSFX_FloatTopDiv()
{
	var placeX = 0,
	placeY = 10;
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	function DeLayer(id)
	{
		var GetElements=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		if(d.layers)GetElements.style=GetElements;
		GetElements.sP=function(x,y){this.style.left=x;this.style.top=y;};
		GetElements.x = placeX;
		GetElements.y = ns ? pageYOffset  : document.body.scrollTop ;
		GetElements.y += placeY;
		return GetElements;
	}
	window.stayTopLeft=function()
	{
		var pY = ns ? pageYOffset  : document.body.scrollTop ;
		ftlObj.y += (pY + placeY - ftlObj.y)/15;
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("stayTopLeft()", 0);
	};
	ftlObj = DeLayer("Floater");
	stayTopLeft();
}
