<!-- Hide from JavaScript-Impaired Browsers

var npic;
var namedir;
var picarr;

// this var holds the form for image text display. If there is no text, there is no form to show
var makeform=" ";

// this var is also defined in pictext.js per image dir. If this one is indeed defined 
// it overwrites this one and gets a value. Otherwise it says 'undefined'
var textloaded;

function doPic(picnr)
{
// set de text van het textveld per plaatje. text staat in .JS in image dir
	if (textloaded=='yes')
		document.picform.pictext.value=picarr[picnr-1];
// verander de source van de pic in de 2e cell van de tabel
	document.mypicture.src = 'photos/'+namedir+'/pic'+picnr+'.jpg';
	return false;
}

function showpictures(numpics, dirname)
{
	numpics=numpics+1;
	namedir=dirname;

// get alt text from js per image dir
	if (textloaded=='yes')
  // only show form when text is present
		makeform='<form name="picform"><textarea name="pictext" rows=3 cols=57 wrap="soft" STYLE="background-color: #E3E3EA;" READONLY></textarea></form>';

// this creates the array with our without text. Function is in pictext.js in image dirs
	picarr=showtext(numpics, dirname);

		
// schrijf de tabelstructuur
	document.write('<table border=0 cellspacing="0" cell'
 	+'padding="2"><td class="backBlue" ' +' valign="middle" align="center" bgcolor="#CCCCCC" WIDTH=380>');

// met daarin de thumbs en een functie aanroep per thumb bij klikken	
	var counter=0;
	for(npic=1; npic<numpics; npic++)
	{
		document.write('<a href = "#" onClick = "return(doPic('+npic+'))" > '+
		'<img src="photos/'+dirname+'/pic'+npic+'t.jpg" '+
		'border=1 ALT="'+picarr[npic-1]+'"></a>');
	}

// en het plaatje

	document.write('</td><td class="backBlue" valign="Middle" align="left">'
	+'<img src="photos/'+dirname+'/pic1.jpg" name="mypicture" ' +
	'border=0"><br>'+makeform+'</td></table>');

	if (textloaded=='yes')
		document.picform.pictext.value=picarr[0];
}

// End Hiding -->