
	doc = document.all ? document.all : document;


function confDelete() {
	str = 'Czy jesteś pewien, że chcesz usunąć ten rekord?';
	return confirm(str);
}


function confDeleteOgloszenie() {
	str = 'Czy jesteś pewien, że chcesz usunąć swoje ogłoszenie?';
	return confirm(str);
}


function confDeleteZdjecie() {
	str = 'Czy jesteś pewien, że chcesz usunąć to zdjęcie?';
	return confirm(str);
}


function confLogout() {
	str = 'Czy jesteś pewien, że chcesz się wylogować przed dodaniem zdjęć?';
	return confirm(str);
}


function confAction(text) {
	return confirm(text);
}

function activateTab(tab){
	tab1=0;tab2=0;tab3=0;
	if(arguments[0]) tab1 = arguments[0];
	if(arguments[1]) tab2 = arguments[1];
	if(arguments[2]) tab3 = arguments[2];
	if(tab2){
		document.getElementById(tab2).style.display = 'none';
		document.getElementById("href_"+tab2).style.background = '#B9CED9 url(/img/tlo_zakladka_nieakt.jpg) no-repeat scroll left top';
		document.getElementById("span_"+tab2).style.background = '#B9CED9 url(/img/arc.gif) no-repeat scroll left top';
		
	}
	if(tab3){
		document.getElementById(tab3).style.display = 'none';
		document.getElementById("href_"+tab3).style.background = '#B9CED9 url(/img/tlo_zakladka_nieakt.jpg) no-repeat scroll left top';
		document.getElementById("span_"+tab3).style.background = '#B9CED9 url(/img/arc.gif) no-repeat scroll left top';
	}
	if(tab1){
		document.getElementById(tab1).style.display = 'block';
		document.getElementById("href_"+tab1).style.background = '#3F84BB url(/img/tlo_zakladka.jpg) no-repeat scroll left top';
		document.getElementById("span_"+tab1).style.background = '#3F84BB url(/img/arc.gif) no-repeat scroll left top';
	}
}


	$(document).ready(function(){
		$(".showMiniaturyRamkaSrodek a").click(function(){
			var largePath = $(this).attr("href");
			//var largeAlt = $(this).attr("title");
			
			$("#largeImg").attr({ src: largePath });
			
			return false;
		});
		
	});


	$(document).ready(
		function()
		{
			$("a.form_show").click(
			function()
			{
				$("#formularz").toggle("slow");
			}).toggle(function() { $(this).text('Ukryj'); }, function() { $(this).text("Pokaż"); });
	});
	
	$(document).ready(
		function()
		{
			$("a.form_kalendarz").click(
			function()
			{
				$("#kalendarz").toggle("slow");
			}).toggle(function() { $(this).text('Ukryj kalendarz'); }, function() { $(this).text("Pokaż kalendarz"); });
	});

	$(function(){
	    $('a.z_p').click(function(){
	        var w = (screen.width) < 885 ? (screen.width) : 885;
			var h = (screen.height) < 688 ? (screen.height) : 688;
			var t = (screen.height) ? (screen.height - h) / 2 : 0;
			var l = (screen.width) ? (screen.width - w) / 2 : 0;
			var zdj  = $("#largeImg").attr("src");
			window.open(this.href+'&img='+zdj, '', 'top='+t+',left='+l+',width='+w+',height='+h+',toolbar=no,directories=no,menubar=no,locations=no,status=no,scrollbars=yes,resizable=yes,fullscreen=no');
	        return false;
	    });
	});
	
	$(function(){
	    $('.wydrukuj').click(function(){
	        window.print();
	        return false;
	    });
	});
	
	$(function(){
	    $('.ladujzdjecie').click(function(){
	       $(".zdjeciatak").hide();
		   $(".zdjecianie").show();
	        return true;
	    });
	});

	$(function()
	{
		$('.date-pick').datePicker({startDate:'01/01/2009'});
	});

