﻿function newWindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}
 
function alterNate(elm){
   if (!elm.base) elm.base = elm.value
   if (elm.value == elm.base) elm.value = "";
   else if (elm.value == "") elm.value = elm.base;
}


function ZapytanieZmien(){ 
       if (document.lista_form.wyborStrony.options[document.lista_form.wyborStrony.selectedIndex].value != "none") { 
               location = document.lista_form.wyborStrony.options[document.lista_form.wyborStrony.selectedIndex].value 
       } 
} 


function checkEmail(myForm) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value)){
return (true)
}
alert("Prosimy podać prawidłowy adres e-mail.")
return (false)
}
function MakeArray(n) {
	this.length = n
	return this
}


