var lastImg = null;

function imgSwap(ev,imgName) {
if (imgName != 0) {
	lastImg = ev.src;
	ev.src = imgName;
	}	
	else
	{
	ev.src = lastImg;
	}
}
function checkFields(newForm) {
	if (newForm.title.value == '') {
		alert('Brak tytułu');
		return ;
	} else if (newForm.body.value == '') {
		alert('Brak treści');
		return ;
	}
	newForm.submit();
}


function fullsize(pI,title,desc) {
        if(document.all){picId = "/_uTils/site/gallery.html?" + pI + "&title=" + encodeURIComponent(escape(title)) + "&desc=" + encodeURIComponent(escape(desc));}
        else{picId = "/_uTils/site/gallery.html?" + pI + "&title=" + escape(title) + "&desc=" + escape(desc);}
//picId = encodeURI(picId);
        Win = window.open(picId,'DispalyWindow','width=300, height=300, resizable=yes, scrollbars=auto menubar=no, location=no');
        return;
}
function isN(v,f,n) {
	if(v.length>0)if((v!=~~v)||(v<=0)){alert('Wymagana jest liczba całkowita dodatnia.');o=eval('document.'+f+"."+n);o.value="";}
}

