    function zur_suche(showresult){
        window.location.href=uebergabe+'&showresult='+showresult;
    }

    //_____________________________________________________________________

    function zum_zielgebiet(showresult){
        window.location.href=uebergabe+'&detail=zielgebiet&showresult='+showresult;
    }

    //_____________________________________________________________________

    function zum_hotel(showresult,startposition_hotel,zielgebiets_kenner){
        window.location.href=uebergabe+'&detail=hotel&showresult='+showresult+'&startposition='+startposition_hotel+'&zielgebiets_kenner='+zielgebiets_kenner;
    }

    //_____________________________________________________________________

    function skippen(zaehler,sortierung){
        window.location.href=uebergabe+'&startposition='+zaehler+'&sortierung='+sortierung+'&detail=termine'+skip_and_order;
    }

    //_____________________________________________________________________

    function order(sortierung){
        window.location.href=uebergabe+'&sortierung='+sortierung+'&detail=termine&startposition=0'+skip_and_order;
    }

    //_____________________________________________________________________

    var tmp;
    function vakanz_success(strParams){
        if(strParams){
            tmp=strParams;
            setTimeout('vakanz_success()',100);
            if(vak_layer!=1){
                vakanzfenster.close();
            }
        }
        else{
            var form=document.forms['bengine'];
            form.vakanz.value=tmp;
            form.detail.value="buchung";
            if(linksec == 1){
                form.action=sec_cluster_url+"/booking/ibe_tt2/erde/index.php?KID="+KID;
            }
            if(document.getElementById("inhalt"))
                document.getElementById("inhalt").style.visibility = "hidden";
            form.submit();
        }
    }

    //_____________________________________________________________________

    function onlineR(){
        if(document.bengine.refresh.value=='1'){
            alert("Bitte klicken Sie erst auf Angebote aktualisieren!")
            return false;
        }
        return true;
    }

    //_____________________________________________________________________

    function check_eingabe(kk,kk8){
        if(onlineR())
        buchungsanfrage(kk,kk8);
    }

    //_____________________________________________________________________

    function cancel_vak(){
        window.vak.location.href='dummy.html';
        document.getElementById("inhalt").style.visibility = "hidden";
    }

    //_____________________________________________________________________

    function absLeft(el){
        return (el.offsetParent)?
        el.offsetLeft+absLeft(el.offsetParent) : el.offsetLeft;

    //_____________________________________________________________________

    }
    function absTop(el){
        return (el.offsetParent)?
        el.offsetTop+absTop(el.offsetParent) : el.offsetTop;
    }

    //_____________________________________________________________________

    var vakanzfenster;
    function buchungsanfrage(kenner_id){
        if(vak_layer!=1){
            parts=stermin_i[kenner_id].split("%");
            var top=screen.height;
            var left=screen.width;
            posx=((left/2)-200);
            posy=((top/2)-90);
            vakanzfenster = window.open (vakanz+'&Buchungs_ID='+parts[11]+'&hotel_attribut='+parts[6],'checkwindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=180,screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
            vakanzfenster.focus();
        }
        else{
            parts=stermin_i[kenner_id].split("%");
            document.getElementById("inhalt").style.visibility = "visible";
            nX=absLeft(window.document.getElementById('bzpk'));
            nY=(document.body.clientHeight-document.getElementById("inhalt").offsetHeight)/2;
            nY+=document.body.scrollTop;
            document.getElementById("inhalt").style.left = nX+44;
            document.getElementById("inhalt").style.top = nY;
            window.vak.location.href=vakanz+'&Buchungs_ID='+parts[11]+'&hotel_attribut='+parts[6];
        }
    }

    //_____________________________________________________________________

    function vakanz_fail(strError){
        var form=document.forms['bengine'];
        form.vakanz.value='';
        form.strError.value=strError;
        form.detail.value='termine';
        form.submit();
    }

    //_____________________________________________________________________

    function s_termin_tabelle(pfad_images,port){
        if(stermin_i.length<=0){}
        else{
            //---Ausgabe der Ergebnisliste LM und Pauschal-----
            var n_AltFlag=0; var n_TopFlag=0;
            for(i=0;i<stermin_i.length;i++){
                parts_i=stermin_i[i].split("%");
                var alt_point,parts_hotel_attribut="",strVerpflegunglang="";

                va_logo=parts_i[8].split("-");
                if (va_logo[1]) va_bild=KID+'-'+va_logo[0];
                else va_bild=va_logo[0];

                //Verpfelgung ueber hotel_atribut vp;zi;veranstalter;anzahl_personen
                parts_hotel_attribut=parts_i[6].split(";");
                //alttag für Verpflegung setzen
                var ttvf=getvf(parts_hotel_attribut[0]);

                if(parts_i[12]==0){
                    if(n_TopFlag==0){
                        c_strTR="tertab5trres"
                        n_TopFlag=1;
                    }
                }
                else{
                    if(alt_point!=1){
                        c_strTR="tertab5trresALT"
                        document.write('<tr>');
                        document.write('<td colspan="6" class="alttxt">&nbsp;Alternative Reiseangebote, die Ihren Wünschen nahe kommen:</td>');
                        document.write('</tr>');
                        document.write('<tr>');
                        document.write('<td class="tertab5tdtrenner" colspan="6"><img src="/images/spacer.gif" width="1" height="1" border="0" alt=""></td>');
                        document.write('</tr>');
                        alt_point=1;
                    }
                }
                document.write('<tr>');
                //Abreisetag
                document.write('<td class="'+c_strTR+'">&nbsp;'+parts_i[9]);if(parts_i[2]==1){document.write('<img src="'+pfad_images+'/smile_2.gif" alt="" border="0" width="11" height="11" align="absmiddle" hspace="2">'); }document.write('</td>');
                //Dauer
                document.write('<td class="'+c_strTR+'">'+parts_i[0]);if(parts_i[3]==1){document.write('<img src="'+pfad_images+'/smile_2.gif" alt="" border="0" width="11" height="11" align="absmiddle" hspace="2">'); }document.write('</td>');
                //Anbieter
                document.write('<td class="'+c_strTR+'" style="padding:3px 0" align="center">');
                document.write('<img src="'+imgservPfad+'/images/content/va_logos/small/'+va_bild+'.gif" alt="Veranstalter '+parts_i[7]+'" border="0" width="75" height="21" vspace="2"><br>');
                document.write('<a href="javascript:oHIB(\''+IFF+'\',\'Hotelinfobox\',\''+Laender_Ref_ID+'\',\'1\',\''+va_logo[0]+'\',\'\',\''+parts_i[19]+'\',\''+parts_i[16]+'\',\''+va_logo[0]+'\',\''+parts_i[15]+'\',\''+parts_i[17]+'\',\''+parts_i[18]+'\',\''+parts_i[20]+'\',\'termine\',\'\',\'\',\'\',\'erde\');" class="terhinfo">Hotelinfos</a>');
                document.write('</td>');
                //Leistung
                document.write('<td class="'+c_strTR+'"">'+parts_i[14]+'<br>'+ttvf);
                if(parts_i[13]!=""){
                    document.write('<br>'+parts_i[13]);
                }
                if(parts_i[4]==1){
                    document.write('<img src="'+pfad_images+'/smile_2.gif" alt="" border="0" width="11" height="11" align="absmiddle" hspace="2">');
                }
                /*
                if (parts_i[8] == 'AME' && parts_i[21] & 2048 && parts_i[21] & 1024) {
                    document.write('<br>Bahnfahrt 1. Klasse inklusive');
                } else if (parts_i[8] == 'AME' && parts_i[21] & 2048) {
                    document.write('<br>Bahnfahrt 2. Klasse inklusive');
                } else if (parts_i[8] == 'AME' && parts_i[21] & 1024) {
                    document.write('<br>Bahnfahrt zubuchbar');
                }
                */
                //Preis
                document.write('<td class="'+c_strTR+'" align="right">');
                //Schweizer Franken in IBE Basic
                if(ibeCountry==2){
                    //document.write(parts_i[13]+',- &euro;');
                    if(showWaehrung & 1){
                        document.write(parts_i[10]+',-&euro;');if(parts_i[5]==1){document.write('<img src="'+pfad_images+'/smile_2.gif" alt="" border="0" width="11" height="11" align="absmiddle" hspace="2">'); }
                    }
                    if(showWaehrung & 2){
                        if(showWaehrung & 1){
                            document.write('<br>');
                        }
                        if (ibeCurrency == '') {
                            document.write('<span style="font-size:10px;">ca</span> '+Math.ceil(uFaktor*parts_i[10])+'<span style="font-size:10px;">.-CHF</span>');if(parts_i[5]==1){document.write('<img src="'+pfad_images+'/smile_2.gif" alt="" border="0" width="11" height="11" align="absmiddle" hspace="2">'); }                        
                        } else {
                            document.write(parts_i[10]+'.-'+ibeCurrency);if(parts_i[5]==1){document.write('<img src="'+pfad_images+'/smile_2.gif" alt="" border="0" width="11" height="11" align="absmiddle" hspace="2">'); }
                        }                        
                    }
                    if(showWaehrung & 4){
                        if(showWaehrung & 2){
                            document.write('<br>');
                        }
                        document.write(parts_i[10]+',-&euro;');if(parts_i[5]==1){document.write('<img src="'+pfad_images+'/smile_2.gif" alt="" border="0" width="11" height="11" align="absmiddle" hspace="2">'); }
                    }
                }
                else{
                    document.write(parts_i[10]+',- &euro;');if(parts_i[5]==1){document.write('<img src="'+pfad_images+'/smile_2.gif" alt="" border="0" width="11" height="11" align="absmiddle" hspace="2">'); }
                }
                document.write('</td>');
                //document.write('<td class="'+c_strTR+'" align="right">'+parts_i[10]+',- &euro;');if(parts_i[5]==1){document.write('<img src="'+pfad_images+'/smile_2.gif" alt="" border="0" width="11" height="11" align="absmiddle" hspace="2">'); }document.write('</td>');
                //Prüfen
                document.write('<td class="'+c_strTR+'" align="right"><a href="javascript:check_eingabe(\''+i+'\');\" class="terpruefe">prüfen</a>&nbsp;</td>');
                document.write('</tr>');
                if(i!=(stermin_i.length-1)){
                    document.write('<tr>');
                    document.write('<td class="tertab5tdtrenner" colspan="6"><img src="/images/spacer.gif" width="1" height="1" border="0" alt=""></td>');
                    document.write('</tr>');
                }
            }
        }
    }

    //_____________________________________________________________________

    function pageSkip(seiten,apage,sortierung){
        for (t=1;t<=seiten;t++){
            zaehler=(t-1)*20;
            if(t!=apage)
                document.write('<a href="javascript:skippen('+zaehler+',\''+sortierung+'\');" class="pageskip" title="Angebote der Seite '+t+' abrufen">'+t+'</a>&nbsp;&nbsp;');
            else
                document.write('<span class="pageaktive">'+t+'</span>&nbsp;&nbsp;');
        }
    }

    //_____________________________________________________________________

    function showExtraFilter(selName,selSelected,cssClass, arrValues){
        var i,aktValue;
        var strSelected = "";
        document.write('<select id="'+selName+'" name="'+selName+'" class="'+cssClass+'" style="font-weight:normal;" onchange="setzeFilter(this, \''+selName+'\');">');
        document.write('<option value="">beliebig</option>');
        for(i=0;i<arrValues.length;i++){
            aktValue =  arrValues[i].split(";");
            if(selSelected==aktValue[0])
                strSelected = " selected";
            else
                strSelected = "";
            if(selName=='efAbflughafen' && aktValue[2]=='0')
                continue;
            document.write('<option value="'+aktValue[0]+'"'+strSelected+'>'+aktValue[1]+'</option>');
        }
        document.write('</select>');
    }

    //_____________________________________________________________________

    function setzeFilter(Selectbox, Filter){
        var toSet,fValue;
        var selValue = Selectbox.options[Selectbox.selectedIndex].value;
        switch(Filter){
            case 'efAbflughafen':
                toSet  = "abflughafen";
                break;
            case 'efTermine':
                toSet = "termin";
                break;
            case 'efDauer':
                toSet = "dauer";
            break;
        }
        document.getElementsByName(toSet)[0].value=selValue;
        // Wenn expliziter Termin gesetzt wird,
        // => setze rücktermin auf -1
        // => setze Gewichtung für Rücktermin auf "normal" (rute=1)
        // => setze Gewichtung für Termin auf "wichtig" (te_g=2)
        if(toSet=='termin'){
            var selTermin = document.getElementById('efTermine');
            document.getElementsByName('ruecktermin')[0].value = "-1";
            document.getElementsByName('rute_g')[0].value = "1";
            if(selTermin[selTermin.selectedIndex].value!=""){
                document.getElementsByName('te_g')[0].value = "2";
            }else{
                document.getElementsByName('te_g')[0].value = "1";
            }
        }
        document.bengine.submit();
    }
