function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function WczytajObrazki() {
	if (document.images) {
		img_01 = newImage("img/m_01_over.jpg");
		img_02 = newImage("img/m_02_over.jpg");
		img_03 = newImage("img/m_03_over.jpg");
		img_04 = newImage("img/m_04_over.jpg");
		img_05 = newImage("img/m_05_over.jpg");
		img_06 = newImage("img/m_06_over.jpg");
		preloadFlag = true;
	}
}

function sprawdz() {
	if (document.formularz.imie.value.length == 0) 
		{
			alert("Proszę podać imię!\n");
			document.formularz.imie.focus();
			return false;
		}
	if (document.formularz.nazwisko.value.length == 0) 
		{
			alert("Proszę podać nazwisko!\n");
			document.formularz.nazwisko.focus();
			return false;
		}
	if (document.formularz.telefon.value.length == 0) 
		{
			alert("Proszę podać telefon!\n");
			document.formularz.telefon.focus();
			return false;
		}
	if (document.formularz.pytanie.value == "") 
		{
			alert("Proszę zadać pytanie!\n");
			document.formularz.pytanie.focus();
			return false;
		}
			
	return true; 

} 

var okno = null;
function powieksz_ceryfikat(width, height, url) {
	borderless=false;
	ScrWidth = 640; ScrHeight = 480;
	if (window.screen) {ScrWidth = window.screen.width; ScrHeight = window.screen.height}
	PosX = Math.round((ScrWidth - width)/2);
	PosY = Math.round((ScrHeight - height)/2);
	if (okno != null && !document.layers) {okno.close();}
	if (borderless && !document.layers) {
		okno = window.open("", "splash", "fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
		okno.resizeTo(w, s);
		okno.moveTo(PosX, PosY);
	}
	else
		okno = window.open("", "splash", "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);

	okno.document.open();
	okno.document.clear();
	okno.document.write("<html><head><title>Explo Service</title></head><body leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0><div align='center'><img src='"+url+"' alt='ładuję obrazek (42 KB)' width='530' height='752' border='0'></div></body></html>");
	okno.document.close();
	okno.focus();	
}
