function popup  (url)
{
	window.open(url,'_blank','height=250,width=250,status=no,resizable,top=40,left=40,menubar=no,location=no,scrollbars=yes');
	
}
function ONW(url, width, height)
 {

(! width) ? (width = 785) : (null);
(! height) ? (height= 500) : (null);	

	window.open(url,'_blank','height='+height+',width='+width+',status=yes,resizable,top=100,left=100,menubar=no,location=no,scrollbars=yes');
}

function OEnglish  ()
{
	window.open('showenglish.php','_blank','height=500,width=700,status=no,resizable,top=40,left=40,menubar=no,location=no,scrollbars=auto');
	
}

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 preloadImages() {
	if (document.images) {
		menu_literatura_over = newImage("images/menu_literatura-over.gif");
		menu_oprog_menu_literatura_over = newImage("images/menu_oprog-menu_literatura_.gif");
		menu_oprog_over = newImage("images/menu_oprog-over.gif");
		menu_normy_menu_oprog_over = newImage("images/menu_normy-menu_oprog_over.gif");
		menu_normy_over = newImage("images/menu_normy-over.gif");
		preloadFlag = true;
	}
}

function checkIt(e) {
	var charCode = (navigator.appName == "Netscape") ? e.which : e.keyCode;
	status = charCode
	if (charCode > 31 && (charCode<48 || charCode > 57)) {
		alert ("Proszę wpisywać jedynie cyfry.")
		return false
	}
	return true
}
function submitsearch() {
//alert(document.f.elements.kategoria.value);
if (document.f.elements['kategoria'].value == 1) {
	document.f.elements['action'].value = 'showcat';
	document.f.elements['wyszuk'].value = '1';
	document.f.elements['c'].value = '1';
}
if (document.f.elements['kategoria'].value == 2) 
{
	document.f.elements['action'].value = 'showcat';
	document.f.elements['wyszuk'].value = '1';
	document.f.elements['c'].value = '2';
}
if (document.f.elements['kategoria'].value == 3) 
{
	document.f.elements['action'].value = 'showbwlst';
	document.f.elements['wyszuk'].value = '1';
}

document.f.submit();

}