function okno(adres,nazwa,szer,wys) {
	var left = (screen.width-szer)/2;
	left = Math.round(left);
	var top = (screen.height-wys-100)/2;
	top = Math.round(top);
	nazwa = window.open(adres,nazwa,'resizable=0,height='+wys+',width='+szer+',top='+top+',left='+left);
	nazwa.moveTo(left,top);
	nazwa.focus();
	}
	
function openfull(parametr){
w = window.open(parametr, "", "scrollbars=yes,resizable=yes,menubar=no", true);
w.focus ();
}	

function mselector(sl)
{
	sl.onchange=function() {
		var i=sl.selectedIndex;
		if (i) window.location.href=sl[i].value;
	}
}
function producers()
{
	if (!document.getElementById) return;
	var ul=document.getElementById('producersmenu');
	if (ul) {
		var fm=document.createElement('form');
		fm.className='producersform';
		var sel=document.createElement('select');
		var opt=document.createElement('option');
		opt.setAttribute('value','');
		opt.appendChild(document.createTextNode('-- producenci --'));
		sel.appendChild(opt);
		var li=ul.getElementsByTagName('a');
		var i;
		for (i=0;i<li.length;i++) {
			opt=document.createElement('option');
			opt.setAttribute('value',li[i].href);
			opt.appendChild(li[i].firstChild);
			sel.appendChild(opt);
		}
		fm.appendChild(sel);
		ul.parentNode.replaceChild(fm,ul);
		mselector(sel);
	}
}
