/* begin ana.js */

function setMode()
{
	var m= 'Current mode: ';

	if (spec == 0)
	{
		setActiveStyleSheet('print');
		writePrintFooter();
		spec= 1;
		m += '<a href= \"#\" onclick= \"setMode(); return false\">Print</a>.';
	}

	else if (spec == 1)
	{
		setActiveStyleSheet('spec');
		writePrintFooter();
		spec= 2;
		m += '<a href= \"#\" onclick= \"setMode(); return false\">Special</a>.';
	}

	else
	{
		setActiveStyleSheet('styles');
		writeFooter();
		spec= 0;
		m += '<a href= \"#\" onclick= \"setMode(); return false\">View</a>.';
	}

	if (document.all)
	{
		document.all.mode.innerHTML= m;
	}

	else if (document.getElementById)
	{
		document.getElementById('mode').innerHTML= m;
	}
}

function switchMode()
{
	var m= 'Current mode: ';

	if (spec == 0)
	{
		setActiveStyleSheet('print');
		writePrintFooter();
		spec= 1;
		m += '<a href= \"#\" onclick= \"switchMode(); return false\">Print</a>.';
	}

	else if (spec == 1)
	{
		setActiveStyleSheet('styles');
		writeFooter();
		spec= 0;
		m += '<a href= \"#\" onclick= \"switchMode(); return false\">View</a>.';
	}

	if (document.all)
	{
		document.all.mode.innerHTML= m;
	}

	else if (document.getElementById)
	{
		document.getElementById('mode').innerHTML= m;
	}
}

function writeAnaGloss()
{
	var mode= '<p id= \"mode\">Current mode: <a href= \"#\" onclick= ';

	mode += '\"switchMode(); return false\">View<\/a>.<\/p>';

	if (document.all)
	{
		document.all.anagloss.innerHTML= mode;
	}

	else if (document.getElementById)
	{
		document.getElementById('anagloss').innerHTML= mode;
	}
}

function writeAnaInfo(name, matt, mark, luke, john, other)
{
	var pagename= name;
	var mt= matt;
	var mk= mark;
	var lk= luke;
	var jn= john;
	var ot= other;

	var info= "";
	var inv= "";

	var top= "";
	var mid= "";
	var bot= "";

	var info= fillHeader() + '<hr noshade onclick= \"setAnaSheet(); return false\" ';

	info += 'onmouseover= \"hoverOverHR()\" onmouseout= "unHoverOverHR()\"/>';

	var goscount= 0;

	/* tag id's available on all syn pages: top, middle, bottom */

	if (mt == 'yes')
	{
		goscount++;
	}

	if (mk == 'yes')
	{
		goscount++;
	}

	if (lk == 'yes')
	{
		goscount++;
	}

	writeStyleCodes();

	info += '<h6>';

	if (mt == 'yes')
	{
		info += 'M';
	}

	if (mk == 'yes')
	{
		if (mt == 'yes')
		{
			info += '+K';
		}

		else
		{
			info += 'K';
		}
	}

	if (lk == 'yes')
	{
		if ((mt == 'yes') || (mk == 'yes'))
		{
			info += '+L';
		}

		else
		{
			info += 'L';
		}
	}

	if (jn == 'yes')
	{
		if ((mt == 'yes') || (mk == 'yes') || (lk == 'yes'))
		{
			info += ' (J)';
		}

		else
		{
			info += 'J only';
		}
	}

	info += '.<\/h6>';

	inv += '<p>Inventories: ';
	inv += '<a href= \"mattheanlistedinventory.html\">Matthew<\/a>, ';
	inv += '<a href= \"marcanlistedinventory.html\">Mark<\/a>, ';
	inv += '<a href= \"lucanlistedinventory.html\">Luke<\/a>, ';
	inv += '<a href= \"johanninelistedinventory.html\">John<\/a>, ';
	inv += '<a href= \"synopticitemizedinventory.html\">itemized<\/a>, ';
	inv += '<a href= \"synopticlistedinventory.html\">listed<\/a>, ';
	inv += '<a href= \"doubletraditioninventory.html\">Q<\/a>; ';
	inv += '<a href= \"mixedparallels.html\">mixed parallels<\/a>.';
	inv += '<\/p>';

	top= info;
	mid= inv;

	if (document.all)
	{
		document.all.top.innerHTML= top;
	}

	else if (document.getElementById)
	{
		document.getElementById('top').innerHTML= top;
	}

	if (document.all)
	{
		document.all.middle.innerHTML= mid;
	}

	else if (document.getElementById)
	{
		document.getElementById('middle').innerHTML= mid;
	}
}

function writeNoteQuoteInfo(name, matt, mark, luke, john)
{
	var pagename= name;
	var mt= matt;
	var mk= mark;
	var lk= luke;
	var jn= john;

	var info= "";
	var inv= "";
	var syn= "";

	var top= "";
	var mid= "";
	var bot= "";

	var goscount= 0;

	/* tag id's available on all notes & quotes pages: top, middle, bottom */

	if (mt == 'yes')
	{
		goscount++;
	}

	if (mk == 'yes')
	{
		goscount++;
	}

	if (lk == 'yes')
	{
		goscount++;
	}

	info += '<h6>';

	if (mt == 'yes')
	{
		info += 'M';
	}

	if (mk == 'yes')
	{
		if (mt == 'yes')
		{
			info += '+K';
		}

		else
		{
			info += 'K';
		}
	}

	if (lk == 'yes')
	{
		if ((mt == 'yes') || (mk == 'yes'))
		{
			info += '+L';
		}

		else
		{
			info += 'L';
		}
	}

	if (jn == 'yes')
	{
		if ((mt == 'yes') || (mk == 'yes') || (lk == 'yes'))
		{
			info += ' (J)';
		}

		else
		{
			info += 'J only';
		}
	}

	info += '.<\/h6>';

	inv += '<p>Inventories: ';
	inv += '<a href= \"mattheanlistedinventory.html\">Matthew<\/a>, ';
	inv += '<a href= \"marcanlistedinventory.html\">Mark<\/a>, ';
	inv += '<a href= \"lucanlistedinventory.html\">Luke<\/a>, ';
	inv += '<a href= \"synopticitemizedinventory.html\">itemized<\/a>, ';
	inv += '<a href= \"synopticlistedinventory.html\">listed<\/a>, ';
	inv += '<a href= \"doubletraditioninventory.html\">Q<\/a>.';
	inv += '<\/p>';

	syn += '<p><a href= \"syn' + pagename + '.html\">Synoptic text<\/a>.<br\/>';
	syn += 'Analytic text not yet available.<\/p>';

	top= info;
	mid= inv + syn;

	if (document.all)
	{
		document.all.top.innerHTML= top;
	}

	else if (document.getElementById)
	{
		document.getElementById('top').innerHTML= top;
	}

	if (document.all)
	{
		document.all.middle.innerHTML= mid;
	}

	else if (document.getElementById)
	{
		document.getElementById('middle').innerHTML= mid;
	}
}

function setAnaSheet()
{
	if (print == 0)
	{
		setActiveStyleSheet('blankprint');
		writePrintFooter();
		writePrintCodes();
		print= 1;
	}

	else
	{
		setActiveStyleSheet('carlson4');
		writeFooter();
		writeStyleCodes();
		print= 0;
	}
}

function showSel(sel)
{
	var x= sel;

	if (document.all)
	{
		document.all.myselect.innerHTML= x;
	}

	else if (document.getElementById)
	{
		document.getElementById('myselect').innerHTML= x;
	}
}

function writeStyleCodes()
{
	var s= "";

	s += '<div style= \"float: right; margin-right: 5px; margin-left: 30px; margin-bottom: 15px; ';
	s += 'width: 40%; clear: all\">';
	s += '<span style= \"text-decoration: underline\"><b>Key.<\/b><\/span><br\/><br\/>';
	s += '<div class= \"gospelkey\">';
	s += '<b>M<\/b>= <span class= \"mt\"><span class= \"m\">Matthew<\/span><\/span>.<br\/>';
	s += '<b>K<\/b>= <span class= \"mk\"><span class= \"k\">Mark<\/span><\/span>.<br\/>';
	s += '<b>L<\/b>= <span class= \"lk\"><span class= \"l\">Luke<\/span><\/span>.<br\/>';
	s += '<b>M+K<\/b>= <span class= \"mt\"><span class= \"k\">Matthew<\/span><\/span> & ';
	s += '<span class= \"mk\"><span class= \"m\">Mark<\/span><\/span>.<br\/>';
	s += '<b>M+L<\/b>= <span class= \"mt\"><span class= \"l\">Matthew<\/span><\/span> & ';
	s += '<span class= \"lk\"><span class= \"m\">Luke<\/span><\/span>.<br\/>';
	s += '<b>K+L<\/b>= <span class= \"mk\"><span class= \"l\">Mark<\/span><\/span> & ';
	s += '<span class= \"lk\"><span class= \"k\">Luke<\/span><\/span>.<br\/>';
	s += '<b>M+K+L<\/b>= <span class= \"mt\">Matthew<\/span>, ';
	s += '<span class= \"mk\">Mark<\/span>, & ';
	s += '<span class= \"lk\">Luke<\/span>.<\/div><\/div>';

	s += '<p>Available coding formats:</p>';
	s += '<ul>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Carlson four-color scheme.\'); ';
	s += 'setActiveStyleSheet(\'carlson4\'); return false\">';
	s += 'Carlson<sup>4<\/sup><\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Carlson seven-color scheme.\'); ';
	s += 'setActiveStyleSheet(\'carlson7\'); return false\">';
	s += 'Carlson<sup>7<\/sup><\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Goodacre seven-color scheme.\'); ';
	s += 'setActiveStyleSheet(\'goodacre7\'); return false\">';
	s += 'Goodacre<sup>7<\/sup><\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Highlights.\'); ';
	s += 'setActiveStyleSheet(\'slot2\'); return false\">';
	s += 'Highlights<\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Colorless scheme.\'); ';
	s += 'setActiveStyleSheet(\'colorless\'); return false\">';
	s += 'Colorless<\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Colorless neutral scheme.\'); ';
	s += 'setActiveStyleSheet(\'slot1\'); return false\">';
	s += 'Colorless neutral<\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Blank scheme.\'); ';
	s += 'setActiveStyleSheet(\'blank\'); return false\">';
	s += 'Blank<\/a>.<\/li>';
	s += '<\/ul>';

	s += '<p>Current format: ';
	s += '<span id= \"myselect\">Carlson four-color scheme.<\/span><br\/>';
	s += 'Current mode: <a href= \"#\" onclick= \"setAnaSheet(\'blankprint\'); return false\">';
	s += 'View<\/a>.<\/p>';

	if (document.all)
	{
		document.all.syncodes.innerHTML= s;
	}

	else if (document.getElementById)
	{
		document.getElementById('syncodes').innerHTML= s;
	}
}

function writePrintCodes()
{
	var s= "";

	s += '<div style= \"float: right; margin-right: 5px; margin-left: 30px; margin-bottom: 15px; ';
	s += 'width: 40%; clear: all\">';
	s += '<span style= \"text-decoration: underline\"><b>Key.<\/b><\/span><br\/><br\/>';
	s += '<div class= \"gospelkey\">';
	s += '<b>M<\/b>= <span class= \"mt\"><span class= \"m\">Matthew<\/span><\/span>.<br\/>';
	s += '<b>K<\/b>= <span class= \"mk\"><span class= \"k\">Mark<\/span><\/span>.<br\/>';
	s += '<b>L<\/b>= <span class= \"lk\"><span class= \"l\">Luke<\/span><\/span>.<br\/>';
	s += '<b>M+K<\/b>= <span class= \"mt\"><span class= \"k\">Matthew<\/span><\/span> & ';
	s += '<span class= \"mk\"><span class= \"m\">Mark<\/span><\/span>.<br\/>';
	s += '<b>M+L<\/b>= <span class= \"mt\"><span class= \"l\">Matthew<\/span><\/span> & ';
	s += '<span class= \"lk\"><span class= \"m\">Luke<\/span><\/span>.<br\/>';
	s += '<b>K+L<\/b>= <span class= \"mk\"><span class= \"l\">Mark<\/span><\/span> & ';
	s += '<span class= \"lk\"><span class= \"k\">Luke<\/span><\/span>.<br\/>';
	s += '<b>M+K+L<\/b>= <span class= \"mt\">Matthew<\/span>, ';
	s += '<span class= \"mk\">Mark<\/span>, & ';
	s += '<span class= \"lk\">Luke<\/span>.<\/div><\/div>';

	/* s += '<br\/><p style= \"float: right\">Coding format:&#160;';
	s += '<select name= \"codestyles\" ';
	s += 'onchange= \"setActiveStyleSheet(this.options[this.selectedIndex].value)\">';
	s += '<option value= \"carlson4print\">Carlson 4.<\/option>';
	s += '<option value= \"carlson7print\">Carlson 7.<\/option>';
	s += '<option value= \"goodacre7print\">Goodacre 7.<\/option>';
	s += '<option value= \"colorlessprint\">Colorless.<\/option>';
	s += '<option value= \"blankprint\" selected>Blank.<\/option>';
	s += '<\/select><\/p>'; */

	s += '<p>Available coding formats:</p>';
	s += '<ul>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Carlson four-color scheme.\'); ';
	s += 'setActiveStyleSheet(\'carlson4print\'); return false\">';
	s += 'Carlson<sup>4<\/sup><\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Carlson seven-color scheme.\'); ';
	s += 'setActiveStyleSheet(\'carlson7print\'); return false\">';
	s += 'Carlson<sup>7<\/sup><\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Goodacre seven-color scheme.\'); ';
	s += 'setActiveStyleSheet(\'goodacre7print\'); return false\">';
	s += 'Goodacre<sup>7<\/sup><\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Highlights.\'); ';
	s += 'setActiveStyleSheet(\'slot2print\'); return false\">';
	s += 'Highlights<\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Colorless scheme.\'); ';
	s += 'setActiveStyleSheet(\'colorlessprint\'); return false\">';
	s += 'Colorless<\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Colorless neutral scheme.\'); ';
	s += 'setActiveStyleSheet(\'slot1print\'); return false\">';
	s += 'Colorless neutral<\/a>.<\/li>';
	s += '<li><a href= \"index.html\" onclick= \"showSel(\'Blank scheme.\'); ';
	s += 'setActiveStyleSheet(\'blankprint\'); return false\">';
	s += 'Blank<\/a>.<\/li>';
	s += '<\/ul>';

	s += '<p>Current format: ';
	s += '<span id= \"myselect\">Blank scheme.<\/span><br\/>';
	s += 'Current mode: <a href= \"#\" onclick= \"setAnaSheet(\'carlson4\'); return false\">';
	s += 'Print<\/a>.<\/p>';

	if (document.all)
	{
		document.all.syncodes.innerHTML= s;
	}

	else if (document.getElementById)
	{
		document.getElementById('syncodes').innerHTML= s;
	}
}

/* end ana.js */