// JavaScript Document

//This script counts the dexcriptive div's, blocks displays of contents of div's labeled p1, p2, ...
//It enables the display of the div with the page number p'n' corresponding to Show(n)


var count=0;      //descriptive div counter    

function Display( n) {          //display div
	if(!document.getElementById || !document.getElementsByTagName) return false;    //quit if javascript not DOM capable
	// alert(n);
	var x=document.getElementById('descriptions').getElementsByTagName("div");
	for(i=1; i<x.length+1; i++)
	  if (i==n) document.getElementById('p'+n).style.display = "block"  //display selected div
	  else document.getElementById('p'+i).style.display = "none";       //hide all others 	
}

function Show(j) {  //the mouse went over an anchor tag - display image

    if(!document.getElementById || !document.getElementsByTagName) return false;    //quit if javascript not DOM capable
	count=parseInt(j);        //restart slideshow at clicked image
	
	Display(j);	
}

//window.onload=function()       //call the show function to set the first display
//{Show('1');}