<!--
	function doAction(action, subaction) {
		if (document.frmAction) {
			f = document.frmAction;
			f.a.value = action;
			f.sa.value = subaction;
			f.submit();
		}
	}

	function doSubCategory(f) {
		if (!(f.subcat && f.cat)) {
			return false;
		}
		objSubCat = f.subcat;
		subCat = objSubCat.options[objSubCat.selectedIndex].value;
		if (isNaN(parseInt(subCat,10))) {
			return false;
		}else{
			f.cat.value += "_" + subCat;
			return true;
		}
	}
	
	function goSubCategory(subCat) {
		if (!document.nextcat) {
			return false;
		}
		
		f = document.nextcat;
		
		if (!f.cat) {
			return false;
		}
		if (isNaN(parseInt(subCat,10))) {
			return false;
		}else{
			f.cat.value += "_" + subCat;
			f.submit();
		}
	}
	
	function showBasket() {
		if (document.basket) {
			document.basket.submit();
			return true;
		}
		return false;
	}
	
	function validSearch(f) {
		var ret = true;
		if (f.sphrase.value.length < 3) {
			alert ("Fraza musi zawierać co najmniej 3 znaki");
			f.sphrase.focus();
			ret = false;
		}
		return ret;
	}
	
	function doList(type) {
		var tree;
		if (document.frmAction) {
			f = document.frmAction;
			f.cat.value = "";
			switch (type) {
				case "producer":
					f.tree.value = "producer";
					break;
				default:
					f.tree.value = "";
			}
			doAction("", "");
		}
	}
	
	function doBasket(action, subaction) {
		if (document.frmBasket) {
			var f = document.frmBasket;
			if (action=='order') {
				f.action = 'eshop.php';
			}
			f.a.value = action;
			f.sa.value = subaction;
			f.submit();
		}
	}
	
	function OpenWin(scriptname,width,height,s) {	
		var wnd
		var h = (screen.width / 2) - (width / 2);
		var v = (screen.height / 2) - (height / 2);
		
		wnd = window.open(scriptname,'okienko','width='+width+',height='+height+',top='+v+',left='+h+',resizable,scrollbars='+s+',toolbar=no,status=yes,directories=no,menubar=no,location=no');
		wnd.opener = self;
	}
	
// -->
