function fotografie(i)
{
var txt;

txt = "<HTML> \n";
txt += "<HEAD> \n";
txt += "<TITLE>Železnice - Lužické hory</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 = 59; \n"; 
txt += "show = false; \n"; 
// jména suborů
txt += "images = new Array (); \n";
txt += "images[1] = 'fotky/69-32.jpg'; \n";
txt += "images[2] = 'fotky/104-07.jpg'; \n";
txt += "images[3] = 'fotky/105-08.jpg'; \n";
txt += "images[4] = 'fotky/106-12.jpg'; \n";
txt += "images[5] = 'fotky/113-26.jpg'; \n";
txt += "images[6] = 'fotky/114-36.jpg'; \n";
txt += "images[7] = 'fotky/117-15.jpg'; \n";
txt += "images[8] = 'fotky/117-23.jpg'; \n";
txt += "images[9] = 'fotky/118-03.jpg'; \n";
txt += "images[10] = 'fotky/118-12.jpg'; \n";
txt += "images[11] = 'fotky/118-13.jpg'; \n";
txt += "images[12] = 'fotky/118-14.jpg'; \n";
txt += "images[13] = 'fotky/118-16.jpg'; \n";
txt += "images[14] = 'fotky/118-22.jpg'; \n";
txt += "images[15] = 'fotky/118-23.jpg'; \n";
txt += "images[16] = 'fotky/118-35.jpg'; \n";
txt += "images[17] = 'fotky/119-01.jpg'; \n";
txt += "images[18] = 'fotky/119-03.jpg'; \n";
txt += "images[19] = 'fotky/119-06.jpg'; \n";
txt += "images[20] = 'fotky/119-16.jpg'; \n";
txt += "images[21] = 'fotky/119-19.jpg'; \n";
txt += "images[22] = 'fotky/119-21.jpg'; \n";
txt += "images[23] = 'fotky/119-25.jpg'; \n";
txt += "images[24] = 'fotky/119-28.jpg'; \n";
txt += "images[25] = 'fotky/119-31.jpg'; \n";
txt += "images[26] = 'fotky/121-06.jpg'; \n";
txt += "images[27] = 'fotky/121-10.jpg'; \n";
txt += "images[28] = 'fotky/121-13.jpg'; \n";
txt += "images[29] = 'fotky/131-35.jpg'; \n";
txt += "images[30] = 'fotky/132-09.jpg'; \n";
txt += "images[31] = 'fotky/132-12.jpg'; \n";
txt += "images[32] = 'fotky/132-21.jpg'; \n";
txt += "images[33] = 'fotky/132-23.jpg'; \n";
txt += "images[34] = 'fotky/132-24.jpg'; \n";
txt += "images[35] = 'fotky/147-17.jpg'; \n";
txt += "images[36] = 'fotky/147-23.jpg'; \n";
txt += "images[37] = 'fotky/147-25.jpg'; \n";
txt += "images[38] = 'fotky/151-07.jpg'; \n";
txt += "images[39] = 'fotky/151-15.jpg'; \n";
txt += "images[40] = 'fotky/156-13.jpg'; \n";
txt += "images[41] = 'fotky/156-16.jpg'; \n";
txt += "images[42] = 'fotky/157-34.jpg'; \n";
txt += "images[43] = 'fotky/157-36.jpg'; \n";
txt += "images[44] = 'fotky/2006-09-1157.jpg'; \n";
txt += "images[45] = 'fotky/2006-09-1217.jpg'; \n";
txt += "images[46] = 'fotky/2006-09-1257.jpg'; \n";
txt += "images[47] = 'fotky/2006-09-1273.jpg'; \n";
txt += "images[48] = 'fotky/2006-09-1306.jpg'; \n";
txt += "images[49] = 'fotky/2007-08-0687.jpg'; \n";
txt += "images[50] = 'fotky/2007-08-0791.jpg'; \n";
txt += "images[51] = 'fotky/2007-08-0862.jpg'; \n";
txt += "images[52] = 'fotky/2007-09-1782.jpg'; \n";
txt += "images[53] = 'fotky/2007-09-1839.jpg'; \n";
txt += "images[54] = 'fotky/2007-09-1884.jpg'; \n";
txt += "images[55] = 'fotky/2008-09-1201.jpg'; \n";
txt += "images[56] = 'fotky/2008-09-1220.jpg'; \n";
txt += "images[57] = 'fotky/2008-09-1224.jpg'; \n";
txt += "images[58] = 'fotky/2009-06-0493.jpg'; \n";
txt += "images[59] = 'fotky/2009-06-0539.jpg'; \n";
// Komentáře fotografií
txt += "comment = new Array () \n";
txt += "comment[1] = '750.358 + pk750.335 ČD (na fotografii), 3. nsl 61624 (odkloněný Nex 47366), Svor - Jedlová zast.'; \n";
txt += "comment[2] = 'Podzim na Jedlové'; \n";
txt += "comment[3] = '750.368 ČD, Os 2606, Jedlová - Chřibská'; \n";
txt += "comment[4] = 'Pozor vlak!'; \n";
txt += "comment[5] = '753.187+073 ČD, Pn 64330 (odkloněný Pn 64300), Novina'; \n";
txt += "comment[6] = '753.192 ČD, R 897, Křižany'; \n";
txt += "comment[7] = '843.006 ČD, R 894, Novina'; \n";   
txt += "comment[8] = '750.385 ČD, Mn 83901, Novina'; \n";
txt += "comment[9] = '750.410 ČD, R 697 Ploučnice, Novina'; \n";   
txt += "comment[10] = '750.410 ČD, R 694, Novina'; \n";
txt += "comment[11] = '750.385 ČD, R 693, Křižany - Novina'; \n";
txt += "comment[12] = '810.346 ČD, Os 6112, Novina - Křižany'; \n";
txt += "comment[13] = '810.199+200 ČD, Os 6111, Křižany'; \n";
txt += "comment[14] = '830.214 ČD, Os 2621, Jedlová - Kytlice'; \n";
txt += "comment[15] = '753.391 ČD, Jedlová - Kytlice'; \n";
txt += "comment[16] = '742.308+344 + pk742.077 ČD, Nex 54620, Kytlice - Jedlová'; \n";
txt += "comment[17] = '843.012 ČD, Os 2645, Jedlová - Kytlice'; \n";
txt += "comment[18] = '742.177+176 ČD, Jedlová - Kytlice'; \n";
txt += "comment[19] = '830.154 ČD, Os 2653, Jedlová - Kytlice'; \n";
txt += "comment[20] = '742.135 ČD, Os 2604, Horní Kamenice - Mlýny'; \n";
txt += "comment[21] = '742.074 ČD, Os 2645, Mlýny - Horní Kamenice'; \n";
txt += "comment[22] = '742.135 ČD, Os 2623, Mlýny - Horní Kamenice'; \n";
txt += "comment[23] = '742.344+308 ČD, Česká Kamenice - Veselé pod Rabštejnem'; \n";   
txt += "comment[24] = '830.154 ČD, Os 2656, Veselé pod Rabštejnem'; \n";
txt += "comment[25] = 'Veselé pod Rabštejnem'; \n";   
txt += "comment[26] = 'Cesta na Jedlovou'; \n";
txt += "comment[27] = 'Cesta na Jedlovou'; \n";
txt += "comment[28] = '750.395 ČD, R 913, Chřibská - Jedlová'; \n";
txt += "comment[29] = '753.707+708 + pk740.690+727 Unipetrol Doprava, Vn 59567, Chřibská - Jedlová'; \n";   
txt += "comment[30] = '810.220 ČD, Os 2608, Jedlová - Chřibská'; \n";
txt += "comment[31] = '843.006 ČD, Os 2653, Jedlová'; \n";   
txt += "comment[32] = '750.410 ČD, Sp 1817, Jedlová'; \n";
txt += "comment[33] = '740.690+726 Unipetrol Doprava, Vn 59567, Jedlová'; \n";
txt += "comment[34] = '750.335 ČD, Sp 1814, Jedlová zast. - Jedlová'; \n";
txt += "comment[35] = '810.200 ČD, Os 6107, Novina'; \n";
txt += "comment[36] = '843.014 ČD, R 894, Novina'; \n";   
txt += "comment[37] = '749.244 ČD, R 697, Novina'; \n";
txt += "comment[38] = '749.258 ČD, R 697, Novina'; \n";
txt += "comment[39] = '843.014 ČD, R 896, Křižany'; \n";
txt += "comment[40] = '810.113 ČD, Os 6107, Křižany - Novina'; \n";   
txt += "comment[41] = '749.244 ČD, R 697, Křižany - Novina'; \n";
txt += "comment[42] = 'Železniční viadukt Novina'; \n";
txt += "comment[43] = 'Železniční viadukt Novina'; \n";
txt += "comment[44] = '750.410 ČD, Pn 66616, Jedlová - Chřibská'; \n";
txt += "comment[45] = '810.340 ČD, Os 6025, Svor'; \n";   
txt += "comment[46] = '750.410 ČD, Pn 66619, Jedlová zast. - Svor'; \n";
txt += "comment[47] = '843.008 ČD, Sp 1817, Jedlová zast. - Svor'; \n";
txt += "comment[48] = '750.061 ČD, Os 2627, Jedlová - Kytlice'; \n";
txt += "comment[49] = '810.349 ČD, Os 2639, Jedlová - Kytlice'; \n";
txt += "comment[50] = '810.202 ČD, Os 2602, Kytlice - Jedlová'; \n";
txt += "comment[51] = '810.667 ČD, Os 2602, Kytlice - Jedlová'; \n";
txt += "comment[52] = '814.017 ČD, Os 2637, Jedlová - Kytlice'; \n";
txt += "comment[53] = '810.300 ČD, Os 2639, Jedlová - Kytlice'; \n";
txt += "comment[54] = '742.291 ČD, Os 2643, Jedlová - Kytlice'; \n";
txt += "comment[55] = '810.349 ČD, Os 6025, Jedlová zast. - Svor'; \n";
txt += "comment[56] = '750.222 ČD Cargo, Pn 66619, Jedlová zast. - Svor'; \n";
txt += "comment[57] = '810.204 ČD, Os 6027, Jedlová zast. - Svor'; \n";
txt += "comment[58] = '854.225 + 954.206 ČD, R 1114, Svor - Jedlová zast.'; \n";
txt += "comment[59] = '854.016 ČD, R 1116, Svor - Jedlová zast.'; \n";
// Data fotografií
txt += "date = new Array () \n";
txt += "date[1] = '12.9.2002'; \n";
txt += "date[2] = '830.102 ČD, Os 2604, Jedlová - Chřibská, 23.11.2003'; \n";
txt += "date[3] = '24.1.2004'; \n";
txt += "date[4] = 'Jedlová, 21.2.2004'; \n";
txt += "date[5] = '7.8.2004'; \n";
txt += "date[6] = '23.8.2004'; \n";
txt += "date[7] = '3.9.2004'; \n";
txt += "date[8] = '3.9.2004'; \n";
txt += "date[9] = '6.9.2004'; \n";
txt += "date[10] = '6.9.2004'; \n";
txt += "date[11] = '6.9.2004'; \n";
txt += "date[12] = '6.9.2004'; \n";
txt += "date[13] = '6.9.2004'; \n";
txt += "date[14] = '7.9.2004'; \n";
txt += "date[15] = '7.9.2004'; \n";
txt += "date[16] = '9.9.2004'; \n";
txt += "date[17] = '9.9.2004'; \n";
txt += "date[18] = '9.9.2004'; \n";
txt += "date[19] = '9.9.2004'; \n";
txt += "date[20] = '10.9.2004'; \n";
txt += "date[21] = '10.9.2004'; \n";
txt += "date[22] = '10.9.2004'; \n";
txt += "date[23] = '10.9.2004'; \n";
txt += "date[24] = '10.9.2004'; \n";
txt += "date[25] = '10.9.2004'; \n";
txt += "date[26] = '750.395 ČD, R 910, Svor - Jedlová, 24.10.2004'; \n";
txt += "date[27] = '750.395 ČD, R 910, Svor - Jedlová, 24.10.2004'; \n";
txt += "date[28] = '24.10.2004'; \n";
txt += "date[29] = '21.5.2005'; \n";
txt += "date[30] = '25.5.2005'; \n";
txt += "date[31] = '27.5.2005'; \n";
txt += "date[32] = '27.5.2005'; \n";
txt += "date[33] = '27.5.2005'; \n";
txt += "date[34] = '27.5.2005'; \n";
txt += "date[35] = '4.9.2005'; \n";
txt += "date[36] = '4.9.2005'; \n";
txt += "date[37] = '4.9.2005'; \n";
txt += "date[38] = '14.9.2005'; \n";
txt += "date[39] = '14.9.2005'; \n";
txt += "date[40] = '30.10.2005'; \n";
txt += "date[41] = '30.10.2005'; \n";
txt += "date[42] = '30.10.2005'; \n";
txt += "date[43] = '30.10.2005'; \n";
txt += "date[44] = '13.9.2006'; \n";
txt += "date[45] = '14.9.2006'; \n";
txt += "date[46] = '14.9.2006'; \n";
txt += "date[47] = '14.9.2006'; \n";
txt += "date[48] = '14.9.2006'; \n";
txt += "date[49] = '17.8.2007'; \n";
txt += "date[50] = '18.8.2007'; \n";
txt += "date[51] = '19.8.2007'; \n";
txt += "date[52] = '23.9.2007'; \n";
txt += "date[53] = '23.9.2007'; \n";
txt += "date[54] = '23.9.2007'; \n";
txt += "date[55] = '26.9.2008'; \n";
txt += "date[56] = '26.9.2008'; \n";
txt += "date[57] = '26.9.2008'; \n";
txt += "date[58] = '13.6.2009'; \n";
txt += "date[59] = '13.6.2009'; \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='Lužické hory'> \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(); 
}	
