function fotografie(i)
{
var txt;

txt = "<HTML> \n";
txt += "<HEAD> \n";
txt += "<TITLE>Železnice - Křivoklátsko</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 = 25; \n"; 
txt += "show = false; \n"; 
// jména suborů
txt += "images = new Array (); \n";
txt += "images[1] = 'fotky/38-24.jpg'; \n";
txt += "images[2] = 'fotky/38-25.jpg'; \n";
txt += "images[3] = 'fotky/45-31.jpg'; \n";
txt += "images[4] = 'fotky/46-12.jpg'; \n";
txt += "images[5] = 'fotky/46-13.jpg'; \n";
txt += "images[6] = 'fotky/46-14.jpg'; \n";
txt += "images[7] = 'fotky/46-30.jpg'; \n";
txt += "images[8] = 'fotky/59-06.jpg'; \n";
txt += "images[9] = 'fotky/59-07.jpg'; \n";
txt += "images[10] = 'fotky/63-18.jpg'; \n";
txt += "images[11] = 'fotky/63-19.jpg'; \n";
txt += "images[12] = 'fotky/64-12.jpg'; \n";
txt += "images[13] = 'fotky/64-15.jpg'; \n";
txt += "images[14] = 'fotky/70-05.jpg'; \n";
txt += "images[15] = 'fotky/79-17.jpg'; \n";
txt += "images[16] = 'fotky/83-19.jpg'; \n";
txt += "images[17] = 'fotky/83-23.jpg'; \n";
txt += "images[18] = 'fotky/83-25.jpg'; \n";
txt += "images[19] = 'fotky/84-16.jpg'; \n";
txt += "images[20] = 'fotky/129-05.jpg'; \n";
txt += "images[21] = 'fotky/129-11.jpg'; \n";
txt += "images[22] = 'fotky/129-24.jpg'; \n";
txt += "images[23] = 'fotky/2006-05-1379.jpg'; \n";
txt += "images[24] = 'fotky/2006-05-1392.jpg'; \n";
txt += "images[25] = 'fotky/2006-08-0044.jpg'; \n";
// Komentáře fotografií
txt += "comment = new Array () \n";
txt += "comment[1] = '534.0323, Pustověty - Městečko u Křivoklátu'; \n";
txt += "comment[2] = '534.0323, Městečko u Křivoklátu'; \n";
txt += "comment[3] = '498.022, Sp 11507, Kačice - Kamenné Žehrovice'; \n";
txt += "comment[4] = '751.022 ČD, Pn 67541, Lužná u Rakovníka - Řevničov'; \n";
txt += "comment[5] = '751.021+064 ČD, Pn 65690, Řevničov - Lužná u Rakovníka'; \n";
txt += "comment[6] = '740.425+458 OKD-D, Vn 59682, Řevničov - Lužná u Rakovníka'; \n";
txt += "comment[7] = '475.101, Kačice - Stochov'; \n";
txt += "comment[8] = '742.145 ČD, Pn 67723, Zbečno - Újezd nad Zbečnem'; \n";   
txt += "comment[9] = '498.022, Žloukovice'; \n";
txt += "comment[10] = '842.009 ČD, R 893, Městečko u Křivoklátu - Pustověty'; \n";   
txt += "comment[11] = '742.145 ČD, Pn 67722, Pustověty - Městečko u Křivoklátu'; \n";
txt += "comment[12] = '810.304 ČD, Os 2565, Lužná u Rakovníka - Řevničov'; \n";
txt += "comment[13] = '810.270 ČD, Os 2510, Řevničov - Lužná u Rakovníka'; \n";
txt += "comment[14] = '751.161+184 ČD, povodňový odklon, Lužná u Rakovníka - Řevničov'; \n";  
txt += "comment[15] = '434.1100 + 433.049, železniční muzeum Lužná u Rakovníka'; \n";
txt += "comment[16] = '854.024 ČD, R 1530, Řevničov - Lužná u Rakovníka'; \n";
txt += "comment[17] = '555.0153, Lužná u Rakovníka - Řevničov'; \n";
txt += "comment[18] = '556.0506, Lužná u Rakovníka - Řevničov'; \n";
txt += "comment[19] = '555.0153, železniční muzeum Lužná u Rakovníka'; \n";
txt += "comment[20] = '354.195, železniční muzeum Lužná u Rakovníka'; \n";
txt += "comment[21] = '354.195, železniční muzeum Lužná u Rakovníka'; \n";
txt += "comment[22] = '477.043, železniční muzeum Lužná u Rakovníka'; \n";
txt += "comment[23] = '354.195, železniční muzeum Lužná u Rakovníka'; \n";
txt += "comment[24] = '354.195, železniční muzeum Lužná u Rakovníka'; \n";
txt += "comment[25] = '498.022, Řevničov - Lužná u Rakovníka'; \n";
// Data fotografií
txt += "date = new Array () \n";
txt += "date[1] = '10.9.2000'; \n";
txt += "date[2] = '10.9.2000'; \n";
txt += "date[3] = '13.5.2001'; \n";
txt += "date[4] = '25.5.2001'; \n";
txt += "date[5] = '25.5.2001'; \n";
txt += "date[6] = '25.5.2001'; \n";
txt += "date[7] = '23.6.2001'; \n";
txt += "date[8] = '30.3.2002'; \n";
txt += "date[9] = '30.3.2002'; \n";
txt += "date[10] = '23.7.2002'; \n";
txt += "date[11] = '23.7.2002'; \n";
txt += "date[12] = '3.8.2002'; \n";
txt += "date[13] = '3.8.2002'; \n";
txt += "date[14] = '15.9.2002'; \n";
txt += "date[15] = '27.4.2003'; \n";
txt += "date[16] = '29.6.2003'; \n";
txt += "date[17] = '29.6.2003'; \n";
txt += "date[18] = '29.6.2003'; \n";
txt += "date[19] = '29.6.2003'; \n";
txt += "date[20] = '1.5.2005'; \n";
txt += "date[21] = '1.5.2005'; \n";
txt += "date[22] = '1.5.2005'; \n";
txt += "date[23] = '14.5.2006'; \n";
txt += "date[24] = '14.5.2006'; \n";
txt += "date[25] = '5.8.2006'; \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='Křivoklátsko'> \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(); 
}	
