function ShowPic(sPicURL) 
            { 
window.open("../showpic.htm?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200,left=0, top='0");
			}


function DisplayGallery(k,l,dir)
{
var sHTML="";	
for (var n = k; n <= l; n++)
	{
	if ( n > 9)
		{
		sHTML= sHTML +"<div class=\"divImage\" style=\"background-image:url(../pics/thumb/"+dir+"/thumb_"+n+".gif);\"onclick=\"ShowPic('./pics/large/"+dir+"/large"+n+".jpg')\"></div>"
		}
	else
		{
		sHTML= sHTML +"<div class=\"divImage\" style=\"background-image:url(../pics/thumb/"+dir+"/thumb_0"+n+".gif);\"onclick=\"ShowPic('./pics/large/"+dir+"/large0"+n+".jpg')\"></div>"
		}
	}
document.getElementById("divGallery").innerHTML = sHTML;
}
function DisplayNavigationLinks(p,n)
{
document.getElementById("previousDiv").style.display = p;
document.getElementById("nextDiv").style.display = n;
}
function mychange() 
{
	var index = document.GalleryForm.Box.selectedIndex;
	var dir = document.GalleryForm.Box.options[index].value;
	if (index == 1 )
	{
	DisplayGallery(81,87,dir);
	DisplayNavigationLinks('none','block');
	return;
	}
	if (index == 2 )
	{
	DisplayGallery(1,20,dir);
	DisplayNavigationLinks('block','block');
	return;
	}
	if (index == 3 )
	{
	DisplayGallery(21,29,dir);
	DisplayNavigationLinks('block','block');
	return;
	}
	if (index == 4 )
	{
	DisplayGallery(30,40,dir);
	DisplayNavigationLinks('block','block');
	return;
	}
	if (index == 5 )
	{
	DisplayGallery(41,53,dir);
	DisplayNavigationLinks('block','block');
	return;
	}
if (index == 6 )
	{
	DisplayGallery(54,80,dir);
	DisplayNavigationLinks('block','none');
	return;
	}
}

function Gallery(which)
{
var index = document.GalleryForm.Box.selectedIndex;
if ( which == 'previous')
	{ 
	index = index -1;
	document.GalleryForm.Box.selectedIndex = index;
	}
else
	{
	index = index + 1;
	document.GalleryForm.Box.selectedIndex = index;
	}
mychange();
}