function alarm(theTxt,theFormName) {
	log=window.confirm(theTxt);
	if (log) {
		eval ("document."+theFormName+".submit()");
	}
}

function swapColorCell(theRow,theColor) {
	theRow.style.backgroundColor=theColor;
}
function setCheckboxes(theForm,value) {
	var cb = document.forms[theForm].elements['id[]'];
	var length = cb.length;
	for (a=0;a<length;a++)
		cb[a].checked = value;
	return true;
}

function viewFile(URL,w,h){
	window.open(URL,"xx","toolbar=0, location=0, directories=0, status=0, menubar=0,scrollbars=1, resizable=0,width="+w+",height="+h);
}

function viewFoto(URL,w,h) {
var ratHtm='<TITLE>Zdjęcie</TITLE><body bgcolor=black scroll=no leftmargin=0 topmargin=0>'+
	'<A HREF="javascript:window.close()">'+
	'<IMG SRC='+
	URL+
	' border=0 alt="zamknij okno"></A></body>';

	var win=window.open(URL,"xx","toolbar=0, location=0, directories=0, status=0, menubar=0, scroolbars=0, resizable=1,width="+w+",height="+h);
	
	win.moveTo(screen.width/2-w/2,screen.height/2-h/2);
	win.document.write(ratHtm);
}

function viewText(theForm,theInput){
	var theHtm='<HEAD><META HTTP-EQUIV="content-type" CONTENT="text/html; CHARSET=iso-8859-2"><META NAME="konwerter" CONTENT="Ogonki97 1.3"><TITLE>Podgląd newsa</TITLE></HEAD>'
	+'<body bgcolor=white scroll=yes leftmargin=10 topmargin=10>'
	+eval ("document."+theForm+"."+theInput+".value")
	+'<HR><A HREF="javascript:window.close()">Zamknij</A>'
	+'</body>';

	var win=window.open("blank.htm","xx","toolbar=0, location=0, directories=0, status=0, menubar=0, scroolbars=0, resizable=1,width=450,height=450");
	win.document.write(theHtm);
}
function viewOnlyText(theTxt) {
		var theHtm='<HEAD><TITLE>Podgląd newsa</TITLE></HEAD>'
	+'<body bgcolor=white scroll=yes leftmargin=10 topmargin=10>'
	+theTxt
	+'<HR><A HREF="javascript:window.close()">Zamknij</A>'
	+'</body>';

	var win=window.open("blank.htm","xx","toolbar=0, location=0, directories=0, status=0, menubar=0, scroolbars=0, resizable=1,width=450,height=450");
	win.document.write(theHtm);
}
