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)
{
   var n_AltFlag=0; var n_TopFlag=0;
   var c_strOL,c_strOR,c_strL,c_strM,c_strR,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_strRev = 'hottdRev';
                    c_strR="hottdUR";
                    c_strLink="hotlpreis";
                    alt_txt="";
                    //alert('hell');
                    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_strRev = 'hottdRevALT';
                    c_strR="hottdURALT";
                    
                    c_strLink="hotlpreisALT";
                    alt_txt="&nbsp;(alternatywna)";
                    if(parts[0]==1){
                        document.write('<tr>');
                        document.write('<td colspan="4" class="onlyalt">Nie mo&#x017C;na znale&#x017A;&#x0107; &#x017C;adnych propozycji,<br />kt&#x00F3;re odpowiada&#x0142;yby w 100% Twoim &#x017C;yczeniom.</td>');
                        document.write('</tr>');
                    }
                    if(n_TopFlag==1)
             {
                                document.write('<tr>');
            document.write('<td colspan="4" class="hottab_271107"><img src="/images/spacer.gif" alt="" border="0" width="1" height="12"></td>');
            document.write('</tr>');
            }
                    document.write('<tr>');
                    document.write('<td colspan="4" class="alttxt">Alternatywne propozycje, bliskie Twoim &#x017C;yczeniom:</td>');
                    document.write('</tr>');
                    n_AltFlag=1;
                }
            }

            document.write('<tr class="'+c_strTR1+'">');
            document.write('<td class="'+c_strOL+'" colspan="3">');
            document.write(''+parts[0]+'. Oferta '+alt_txt);
            document.write('</td>');
            document.write('<td class="'+c_strOR+'">');
            document.write('<a class="'+c_strLink+'" href="javascript:s_termine('+i+');">Cena za os. od '+ConvertPriceValues(parts[1],RecalculationType,'EUR',Rmarke)+'</a>');
            document.write('</td>');
            document.write('</tr>');

            document.write('<tr class="'+c_strTR2+'">');
            //thumbnail
            document.write('<td class="'+c_strL+'"><a href="javascript:oHIB(\''+parts[2]+'\',\''+parts[2]+'\',\''+parts[3]+'\',\'1\',\'\',\'\',\''+parts[4]+'\',\''+parts[13]+'\',\'\',\'\',\'\',\'\',\'\',\'hotel\');" title="Wywo&#x0142;aj opisy &#x015B;wiadcze&#x0144; hotelu">')
            np=String(parseInt(parts[2]/5000)*5000);
            while(np.length<5)np="0"+np;
            document.write('<img src="/images/content/booking_thumbs/'+np+'/THB_999_H'+parts[2]+'.jpg" height="65" width="100" alt="Wywo&#x0142;aj opisy &#x015B;wiadcze&#x0144; hotelu" border="0">');
            document.write('</a></td>');
			
            //name, sterne,ort,image
            document.write('<td class="'+c_strM+'">');
            document.write('<b>'+parts[6]+'</b>');
            document.write('<br>');
            nSterne=Math.floor(parts[4]*10);
            document.write(MakeStars(nSterne,pfad_images));
            document.write('<br>'+parts[7]+parts[8]+'<br>');
            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('<td class="'+c_strRev+'">');
			if(RIP=='217.67.212.4'){
			/*
				hbw = parts[16];
				hbw_detail = parts[16].split('_');
				if(hbw_detail[0]==0){
					op_total_text = 'opinii';
				} else if(hbw_detail[0]==1){
					op_total_text = 'opinia';
				} else if(hbw_detail[0]<5){
					op_total_text = 'opinie';
				} else {
					op_total_text = 'opinii';
				}
				document.write('<div class="" style="font-size: 9px;">'+hbw_detail[0]+' '+op_total_text+' gości, <a href="javascript:hopinions('+parts[2]+');" style="font-size: 9px;">wyświetl opinie</a></div>');
				document.write('<div style="padding: 3px 0"><img src="'+pfad_images+'/hbw/small_scale_'+hbw_detail[2]+'.gif" alt="" valign="middle" /> <span class="hbwScaletxt">'+(hbw_detail[2]/10)+'</span></div>');
				document.write('<div class="" style="font-size: 9px;font-weight: bold;">'+Math.ceil(hbw_detail[1]/10)+'% gości poleca ten hotel</div>');
			*/
			} else {
				document.write('&nbsp;');
			}
			document.write('</td>');

            //wunscherfuellung
            document.write('<td class="'+c_strR+'">Zgodno&#x015B;&#x0107; z &#x017C;yczeniami:<br>');
            npw=String(parseInt(parts[15]/5)*5);
            if(npw<80)np=0;
            document.write('<img src="'+pfad_images+'/'+npw+'.gif" alt="" border="0" vspace="4"></td>');
            document.write('</tr>');

            if(i!=(regionen_2.length-1)&&n_TopFlag!=1)
            {
            document.write('<tr>');
            document.write('<td colspan="4" class="hottab_RLB271107"><img src="/images/spacer.gif" alt="" border="0" width="1" height="12"></td>');
            document.write('</tr>');
            } else if(i!=(regionen_2.length-1)) {
            document.write('<tr>');
            document.write('<td colspan="4" class="hottab_RLB271107"><img src="/images/spacer.gif" alt="" border="0" width="1" height="12"></td>');
            document.write('</tr>');
            }
        }

   }
}

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="Przejd&#x017A; do '+t+' strony naszych propozycji">'+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>');
    }
}
