function gen_akro(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 - Jižní Čechy</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] = './akro/.jpg'; \n";
	txt += "images[1] = './akro/a0406-23.jpg'; \n";	
	txt += "images[2] = './akro/a0406-28.jpg'; \n";
	txt += "images[3] = './akro/a0406-29.jpg'; \n";
	txt += "images[4] = './akro/a0406-37.jpg'; \n";
	txt += "images[5] = './akro/a0406-31.jpg'; \n";
	txt += "images[6] = './akro/a0406-32.jpg'; \n";
	txt += "images[7] = './akro/a0406-33.jpg'; \n";
	txt += "images[8] = './akro/a0406-34.jpg'; \n";
	txt += "images[9] = './akro/a0406-35.jpg'; \n";
	txt += "images[10] = './akro/a0406-40.jpg'; \n";
	txt += "images[11] = './akro/a0406-38.jpg'; \n";
	txt += "images[12] = './akro/a0406-39.jpg'; \n\n";
                                             	
	// pole textu
	txt += "texty = new Array(); \n";
	txt += "texty[0] = ''; \n";
	txt += "texty[1] = 'Zlín Z142 na letišti Vrchlabí'; \n";
	txt += "texty[2] = 'Evžen za kniplem Zlínu Z142 nad Vrchlabím'; \n";
	txt += "texty[3] = ''; \n";
	txt += "texty[4] = ''; \n";
	txt += "texty[5] = ''; \n";
	txt += "texty[6] = ''; \n";
	txt += "texty[7] = ''; \n";
	txt += "texty[8] = ''; \n";
	txt += "texty[9] = ''; \n";
	txt += "texty[10] = ''; \n";
	txt += "texty[11] = ''; \n";
	txt += "texty[12] = ''; \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 == 1){ \n";
	txt += "document.gallery.previous.value='      '; } \n";
	txt += "if (i == 12){ \n";
	txt += "document.gallery.next.value='      '; } \n";
	txt += "} \n\n";
	
	txt += "function previmg(){ \n";
	txt += "if (i != 1) { \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 == 1) { \n";
	txt += "document.gallery.previous.value='      '; } \n";
	txt += "} \n\n";
	
	txt += "function nextimg(){ \n";
	txt += "if (i != 12) { \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 == 12){ \n";
	txt += "document.gallery.next.value='      '; } \n";
	txt += "} \n\n";
	
	txt += "function firstimg(){ \n";
	txt += "i = 1; \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 = 12; \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'>Akrobacie ve Zlínu Z-142</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
}	
