function tylkoCyfry1(e,decReq) {
	var isIE = document.all?true:false;
	var isNS = document.layers?true:false;
	var key = (isIE) ? window.event.keyCode : e.which;
	var obj = (isIE) ? event.srcElement : e.target;
	var isNum = (key > 47 && key < 58) ? true:false;
	var dotOK = (key==46 && decReq=='decOK' && (obj.value.indexOf(".")<0 || obj.value.length==0)) ? true:false;
	window.event.keyCode = (!isNum && !dotOK && isIE) ? 0:key;
	e.which = (!isNum && !dotOK && isNS) ? 0:key;
	return (isNum || dotOK);
}
function TylkoCyfry(e,decReq)
{
	var key = e.keyCode||e.which;
	var obj = e.srcElement||e.target;

	var isNum = ((key>47 && key<58) || key == 8 || key == 39 || key == 37 || key == 9) ? true:false;
	var dotOK = ((key == 46)&& decReq && obj.value.indexOf(".") < 0 ) ? true:false;
	
	if(key == 44 && obj.value.indexOf(".") < 0)
	{
		obj.value = obj.value + '.';
		return false;
	}
	return (isNum || dotOK);
} 
function mOvr(src,clrOver) {
	if (!src.contains(event.fromElement)) {
		src.style.cursor = 'hand';
		src.bgColor = clrOver;
	}
}
function mOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.bgColor = clrIn;
	}
}
function mClk(src) {
	if(event.srcElement.tagName=='TD'){
		src.children.tags('A')[0].click();
	}
}

function openWin(plik,w,h) {
	window.open(plik);
}

function openWinLimit(plik,w,h) {
		window.open(plik,'popup','scrollbars=1,resize=1,width=' + w + ',height=' + h);
}
function powiekszWypDodat(id,w,h){
	w=w+40;
	h=h+40;
	window.open('zdjecie_powieksz.php?zdjecie='+id,'popup','scrollbars=1,resize=1,width=' + w + ',height=' + h);
}
