/* begin syn.js */

var analyticlist= new Array
("johnbaptist", "dummy2");

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 writeSynInfo(name, matt, mark, luke, john)
{
	var pagename= name;
	var mt= matt;
	var mk= mark;
	var lk= luke;
	var jn= john;

	var info= fillHeader() + '<hr noshade onclick= \"setSynSheet(); return false\" ';

	info += 'onmouseover= \"hoverOverHR()\" onmouseout= "unHoverOverHR()\"/>';

	var inv= "";
	var astdag= "";

	var top= "";
	var mid= "";
	var bot= "";

	var goscount= 0;

	/* the following two variables are unused as yet */

	var kind= pagename.substring(0,3);
	var title= pagename.substring(0,pagename.length);

	/* 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>';

	astdag += '<p class= \"note\">Verses transposed within the same pericope are placed ';
	astdag += 'in brackets [].<br\/>';
	astdag += 'Verses brought in from other pericopes are placed in braces {}.<br\/>';
	astdag += 'An asterisk * marks parallel words or phrases not ';
	astdag += 'located within one line of each other between the synoptic gospels.<br\/>';
	astdag += 'A single &#134; or double &#135; dagger coordinates columns from separate ';
	astdag += 'synopses which contain parallels.<br\/>If a third symbol is needed for such ';
	astdag += 'coordination, the currency marker &#164; is used.<br\/>';
	astdag += 'Not every synopsis will have any or all of these markers.<\/p>';
	/* astdag += '<p>' + kind + ' ' + title + '<\/p>'; */

	top= info;
	mid= astdag + 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;
	}

	if (vari= getCookie('synopselect'))
	{
		if (vari == 'carlson4')
		{
			showSel('Carlson four-color scheme.');
			setActiveStyleSheet('carlson4');
		}

		else if (vari == 'carlson7')
		{
			showSel('Carlson seven-color scheme.');
			setActiveStyleSheet('carlson7');
		}

		else if (vari == 'goodacre7')
		{
			showSel('Goodacre seven-color scheme.');
			setActiveStyleSheet('goodacre7');
		}

		else if (vari == 'slot2')
		{
			showSel('Highlights scheme.');
			setActiveStyleSheet('slot2');
		}

		else if (vari == 'colorless')
		{
			showSel('Colorless scheme.');
			setActiveStyleSheet('colorless');
		}

		else if (vari == 'slot1')
		{
			showSel('Colorless neutral scheme.');
			setActiveStyleSheet('slot1');
		}

		else if (vari == 'blank')
		{
			showSel('Blank scheme.');
			setActiveStyleSheet('blank');
		}
	}
}

function writeNoteQuoteInfo(name, matt, mark, luke, john)
{
	var pagename= name;
	var mt= matt;
	var mk= mark;
	var lk= luke;
	var jn= john;

	var info= fillHeader() + '<hr noshade onclick= \"switchMode(); return false\" ';

	info += 'onmouseover= \"hoverOverHR()\" onmouseout= "unHoverOverHR()\"/>';

	var inv= "";
	var syn= "";

	var top= "";
	var mid= "";
	var bot= "";

	var goscount= 0;

	var analink= "no";

	for (x=0; x<analyticlist.length; ++x)
	{
		if (analyticlist[x] == pagename)
		{
			analink= "yes";
		}
	}

	/* 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= \"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>';

	syn += '<p>';
	syn += '<a href= \"syn' + pagename + '.html\">Synoptic text<\/a>.<br\/>';

	if (analink == "yes")
	{
		syn += '<a href= \"ana' + pagename + '.html\">Analytic text<\/a>.';
	}

	else
	{
		syn += 'Analytic text not available.';
	}

	syn += '<\/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 setSynSheet()
{
	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 ';

	s += '(<a href= \"pagecustomizer.html\" onclick= \"window.open';
	s += '(\'pagecustomizer.html\', \'pagecustomizer\', ';
	s += '\'copyhistory=0,directories=0,location=0,menubar=0,resizable=1,'
	s += 'scrollbars=1,status=0,toolbar=0\'); return false\">';
	s += 'customize<\/a>)';
	s += ':<\/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 scheme.\'); ';
	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= \"setSynSheet(\'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= \"setSynSheet(\'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 syn.js */