function gen_sv(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] = './sv/a0308-pec-letadlo.jpg '; \n";
txt += "images[1] = './sv/a0308-pec.jpg '; \n";
txt += "images[2] = './sv/a0308-pec-letadlo.jpg '; \n";
txt += "images[3] = './sv/a0308-trutnov.jpg '; \n";
txt += "images[4] = './sv/a0406-02.jpg '; \n";
txt += "images[5] = './sv/a0406-02x.jpg '; \n";
txt += "images[6] = './sv/a0406-03.jpg '; \n";
txt += "images[7] = './sv/a0406-04.jpg '; \n";
txt += "images[8] = './sv/a0406-07.jpg '; \n";
txt += "images[9] = './sv/a0406-06.jpg '; \n";
txt += "images[10] = './sv/a0406-11.jpg '; \n";
txt += "images[11] = './sv/a0406-08.jpg '; \n";
txt += "images[12] = './sv/a0406-12.jpg '; \n";
txt += "images[13] = './sv/a0406-13.jpg '; \n";
txt += "images[14] = './sv/a0406-15.jpg '; \n";
txt += "images[15] = './sv/a0406-24.jpg '; \n";
txt += "images[16] = './sv/a0406-17.jpg '; \n\n";
                                             	
	// pole textu
	txt += "texty = new Array(); \n";
txt += "texty[0] = 'Na palubě ULL Golf nad krkonošskými chalupami '; \n";
txt += "texty[1] = 'Pec pod Sněžkou, Růžová hora, Obří důl, Sněžka 1602 m n.m. '; \n";
txt += "texty[2] = 'Černá hora, boudy na Lučinách, Javor '; \n";
txt += "texty[3] = 'Turnov '; \n";
txt += "texty[4] = 'Vrchlabí '; \n";
txt += "texty[5] = 'Zámek Vrchlabí '; \n";
txt += "texty[6] = 'Pasažér v L 200 Morava '; \n";
txt += "texty[7] = 'Pilot a dvojité řízení L 200 Morava '; \n";
txt += "texty[8] = 'Pod křídlem mezi mraky prosvítá Špindlerův Mlýn '; \n";
txt += "texty[9] = 'Nad hřebeny Krkonoš, nad oblaky. '; \n";
txt += "texty[10] = 'Bývalá Obří bouda, Úpská rašeliniště a Obří důl '; \n";
txt += "texty[11] = 'Sněžka schovaná v mracích '; \n";
txt += "texty[12] = 'Horní Maršov, odbočka na Jánské Lázně '; \n";
txt += "texty[13] = 'Jánské Lázně '; \n";
txt += "texty[14] = 'Přistání přes Lánov na letiště Vrchlabí '; \n";
txt += "texty[15] = 'Interiér pilotní kabiny L 200 Morava '; \n";
txt += "texty[16] = 'Nejkrásnější české letadlo L 200 Morava při startu '; \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 == 16){ \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 != 16) { \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 == 16){ \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 = 16; \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'> Severovýchod Čech - Krkonoše</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
}	
