//DODAJ DO ULUBIONYCH
function addToBookmarks( sTitle, sHref ) 
{
if( window.sidebar && window.sidebar.addPanel ) {
//Gecko (Netscape 6 etc.) - add to Sidebar
window.addPanel( sTitle, sHref, '' );
} else if( window.external && ( navigator.platform == 'Win32' || ( window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1 ) ) ) {
//IE Win32 or iCab - checking for AddFavorite produces errors for no
//good reason, so I use a platform and browser detect.
//adds the current page page as a favourite; if this is unwanted,
//simply write the desired page in here instead of 'location.href'
window.external.AddFavorite( window.location.href, document.title );
} else if( window.opera && window.print ) {
//Opera 6+ - add as sidebar panel to Hotlist
return true;
} else if( document.layers ) {
//NS4 & Escape - tell them how to add a bookmark quickly (adds current page,
//not target page)
window.alert( 'Proszę kilknć OK a pu&#65533;niej Ctrl+D aby dodać strone do ulubionych' );
} else {
//other browsers - tell them to add a bookmark (adds current page, not target page)
window.alert( 'Proszę użyć manu przegldarki by utworzyć dodać strone do ulubionych' );
}
return false;
}
//DODAJ DO ULUBIONYCH

function MM_jumpMenu(targ,selObj,restore)
	{ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
	}

function mm_preloadimages() { //v3.0
	var d=document; if(d.images){ if(!d.mm_p) d.mm_p=new Array();
	var i,j=d.mm_p.length,a=mm_preloadimages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.mm_p[j]=new Image; d.mm_p[j++].src=a[i];}}
} 

function createCookie(name,value,days) 
{
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}	
	
function ZamknijPopupPiatek()
{
	var div=document.getElementById('popuppiatek_div');
	div.style.display = "none";
	createCookie('popuppiatek','1','1');
}	

function BanerPrzewijany(){	
	indeks2=indeks2+1;
	if(indeks2>=liczba_banerow)
		indeks2=0;
	var div_baner=document.getElementById("baner_przewijany");
	var div_podpis=document.getElementById("podpis_przewijany");
	var div_baner2=document.getElementById("baner_przewijany2");
	//var div_podpis2=document.getElementById("podpis_przewijany2");
	
	//plynne przejscie pomiedzy obrazkami - banery sa w dwóch DIVach na zmianę
	if(numer_div==0){
		div_baner2.innerHTML = baner[indeks2];
		div_podpis.innerHTML = podpisy[indeks2];
		new Effect.Appear(div_baner, {duration:1, from:1.0, to:0});
		new Effect.Appear(div_baner2, {duration:1, from:0, to:1.0});
		numer_div=1;
	}else{
		div_baner.innerHTML = baner[indeks2];
		div_podpis.innerHTML = podpisy[indeks2];
		new Effect.Appear(div_baner2, {duration:1, from:1.0, to:0});
		new Effect.Appear(div_baner, {duration:1, from:0, to:1.0});
		numer_div=0;
	}
	zaznaczNumer(indeks2);
	//setTimeout ( "BanerAppear()", 500 );
}

function BanerAppear(){
	var div_baner=document.getElementById("baner_przewijany");
	var div_baner2=document.getElementById("baner_przewijany2");
	//var div_podpis=document.getElementById("podpis_przewijany");
	//div_baner.innerHTML = baner[indeks2];
	//div_podpis.innerHTML = podpisy[indeks2];
	zaznaczNumer(indeks2);
	if(numer_div==1){
		new Effect.Appear(div_baner2, {duration:1, from:0, to:1.0});
	}else{
		new Effect.Appear(div_baner, {duration:1, from:0, to:1.0});
	}
}

function BanerPrzewijanyStop(){
	clearInterval (przewijanie);
}	

function BanerPrzewijanyStart(){
	clearInterval (przewijanie);
	przewijanie = setInterval ( "BanerPrzewijany()", 5000 );
}

function BanerPrzewijanyPokaz(id){
	var div_baner=document.getElementById("baner_przewijany");
	var div_baner2=document.getElementById("baner_przewijany2");
	var div_podpis=document.getElementById("podpis_przewijany");
	indeks2=id;
	zaznaczNumer(id);
	if(numer_div==0){
		div_baner.innerHTML = baner[indeks2];
		div_podpis.innerHTML = podpisy[indeks2];
	}else{
		div_baner2.innerHTML = baner[indeks2];
		div_podpis.innerHTML = podpisy[indeks2];
	}
	
}

function zaznaczNumer(id){
	//for(var i=0;i<liczba_banerow;i++){
	//	
	//}
	div_stary =document.getElementById("numer"+aktualnie_zaznaczony);
	div_nowy =document.getElementById("numer"+id);
	div_stary.style.border="0px";
	div_nowy.style.border="1px solid #888";
	aktualnie_zaznaczony=id;
}	
	
function rozwin_zwin(id){
	var div = document.getElementById(id);
	if(div.style.display == 'none'){
		div.style.display = 'block';
	}else{
		div.style.display = 'none';
	}
}