// JavaScript Document


//This script counts the buttons, blocks displays of contents of div's label p1, p2, ...
//It enables the display of the div with the page number p'n' corresponding to Show(n)
//The thumbnail corresponding to 'n' also is highlighted in a darker border.


var count=0;      //slideshow image counter    

function Show( n) {          //display big image
	if(!document.getElementById || !document.getElementsByTagName) return false;    //quit if javascript not DOM capable
	var x=document.getElementById('buttonArea').getElementsByTagName("div");
	for(i=0; i<x.length; i++)
	  if (i==n) document.getElementById('p'+n).style.display = "block"  //display selected area
	  else document.getElementById('p'+i).style.display = "none";       //hide all others 
	for (var i=0;i<x.length;i++)  
	  if(i!=(n)) x[i].style.backgroundColor="#FFE0A0";  //make colored border same color as background
	x[n].style.backgroundColor="#E19800";               //put blue border around selected thumbnail
}


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