/*
function zur_suche(showresult)
{
    window.location.href=uebergabe_hotel+'&showresult='+showresult;
}
function s_hliste(kenner_id,nurflug)
{
    parts=regionen_2[kenner_id].split('|');
    detail=(nurflug==1)?'termine':'hotel';
    window.location.href=uebergabe_hotel+'&zielgebiets_kenner='+parts[2]+'&detail='+detail+'&showresult=1';
}
*/
function zur_suche(showresult) {
	qs.submitQuickSearch('');
}
function s_hliste(kenner_id,nurflug) {
    //var parts = regionList[kenner_id].split('|');
	 var parts = regionen_2[kenner_id].split('|');
    
    function getFD(fd){
        for (var n=0; n<qs.reg_array.length; n++){
            if (qs.reg_array[n][1]==fd) return qs.reg_array[n][2];
        }
    }
    f.setElementValue( 'sortedRegions', getFD(parts[2]) + '|' + parts[2] );
    qs.onChangeRegionSelector( f.getElementByName('sortedRegions').value );
    
    //qs.submitQuickSearch((nurflug==1)?'termine':'hotel')
}

function s_liste_tabelle(nurflug,pfad_images)
{
    var str_glhotelTitel="";
    for(i=0;i<regionen_2.length;i++)
    {
        parts_2=regionen_2[i].split("|");

       if(parts_2[2]>=10000) str_glhotelTitel="";
       if(parts_2[2]==10032){
           str_glhotelTitel='title="Nazwa hotelu zostanie Pa&#x0144;stwu podana po przybyciu na miejsce podr&#x00F3;&#x017C;y."';
       }

        if(parts_2[4]==''){
            document.write('<tr>');
            document.write('<td class="regtab2td regtab2tdreg" colspan="3">');
            if(nurflug!=1){
                document.write('<a href="javascript:s_hliste('+i+',0);" class="reglreg" '+str_glhotelTitel+'>'+parts_2[0]+'</a>');
            }
            else {
                document.write(parts_2[0]);
            }
            document.write('</td>');
            document.write('</tr>');
        }
        else{
            document.write('<tr>');
            document.write('<td class="regtab2td regtab2tdziel">');
            document.write('<a href="javascript:oHIB(\'\',\''+parts_2[3]+'\',\''+parts_2[3]+'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'region\');"><img src="'+pfad_images+'/info.gif" border="0" align="absmiddle" class="reginfo" alt="Wywo&#x0142;uje informacje o kraju w tym rejonie."></a>');
            document.write('<a href="javascript:s_hliste('+i+','+nurflug+');" class="reglziel" '+str_glhotelTitel+'>'+parts_2[0]+'</a>');
            document.write('</td>');
            document.write('<td class="regtab2td regtab2tdziel">');
            np=String(parseInt(parts_2[1]/5)*5);
            if(np<80)np=0;
            document.write('<img src="'+pfad_images+'/'+np+'.gif" alt="" border="0">');
            document.write('</td>');
            document.write('<td class="regtab2td regtab2tdziel" align="right">');
            document.write('<a href="javascript:s_hliste('+i+','+nurflug+');" class="reglpreis">od '+ConvertPriceValues(parts_2[4],RecalculationType,'EUR')+'</a>');
            document.write('</td>');
            document.write('</tr>');
        }
    }
}

// Konfigurajca HIB : START
function makePlaceForHIB(el) {
	// utworzenie struktury nowgo hib względem elementu kliknietego el
	var parentDIV = el;
	parentDIV = parentDIV.parentNode;
	$(parentDIV).after('<div class="tt_clear tt_hib" style=""></div>');
	return {main: $(parentDIV.nextSibling), remove: $(parentDIV.nextSibling)};
}

function drawFrame(el) {
	// utworzenie ramki wokół dziadka elementu kliknietego el
	var parentDIV = el;
	parentDIV = parentDIV.parentNode;
	$(parentDIV.parentNode).removeClass('tt_regionElement');
	$(parentDIV.parentNode).addClass('tt_regionElementActive');
}

// nadpisanie hib_core.js : START
hib.config.starImage = "/kunden_parameter/allewakacje/ibe_v2/images/sterne/1_stern.gif";
hib.config.starHalfImage = "/kunden_parameter/allewakacje/ibe_v2/images/sterne/stern_halb.gif";
hib.config.loadingAnimationHTML = '<div class="" style="text-align: center;"><img src="/kunden_parameter/allewakacje/ibe_v2/images/hib/ajax_loader.gif" alt="" class="varHeight"></div>';
hib.config.structureHTML = '<div id="menu" class="tt_floatLeft tt_hibLeftMenu"></div><div id="content" class="tt_floatRight tt_hibRightContent"></div><div class="tt_clear"></div><div id="" class="tt_floatRight tt_hibClose" style="" onclick="hib.hideCurrentBox();">zwiń opis</div><div class="tt_clear"></div>';
hib.pfadImages = "/kunden_parameter/allewakacje/ibe_v2/images/";
//hib.config.connector = "inc/hib_connect.php";
hib.config.displayModeForSlideShow = "fitParentHeightWidth";

hib.show_old=hib.show;
hib.show = function( params ) {
	hib.show_old( params );
	$(params.elements.main[0].parentNode).removeClass('tt_regionElement');
	$(params.elements.main[0].parentNode).addClass('tt_regionElementActive');
}
hib.hideCurrentBox_old = hib.hideCurrentBox;
hib.hideCurrentBox = function(){
	if(!!this.mainElement[0]) {
		$(this.mainElement[0].parentNode).removeClass('tt_regionElementActive');
		$(this.mainElement[0].parentNode).addClass('tt_regionElement');
	}
	hib.hideCurrentBox_old();
}

/*
hib.show = function( params ) {
	// zamykanie HIB jeżeli jest otwarty
	if (this.mainElement && !params.replace) {
		if (this.isNewHIB( params, this.parameters )) {
			// otwarty już jest ten sam HIB
			if (params.elements.remove) $(params.elements.remove).remove();
			this.hideCurrentBox();
			return
		} else {
			// HIB jest już otwarty, ale to nie ten sam
			this.hideCurrentBox();
		}
	}
	
	// jeżeli są wymagane parametry...
	if (params.elements) {
		this.mainElement = params.elements.main;
		this.elementToRemove = params.elements.remove;
	}
	
	$(this.mainElement[0].parentNode).removeClass('tt_regionElement');
	$(this.mainElement[0].parentNode).addClass('tt_regionElementActive');
	
	this.currentView = (params.view)?params.view:null;
	this.currentRefID = (params.ref_id)?params.ref_id:null;
	this.currentIFF = (params.iff)?params.iff:null;
	this.currentVA = (params.va)?params.va:null;
	this.currentAirport = (params.airport)?params.airport:null;
	this.currentWeatherAirport = (params.weatherAirport)?params.weatherAirport:null;
	this.parameters = params;
	
	if (this.afterInit==false) this.showLoadingAnimation();
	if (this.afterInit==false && params.onWSFailure) {
		setTimeout(this.onWSFailure,params.onWSFailure)
	}
	//this.clearContent();
	this.getDataForContent();
}

hib.hideCurrentBox = function(){
	if(!!this.mainElement[0]) {
		$(this.mainElement[0].parentNode).removeClass('tt_regionElementActive');
		$(this.mainElement[0].parentNode).addClass('tt_regionElement');
		
		$(this.mainElement).data('remove',hib.elementToRemove).slideUp('slow',function(){
			// po zwinięciu usuwamy box ze struktury
			$(this).data('remove').remove();
			
		});
		this.mainElement = false;
		this.elementToRemove = false;
		this.parameters={};
		this.afterInit = false;
		this.currentDataNode = false;
		this.currentPois = false;
		this.currentHPoiRefID = false;
		this.hasArealImages = false;
		this.hasPanoramas = false;
		this.hasPictures = false;
	}
}
*/
// nadpisanie hib_core.js : STOP
// nadpisanie hib_templates.js : START

// nadpisanie hib_templates.js : STOP
// Konfigurajca HIB : STOP


