<!--


function potwierdzenie(pytanie,pytanie2){
  if (confirm(pytanie)) {
    if (confirm(pytanie2)) {
    	return true;
  		} else {
    		return false;
  	 }
    return true;
  } else {
    return false;
  } 
 return true;
}

function potwierdzenie2(pytanie){
  if (confirm(pytanie)) {
    return true;
  } else {
    return false;
  } 
 return true;
}


 function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=yes,scrollbars=yes,menubar=no' );
 }
 
 function displayWindow3(url, width, height) {
        var okienko = window.open(url,"displayWindow3",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=yes,menubar=no' );
		okienko.focus();
 }
 
 function displayWindow4(url, width, height) {
        var okienko2 = window.open(url,"displayWindow4",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=yes,menubar=no' );
		okienko2.focus();
 }

 function displayWindow2(url, width, height) {
        var Win = window.open(url,"displayWindow1",'width=' + width + ',height=' + height + ',resizable=yes,scrollbars=yes,menubar=no' );
 }
 function displayWindow_o(url, width, height, param) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ', ' +param);
 }
 function displayWindow5(url, width, height) {
        var okienko12 = window.open(url,"displayWindow12",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=yes,menubar=no' );
		okienko12.focus();
 }
 
 function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
 
 function checkemail(param) {
 goodSigns = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_@."
 if ( param.length == 0 ) {
 return true
 } 
 for (i=0; i<param.length; i++) {
 sign=param.charAt(i)
 if (goodSigns.indexOf(sign,0) == -1){ return false }
 }
 return true
 }
 
 
 function sprawdz_email(){
 if (!checkemail(document.forms2.email.value)) {
 alert("Pole 'e-mail' zawiera niedozwolone znaki!"
 + '\n\n' +
 "Proszę uzyć:"
 + '\n' +
 "litery ( A-Z a-z ), cyfry ( 0-9 ), znak 'minus' ( - ), znak 'podkreślenia' ( _ ), znak 'malpa' ( @ ), znak 'kropka' ( . )");
 document.forms2.email.focus();
 document.forms2.email.select();
 return false;
 }
 if (document.forms2.email.value != "" && (document.forms2.email.value.indexOf('@', 0) < 1 || document.forms2.email.value.indexOf('.') < 1)) {
 alert("Pole 'e-mail' jest nie poprawne!");
 document.forms2.email.focus();
 document.forms2.email.select();
 return false;
 }

 return true;
 }

function wstaw_img() {
	var images1 = "<img SRC='http://bip.powiatraciborski.pl/zdjecia/";
	var images2 = "' vspace=15 hspace=15 align=";	
	var images3 = " >";	
	document.formularz.tresc.value = document.formularz.tresc.value + images1 + document.formularz.obrazek.value + images2 + document.formularz.polozenie.value + images3; 
	document.formularz.tresc.focus();
}

function wstaw_zal() {
	if (document.formularz.opis.value != ''){	 
	   var zal1 = "<a href='http://bip.powiatraciborski.pl/zal/";
	   var zal2 = "'>";
	   var zal3 = "</a>";		
	   document.formularz.tresc.value = document.formularz.tresc.value + zal1 + document.formularz.zalacznik.value + zal2 + document.formularz.opis.value + zal3;
	   document.formularz.tresc.focus();
	} else {
	   alert("Aby wstawić załącznik musisz wypełnić pole OPIS");
	} 
}

function selecturl(s) {
	var gourl = s.options[s.selectedIndex].value;	window.top.location.href = gourl;
}
// -->