1,6 → 1,44 |
// History: |
// Doplnìna detekce jazyka domuentu (ve znaèce body) |
|
//var undefined; // Pro zpetnou kompatibilitu kdyby JS nepodporoval undefined |
|
function Test() |
// Testovací funkce pro ladìní |
{ |
with (document) |
{ |
var Info; |
// Test |
// Uiteèné: document.URL (cesta a jméno souboru stránky) |
write('<p class="MenuText Small">'); |
write('document language '+DocLang()); |
write('</p>'); |
write('<p class="MenuText Small">'); |
write('document language '+navigator.appVersion); |
write('</p>'); |
write('<p class="MenuText Small">'); |
write('document language '+document.body.lang); |
write('</p>'); |
write('<p class="MenuText Small">'); |
write('navigator language '+navigator.language); // FF ano, IE6 ne |
write('</p>'); |
} |
} |
|
|
function DocLang() |
// Vrací zkratku jazyka stránky ( cz en ) |
// Není-li v dokumentu uvedená vrací en |
{ |
var s; |
s=document.body.lang.toLowerCase(); |
if(s=="cs") return "cz"; // To by mì zajímalo proè je v HTML cs |
if(s=="cz") return "cz"; // a vude jinde cz |
return "en"; |
} |
|
|
function DrawHeader(MoreInfo) |
// Nepovinny parametr udava nadpis stranky |
// Neni-li uveden bere se text ze znacky title dokumentu |
7,18 → 45,20 |
{ |
with (document) |
{ |
if(0) |
write('<b>Hlavièka z JavScriptu: ', MoreInfo, '</b>' ); |
else |
{ |
// Default informace pokud je parametr nezadany |
if(MoreInfo==undefined) MoreInfo=document.title; |
// Vlozeni HTML kodu |
write('<div class="InnerHeader"> '); |
// Default informace pokud je parametr nezadany |
if(MoreInfo==undefined) MoreInfo=document.title; |
// Vlozeni HTML kodu |
write('<div class="InnerHeader"> '); |
if (DocLang()=="cz") |
{ // èeský text |
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>'); |
write('<span class="HeaderText">'+MoreInfo+'</span>'); |
write('</div> '); |
} |
else |
{ // English text |
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>'); |
} |
write('<span class="HeaderText">'+MoreInfo+'</span>'); |
write('</div> '); |
} |
} |
|
29,29 → 69,32 |
{ |
with(document) |
{ |
if (0) |
{ |
write('<b>Menu z JavaScriptu: ', MoreInfo, '</b>'); |
} |
else |
{ |
// Default text |
if(MoreInfo==undefined) MoreInfo="Menu"; |
// Vlastni menu |
write('<div class="InnerMenu">'); |
write(' <div class="Navigation">'); |
write(' <div class="MenuText">'); |
write( MoreInfo); |
write(' </div>'); |
write(' <ul>'); |
// Default text |
if(MoreInfo==undefined) MoreInfo="Menu"; |
// Vlastni menu |
write('<div class="InnerMenu">'); |
write(' <div class="Navigation">'); |
write(' <div class="MenuText">'); |
write( MoreInfo); |
write(' </div>'); |
write(' <ul>'); |
if (DocLang()=="cz") |
{ // èeský text |
write(' <li> <a href="index.html" title="Domù">MLAB Home</a> </li>'); |
write(' <li> <a href="AboutAuthors.html" title="O autorech">Autoøi</a> </li>'); |
write(' <li> <a href="AboutWeb.html" title="O webu">O WEBu</a> </li>'); |
write(' <li> <a href="ToDoList.html" title="Co jìtì zbývá udìlat">To do list</a> </li>'); |
write(' </ul>'); |
write(' </div>'); |
write('</div> '); |
} |
else |
{ // English text |
write(' <li> <a href="index.html" title="Home">MLAB Home</a> </li>'); |
write(' <li> <a href="AboutAuthors.html" title="About Authors">Authors</a> </li>'); |
write(' <li> <a href="AboutWeb.html" title="About this WEB">About WEB</a> </li>'); |
write(' <li> <a href="ToDoList.html" title="What to do">To do list</a> </li>'); |
} |
write(' </ul>'); |
write(' </div>'); |
write('</div> '); |
} |
} |
|
61,23 → 104,25 |
{ |
with (document) |
{ |
if (0) |
{ |
write('<b>Patièka z JavaScriptu: ', MoreInfo, '</b>'); |
} |
else |
{ |
// Default text je prazdny |
if(MoreInfo==undefined) MoreInfo=""; |
// Vlozeni HTML kodu |
write('<div class="InnerFooter">'); |
write(' '); // ústupek IE6 (chyba výpoètu íøky pøi nenulovém paddingu ) |
// Default text je prazdny |
if(MoreInfo==undefined) MoreInfo=""; |
// Vlozeni HTML kodu |
write('<div class="InnerFooter">'); |
write(' '); // ústupek IE6 (chyba výpoètu íøky pøi nenulovém paddingu ) |
if (DocLang()=="cz") |
{ // èeský text |
write('<a href=#>Nahoru</a> ') |
write('<a href="Copyright.html">Copyright</a> © '); |
write('<a href="AboutAuthors.html">Autoøi MLAB</a> '); |
write('['+document.lastModified+'] '); |
write(MoreInfo); |
write('</div>'); |
} |
else |
{ // English text |
write('<a href=#>Up</a> ') |
write('<a href="Copyright.html">Copyright</a> © '); |
write('<a href="AboutAuthors.html">MLAB Authors</a> '); |
} |
write('['+document.lastModified+'] '); |
write(MoreInfo); |
write('</div>'); |
} |
} |