function gen_sz(index) // param. index = index vybraneho obrazku
{
	var txt; // obsah stranky jako string
	txt = "<html> \n";
	txt += "<meta http-equiv='Content-Type' content='text/html; charset=windows-1250'> \n";
	txt += "<META name='description' content='fotogalerie Pavel Kop&#345;iva'> \n";
	txt += "<META name='keywords' content='Kop&#345;iva, Kopriva, foto, fotografie, galerie, fotogalerie, album, gallery, photo, fotky, photos, art'> \n";
	txt += "<META HTTP-EQUIV='Expires' CONTENT='0'> \n";
	txt += "<META HTTP-EQUIV='Pragma' CONTENT='no-cache'> \n";
	txt += "<META HTTP-EQUIV='Cache-Control' CONTENT='no-cache'> \n";

	txt += "<head> \n";
	txt += "<title>GALERIE: Pavel Kop&#345;iva - </title> \n\n";

	// styl pro POPIS - globalni nastaveni (subclass tagu SPAN) - font, barva, ..
	txt += "<style> \n";
	txt += "SPAN.text {FONT-SIZE: 10pt; COLOR: #d3d3a9; FONT-STYLE: normal; FONT-FAMILY: arial,helvetica} \n";
	txt += "SPAN.head {FONT-WEIGHT: bold; FONT-SIZE: 14pt; COLOR: #d3d3a9; FONT-STYLE: normal; FONT-FAMILY: arial,helvetica} \n";
	txt += "</style> \n";
	
	txt += "<sc" + "ript language='JavaScript'> \n";
	txt += "<!-- \n"; 
	txt += "var i; \n";
	
	// pole (cache) obrazku
	txt += "images = new Array(); \n";
	txt += "images[0] = './sz/a0302-kadan-el.jpg'; \n";	
	txt += "images[1] = './sz/a0409-krusne-hory-plan.jpg'; \n";
	txt += "images[2] = './sz/a0409-krusne-hory-hreben.jpg'; \n";
	txt += "images[3] = './sz/a0409-d8tunel.jpg'; \n";
	txt += "images[4] = './sz/a0409-prisecnice.jpg'; \n";
	txt += "images[5] = './sz/a0409-flaje.jpg'; \n";
	txt += "images[6] = './sz/a0409-flaje-hraz.jpg'; \n";
	txt += "images[7] = './sz/a0409-bozidar.jpg'; \n";
	txt += "images[8] = './sz/a0409-klinovec.jpg'; \n";
	txt += "images[9] = './sz/a0409-elektrarny.jpg'; \n";
	txt += "images[10] = './sz/a0302-bozidar.jpg'; \n";
	txt += "images[11] = './sz/a0302-klinovec.jpg'; \n";
	txt += "images[12] = './sz/a0302-obersdorf.jpg'; \n";
	txt += "images[13] = './sz/a0302-kadan-el.jpg'; \n";
	txt += "images[14] = './sz/a0302-kadan-c.jpg'; \n";
	txt += "images[15] = './sz/a0302-kadan.jpg'; \n";
	txt += "images[16] = './sz/a0302-prunerov.jpg'; \n";
	txt += "images[17] = './sz/a0302-prunerov1.jpg'; \n";
	txt += "images[18] = './sz/a0302-prunerov2.jpg'; \n";
	txt += "images[19] = './sz/a0302-tusimice1.jpg'; \n";
	txt += "images[20] = './sz/a0302-dul.jpg'; \n\n";
                                             	
	// pole textu
	txt += "texty = new Array(); \n";
	txt += "texty[0] = 'Město Kadaň, tepelné elektrárny v uhelné pánvi a hřebeny Krušných hor'; \n";
	txt += "texty[1] = 'Pláně Krušných hor'; \n";
	txt += "texty[2] = 'Hřeben Krušných hor'; \n";
	txt += "texty[3] = 'Vstupní portál tunelu dálnice D8 v září 2004'; \n";
	txt += "texty[4] = 'Vodní nádrž Přísečnice na hřebenech Krušných hor'; \n";
	txt += "texty[5] = 'Vodní nádrž Fláje na hřebenech Krušných hor'; \n";
	txt += "texty[6] = 'Vodní nádrž Fláje na hřebenech Krušných hor'; \n";
	txt += "texty[7] = 'Boží Dar, Neklid a v pozadí německý Fichtelberg'; \n";
	txt += "texty[8] = 'Vysílač na Klínovci, v pozadí německý Oberwiesenthal'; \n";
	txt += "texty[9] = 'Elektrárny Prunéřov a Tušimice pod Krušnými horami'; \n";
	txt += "texty[10] = 'Boží Dar a sjezdovky na Neklidu'; \n";
	txt += "texty[11] = 'Vysílač na Klínovci'; \n";
	txt += "texty[12] = 'Oberwiesenthal a Fichtelberg v Německu'; \n";
	txt += "texty[13] = 'Město Kadaň, tepelné elektrárny v uhelné pánvi a hřebeny Krušných hor'; \n";
	txt += "texty[14] = 'Město Kadaň'; \n";
	txt += "texty[15] = 'Město Kadaň'; \n";
	txt += "texty[16] = 'Tepelné elektrárny Prunéřov, v pozadí hřenben Krušných hor'; \n";
	txt += "texty[17] = 'Elektrárna Prunéřov 1'; \n";
	txt += "texty[18] = 'Elektrárna Prunéřov 2'; \n";
	txt += "texty[19] = 'Elektrárna Tušimice'; \n";
	txt += "texty[20] = 'Hnědouhelná pánev'; \n\n";

	
	txt += "function gallery(){ \n";
	txt += "i = " + index + "; \n"; // !! zde se prirazuje index vybraneho obrazku !!
	txt += "document.img.src = images[i]; \n";
	txt += "popis.innerText = texty[i]; \n";
	txt += "if (i == 0){ \n";
	txt += "document.gallery.previous.value='      '; } \n";
	txt += "if (i == 20){ \n";
	txt += "document.gallery.next.value='      '; } \n";
	txt += "} \n\n";
	
	txt += "function previmg(){ \n";
	txt += "if (i != 0) { \n";
	txt += "i--; \n";
	txt += "document.img.src = images[i]; \n";
	txt += "popis.innerText = texty[i]; \n";
	txt += "document.gallery.next.value = '  >  '; } \n";
	txt += "if (i == 0) { \n";
	txt += "document.gallery.previous.value='      '; } \n";
	txt += "} \n\n";
	
	txt += "function nextimg(){ \n";
	txt += "if (i != 20) { \n";
	txt += "i++; \n";
	txt += "document.img.src = images[i]; } \n";
	txt += "popis.innerText = texty[i]; \n";
	txt += "document.gallery.previous.value='  <  '; \n";
	txt += "if (i == 20){ \n";
	txt += "document.gallery.next.value='      '; } \n";
	txt += "} \n\n";
	
	txt += "function firstimg(){ \n";
	txt += "i = 0; \n";
	txt += "document.img.src = images[i]; \n";
	txt += "popis.innerText = texty[i]; \n";
	txt += "document.gallery.previous.value='      '; \n";
	txt += "document.gallery.next.value='  >  '; \n";
	txt += "} \n\n";
	
	txt += "function lastimg(){ \n";
	txt += "i = 20; \n";
	txt += "document.img.src = images[i]; \n";
	txt += "popis.innerText = texty[i]; \n";
	txt += "document.gallery.next.value='      '; \n";
	txt += "document.gallery.previous.value='  <  '; \n";
	txt += "} \n";                       
	
	txt += "//--> </sc" + "ript> \n";
	
	txt += "</head> \n\n";
	
	txt += "<body bgcolor=#4F4F4F onload='gallery();' text=#0099FF vLink=#bec4bd aLink=#bec4bd link=#bec4bd border=0> \n";
	txt += "<TABLE BGCOLOR=#4F4F4F height=100% WIDTH=100% border=0 cellspacing=0 align=center > \n";
	txt += "<TR><td width=40></td><td> \n";
	txt += "<TABLE BGCOLOR=#4F4F4F align='center' width=800 border=0 cellspacing=0 > \n";
	txt += "<tr height=510><td></td> <td height='520' width='800'><div align='center'> \n";
    txt += "<span class='head'>Severozápadní Čechy</span><p> \n";
	txt += "<a href=javascript:history.go(-1)> <img border='0' name='img' alt=&copy;2005&nbsp;Pavel&nbsp;Kop&#345;iva,&nbsp;-&nbsp;Klikněte&nbsp;pro&nbsp;návrat> </a> <p> \n";
	// zde je zobrazovan POPIS
	txt += "<span class='text' id='popis'></span> \n";
	txt += "</div></td> <td width=0></td></tr> </table> \n";
	txt += "</TD></TR> \n";
	txt += "<TR> <td width=40></td><td> \n";
	txt += "<form name='gallery'> <font size='0' face='Verdana' ><center> \n";
	txt += "<B> \n";
	txt += "<input name='first' onClick='firstimg();' type='button' value='&nbsp;&nbsp;&lt;&lt;&nbsp;&nbsp;' > \n";
	txt += "<input name='previous' onClick='previmg();' type='button' value='&nbsp;&nbsp;&lt;&nbsp;&nbsp;' > \n";
	txt += "<input name='next' onclick='nextimg();' type='button' value='&nbsp;&nbsp;&gt;&nbsp;&nbsp;' > \n";
	txt += "<input name='last' onClick='lastimg();' type='button' value='&nbsp;&nbsp;&gt;&gt;&nbsp;&nbsp;'> \n";
	txt += "</B> </center></font> </form> </td><td width=40></td> </TR> \n";
	txt += "<tr height=10 align='center'><td width=40></td> \n";
	txt += "<td width=100% > <font size='0' face='Verdana' > \n";
	txt += "<a href=javascript:history.go(-1)>zp&#283;t na náhledy</a></font></td> \n";
	txt += "<td width=40></td></tr></TABLE> \n\n";
	
	txt += "</body> </html>";
	
	document.open(); // otevreni noveho dokumentu (obsahu stranky - NE okna)
	document.write(txt); // zapis obsahu stranky
	document.close(); // zavreni dokumentu a jeho fyzicke zobrazeni v prohlizeci
}	
