
// przemienia przy rejestracji uzytkownika konto prywatne/firmowe
function switchbox(id) {
	var bloki = new Array('prywatne','firmowe');
	for (i = 0; i < bloki.length; i++) {
		if (i != id) {
			document.getElementById(bloki[i]).style.display = 'none';
		} else {
			document.getElementById(bloki[i]).style.display = 'block';
		}
	}
}

function fotka_big(foto) {
	window.open('/photo/'+foto+'/zdjecie.html','fotka','width=620,height=510,scrollbars=no,resizable=no,status=yes,menubar=no');
}

function ogloszenie_big(nr_foto, id_oglosz) {
	window.open('/photo_ogl/'+nr_foto+'/'+id_oglosz+'/zdjecie.html','fotka','width=620,height=494,scrollbars=no,resizable=no,status=yes,menubar=no');
}

function fotka(fotka) {
	window.open(fotka,'fotka','width=620,height=494,scrollbars=no,resizable=no,status=yes,menubar=no');
}



function potwierdzenie2(pytanie,pytanie2){
	if (confirm(pytanie)) {
		if (confirm(pytanie2)) {
			return true;
		} else {
			return false;
		}
		return true;
	} else {
		return false;
	} 
	return true;
}

function szukaj_fu(pole,tekst) {
	if (document.getElementById(pole).value=="") {
		document.getElementById(pole).value=tekst;
	} else if (document.getElementById(pole).value==tekst) {
		document.getElementById(pole).value="";
	}
}

function drukuj(id_art,nazwa) {
	window.open('/drukuj_art/'+id_art+'/'+nazwa+'.html','art','width=620,height=494,scrollbars=yes,resizable=yes,status=yes,menubar=no');
}
function drukuj_firme(id_firma,nazwa) {
	window.open('/drukuj_firma/'+id_firma+'/'+nazwa+'.html','firma','width=620,height=494,scrollbars=yes,resizable=yes,status=yes,menubar=no');
}
function drukuj_ogloszenie(id_ogloszenie,nazwa) {
	window.open('/drukuj_ogloszenie/'+id_ogloszenie+'/'+nazwa+'.html','ogłoszenie','width=620,height=494,scrollbars=yes,resizable=yes,status=yes,menubar=no');
}
function drukuj_news(id_news,nazwa) {
	window.open('/drukuj_news/'+id_news+'/'+nazwa+'.html','aktualność','width=620,height=494,scrollbars=yes,resizable=yes,status=yes,menubar=no');
}
