// JavaScript Document

//This script counts the thumbnail images, 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.


function Show(n) {
var x=document.getElementById('tnails').getElementsByTagName("img");
for(i=1; i<x.length+1; i++)
  if (i==n) document.getElementById('p'+n).style.display = "block"  //display selected photograph
  else document.getElementById('p'+i).style.display = "none";       //hide all others 
for (var i=0;i<x.length;i++)  
  if(i!=(n-1)) x[i].style.borderColor="#EEEEEE";  //make colored border same color as background
x[n-1].style.borderColor="#6666FF";               //put blue border around selected thumbnail
}

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