function checkEmail(a){if(!/^[\w\.-]{2,}@[\w\.-]+\.[a-z]{2,5}$/i.test(a))return!1;return!0}function checkHour(a){var c=/^[0-9]{1,2}\:[0-9]{2}$/i.test(a);if(!c)return c;a=a.split(":");if(a[0]>23||a[0]<0||a[1]>59||a[1]<0||a[2]>59||a[2]<0)return!1;return!0}function checkPhoneNumber(a){if(!/^[0-9]{10}$/i.test(a))return!1;return!0}function checkWWW(a){if(!/^(http:\/\/|www\.).*/i.test(a))return!1;return!0}function checkZipCode(a){if(!/^[0-9]{2}\-[0-9]{3}$/i.test(a))return!1;return!0}
function checkLength(a,c,b){if(a.length>=c&&a.length<=b)return!0;return!1}function checkLogin(a){if(!/^[\w\.-]{8,50}$/i.test(a))return!1;return!0}function checkInt(a){if(!/^[\-]{0,1}[0-9]{1,8}$/i.test(a))return!1;return!0}function getStackTrace(a){if(!a)return"not a function!";var c=getFuncName(a),b="(",e;for(e in a.arguments)b&&b.length&&b.length>1&&(b+=","),b+=a.arguments.toString();c+=b+")\n";return c+getStackTrace(a.caller)}
function handleErrors(){document.getElementById("JSError").innerHTML=getStackTrace()}function confirmSubmit(a){if(confirm(a))return!0;return!1}function activateGroup(a,c,b){for(var e=0;e<=a;e++)if(document.getElementById(b+e))document.getElementById(b+e).className="";document.getElementById(b+c).className="sel"}
function CheckAll(a){for(var c=0;c<a.elements.length;c++){var b=a.elements[c];if(b.type=="checkbox"&&!b.disabled&&b.id!="search_select_all"&&b.id!="search_aktualne"&&b.id!="search_archiwalne")b.checked=document.getElementById("search_select_all").checked}}
function CheckCheckAll(a){for(var c=0,b=0,e=0;e<a.elements.length;e++){var d=a.elements[e];d.type=="checkbox"&&d.id!="search_select_all"&&d.id!="search_aktualne"&&d.id!="search_archiwalne"&&(c++,d.checked&&b++)}c==b?document.getElementById("search_select_all").checked=!0:document.getElementById("search_select_all").checked=!1}
function MarkAll(a,c){for(var b=a.checked,e=$(c).children,d=0;d<e.length;d++){var f=e[d];if(f.children.length)for(var f=f.children,g=0;g<f.length;g++)f[g].selected=b;else f.selected=b}}function ulubione(a){var c=document.title,b=document.location;if(window.sidebar)window.sidebar.addPanel(c,b,""),a.href="#";else if(window.external)window.external.AddFavorite(b,c),a.href="#";else if(window.opera&&window.print)return a.rel="sidebar",a.title=c,a.href=b,!0;return!1}
function flashFix(a){document.write(a)}function ShowHideMenuItems(a){document.getElementById(a)&&(new Effect.toggle(a,"blind",{duration:0.5}),document.getElementById(a).style.display=="none"?sCookie(a,!0,365):sCookie(a,"",-1))}var il_new_small_width=new Number,cp_new_small_width=new Number;
function ShowHideMainMenu(){var a=document.getElementById("cms_left_panel"),c=document.getElementById("content");$("content");var b=document.getElementById("cms_center_panel"),e=$("cms_center_panel"),d=document.getElementById("kat_list"),f=document.getElementById("cms_center_panel_content"),g=document.getElementById("info_list"),h=$("info_list");if(a)if(a.style.display=="none"){a.style.display="block";if(notNull(c))c.style.width=c.clientWidth-175+"px";if(notNull(e))e.style.width=cp_new_small_width+
"px";if(notNull(d))d.style.width=d.clientWidth-178+"px";if(notNull(f))f.style.width=f.clientWidth-178+"px";if(notNull(h))h.style.width=il_new_small_width+"px"}else{notNull(e)&&(cp_new_small_width=e.getWidth()-2);notNull(h)&&(il_new_small_width=h.getWidth()-4);a.style.display="none";if(c)c.style.width=c.clientWidth+175+"px";if(b)b.style.width=b.clientWidth+175+"px";if(d)d.style.width=d.clientWidth+170+"px";if(f)f.style.width=f.clientWidth+170+"px";if(g)g.style.width=g.clientWidth+187+"px"}}
function ShowHideMainMenuNew(a){var c=$("cms_left_panel"),b=c.getWidth(),a=$(a),e=$("content"),d=$("cms_center_panel");if(a&&c){if(c.visible()){c.hide();var c=a.getWidth()+b,f=e.getWidth()+b,b=d.getWidth()+b}else c.show(),c=a.getWidth()-b,f=e.getWidth()-b,b=d.getWidth()-b;a.clientWidth=c+"px";e.clientWidth=f+"px";d.clientWidth=b+"px"}}
function ShowHideAdvSearch(a,c){var b=document.getElementById("adv_form"),e=document.getElementById("rollas");if(e&&b)b.style.display=="none"?(e.className="roll_sel",e.innerHTML=c,sCookie("show_search",!0,0)):(e.className="roll",e.innerHTML=a,sCookie("show_search","",-1));new Effect.toggle("adv_form","blind",{duration:0.5})}var pointer=0;
function FontSize(a){var c=parseInt(gCookie("textsize"));a=="up"?pointer<2&&pointer++:a=="down"?pointer>0&&pointer--:a=="def"?pointer=0:(pointer=parseInt(gCookie("textsize")),isNaN(pointer)&&(pointer=0));var a=[100,115,130][pointer],b=$$(".resize_font",".content p",".content ._Lista_punktowana",".content ._Lista_numerowana",".content ._Lista_punktowana2",".content ._Lista_numerowana2");if(b)for(var e=0;e<b.length;e++)b[e].style.fontSize=a+"%";!isNaN(pointer)&&pointer!=c&&(sCookie("textsize","",-1),
sCookie("textsize",pointer,1))}function FontSizeRestore(){var a=parseInt(gCookie("textsize"));if(isNaN(a))return!0;FontSize()}function SetContrast(){gCookie("contrast")=="true"?sCookie("contrast","",0):sCookie("contrast",!0,0);location.reload(!0)}function replEmail(a,c){document.write('<a href="mailto:'+a+"@"+c+'">');document.write(a+"@"+c+"</a>")}function changeIcon(a,c,b){document.getElementById(c).value=a;document.getElementById("selected_icon").src=b.src}
function ToggleMap(txtc,txto) {
    var fs = document.getElementById('page_content_right');
    var fshidden = fs.style.display;
    Element.toggle('page_content_right');
    var rl = $('roll');
    var r2 = $('content_center'); //mapa_content_left
    var r3 = $('pg_bgr_top'); //mapa_content_tresc
    var r4 = $('pg_bgr_bottom'); //map
    var r5 = $('map');

    if(rl && fs) {
        if(fshidden == 'none') {
            rl.className = 'roll';
            rl.innerHTML = txtc;
            r2.className = 'page_content'; //mapa_content_left
            r3.className = 'page_content_top'; //mapa_content_tresc
            r4.className = 'page_content_bottom'; //mapa

            $('page_content_center').style.width = '564px'; //mapa_content_left
            $('content_center').style.width = 'auto'; //mapa_content_tresc
            $('map').style.width = '100%';
            sCookie('show_right_mapa', '', -1);
        } else {
            rl.className = 'roll_sel';
            rl.innerHTML = txto;
            r2.className += '_big';
            r3.className += '_big';
            r4.className += '_big';

            $('page_content_center').style.width = '974px'; //mapa_content_left
            $('content_center').style.width = 'auto'; //mapa_content_tresc
            $('map').style.width = '100%';
            sCookie('show_right_mapa', true, 0);
        }
    }
}
function ToggleOfidMap(a,c){var b=document.getElementById("page_content_right"),e=b.style.display;Element.toggle("page_content_right");var d=$("roll"),f=$("content_center"),g=$("pg_bgr_top"),h=$("pg_bgr_bottom");$("map");if(d&&b)e=="none"?(d.className="roll",d.innerHTML=a,f.className="page_content",g.className="page_content_top",h.className="page_content_bottom",$("page_content_center").style.width="470px",$("content_center").style.width="auto",$("map").style.width="100%",sCookie("show_right_ofid",
"",-1)):(d.className="roll_sel",d.innerHTML=c,f.className+="_big",g.className+="_big",h.className+="_big",$("page_content_center").style.width="760px",$("content_center").style.width="auto",$("map").style.width="100%",sCookie("show_right_ofid",!0,0))}
function ToggleGallery(txtc,txto) {
    var fs = document.getElementById('page_content_right');
    var fshidden = fs.style.display;
    Element.toggle('page_content_right');
    var rl = $('roll');
    var r2 = $('content_center');
    var r5 = $('content_center_powiazane');
    var r6 = $('pgb_bgr_top');
    var r7 = $('pgb_bgr_bottom');

    if(rl && fs) {
        if(fshidden == 'none') {
            rl.className = 'roll';
            rl.innerHTML = txtc;
            r2.className = 'page_content';

            if (r5 && r6 && r7) {
                r5.className = 'page_content';
                r6.className = 'page_content_top';
                r7.className = 'page_content_bottom';
                $('content_center_powiazane').style.width = 'auto';
            }

            $('page_content_center').style.width = '564px';
            $('content_center').style.width = 'auto';
            sCookie('show_right_galp', '', -1);
        } else {
            rl.className = 'roll_sel';
            rl.innerHTML = txto;
            r2.className += '_big';

            if (r5 && r6 && r7) {
                r5.className += '_big';
                r6.className += '_big';
                r7.className += '_big';
                $('content_center_powiazane').style.width = 'auto';
            }

            $('page_content_center').style.width = '974px';
            $('content_center').style.width = 'auto';
            sCookie('show_right_galp', true, 0);
        }
    }
}
function ToggleIGallery(a,c){var b=document.getElementById("page_content_right"),e=b.style.display;Element.toggle("page_content_right");var d=$("roll"),f=$("content_center"),g=$("pg_bgr_top"),h=$("pg_bgr_bottom");if(d&&b)e=="none"?(d.className="roll",d.innerHTML=a,f.className="page_content",g.className="page_content_top",h.className="page_content_bottom",$("page_content_center").style.width="470px",$("content_center").style.width="auto",sCookie("show_right_gali","",-1)):(d.className="roll_sel",d.innerHTML=
c,f.className+="_big",g.className+="_big",h.className+="_big",$("page_content_center").style.width="760px",$("content_center").style.width="auto",sCookie("show_right_gali",!0,0))}
function ToggleMedia(a,c){var b=document.getElementById("page_content_right"),e=b.style.display;Element.toggle("page_content_right");var d=$("roll"),f=$("content_center"),g=$("pg_bgr_top"),h=$("pg_bgr_bottom");if(d&&b)e=="none"?(d.className="roll",d.innerHTML=a,f.className="page_content",g.className="page_content_top",h.className="page_content_bottom",$("page_content_center").style.width="470px",$("content_center").style.width="auto",sCookie("show_right_medi","",-1)):(d.className="roll_sel",d.innerHTML=
c,f.className+="_big",g.className+="_big",h.className+="_big",$("page_content_center").style.width="760px",$("content_center").style.width="auto",sCookie("show_right_medi",!0,0))}function reloadCaptcha(a){var c=Math.round(Math.random(0)*1E3)+1;$("captcha_img").src=a.substr(0,a.length-5)+"/id/"+c+".html"}
function NoweOkno(a,c,b){typeof c!="number"&&(c=640);typeof b!="number"&&(b=360);noweOkno=window.open(a,"okienko","menubar=no, toolbar=no, location=no, scrollbars=no, resizable=yes, status=no, width="+c+", height="+b+", left=150, top=150");noweOkno.focus()}function sprawdzAnkiete(a,c,b){var e=0;for(key in a){if(typeof a[key]=="string"&&trim(a[key])==""&&key!="commit")return alert(b),0;e++}e-=3;if(e!=c)return alert(b),0;return 1}function trim(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}
function gCookie(a,c){if((c=document.cookie)&&(a=(";"+c).match(RegExp("(;| )"+a+"=[^;]+"))))return unescape(a[0].split(/=/g)[1])}function sCookie(a,c,b){document.cookie=a+"="+escape(c)+(b?"; expires="+(new Date(+new Date+b*864E5)).toGMTString():"")+"; path=/"}
if(typeof Position!="undefined")Position.getWindowSize=function(a){a=a?a:window;this.width=a.innerWidth||a.document.documentElement.clientWidth||a.document.body.clientWidth;this.height=a.innerHeight||a.document.documentElement.clientHeight||a.document.body.clientHeight;return this};function pokaz_baner(a){a="ads_"+a;setInterval("center_element('"+a+"')",100);document.getElementById(a).style.display="block"}
function ukryj_baner(a){document.getElementById("ads_"+a).style.display="none";clearInterval("adsinterval_"+a);sCookie("popup_"+a,1,0)}
function center_element(a){var c=0,b=0,e=0,d=0,f=0,g=0,e=d=0;if(typeof window.innerWidth=="number")b=window.innerWidth/2,c=window.innerHeight/2;else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight))b=document.documentElement.clientWidth/2,c=document.documentElement.clientHeight/2;else if(document.body&&(document.body.clientWidth||document.body.clientHeight))b=document.body.clientWidth/2,c=document.body.clientHeight/2;if(typeof window.pageYOffset==
"number")f=window.pageXOffset,g=window.pageYOffset;else if(document.body&&(document.body.scrollLeft||document.body.scrollTop))f=document.body.scrollLeft,g=document.body.scrollTop;else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop))f=document.documentElement.scrollLeft,g=document.documentElement.scrollTop;d=document.getElementById(a).clientWidth/2;e=document.getElementById(a).clientHeight/2;d=Math.round(b-d+f);e=Math.round(c-e+g);document.getElementById(a).style.position=
"absolute";document.getElementById(a).style.top=e+"px";document.getElementById(a).style.left=d+"px"}function checkAllBoxes(a,c){$$("input."+c+'[type="checkbox"]').each(function(b){b.checked=a})}function manageInput(a){a.onfocus=function(){if(a.value==a.defaultValue)a.value=""};a.onblur=function(){if(a.value=="")a.value=a.defaultValue}}function copyElement(a,c,b){if($(c)&&$(c))$(c).innerHTML=$(a).innerHTML,b&&$(a).remove()}
function domenaURL(){return document.location.protocol+"//"+document.location.host+"/"}function notNull(a){return a!=null&&a!=void 0?!0:!1}function isNull(a){return a==null||a==void 0?!0:!1}function checkDefaultPrompt(a,c){var b=$(a);if(b.value==c)b.value=""};


//	ścieżka do pliku list.php
function listURL(id) {
	return ('list.php');
}
function katalogZObrazkami(id) {
	return ('images-flash/');
}
//	domena
function domenaURL(ID) {
	return top.location.host;	
	
}
//	data
function dayDate(id) {
	return ('dzień do wyświetlenia');
}
//	czy obrazki mają się scrollować
function scrollPictures(id) {
	return (true);
}
//	czy rozmiar obrazka ma być dopasowywany
function autoFitPictures(id) {
	return (true);
}
//	prędkość przesuwania obrazka
function scrollSpeed(id) {
	return (1.5);
}
//	granica miękkich zwrotów podczas scrollu
function scrollSwitchSmotthness(id) {
	return (30);
}
//	czas pomiÄ™dzy zmianami obrazków
function slideShowTime(id) {
	return (24000);
}
//	prędkość przejść zmian obrazków
function fadeSpeed(id) {
	return (0.02);
}
