/* **************************************************

This file holds any customized code -- mostly variables, but possibly
also functions -- for a particular instance of an ebook.  This file
should be loaded BEFORE any of the various APIs, which will use the
stuff here to customize things for the ebook.

Another file, "defaults.js", exists in the ebookAPIs directory.  defaults.js
declares the variables assigned here, and contains default values them.  
That way, if we later find need to change one of the APIs to
customize a new book, the API will still work with older ebooks, which will

************************************************** */

// Include a file for custom code for this book
document.write('<script language="JavaScript" src="' + urlStartBookID + 'config/bookconfig.js" type="text/javascript"></script>');

// where are these used?
bookTitle = "A Speaker's Guidebook";
bookEdition = "4e";

// highlighting of current section in left TOC 
leftHighlightBgdColor = "#7a8aac";

// Style settings for note divs
var notePadding = "10px";
var noteMarginBottom = "5px";
var noteBackgroundColor = "#a3bc04";

var goToPage = null; // this means we're using Go to Section functionality


chapterStartSectionOffset = 1;

defaultFontSize = "12px";
defaultFontFace = "Verdana";

// KC: though, there will be a glossary eventually
var noGlossary = 1;

// Note that the following (up to "BM_END") is written out by the production console
// so don't change it
var bm = new Array();
bm[1] = '<option value="1">Chapter 1</option>';
bm[2] = '<option value="2">Chapter 2</option>';
bm[3] = '<option value="3">Chapter 3</option>';
bm[4] = '<option value="4">Chapter 4</option>';
bm[5] = '<option value="5">Chapter 5</option>';
bm[6] = '<option value="6">Chapter 6</option>';
bm[7] = '<option value="7">Chapter 7</option>';
bm[8] = '<option value="8">Chapter 8</option>';
bm[9] = '<option value="9">Chapter 9</option>';
bm[10] = '<option value="10">Chapter 10</option>';
bm[11] = '<option value="11">Chapter 11</option>';
bm[12] = '<option value="12">Chapter 12</option>';
bm[13] = '<option value="13">Chapter 13</option>';
bm[14] = '<option value="14">Chapter 14</option>';
bm[15] = '<option value="15">Chapter 15</option>';
bm[16] = '<option value="16">Chapter 16</option>';
bm[17] = '<option value="17">Chapter 17</option>';
bm[18] = '<option value="18">Chapter 18</option>';
bm[19] = '<option value="19">Chapter 19</option>';
bm[20] = '<option value="20">Chapter 20</option>';
bm[21] = '<option value="21">Chapter 21</option>';
bm[22] = '<option value="22">Chapter 22</option>';
bm[23] = '<option value="23">Chapter 23</option>';
bm[24] = '<option value="24">Chapter 24</option>';
bm[25] = '<option value="25">Chapter 25</option>';
bm[26] = '<option value="26">Chapter 26</option>';
bm[27] = '<option value="27">Chapter 27</option>';
bm[28] = '<option value="28">Chapter 28</option>';
bm[29] = '<option value="29">Chapter 29</option>';
bm[30] = '<option value="30">Chapter 30</option>';
bm[31] = '<option value="31">Chapter 31</option>';
bm[32] = '<option value="32">Chapter 32</option>';
bm[33] = '<option value="33">Chapter 33</option>';
bm[34] = '<option value="34">APPENDIX A</option>';
bm[35] = '<option value="35">APPENDIX B</option>';
bm[36] = '<option value="36">APPENDIX C</option>';
bm[37] = '<option value="37">APPENDIX D</option>';
bm[38] = '<option value="38">APPENDIX E</option>';
bm[39] = '<option value="39">APPENDIX F</option>';
bm[40] = '<option value="40">APPENDIX G</option>';
bm[41] = '<option value="41">APPENDIX H</option>';
bm[42] = '<option value="42">APPENDIX I</option>';
// BM_END

// stuff for writing notebook

// they don't want this after all
// var dqpromptStart = "<b>Writing Notebook:</b> ";

function WriteDQLinks(win, n) {
	/*
	win.document.write('<div style="margin:2px 0 5px 0">'
		, '<a class="ba" href="Javascript:top.RegisterDQAnswer(', CurrentChapter(), ', \'', n, '\', document.getElementById(\'ta', n, '\'))"" title="Save This Entry"><img src="../pics/saveentry.gif" border=0></a> '
		, '<a class="ba" href="Javascript:top.printText(document.getElementById(\'ta', n, '\').value)" title="Print This Window"><img src="../pics/print.gif" border=0></a> '
		, '<a class="ba" href="Javascript:top.ShowDQPrintable()" title="Show your responses for this chapter\'s Writing Notebook in a printable window."><img src="../pics/view.gif" border=0></a>'
		, '</div>');
	*/
	
	win.document.write('<div style="margin:2px 0 5px 0">'
		, '<a class="ba" href="Javascript:top.RegisterDQAnswer(', CurrentChapter(), ', \'', n, '\', document.getElementById(\'ta', n, '\'))"" title="Save This Answer">[Save Answer]</a> '
		, '<a class="ba" href="Javascript:top.printText(document.getElementById(\'ta', n, '\').value)" title="Print This Answer">[Print Answer]</a> '
		, '<a class="ba" href="Javascript:top.ShowDQPrintable()" title="Show your responses for all this chapter\'s questions in a printable window.">[Show All Answers]</a>'
		, '</div>');
}

function ShowChapterNotebook() {
	// need to change rw6e to rules6e when putting this on ebooks server
	var win = window.open(top.urlStart + "rw6e/allanswers.php?chapter=" + top.CurrentChapter() + "&accountId=" + top.accountId, "NotebookAnswers", "top=10,left=10,width=650,height=600,menubar,resizable,scrollbars,status", true);
}

function WriteChapterMenu() {
	for (var c = 1; c <= 42; ++c) {
			bannerrightF.document.write(bm[c]);
	}
}

WCM_END
// Write book-specific stuff for profs in the left-side TOC
function WriteBookSpecificLeftSideStuff() {
	return;

	chaptercontentsF.document.write('<div class="t1" style="margin-top:10px"><a class="tutorial" href="http://bcs.whfreeman.com/thelifewire/pages/bcs-main.asp?v=category&s=00520&n=99000&i=99520.01" target="_blank" style="font-weight:bold; color:#d4472a">&raquo; Online Quiz Gradebook</a></div>');
	
}

function ShowSolution(n, d) {
	if (d == null) {
		d = main.document;
	}
	SetDisplay(d.getElementById('sl' + n), 'none');
	SetDisplay(d.getElementById('sa' + n), 'block');
}
