	function makeTitle() 
	{
		document.write('<title>Math 231 BL1; Spring 2009 -- ' +currentPage+ '</title>');	
	}

	
	function makeLogo()
	{
		document.write('<div id="logo">');
//		document.write('<hr width=100%>')
		document.write('<h1>Math 231 BL1: Calculus II</h1>');
//		document.write('<h2>Summer 2006</h2>');
//		document.write('<hr width=100%>')
		document.write('</div>');
	}

	var Pages = new Array (
		new Array('Home','./'),
		new Array('Syllabus','syllabus.html'),
		new Array('Calendar','calendar.html'),
		new Array('Lecture Outlines','lectureoutlines.html'),
		new Array('Suggested Problems','suggestedproblems.html'),
		new Array('Quizzes','quizzes.html'),
		new Array('Tests','tests.html')
	);

	function mailScramble(address,suffix) { 
		var a,b,c,d,e;
 		a='<a href=\"mai';
 		b=address; 
 		c='\">'; 
 		a+='lto:'; 
 		b+='&#64;'; 
 		e='</a>';
 		b+=suffix;
 		b+='.e';
 		b+='du';
 		d=b;
 		document.write(a+b+c+d+e);
	}

	function toggleDiv(divid)
	{
		if (document.getElementById(divid).style.display == 'none') {
			document.getElementById(divid).style.display = 'block';
   		} else {
			document.getElementById(divid).style.display = 'none';
		}
	}
	
	function makeNavbar()
	{
		document.write('<div id="navbar">');
		document.write('<ul>');
		for(var i = 0; i < Pages.length; i++)
		{
			var page = Pages[i];
			if (currentPage == page[0]) {
				document.write('<li id="uberlink">');
			} else {
				document.write('<li>');
			}
			document.write('<a href="');
			document.write(level); 
			document.write(page[1]+'">'+page[0]);
			document.write('</a></li>');
		}
		document.write('</ul>');
		document.write('</div>');
	}
	
	function makeFooter()
	{
		document.write('<div id="footer">');
		document.write('<hr width=100%>')
		document.write('Spring 2009 -- <a href="http://www.math.uiuc.edu/~acs">Andrew Schultz</a>');
		document.write('</div>');
	
	}	

	
/*********************************************
************* Coursenotes Stuff **************
*********************************************/

	var notes = new Array(

//		Week 1
		new Array(
			new Array(
				'090121', // date using yymmdd
				'Integration by Parts', // class topic
				'Here is what we covered in class today.' 
			)
		)
// 		Week 2
/*
		new Array(
			new Array(
				'070828', // date using yymmdd
				'Echelon Forms', // class topic
				new Array(1,0), // first coordinate = coursenotes y or n
						  // second coordinate = mathematica y or n
				'What are the elementary operations?  What does it mean for two matrices to be row equivalent?  How are solutions to row equivalent matrices related? What does it mean for a matrix to be in echelon form?  In reduced echelon form?  For a given matrix A, how many reduced echelon matrices are row equivalent to A? What are the pivots of a matrix A?  What are pivot columns and pivot rows of a matrix A?  What is the most pivots a matrix with <i>r</i> rows and <i>c</i> columns can have?  How can I solve a system of equations by studying the reduced echelon form of the corresponding augmented matrix? How can I use the reduced echelon form of a matrix to determine if the corresponding system is consistent?  How can I use the reduced echelon form of a matrix to determine the number of solutions a consistent system of equations has?  What are free variables, and how do I identify them using the reduced echelon form of a matrix?  How can I compute the reduced echelon form of a matrix?' 
			),
			new Array(
				'070830', // date using yymmdd
				'Vector Equations', // class topic
				new Array(1,0), // first coordinate = coursenotes y or n
						  // second coordinate = mathematica y or n
				'What is a vector?  What are the coordinates of a vector?  What is <b>R</b><sup>m</sup>?  What are the basic vector operations?  What is the zero vector (<b>0</b>)?  How can I give a graphical representation of a vector in <b>R</b><sup>2</sup>?  How are the basic vector operations represented graphically?  What does it mean for a vector <b>b</b> to be a linear combination of a collection of vectors {<b>v</b><sub>1</sub>,...,<b>v</b><sub>k</sub>}?  What is the span of a collection of vectors {<b>v</b><sub>1</sub>,...,<b>v</b><sub>k</sub>}?  Are there any special vectors which we always find in the span of a collection of vectors?  How can I determine if a vector <b>b</b> is in the span of a collection of vectors {<b>v</b><sub>1</sub>,...,<b>v</b><sub>k</sub>} using systems of equations?' 
			)
		)
*/
	);
	function makeCoursenotes() {
		
		var l=1;
		for(var i=0;i<notes.length;i++) {
		
			var week=notes[i];
			var humanWeek = i+1;
			document.write('<h4>Week '+ humanWeek +'</h4>');
//			document.write('<ul>');
			for(var j=0;j<week.length;j++) {
				var day=week[j];
				document.write('Lecture '+l+': '+day[1]);
				document.write('<ul><li>'+day[2]+'</li></ul>');
				l++;
			}
			document.write('</ul>');
		}
	}


/*********************************************
*************** Quiz Stuff ********************
*********************************************/

	function makeQuiz(currentQuiz,solutionsToDate) {
//		document.write('<h4>Quizzes</h4>');
		document.write('<ul>');
		for (var i=1;i<12;i++) {
			document.write('<li>');
			if (i<currentQuiz+1) {
				document.write('<a href="quizzes/quiz'+i+'.pdf">');
			}
			document.write('Quiz '+i);
			if (i<currentQuiz+1) {
				document.write('</a>');
			}
			document.write(' (');
			if (i<solutionsToDate+1) {
				document.write('<a href="quizzes/quiz'+i+'_solns.pdf">');
			}
			document.write('Solutions');
			if (i<solutionsToDate+1) {
				document.write('</a>');
			}
			document.write(')');
			document.write('</li>');
		}
		document.write('</ul>');
	}

/*********************************************
*************** Hwk Stuff ********************
*********************************************/

	function makeHomework(currentHomework,solutionsToDate) {
		document.write('<h4>Homework Assignments</h4>');
		document.write('<ul>');
		for (var i=1;i<15;i++) {
			document.write('<li>');
			if (i<currentHomework+1) {
				document.write('<a href="homeworks/homework'+i+'.pdf">');
			}
			document.write('Homework '+i);
			if (i<currentHomework+1) {
				document.write('</a>');
			}
			document.write(' (');
			if (i<solutionsToDate+1) {
				document.write('<a href="homeworks/homework'+i+'_solns.pdf">');
			}
			document.write('Solutions');
			if (i<solutionsToDate+1) {
				document.write('</a>');
			}
			document.write(')');
			document.write('</li>');
		}
		document.write('</ul>');
	}


/*********************************************
************* Calendar Stuff *****************
*********************************************/

/*		
	var calendar = new Array(
//		Week 1
		new Array(
				new Array(
					'08/23/07',
					'Thursday',
					'Introductions<br>Systems of Linear Equations',
					'&nbsp')
			),
//		Week 2
		new Array(
				new Array(
					'08/28/07',
					'Tuesday',
					'Row Reduction<br>Echelon Forms',
					'Homework 1 due'),
				new Array(
					'08/30/07',
					'Thursday',
					'Vector Equations',
					'Quiz 1')
			),
//		Week 3
		new Array(
				new Array(
					'09/04/07',
					'Tuesday',
					'Matrix/Vector Products',
					'Homework 2 due'),
				new Array(
					'09/06/07',
					'Thursday',
					'Solutions to Systems',
					'')
			),
//		Week 4
		new Array(
				new Array(
					'09/11/07',
					'Tuesday',
					'Applications',
					'Homework 3 due'),
				new Array(
					'09/13/07',
					'Thursday',
					'Linear Independence',
					'Quiz 2')
			),
//		Week 5
		new Array(
				new Array(
					'09/18/07',
					'Tuesday',
					'Matrix Algebra',
					'Homework 4 due'),
				new Array(
					'09/20/07',
					'Thursday',
					'The Inverse of a Matrix',
					'')
			),
		new Array(
				new Array(
					'09/25/07',
					'Tuesday',
					'A Thousand and One Ways to Say Invertible',
					'Homework 5 due'),
				new Array(
					'09/27/07',
					'Thursday',
					'The Leontief Input-Output Model',
					'Quiz 3')
			),
		new Array(
				new Array(
					'10/02/07',
					'Tuesday',
					'',
					'Midterm 1'),
				new Array(
					'10/04/07',
					'Thursday',
					'An Introduction to Determinants',
					'&nbsp;')
			),
		new Array(
				new Array(
					'10/09/07',
					'Tuesday',
					'Properties of Determinants',
					'Homework 6 due'),
				new Array(
					'10/11/07',
					'Thursday',
					"Determinants and Geometry<br>Cramer's Rule",
					'Quiz 4')
			),
		new Array(
				new Array(
					'10/16/07',
					'Tuesday',
					'Subspaces',
					'Homework 7 due'),
				new Array(
					'10/18/07',
					'Thursday',
					"Subspaces Associated to a Matrix",
					'')
			),
		new Array(
				new Array(
					'10/23/07',
					'Tuesday',
					'Bases',
					'Homework 8 due'),
				new Array(
					'10/25/07',
					'Thursday',
					"Dimension",
					'Quiz 5')
			),
		new Array(
				new Array(
					'10/30/07',
					'Tuesday',
					'Eigenvectors and Eigenvalues',
					'Homework 9 due'),
				new Array(
					'11/01/07',
					'Thursday',
					"",
					'Midterm 2')
			),
		new Array(
				new Array(
					'11/06/07',
					'Tuesday',
					'Computing Eigenvalues',
					'Homework 10 due'),
				new Array(
					'11/08/07',
					'Thursday',
					"Dynamical Systems",
					'Quiz 6')
			),
		new Array(
				new Array(
					'11/13/07',
					'Tuesday',
					"Popularity Contests and Google's PageRank Algorithm",
					'Homework 11 due'),
				new Array(
					'11/15/07',
					'Thursday',
					"An orthogonality extravaganza",
					'')
			)
	);	
	
	function makeCalendar()
	{
		for (var i=0; i < calendar.length; i++) {
			var week=calendar[i];
			var humanweeknumber = i+1;
			document.write('<center><table width="90%">');
			document.write('<tr><td valign="middle" bgcolor="#CCCCCC" colspan="4" align="center"><b>Week '+ humanweeknumber +'</b></td></tr>');
			for (var j=0; j < week.length; j++) {
				var day=week[j];
				document.write('<tr><td width="10%">'+day[0]+'</td>');
				document.write('<td width="15%">'+day[1]+'</td>');
				document.write('<td width="45%">'+day[2]+'</td>');
				document.write('<td width="30%">'+day[3]+'</td>');
			}
			document.write('</table></center><br>');
		}
	}
*/