<!--
var mmax = 13;
var dcookie = 0;


function nextshot()
{
  var v;
	v = dcookie;
	
	if (v < mmax)
	{
	  v++;
	  dcookie = v;
	}  
	
	showtitle();
	showheading();
	showshot();
	shownext();
	showprev();
}

function prevshot()
{
  var v;
	v = dcookie;
	
	if (v > 0)
	{
	  v--;
	  dcookie = v;
	}  
		
	
	showtitle();
	showheading();
	showshot();
	shownext();
	showprev();
}

function showtitle()
{
  var c;
    c = dcookie;

	if (c == 1)
		  titlediv.innerHTML = ("Station II");
	else if (c == 2)
		  titlediv.innerHTML = ("Station III");
	else if (c == 3)
		  titlediv.innerHTML = ("Station IV");
	else if (c == 4)
		  titlediv.innerHTML = ("Station V");
	else if (c == 5)
		  titlediv.innerHTML = ("Station VI");
	else if (c == 6)
		  titlediv.innerHTML = ("Station VII");
	else if (c == 7)
		  titlediv.innerHTML = ("Station VIII");
	else if (c == 8)
		  titlediv.innerHTML = ("Station IX");
	else if (c == 9)
		  titlediv.innerHTML = ("Station X");
	else if (c == 10)
		  titlediv.innerHTML = ("Station XI");
	else if (c == 11)
		  titlediv.innerHTML = ("Station XII");
	else if (c == 12)
		  titlediv.innerHTML = ("Station XIII");
	else if (c == 13)
		  titlediv.innerHTML = ("Station XIV");
	else
		  titlediv.innerHTML = ("Station I");
}

function showheading()
{
  var c;
    c = dcookie;

	if (c == 1)
		  headingdiv.innerHTML = ("Jesus praying in the Garden of Jetsemani.");
	else if (c == 2)
		  headingdiv.innerHTML = ("Jesus betrayed by Judas.");
	else if (c == 3)
		  headingdiv.innerHTML = ("Jesus is sentenced to death.");
	else if (c == 4)
		  headingdiv.innerHTML = ("Jesus meets his Mother, Mary.");
	else if (c == 5)
		  headingdiv.innerHTML = ("Jesus collapses underneath his Cross.");
	else if (c == 6)
		  headingdiv.innerHTML = ("Jesus meets the women from Jerusalem.");
	else if (c == 7)
		  headingdiv.innerHTML = ("Jesus is helped to carry the cross.");
	else if (c == 8)
		  headingdiv.innerHTML = ("Jesus is undressed from His Clothes.");
	else if (c == 9)
		  headingdiv.innerHTML = ("Jesus is nailed to the cross.");
	else if (c == 10)
		  headingdiv.innerHTML = ("Jesus dies on the Cross.");
	else if (c == 11)
		  headingdiv.innerHTML = ("The body of Jesus in His Mother's arms.");
	else if (c == 12)
		  headingdiv.innerHTML = ("Jesus is buried in a new tomb.");
	else if (c == 13)
		  headingdiv.innerHTML = ("Jesus rises invincible over death.");
	else
		  headingdiv.innerHTML = ("Jesus performs the Eucharistic Sacrament for the first time.");
}

function showshot()
{
  var c;
  
   c = dcookie;
 
	if (c == 1)
		  imagediv.innerHTML = ("<img src='stz2.jpg' align='middle' alt='Station II'>");
	else if (c == 2)
		  imagediv.innerHTML = ("<img src='stz3.jpg' align='middle' alt='Station III'>");
	else if (c == 3)
		  imagediv.innerHTML = ("<img src='stz4.jpg' align='middle' alt='Station IV'>");
	else if (c == 4)
		  imagediv.innerHTML = ("<img src='stz5.jpg' align='middle' alt='Station V'>");
	else if (c == 5)
		  imagediv.innerHTML = ("<img src='stz6.jpg' align='middle' alt='Station VI'>");
	else if (c == 6)
		  imagediv.innerHTML = ("<img src='stz7.jpg' align='middle' alt='Station VII'>");
	else if (c == 7)
		  imagediv.innerHTML = ("<img src='stz8.jpg' align='middle' alt='Station VIII'>");
	else if (c == 8)
		  imagediv.innerHTML = ("<img src='stz9.jpg' align='middle' alt='Station IX'>");
	else if (c == 9)
		  imagediv.innerHTML = ("<img src='stz10.jpg' align='middle' alt='Station X'>");
	else if (c == 10)
		  imagediv.innerHTML = ("<img src='stz11.jpg' align='middle' alt='Station XII'>");
	else if (c == 11)
		  imagediv.innerHTML = ("<img src='stz12.jpg' align='middle' alt='Station XII'>");
	else if (c == 12)
		  imagediv.innerHTML = ("<img src='stz13.jpg' align='middle' alt='Station XIII'>");
	else if (c == 13)
		  imagediv.innerHTML = ("<img src='stz14.jpg' align='middle' alt='Station XIV'>");
	else
		  imagediv.innerHTML = ("<img src='stz1.jpg' align='middle' alt='Station I'>");
}

function showdescr()
{
}

function shownext()
{
  var c;
  c = dcookie;
	
	if (c < mmax)
	{
		nextdiv.innerHTML = ('<a href="#" class="nextprev" style="text-align : right" onclick="nextshot()"><img src="next.gif" border="0"></a>');
	}
	else
	{
		nextdiv.innerHTML = ('  ');
    }
}

function showprev()
{
  var c;
  
    c = dcookie;
	
	if (c > 0)
	{
		prevdiv.innerHTML = ('<a href="#" class="nextprev" style="text-align : right" onclick="prevshot()"><img src="prev.gif" border="0"></a>');
	}
	else
	{
		prevdiv.innerHTML = ('  ');
    }
}

var SanctuaryDivOpen = false;
var PublicationsDivOpen = false;


function moverSanctuaryDiv()
{
  if (!SanctuaryDivOpen)
  {	
    openSanctuaryDiv();
	SanctuaryDivOpen = true;
  }
}


function moutSanctuaryDiv()
{
  var x, y;
  var width;
  var xmin;
    
  width = window.document.body.clientWidth;
  
  if (width <= 770)
    xmin = 63;
  else
  {
    xmin = (width / 2) - (770 / 2) + 63;
  }
  
  x = event.clientX + document.body.scrollLeft;
  y = event.clientY + document.body.scrollTop;
    
  if ((SanctuaryDivOpen)  && ((y < 277) || (y > 330)  || (x < xmin) || (x > (xmin + 173))))
  {
    closeSanctuaryDiv();
	SanctuaryDivOpen = false;
  }
}


function openSanctuaryDiv()
{  
  
	SanctuaryDiv.innerHTML = 		          
			 	 '   <li><a href = "../sanctuary/sanctuary.html" class="list"> The Sanctuary</a></li>' +
				 '<table align="right" width="100%" cellpadding="0" cellspacing="0" onmouseout="moutSanctuaryDiv()">' +
				 '  <tr><td height="10" colspan="2"></td></tr>' +
				 '  <tr>' +
				 '   <td width="20%"></td>' + 
				 '   <td><a href = "../history/history.html" class="sublist">History</a></td>' +
				 '  </tr>' +
				 '  <tr>' +
				 '   <td height="5"></td>' +
				 '  </tr>' +
				 '</table>';
}


function closeSanctuaryDiv()
{
	SanctuaryDiv.innerHTML = 		          
			 	 '   <li><a href = "../sanctuary/sanctuary.html" class="list"> The Sanctuary</a></li>';
}

function moverPublicationsDiv()
{
  if (!PublicationsDivOpen)
  {
    openPublicationsDiv();
	PublicationsDivOpen = true;
  }
}


function moutPublicationsDiv()
{
  var x, y;
  var width;
  var xmin;
    
  width = window.document.body.clientWidth;
  
  if (width <= 770)
    xmin = 63;
  else
  {
    xmin = (width / 2) - (770 / 2) + 63;
  }
  
  x = event.clientX + document.body.scrollLeft;
  y = event.clientY + document.body.scrollTop;
  
//  alert ("y = " + y);
  
  if ((PublicationsDivOpen) && ((y < 467) || (y > 580) || (x < xmin) || (x > (xmin + 173))))
  {
    closePublicationsDiv();
	PublicationsDivOpen = false;
  }
}


function openPublicationsDiv()
{
  
	PublicationsDiv.innerHTML = 		          
			 	 '   <li><a href = "../publications/publications.html" class="list">Ta Pinu Publications</a></li>' +
				 '<table align="right" width="100%" cellpadding="0" cellspacing="0">' +
				 '  <tr>' +
				 '   <td height="10"></td>' +
				 '  </tr>' +
				 '  <tr>' +
				 '   <td width="20%"></td>' + 
				 '   <td><a href = "../publications/books.html" class="sublist">Books</a></td>' +
				 '  </tr>' +
				 '  <tr>' +
				 '   <td height="10"></td>' +
				 '  </tr>' +
				 '  <tr>' +
				 '   <td width="20%"></td>' + 
				 '   <td><a href = "../publications/cds.html" class="sublist">Music CDs</a></td>' +
				 '  </tr>' +
				 '  <tr>' +
				 '   <td height="10"></td>' +
				 '  </tr>' +
				 '  <tr>' +
				 '   <td width="20%"></td>' + 
				 '   <td><a href = "../publications/periodical.html" class="sublist">Periodical</a></td>' +
				 '  </tr>' +
				 '  <tr>' +
				 '   <td height="10"></td>' +
				 '  </tr>' +
				 '  <tr>' +
				 '   <td width="20%"></td>' + 
				 '   <td><a href = "../publications/writingpads.html" class="sublist">Writing Pads</a></td>' +
				 '  </tr>' +
				 '  <tr>' +
				 '   <td height="5"></td>' +
				 '  </tr>' +
				 '</table>';
}


function closePublicationsDiv()
{
	PublicationsDiv.innerHTML = 		          
			 	 '   <li><a href = "../publications/publications.html" class="list">Ta Pinu Publications</a></li>';
}



function showPhotoWin(photosrc, mgx, mgy)
{  //open a new window with the photo

  var content;
  var Imgx, Imgy;
  var winx, winy;
  var winattrs;
  var win;
  
  Imgx = mgx + 50;
  Imgy = mgy + 70;
  
  winx = "width = " + Imgx;
  winy = "height = " + Imgy;
  winattrs = "location=0, menbar=0, toolbar=0, resizable=1, scrollbars=1, " + winx + ", " + winy;
   
  win = window.open ("", "PhotoWin", winattrs);
  win.document.open();
  
  
  posx = (screen.width/2) - (Imgx/2);
  posy = (screen.height/2) - (Imgy/2);
  
  win.resizeTo (Imgx, Imgy);
  win.moveTo (posx, posy);
  
  content = 
	  '<HTML>' +
	   '<head>' +
	    '<title>Photos</title>' +
	   '</head>' +
	   '<body>' +
	     '<img src=' + photosrc + '>' +
	   '</body>' +
	  '</HTML>';
  
  
  win.document.write (content);
}


function ValidateForm()
{
  if (document.fmessage.name.value == "")
  {
    alert ("No name entered! Please enter a name and try again.");
	return false;
  }

  if (document.fmessage.message.value == "")
  {
    alert ("No message entered! Please enter a message and try again.");
	return false;
  }
  
  return true;
}


-->