function fotografie(i)
{
var txt;

txt = "<HTML> \n";
txt += "<HEAD> \n";
txt += "<TITLE>Železnice - Orlice</TITLE> \n";
txt += "<META http-equiv='content-type' content='text/html; charset=iso-8859-2'> \n";
txt += "<LINK href='../../etc/mv.css' type=text/css rel=STYLESHEET> \n";
txt += "<link rel='shortcut icon' href='http://www.martinvalek.net/favicon.ico' /> \n";
txt += "<sc" + "ript language='JavaScript'> \n";
txt += "<!-- \n";
// Celkový počet fotek
txt += "pocet_obrazku = 55; \n"; 
txt += "show = false; \n"; 
// jména suborů
txt += "images = new Array (); \n";
txt += "images[1] = 'fotky/39-14.jpg'; \n";
txt += "images[2] = 'fotky/39-16.jpg'; \n";
txt += "images[3] = 'fotky/39-24.jpg'; \n";
txt += "images[4] = 'fotky/72-24.jpg'; \n";
txt += "images[5] = 'fotky/72-28.jpg'; \n";
txt += "images[6] = 'fotky/72-29.jpg'; \n";
txt += "images[7] = 'fotky/106-28.jpg'; \n";
txt += "images[8] = 'fotky/106-32.jpg'; \n";
txt += "images[9] = 'fotky/143-05.jpg'; \n";
txt += "images[10] = 'fotky/144-07.jpg'; \n";
txt += "images[11] = 'fotky/144-13.jpg'; \n";
txt += "images[12] = 'fotky/144-25.jpg'; \n";
txt += "images[13] = 'fotky/144-28.jpg'; \n";
txt += "images[14] = 'fotky/144-33.jpg'; \n";
txt += "images[15] = 'fotky/144-35.jpg'; \n";
txt += "images[16] = 'fotky/151-19.jpg'; \n";
txt += "images[17] = 'fotky/151-20.jpg'; \n";
txt += "images[18] = 'fotky/151-34.jpg'; \n";
txt += "images[19] = 'fotky/152-04.jpg'; \n";
txt += "images[20] = 'fotky/152-06.jpg'; \n";
txt += "images[21] = 'fotky/152-11.jpg'; \n";
txt += "images[22] = 'fotky/155-16.jpg'; \n";
txt += "images[23] = 'fotky/155-17.jpg'; \n";
txt += "images[24] = 'fotky/155-21.jpg'; \n";
txt += "images[25] = 'fotky/155-23.jpg'; \n";
txt += "images[26] = 'fotky/155-25.jpg'; \n";
txt += "images[27] = 'fotky/154-11.jpg'; \n";
txt += "images[28] = 'fotky/154-19.jpg'; \n";
txt += "images[29] = 'fotky/154-21.jpg'; \n";
txt += "images[30] = 'fotky/2006-05-0198.jpg'; \n";
txt += "images[31] = 'fotky/2006-05-0213.jpg'; \n";
txt += "images[32] = 'fotky/2006-07-0001.jpg'; \n";
txt += "images[33] = 'fotky/2006-07-0200.jpg'; \n";
txt += "images[34] = 'fotky/2006-07-0027.jpg'; \n";
txt += "images[35] = 'fotky/2006-07-0030.jpg'; \n";
txt += "images[36] = 'fotky/2006-07-0036.jpg'; \n";
txt += "images[37] = 'fotky/2007-03-0508.jpg'; \n";
txt += "images[38] = 'fotky/2007-03-0534.jpg'; \n";
txt += "images[39] = 'fotky/2007-03-0560.jpg'; \n";
txt += "images[40] = 'fotky/2007-03-0601.jpg'; \n";
txt += "images[41] = 'fotky/2007-04-0091.jpg'; \n";
txt += "images[42] = 'fotky/2008-05-4304.jpg'; \n";
txt += "images[43] = 'fotky/2009-07-0695.jpg'; \n";
txt += "images[44] = 'fotky/2009-07-0642.jpg'; \n";
txt += "images[45] = 'fotky/2009-07-0826.jpg'; \n";
txt += "images[46] = 'fotky/2009-07-0836.jpg'; \n";
txt += "images[47] = 'fotky/2009-07-0895.jpg'; \n";
txt += "images[48] = 'fotky/2009-07-0911.jpg'; \n";
txt += "images[49] = 'fotky/2010-01-0067.jpg'; \n";
txt += "images[50] = 'fotky/2010-01-0179.jpg'; \n";
txt += "images[51] = 'fotky/2010-01-0309.jpg'; \n";
txt += "images[52] = 'fotky/2010-01-0358.jpg'; \n";
txt += "images[53] = 'fotky/2010-06-0507.jpg'; \n";
txt += "images[54] = 'fotky/2010-06-0544.jpg'; \n";
txt += "images[55] = 'fotky/2010-06-0573.jpg'; \n";
// Komentáře fotografií
txt += "comment = new Array () \n";
txt += "comment[1] = '750.364 ČD, R 959, Verměřovice'; \n";
txt += "comment[2] = '753.229+127 ČD, Pn 44266, Verměřovice'; \n";
txt += "comment[3] = '753.127+229 ČD, Sn 44265, Letohrad - Verměřovice'; \n";
txt += "comment[4] = '781.529 + pk742.353 ČD, Rn 44263, Letohrad - Verměřovice'; \n";
txt += "comment[5] = '749.011 ČD, R 254, Verměřovice - Letohrad'; \n";
txt += "comment[6] = '750.224 ČD, R 757, Letohrad - Verměřovice'; \n";
txt += "comment[7] = '749.256 ČD, R 254, Verměřovice'; \n";
txt += "comment[8] = '751.353+372 ČD, Pn 47274, Jablonné nad Orlicí - Verměřovice'; \n";     
txt += "comment[9] = '350.018 ZSSK, EC 135 Vyšehrad, Brandýs nad Orlicí - Bezpráví'; \n";
txt += "comment[10] = '130.003 ČD, R 973, Bezpráví'; \n";
txt += "comment[11] = '151.006 ČD, EC 107 Praha, Bezpráví'; \n";
txt += "comment[12] = '150.025 ČD, R 1502, Bezpráví'; \n";
txt += "comment[13] = '363.040 ČD, Pn 63422, Bezpráví'; \n"; 
txt += "comment[14] = '163.062 ČD, Os 5024, Bezpráví'; \n";
txt += "comment[15] = '151.027 ČD, EC 106 Praha, Bezpráví'; \n";
txt += "comment[16] = '854.213 ČD, Sp 1953, Litice nad Orlicí - Bohousová'; \n";
txt += "comment[17] = '749.008 ČD, R 757, Litice nad Orlicí - Bohousová'; \n";
txt += "comment[18] = '749.008 ČD, R 756, Žamberk - Bohousová'; \n";
txt += "comment[19] = '749.253+751.236 ČD, Pn 44256, Mladkov'; \n";
txt += "comment[20] = '749.256 ČD, R 757, Mladkov - Lichkov'; \n";
txt += "comment[21] = '810.228 ČD, Os 20028, Mladkov'; \n";
txt += "comment[22] = '750.312 ČD, R 757, Letohrad - Verměřovice'; \n";   
txt += "comment[23] = '751.176+137 ČD, Pn 47274, Verměřovice'; \n";
txt += "comment[24] = '751.236+038 ČD, Pn 44260, Lichkov - Mladkov'; \n";   
txt += "comment[25] = '750.312 ČD, R 756, Lichkov - Mladkov'; \n";   
txt += "comment[26] = '749.260 ČD, Mn 83330, Lichkov - Mladkov'; \n";
txt += "comment[27] = '350.007 ZSSK, EC 135 Vyšehrad, Bezpráví'; \n";   
txt += "comment[28] = '350.015 ZSSK, EC 172 Vindobona, Bezpráví - Brandýs nad Orlicí'; \n";
txt += "comment[29] = '122.036 ČD, Bezpráví - Brandýs nad Orlicí'; \n";   
txt += "comment[30] = '680.002 ČD, SC 503 SC Pendolino, Bezpráví'; \n";   
txt += "comment[31] = '363.027 ČD, R 970, Bezpráví'; \n";   
txt += "comment[32] = '350.001 ZSSK, EC 71 Smetana, Bezpráví'; \n";
txt += "comment[33] = '350.017 ZSSK, EC 170 Hungaria, Bezpráví - Brandýs nad Orlicí'; \n";   
txt += "comment[34] = '810.007 ČD, Os 20014, Lichkov - Mladkov'; \n";
txt += "comment[35] = '751.176+354 ČD, Lichkov'; \n";   
txt += "comment[36] = '751.176+354 ČD, Lichkov'; \n";   
txt += "comment[37] = '151.019 ČD, EC 107 Praha, Bezpráví'; \n";
txt += "comment[38] = '130.008 ČD, Bezpráví - Brandýs nad Orlicí'; \n";   
txt += "comment[39] = '151.001 ČD, EC 106 Praha, Bezpráví - Brandýs nad Orlicí'; \n";
txt += "comment[40] = '680.006 ČD, SC 72 J. G. Mendel, Bezpráví - Brandýs nad Orlicí'; \n";   
txt += "comment[41] = '130.024 ČD, Bezpráví'; \n";  
txt += "comment[42] = '150.001 ČD, EC 143 Odra, Bezpráví - Ústí nad Orlicí'; \n";   
txt += "comment[43] = '130.035 ČD Cargo, Bezpráví - Ústí nad Orlicí'; \n";   
txt += "comment[44] = '151 ČD, IC 531 Hutník, Bezpráví - Ústí nad Orlicí'; \n";
txt += "comment[45] = '162 ČD, EC 129 Hradčany, Bezpráví - Ústí nad Orlicí'; \n";   
txt += "comment[46] = '350 ZSSK, R 474 Jadran, Ústí nad Orlicí - Bezpráví'; \n";
txt += "comment[47] = '1216.236 ÖBB, EC 77 Gustav Klimt, Bezpráví - Ústí nad Orlicí'; \n";   
txt += "comment[48] = '680.001 ČD, SC 16 SC Antonín Dvořák, Bezpráví - Brandýs nad Orlicí'; \n";
txt += "comment[49] = '1216.237 ÖBB, EC 77 Antonín Dvořák, Bezpráví - Ústí nad Orlicí'; \n";   
txt += "comment[50] = '150.213 ČD, R 629 Portáš, Bezpráví - Ústí nad Orlicí'; \n";
txt += "comment[51] = '363.063 ČD Cargo, Bezpráví - Brandýs nad Orlicí'; \n";   
txt += "comment[52] = '1216.238 ÖBB, IC 570 Zdeněk Fibich, Bezpráví - Brandýs nad Orlicí'; \n";
txt += "comment[53] = '151 ČD, IC 580 Hutník, Ústí nad Orlicí - Bezpráví'; \n";   
txt += "comment[54] = '163 ČD, Os 5018, Ústí nad Orlicí - Bezpráví'; \n";
txt += "comment[55] = '350.003 ZSSK, EC 378 Carl Maria von Weber, Ústí nad Orlicí - Bezpráví'; \n";
// Data fotografií
txt += "date = new Array () \n";
txt += "date[1] = '15.9.2000'; \n";
txt += "date[2] = '15.9.2000'; \n";
txt += "date[3] = '15.9.2000'; \n";
txt += "date[4] = '20.12.2002'; \n";
txt += "date[5] = '20.12.2002'; \n";
txt += "date[6] = '20.12.2002'; \n";
txt += "date[7] = '8.3.2004'; \n";
txt += "date[8] = '8.3.2004'; \n";
txt += "date[9] = '3.7.2005'; \n";
txt += "date[10] = '17.7.2005'; \n";
txt += "date[11] = '17.7.2005'; \n";
txt += "date[12] = '17.7.2005'; \n";
txt += "date[13] = '17.7.2005'; \n";
txt += "date[14] = '17.7.2005'; \n";
txt += "date[15] = '17.7.2005'; \n";
txt += "date[16] = '18.9.2005'; \n";
txt += "date[17] = '18.9.2005'; \n";
txt += "date[18] = '18.9.2005'; \n";
txt += "date[19] = '24.9.2005'; \n";
txt += "date[20] = '24.9.2005'; \n";
txt += "date[21] = '24.9.2005'; \n";
txt += "date[22] = '19.10.2005'; \n";
txt += "date[23] = '19.10.2005'; \n";
txt += "date[24] = '19.10.2005'; \n";
txt += "date[25] = '19.10.2005'; \n";
txt += "date[26] = '19.10.2005'; \n";
txt += "date[27] = '15.10.2005'; \n";
txt += "date[28] = '15.10.2005'; \n";
txt += "date[29] = '15.10.2005'; \n";
txt += "date[30] = '3.5.2006'; \n";
txt += "date[31] = '3.5.2006'; \n";
txt += "date[32] = '2.7.2006'; \n";
txt += "date[33] = '6.7.2006'; \n";
txt += "date[34] = '2.7.2006'; \n";
txt += "date[35] = '2.7.2006'; \n";
txt += "date[36] = '2.7.2006'; \n";
txt += "date[37] = '25.3.2007'; \n";
txt += "date[38] = '25.3.2007'; \n";
txt += "date[39] = '25.3.2007'; \n";
txt += "date[40] = '25.3.2007'; \n";
txt += "date[41] = '7.4.2007'; \n";
txt += "date[42] = '14.5.2008'; \n";
txt += "date[43] = '26.7.2009'; \n";
txt += "date[44] = '24.7.2009'; \n";
txt += "date[45] = '26.7.2009'; \n";
txt += "date[46] = '26.7.2009'; \n";
txt += "date[47] = '26.7.2009'; \n";
txt += "date[48] = '26.7.2009'; \n";
txt += "date[49] = '30.1.2010'; \n";
txt += "date[50] = '30.1.2010'; \n";
txt += "date[51] = '31.1.2010'; \n";
txt += "date[52] = '31.1.2010'; \n";
txt += "date[53] = '13.6.2010'; \n";
txt += "date[54] = '13.6.2010'; \n";
txt += "date[55] = '13.6.2010'; \n";
// Časovač na automatické přepínání fotek
txt += "var timer; \n";    
// Nastavení obrázku
txt += "function SetPic (){ \n";
txt += "document.images.imgprev.src = images[actpic];} \n";
// Nastavení komentáře obrázku
txt += "function SetKom (){ \n";
txt += "function dominnerText(node, text) { \n";
txt += "while (node.hasChildNodes()) { \n";
txt += "node.removeChild(node.firstChild); \n";
txt += "} \n";
txt += "node.appendChild(document.createTextNode(text)); \n";
txt += "} \n";
txt += "dominnerText(document.getElementById('popis'), comment[actpic])}; \n";
// Nastavení data obrázku
txt += "function SetDat (){ \n";
txt += "function dominnerText(node, text) { \n";
txt += "while (node.hasChildNodes()) { \n";
txt += "node.removeChild(node.firstChild); \n";
txt += "} \n";
txt += "node.appendChild(document.createTextNode(text)); \n";
txt += "} \n";
txt += "dominnerText(document.getElementById('datum'), date[actpic])}; \n";
// Následující snímek
txt += "function NextPic (){ \n";
txt += "if (actpic == pocet_obrazku) actpic = pocet_obrazku; \n";
txt += "else actpic++; \n";
txt += "SetPic(); \n";
txt += "SetKom (); \n";
txt += "SetDat (); \n";
txt += "document.SetPic.previous.value='<<<'; \n";
txt += "if (actpic == pocet_obrazku){ \n";
txt += "document.SetPic.next.value='';  \n";
txt += "document.SetPic.slshow.value=''; \n";
txt += "if (show == true) {show = false; \n";
txt += "StopSlideShow ();} \n";
txt += "} \n";
txt += "} \n";
// Předchozí snímek
txt += "function PrevPic (){ \n";
txt += "if (actpic != 1) { \n";
txt += "actpic--; \n";
txt += "SetPic(); \n";
txt += "SetKom (); \n";
txt += "SetDat (); \n";
txt += "document.SetPic.next.value = '>>>'; } \n";
txt += "if (show == false) { \n";
txt += "document.SetPic.slshow.value='slideshow';} \n";
txt += "if (actpic == 1) { \n";
txt += "document.SetPic.previous.value=''; } \n";
txt += "} \n";
// Snímek volaný z galerie
txt += "function AktPic (){ \n";
//txt += "actpic = 1; \n";
txt += "actpic = " + i + "; \n";
txt += "SetPic(); \n";
txt += "SetKom (); \n";
txt += "SetDat (); \n";
txt += "if (actpic == 1){ \n";
txt += "document.SetPic.previous.value=''; } \n";
txt += "if (actpic == pocet_obrazku){ \n";
txt += "document.SetPic.next.value='';  \n";
txt += "document.SetPic.slshow.value=''; } \n";
txt += "} \n";
// Poslední snímek
txt += "function LastPic (){ \n";
txt += "actpic = pocet_obrazku; \n";
txt += "SetPic(); \n";
txt += "SetKom (); \n";
txt += "SetDat ();} \n";
// Spuštění slideshow
txt += "function SlideShow (){ \n";
txt += "timer = setInterval ('NextPic();', 20000);} \n";
// Zastavení slideshow
txt += "function StopSlideShow (){ \n";
txt += "clearInterval (timer);} \n";
// Ovladac slideshow
txt += "function OvladacSlideShow () {  \n";
txt += "if (show == false && actpic != pocet_obrazku) { show = true; \n";
txt += "SlideShow (); \n";
txt += "document.SetPic.slshow.value='stop';} \n";
txt += "else \n";
txt += "{if (actpic != pocet_obrazku) { show = false; \n";
txt += "StopSlideShow (); \n";
txt += "document.SetPic.slshow.value='slideshow';} \n";
txt += "} \n";
txt += "} \n";
// Ovladac zmeny barvy tlacitek
txt += "function KurzorNadNahledy() { \n";
txt += "document.SetPic.nahledy.style.color = '#ffffff'; } \n";
txt += "function KurzorMimoNahledy() { \n";
txt += "document.SetPic.nahledy.style.color = '#3C3E35'; } \n";
txt += "function KurzorNadSlshow() { \n";
txt += "document.SetPic.slshow.style.color = '#ffffff'; } \n";
txt += "function KurzorMimoSlshow() { \n";
txt += "document.SetPic.slshow.style.color = '#3C3E35'; } \n";
txt += "function KurzorNadPredchozi() { \n";
txt += "document.SetPic.previous.style.color = '#ffffff'; } \n";
txt += "function KurzorMimoPredchozi() { \n";
txt += "document.SetPic.previous.style.color = '#3C3E35'; } \n";
txt += "function KurzorNadDalsi() { \n";
txt += "document.SetPic.next.style.color = '#ffffff'; } \n";
txt += "function KurzorMimoDalsi() { \n";
txt += "document.SetPic.next.style.color = '#3C3E35'; } \n";
txt += "// --> \n";
txt += "//--> </sc" + "ript> \n";

txt += "</HEAD> \n";
txt += "<BODY OnLoad='AktPic ();'> \n";
txt += "<table width=100% height=99%> \n";
txt += "<tr height=20><td> \n";
txt += "<form name='SetPic'> \n";
txt += "<input name='nahledy' onclick='history.go(-1);' class='galerie-navigace-foto' id='nahledy' type='button' width=50px style='cursor: pointer;' value='náhledy' onMouseOver='KurzorNadNahledy()' onMouseOut='KurzorMimoNahledy()'></td> \n";
txt += "<input name='slshow' onclick='OvladacSlideShow();' class='galerie-navigace-foto' id='slideshow' type='button' style='cursor: pointer;' value='slideshow' onMouseOver='KurzorNadSlshow()' onMouseOut='KurzorMimoSlshow()'></td> \n";
txt += "<input name='previous' onClick='PrevPic();' class='galerie-navigace-foto' id='zpet' type='button' style='cursor: pointer;' value='&lt;&lt;&lt;' onMouseOver='KurzorNadPredchozi()' onMouseOut='KurzorMimoPredchozi()'></td> \n";
txt += "<input name='next' onclick='NextPic();' class='galerie-navigace-foto' id='tam' type='button' style='cursor: pointer;' value='&gt;&gt;&gt;' onMouseOver='KurzorNadDalsi()' onMouseOut='KurzorMimoDalsi()'></td></tr></form> \n";
txt += "<tr align=center valign=middle> \n";
txt += "<td> \n";
txt += "<IMG Name='imgprev' title='' alt='Orlice'> \n";
txt += "<div class='popiska-text' id='popis'></div> \n";
txt += "<div class='datum-text' id='datum'></div></td></tr><table> \n";
txt += "</BODY> \n";
txt += "</HTML>";

	document.open(); 
	document.write(txt);
	document.close(); 
}	
