/* This script makes the index portion of the Wildflower page as an HTML table in numCols columns.You must call the entry() function for each flower.  Create a file of entry() calls by searching for all occurences of "title(" in all the files, copying the search results to the inside of the allIndex() function in all_index.js, and runningthe BBEdit pattern "Wildflowers: Make Index" on those results.  This file requires you to first import wildflower_catalog.js.  Usage<script src="scripts/wildflower_catalog.js"><\/script><script src="scripts/make_index.js"><\/script>and later down...makeIndex();*/var lastFile = '';var numCols = 3;var colCount = 2;var page = 0;// This gets called from all_index.js, once for each flower function entry(file, common, latin, altLabel) {	parsedName = parseName(common, true);	if (lastFile != file) {		if (++colCount >= numCols) {			if (page != 0) document.write('<\/font><\/TD><\/TR>');			document.write('<TR VALIGN="top">');			colCount = 0;		} else {			document.write('<\/font><\/TD>');		}		i = file.lastIndexOf('.');		fn = file.substr(0,i);		if (fn == 'gr-gr') fn = 'Grasses';		if (fn == 'ga-ga') fn = 'Garden';		ch = fn.substr(0,1).toUpperCase();		fn = ch + fn.substr(1);		j = fn.indexOf('-');		if (j >= 0) 			fn = fn.substr(0,j) + '-' + fn.substr(j+1,1).toUpperCase() + fn.substr(j+2);		document.write('\n<TD><A NAME="' + page + '"><\/A><CENTER>\				<B><A HREF="catalog/'+file+'">Page '+ ++page + ' (' + fn + ')' +				'<\/A><\/B></CENTER><font size="-1">');		lastFile = file;	}	document.write('<br>\n<a href="catalog/' + file + '#' + 					getLabel(introLabel, altLabel) + '">' + parsedName + '<\/a>');	if (latin != null && latin.length != 0) document.write(' (<I>' + latin + '<\/I>)');}// This gets called from wildflowers.html where the index is to appearfunction makeIndex() {	document.write('<TABLE border="1" CELLPADDING="8" style="margin-top: 5px;">');	allIndex(); // defined in all_index.js	// finish up the last row, if needed, so cell borders appear	while (++colCount < numCols) { 		document.write('<\/TD><TD>&nbsp;');	} 	document.write('<\/TD><\/TR><\/TABLE>');}