function zur_suche(){
    window.location.href=uebergabe+'&showresult=2';
}

function zum_zielgebiet(){
    window.location.href=uebergabe+'&detail=zielgebiet&showresult=1';
}

function s_termine(kenner_id){
    part=regionen_2[kenner_id];
    window.location.href=uebergabe+'&IFF='+part[2]+'&zielgebiets_kenner='+part[10]+'&CRS='+part[17]+'&TVA='+part[16]+'&HBit='+part[18]+'&detail=termine&showresult='+part[11]+'&startposition_hotel='+part[12]+'&abpr='+part[1]
}
function skippen(zaehler,sortierung){
    part=regionen_2[0];
    window.location.href=uebergabe+'&sortierung='+sortierung+'&detail=hotel&startposition='+zaehler+'&zielgebiets_kenner='+part[10]+'&showresult='+part[11];
}

function ortsucher(ort,sortierung){
    part=regionen_2[0];
    window.location.href=uebergabe+'&sortierung='+sortierung+'&detail=hotel&startposition=0&zielgebiets_kenner='+part[10]+'&showresult='+part[11]+'&s_ort='+escape(ort);
}

function horder(sortierung)
{
    part=regionen_2[0];
    window.location.href=uebergabe+'&sortierung='+sortierung+'&detail=hotel&startposition=0&zielgebiets_kenner='+part[10]+'&showresult='+part[11];
}

function legende(KID,ornder_name){
    var legwin = window.open('popup_legende.php?KID='+KID+'&ordner_name='+ornder_name,'Legende','width=420,height=250,scrollbars=no,statusbar=false,locationbar=false,toolbar=false');
    legwin.focus();
}

function MakeStars(nStars,pfad_images)
{
    var strStars="";
    while(nStars>0){
        strStars+='<img src="'+pfad_images+'/'+((nStars>5)?'1stern':'stern_halb')+'.gif" border="0">';
        nStars-=10;
    }
    return strStars;
}

function s_hotel_tabelle(pfad_images,nuralt)
{
   var n_AltFlag=0; var n_TopFlag=0;
   var c_strOL,c_strOR,c_strL,c_strM,c_strR,alt_txt,ordner_name;
   ordner_name=pfad_images.split("/");
   if(regionen_2.length <= 0) {}
   else
   {
        for(i=0;i<regionen_2.length;i++)
        {
            parts=regionen_2[i];
            if(parts[9]==0){
                    if(n_TopFlag==0){
                        c_strL="hottdL";
                        c_strUName = "hottdName";
                        c_strOL="hottdOL";
                        c_strOM="hottdOM";
                        c_strOR="hottdOR";
                        c_strRESpacer = "hottdRESpacer";
                        c_rundesEnde = "hottdRundesEnde";
                
                        c_altEnd = "";
                        alt_txt="";
                        n_TopFlag=1;
                    }
            }
            else{
                if(n_AltFlag==0){
                        c_strL="hottdLALT";
                        c_strUName = "hottdNameALT";
                        c_strOL="hottdOLALT";
                        c_strOM="hottdOMALT";
                        c_strOR="hottdORALT";
                        c_strRESpacer = "hottdRESpacerALT";
                        
                        c_rundesEnde = "hottdRundesEndeALT";
                        
                        c_altEnd = "_alt";
                        alt_txt="&nbsp;(alternativ)";
                        if(nuralt!=1){
                            document.write('<tr>');
                            document.write('    <td colspan="4" class="hottab2headALT">');
                            document.write('        Alternative Angebote, die Ihren W&uuml;nschen nahekommen');
                            document.write('    </td>');
                            document.write('</tr>');
                            n_AltFlag=1;
                        }
                    }
            }
            if((i+1==regionen_2.length) || (typeof(regionen_2[i+1]) != 'undefined' && regionen_2[i][9]==0 && regionen_2[i+1][9]==1))
            {
                c_hotEndFlag=1;
            }
            else
            {
                c_hotEndFlag=0;
            }
            if(c_hotEndFlag==1)
            {
                c_strOR_sppad="_specialPad";
            }
            else
            {
                c_strOR_sppad="";
            }
            va_logo=parts[16].split("-");
            if (va_logo[1]) va_bild=KID+'-'+va_logo[0];
            else va_bild=va_logo[0];

            //Hotelbit ausschluesseln
            parts_hbit=parts[18].split(";");

            // --- CRS setzen
            var CRS = parts[17].replace('/','_');

            document.write('<tr>');
            document.write('<td colspan="4" class="tt_hotZeileHead">'+parts[0]+'. Angebot <a href="javascript:void(0);" onclick="javascript:writeToMZ(\'hotel\','+parts[0]+');" class="tt_hotZeileHead">auf den Merkzettel</a></td>');
            document.write('</tr>');
            document.write('<tr>');
            //thumbnail
            document.write('    <td class="'+c_strL+'"><a href="javascript:oHIB(\'\',\''+CRS+'\',\''+parts[3]+'\',\'1\',\''+parts[16]+'\',\'\',\''+parts[4]+'\',\''+parts[13]+'\',\'\',\''+CRS+'\',\'\',\'\',\'\',\'hotel\',\'\',\'\',\'\',\'fewo\');" style="text-decoration:none;" title="Objekt- und Leistungsbeschreibungen aufrufen">');
            np=parts[17].slice(0,1);
            var sOK="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
            chkZ=sOK.indexOf(np.charAt(0))>=0;
            if (!chkZ) verzeichnis="REST";
            else verzeichnis=np;
            bildname=CRS.toLowerCase();
            document.write('<img src="'+imgservPfad+'/images/content/FW_thumbs_'+parts[19]+'_kl/'+parts[16]+'/'+verzeichnis+'/'+bildname+'.jpg" height="65" width="100" alt="Objekt- und Leistungs- beschreibungen abrufen" class="tt_hotel_img" style="margin-right:0px;" />');
            document.write('    </td>');
            //name, sterne,ort,image
                document.write('<td class="'+c_strUName+'">');
                document.write('<p>');
            document.write('<a href="javascript:oHIB(\'\',\''+CRS+'\',\''+parts[3]+'\',\'1\',\''+parts[16]+'\',\'\',\''+parts[4]+'\',\''+parts[13]+'\',\'\',\''+CRS+'\',\'\',\'\',\'\',\'hotel\',\'\',\'\',\'\',\'fewo\');" title="Objekt- und Leistungsbeschreibungen aufrufen" class="hotlreg">');
            document.write(parts[6]);
            document.write('</a>');
            document.write('</p>');
            document.write('<p>');
            document.write('<b>Objekt:</b> '+parts[17]);
            if(parts_hbit[3]!=0){
            document.write('<br /> mit '+parts_hbit[3]+' m&sup2;');
            }
            document.write('<br />'+parts[7]+parts[8]);
            document.write('</td>');
            document.write('    <td class="'+c_strOM+'">');
            //Anbieter
            document.write('<img src="'+imgservPfad+'/images/content/va_logos/small/'+va_bild+'.gif" class="hottdVAIMG" alt="Veranstalter '+parts[20]+'" title="Veranstalter '+parts[20]+'" border="0" width="75" height="21">');
            document.write('    </td>');
            document.write('    <td class="'+c_strOR+'">');
                var img_bit='';
                if(parts_hbit[0] & 1)    img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/schwimmbad.gif" alt="Schwimmbad" title="Schwimmbad" border="0" />';
                if(parts_hbit[0] & 2)    img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/sauna.gif" alt="Sauna" title="Sauna" border="0" />';
                if(parts_hbit[0] & 4)    img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/tv.gif" alt="TV/Sat" title="TV/Sat" border="0" />';
                if(parts_hbit[0] & 8)    img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/kamin.gif" alt="Kamin" title="Kamin" border="0" />';
                if(parts_hbit[0] & 16)   img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/rollstuhl.gif" alt="Rollstuhl" title="Rollstuhl" border="0" />';
                if(parts_hbit[0] & 32)   img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/angeln.gif" alt="Angeln" title="Angeln" border="0" />';
                if(parts_hbit[0] & 64)   img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/haustier.gif" alt="Haustier" title="Haustier" border="0" />';
                if(parts_hbit[0] & 128)  img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/geschirrspueler.gif" alt="Geschirrspüler" title="Geschirrspüler" border="0" />';
                if(parts_hbit[0] & 256)  img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/waschmaschine.gif" alt="Waschmaschine" title="Waschmaschine" border="0" />';
                if(parts_hbit[0] & 512)  img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/boot.gif" alt="Boot" title="Boot" border="0" />';
                if(parts_hbit[0] & 1024) img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/tennis.gif" alt="Tennis" title="Tennis" border="0" />';
                if(parts_hbit[0] & 2048) img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/garage.gif" alt="Garage" title="Garage" border="0" />';
                if(parts_hbit[0] & 4096) img_bit+='<img src="'+pfad_images+'/fewo/forms/icon/kinderbett.gif" alt="Kinderbett" title="Kinderbett" border="0" />';
            document.write('<a href="javascript:void(0);" onclick="legende(\''+KID+'\',\''+ordner_name[2]+'\');">'+img_bit+'</a>&nbsp;</td>');
            document.write('    </td>');    
            document.write('</tr>');
            document.write('<tr>');
            document.write('    <td colspan="4" class="hottdBottom">');
                            document.write('<div class="div3"><a href="javascript:s_termine('+i+');" style="text-decoration:none;border:none;"><img src="'+pfad_images+'/weiter_reiseziel.gif" class="tt_hotWeiterBut" alt="" /></a></div><div class="div2"><a href="javascript:s_termine('+i+');" class="hotlpreis">ab '+parts[1]+',- &euro;</a></div><div class="div1"><a href="javascript:s_termine('+i+');" style="text-decoration:none;border:none;"><img src="'+pfad_images+'/hotelinfo_buchen.gif" class="tt_hotWeiterBut" alt="" /></div>');
            document.write('    </td>');    
            document.write('</tr>');
            document.write('<tr>');
            document.write('    <td colspan="4" class="hottdTrenner">');
            document.write('<img src="/images/spacer.gif" alt="" border="0" width="1" height="10" />');
            document.write('    </td>');
            document.write('</tr>');
        }
   }
}

//_______________________________________________________________________________

function pageSkip(seiten,apage,sortierung){
    if(apage>10)
    {
        t=11;
    }
    else
    {
        t=1;
    }
    document.write('<div class="tt_skiprow">');
    document.write('<span class="pageSkp">Seite:</span>');
    for (;t<=seiten;t++){
        zaehler=(t-1)*10;
        if(t!=apage){
            document.write('<a href="javascript:skippen('+zaehler+',\''+sortierung+'\');" class="nextPage" title="Angebote der Seite '+t+' abrufen">'+t+'</a>');
            if(t < seiten && t+1!=apage&&t!=10){
                document.write('<span class="nextPage_thin">&nbsp;</span>');
            }
        }
        else{
            if(t > 1 && t!=11){
                document.write('<span class="nextPage_thin">&nbsp;</span>');
            }
            document.write('<span class="aktpage">'+t+'</span>');
            if(t < seiten && t!=10){
                document.write('<span class="nextPage_thin">&nbsp;</span>');
            }
        }
        if(t==10)
            break;
    }
    document.write('</div>');
    if(apage!=seiten) {
        var naechste_seite = apage*10;
        if(apage == seiten) naechste_seite = 0;
        document.write('<a href="javascript:skippen('+naechste_seite+',\''+sortierung+'\');" style="text-decoration:none;" class="nextPage_button" title="Angebote der Seite '+seiten+' abrufen"><img src="/kunden_parameter/tourinaut2/ibe_v2/images/weiter.gif" alt="" /></a>');
        }
}

function fillOrte(s_ort){
    for (t=0;t<anzahl_treffer_orte;t++)
    {
       if(s_ort!=escape(Orte[t]))
           document.write('<option value="'+Orte[t]+'">'+Orte[t]+'</option>');
       else
           document.write('<option value="'+Orte[t]+'" SELECTED>'+Orte[t]+'</option>');
    }
}
    
