// Funkcja ladujaca tresc do bloku - wersja polska
function load_content(nazwa)
{
document.getElementById("kontener_en").style.backgroundImage="none";
document.getElementById("kontener_en").style.backgroundColor="#FFFFFF";
var req = mint.Request();
req.encoding="UTF-8";
req.retryNum=0;
req.OnSuccess = function()
{
$("content_wlasciwy").innerHTML = this.responseText;
document.getElementById('kontener_en').style.backgroundImage = 'url(images/tlo_glowne_en.jpg)';
document.getElementById('kontener_en').style.backgroundPosition = 'bottom';
document.getElementById('kontener_en').style.backgroundRepeat = 'no-repeat';
}
req.OnLoading = function()
{
$("content_wlasciwy").innerHTML = "
Trwa ładowanie danych..
"; } req.OnError = function() { $("content_wlasciwy").innerHTML = "
Brak danych..
"; } req.Send("tresc_en/"+nazwa+".html"); } // Funkcja ladujaca tresc do bloku function load_news() { var req = mint.Request(); req.retryNum=0; req.OnSuccess = function() { $("content_wlasciwy").innerHTML = this.responseText; } req.OnLoading = function() { $("content_wlasciwy").innerHTML = "
Trwa ładowanie danych..
"; } req.OnError = function() { $("content_wlasciwy").innerHTML = "
Brak danych..
"; } req.Send("tresc_en/news.php"); } function load_sign() { var req = mint.Request(); req.retryNum=0; req.OnSuccess = function() { $("content_wlasciwy").innerHTML = this.responseText; } req.OnLoading = function() { $("content_wlasciwy").innerHTML = "
Trwa ładowanie danych..
"; } req.OnError = function() { $("content_wlasciwy").innerHTML = "
Brak danych..
"; } req.Send("tresc_en/sign.php"); } function send_mail() { var req = mint.Request(); req.retryNum=0; req.OnSuccess = function() { $("content_wlasciwy").innerHTML = this.responseText; } req.OnLoading = function() { $("content_wlasciwy").innerHTML = "
Trwa ładowanie danych..
"; } req.OnError = function() { $("content_wlasciwy").innerHTML = "
Brak danych..
"; } req.Send("tresc_en/sendmail.php"); } function menu_klik(id_menu,nazwa) { iden="men"+id_menu; element = document.getElementById(iden); // Zamiana obrazkow if (element.alt==iden) { // Element glowny zwijaj_men(iden); // Zwiniecie elemenyow if (nazwa=='dlu') { zwijaj_sub1(id_menu,nazwa,5); } if (nazwa=='dlas') { // w momencie powrotu dzialu "korzysci" zmienic na 6 zwijaj_sub1(id_menu,nazwa,5); } if (nazwa=='szk') { zwijaj_sub1(id_menu,nazwa,1); } if (nazwa=='dojazd') { zwijaj_sub1(id_menu,nazwa,5); } if (nazwa=='onas') { zwijaj_sub1(id_menu,nazwa,6); } if (nazwa=='warpraw') { zwijaj_sub1(id_menu,nazwa,3); } // Podmiana element.src="images/menu_en/men"+id_menu+"b"+".png"; element.alt=iden+"b"; if (nazwa != 'xxx') { subelement = document.getElementById(nazwa+"_1"); subelement.src="images/menu_en/sub1/"+nazwa+"_1b.png"; } } else { if (document.getElementById(iden).className!='node') { element.src="images/menu_en/men"+id_menu+".png"; element.alt=iden; } } } function sub1_klik(id_menu,nazwa,id_parent,wszystkich) { iden=nazwa+"_"+id_menu; element = document.getElementById(iden); // Zamiana obrazkow if (element.alt==iden) { // Element glowny zwijaj_sub1(id_menu,nazwa,wszystkich); element.src="images/menu_en/sub1/"+nazwa+"_"+id_menu+"b"+".png"; element.alt=iden+"b"; } else { if (document.getElementById(iden).className!='node') { element.src="images/menu_en/sub1/"+nazwa+"_"+id_menu+".png"; element.alt=iden; } } } function sub2_klik(id_menu,nazwa,wszystkich) { iden=nazwa+"_"+id_menu; element = document.getElementById(iden); // Zamiana obrazkow if (element.alt==iden) { // Element glowny zwijaj_sub2(id_menu,nazwa,wszystkich); element.src="images/menu_en/sub2/"+nazwa+"_"+id_menu+"b"+".png"; element.alt=iden+"b"; } } function zwijaj_men(identyfikator_aktywnego) { for (isx = 1; isx <= 10; isx++) { ix="men"+isx; elem = document.getElementById(ix); if (identyfikator_aktywnego != ix) { elem.src="images/menu_en/"+ix+".png"; elem.alt=ix; } } } function zwijaj_sub1(identyfikator_aktywnego,nazwa,wszystkich) { for (isx = 1; isx <= wszystkich; isx++) { ix=nazwa+"_"+isx; elem = document.getElementById(ix); if (identyfikator_aktywnego != ix) { elem.src="images/menu_en/sub1/"+ix+".png"; elem.alt=ix; } } } function zwijaj_sub2(identyfikator_aktywnego,nazwa,wszystkich) { for (isx = 1; isx <= wszystkich; isx++) { ix=nazwa+"_"+isx; elem = document.getElementById(ix); if (identyfikator_aktywnego != ix) { elem.src="images/menu_en/sub2/"+ix+".png"; elem.alt=ix; } } } function Menu(id, style, otworz, wysun, czasRozwin, czasZwin, czasOtworz, czasZamknij, nieInicjalizuj) { if (typeof czasRozwin == 'undefined' || czasRozwin < 0) czasRozwin = 25; if (typeof czasZwin == 'undefined' || czasZwin < 0) czasZwin = 25; if (typeof czasOtworz == 'undefined' || czasOtworz < 0) czasOtworz = 250; if (typeof czasZamknij == 'undefined' || czasZamknij < 0) czasZamknij = 500; if (style) { if (style.indexOf(':') < 0) { document.getElementById(id).className += ' ' + style; } else { style = style.replace(/(^\s+|(\s|;)+$)/g, '').split(/\s*;\s*/); for (var i = 0; i < style.length; i++) { style[i] = style[i].split(/\s*:\s*/); for (var j = 0, c, property = ''; j < style[i][0].length; j++) { c = style[i][0].charAt(j); property += c == '-' ? style[i][0].charAt(++j).toUpperCase() : c.toLowerCase(); } eval('document.getElementById("' + id + '").style.' + property + ' = "' + style[i][1].replace(/"/g, '\\"') + '"'); } } } for (var i = 0; i < document.getElementById(id).getElementsByTagName('dt').length; i++) { var dd = new Array(); var el = document.getElementById(id).getElementsByTagName('dt')[i].nextSibling; var nodeName; while (el && (nodeName = el.nodeName.toLowerCase()) != 'dt') { if (nodeName == 'dd') { el._dt = document.getElementById(id).getElementsByTagName('dt')[i]; if (otworz) { el.onmouseover = function() { clearTimeout(this._dt._timoutID); this._dt._displayed = false; this._dt.onclick(); } el.onmouseout = function() { clearTimeout(this._dt._timoutID); var dt = this._dt; this._dt._timoutID = setTimeout(function () { dt._displayed = true; dt.onclick(); }, czasZamknij); }; } dd[dd.length] = el; } el = el.nextSibling; } document.getElementById(id).getElementsByTagName('dt')[i]._dd = dd; document.getElementById(id).getElementsByTagName('dt')[i]._timoutID = null; document.getElementById(id).getElementsByTagName('dt')[i]._displayed = false; document.getElementById(id).getElementsByTagName('dt')[i].onclick = function() { clearTimeout(this._timoutID); if (!this._displayed) { var el = this.parentNode.getElementsByTagName('dt')[0]; while (el) { if (el.nodeName.toLowerCase() == 'dt' && el != this) { el._displayed = false; if (czasZwin) display(el, 0); else display(el); } el = el.nextSibling; } } this._displayed = !this._displayed; if (this._displayed && czasRozwin || !this._displayed && czasZwin) display(this, 0); else display(this); }; if (otworz) { document.getElementById(id).getElementsByTagName('dt')[i].onmouseover = function() { clearTimeout(this._timoutID); var dt = this; this._timoutID = setTimeout(function () { dt._displayed = false; dt.onclick(); }, czasOtworz); }; document.getElementById(id).getElementsByTagName('dt')[i].onmouseout = function() { clearTimeout(this._timoutID); var dt = this; this._timoutID = setTimeout(function () { dt._displayed = true; dt.onclick(); }, czasZamknij); }; } } start(document.getElementById(id).getElementsByTagName('dt')[0]); function start(dt) { var hide = true; var el = dt; while (el) { var nodeName = el.nodeName.toLowerCase(); if (nodeName == 'dt') { dt = el; hide = true; } if (nodeName == 'dt' || nodeName == 'dd') { if (!nieInicjalizuj && el.getElementsByTagName('a').length && el.getElementsByTagName('a')[0].href && unescape(el.getElementsByTagName('a')[0].href) == unescape(window.location.href)) { el.className = (el.className ? el.className + ' ' : '') + 'active'; dt._displayed = true; display(dt); hide = false; var el_parentNode = el.parentNode; while (el_parentNode != document.getElementById(id)) { if (el_parentNode.nodeName.toLowerCase() == 'dd') { var el_sibling = el_parentNode.previousSibling; while (el_sibling) { if (el_sibling.nodeName.toLowerCase() == 'dt') { el_sibling._displayed = true; display(el_sibling) break; } el_sibling = el_sibling.previousSibling; } } el_parentNode = el_parentNode.parentNode; } } } if (nodeName == 'dd') { if (hide) el.style.display = 'none'; start(el.getElementsByTagName('dt')[0]); } el = el.nextSibling; } } function display(dt, i) { if (typeof i == 'undefined') { for (var i = 0; i < dt._dd.length; i++) { dt._dd[i].style.display = dt._displayed ? 'block' : 'none'; if (!dt._displayed) { for (var j = 0; j < dt._dd[i].getElementsByTagName('dt').length; j++) { dt._dd[i].getElementsByTagName('dt')[j]._displayed = false; display(dt._dd[i].getElementsByTagName('dt')[j]); } } } } else if (i < dt._dd.length) { var dir = wysun ? !dt._displayed : dt._displayed; var n = dir ? i : dt._dd.length - 1 - i; dt._dd[n].style.display = dt._displayed ? 'block' : 'none'; if (!dt._displayed) { for (var j = 0; j < dt._dd[n].getElementsByTagName('dt').length; j++) { dt._dd[n].getElementsByTagName('dt')[j]._displayed = false; display(dt._dd[n].getElementsByTagName('dt')[j]); } } dt._timoutID = setTimeout(function() { display(dt, i + 1); }, dt._displayed ? czasRozwin : czasZwin); } } }