//copyright Rober M. Hanson, St. Olaf College 12:00 AM 1/8/2003
//this file cannot be accessed directly; use index.htm instead
//rev. 6:52 AM 3/7/2003 key links sort problem and arrow click
//rev. 5:28 AM 3/18/2003 adds _xxx#n and image clicks for CI[] access.

//debugging: search for #203, for example, to see entry #203; #0 gives all

if(top==self)location="index.htm"	//force frames

nChapters=13
CHAPTERTYPE="chapter"
Practice=0
ChapterTools=0
Summaries=0
SimInfo=0

msg="<p>Please note: This page is still in preparations.<br><a href=mailto:hansonr@stolaf.edu>Feedback</a> is appreciated.<br>"
 +"Current development: Index terms and scripts for chapters 12 and 13"

//symbol.js generates the correct browser-dependent HTML code for Greek letters.
DELTA=sym("D")
MINUS=sym("-")
NU=sym("n")
MU=sym("m")

//debugging only:
sJS=""
ishowindexnumber=false && true
ishowindexbypage=false && true
icreatejslist=false
icreatejsallfromchapter=9
indexlistisalphabetical=true

//chapterdata constants
Temp=new Array()
KeyConcepts=new Array() //constant array
ChapterTitle=new Array()//constant array, from chaptertitles
ChapterTools=new Array()
Scripts=new Array()
WebTools=new Array()
PCTools=new Array()
jsdir="../js/"
pcdir="../pc/"

//indexdata constants
Names=new Array()	//first names for allowing "," in phrase
IndexData=new Array()   //constant array, but sort changes
IndexByKey=new Array()
IndexByPage=new Array()

//textdata constants
CI=new Array()		//concept info array

//global constants:
indent="&nbsp;&nbsp;"	//for createIndex()
maxlist=5		//for createIndex()

depth=0			//for showall()
depthmax=2		//for showall()
nmax=1000		//for showall()
nlines=0		//for showall()

//gobal variables:
Concepts=new Array()	//variable numerical listing for hrefs
ConceptInfo=new Array()	//concept list for currently displayed index
ChapterList=new Array() //represents selections, from getChapterList()
PageInfo=new Array()	//points to script
SelectedItems=new Array() //for createIndex
lastdata0=""		//for addinfo()
lastdata1=""
lastdata2=""
thischapter=parseInt((parent.location+"?").split("?")[1])
if(!thischapter)thischapter=0	//set to -n to run multiple chapters

sout=""			//for debugging only
idodups=true|| false	//this is experimental--not show duplicates
idokeyconceptsonly=false
idokeylinksonly=false
idosortbypage=false
idosearchindex=false
idosearchinfo=false
thesearch=""
nconcepts=0
nPages=0
isallchapters=false
isanimating=false
scripttype=1
scripting=false
thisScript=""
thisScriptN=0
ScriptList=new Array()
CHAPTERLISTHEADER="Select one or more chapters to view an index or list of concepts, tools, or links.<p>"

//functions

function getChapterSelectList(){
 var s="<select size=14 name=chap MULTIPLE>"
 for(var i=0;i<ChapterTitle.length;i++)s+="<option value="+i+(i==thischapter?" selected":"")+">"+ChapterTitle[i]+"</option>"
 s+="</select><br>"
 s+="<input type=button value=\"Scripts\" onclick=parent.fraCode.doselectch(5)>"
 s+="<input type=button value=\"Key Concepts\" onclick=parent.fraCode.doselectch(1)>"
 s+="<input type=button value=\"Tools\" onclick=parent.fraCode.doselectch(4)>"
 s+="<input type=button value=\"Key Links\" onclick=parent.fraCode.doselectch(2)>"
 s+="<input type=button value=Index onclick=parent.fraCode.doselectch(0)>"
 s+="<input type=button value=\"Search Text\" onclick=parent.fraCode.doselectch(3)>"
 s+="<p><b>Scripts</b> are concept-based \"slide shows\" displayed in printable form."
 s+="<p><b>Key Concepts</b> are index terms identified to be especially important."
 s+="<p><b>Tools</b> are web-based or Windows-based exercises and simulations."
 s+="<p><b>Key Links</b> are links in <i>other</i> chapters to key concepts in the specified chapter(s)."
 s+="<p><small>"+msg+"</small>"
 return s
}

function showform(){
 var s="Chapter(s): <input type=text size=10 name=ch value=1-13>"
 s+="&nbsp;&nbsp;<a class=btn href=javascript:dolistscripts()>Scripts</a>"
 s+="&nbsp;&nbsp;<a class=btn href=javascript:dokeyconcepts()>Concepts</a>"
 s+="&nbsp;&nbsp;<a class=btn href=javascript:dogettools()>Tools</a>"
 s+="&nbsp;&nbsp;<a class=btn href=javascript:dokeylinks()>Links</a>"
 s+="&nbsp;&nbsp;<a class=btn href=javascript:dofullindex(0)>Index</a>"
 s+="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type=text size=10 name=srch value=''> <a class=btn href=javascript:dosearch(0)>Search Index</a>"
 s+="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<a class=btn href=javascript:dogetchapterlist()>Chapter List</a>"
 s+="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class=btn href=javascript:dofullindex(-1)>Complete Book Index</a>"
 document.write(s)
}

