window._homedir='/static';

window.url_search       =Array();
window.url_search_static=Array();
window.url_links        =Array();

window.url_search['flight']='/flight/search/index/';
window.url_search['flight_advanced']='/flight/search/multi/';
window.url_search['flight_group']='/flight/search/group/';
window.url_search['hotel']='/hotel/search/index/';
window.url_search['hotel_group']='/hotel/search/group/';
window.url_search['holiday']='/holiday/search/index/';
window.url_search['car']='/car/search/index/';
window.url_search['FH']='/multi/search/formfh/';
window.url_search['HC']='/multi/search/formhc/';
window.url_search['FC']='/multi/search/formfc/';
window.url_search['FHC']='/multi/search/formfhc/';


window.url_links['site_login']='/site/reservation/login/'
window.url_links['site_polec']='/site/reservation/recommend/';
window.url_links['site_newsletter']='/site/newsletter/index/';
window.url_links['site_programpartnerski']='/site/index/programpartnerski/';
window.url_links['car_cityhelper']='/ajaxhelper.php/car/atlas/cityhelper/';
window.url_links['hotel_codehelper']='/ajaxhelper.php/multi/atlas/gethotelcitycode/';
window.url_links['car_options']='/multi/search/caroptions/';

function cityhelperOnLoad()
{
	if( this._autocomplete._rows.length==1 )
	{
		var td=this._autocomplete._rows[0].getElementsByTagName('td');
		if (td.length>0)
		{
			if (td[0].onclick)
			{
				td[0].onclick();
			}
		}
		if (this._autocomplete._rows[0].onclick)
		{
			this._autocomplete._rows[0].onclick();
		}
	}
	else if( this._autocomplete._rows.length > 1 )
	{
		//alert('more: ' + this._autocomplete._rows.length);
		//alert( this._autocomplete._rows[0].innerHTML );
		var td=this._autocomplete._rows[0].getElementsByTagName('td')
		
		var citytyped = this.value.toLowerCase();
		
		if( td[0].innerHTML.toLowerCase() == citytyped || td[0].innerHTML.toLowerCase() == citytyped + ' (' + citytyped + ')'  )
		{
			if (td.length>0)
			{
				if (td[0].onclick)
				{
					td[0].onclick();
				}
			}
			if (this._autocomplete._rows[0].onclick)
			{
				this._autocomplete._rows[0].onclick();
			}
		}
	}
}

window._forms = {
	_default : {
				radioChecked: '/static/img/form/searcher_radioon.gif',
				radioUnchecked: '/static/img/form/searcher_radiooff.gif',
				checkboxChecked: '/static/img/form/orange_checkbox1.gif',
				checkboxUnchecked: '/static/img/form/orange_checkbox.gif',
				selectDisabledClass: 'dropdowngray',
				autoCompleteHelperClass: 'complete171',
				autoCompleteClass: 'autocomplete',
				autoCompleteMinChar: 2,
				autoCompleteInterval: 500,
				calendarClass: 'calendar',
				calendarMonthsCount: 2,
				calendarMonths: paramsLan.calendarMonths,
				calendarDays: paramsLan.calendarDays,
				calendarClose: paramsLan.calendarClose,
				helperClass: 'helper',
				helperElementClass: 'helpbox',
				helperElementId: 'helperid',
				helperTrackClass: 'helper',
				imagesClass: 'reload_movie',
				imagesInterval: 700,
				imagesSep: '|'
			},
		ambiguous : {
				radioChecked: '/static/img/form/checkbox_dark_on.gif',
				radioUnchecked: '/static/img/form/checkbox_dark_off.gif'
		},
		searcherfh : {
			autoCompleteUrl: '/ajaxhelper.php/multi/atlas/cityhelper/nazwa/:value:/input/:name:/id/:id:/hotelcity_id/destinationcode/hotelcitycode_id/destinationcode_code/',
			autoCompleteOnCancel: cityhelperOnLoad,
			autoCompleteOnLoad: cityhelperOnLoad,
			radioChecked: '/static/img/form/searcher_radio_on.gif',
			radioUnchecked: '/static/img/form/searcher_radio_off.gif',
			checkboxChecked: '/static/img/form/searcher_checked.gif',
			checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
			calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
					
					if (this._afterSetMaxDate)
						this.setMaxDate(this._afterSetMaxDate);
					if (this._afterSetMinDate)
						this.setMinDate(this._afterSetMinDate);
					
					//ograniecznie daty rozpoczecia wynajmu hoteli na podstawie daty wylotu
					if ((this.focusElements[0].id=='date01') && this.focusElements[0].value)
					{
						FSite2.calendars['date03_calendar']._afterSetMinDate=Date.parseString(this.focusElements[0].value);
						FSite2.calendars['date032_calendar']._afterSetMinDate=Date.parseString(this.focusElements[0].value);
					}
					//ograniecznie daty konca wynajmu hoteli na podstawie daty powrotu
					if ((this.focusElements[0].id=='date012') && this.focusElements[0].value)
					{
						FSite2.calendars['date03_calendar']._afterSetMaxDate=Date.parseString(this.focusElements[0].value);
						FSite2.calendars['date032_calendar']._afterSetMaxDate=Date.parseString(this.focusElements[0].value);
					}
				},
			calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
					
					//ograniecznie daty rozpoczecia wynajmu hoteli na podstawie daty wylotu
					if ((this.focusElements[0].id=='date01') && this.focusElements[0].value)
					{
						FSite2.calendars['date03_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
						FSite2.calendars['date032_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
					//ograniecznie daty konca wynajmu hoteli na podstawie daty powrotu
					if ((this.focusElements[0].id=='date012') && this.focusElements[0].value)
					{
						FSite2.calendars['date03_calendar'].setMaxDate(Date.parseString(this.focusElements[0].value));
						FSite2.calendars['date032_calendar'].setMaxDate(Date.parseString(this.focusElements[0].value));
					}
				},
			onSubmit: function() {
					wd=new Date();
					td=new Date();
					td.setDate( td.getDate()+ 1 );
					cd=document.getElementById('date01').calendarObject.getDate();
					if (cd<td)
					{
						var confMsg=paramsLan.alert;
						confMsg=confMsg.replace('###day1###',wd.getDate() + '.' + (wd.getMonth()+1) + '.' + wd.getFullYear());
						confMsg=confMsg.replace('###day2###',td.getDate() + '.' + (td.getMonth()+1) + '.' + td.getFullYear());
						if (!confirm(confMsg))
							return false;
					}
					return true;
				}
		},
		searcherfc : {
			autoCompleteUrl: '/ajaxhelper.php/multi/atlas/cityhelper/nazwa/:value:/input/:name:/id/:id:/kraj_id/kraj_z/',
			autoCompleteOnCancel: cityhelperOnLoad,
			autoCompleteOnLoad: cityhelperOnLoad,
			radioChecked: '/static/img/form/searcher_radio_on.gif',
			radioUnchecked: '/static/img/form/searcher_radio_off.gif',
			checkboxChecked: '/static/img/form/searcher_checked.gif',
			checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
			calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
					
					if (this._afterSetMaxDate)
						this.setMaxDate(this._afterSetMaxDate);
					if (this._afterSetMinDate)
						this.setMinDate(this._afterSetMinDate);
					
					//ograniecznie daty rozpoczecia wynajmu hoteli na podstawie daty wylotu
					if ((this.focusElements[0].id=='date01') && this.focusElements[0].value)
					{
						FSite2.calendars['dates_calendar']._afterSetMinDate=Date.parseString(this.focusElements[0].value);
						FSite2.calendars['dates2_calendar']._afterSetMinDate=Date.parseString(this.focusElements[0].value);
					}
					//ograniecznie daty konca wynajmu hoteli na podstawie daty powrotu
					if ((this.focusElements[0].id=='date012') && this.focusElements[0].value)
					{
						FSite2.calendars['dates_calendar']._afterSetMaxDate=Date.parseString(this.focusElements[0].value);
						FSite2.calendars['dates2_calendar']._afterSetMaxDate=Date.parseString(this.focusElements[0].value);
					}
				},
			calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
					
					//ograniecznie daty rozpoczecia wynajmu hoteli na podstawie daty wylotu
					if ((this.focusElements[0].id=='date01') && this.focusElements[0].value)
					{
						FSite2.calendars['dates_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
						FSite2.calendars['dates2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
					//ograniecznie daty konca wynajmu hoteli na podstawie daty powrotu
					if ((this.focusElements[0].id=='date012') && this.focusElements[0].value)
					{
						FSite2.calendars['dates_calendar'].setMaxDate(Date.parseString(this.focusElements[0].value));
						FSite2.calendars['dates2_calendar'].setMaxDate(Date.parseString(this.focusElements[0].value));
					}
				},
			onSubmit: function() {
					wd=new Date();
					td=new Date();
					td.setDate( td.getDate()+ 1 );
					cd=document.getElementById('date01').calendarObject.getDate();
					if (cd<td)
					{
						var confMsg=paramsLan.alert;
						confMsg=confMsg.replace('###day1###',wd.getDate() + '.' + (wd.getMonth()+1) + '.' + wd.getFullYear());
						confMsg=confMsg.replace('###day2###',td.getDate() + '.' + (td.getMonth()+1) + '.' + td.getFullYear());
						if (!confirm(confMsg))
							return false;
					}
					return true;
				}
		},
		searcherhc : {
			autoCompleteUrl: '/ajaxhelper.php/multi/atlas/cityhelper/nazwa/:value:/input/:name:/id/:id:/kraj_id/kraj_z/',
			autoCompleteOnCancel: cityhelperOnLoad,
			autoCompleteOnLoad: cityhelperOnLoad,
			radioChecked: '/static/img/form/searcher_radio_on.gif',
			radioUnchecked: '/static/img/form/searcher_radio_off.gif',
			checkboxChecked: '/static/img/form/searcher_checked.gif',
			checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
			calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
				},
			calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
				}
		},
		searcherfhc : {
			autoCompleteUrl: '/ajaxhelper.php/multi/atlas/cityhelper/nazwa/:value:/input/:name:/id/:id:/hotelcity_id/destinationcode/hotelcitycode_id/destinationcode_code/kraj_id/kraj_z/',
			autoCompleteOnCancel: cityhelperOnLoad,
			autoCompleteOnLoad: cityhelperOnLoad,
			radioChecked: '/static/img/form/searcher_radio_on.gif',
			radioUnchecked: '/static/img/form/searcher_radio_off.gif',
			checkboxChecked: '/static/img/form/searcher_checked.gif',
			checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
			calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
					
					if (this._afterSetMaxDate)
						this.setMaxDate(this._afterSetMaxDate);
					if (this._afterSetMinDate)
						this.setMinDate(this._afterSetMinDate);
					
					//ograniecznie daty rozpoczecia wynajmu hoteli na podstawie daty wylotu
					if ((this.focusElements[0].id=='date01') && this.focusElements[0].value)
					{
						FSite2.calendars['date03_calendar']._afterSetMinDate=Date.parseString(this.focusElements[0].value);
						FSite2.calendars['date032_calendar']._afterSetMinDate=Date.parseString(this.focusElements[0].value);
						FSite2.calendars['dates_calendar']._afterSetMinDate=Date.parseString(this.focusElements[0].value);
						FSite2.calendars['dates2_calendar']._afterSetMinDate=Date.parseString(this.focusElements[0].value);
					}
					//ograniecznie daty konca wynajmu hoteli na podstawie daty powrotu
					if ((this.focusElements[0].id=='date012') && this.focusElements[0].value)
					{
						FSite2.calendars['date03_calendar']._afterSetMaxDate=Date.parseString(this.focusElements[0].value);
						FSite2.calendars['date032_calendar']._afterSetMaxDate=Date.parseString(this.focusElements[0].value);
						FSite2.calendars['dates_calendar']._afterSetMaxDate=Date.parseString(this.focusElements[0].value);
						FSite2.calendars['dates2_calendar']._afterSetMaxDate=Date.parseString(this.focusElements[0].value);
					}
				},
			calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
					
					//ograniecznie daty rozpoczecia wynajmu hoteli na podstawie daty wylotu
					if ((this.focusElements[0].id=='date01') && this.focusElements[0].value)
					{
						FSite2.calendars['date03_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
						FSite2.calendars['date032_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
						FSite2.calendars['dates_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
						FSite2.calendars['dates2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
					//ograniecznie daty konca wynajmu hoteli na podstawie daty powrotu
					if ((this.focusElements[0].id=='date012') && this.focusElements[0].value)
					{
						FSite2.calendars['date03_calendar'].setMaxDate(Date.parseString(this.focusElements[0].value));
						FSite2.calendars['date032_calendar'].setMaxDate(Date.parseString(this.focusElements[0].value));
						FSite2.calendars['dates_calendar'].setMaxDate(Date.parseString(this.focusElements[0].value));
						FSite2.calendars['dates2_calendar'].setMaxDate(Date.parseString(this.focusElements[0].value));
					}
				},
			onSubmit: function() {
					wd=new Date();
					td=new Date();
					td.setDate( td.getDate()+ 1 );
					cd=document.getElementById('date01').calendarObject.getDate();
					if (cd<td)
					{
						var confMsg=paramsLan.alert;
						confMsg=confMsg.replace('###day1###',wd.getDate() + '.' + (wd.getMonth()+1) + '.' + wd.getFullYear());
						confMsg=confMsg.replace('###day2###',td.getDate() + '.' + (td.getMonth()+1) + '.' + td.getFullYear());
						if (!confirm(confMsg))
							return false;
					}
					return true;
				}
		},
		searcherp : {
				autoCompleteUrl: '/ajaxhelper.php/flight/atlas/cityhelper/nazwa/:value:/input/:name:/id/:id:/',
				autoCompleteOnCancel: cityhelperOnLoad,
				autoCompleteOnLoad: cityhelperOnLoad,
				radioChecked: '/static/img/form/searcher_radio_on.gif',
				radioUnchecked: '/static/img/form/searcher_radio_off.gif',
				checkboxChecked: '/static/img/form/searcher_checked.gif',
				checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
				},
				onSubmit: function() {
					wd=new Date();
					td=new Date();
					td.setDate( td.getDate()+ 1 );
					cd=document.getElementById('date01').calendarObject.getDate();
					if (cd<td)
					{
						var confMsg=paramsLan.alert;
						confMsg=confMsg.replace('###day1###',wd.getDate() + '.' + (wd.getMonth()+1) + '.' + wd.getFullYear());
						confMsg=confMsg.replace('###day2###',td.getDate() + '.' + (td.getMonth()+1) + '.' + td.getFullYear());
						if (!confirm(confMsg))
							return false;
					}
					return true;
				}
			},
		searcheradvancep : {
				autoCompleteUrl: '/ajaxhelper.php/flight/atlas/cityhelper/nazwa/:value:/input/:name:/id/:id:/',
				autoCompleteOnCancel: cityhelperOnLoad,
				autoCompleteOnLoad: cityhelperOnLoad,
				radioChecked: '/static/img/form/searcher_radio_on.gif',
				radioUnchecked: '/static/img/form/searcher_radio_off.gif',
				checkboxChecked: '/static/img/form/searcher_checked.gif',
				checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
				},
				onSubmit: function() {
					wd=new Date();
					td=new Date();
					td.setDate( td.getDate()+ 1 );
					cd=document.getElementById('date0adv0').calendarObject.getDate();
					if (cd<td)
					{
						var confMsg=paramsLan.alert;
						confMsg=confMsg.replace('###day1###',wd.getDate() + '.' + (wd.getMonth()+1) + '.' + wd.getFullYear());
						confMsg=confMsg.replace('###day2###',td.getDate() + '.' + (td.getMonth()+1) + '.' + td.getFullYear());
						if (!confirm(confMsg))
							return false;
					}
					return true;
				}
			},
		searchergroupp : {
				autoCompleteUrl: '/ajaxhelper.php/flight/atlas/cityhelper/nazwa/:value:/input/:name:/id/:id:/',
				autoCompleteOnCancel: cityhelperOnLoad,
				autoCompleteOnLoad: cityhelperOnLoad,
				radioChecked: '/static/img/form/searcher_radio_on.gif',
				radioUnchecked: '/static/img/form/searcher_radio_off.gif',
				checkboxChecked: '/static/img/form/searcher_checked.gif',
				checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
				}
			},
		searcherh : {
				autoCompleteUrl: '/ajaxhelper.php/hotel/atlas/cityhelper/nazwa/:value:/input/:name:/id/:id:/',
				autoCompleteOnCancel: cityhelperOnLoad,
				autoCompleteOnLoad: cityhelperOnLoad,
				radioChecked: '/static/img/form/searcher_radio_on.gif',
				radioUnchecked: '/static/img/form/searcher_radio_off.gif',
				checkboxChecked: '/static/img/form/searcher_checked.gif',
				checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					d.setDate(d.getDate()+1);
					
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						data=Date.parseString(this.focusElements[0].value);
						data.setDate(data.getDate()+1);
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(data,change);
					}
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate()+1,change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						data=Date.parseString(this.focusElements[0].value);
						if (!isNaN(day))
							data.setDate(data.getDate()+1);
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(data);
					}
				},
				onSubmit: function() {
					wd=new Date();
					td=new Date();
					wd.setDate( wd.getDate()+ 3 );
					td.setDate( td.getDate()+ 4 );
					cd=$('date03').calendarObject.getDate();
					if (cd<td)
					{
						var confMsg=paramsLan.alertHotel;
						confMsg=confMsg.replace('###day1###',wd.getDate() + '.' + (wd.getMonth()+1) + '.' + wd.getFullYear());
						confMsg=confMsg.replace('###day2###',td.getDate() + '.' + (td.getMonth()+1) + '.' + td.getFullYear());
						if (!confirm(confMsg))
							return false;
					}
					return true;
				}
			},
		searchergrouph : {
				autoCompleteUrl: '/ajaxhelper.php/hotel/atlas/cityhelper/nazwa/:value:/input/:name:/id/:id:/',
				autoCompleteOnCancel: cityhelperOnLoad,
				autoCompleteOnLoad: cityhelperOnLoad,
				radioChecked: '/static/img/form/searcher_radio_on.gif',
				radioUnchecked: '/static/img/form/searcher_radio_off.gif',
				checkboxChecked: '/static/img/form/searcher_checked.gif',
				checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						data=Date.parseString(this.focusElements[0].value);
						if (!isNaN(day))
							data.setDate(data.getDate()+1);
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(data);
					}
				}
			},
		searcherw : {
				radioChecked: '/static/img/form/searcher_radio_on.gif',
				radioUnchecked: '/static/img/form/searcher_radio_off.gif',
				checkboxChecked: '/static/img/form/searcher_checked.gif',
				checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					if ((typeof(this.focusElements[0].form.dateEnd) == 'object') && (this.focusElements[0].form.dateEnd.value!=''))
						clearInput=false;
					else
						clearInput=true;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
					if (clearInput) this.focusElements[0].form.dateEnd.value='';
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						
						data=Date.parseString(this.focusElements[0].value);
						if (!isNaN(day))
							data.setDate(data.getDate()+5);
						if (document.searcherw.dateEnd && (document.searcherw.dateEnd.value!=''))
						{
							FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(data);
						}
						else
						{
							FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(data);
							FSite2.calendars[this.focusElements[0].id+'2_calendar'].focusElements[0].value='';
						}
					}
				}
			},
		searchers : {
				onExtend: function() {
					if (this.kraj_z && this.kraj_z.value && (!this.miejsce_w.options.length || !this.miejsce_o.options.length))
						loadcitycar(this.kraj_z.value,true);
				},
				radioChecked: '/static/img/form/searcher_radio_on.gif',
				radioUnchecked: '/static/img/form/searcher_radio_off.gif',
				checkboxChecked: '/static/img/form/searcher_checked.gif',
				checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
				}
			},
			searcherc : {
				onExtend: function() {
					if (this.kraj_z && this.kraj_z.value && (!this.miejsce_w.options.length || !this.miejsce_o.options.length))
						loadcitycar(this.kraj_z.value,true);
				},
				radioChecked: '/static/img/form/searcher_radio_on.gif',
				radioUnchecked: '/static/img/form/searcher_radio_off.gif',
				checkboxChecked: '/static/img/form/searcher_checked.gif',
				checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
				}
			},
		/*promocje dostÄ™pnoÅ›Ä‡*/
		searcher_adv_d : {
				radioChecked: '/static/img/form/searcher_radio_on.gif',
				radioUnchecked: '/static/img/form/searcher_radio_off.gif',
				checkboxChecked: '/static/img/form/searcher_checked.gif',
				checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
				}
			},

		/*promocje szukaj*/
		searcher_adv_s : {
				radioChecked: '/static/img/form/searcher_radio_on.gif',
				radioUnchecked: '/static/img/form/searcher_radio_off.gif',
				checkboxChecked: '/static/img/form/searcher_checked.gif',
				checkboxUnchecked: '/static/img/form/searcher_unchecked.gif',
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(Date.parseString(this.focusElements[0].value));
					}
				}
			},

		/*Opcje dodatkowe*/
		extendoptionsform_air : {
				checkboxChecked: '/static/img/form/gray_checkbox1.gif',
				checkboxUnchecked: '/static/img/form/gray_checkbox.gif',
				radioChecked: '/static/img/form/gray2_radio_on.gif',
				radioUnchecked: '/static/img/form/gray2_radio_off.gif'
			},
		extendoptionsform_car : {
				checkboxChecked: '/static/img/form/gray_checkbox1.gif',
				checkboxUnchecked: '/static/img/form/gray_checkbox.gif',
				disabledCheckboxChecked: '/static/img/form/graylight_checkbox1.gif',
				disabledCheckboxUnchecked: '/static/img/form/graylight_checkbox.gif',
				radioChecked: '/static/img/form/gray2_radio_on.gif',
				radioUnchecked: '/static/img/form/gray2_radio_off.gif'
		},
		extendoptionsform_hotel : {
				checkboxChecked: '/static/img/form/gray_checkbox1.gif',
				checkboxUnchecked: '/static/img/form/gray_checkbox.gif',
				disabledCheckboxChecked: '/static/img/form/graylight_checkbox1.gif',
				disabledCheckboxUnchecked: '/static/img/form/graylight_checkbox.gif',
				radioChecked: '/static/img/form/gray2_radio_on.gif',
				radioUnchecked: '/static/img/form/gray2_radio_off.gif'
			},
		extendoptionsform_holiday : {
				checkboxChecked: '/static/img/form/gray_checkbox1.gif',
				checkboxUnchecked: '/static/img/form/gray_checkbox.gif',
				radioChecked: '/static/img/form/gray2_radio_on.gif',
				radioUnchecked: '/static/img/form/gray2_radio_off.gif',
				selectDisabledClass: 'dropdowngray',
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					var d = new Date();
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					d = new Date();
					this.setMaxDate(d,change);
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
				}
			},
		catalogform_holiday : {
				calendarOnInit: function() {
					if (this.focusElements[0].value!='') change=true; else change=false;
					if ((typeof(this.focusElements[0].form.dateEnd) == 'object') && (this.focusElements[0].form.dateEnd.value!=''))
						clearInput=false;
					else
						clearInput=true;
					this.setDate(Date.parseString(this.focusElements[0].value),change);
					var d = new Date();
					if (FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'])
						this.setMinDate(FSite2.calendars[this.focusElements[0].id.substr(0,this.focusElements[0].id.length-1)+'_calendar'].getDate(),change);
					else
						this.setMinDate(d,change);
					d = new Date();
					d.setFullYear(d.getFullYear() + 2);
					this.setMaxDate(d,change);
					if (clearInput) this.focusElements[0].form.dateEnd.value='';
				},
				calendarOnChange: function() {
					if (this.focusElements.length) this.focusElements[0].value = this.getDate().getFormatted();
					if (this.focusElements.length && this.focusElements[0].id && FSite2.calendars[this.focusElements[0].id+'2_calendar'])
					{
						
						data=Date.parseString(this.focusElements[0].value);
						if (!isNaN(day))
							data.setDate(data.getDate()+5);
						if (document.catalogform.dateEnd && (document.catalogform.dateEnd.value!=''))
						{
							FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(data);
						}
						else
						{
							FSite2.calendars[this.focusElements[0].id+'2_calendar'].setMinDate(data);
							FSite2.calendars[this.focusElements[0].id+'2_calendar'].focusElements[0].value='';
						}
					}
				}
		},
		/*Hotel kometarze*/
		el2_hotel : {
				radioChecked: '/static/img/form/radio_dark_gray2.gif',
				radioUnchecked: '/static/img/form/radio_dark_gray.gif',
				checkboxChecked: '/static/img/form/checkbox_dark_gray.gif',
				checkboxUnchecked: '/static/img/form/checkbox_dark_gray2.gif'
			},
		el3_hotel : {
				radioChecked: '/static/img/form/radio_dark_gray2.gif',
				radioUnchecked: '/static/img/form/radio_dark_gray.gif',
				checkboxChecked: '/static/img/form/checkbox_dark_gray.gif',
				checkboxUnchecked: '/static/img/form/checkbox_dark_gray2.gif'
			},
		/*Wakacje kometarze*/
		el3_holiday : {
				radioChecked: '/static/img/form/radio_dark_gray2.gif',
				radioUnchecked: '/static/img/form/radio_dark_gray.gif',
				checkboxChecked: '/static/img/form/checkbox_dark_gray.gif',
				checkboxUnchecked: '/static/img/form/checkbox_dark_gray2.gif'
			},
		/*Formularz danych personalnych*/
		personal_date : {
				radioChecked: '/static/img/form/checkbox_dark_on.gif',
				radioUnchecked: '/static/img/form/checkbox_dark_off.gif',
				disabledRadioChecked: '/static/img/form/radio_light_on.gif',
				disabledRadioUnchecked: '/static/img/form/radio_light_off.gif',
				checkboxChecked: '/static/img/form/checkbox_dark_form_on.gif',
				checkboxUnchecked: '/static/img/form/checkbox_dark_form_off.gif',
				disabledCheckboxChecked: '/static/img/form/graylight_checkbox1.gif',
				disabledCheckboxUnchecked: '/static/img/form/graylight_checkbox.gif',
				selectDisabledClass: 'dropdowngray'
			},
		results_header : {
				checkboxChecked: '/static/img/form/checkbox_dark_form_on.gif',
				checkboxUnchecked: '/static/img/form/checkbox_dark_form_off.gif'
		},
		/* Listaw wyników hotelowych */
		hotel_results : {
			layerAnchorClass: 'layer',
			layerContentClass: 'hotelLayer',
			layerLoaderClass: 'backgroundformloader',
			layerBackgroundClass: 'background2',
			layerOnShow: function() {
			
			},
			layerOnLoad: function() {
				var tab = this.httpRequest.location.hash.split('#')[1];
				$(tab).onclick();
			},
			layerCloseClass: 'close'
		}
}
