function displayPage(url, name, width, height, scrollvalue) {
	w = window.open(url, name, 'width='+width+', height='+height+', scrollbars='+scrollvalue+', menubar=no, resizable=0');
	w.moveTo(screen.width/2-width/2, screen.height/2-height/2);
}

function showImg( img_src, img_w, img_h, img_name ) {
	img_w_n = img_w+20;
	img_h_n = img_h+20;
	img_w_o = img_w;
   var popup = window.open('','','width=' + img_w_n + ',height=' + img_h_n + ',resizable=0,scrollbars=no,menubar=no');
   popup.document.open();
   popup.document.write('<html><head><title>'+img_name+'<\/title><\/head>');
   popup.document.write('<body style="margin: 0;padding: 0; position: relative;">');
   popup.document.write('<a href="javascript:window.close();" style="margin: 0 ;border: none; padding: 0;"><img style="margin: 0;border: 10px solid #eeeeee;padding: 0;" src=' + img_src + ' /></a>');
   popup.document.write('<br /><div style="position: absolute; top:10; left: 10; background-color: #ffffff; filter:alpha(opacity=75); opacity:.75; width: '+img_w_o+'; padding: 5px 0; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;"><p style="margin: 0 5px; padding: 0;">'+img_name+'<\/p><\/div>');
   popup.document.write('<\/body><\/html>');
//   popup.document.focus();
   popup.document.close();
}

function submitform( dl, sz, street, zip, city ) {
  var $adres = 'http://map24.opolskaskok.pl/index.php?';
  var $url = $adres;
  $url = $url + 'dl=' + dl + '&sz=' + sz + '&street=' + street + '&zip=' + zip + '&city=' + city;
  noweOkno = window.open($url, 'Mapa', 'menubar=no, toolbar=no, location=no, scrollbars=no, resizable=no, status=no, width=700, height=620');
  noweOkno.focus();
}

function change_form_action(url, id) {
    var email = document.getElementById('input_address');
    if(email){
    	var $email_address = '&email='+email.value+'&id='+id;
    	var $url_address = url+$email_address
    } else {
    	var $url_address = url+'&id='+id;
    }
    w = window.open( $url_address, "Newsletter", "scrollbars=no, menubar=no, resizable=0, width=650, height=250");
}

function form_cl(id) {
	var to = document.getElementById(id);
	if(to) {
		if(to.value == '') {
		} else {
			to.value = '';
		}
	}
}

