var oHead = document.getElementsByTagName('head')[0]; var searchResults = null; function getScript(name,callback_function){ if(oHead!==undefined){ var oScript = document.createElement('script'); oScript.setAttribute('src',name); oScript.setAttribute('type','text/javascript'); var loadFunction = function() {if (this!==undefined && this!==null){ if (this.readyState !== undefined) { if (this.readyState == 'complete' || this.readyState == 'loaded') { if (callback_function!==undefined){ callback_function(); } } } } }; oScript.onreadystatechange = loadFunction; oScript.onload = callback_function; oHead.appendChild(oScript); } } if(typeof String.prototype.trim !== 'function') { String.prototype.trim = function() { return this.replace(/^\s+|\s+jQuery/g, ''); } } var goBack = function(){ //jQuery.history.load(historyToken); history.back(-1); } var performSearchPopup = null; var oldToken = null; var datePreset = false; var historyToken = null; var min_map = null; var automatic_date_search = false; var siteoverride = null; var external = false; var pageload = null; var mainPopupstatus=0; var openMainPopup = null; function getCSS(name){ var fileref=document.createElement("link"); fileref.setAttribute("rel", "stylesheet"); fileref.setAttribute("type", "text/css"); fileref.setAttribute("href", name); oHead.appendChild(fileref); } getCSS('http://res.synthense.pl//media/css/custom_SARMATA1.css'); if (siteoverride!=null){ getCSS('http://res.synthense.pl//media/css/custom_'+siteoverride+'.css'); } function extraLoad(){ jQuery("embed,object").hide(); } function extraClose(){ jQuery("embed,object").show(); } var popupStatus = 0; var currentPopup = null; var currentBackground = null; var disablePopup = function disablePopup(mainId,backgroundId ){ if(popupStatus==1){ //extraClose(); currentBackground.fadeOut("fast"); currentPopup.fadeOut("fast",function(){ if (currentPopup!=null) currentPopup.css({ "width": ""}); }); if (jQuery.browser.msie){ jQuery('select').css({'visibility':'visible'}); } popupStatus = 0; } }; var loadPopup = function loadPopup(mainId, backgroundId){ if (mainId===undefined){ mainId = 'popupContact'; backgroundId = 'backgroundPopup'; } extraLoad(); currentPopup = jQuery("#"+mainId ); currentBackground = jQuery("#"+backgroundId); var zindex= parseInt(jQuery('#contentHotelInPopup').css('z-index')); currentPopup.css('z-index',zindex+2); currentBackground.css('z-index',zindex+1); if(popupStatus===0){ currentBackground.css({ "opacity": "0.95" }); currentBackground.fadeIn("fast"); currentPopup.fadeIn("fast"); if (jQuery.browser.msie){ jQuery('select').not('#id_currency_popup').not('#'+mainId).css({'visibility':'hidden'}); jQuery('#contentHotelInPopup select, .ui-widget select').css({'visibility':'visible'}); } popupStatus = 1; } }; var centerPopup = function centerPopup(mainId,backgroundId ){ if (mainId ===undefined){ mainId = 'popupContact'; backgroundId = 'backgroundPopup'; } var win = jQuery(window); var popup = jQuery("#"+mainId); var addLeft = 0; if (popup.css('position')=='absolute'){ var addTop = win.scrollTop(); } else{ addTop = 0; } var windowWidth = win.width(); var windowHeight = win.height(); var popupHeight = popup.height(); var popupWidth = popup.width(); if (mainId=='contentHotelInPopup'){ popup .css({"top": windowHeight/2-popupHeight/2-10+addTop,"left": windowWidth/2-popupWidth/2-addLeft}); } else{ popup .css({"top": win.scrollTop()+windowHeight/2-popupHeight/2,"left": win.scrollLeft()+windowWidth/2-popupWidth/2-addLeft}); } jQuery("#"+backgroundId ).css({ 'height':jQuery(window).height()+'px','top':addTop }); if (jQuery.browser.msie){ if (backgroundId!='backgroundcontentHotelInPopup'){ jQuery("#"+backgroundId ).css({'width':windowWidth+'px','top':addTop,'left':'0px'}); } } }; var applyNoConflict = true; function readystateCallFunc(){ if (applyNoConflict) jQuery.noConflict(); jQuery(document).ready(function(){ if (jQuery('#searchBox').length==0){ jQuery("body").append(''); min_map = {1:'default',2:[new Date(2011,3,28),new Date(2011,4,2)]}; setSynthRezer = function(d1,d2,lo){ try { if (d1!='undefined'){ var startDate = jQuery.datepicker.parseDate('d-m-yy',d1); var today = new Date(); if (startDate4) loInt=4; jQuery('#id_people, #id_people_popup').attr('value',loInt); } else{ jQuery('#id_people, #id_people_popup').attr('value',0); } } catch(err) {} performSearchStart(null); } } if (jQuery.browser.msie){ getCSS('http://www.res.synthense.pl/media/css/searchPage.css'); getCSS('http://www.res.synthense.pl/media/css/searchresult-ie.css'); if (jQuery.browser.version.charAt(0)=='6'){ getCSS('http://www.res.synthense.pl/media/css/searchresult-ie6.css'); } } function afterLoad(){ if (mainPopupstatus==0){ performSearchPopup = function(){ var hotel_choices = jQuery('#id_hotel_choices_popup'); if (hotel_choices.length===0){ var hotel = '0'; } else{ var hotel = jQuery('#id_hotel_choices_popup > option:selected')[0].value; } var startDate = jQuery('#id_start_date_popup').attr('value'); var endDate = jQuery('#id_end_date_popup').attr('value'); var currency = jQuery('#id_currency_popup').attr('value'); var people = jQuery('#id_people_popup option:selected').attr('value'); var token = "search/"+startDate+"/"+endDate+"/"+hotel+"/"+currency+"/"+people; jQuery.history.load(token); } jQuery('#idSearchButton_popup').click(function(e) { performSearchPopup(); }); jQuery('#idSearchEventButton_popup').click(function(e) { var categories = jQuery('#id_category_popup'); if (categories.length===0){ var category = '0'; } else{ var category = jQuery('#id_category_popup > option:selected')[0].value; } var startDate = jQuery('#id_start_date_event_popup').attr('value'); var endDate = jQuery('#id_end_date_event_popup').attr('value'); var token = "eventSearch/"+startDate+"/"+endDate+"/"+category; jQuery.history.load(token); }); jQuery('#idRetrieveButton_popup').click(function(e) { var rc = jQuery('#recLoc_popup').attr('value'); var ln = jQuery('#lastName_popup').attr('value'); var token = "retrieve/"+rc+"/"+ln; jQuery.history.load(token); }); openMainPopup(); } } jQuery('#whiteBackgroundPopup').remove(); jQuery('body').append('
 
'); jQuery('#backgroundPopup').remove(); jQuery('body').append(''); jQuery('#popupContact').remove(); jQuery('body').append(''); jQuery('#popupCondition').remove(); jQuery('body').append(''); jQuery('#loadingPopup').remove(); jQuery('body').append(''); jQuery('#contentHotelInPopup').remove(); jQuery('body').append(''); jQuery('#backgroundcontentHotelInPopup').remove(); jQuery('body').append(''); jQuery('#popupContactClose').click(function(){ disablePopup('popupContact','backgroundPopup'); }); jQuery('#popupChoosePaymentClose').click(function(){ disablePopup('popupChoosePaymentClose','backgroundPopup'); }); openMainPopup = function(){ if (typeof(customMainPopupOpen)!=='undefined'){ customMainPopupOpen(); } extraLoad(); var bck = jQuery('#backgroundcontentHotelInPopup'); var main = jQuery('#contentHotelInPopup'); bck.css({ "opacity": "0.95" }); if (jQuery.browser.msie){ jQuery('select').not('#id_currency_popup').not('#id_people_popup').css({'visibility':'hidden'}); jQuery('select.roomNumberSelect').show().css('visibility','visible'); } mainPopupstatus= 1; var windowHeight = jQuery(window).height(); main.width(810); main.height(parseInt(0.88*windowHeight)); jQuery('#backgroundcontentHotelInPopup').height(jQuery(window).height()); bck.fadeIn("fast"); main.fadeIn("fast"); var window_width = jQuery(window).width(); if (window_width>800){ centerPopup('contentHotelInPopup','backgroundcontentHotelInPopup'); jQuery("body").css("overflow", "hidden"); } else{ jQuery("body").css("overflow-y", "hidden"); jQuery('#contentHotelInPopup').css('position','absolute'); } } jQuery(window).resize(function() { if (mainPopupstatus==1){ openMainPopup(); } //centerPopup('contentHotelInPopup','backgroundcontentHotelInPopup'); }); jQuery("#contentHotelInPopupClose").click(function(){ if (typeof(customMainPopupClose)!=='undefined'){ customMainPopupClose(); } extraClose(); jQuery('#backgroundcontentHotelInPopup').fadeOut("fast"); jQuery('#contentHotelInPopup').fadeOut("fast",function(){ if (currentPopup!=null) currentPopup.css({ "width": ""}); }); if (jQuery.browser.msie){ jQuery('select').css({'visibility':'visible'}); } mainPopupstatus=0; jQuery("body").css("overflow", "auto"); jQuery.history.load('close'); }); jQuery('#searchBox')[0].innerHTML = '
Przyjazd
Wyjazd
Liczba osób
'; jQuery("#id_hotel_choices option:first").remove(); var initialLoad = true; String.prototype.startsWith = function(str){ try{ return (this.match("^"+str)==str); } catch(e){ return false; } }; jQuery.getScriptCache = function(url, callback, cache){ var siteInfo = 'site=SARMATA1'; if (url.indexOf('site=')<0){ url+='&'+siteInfo; } if (siteoverride!=null){ if (url.indexOf('siteoverride=')<0){ url+='&siteoverride='+siteoverride; } } url+='&sessionid=84dbf41feac06693e5bf07a8e94150a0'; var updated_callback = function(){ if (typeof(callback)=='function') callback(); jQuery("embed,object").hide(); } jQuery.ajax({ type: "GET", url: url, success: updated_callback, dataType: "script", cache: cache }); }; Date.format = 'yyyy-mm-dd'; getScript("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js",function(){ jQuery('#contentHotelInPopup').append('
This
'); if(jQuery.browser.msie && jQuery.browser.version.charAt(0)=='6'){ if (jQuery("#accordion").length>0){ jQuery(jQuery("#accordion").children()[2]).remove(); jQuery("#retrieveForm").remove(); } } jQuery('#accordion').css({'display':'block'}); jQuery("#accordion").accordion({ icons: { header:"ui-icon-circle-arrow-e", headerSelected:"ui-icon-circle-arrow-s" }, autoHeight: false, clearStyle: true }); if(jQuery.browser.msie && jQuery.browser.version.charAt(0)=='6'){ jQuery(jQuery("#accordion_popup").children()[2]).remove(); jQuery("#retrieveFormPopup").remove(); } jQuery('#accordion_popup').css({'display':'block'}); jQuery("#accordion_popup").accordion({ icons: { header:"ui-icon-circle-arrow-e", headerSelected:"ui-icon-circle-arrow-s" }, autoHeight: false, clearStyle: true }); (function(jQuery){var locationWrapper={put:function(hash,win){(win||window).location.hash=this.encoder(hash)},get:function(win){var hash=((win||window).location.hash).replace(/^#/,'');try{return jQuery.browser.mozilla?hash:decodeURIComponent(hash)}catch(error){return hash}},encoder:encodeURIComponent};var iframeWrapper={id:"__jQuery_history",init:function(){var html='