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].split('#');
    window.location.href=uebergabe+'&IFF='+part[2]+'&zielgebiets_kenner='+part[10]+'&detail=termine&showresult='+part[11]+'&startposition_hotel='+part[12];
}
function skippen(zaehler,sortierung){
    part=regionen_2[0].split('#');
    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].split('#');
    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].split('#');
    window.location.href=uebergabe+'&sortierung='+sortierung+'&detail=hotel&startposition=0&zielgebiets_kenner='+part[10]+'&showresult='+part[11];
}


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,agent)
{
   var n_AltFlag=0; var n_TopFlag=0;
   var c_strOL,c_strOR,c_strL,c_strM,c_strR,c_strLink,alt_txt;
   if(regionen_2.length <= 0) {}
   else
   {
        for(i=0;i<regionen_2.length;i++)
        {
            parts=regionen_2[i].split("#");
            if(parts[9]==0){
                if(n_TopFlag==0){
                    c_strTR1="hottrhead"
                    c_strTR2="hottrsub"
                    c_strOL="hottdOL";
                    c_strOR="hottdOR";
                    c_strL="hottdUL";
                    c_strM="hottdUM";
                    c_strR="hottdUR";
                    c_strLink="hotlpreis";
                    alt_txt="";
                    //alert('hell');
                    document.write('<table border="0" width="630" cellpadding="0" cellspacing="0">');
                    document.write('<tr style="background-color:#FCEDC2">');
                    document.write('<td width="105"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0"></td>');
                    document.write('<td width="150"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0"></td>');
                    document.write('<td width="150"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0"></td>');
                    document.write('<td width="155"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0"></td>');
                    document.write('</tr>');
                    n_TopFlag=1;
                }
            }
            else{
                if(n_AltFlag==0){
                    c_strTR1="hottrheadALT"
                    c_strTR2="hottrsubALT"
                    c_strOL="hottdOLALT";
                    c_strOR="hottdORALT";
                    c_strL="hottdULALT";
                    c_strM="hottdUMALT";
                    c_strR="hottdURALT";
                    c_strLink="hotlpreisALT";
                    alt_txt="&nbsp;(alternativ)";

                    if(nuralt!=1){
                        document.write('<table width="630" border="0" cellpadding="0" cellspacing="0" style="margin-top:10px;">');
                        document.write('<tr>');
                        document.write('<td class="hottabtrefALT">Alternative Angebote, die Ihren Urlaubswünschen nahe kommen</td>');
                        document.write('</tr>');
                        document.write('</table>');
                        tmp_alt=0;
                    }

                    if(parts[0]==1){
                        document.write('<table width="630" border="0" cellpadding="0" cellspacing="0">');
                        document.write('<tr>');
                        document.write('<td colspan="4" class="onlyalt">Es konnten keine Angebote gefunden werden,<br>die zu 100% mit Ihren Wünschen übereinstimmen.</td>');
                        document.write('</tr>');
                        document.write('</table>');
                    }
                    document.write('<table border="0" cellpadding="0" cellspacing="0" width="630">');
                    document.write('<tr style="background-color:#AED8D8;">');
                    document.write('<td width="105" class="hottabborderl"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0"></td>');
                    document.write('<td width="150"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0"></td>');
                    document.write('<td width="150"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0"></td>');
                    document.write('<td width="155" class="hottabborderr"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0"></td>');
                    document.write('</tr>');
                    n_AltFlag=1;
                }
            }

            if(i!=0)
            {
            document.write('<tr>');
            document.write('<td colspan="4"><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>');
            document.write('</tr>');
            }

            document.write('<tr class="'+c_strTR1+'">');
            document.write('<td class="'+c_strOL+'" colspan="2">');
            document.write(''+parts[0]+'. Angebot '+alt_txt);
            document.write('</td>');
            document.write('<td class="'+c_strOR+'" colspan="2">');
            document.write('<span class="hottabschrift">Preis pro Erwachsenen</span> <a class="'+c_strLink+'" href="javascript:s_termine('+i+');">ab '+parts[1]+',-&euro;</a>');
            document.write('</td>');
            document.write('</tr>');

            document.write('<tr class="'+c_strTR2+'">');
            //thumbnail
            document.write('<td rowspan="2" class="'+c_strL+'" valign="top"><a href="javascript:oHIB(\''+parts[2]+'\',\''+parts[2]+'\',\''+parts[3]+'\',\'1\',\'\',\'\',\''+parts[4]+'\',\''+parts[13]+'\',\'\',\'\',\'\',\'\',\'\',\'hotel\');" title="Hotel- und Leistungsbeschreibungen aufrufen" class="hotlinkziel">')
            np=String(parseInt(parts[2]/5000)*5000);
            while(np.length<5)np="0"+np;
            document.write('<img src="'+imgservPfad+'/images/content/booking_thumbs/'+np+'/THB_999_H'+parts[2]+'.jpg" height="65" width="100" alt="Hotel- und Leistungsbeschreibungen abrufen" border="0">');
            document.write('</a></td>');
            //name, sterne,ort,image
            document.write('<td valign="top">');
            document.write('<h2>'+parts[6]+'</h2>');
            nSterne=Math.floor(parts[4]*10);
            document.write(MakeStars(nSterne,pfad_images));
            document.write('<br>'+parts[7]+parts[8]);
            document.write('</td>');
            document.write('<td class="hottdHbw">');

            //HoBe//---Vertrag ausgelaufen 01.12.11
            /*
            if(showHbw == 1){
             if(parts[16]!=''){
                     hbw_details=parts[16].split("_");
                     if(hbw_details[0]>1){
                         str_hbw_txt='Hotelbewertungen';
                     }
                     else{
                         str_hbw_txt='Hotelbewertung';
                     }
                     document.write('<div class="hbwtdlink" onClick="javascript:oHIB(\''+parts[2]+'\',\''+parts[2]+'\',\''+parts[3]+'\',\'9\',\'\',\'\',\''+parts[4]+'\',\''+parts[13]+'\',\'\',\'\',\'\',\'\',\'\',\'hotel\');" title="Hotelbewertungen anzeigen">');
                     document.write('<span class="hbwEmpfehlung"><b>'+hbw_details[0]+'</b></span> '+str_hbw_txt+'<br><span class="hothbwlesen">jetzt lesen</span>&nbsp;&nbsp;');
                     document.write('<img src="'+pfad_images+'/hbw/scale_small/small_scale_'+hbw_details[2]+'.gif" border="0" alt="Gesamtbewertung" title="Gesamtbewertung '+hbw_details[2].substring(0,1)+'.'+hbw_details[2].substring(1,2)+' von 6"><span class="hbwScaletxt">'+hbw_details[2].substring(0,1)+'.'+hbw_details[2].substring(1,2)+' </span>');
                     if(hbw_details[0]>1){
                         document.write('<span class="hbwEmpfehlung"><b>Weiterempfehlung '+hbw_details[1]/10+'%</b></span>');
                     }
                     document.write('</div>');
              }else if(showHbwForm == 1){
                  document.write('<div class="hbwtdlink2">Es liegt noch keine<br />Hotelbewertung der<br />Gäste vor.<a href="javascript:void(0);" onmouseover="Tip(hbwTt_infotext,BGIMG,hbwTt_BGIMG,BGCOLOR,hbwTt_BGCOLOR,BORDERWIDTH,hbwTt_BORDERWIDTH,WIDTH,hbwTt_WIDTH,PADDING,hbwTt_PADDING,FONTSIZE,hbwTt_FONTSIZE,FONTFACE,hbwTt_FONTFACE,FONTCOLOR,hbwTt_FONTCOLOR);"><img src="/kunden_parameter/isik/ibe_v2/images/hbw/info_hotelbewertung.gif" style="vertical-align: middle; margin:0;" alt="" border="0"></a></div>');
              }
             }
             */
            document.write('<img src="/images/spacer.gif" alt="" border="0" width="1" height="7">');
            document.write('</td>');

            document.write('<td>');
            document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%">');
            document.write('<tr>');
            document.write('<td align="right" valign="top" class="hottabpadright">');
                if(parts[14] & 131072)
                    document.write('<span class="attri">Frühbucherermäßigung</span><br>');
                if(parts[14] & 65536)
                    document.write('<span class="attri">Kinderermäßigung</span>');
            document.write('</td>');
            document.write('</tr>');
            document.write('</table>');
            document.write('</td>');
            document.write('</tr>');
            document.write('<tr class="'+c_strTR2+'">');
            document.write('<td class="'+c_strM+'"><a href="javascript:oHIB(\''+parts[2]+'\',\''+parts[2]+'\',\''+parts[3]+'\',\'1\',\'\',\'\',\''+parts[4]+'\',\''+parts[13]+'\',\'\',\'\',\'\',\'\',\'\',\'hotel\');" title="Hotel- und Leistungsbeschreibungen aufrufen" class="hotlinkziel">Hotelinfos</a>&nbsp;<img src="'+pfad_images+'/pfeil_vor.gif" width="5" height="9" alt="" border="0"></td>');
            //Angebot merken---------
            ort=parts[7].replace("'","\\'");
            hotelname=parts[6].replace("'","\\'");
            if(agent == "" || agent == "isik")
                document.write('<td class="'+c_strM+'"><a class="hotlinkziel" href="javascript:void(0);" onClick="javascript:set_merkzettel(\''+parts[4]+'\',\''+hotelname+'\',\''+parts[2]+'\',\''+ort+'\',\''+parts[10]+'\',\''+parts[1]+'\',\''+parts[14]+'\',\''+parts[3]+'\',\''+parts[13]+'\');return false;">Hotel merken</a>&nbsp;<img src="'+pfad_images+'/pfeil_vor.gif" width="5" height="9" alt="" border="0"></td>');
            else
                document.write('<td class="'+c_strM+'">&nbsp;</td>');
            document.write('<td class="'+c_strR+'" align="right" valign="bottom" style="padding-bottom:0px; margin-bottom:0px;">');
            document.write('<a href="javascript:s_termine('+i+');"><img src="'+pfad_images+'/hotelinfo_buchen.gif" border="0" alt="" vspace="4"></a>');
            document.write('</td>');
            document.write('</tr>');


            if(i==(regionen_2.length-1)){
            document.write('<tr>');
            document.write('<td colspan="4"><img src="/images/spacer.gif" width="1" height="1" alt="" border="0"></td>');
            document.write('</tr>');
            }

        }
        document.write('</table>');
   }
}
function set_merkzettel(stern,Hotel_Name,IFF,Ort,zielgebiets_kenner,preis,mangebots_icon,Laender_Ref,mseason)
{
        window.open('../teaser/merkzettel.php?KID='+KID+'&merkzettel_aktion=safe&Laender_Ref='+Laender_Ref+'&mseason='+mseason+'&obj_termin='+obj_termin+'&obj_rtermin='+obj_rtermin+'&obj_person='+obj_person+'&obj_sterne='+stern+'&obj_name='+Hotel_Name+'&obj_iff='+IFF+'&obj_ort='+Ort+'&obj_zielgebiet='+zielgebiets_kenner+'&obj_land='+HLand+'&obj_preis_ab='+preis+'&mangebots_icon='+mangebots_icon+tmp_sessid+'&safety_strecke='+safety_strecke+'&mpreis='+mpreis+'&mmarke='+mmarke+'&mzimmer='+mzimmer+'&mkategorie='+mkategorie+'&mdauer='+mdauer+'&mverpflegung='+mverpflegung+'&agent='+magent,'merkzettel','height=250,width=470,dependent=yes,menubar=no,resizable,scrollbars=yes,status=no,toolbar=no');
}
function pageSkip(seiten,apage,sortierung){
    for (t=1;t<=seiten;t++)
    {
        zaehler=(t-1)*10;
        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 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>');
    }
}
