function numItems(zString,itemDelimeter)
// return the number of items in zString
{
	zStringLength = zString.length;
	zMatchItems = 0;
	for (var N = 1; N <= zStringLength; N++)
	{
	if (zString.charAt(N) == itemDelimeter) {zMatchItems++}
	}
return (zMatchItems);
}

function getItem(itemNum,zString,itemDelimeter)
{
	zStringLength = zString.length;
	zMatchItems = 0;
	prevPos = 0;
	currentPos = -1;

	for (var N = 1; N <= zStringLength; N++)
	{
		if (zString.charAt(N) == itemDelimeter) {prevPos = currentPos; currentPos = N; zMatchItems++}
		if (zMatchItems == itemNum) {break}
	}

	if (N > zStringLength) {prevPos = currentPos; currentPos = (N - 1);}
	prevPos = (prevPos + 1);
	zResult = zString.substring(prevPos,currentPos);
	return (zResult);
}

pageURL= document.URL;
moreTxt = '';
numSlashes = numItems(pageURL,'/');
slashPos = numSlashes + 1;
fileName = getItem(slashPos,pageURL,'/');


document.write('** TV Show Episodes **<BR>');

document.write('<A HREF="http://bhnj.com/hiyt/volume1/hiyt.html">Episode 1</A> | <A HREF="http://www.bhnj.com/hiyt/hiyt.html">Episode 2</A> | <A HREF="http://www.bhnj.com/tvshow/index.html">Episode 3</A><br>&nbsp;<br> ');

document.write('** Show Segments **<BR>');

if (fileName !="01.html")
	{	document.write('<A HREF="01.html">Introduction</A><BR>');	}
	else
	{	document.write('<I><B>Introduction</B></I><BR>');	}

document.write('Homes: ');

if (fileName !="02-01.html")
	{	document.write('<A HREF="02-01.html">Part 1</A>, ');	}
	else
	{	document.write('<I><B>Part 1</B></I>, ');	}

if (fileName !="02-02.html")
	{	document.write('<A HREF="02-02.html">Part 2</A>, ');	}
	else
	{	document.write('<I><B>Part 2</B></I>, ');	}

if (fileName !="02-03.html")
	{	document.write('<A HREF="02-03.html">Part 3</A>, ');	}
	else
	{	document.write('<I><B>Part 3</B></I>, ');	}

if (fileName !="02-04.html")
	{	document.write('<A HREF="02-04.html">Part 4</A><BR> ');	}
	else
	{	document.write('<I><B>Part 4</B></I><BR> ');	}



document.write('Homes in Your Town: ');

if (fileName !="03-01.html")
	{	document.write('<A HREF="03-01.html">Tradition</A><br> ');	}
	else
	{	document.write('<I><B>Tradition</B></I><br> ');	}
	
if (fileName !="03-02.html")
	{	document.write('<A HREF="03-02.html">Transaction Insurance</A>, ');	}
	else
	{	document.write('<I><B>Transaction Insurance</B>, </I>  ');	}

if (fileName !="03-04.html")
	{	document.write('<A HREF="03-04.html">On the Web</A><BR>');	}
	else
	{	document.write('<I><B>On the Web</B></I><BR>');	}
	


document.write('On Location: ');

if (fileName !="04-01.html")
	{	document.write('<A HREF="04-01.html">Livingston</A>, ');	}
	else
	{	document.write('<I><B>Livingston</B></I>, ');	}
	
	
if (fileName !="04-02.html")
	{	document.write('<A HREF="04-02.html">West Long Branch</A>, ');	}
	else
	{	document.write('<I><B>West Long Branch</B></I>, ');	}

if (fileName !="04-03.html")
	{	document.write('<A HREF="04-03.html">Monmouth Beach</A><BR>');	}
	else
	{	document.write('<I><B>Monmouth Beach</B></I><BR>');	}
	
	
document.write('Our Advertisers: ');

	
if (fileName !="05-01.html")
	{	document.write('<A HREF="05-01.html">Bacchus</A>');	}
	else
	{	document.write('<I><B>Bacchus</B></I> ');	}



