var chapter = new Array();
chapter[0] = "";
chapter[1] = "An Introduction to fMRI";
chapter[2] = "MRI Scanners";
chapter[3] = "Basic Principles of MR Signal Generation";
chapter[4] = "Basic Principles of MR Image Formation";
chapter[5] = "MR Contrast Mechanisms and Pulse Sequences";
chapter[6] = "From Neuronal to Hemodynamic Activity";
chapter[7] = "BOLD fMRI: Origins and Properties";
chapter[8] = "Signal, Noise, and Preprocessing of fMRI Data";
chapter[9] = "Experimental Design";
chapter[10] = "Statistical Analysis: Basic Analyses";
chapter[11] = "Statistical Analysis II: Advanced Approaches";
chapter[12] = "Advanced fMRI Methods";
chapter[13] = "Combining fMRI with other Techniques";
chapter[14] = "The Future of fMRI: Practical and Ethical Issues";
//chapter[15] = "Converging Operations";

// Adapted from Life 7e

function loadcontent(chp, cat) {
	var argc = loadcontent.arguments.length;
	if (argc == 2) {
		top.navFlg = "" + chp + cat;
	}
	body.right.content.location = "main.html";
}


function goToContent(ch,s) {
	if (ch == 16) {
		document.location = "entry.html";
	} else {
		document.location = s + ".html?" + ch;
		parent.parent.ch = ch;
	}
}

function chapter_menu(s) {
	document.writeln('<form id="chapter_form">');
	document.writeln('<select id="chapter_select" name="chapter_select" onChange="goToContent(this.options[this.selectedIndex].value,\'' + s + '\')">');
	document.writeln('<option value="">Select a chapter</option>');
	for (i = 1; i < 15; i++) {
		document.writeln("<option value=\"" + i + "\">" + i + ". " + chapter[i] + "<\/option>");
	}
	document.writeln('<\/select>');
	document.writeln('<\/form>');
}

// Function to draw the chapter name
function chapterhead() {
	document.write("<h1>Chapter ");
	document.write(chapnum);
	document.write(": ");
	document.write(chapter[chapnum]);
	document.write("<\/h1>\n");
}
