Line -... |
Line 1... |
- |
|
1 |
// History: |
- |
|
2 |
// Doplnìna detekce jazyka domuentu (ve znaèce body) |
- |
|
3 |
|
1 |
//var undefined; // Pro zpetnou kompatibilitu kdyby JS nepodporoval undefined |
4 |
//var undefined; // Pro zpetnou kompatibilitu kdyby JS nepodporoval undefined |
2 |
|
5 |
|
- |
|
6 |
function Test() |
- |
|
7 |
// Testovací funkce pro ladìní |
- |
|
8 |
{ |
- |
|
9 |
with (document) |
- |
|
10 |
{ |
- |
|
11 |
var Info; |
- |
|
12 |
// Test |
- |
|
13 |
// Uiteèné: document.URL (cesta a jméno souboru stránky) |
- |
|
14 |
write('<p class="MenuText Small">'); |
- |
|
15 |
write('document language '+DocLang()); |
- |
|
16 |
write('</p>'); |
- |
|
17 |
write('<p class="MenuText Small">'); |
- |
|
18 |
write('document language '+navigator.appVersion); |
- |
|
19 |
write('</p>'); |
- |
|
20 |
write('<p class="MenuText Small">'); |
- |
|
21 |
write('document language '+document.body.lang); |
- |
|
22 |
write('</p>'); |
- |
|
23 |
write('<p class="MenuText Small">'); |
- |
|
24 |
write('navigator language '+navigator.language); // FF ano, IE6 ne |
- |
|
25 |
write('</p>'); |
- |
|
26 |
} |
- |
|
27 |
} |
- |
|
28 |
|
- |
|
29 |
|
- |
|
30 |
function DocLang() |
- |
|
31 |
// Vrací zkratku jazyka stránky ( cz en ) |
- |
|
32 |
// Není-li v dokumentu uvedená vrací en |
- |
|
33 |
{ |
- |
|
34 |
var s; |
- |
|
35 |
s=document.body.lang.toLowerCase(); |
- |
|
36 |
if(s=="cs") return "cz"; // To by mì zajímalo proè je v HTML cs |
- |
|
37 |
if(s=="cz") return "cz"; // a vude jinde cz |
- |
|
38 |
return "en"; |
- |
|
39 |
} |
- |
|
40 |
|
3 |
|
41 |
|
4 |
function DrawHeader(MoreInfo) |
42 |
function DrawHeader(MoreInfo) |
5 |
// Nepovinny parametr udava nadpis stranky |
43 |
// Nepovinny parametr udava nadpis stranky |
6 |
// Neni-li uveden bere se text ze znacky title dokumentu |
44 |
// Neni-li uveden bere se text ze znacky title dokumentu |
7 |
{ |
45 |
{ |
8 |
with (document) |
46 |
with (document) |
9 |
{ |
47 |
{ |
10 |
if(0) |
- |
|
11 |
write('<b>Hlavièka z JavScriptu: ', MoreInfo, '</b>' ); |
- |
|
12 |
else |
- |
|
13 |
{ |
- |
|
14 |
// Default informace pokud je parametr nezadany |
48 |
// Default informace pokud je parametr nezadany |
15 |
if(MoreInfo==undefined) MoreInfo=document.title; |
49 |
if(MoreInfo==undefined) MoreInfo=document.title; |
16 |
// Vlozeni HTML kodu |
50 |
// Vlozeni HTML kodu |
17 |
write('<div class="InnerHeader"> '); |
51 |
write('<div class="InnerHeader"> '); |
- |
|
52 |
if (DocLang()=="cz") |
- |
|
53 |
{ // èeský text |
18 |
write('<a href="index.html" title="Domù"><span class="HeaderLogo">MLAB</span><img border=0 width=120 height=57 src="MLAB_online.gif" alt="MLAB Logo"></a>'); |
54 |
write('<a href="index.html" title="Domù"><span class="HeaderLogo">MLAB</span><img border=0 width=120 height=57 src="MLAB_online.gif" alt="MLAB Logo"></a>'); |
- |
|
55 |
} |
- |
|
56 |
else |
- |
|
57 |
{ // English text |
- |
|
58 |
write('<a href="index.html" title="Home"><span class="HeaderLogo">MLAB</span><img border=0 width=120 height=57 src="MLAB_online.gif" alt="MLAB Logo"></a>'); |
- |
|
59 |
} |
19 |
write('<span class="HeaderText">'+MoreInfo+'</span>'); |
60 |
write('<span class="HeaderText">'+MoreInfo+'</span>'); |
20 |
write('</div> '); |
61 |
write('</div> '); |
21 |
} |
62 |
} |
22 |
} |
63 |
} |
23 |
} |
- |
|
24 |
|
64 |
|
25 |
|
65 |
|
26 |
function DrawMenu(MoreInfo) |
66 |
function DrawMenu(MoreInfo) |
27 |
// Nepovinny parametr udava nazev menu |
67 |
// Nepovinny parametr udava nazev menu |
28 |
// Neni-li uveden dava se text Menu |
68 |
// Neni-li uveden dava se text Menu |
29 |
{ |
69 |
{ |
30 |
with(document) |
70 |
with(document) |
31 |
{ |
71 |
{ |
32 |
if (0) |
- |
|
33 |
{ |
- |
|
34 |
write('<b>Menu z JavaScriptu: ', MoreInfo, '</b>'); |
- |
|
35 |
} |
- |
|
36 |
else |
- |
|
37 |
{ |
- |
|
38 |
// Default text |
72 |
// Default text |
39 |
if(MoreInfo==undefined) MoreInfo="Menu"; |
73 |
if(MoreInfo==undefined) MoreInfo="Menu"; |
40 |
// Vlastni menu |
74 |
// Vlastni menu |
41 |
write('<div class="InnerMenu">'); |
75 |
write('<div class="InnerMenu">'); |
42 |
write(' <div class="Navigation">'); |
76 |
write(' <div class="Navigation">'); |
43 |
write(' <div class="MenuText">'); |
77 |
write(' <div class="MenuText">'); |
44 |
write( MoreInfo); |
78 |
write( MoreInfo); |
45 |
write(' </div>'); |
79 |
write(' </div>'); |
46 |
write(' <ul>'); |
80 |
write(' <ul>'); |
- |
|
81 |
if (DocLang()=="cz") |
- |
|
82 |
{ // èeský text |
47 |
write(' <li> <a href="index.html" title="Domù">MLAB Home</a> </li>'); |
83 |
write(' <li> <a href="index.html" title="Domù">MLAB Home</a> </li>'); |
48 |
write(' <li> <a href="AboutAuthors.html" title="O autorech">Autoøi</a> </li>'); |
84 |
write(' <li> <a href="AboutAuthors.html" title="O autorech">Autoøi</a> </li>'); |
49 |
write(' <li> <a href="AboutWeb.html" title="O webu">O WEBu</a> </li>'); |
85 |
write(' <li> <a href="AboutWeb.html" title="O webu">O WEBu</a> </li>'); |
50 |
write(' <li> <a href="ToDoList.html" title="Co jìtì zbývá udìlat">To do list</a> </li>'); |
86 |
write(' <li> <a href="ToDoList.html" title="Co jìtì zbývá udìlat">To do list</a> </li>'); |
- |
|
87 |
} |
- |
|
88 |
else |
- |
|
89 |
{ // English text |
- |
|
90 |
write(' <li> <a href="index.html" title="Home">MLAB Home</a> </li>'); |
- |
|
91 |
write(' <li> <a href="AboutAuthors.html" title="About Authors">Authors</a> </li>'); |
- |
|
92 |
write(' <li> <a href="AboutWeb.html" title="About this WEB">About WEB</a> </li>'); |
- |
|
93 |
write(' <li> <a href="ToDoList.html" title="What to do">To do list</a> </li>'); |
- |
|
94 |
} |
51 |
write(' </ul>'); |
95 |
write(' </ul>'); |
52 |
write(' </div>'); |
96 |
write(' </div>'); |
53 |
write('</div> '); |
97 |
write('</div> '); |
54 |
} |
98 |
} |
55 |
} |
99 |
} |
56 |
} |
- |
|
57 |
|
100 |
|
58 |
|
101 |
|
59 |
function DrawFooter(MoreInfo) |
102 |
function DrawFooter(MoreInfo) |
60 |
// Nepovinny parametr pro text do paticky |
103 |
// Nepovinny parametr pro text do paticky |
61 |
{ |
104 |
{ |
62 |
with (document) |
105 |
with (document) |
63 |
{ |
106 |
{ |
64 |
if (0) |
- |
|
65 |
{ |
- |
|
66 |
write('<b>Patièka z JavaScriptu: ', MoreInfo, '</b>'); |
- |
|
67 |
} |
- |
|
68 |
else |
- |
|
69 |
{ |
- |
|
70 |
// Default text je prazdny |
107 |
// Default text je prazdny |
71 |
if(MoreInfo==undefined) MoreInfo=""; |
108 |
if(MoreInfo==undefined) MoreInfo=""; |
72 |
// Vlozeni HTML kodu |
109 |
// Vlozeni HTML kodu |
73 |
write('<div class="InnerFooter">'); |
110 |
write('<div class="InnerFooter">'); |
74 |
write(' '); // ústupek IE6 (chyba výpoètu íøky pøi nenulovém paddingu ) |
111 |
write(' '); // ústupek IE6 (chyba výpoètu íøky pøi nenulovém paddingu ) |
- |
|
112 |
if (DocLang()=="cz") |
- |
|
113 |
{ // èeský text |
75 |
write('<a href=#>Nahoru</a> ') |
114 |
write('<a href=#>Nahoru</a> ') |
76 |
write('<a href="Copyright.html">Copyright</a> © '); |
115 |
write('<a href="Copyright.html">Copyright</a> © '); |
77 |
write('<a href="AboutAuthors.html">Autoøi MLAB</a> '); |
116 |
write('<a href="AboutAuthors.html">Autoøi MLAB</a> '); |
- |
|
117 |
} |
- |
|
118 |
else |
- |
|
119 |
{ // English text |
- |
|
120 |
write('<a href=#>Up</a> ') |
- |
|
121 |
write('<a href="Copyright.html">Copyright</a> © '); |
- |
|
122 |
write('<a href="AboutAuthors.html">MLAB Authors</a> '); |
- |
|
123 |
} |
78 |
write('['+document.lastModified+'] '); |
124 |
write('['+document.lastModified+'] '); |
79 |
write(MoreInfo); |
125 |
write(MoreInfo); |
80 |
write('</div>'); |
126 |
write('</div>'); |
81 |
} |
127 |
} |
82 |
} |
128 |
} |
83 |
} |
- |
|