<!-- hide JavaScript from non-enabled browsers
// 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 + 40  // width + buffer space
	height = y + z + 115 // height + caption + buffer
	// window parameters
	var winsize = "'menubar=0,status=0,toolbar=0,scrollbars=0,resizeable=0,screenX=40,screenY=40,left=40,top=40"
	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 +="<link rel='stylesheet' href='../stilovi.css' type='text/css'>"
	winpop +="<style TYPE='text/css'>"
	winpop +="<!--"
	winpop +="A:link  {"
	winpop +="color : 000000;"
	winpop +="text-decoration : none;"
 	winpop +="font-family : Arial, Helvetica, Verdana;"
	winpop +="font-size : 11px"
 	winpop +="}"	
  	winpop +="A:visited  {"	
   	winpop +="color: 000000;"	
   	winpop +="text-decoration : none;"	
   	winpop +="font-family : Arial, Helvetica, Verdana;"
   	winpop +="font-size : 11px"
	winpop +="}"
  	winpop +="A:hover  {"		
  	winpop +="color : 0000FF;"
   	winpop +="text-decoration : underline;"	
   	winpop +="font-family : Arial, Helvetica, Verdana;"	
   	winpop +="font-size : 11px;"	
   	winpop +="background-color:FFCC33;"	
   	winpop +="border-color: ffcc33;"
   	winpop +="}"
   	winpop +="-->"
   	winpop +="</style>"	
	winpop += "<body bgcolor='#FFFFFF' text='#000000' background='../image/pozadina.gif'>";
	winpop += "<p align=center class='naslovi'>" + pictitle + "<br>\n"
	winpop += "<img src=" + picdir + pic[0] + "><br>"
	winpop += "<p align=center class='tekst'>" + desc + "\n<br>"
	winpop += "<a href='javascript: window.close();' class='linkoviinactive' >" // creates a close link on popup
	winpop += zatvori +"</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.
	}
// end hide -->
