function showPic( imgName, origWidth, origHeight, imgWidth, imgHeight, imgCaption ) {
	
	// imgName		Verplicht	= URL Plaatje
	// origWidth	Verplicht 	= Breedte origineel plaatje (thumbnail)
	// origHeight	Verplicht	= Hoogte origineel plaatje (thumbnail) 
	// imgWidth		Optioneel	= Breedte nieuwe plaatje (popup)
	// imgHeight	Optioneel	= Hoogte nieuwe plaatje (popup)
	// imgCaption	Optioneel	= Titel van plaatje
	
	if (imgWidth == null){
		imgWidth = 800;
	}
	if (imgHeight == null){
		imgHeight = 800;
	}
	if (imgCaption == null){
		imgCaption = 'Foto';
	}

	winHeight=imgHeight+20;
	
	/* zoek substring afmetingen 
	dit is belagerijk van imgName=imgName.replace(origWidth,imgWidth) kan oorzaken dat we vervangen een deel van de fotoId!!  
	en dan wordt een helemaal andere foto getoond.
	ayala 25-01-08
	*/
	
	var first_index = imgName.indexOf("?");
	var sizeString = imgName.substring(first_index,imgName.length);
	var newSizeString = sizeString;
	newSizeString = newSizeString.replace(origWidth,imgWidth);
	newSizeString = newSizeString.replace(origHeight,imgHeight);

	imgName=imgName.replace(sizeString,newSizeString);
				
	w = window.open('','ImagePopup','toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,copyhistory=no,width='+imgWidth+',height='+winHeight);
	w.document.write( "<html><head><title>"+imgCaption+"</title>" );
	w.document.write( "<script language='JavaScript'>\n");
	w.document.write( "IE5=NN4=NN6=false\n");
	w.document.write( "if(document.all)IE5=true;\n");
	w.document.write( "else if(document.getElementById)NN6=true\n");
	w.document.write( "else if(document.layers)NN4=true\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "	if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31+20)\n");
	w.document.write( "	else if(NN6) self.sizeToContent()\n");
	w.document.write( "	else top.window.resizeTo(document.images[0].width,document.images[0].height+20)\n");
	w.document.write( "	self.focus()\n");
	w.document.write( "	if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31+20)\n");
	w.document.write( "	else if(NN6) self.sizeToContent()\n");
	w.document.write( "	else top.window.resizeTo(document.images[0].width,document.images[0].height+20)\n");
	w.document.write( "	self.focus()\n");
	w.document.write( "}\n</scr");
	w.document.write( "ipt>\n");
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad=" );
	w.document.write( "'javascript:autoSize();'>" );
	w.document.write( "<img onClick='window.close();' style='cursor:hand;' src='"+imgName+"' border=0 alt='"+imgCaption+"'>" );
	w.document.write( "</body></html>" );
	w.document.close();
}
