function gen_vychod(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 - Střední Čechy ze vzduchu</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] = './vychod/wIMG_5358.jpg '; \n";
txt += "images[1] = './vychod/wIMG_5351.jpg '; \n";
txt += "images[2] = './vychod/wIMG_5345.jpg '; \n";
txt += "images[3] = './vychod/wIMG_5341.jpg '; \n";
txt += "images[4] = './vychod/wIMG_5330.jpg '; \n";
txt += "images[5] = './vychod/wIMG_5324.jpg '; \n";
txt += "images[6] = './vychod/wIMG_5332.jpg '; \n";
txt += "images[7] = './vychod/wIMG_5371.jpg '; \n";
txt += "images[8] = './vychod/wIMG_5376.jpg '; \n";
txt += "images[9] = './vychod/wIMG_5395.jpg '; \n";
txt += "images[10] = './vychod/wIMG_5398.jpg '; \n";
txt += "images[11] = './vychod/wIMG_5399.jpg '; \n";
txt += "images[12] = './vychod/wIMG_5402.jpg '; \n";
txt += "images[13] = './vychod/wIMG_5404.jpg '; \n";
txt += "images[14] = './vychod/wIMG_5408.jpg '; \n";
txt += "images[15] = './vychod/wIMG_5410.jpg '; \n";
txt += "images[16] = './vychod/wIMG_5417.jpg '; \n";
txt += "images[17] = './vychod/wIMG_5420.jpg '; \n";
txt += "images[18] = './vychod/wIMG_5414.jpg '; \n";
txt += "images[19] = './vychod/wIMG_5416.jpg '; \n";
txt += "images[20] = './vychod/wIMG_5418.jpg '; \n";
txt += "images[21] = './vychod/wIMG_5425.jpg '; \n";
txt += "images[22] = './vychod/wIMG_5427.jpg '; \n";
txt += "images[23] = './vychod/wIMG_5429.jpg '; \n";
txt += "images[24] = './vychod/wIMG_5433.jpg '; \n";
txt += "images[25] = './vychod/wIMG_5436.jpg '; \n";
txt += "images[26] = './vychod/wIMG_5439.jpg '; \n";
txt += "images[27] = './vychod/wIMG_5440.jpg '; \n";
txt += "images[28] = './vychod/wIMG_5443.jpg '; \n";
txt += "images[29] = './vychod/wIMG_5446.jpg '; \n";
txt += "images[30] = './vychod/wIMG_5454.jpg '; \n";
txt += "images[31] = './vychod/wIMG_5458.jpg '; \n";
txt += "images[32] = './vychod/wIMG_5471.jpg '; \n";
txt += "images[33] = './vychod/wIMG_5475.jpg '; \n";
txt += "images[34] = './vychod/wIMG_5477.jpg '; \n";
txt += "images[35] = './vychod/wIMG_5480.jpg '; \n";
txt += "images[36] = './vychod/wIMG_5478.jpg '; \n";
txt += "images[37] = './vychod/wIMG_5483x.jpg '; \n";
txt += "images[38] = './vychod/wIMG_5486.jpg '; \n";
txt += "images[39] = './vychod/wIMG_5491.jpg '; \n";
txt += "images[40] = './vychod/wIMG_5500.jpg '; \n";
txt += "images[41] = './vychod/wIMG_5507.jpg '; \n";
txt += "images[42] = './vychod/wIMG_5509.jpg '; \n";
txt += "images[43] = './vychod/wIMG_5510.jpg '; \n";
txt += "images[44] = './vychod/wIMG_5515.jpg '; \n";
txt += "images[45] = './vychod/wIMG_5516.jpg '; \n";
txt += "images[46] = './vychod/wIMG_5519.jpg '; \n";
txt += "images[47] = './vychod/wIMG_5526.jpg '; \n";
txt += "images[48] = './vychod/wIMG_5528.jpg '; \n";
txt += "images[49] = './vychod/wIMG_5531.jpg '; \n";
txt += "images[50] = './vychod/wIMG_5292.jpg '; \n";
txt += "images[51] = './vychod/wIMG_5554.jpg '; \n";
txt += "images[52] = './vychod/wIMG_5561.jpg '; \n";
txt += "images[53] = './vychod/wIMG_5563.jpg '; \n\n";
                                             	
	// pole textu
	txt += "texty = new Array(); \n";
	txt += "texty[0] = 'Poutní kostel sv. Jana Nepomuckého na Zelené hoře '; \n";
	txt += "texty[1] = 'Poutní kostel sv. Jana Nepomuckého na Zelené hoře '; \n";
	txt += "texty[2] = 'Poutní kostel sv. Jana Nepomuckého na Zelené hoře '; \n";
	txt += "texty[3] = 'Zámek Kinských ve Žďáru nad Sázavou. '; \n";
	txt += "texty[4] = 'Pole s pokusným osevem na Vysočině '; \n";
	txt += "texty[5] = 'Železniční trať podél Sázavy '; \n";
	txt += "texty[6] = 'Havlíčkův Brod '; \n";
	txt += "texty[7] = 'Hrad Pernštejn '; \n";
	txt += "texty[8] = 'Hrad Pernštejn '; \n";
	txt += "texty[9] = 'Hrad Svojanov '; \n";
	txt += "texty[10] = 'Českomoravská vysočina '; \n";
	txt += "texty[11] = 'Českomoravská vysočina '; \n";
	txt += "texty[12] = 'Polička '; \n";
	txt += "texty[13] = 'Litomyšl '; \n";
	txt += "texty[14] = 'Litomyšl - centrum '; \n";
	txt += "texty[15] = 'Litomyšl - Smetanovo náměstí '; \n";
	txt += "texty[16] = 'Litomyšl - centrum '; \n";
	txt += "texty[17] = 'Litomyšl - Smetanovo náměstí '; \n";
	txt += "texty[18] = 'Zámek Litomyšl '; \n";
	txt += "texty[19] = 'Zámek Litomyšl '; \n";
	txt += "texty[20] = 'Zámek Litomyšl '; \n";
	txt += "texty[21] = 'Luže '; \n";
	txt += "texty[22] = 'Zřícenina Košumberk '; \n";
	txt += "texty[23] = 'Luže '; \n";
	txt += "texty[24] = 'Hroubovice '; \n";
	txt += "texty[25] = 'Hroubovice '; \n";
	txt += "texty[26] = 'Hroubovice '; \n";
	txt += "texty[27] = 'Hroubovice '; \n";
	txt += "texty[28] = 'Hroubovice '; \n";
	txt += "texty[29] = 'Hroubovice '; \n";
	txt += "texty[30] = 'Vysílač Krásné '; \n";
	txt += "texty[31] = 'Přehrada Seč '; \n";
	txt += "texty[32] = 'Zřícenina Lichnice, obec Podhradí '; \n";
	txt += "texty[33] = 'Zřícenina Lichnice, obec Podhradí '; \n";
	txt += "texty[34] = 'Zámek Žleby '; \n";
	txt += "texty[35] = 'Zámek Žleby '; \n";
	txt += "texty[36] = 'Zámek Žleby '; \n";
	txt += "texty[37] = 'Zámek Žleby '; \n";
	txt += "texty[38] = 'Zámek Žleby '; \n";
	txt += "texty[39] = '21. základna taktického letectva Čáslav '; \n";
	txt += "texty[40] = '21. základna taktického letectva Čáslav '; \n";
	txt += "texty[41] = 'Kutná Hora '; \n";
	txt += "texty[42] = 'Kutná Hora, kostel sv.Barbory, kostel sv.Jakuba '; \n";
	txt += "texty[43] = 'Kutná Hora, kostel sv.Barbory '; \n";
	txt += "texty[44] = 'Kutná Hora, kostel sv.Barbory '; \n";
	txt += "texty[45] = 'Kutná Hora, kostel sv.Barbory '; \n";
	txt += "texty[46] = 'Kutná Hora, kostel sv.Barbory '; \n";
	txt += "texty[47] = 'Zásmuky '; \n";
	txt += "texty[48] = 'Zámek Zásmuky '; \n";
	txt += "texty[49] = 'Zámek Zásmuky '; \n";
	txt += "texty[50] = 'Hrad Český Šternberk , Sázava '; \n";
	txt += "texty[51] = 'Motorest Naháč u dálnice D1 '; \n";
	txt += "texty[52] = 'Semovický rybník, Bystřice u Benešova '; \n";
	txt += "texty[53] = 'Semovický rybník, Bystřice u Benešova '; \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 == 53){ \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 != 53) { \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 == 53){ \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 = 53; \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'> Východ Čech</span><p> \n";
	txt += "<a href=javascript:history.go(-1)> <img border='0' name='img' alt=&copy;2006&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
}	
