<!--

function setActiveSS(title) { 
	var i, a, main; 
	for (i=0; (a = document.getElementsByTagName("link")[i]); i++) { 
		if (a.getAttribute("rel") && a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
			a.disabled = true; 
			if(a.getAttribute("title") == title) a.disabled = false; 
	} } }

function getActiveSS() { 
	var i, a; 
	for (i=0; (a = document.getElementsByTagName("link")[i]); i++) { 
		if (a.getAttribute("rel") && a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled ) return a.getAttribute("title"); } return null; }

function getPreferredSS() { var i, a; for (i=0; (a = document.getElementsByTagName("link")[i]); i++) { if (a.getAttribute("rel") && a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("rel").indexOf("alt") == -1 && a.getAttribute("title") ) return a.getAttribute("title"); } return null; }

function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }

function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }


window.onload = function(e) { var cookie = readCookie("style"); var title = cookie ? cookie : getPreferredSS(); setActiveSS(title); }

window.onunload = function(e) { var title = getActiveSS(); createCookie("style", title, 365); }

var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredSS();
setActiveSS(title);


function wopen(Plik, xx, yy){
window.open(Plik,'Ekran',
'fullscreen=no,scrollbars=no,resizable=yes,location=no,status=no,toolbar=no,width=' + xx + ',height=' + yy + ',top=100,left=100'); 
}
function spr_txt(wpisane,nazwa_pola,nazwa_formularz){	
	if (wpisane=="")
	{
	alert ("Uzupełnij wpis w polu: "+nazwa_pola);
	return false;
	}
	return true;
}
function spr_email(wpisane,nazwa_pola,nazwa_formularz){

	if (wpisane.indexOf('@')<1)
	{
	document.forms[nazwa_formularz].elements[nazwa_pola].focus(); 
	alert("Adres e-mile wpisany niepoprawnie");
	return false;
	}
	return true;
}
function spr_numer(wpisane,nazwa_pola,nazwa_formularz){	
	if (isNaN(wpisane) || wpisane=="")
	{
	alert ("Wpisz liczbe w polu: "+nazwa_pola);
	return false;
	}
return true;
}
//-->

