/* Function to display the sidebar on the left side of the page
   depth: the number of levels from the root directory
   active: the course to which this page applies
   		   (0 if the home page, 1 if another non-course page) */
function showSidebarSchool(depth, active){
	/* Array containing course numbers for URL and text */
	var courseNums = [ 130, 146, 150, 251, 255, 285 ];
	/* Array containing course names for link title attributes */
	var titles = [ "Introduction to Information Systems", "Microcomputer Applications", "Introduction to Computer Logic and Programming", "C++ Programming", "Java Programming", "Object-Oriented Programming (Advanced Java)" ];
	var tag;
	
	/* The outer div block for the sidebar */
	document.write('<div id="sidebar-school">');
	
	/* Looping through the array to generate each course link tag */
	for (var c = 0; c < courseNums.length; c++){
		tag = '<a href="';
		
		/* Direct the link back to the root level */
		for (var d = 0; d < depth; d++)
			tag += '../';
		
		/* Use the course number as the directory, add the file name,
		   add a link title, and set the class */
		tag += courseNums[c] + '/index.html" title="' + titles[c] + '" class="course-side';
		
		/* Use another class to format the active course number */
		if (courseNums[c] == active)
			tag += ' active';
		
		/* Close the opening link tag, use the course number as the text,
		   and insert the close link tag */
		tag += '">' + courseNums[c] + '</a>';
		
		document.write(tag);
	}
	
	/* If not the home page, insert a link to the home page */
	if (active != 0){
		document.write('<p>&nbsp;</p>');
		tag = '<a href="';
		for (var d = 0; d < depth; d++)
			tag += '../';
		tag += 'index.html" title="Tommy Battles\'s Courses at Jeff State" class="course-side">Home</a>';
		document.write(tag);
	}
	
	/* Close the outer div block */
	document.write('</div>');
}
