function zoom(index, imglist){
var i=0;
var okno;
	
	okno=window.open("","zoom","left=20,top=50,width=870,height=700,"+
	  "toolbar=no,location=no,directories=no,status=no,menubar=no"+
	  ",scrollbars=yes,resizable=no,copyhistory=no");
		
	okno.document.open();
	okno.document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
	okno.document.writeln('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sk" lang="sk">');
	okno.document.writeln('<head>');
	okno.document.writeln('<title>Tai Ji Quan - fotogaléria</title>');
	okno.document.writeln('<link type="text/css" rel="StyleSheet" href="css/fotogallery.css" />');
	okno.document.writeln('</head>');
	okno.document.writeln('<body>');
	
	//Include image handler
	okno.document.writeln('<script src="js/galery_imagehandler.js" language="JavaScript">');
	okno.document.writeln('</script>');
		
	//Hidden form
	okno.document.writeln('<form name="hform1">');
	okno.document.writeln('<input type="hidden" name="glr_cindex" value='+index+' />');
	for(i=0; i<imglist.length; i++){
		okno.document.writeln('<input type="hidden" name="glr_imglist" value='+imglist[i]+' />');
	};
	okno.document.writeln('</form>');
	
	//Table	
	okno.document.writeln('<table cellpading="0" cellspacing="0">\n');
		okno.document.writeln('<tr>');
		okno.document.writeln('<td style="text-align:center;"><form name="cntform">');
		okno.document.writeln('<input style="border:1px solid #ccc; text-align:center; background-color: #F4F4F4;" type="text" readonly name="counter" value="'+(index + 1)+' / '+imglist.length+'"></input>');
		okno.document.writeln('</form></td>');
		okno.document.writeln('</tr>');
		okno.document.writeln('<tr>');
		okno.document.writeln('<td><div align="center" style="padding:8px 0px; margin: 0px 0px 5px 0px; background-color: #F4F4F4; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc;">');
		okno.document.writeln('<a href="javascript:prev_image()" target="_self" name="prev_button"> << predchádzajúci </a>');
		okno.document.writeln('&nbsp;&nbsp;|&nbsp;&nbsp;');
		okno.document.writeln('<a href="javascript:close()" target="_self" >zavrie okno</a>');
		okno.document.writeln('&nbsp;&nbsp;|&nbsp;&nbsp;');
		okno.document.writeln('<a href="javascript:next_image()" target="_self" name="next_button"> ďalí >> </a></div></td>');
		okno.document.writeln('</tr>');
		okno.document.writeln('<tr><td COLSPAN=3><img src="'+imglist[index]+'" name="obrazok" /></td></tr>');
		okno.document.writeln('<tr>');
		okno.document.writeln('<td><div align="center" style="padding:8px 0px; margin: 5px 0px; background-color: #F4F4F4; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc;">');
		okno.document.writeln('<a href="javascript:prev_image()" target="_self" name="prev_button"> << predchádzajúci </a>');
		okno.document.writeln('&nbsp;&nbsp;|&nbsp;&nbsp;');
		okno.document.writeln('<a href="javascript:close()" target="_self" >zavrie okno</a>');
		okno.document.writeln('&nbsp;&nbsp;|&nbsp;&nbsp;');
		okno.document.writeln('<a href="javascript:next_image()" target="_self" name="next_button"> ďalí >> </a></div></td>');
		okno.document.writeln('</tr>');
	okno.document.writeln('</table>');
	
	okno.document.writeln('</body>\n</html>');
	okno.document.close(); 
	okno.document.foreground();
	
}

