function hide (warstwa) { document.all[warstwa].style.display="none"; }

function selecturl(s) {
	var gourl = s.options[s.selectedIndex].value; window.top.location.href = gourl;
}
function OknoPopup(adres,width,height)
{
	window.open(adres, 'okno_popup', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,fullscreen=no,channelmode=no,width='+width+',height='+height+',left='+(screen.width-width)/2+',top='+(screen.height-height)/2);
}
function trim(lancuch)
{
 while (lancuch.charAt(0) == " ")
 lancuch = lancuch.substring(1,lancuch.length);
 while (lancuch.charAt(lancuch.length-1) == " ")
 lancuch = lancuch.substring(0,lancuch.length-2);
 return lancuch;
};
function CheckHelpDesk(form){
	 if (trim(form.pytanie.value)==''){
	 alert('Proszę wpisać treść pytania');      
	 form.pytanie.focus();
 	 return false;
	 }
 	 if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value)){
		}else{
			alert('Proszę podać własny adres email')
			form.email.focus();
			return false;
	 }
	 if (trim(form.kategoria.value)==''){
	 	alert('Proszę wybrać kategorię pytania');
		 form.kategoria.focus();
 		 return false;
 	 }		
return true; 
}