// this page can only create one popup window.  Each page will be generated in
// same window.
// since this function is used over and over again - if you have several pages with
// thumbnailed pictures, its best to put this part in an external js page and link to it
	function popupwin() { //name of function
	x = Number(pic[1]) // forces width parameter to be recognized as a number wont add without it
	y = Number(pic[2]) // height parameter
	z = Number(pic[3]) // additional space required by caption
	width = x + 20  // width + buffer space
	height = y + z + 110 // height + caption + buffer
	// window parameters
	var winsize = "menubar=0,status=0,toolbar=0,scrollbars=0,resizable=1,screenX=10,screenY=10,left=10,top=10"
	winsize += ",width=" + width + ",height=" + height +"'";
	// html for popup window
	var winpop = "<html>\n<head>\n";
	winpop += "<title>" + pictitle + "</title>";
	// style sheet elements can be used.  external sheets can be linked here
	winpop += "</head>\n<body bgcolor='white'>\n";
	winpop += "<font face='Verdana' size='2'>" // aggiunto stile per il font
	winpop += "<p align=center>" + pictitle + "<br>\n"
	winpop += "<img src=" + picdir + pic[0] + "><br>"
	winpop +=   desc + "\n<br>"
	winpop += "<a href='javascript: window.close();'>" // creates a close link on popup
	winpop += "chiudi</a>"
	winpop += "</body>\n</html>\n"
	winpopup = window.open ('','popup',winsize) // opens popup window
	winpopup.document.open() // start of popup window
	winpopup.document.write (winpop) // writes html in the page
	winpopup.document.close() // ends of popup window
	winpopup.focus() //brings popup window to the top.
	}
