function fotografie(i)
{
var txt;

txt = "<HTML> \n";
txt += "<HEAD> \n";
txt += "<TITLE>Železnice - Jizerské 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 = 31; \n"; 
txt += "show = false; \n"; 
// jména suborů
txt += "images = new Array (); \n";
txt += "images[1] = 'fotky/100-01.jpg'; \n";
txt += "images[2] = 'fotky/100-19.jpg'; \n";
txt += "images[3] = 'fotky/102-25.jpg'; \n";
txt += "images[4] = 'fotky/102-26.jpg'; \n";
txt += "images[5] = 'fotky/102-27.jpg'; \n";
txt += "images[6] = 'fotky/102-32.jpg'; \n";
txt += "images[7] = 'fotky/147-28.jpg'; \n";
txt += "images[8] = 'fotky/147-33.jpg'; \n";
txt += "images[9] = 'fotky/158-03.jpg'; \n";
txt += "images[10] = 'fotky/158-04.jpg'; \n";
txt += "images[11] = 'fotky/2006-05-0958.jpg'; \n";
txt += "images[12] = 'fotky/2006-05-0969.jpg'; \n";
txt += "images[13] = 'fotky/2006-05-0986.jpg'; \n";
txt += "images[14] = 'fotky/2006-05-1127.jpg'; \n";
txt += "images[15] = 'fotky/2006-05-1145.jpg'; \n";
txt += "images[16] = 'fotky/2006-05-1165.jpg'; \n";
txt += "images[17] = 'fotky/2006-05-1174.jpg'; \n";
txt += "images[18] = 'fotky/2006-09-1373.jpg'; \n";
txt += "images[19] = 'fotky/2006-09-1387.jpg'; \n";
txt += "images[20] = 'fotky/2006-09-1464.jpg'; \n";
txt += "images[21] = 'fotky/2006-09-1506.jpg'; \n";
txt += "images[22] = 'fotky/2007-04-0338.jpg'; \n";
txt += "images[23] = 'fotky/2007-04-0363.jpg'; \n";
txt += "images[24] = 'fotky/2007-04-0380.jpg'; \n";
txt += "images[25] = 'fotky/2007-04-0393.jpg'; \n";
txt += "images[26] = 'fotky/2009-08-0117.jpg'; \n";
txt += "images[27] = 'fotky/2009-08-0151.jpg'; \n";
txt += "images[28] = 'fotky/2009-09-0169.jpg'; \n";
txt += "images[29] = 'fotky/2009-09-0323.jpg'; \n";
txt += "images[30] = 'fotky/2009-09-0387.jpg'; \n";
txt += "images[31] = 'fotky/2009-09-0412.jpg'; \n";
// Komentáře fotografií
txt += "comment = new Array () \n";
txt += "comment[1] = '751.186 ČD, Rn 45060, Mníšek u Liberce - Oldřichov v Hájích'; \n";
txt += "comment[2] = '751.021+064 ČD, Rn 45065, Oldřichov v Hájích'; \n";
txt += "comment[3] = '753.211+141 ČD, Rn 45061, Raspenava - Oldřichov v Hájích'; \n";
txt += "comment[4] = '751.153+186 + pk751.095 ČD, Rn 45064, Oldřichov v Hájích'; \n";
txt += "comment[5] = '751.153+186 + pk751.095 ČD, Rn 45064, Oldřichov v Hájích'; \n";
txt += "comment[6] = '753.211+141 ČD, Rn 45066, Raspenava'; \n";
txt += "comment[7] = '854.210 ČD, Os 6313, Oldřichov v Hájích - Mníšek u Liberce'; \n";
txt += "comment[8] = '753.263+073 ČD, Rn 44211, Oldřichov v Hájích - Mníšek u Liberce'; \n";
txt += "comment[9] = '753.211+141 ČD, Rn 44211, Oldřichov v Hájích'; \n";
txt += "comment[10] = '753.060+073 ČD, Rn 44212, Raspenava'; \n";
txt += "comment[11] = '753.073+352 ČD, Rn 44211, Raspenava - Oldřichov v Hájích'; \n";
txt += "comment[12] = '753.211 ČD, Os 6321, Raspenava - Oldřichov v Hájích'; \n";
txt += "comment[13] = '753.263 ČD, Os 6323, Raspenava - Oldřichov v Hájích'; \n";
txt += "comment[14] = '749.244 ČD, Os 6317, Raspenava - Oldřichov v Hájích'; \n";
txt += "comment[15] = '743.002 ČD, Mn 83941, Raspenava - Oldřichov v Hájích'; \n";
txt += "comment[16] = '753.352+073 ČD, Nex 47205, Raspenava - Oldřichov v Hájích'; \n";
txt += "comment[17] = '753.263 ČD, Os 6323, Raspenava - Oldřichov v Hájích'; \n";
txt += "comment[18] = '854.023 ČD, Os 6313, Oldřichov v Hájích - Mníšek u Liberce'; \n";
txt += "comment[19] = '749.258 ČD, Os 6314, Krásná Studánka - Mníšek u Liberce'; \n";
txt += "comment[20] = '753.352 ČD, Rn 44211, Mníšek u Liberce - Krásná Studánka'; \n";
txt += "comment[21] = '854.212 ČD, Os 6323, Mníšek u Liberce - Krásná Studánka'; \n";
txt += "comment[22] = '753.301+073 + pk753.352 ČD, Rn 44202, Krásná Studánka - Mníšek u Liberce'; \n";
txt += "comment[23] = '854.008 ČD, Os 6319, Mníšek u Liberce - Krásná Studánka'; \n";
txt += "comment[24] = '753.352 ČD, NEx 47205, Mníšek u Liberce - Krásná Studánka'; \n";
txt += "comment[25] = '854.202 ČD, Os 6323, Mníšek u Liberce - Krásná Studánka'; \n";
txt += "comment[26] = '742.238+214 ČD Cargo, Rn 44200, Krásná Studánka - Mníšek u Liberce'; \n";
txt += "comment[27] = '742.214+238 ČD Cargo, Rn 44201, Frýdlant v Čechách - Raspenava'; \n";
txt += "comment[28] = '814.201/202 ČD, Os 6315, Oldřichov v Hájích - Mníšek u Liberce'; \n";
txt += "comment[29] = '814.236/235 ČD, Os 6329, Oldřichov v Hájích - Mníšek u Liberce'; \n";
txt += "comment[30] = '814.204/203 ČD, Os 6321, Oldřichov v Hájích - Mníšek u Liberce'; \n";
txt += "comment[31] = '814.215/216 ČD, Os 6323, Oldřichov v Hájích - Mníšek u Liberce'; \n";
// Data fotografií
txt += "date = new Array () \n";
txt += "date[1] = '8.7.2003'; \n";
txt += "date[2] = '8.7.2003'; \n";
txt += "date[3] = '19.9.2003'; \n";
txt += "date[4] = '19.9.2003'; \n";
txt += "date[5] = '19.9.2003'; \n";
txt += "date[6] = '19.9.2003'; \n";
txt += "date[7] = '4.9.2005'; \n";
txt += "date[8] = '4.9.2005'; \n";
txt += "date[9] = '30.10.2005'; \n";
txt += "date[10] = '30.10.2005'; \n";
txt += "date[11] = '10.5.2006'; \n";
txt += "date[12] = '10.5.2006'; \n";
txt += "date[13] = '10.5.2006'; \n";
txt += "date[14] = '11.5.2006'; \n";
txt += "date[15] = '11.5.2006'; \n";
txt += "date[16] = '11.5.2006'; \n";
txt += "date[17] = '11.5.2006'; \n";
txt += "date[18] = '23.9.2006'; \n";
txt += "date[19] = '23.9.2006'; \n";
txt += "date[20] = '23.9.2006'; \n";
txt += "date[21] = '23.9.2006'; \n";
txt += "date[22] = '14.4.2007'; \n";
txt += "date[23] = '14.4.2007'; \n";
txt += "date[24] = '14.4.2007'; \n";
txt += "date[25] = '14.4.2007'; \n";
txt += "date[26] = '8.8.2009'; \n";
txt += "date[27] = '8.8.2009'; \n";
txt += "date[28] = '7.9.2009'; \n";
txt += "date[29] = '7.9.2009'; \n";
txt += "date[30] = '8.9.2009'; \n";
txt += "date[31] = '8.9.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='Jizerské 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(); 
}	
