function s_hliste(zk,nurflug){
    var thisdetail=(nurflug==1)?'termine':'hotel';
    window.location.href=t3url+uebergabe_hotel+'&zielgebiets_kenner='+zk+'&detail='+thisdetail+'&showresult=1';
}

//_______________________________________________________________________________

function zur_suche(showresult){
    if (uebergabe_suchestart) {
        window.location.href=t3url+uebergabe_suchestart+'&showresult='+showresult;
    }
    else {
        window.location.href=t3url+uebergabe_hotel+'&showresult='+showresult;
    }
}

//_______________________________________________________________________________

function s_liste_tabelle(nurflug)
{    
    var thisdetail=(nurflug==1)?'termine':'hotel';
    var linienchecker = 0; //zähler für zwischenlinien
    var regionen_alt = new Array();
    var co=0;
    var str_glhotelTitel = "";
    var thisHTML = '';
    
    //keine 100%igen gefunden
    if(regionen_2.length <= 0) {
        thisHTML+= '<table cellspacing="0" cellpadding="0" border="0" class="tt_ibeTab"><tr>';
        thisHTML+= '<td class="tt_padAll2 tt_fontA1b tt_colBorL tt_colBorR">Zu Ihren Wünschen können wir Ihnen leider keine Angebote od. Alternativen vorschlagen.</td>';
        thisHTML+= '</tr></table>';
    }
    
    // --- Toptreffer Header
    if(n_ctop>0){    
        //Header: Angebote 100%
        thisHTML+= '<table cellspacing="0" cellpadding="0" border="0" class="tt_ibeTab"><tr>';
        thisHTML+= '<td class="tt_topRow tt_fontA1b">Angebote, die zu 100% Ihren Suchkriterien entsprechen</td>';
        thisHTML+= '</tr></table>';
        thisHTML+= '<table cellspacing="0" cellpadding="0" border="0" class="tt_regBgHead">';             
        thisHTML+= '<tr><td colspan="3" class="tt_reg_split"><img src="'+pfad_images+'/spacer.gif" width="1" height="1" alt="" border="0"></td></tr>';           
        thisHTML+= '<tr>';         
        thisHTML+= '    <td class="tt_reg_colA tt_colBorL">';
        thisHTML+= '    <p class="tt_reg_col_header tt_fontF1 tt_padleft40">Region</p>';
        thisHTML+= '    </td>';         
        thisHTML+= '    <td class="tt_reg_colB" align="center">';
        thisHTML+= '    <p class="tt_reg_col_header tt_fontF1" title="Temperaturen sind Durchschnittswerte des jeweiligen Reisemonats">Reisewetter *</p>';
        thisHTML+= '    </td>';
        thisHTML+= '    <td class="tt_reg_colC tt_colBorR">';
        thisHTML+= '    <p class="tt_reg_col_header tt_fontF1 tt_padright4" align="right">Preis pro Person</p>';
        thisHTML+= '    </td>';
        thisHTML+= '</tr></table>';         
    }
 
    var irt=0;
    for(i=0;i<regionen_2.length;i++)
    {
        parts_2=regionen_2[i].split("#");
        
        if(parts_2[1] >= 10000) {
            str_glhotelTitel = "";
        }
        if(parts_2[1] == 10032){
            str_glhotelTitel = 'title="Der Hotelname wird Ihnen nach Ankunft im Zielgebiet mitgeteilt"';
        }

        //---array fuer alternativen anlegen
        if((parts_2[6]==1 || parts_2[6]==2) && n_calt!=0){
            var tmp = new Array(regionen_2[i]);
            regionen_alt = regionen_alt.concat(tmp);
        }

        //---Region fuer top treffer sichern
        if(parts_2[3]==''){
            var tmpzg = new Array(regionen_2[i]);
            co=1;
        }

        //---Ausgabe der top treffer
        if(parts_2[6]==0){
            if(co==1){
                tmp=String(tmpzg);
                parts_2=tmp.split("#") ;
                co=0;
                i--;
            }
            //Ausgabe der Region
            if(parts_2[3]==''){ 
                linienchecker = 0;                 
                var newRegionGross = parts_2[0].toUpperCase();
                
                thisHTML+= '<table class="tt_ibeTab" cellpadding="0" cellspacing="0" border="0"><tr>';
                if (irt == 0)
                    thisHTML+= '    <td class="tt_padtop3 tt_colBorL tt_colBorR">';
                else
                    thisHTML+= '    <td class="tt_padtop4 tt_colBorL tt_colBorR">';  
                if(nurflug!=1 && parts_2[1] < 40000){
                    thisHTML+= '<a class="tt_aufrufregion tt_padleft2" href="javascript:void(0);" onClick="s_hliste('+parts_2[1]+');return false;" '+str_glhotelTitel+'>'+newRegionGross+'</a>';
                }
                else{
                    thisHTML+= '<p class="tt_fontE2b tt_padleft2">'+newRegionGross+'</p>';
                }
                thisHTML+= '    </td>';                      
                thisHTML+= '</tr></table>'; 
                   
                irt=1;             
            }
            //Ausgabe der Zielgebiete in der Region
            else{
                thisHTML+= '<table class="tt_ibeTab" cellpadding="0" cellspacing="0" border="0">';
                if (linienchecker == 0){
                    thisHTML+= '<tr><td colspan="3" class="tt_reg_split"><img src="'+pfad_images+'/spacer.gif" width="1" height="1" alt="" border="0"></td></tr>';
                }
                thisHTML+= '<tr class="tt_reg_bgTop" onMouseOver="this.className=\'tt_reg_bgHig\'" onMouseOut="this.className=\'tt_reg_bgTop\'"><td class="tt_reg_colA tt_colBorL">';
                thisHTML+= '    <p class="tt_regLine tt_padleft40">';
                thisHTML+= '    <a style="margin-right:10px;" href="javascript:void(0);" onClick="oHIB(\'\',\''+parts_2[3]+'\',\''+parts_2[3]+'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'region\',\'\',\'\',\'\',\''+engine+'\',\'\',\'\',\'\',\'\',\'\',\'\',\''+nurflug+'\');return false;"><img src="'+pfad_images+'/info.gif" alt="Regioninfos" title="Regioninfos" border="0" align="absmiddle"></a>';
                thisHTML+= '    <a class="tt_aufrufziel" href="javascript:void(0);" onClick="s_hliste('+parts_2[1]+');return false;" '+str_glhotelTitel+'>'+parts_2[0]+'</a>';
                thisHTML+= '    </p>';
                thisHTML+= '    </td>';                                 
                thisHTML+= '    <td class="tt_reg_colB" align="center">';                
                thisHTML+= '    <table cellspacing="0" cellpadding="0" border="0" width="110"><tr><td nowrap align="left" class="tt_fontD1">';
                if(parts_2[7]!=""){
                    thisHTML+= '    <img src="'+pfad_images+'/sun.gif" alt="Lufttemperatur" title="Lufttemperatur" border="0" align="absmiddle" hspace="2">'+parts_2[7]+'&deg;C&nbsp;';
                }
                if(parts_2[8]!=""){
                    thisHTML+= '    <img src="'+pfad_images+'/wasser.gif" alt="Wassertemperatur" title="Wassertemperatur" border="0" align="absmiddle" hspace="2">'+parts_2[8]+'&deg;C';
                }
                thisHTML+= '    </td></tr></table>';                  
                thisHTML+= '    </td>';                            
                thisHTML+= '    <td class="tt_reg_colC tt_colBorR" align="right">';
                thisHTML+= '    <p class="tt_padright4 tt_regLine">';
                thisHTML+= '    <span class="tt_fontB2">ab &euro;&nbsp;&nbsp;</span><a class="tt_reglpreis" href="javascript:void(0);" onClick="s_hliste('+parts_2[1]+');return false;">'+parts_2[4]+',-</a></td>';
                thisHTML+= '    </p>';
                thisHTML+= '    </td>';
                thisHTML+= '</tr>';               
                thisHTML+= '<tr><td colspan="3" class="tt_reg_split"><img src="'+pfad_images+'/spacer.gif" width="1" height="1" alt="" border="0"></td></tr>';
                thisHTML+= '</table>';
                
                document.write(thisHTML); 
                thisHTML = '';
                
                linienchecker++;
            }
            
        }//top treffer ausgabe
        
    }//for

    if(n_ctop==0){
        thisHTML+= '<table cellspacing="0" cellpadding="0" border="0" class="tt_ibeTab"><tr>';
        thisHTML+= '<td class="tt_padAll2 tt_fontA1b tt_colBorL tt_colBorR">Es konnten keine Angebote gefunden werden, die zu 100% mit Ihren Wünschen übereinstimmen.</td>';
        thisHTML+= '</tr></table>';     
    }
    else{
        thisHTML+= '<table cellspacing="0" cellpadding="0" border="0" class="tt_ibeTab">';
        thisHTML+= '<tr><td class="tt_colBorL tt_colBorR"><img src="'+pfad_images+'/spacer.gif" width="1" height="10" alt="" border="0"></td></tr>';
        thisHTML+= '<tr><td style="height:10px;"><img src="'+pfad_images+'/end_angebote.gif" width="730" height="10" alt="" border="0"></td></tr>';
        thisHTML+= '</table>';
    }      
    
    //---------------------------------------------------------------------------
    //-------------------wenn es alternative treffer gibt------------------------
    if(n_calt>0){            
        var marToTops = '';
        if(n_ctop > 0){
            marToTops = ' tt_martop2';    
        }
        
        //Header: Alt. Angebote
        thisHTML+= '<table cellspacing="0" cellpadding="0" border="0" class="tt_ibeTab'+marToTops+'">';
        thisHTML+= '<tr><td style="height:10px;"><img src="'+pfad_images+'/head_alternativen.gif" width="730" height="10" alt="" border="0"></td></tr>';
        thisHTML+= '<tr><td class="tt_topRow tt_fontA1b">Echte Alternativen zu Ihren Wünschen</td></tr>';
        thisHTML+= '</table>';
        thisHTML+= '<table cellspacing="0" cellpadding="0" border="0" class="tt_regBgHeadAlt">';             
        thisHTML+= '<tr><td colspan="3" class="tt_reg_split"><img src="'+pfad_images+'/spacer.gif" width="1" height="1" alt="" border="0"></td></tr>';           
        thisHTML+= '<tr>';         
        thisHTML+= '    <td class="tt_reg_colA tt_colBorL">';
        thisHTML+= '    <p class="tt_reg_col_header tt_fontF1 tt_padleft40">Region</p>';
        thisHTML+= '    </td>';         
        thisHTML+= '    <td class="tt_reg_colB" align="center">';
        thisHTML+= '    <p class="tt_reg_col_header tt_fontF1" title="Temperaturen sind Durchschnittswerte des jeweiligen Reisemonats">Reisewetter *</p>';
        thisHTML+= '    </td>';
        thisHTML+= '    <td class="tt_reg_colC tt_colBorR">';
        thisHTML+= '    <p class="tt_reg_col_header tt_fontF1 tt_padright4" align="right">Preis pro Person</p>';
        thisHTML+= '    </td>';
        thisHTML+= '</tr></table>';

        var tr=0;
        linienchecker = 0;
        
        for(i=0;i<regionen_alt.length;i++)
        {
            parts_2=regionen_alt[i].split("#");             
            
            if(parts_2[1] >= 10000) {
                str_glhotelTitel = "";
            }
            if(parts_2[1] == 10032){
                str_glhotelTitel = 'title="Der Hotelname wird Ihnen nach Ankunft im Zielgebiet mitgeteilt"';
            }

            //---Region
            if(parts_2[3]==''){
                var tmpzg = new Array(regionen_alt[i]);
                co=1;
            }
            //---Ausgabe der alternativen
            if(parts_2[6]==1){
                if(co==1){
                    tmp=String(tmpzg);
                    parts_2=tmp.split("#") ;
                    co=0;
                    i--;
                }
                //Ausgabe der Region
                if(parts_2[3]==''){                        
                    linienchecker = 0;
                    var newRegionGross = parts_2[0].toUpperCase();                     
                    thisHTML+= '<table class="tt_ibeTab" cellpadding="0" cellspacing="0" border="0"><tr>';
                    if (tr == 0)
                        thisHTML+= '    <td class="tt_padtop3 tt_colBgLow tt_colBorL tt_colBorR">';
                    else
                        thisHTML+= '    <td class="tt_padtop4 tt_colBgLow tt_colBorL tt_colBorR">';
                    if(nurflug!=1 && parts_2[1] < 40000){
                        thisHTML+= '<a class="tt_aufrufregionALT tt_padleft2" href="javascript:void(0);" onClick="s_hliste('+parts_2[1]+');return false;" '+str_glhotelTitel+'>'+newRegionGross+'</a>';
                    }
                    else{
                        thisHTML+= '<p class="tt_fontE2b tt_padleft2">'+newRegionGross+'</p>';
                    }  
                    thisHTML+= '    </td>';                      
                    thisHTML+= '</tr></table>';
                    tr=1;
                }
                //Ausgabe der Zielgebiete in der Region
                else{
                         
                    thisHTML+= '<table class="tt_ibeTab" cellpadding="0" cellspacing="0" border="0">';
                    if (linienchecker == 0){
                        thisHTML+= '<tr><td colspan="3" class="tt_reg_split"><img src="'+pfad_images+'/spacer.gif" width="1" height="1" alt="" border="0"></td></tr>';
                    }
                    thisHTML+= '<tr class="tt_reg_bgAlt" onMouseOver="this.className=\'tt_reg_bgHig\'" onMouseOut="this.className=\'tt_reg_bgAlt\'"><td class="tt_reg_colA tt_colBorL">';
                    thisHTML+= '    <p class="tt_regLine tt_padleft40">';
                    thisHTML+= '    <a style="margin-right:10px;" href="javascript:void(0);" onClick="oHIB(\'\',\''+parts_2[3]+'\',\''+parts_2[3]+'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'region\',\'\',\'\',\'\',\''+engine+'\',\'\',\'\',\'\',\'\',\'\',\'\',\''+nurflug+'\');return false;"><img src="'+pfad_images+'/info.gif" alt="Regioninfos" title="Regioninfos" border="0" align="absmiddle"></a>';
                    thisHTML+= '    <a class="tt_aufrufzielALT" href="javascript:void(0);" onClick="s_hliste('+parts_2[1]+');return false;" '+str_glhotelTitel+'>'+parts_2[0]+'</a>';
                    thisHTML+= '    </p>';
                    thisHTML+= '    </td>';                                 
                    thisHTML+= '    <td class="tt_reg_colB" align="center">';                    
                    thisHTML+= '    <table cellspacing="0" cellpadding="0" border="0" width="110"><tr><td nowrap align="left" class="tt_fontD1">';
                    if(parts_2[7]!=""){
                        thisHTML+= '    <img src="'+pfad_images+'/sun.gif" alt="Lufttemperatur" title="Lufttemperatur" border="0" align="absmiddle" hspace="2">'+parts_2[7]+'&deg;C&nbsp;';
                    }
                    if(parts_2[8]!=""){
                        thisHTML+= '    <img src="'+pfad_images+'/wasser.gif" alt="Wassertemperatur" title="Wassertemperatur" border="0" align="absmiddle" hspace="2">'+parts_2[8]+'&deg;C';
                    }
                    thisHTML+= '    </td></tr></table>';                     
                    thisHTML+= '    </td>';                            
                    thisHTML+= '    <td class="tt_reg_colC tt_colBorR" align="right">';
                    thisHTML+= '    <p class="tt_padright4 tt_regLine">';
                    thisHTML+= '    <span class="tt_fontB2">ab &euro;&nbsp;&nbsp;</span><a class="tt_reglpreis" href="javascript:void(0);" onClick="s_hliste('+parts_2[1]+');return false;">'+parts_2[4]+',-</a></td>';
                    thisHTML+= '    </p>';
                    thisHTML+= '    </td>';
                    thisHTML+= '</tr>';               
                    thisHTML+= '<tr><td colspan="3" class="tt_reg_split"><img src="'+pfad_images+'/spacer.gif" width="1" height="1" alt="" border="0"></td></tr>';
                    thisHTML+= '</table>';                      
                    
                    document.write(thisHTML); 
                    thisHTML = '';  
                    
                    linienchecker ++;                                    
                }
                                    
            }//alternativen ausgabe  
            
        }//for  
        
        thisHTML+= '<table cellspacing="0" cellpadding="0" border="0" class="tt_ibeTab">';
        thisHTML+= '<tr><td class="tt_colBgLow tt_colBorL tt_colBorR"><img src="'+pfad_images+'/spacer.gif" width="1" height="10" alt="" border="0"></td></tr>';
        thisHTML+= '<tr><td style="height:10px;"><img src="'+pfad_images+'/end_alternativen.gif" width="730" height="10" alt="" border="0"></td></tr>';
        thisHTML+= '</table>'; 
            
    }//keine altnativen vorhanden 
    
    if (thisHTML != ''){
        document.write(thisHTML); 
        thisHTML = '';
    }
       
}

function encodeTitle(thetext){
    var title_tmp;
    title_tmp = thetext.replace(/Ä/, "&Auml;");
    title_tmp = title_tmp.replace(/ä/, "&auml;");
    title_tmp = title_tmp.replace(/Ö/, "&Ouml;");
    title_tmp = title_tmp.replace(/ö/, "&ouml;");
    title_tmp = title_tmp.replace(/Ü/, "&Uuml;");
    title_tmp = title_tmp.replace(/ü/, "&uuml;");
    title_tmp = title_tmp.replace(/ß/, "&szlig;");
    title_tmp = title_tmp.replace(/ï/, "&iacute;");
    title_tmp = title_tmp.replace(/ô/, "&ocirc;");
    title_tmp = title_tmp.replace(/Î/, "&Icirc;");
    title_tmp = title_tmp.replace(/'/, "&prime;");
    return title_tmp;
}
