function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no');
}

function ZoomImage(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no');
}

function CheckTekst(tekst, informacja,dlod,dldo){
	if(dlod && dldo){
        	litPatt = '^[A-Z0-9a-z]{'+dlod+','+dldo+'}$';
	}else{
        	litPatt = '^[A-Z0-9a-z]+$';
	}
	myRe = new RegExp(litPatt, "i");
        wynik   = tekst.match(myRe);
        if (wynik == null) {
            return informacja;
        }
	return "";
}

function CheckEmail(tekst, informacja){
    var regular = /^[a-zA-Z0-9-_]{1,30}@[a-zA-Z0-9-_]+(\.[a-zA-Z0-9]+)+$/;
    wynik = tekst.match(regular);
    if(wynik==null){
       return informacja;
    }
    return "";
}

function CheckJest(tekst, informacja){
        if (tekst=="") {
            return informacja;
        }
		return "";
}

function CheckSame(tekst1,tekst2, informacja){
        if (tekst1!=tekst2) {
            return informacja;
        }
		return "";
}

function CheckSelect(tekst, informacja){
    if(tekst==0){
       return informacja;
    }
    return "";
  }

function CheckDlugosc(tekst, dlod, dldo, informacja){
	var dlugosc = tekst.length;
	if(dlugosc<dlod || dlugosc>dldo){
		return informacja;
	}
	return "";
}


function PrintDates(domena,slowo, styl){
	var dates = slowo+"@"+domena;
	document.write('<a href="mailto:'+dates+'" style="'+styl+'">'+dates+'</a>');
}

