var IE, FF, O;
if(window.navigator.userAgent.indexOf('MSIE') != -1) var IE = true;
else if(window.navigator.userAgent.indexOf('Gecko') != -1) var FF = true;
else if(window.navigator.userAgent.indexOf('Opera') != -1) var O = true;

function hexdec(n) { return parseInt(n, 16); }

d_s = new Array();
d_sdata = 'f5.0,0,1353,1353,1,0,0,0|26.0,0,5577,775e,1,0,0,0|85.0,0,15ae,c8e8,1,0,1,0|67.0,0,120e,25f6,0,0,1,0|d3.0,0,2ae1,4783,1,0,1,0|b.0,0,77,3348,0,1,1,1|b.6e,0,38a,11e2,0,0,1,1|b.6a,0,142,3348,0,0,1,1|b.7a,0,ac,2c4c,0,0,1,1|b.8a,0,324,1d31,0,0,1,1|b.1b,0,190,16ea,0,0,1,1|b.2b,0,4cf,618,0,0,1,1|b.9a,0,225,1b03,0,0,1,1|b.aa,0,1e2,1d1f,0,1,1,1|b.3b,0,7b,2481,0,1,1,1|b.e9,0,164,1d8f,0,1,1,1|b.e01,0,1f8,474,0,0,1,1|b.ba,0,228,1538,0,0,1,1|b.8b,0,b3d,2274,0,0,1,1|b.6c,0,d8,19dc,0,1,1,1|b.4b,0,12b,1ce0,0,0,1,1|b.ca,0,146,1dd8,0,1,1,1|b.1c,0,94,1d26,0,0,1,1|b.da,0,62c,bbf,0,0,1,1|b.5b,0,d7,16b2,0,0,1,1|b.ea,0,115,1b90,0,0,1,1|b.6b,0,149,216a,0,0,1,1|b.7b,0,bd,1d2e,0,0,1,1|b.fa,0,781,781,0,0,1,1|b.5a,0,a8,1b89,0,0,1,1|b.69,0,e0,1d49,0,0,1,1|b.0b,0,18a,1d88,0,0,1,1|b.d01,0,c5,1f13,0,0,1,1|b.84,0,77,1cca,0,0,1,1|e3.0,0,18d2,2525,1,0,0,0|c8.0,0,150e,2dbe,1,0,0,0|76.0,0,1f28,24fa,1,0,0,0|73.0,0,116,6a3,0,0,1,0|c4.0,0,b22,2855,1,0,0,0|c4.2a,0,b22,1d06,1,0,0,0|9.0,0,b4,1a68,1,1,1,1|66.0,0,182e,182e,1,0,0,0|e4.0,0,1a04,49d4,1,0,1,0|a1.0,0,a27,2b8e,1,0,0,0|51.0,0,c0,1003,1,1,1,0|51.14,0,11e,949,1,0,1,0|51.f3,0,205,e56,0,0,1,0|51.24,0,382,58c,0,0,1,0|51.d3,0,11a,48c,0,0,1,0|51.e3,0,126,541,0,0,1,0|51.b4,0,149,75e,0,0,1,0|51.15,0,2bb,1003,1,0,1,0|51.94,0,c0,2ba,0,0,1,0|51.c4,0,140,29e,0,0,1,0|51.e4,0,1de,1de,0,0,1,0|4.0,0,24e,1f2c,1,0,0,0|f2.0,0,7b,1c9b,1,1,1,1|f2.4e,0,7b,1c9b,0,0,1,1|06.0,0,483,59a,0,1,0,0|31.0,0,a27,37db,1,0,0,0|2.0,0,316,2512,1,0,0,0|2.3,0,36f,2512,1,0,0,0|2.c,0,316,189b,1,0,0,0|2.5e,0,5c8,109a,1,0,0,0|25.0,0,1497,19da,1,0,0,0|c1.0,0,a45,620b,1,0,1,0|c1.711,0,a45,620b,1,0,0,0|c1.16,0,bfd,15fd,1,0,0,0|96.0,0,176d,176d,1,0,0,0|77.0,0,1035,394e,1,0,0,0|d2.0,0,67f,8fc,0,1,0,0|c.0,0,64,26b1,1,1,1,1|c.4d,0,33b,4cf,0,0,1,1|c.f11,0,cc,e7,0,0,1,1|c.2d,0,12b,b22,0,0,1,1|c.5d,0,ef,1676,1,1,1,1|c.cd,0,d0,112,0,0,1,1|c.8c,0,176,10cc,0,1,1,1|c.66,0,6a,19ec,0,0,1,0|c.dc,0,15d,a2a,0,0,1,1|c.c9,0,64,1f9c,0,0,1,0|c.cc,0,20c,794,0,1,1,1|c.bc,0,153,4af,0,0,1,1|c.021,0,2c9,347,0,0,1,1|c.9c,0,c2,26b1,0,1,1,1|08.0,0,1699,1ed1,1,0,0,0|68.0,0,1923,1923,1,0,0,0|7.0,0,97,2791,1,1,1,0|7.51,0,97,22a6,1,0,1,0|7.e1,0,170,1386,1,0,1,0|7.42,0,2bb,1823,1,0,0,0|7.f1,0,2a7,1a27,1,0,0,0|7.21,0,2d9,2791,1,1,0,0|7.221,0,56e,efe,1,0,0,0|7.fe,0,725,1c6f,1,0,0,0|7.41,0,30b,2116,1,0,0,0|7.62,0,469,1729,1,0,0,0|7.f2,0,41c,dc6,1,0,0,0|7.3f,0,5aa,1a49,1,0,0,0|b8.0,0,df2,df2,1,0,0,0|a3.0,0,1b3a,1d74,1,0,0,0|5.0,0,33d,2809,1,1,0,0|5.02,0,4a9,14a0,1,0,0,0|5.1f,0,688,15ce,1,0,0,0|5.f,0,469,1ca2,1,0,0,0|5.611,0,65d,19f9,1,0,0,0|5.44,0,5f9,1ce7,1,0,0,0|5.0c,0,563,1f0d,1,0,0,0|5.54,0,563,2809,1,0,0,0|5.32,0,563,18b9,1,0,0,0|5.3c,0,5c7,e2d,1,0,0,0|5.64,0,60d,1f32,1,0,0,0|5.d,0,33d,21c0,1,0,0,0|5.0f,0,60d,1611,1,0,0,0|5.e,0,4e1,27eb,1,0,0,0|32.0,0,13e8,1d18,0,0,1,0|d1.0,0,b53,2067,1,0,0,0|d1.13,0,111b,2067,1,0,0,0|e1.0,0,1010,1c54,1,0,0,0|e1.23,0,1010,1c54,1,0,0,0|e1.77,0,116c,1806,1,0,0,0|a6.0,0,1162,1162,1,0,0,0|e2.0,0,514,f78,1,1,0,0|03.0,0,106a,2512,1,0,0,0|36.0,0,b54,1c1f,1,0,0,0|36.78,0,f2c,1c1f,1,0,0,0|05.0,0,11b2,2e49,1,0,0,0|b6.0,0,1af4,1e5a,1,0,0,0|d6.0,0,1518,1518,1,0,0,0|e6.0,0,1f2c,1f2c,1,0,0,0|35.0,0,1761,276a,1,0,0,0|e.0,0,1387,338f,1,0,0,0|e.81,0,1457,27ce,1,0,0,0|e.71,0,1387,2738,1,0,0,0|07.0,0,1752,1752,1,0,0,0|f3.0,0,151f,21b5,1,0,0,0|41.0,0,e6a,4fc4,1,0,0,0|46.0,0,1068,1068,1,0,0,0|23.0,0,267,13a6,1,1,0,0|62.0,0,442,ae6,1,0,0,0|a2.0,0,4d8,c12,1,0,0,0|17.0,0,1b4b,1b4b,1,0,0,0|f1.0,0,176f,2bd8,1,0,0,0|f1.43,0,17bf,1dc5,1,0,0,0|f1.26,0,2143,240a,1,0,0,0|f1.b9,0,1a17,1e77,1,0,0,0|f1.33,0,176f,251b,1,0,0,0|24.0,0,1339,1ef1,1,0,0,0|24.17,0,13d0,17ca,1,0,0,0|24.27,0,14d1,1bd9,1,0,0,0|24.37,0,1658,18ef,1,0,0,0|24.b5,0,1339,1ef1,1,0,0,0|16.0,0,437,210c,1,0,0,0|81.0,0,3b5,19b3,1,0,0,0|11.0,0,16be,5031,1,0,0,0|01.0,0,f9f,2b16,1,0,0,0|01.301,0,fef,1e77,1,0,0,0|01.a1,0,12a2,2756,1,0,0,0|88.0,0,17b6,17b6,1,0,0,0|92.0,0,1680,1716,1,0,0,0|22.0,0,28a,c62,1,1,1,1|53.0,0,5e0,b86,1,1,0,0|45.0,0,2cec,2cec,1,0,0,0|78.0,0,f6d,2151,1,0,0,0|04.0,0,1752,2c9c,1,0,0,0|71.0,0,2601,607b,1,0,0,0|71.63,0,2601,4555,1,0,0,0|71.73,0,319b,319b,1,0,0,0|71.e6,0,3187,3187,1,0,0,0|a4.0,0,69,5be,0,1,1,1|a4.38,0,69,5be,0,1,1,1|8.0,0,4cd,18d43,1,0,0,0|8.911,0,d15,1837,1,0,0,0|98.0,0,cf4,3ad5,0,0,1,0|b4.0,0,12b6,2a94,1,0,0,0|43.0,0,132,108a,0,0,1,0|37.0,0,1676,2440,1,0,0,0|84.0,0,fb,1b58,0,0,1,0|21.0,0,17d3,2a93,1,0,0,0|21.c1,0,1d37,20cf,1,0,0,0|21.d1,0,17d3,2a93,1,0,0,0|d5.0,0,c0,19f2,0,1,1,1|d5.9e,0,311,816,0,0,1,1|d5.7d,0,c0,19f2,0,1,1,1|d5.8d,0,e0,1874,0,0,1,1|d5.be,0,2ad,1892,0,0,1,1|d5.ae,0,4dd,9ba,0,0,1,1|93.0,0,270,17a0,0,1,1,1|93.de,0,280,1308,0,0,1,1|93.65,0,2fc,17a0,0,0,1,0|f.0,0,a27,2850,1,0,1,0|64.0,0,b03,3d40,1,0,1,0|64.a6,0,b03,19c6,0,0,1,0|64.f5,0,efe,261d,0,0,1,0|47.0,0,1342,1342,1,0,0,0|55.0,0,c80,c80,1,0,0,0|72.0,0,7a,20bc,1,1,1,1|72.eb,0,763,763,0,0,1,1|72.4c,0,3e4,1ea0,1,0,1,1|72.b01,0,7a,1a20,0,0,1,1|72.3e,0,d7,15c4,0,0,1,1|72.db,0,10c,16a4,0,0,1,1|72.fb,0,90,1e4b,0,0,1,1|c2.0,0,5aa,d30,1,1,0,0|c2.121,0,764,ad2,0,1,0,0|d.0,0,e06,21f2,1,0,0,0|d.61,0,e06,1fcb,1,0,0,0|d.c5,0,1162,21f2,1,0,0,0|d.93,0,f27,21f2,1,0,0,0|d.a3,0,f09,1f36,1,0,0,0|44.0,0,19c7,2197,1,0,0,0|44.d5,0,19c7,2197,1,0,0,0|6.0,0,30c,2073,1,0,0,0|6.211,0,30c,1706,1,0,0,0|3.0,0,31f,2345,1,0,0,0|3.4,0,31f,2345,1,0,0,0|3.d7,0,49b,14c9,1,0,0,0|3.11,0,4ea,144f,1,0,0,0|f4.0,0,15ae,19c8,1,0,0,0|63.0,0,260,1766,1,1,0,0|63.9f,0,6ea,14b3,1,0,0,0|02.0,0,e06,4dbc,1,0,0,0|02.b3,0,e06,4dbc,1,0,0,0|42.0,0,80,1d74,1,1,1,0|12.0,0,3e7,1c77,1,1,1,0|12.97,0,622,938,1,0,0,0|b5.0,0,1837,20ed,1,0,0,0|a.0,0,8e,2d4f,1,1,1,1|a.3a,0,1a1,c9e,0,0,1,1|a.49,0,e0,1df1,1,1,1,1|a.0a,0,b8,2d4f,0,1,1,1|a.12,0,726,ed6,1,0,0,0|a.c8,0,232,1dc7,0,1,1,1|a.f8,0,130,1c38,0,1,1,1|a.19,0,f0,1546,0,1,1,1|a.2c,0,10b,1650,0,0,1,1|a.22,0,513,1cc7,1,0,0,0|a.811,0,b6,e9a,0,0,1,1|a.e8,0,8e,1d42,1,1,1,1|a.d8,0,d5,1abe,0,1,1,1|a.29,0,ed,1d0a,1,1,1,1|a.b8,0,141,206e,0,1,1,1|a.9d,0,163,1611,0,1,1,1|a.f9,0,e1,1720,1,1,1,1|a.311,0,10c,a4b,0,1,1,1|a.411,0,4b5,aa0,1,0,1,1|a.bb,0,159,dde,1,1,1,1|all,0,0,0,1,1,1,1'.split('|');
for(i in d_sdata) { d = d_sdata[i].split(','); if(d[0]) eval('d_s[\''+d[0]+'\'] = new Array('+d[1]+','+hexdec(d[2])+','+hexdec(d[3])+','+d[4]+','+d[5]+','+d[6]+','+d[7]+');'); }
d_sdata = null;

dojazdy_miasta = new Array(); dojazdy_miasta['WAW'] = 'Warszawa'; dojazdy_miasta['POZ'] = 'Poznań'; dojazdy_miasta['KRA'] = 'Kraków'; dojazdy_miasta['KTW'] = 'Katowice'; dojazdy_miasta['WRO'] = 'Wrocław'; dojazdy_miasta['GDA'] = 'Gdańsk'; dojazdy_miasta['SZZ'] = 'Szczecin'; dojazdy_miasta['TXL'] = 'Berlin'; dojazdy_miasta['DRS'] = 'Drezno'; dojazdy_miasta['FRA'] = 'Frankfurt'; 

var e_cache = new Array();
function e(o, c) { if(!e_cache[o] || c) e_cache[o] = document.getElementById(o); return e_cache[o]; }

function l(u) { s = document.createElement('script'); s.type = 'text/javascript'; s.defer = true; s.src = u; document.body.appendChild(s); }

function p_s_d(o) {
	if(!o) o = 'all';
	cenymin = 5;
	cenymax = 5000;

	f_s = e('search');

	f_s.s_dj.length = 0;
	f_s.s_dj.options[0] = new Option('dowolny',0);

	if(d_s[o]) {
		if(d_s[o][0]) for(i in d_s[o][0]) {
			if(d_s[o][0][i][2]) d_s[o][3] = 1;
			if(d_s[o][0][i][3]) d_s[o][4] = 1;
			if(d_s[o][0][i][4]) d_s[o][5] = 1;
		}
		if(d_s[o][3]) f_s.s_dj.options[f_s.s_dj.length] = new Option('samolot','S');
		if(d_s[o][4]) f_s.s_dj.options[f_s.s_dj.length] = new Option('autokar','B');
		if(d_s[o][5]) f_s.s_dj.options[f_s.s_dj.length] = new Option('własny','W');
	}

	if(!d_s[o][1] || !d_s[o][2]) {
		d_s[o][1] = cenymin;
		d_s[o][2] = cenymax;
	}

	f_s.s_c.length = 0;
	f_s.s_c.options[0] = new Option('dowolna',0);

	for(i = d_s[o][1]; i <= d_s[o][2]; i += 1000) {
		step = 1000;

		if(d_s[o][2] - d_s[o][1] < step) break;

		if(i >= 5000) {
			if(f_s.s_c.length > 1) f_s.s_c.options[f_s.s_c.length] = new Option('powyżej 5000 zł','5000|');
			break;
		}
		if(i % 1000 != 0) {
			i = i - (i % 1000);
			f_s.s_c.options[f_s.s_c.length] = new Option('do '+(1000+d_s[o][1]-(d_s[o][1] % 1000)+ ' zł'),'|'+(1000+d_s[o][1] - (d_s[o][1] % 1000)));
		}

		if(i > d_s[o][2] - step) {
			f_s.s_c.options[f_s.s_c.length] = new Option('powyżej '+(d_s[o][2]-(d_s[o][2] % step)+ ' zł'),(d_s[o][2]-(d_s[o][2] % step))+'|');
			break;
		}

		if(i > d_s[o][1]) f_s.s_c.options[f_s.s_c.length] = new Option(('do '+(i+step)+' zł'),('0|'+(i+step)));
	}
}

function p_s_dj(destynacja) {
	f_s = e('s');
	o = f_s.s_p.value;

	f_s.s_dj.length = 0;
	f_s.s_dj.options[0] = new Option('dowolny', 0);

	if(d_s[o][0] && destynacja != 0) {
		for(i in d_s[o][0]) if(d_s[o][0][i][0] == destynacja) {
			if(d_s[o][0][i][2]) f_s.s_dj.options[f_s.s_dj.length] = new Option('samolot','S');
			if(d_s[o][0][i][3]) f_s.s_dj.options[f_s.s_dj.length] = new Option('autokar','B');
			if(d_s[o][0][i][4]) f_s.s_dj.options[f_s.s_dj.length] = new Option('własny','W');
		}
	} else {
		if(d_s[o][3]) f_s.s_dj.options[f_s.s_dj.length] = new Option('samolot','S');
		if(d_s[o][4]) f_s.s_dj.options[f_s.s_dj.length] = new Option('autokar','B');
		if(d_s[o][5]) f_s.s_dj.options[f_s.s_dj.length] = new Option('własny','W');
	}
}

function c_d(d, m) {
	if(sys_m > m.value || (sys_d > d.value && sys_m == m.value)) {
		var sys_Y = 2006;
	} else {
		var sys_Y = 2005;
	}
	var data = new Date(sys_Y, (m.value - 1), d.value);

	if(sys_m == m.value && d.value < sys_d) {
		m.value=sys_m + 1;
		return;
	}

	if(data.getMonth() != (m.value - 1) || data.getDate() != d.value) {
		var data = new Date(sys_Y, m.value, 0);
		d.value=data.getDate();
		return;
	}
}

var email = /(^([a-z0-9\-\+\._]+)+@([a-z0-9\-]+\.)+(com|net|edu|mil|gov|org|int|info|name|([a-z]{2}))$)/i

function c_e(o) {
	obj = e(o);
	if(!email.test(obj.value)) {
		alert('Prosimy podać prawidłowy adres e-mail.');
		obj.select();
		return false;
	}
	return true;
}

function a() {
	f_s1 = e('search_adv1');
	f_s2 = e('search_adv2');
	if(f_s1.style.display == 'inline') {
		f_s1.style.display = 'none';
		f_s2.style.display = 'none';
		e('search').style.background='url(/_img/_search-bg-1.png)';
		e('s_f').value='';
		e('s_m').value='';
		e('s_cat').value='';
		e('s_f').value='';
		e('s_o').value='';
		e('s_n').value='';
		e('s_adv_a').innerHTML='wyszukiwanie zaawansowane';
	} else {
		f_s1.style.display = 'inline';
		f_s2.style.display = 'inline';
		e('search').style.background='url(/_img/_search-bg-2.png)';
		e('s_adv_a').innerHTML='wyszukiwanie standardowe';
	}
}

function s_fl(o) {
	if(o.id=="s_fm" && o.checked==true) { e('s_l').checked=false; return true; }
	if(o.id=="s_l" && o.checked==true) { e('s_fm').checked=false; return true; }
}

function img(u) {
	document.write('<div class="img"><iframe id="img" src="'+u+'" frameborder="0" style="border: 0px; width: 248px; height: 186px; margin: 0px; padding: 0px; overflow: hidden;"></iframe><div id="img_nav"></div></div>');
}

function swf() {
	var url;
	var w;
	var h;
	var id;
	this.draw = draw;
	function draw(url, w, h, id) {
		this.url = url;
		this.w = w;
		this.h = h;
		this.id = id;
		document.write('<'+'script type="text/javascript" src="/js/f.js"><'+'/script>');
	}
}
swf = new swf;

function c(a) { t = new Date(); new Image().src='/js/statystyki.js?'+a+','+t.getTime(); return true; }

function scrollDiv(o, d) { t = e(o).getElementsByTagName('div'); j = 0; u = new Array(); scrollCache = new Array(); for(i in t) if(t[i].id) { u[j] = t[i]; scrollCache[j] = t[i].innerHTML; j++; } for(i = 0; i < j; i++) u[i].innerHTML = scrollCache[d == 'rew'? (i? i - 1: j - 1): (i == j - 1? 0: i + 1)]; }

var mRI = 0;
var mRB;

function mRU(o, b) {
	if(!mRI) {
		o = e(o);
		if(!o) return false;

		o.style.visibility='hidden';
		o.style.display='inline';

		t = o.getElementsByTagName('A');
		for(i in t) t[i].onmouseover = mRU;

		o.onmouseover = mRU;
		o.onmouseout = mRD;
		b.onmouseout = mRD;

		m = new Object();
		m.x1 = getX(b); m.x2 = getX(o); m.w1 = getW(b); m.w2 = getW(o); m.y1 = getY(b); m.y2 = getY(o); m.h1 = getH(b); m.h2 = getH(o); 
						
		m.object = o;
		m.speed = 10;
		m.frames = 10;
		m.count = 0;
		m.shadow = true;
		mRI = m;
		mRDraw(1);
	}
	mRI.count++;
}

function mRDraw(a) {

	m = mRI;
	o = m.object;

	x1 = m.x1; x2 = m.x2; w1 = m.w1; w2 = m.w2; y1 = m.y1; y2 = m.y2; h1 = m.h1; h2 = m.h2;

	if(typeof(mRB) != 'object') {
		mRB = document.createElement('div');
		with(mRB.style) {
			border = '1px solid #cde4ed';
			background = '#ffffff';
			width = (a? w1: w2) + 'px';
			height = (a? h1: h2) + 'px';
			position = 'absolute';
			zIndex = 50;
			left = (a? x1: x2) + 'px';
			top = (a? y1: y2) + 'px';
		}
		m.i = m.frames;
		if(m.shadow) e(o.id+'Shadow').style.display = 'none';
		o.style.visibility='visible';
		o.style.display = 'none';
		w = (a? w1: w2);
		h = (a? h1: h2);
		document.body.appendChild(mRB);
	}

	if(h > 0 && w > 0 && --m.i) {
	w = w - (a? -1: 1) * w2 / m.frames + (a? -1: 1) * w1 / m.frames;
	h = h - (a? -1: 1) * h2 / m.frames + (a? -1: 1) * h1 / m.frames;

		with(mRB.style) {
			left = Math.floor(x2 - (x1 > x2? -1: 1) * (a? m.i: m.frames - m.i) * Math.abs(x1 - x2) / m.frames) + 'px';
			top = Math.floor(y2 - (y1 > y2? -1: 1) * (a? m.i: m.frames - m.i) * Math.abs(y1 - y2) / m.frames) + 'px';

			width = w + 'px';
			height = h + 'px';
		}
		setTimeout('mRDraw('+a+')', m.speed);
	} else {
		document.body.removeChild(mRB);
		mRB = void(0);
		if(a) {
			o.style.display = 'inline';
			if(m.shadow) e(o.id+'Shadow').style.display = 'block';
		} else {
			if(m.shadow) e(o.id+'Shadow').style.display = 'none';
			mRI = void(0);
		}
	}
}

function mRD() { setTimeout('mRDrawWait('+mRI.count+')', 333); }
function mRDrawWait(p) { if(mRI.count == p) mRDraw(0); }

function getInt(n) { return n == 'auto'? 0: parseInt(n.replace('px', '')); }
function getStyle(o, s) { if(o.currentStyle) return o.currentStyle[s]; else if(window.getComputedStyle) return document.defaultView.getComputedStyle(o, null).getPropertyValue(s.replace(/([A-Z]+)/g, '-$1').toLowerCase()); }
function getX(o) { return getXY(o, 1); }
function getY(o) { return getXY(o, 0); }
function getW(o) { return getInt(getStyle(o, 'width')) + getInt(getStyle(o, 'paddingLeft')) + getInt(getStyle(o, 'paddingRight')); }
function getH(o) { return getInt(getStyle(o, 'height')) + getInt(getStyle(o, 'paddingTop')) + getInt(getStyle(o, 'paddingBottom')); }
function getXY(o, xy) { var p = 0; if(o.offsetParent) while(1) { p += (xy? o.offsetLeft: o.offsetTop); if(!o.offsetParent) break; o = o.offsetParent; } else if(o.x || o.y) p += (xy? o.x: o.y); return p; }

