
var isset_widget;
var isset_informer;
isset_widget_f();
function isset_widget_f()
{
    if (typeof first_search == 'function')
        isset_widget = 1;

}

function init()
{
    if(isset_widget==1)
        first_search();
    if(isset_informer==1)
        informer_search_hotels();
}

window.onload = init;


var search_str;var month_in;var year_in;var day_in;var month_out;var year_out;var day_out;var date_in;var date_out;var date_in_send;var date_out_send;var serv_year;var masLink=new Array(100);var back_button;var kol_timeout;var peremen;function getEnter(a){if(!a){a=window.event}if(a.keyCode==13){if(kol_timeout==null||kol_timeout==0||kol_timeout=="undefined"){but_search()}}}function get_date_in(){alert(date_in)}function get_date_out(){alert(date_out)}function on_date_in_change(){var d=new Date();var b=document.getElementById("sel_month_in").value;var c=document.getElementById("sel_date_in").value;day_in=c;var a=document.getElementById("option_mon_in");if(document.getElementById('option_mon_in')){var month_word_kill = document.getElementById('sel_month_in');month_word_kill.remove(0);}if(b==101){return}if((d.getMonth()+12)==parseInt(b)){mon=parseInt(b)-11;dayCount=new Date(parseInt(serv_year)+1,mon,0).getDate();if(dayCount==parseInt(c)){month_in=parseInt(b);mon=parseInt(b)-11;year=parseInt(serv_year)+1;c=parseInt(c)-1;date_in=year+"-"+mon+"-"+c;generate_day_in(dayCount)}}if(parseInt(b)>11){mon=parseInt(b)-11;year=parseInt(serv_year)+1;dayCount=new Date(parseInt(serv_year)+1,mon,0).getDate()}else{mon=parseInt(b)+1;year=parseInt(serv_year);dayCount=new Date(parseInt(serv_year),mon,0).getDate()}if(parseInt(b)!=parseInt(month_in)){month_in=parseInt(b);if(parseInt(c)>parseInt(dayCount)){c=1}if(date_in!=null){date_mas=date_in.split("-");date_mas=year+"-"+mon+"-"+c}generate_day_in(dayCount);c=document.getElementById("sel_date_in").value}if(c==null||c==Lang.day_word){c=1;date_in=year+"-"+mon+"-"+c}else{date_in=year+"-"+mon+"-"+c}date_mas_in=date_in.split("-");if(date_out!=null){date_mas_out=date_out.split("-");if(parseInt(date_mas_in[2])>=dayCount&&((parseInt(date_mas_in[1])>=parseInt(date_mas_out[1])&&parseInt(date_mas_in[0])==parseInt(date_mas_out[0]))||parseInt(date_mas_in[0])>parseInt(date_mas_out[0]))){if(parseInt(mon)==12){next_date_in=(parseInt(year)+1)+"-1-1"}else{next_date_in=year+"-"+(parseInt(mon)+1)+"-1"}generate_date_out(next_date_in)}else{if(parseInt(date_mas_in[1])==parseInt(date_mas_out[1])&&parseInt(date_mas_in[2])>=parseInt(date_mas_out[2])&&parseInt(date_mas_in[0])==parseInt(date_mas_out[0])){next_date_in=year+"-"+mon+"-"+(parseInt(c)+1);generate_date_out(next_date_in)}else{if((parseInt(date_mas_in[1])>parseInt(date_mas_out[1])&&parseInt(date_mas_in[0])==parseInt(date_mas_out[0]))||parseInt(date_mas_in[0])>parseInt(date_mas_out[0])){next_date_in=year+"-"+mon+"-"+(parseInt(c)+1);generate_date_out(next_date_in)}}}}if(date_out==null){if(parseInt(date_mas_in[2])>=dayCount&&parseInt(date_mas_in[1])<12){next_date_in=year+"-"+(parseInt(mon)+1)+"-1"}else{if(parseInt(date_mas_in[2])>=dayCount&&parseInt(date_mas_in[1])==12){next_date_in=(parseInt(year)+1)+"-1-1"}else{next_date_in=year+"-"+mon+"-"+(parseInt(c)+1)}}generate_date_out(next_date_in)}}function on_date_out_change(){var c=new Date();var a=document.getElementById("sel_month_out").value;var b=document.getElementById("sel_date_out").value;day_out=b;if(document.getElementById('option_mon_out')){var month_word_kill = document.getElementById('sel_month_out');month_word_kill.remove(0);}if(a==101){return}if(c.getMonth()==parseInt(a)&&parseInt(b)==1){month_out=a;mon=parseInt(month_out)+1;year=parseInt(serv_year);dayCount=new Date(parseInt(serv_year),mon,0).getDate();b=2;date_out=year+"-"+mon+"-"+b;generate_day_out(dayCount)}if(parseInt(a)>11){mon=parseInt(a)-11;year=parseInt(serv_year)+1;dayCount=new Date(parseInt(serv_year)+1,mon,0).getDate()}else{mon=parseInt(a)+1;year=parseInt(serv_year);dayCount=new Date(parseInt(serv_year),mon,0).getDate()}if(parseInt(a)!=parseInt(month_out)){month_out=a;if(month_out>11){mon=parseInt(month_out)-11;year=parseInt(serv_year)+1;dayCount=new Date(parseInt(serv_year)+1,mon,0).getDate()}else{mon=parseInt(month_out)+1;year=parseInt(serv_year);dayCount=new Date(parseInt(serv_year),mon,0).getDate()}if(date_out!=null){date_mas=date_out.split("-");if(parseInt(dayCount)>parseInt(b)){date_out=year+"-"+mon+"-"+b}else{date_out=year+"-"+mon+"-2"}}generate_day_out(dayCount)}else{date_out=year+"-"+mon+"-"+b}if(b==null||b==Lang.day_word){date_out=year+"-"+mon+"-1"}else{if(date_out==null){date_out=year+"-"+mon+"-"+b}}if(date_in==null){date_mas=date_out.split("-")}else{if(date_in!=null){date_mas_in=date_in.split("-");date_mas_out=date_out.split("-");if(parseInt(date_mas_out[1])==parseInt(date_mas_in[1])&&parseInt(date_mas_out[0])==parseInt(date_mas_in[0])&&parseInt(date_mas_out[2])!=1&&parseInt(date_mas_in[2])!=1&&parseInt(date_mas_out[2])<=parseInt(date_mas_in[2])){previous_date_out=date_mas_out[0]+"-"+date_mas_out[1]+"-"+(parseInt(date_mas_out[2])-1);generate_date_in(previous_date_out)}else{if(parseInt(date_mas_out[0])==parseInt(date_mas_in[0])&&parseInt(date_mas_out[1])==parseInt(date_mas_in[1])&&parseInt(date_mas_out[2])==1&&parseInt(date_mas_in[1])!=1&&parseInt(date_mas_out[1])!=1){mon=(parseInt(date_mas_out[1])-1);prevDayCount=new Date(parseInt(serv_year),mon,0).getDate();previous_date_out=date_mas_in[0]+"-"+mon+"-"+prevDayCount;generate_date_in(previous_date_out)}else{if(parseInt(date_mas_out[0])==parseInt(date_mas_in[0])&&parseInt(date_mas_out[1])==parseInt(date_mas_in[1])&&parseInt(date_mas_out[2])==1&&parseInt(date_mas_in[1])==1){mon=12;prevDayCount=new Date(parseInt(serv_year)-1,mon,0).getDate();previous_date_out=(parseInt(date_mas_in[0])-1)+"-"+mon+"-"+prevDayCount;generate_date_in(previous_date_out)}else{if(parseInt(date_mas_out[0])==parseInt(date_mas_in[0])&&parseInt(date_mas_out[1])<parseInt(date_mas_in[1])){if(parseInt(date_mas_out[2])>1){previous_date_out=parseInt(date_mas_out[0])+"-"+date_mas_out[1]+"-"+(parseInt(date_mas_out[2])-1)}else{if(parseInt(date_mas_in[1])>1){prevDayCount=new Date(date_mas_out[0],(parseInt(date_mas_out[1])-1),0).getDate();previous_date_out=parseInt(date_mas_out[0])+"-"+(parseInt(date_mas_out[1])-1)+"-"+prevDayCount}else{prevDayCount=new Date((parseInt(date_mas_out[0])-1),12,0).getDate();previous_date_out=(parseInt(date_mas_out[0])-1)+"-12-"+prevDayCount}}generate_date_in(previous_date_out)}else{if(parseInt(date_mas_out[0])<parseInt(date_mas_in[0])){if(parseInt(date_mas_out[2])==1){prevDayCount=new Date(date_mas_out[0],(parseInt(date_mas_out[1])-1),0).getDate();previous_date_out=parseInt(date_mas_out[0])+"-"+(parseInt(date_mas_out[1])-1)+"-"+prevDayCount}else{previous_date_out=parseInt(date_mas_out[0])+"-"+parseInt(date_mas_out[1])+"-"+(parseInt(date_mas_out[2])-1)}generate_date_in(previous_date_out)}}}}}}}}function generate_day_in(c){if(date_in!=null){date_mas_in=date_in.split("-")}else{if(day_in!=null){date_mas_in=new Array();date_mas_in[2]=day_in}else{date_mas_in=new Array();date_mas_in[2]=1}}document.getElementById("sel_date_in").innerHTML="";var b=document.getElementById("sel_date_in");i=1;while(i<=c){var a=document.createElement("option");a.setAttribute("value",i);if(parseInt(date_mas_in[2])==i){a.setAttribute("selected","selected")}a.innerHTML=i;i++;b.appendChild(a)}if(date_in!=null&&date_out!=null){mas_date_in=date_in.split("-");mas_date_out=date_out.split("-");if(parseInt(mas_date_in[0])==parseInt(mas_date_out[0])&&parseInt(mas_date_in[1])==parseInt(mas_date_out[1])&&parseInt(mas_date_in[2])==parseInt(mas_date_out[2])){generate_date_out(date_in)}}}function generate_date_in(a){var d=new Date();date_mas=a.split("-");var c=document.getElementById("sel_month_in");document.getElementById("sel_month_in").innerHTML="";i=0;j=0;while(i<=12){if(d.getMonth()+i>=12){var b=document.createElement("option");if(parseInt(date_mas[1])-1==j&&(parseInt(date_mas[0])!=parseInt(serv_year))){b.setAttribute("selected","selected");dayCount=new Date(parseInt(serv_year)+1,date_mas[1],0).getDate()}b.setAttribute("value",(d.getMonth()+i));b.innerHTML=month_list[j]+" "+(parseInt(serv_year)+1);c.appendChild(b);j++}else{var b=document.createElement("option");if(parseInt(date_mas[1])-1==(d.getMonth()+i)){b.setAttribute("selected","selected");dayCount=new Date(parseInt(serv_year),date_mas[1],0).getDate()}b.setAttribute("value",(d.getMonth()+i));b.innerHTML=month_list[d.getMonth()+i]+" "+(parseInt(serv_year));c.appendChild(b)}i++}if(date_out!=null&&date_in!=null){date_in=date_mas[0]+"-"+date_mas[1]+"-"+date_mas[2]}else{date_in=date_mas[0]+"-"+date_mas[1]+"-"+date_mas[2]}generate_day_in(dayCount)}function generate_date_out(a){date_mas=a.split("-");var c=document.getElementById("sel_month_out");document.getElementById("sel_month_out").innerHTML="";i=0;j=0;while(i<=12){if(time.getMonth()+i>=12){var b=document.createElement("option");if(parseInt(date_mas[1])-1==j&&(parseInt(date_mas[0])!=parseInt(serv_year))){b.setAttribute("selected","selected");dayCount=new Date(parseInt(serv_year)+1,date_mas[1],0).getDate()}b.setAttribute("value",(time.getMonth()+i));b.innerHTML=month_list[j]+" "+(parseInt(serv_year)+1);c.appendChild(b);j++}else{var b=document.createElement("option");if(parseInt(date_mas[1])-1==(time.getMonth()+i)){b.setAttribute("selected","selected");dayCount=new Date(parseInt(serv_year),date_mas[1],0).getDate()}b.setAttribute("value",(time.getMonth()+i));b.innerHTML=month_list[time.getMonth()+i]+" "+(parseInt(serv_year));c.appendChild(b)}i++}if(date_out!=null){date_mas_out=date_out.split("-");date_out=date_mas[0]+"-"+date_mas[1]+"-"+(parseInt(date_mas[2]))}else{date_out=date_mas[0]+"-"+date_mas[1]+"-"+(parseInt(date_mas[2]))}generate_day_out(dayCount)}function generate_day_out(c){if(date_in!=null||date_out!=null){date_mas=date_out.split("-")}else{if(day_out!=null){date_mas=new Array();date_mas[2]=day_out}else{date_mas=new Array();date_mas[2]=1}}document.getElementById("sel_date_out").innerHTML="";var b=document.getElementById("sel_date_out");i=1;while(i<=c){var a=document.createElement("option");if(parseInt(date_mas[2])==i){a.setAttribute("selected","selected")}a.setAttribute("value",i);a.innerHTML=i;i++;b.appendChild(a)}}function but_search(b){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img id='img' src='http://widget.hotels24.ua/ajax-loader.gif'>";peremen=setTimeout("connect_error()",60000);document.getElementById("search_button").disabled=true;kol_timeout=1;if(b!="hotelsofcity"){search_str=document.getElementById("search_field").value;search_str=search_str.replace(/\s/g,"+")}var a=document.createElement("script");if(date_in==null||date_out==null){a.src="http://search.hotels24.ua/search/index/hotels/?callback=search_request&search_str="+search_str+"&affiliate_id="+affiliate_id+"&next_page=1&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id+"&top_hotels_count="+top_hotels_count+"&top_type="+top_type}else{date_in_send=date_in;date_out_send=date_out;a.src="http://search.hotels24.ua/search/index/hotels/?callback=search_request&search_str="+search_str+"&affiliate_id="+affiliate_id+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page=1&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id+"&top_hotels_count="+top_hotels_count+"&top_type="+top_type}i=0;while(i<100){masLink[i]=0;i++}masLink[0]=a.src;a.type="text/javascript";document.body.appendChild(a)}function connect_error(){document.getElementById("search_result").innerHTML=Lang.connect_error;document.getElementById("search_button").disabled=false;kol_timeout=0}function hotels_next_page(b){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";peremen=setTimeout("connect_error()",60000);document.getElementById("search_button").disabled=true;kol_timeout=1;var a=document.createElement("script");if(date_in_send==null||date_out_send==null){a.src="http://search.hotels24.ua/search/index/hotels/?callback=search_request&search_str="+search_str+"&affiliate_id="+affiliate_id+"&next_page="+b+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{a.src="http://search.hotels24.ua/search/index/hotels/?callback=search_request&search_str="+search_str+"&affiliate_id="+affiliate_id+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page="+b+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}a.type="text/javascript";document.body.appendChild(a)}function search_request(d){clearTimeout(peremen);kol_timeout=0;document.getElementById("search_button").disabled=false;back_button=null;document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");var f=document.getElementById("search_result");if(d.hotels){for(var h in d.hotels){var a=document.createElement("div");a.setAttribute("style","display:block;");a.innerHTML="<span>"+Lang.short_city+d.hotels[h]["city"]+"</span> <a href='javascript:create_roomsofhotel("+h+")'>"+d.hotels[h]["name"]+"</a>";f.appendChild(a)}if(d.next_page){document.getElementById("next_page_a").innerHTML="";next_page_parent=document.getElementById("next_page_a");var a=document.createElement("div");a.setAttribute("style","display:block;");a.innerHTML="<a href='javascript:hotels_next_page("+d.next_page+")' title='"+Lang.next_hotels+"'></a>";next_page_parent.appendChild(a);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(d.previous_page){document.getElementById("previous_page_a").innerHTML="";previous_page_parent=document.getElementById("previous_page_a");var a=document.createElement("div");a.setAttribute("style","display:block;");a.innerHTML="<a href='javascript:hotels_next_page("+d.previous_page+")' title='"+Lang.previous_hotels+"'></a>";previous_page_parent.appendChild(a);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(d.cities_count){document.getElementById("acity").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");var g=document.getElementById("acity");var k=document.createElement("div");k.setAttribute("style","display:block;");k.innerHTML='<a href=javascript:create_city("'+search_str+'")>'+Lang.find_cities+"</a>";g.appendChild(k);document.getElementById("acity").setAttribute("style","display:block;")}if(d.regions_count){document.getElementById("aregion").innerHTML="";document.getElementById("aregion").setAttribute("style","display:none;");var e=document.getElementById("aregion");var c=document.createElement("div");c.setAttribute("style","display:block;");c.innerHTML='<a href=javascript:create_regions("'+search_str+'")>'+Lang.find_regions+"</a>";e.appendChild(c);document.getElementById("aregion").setAttribute("style","display:block;")}if(date_in_send!=null&&date_out_send!=null){date_in_str=date_in_send.split("-");date_out_str=date_out_send.split("-");var b=document.getElementById("date_inout_selected");b.setAttribute("style","display:block;");b.innerHTML=Lang.begin_date+" <b>"+date_in_str[2]+" "+month_global_mass[parseInt(date_in_str[1])-1]+" "+date_in_str[0]+"</b><br> "+Lang.end_date+" <b>"+date_out_str[2]+" "+month_global_mass[parseInt(date_out_str[1])-1]+" "+date_out_str[0]+"</b>"}if(d.total_hotels_count&&(d.next_page||d.previous_page)){document.getElementById("pagerText").setAttribute("style","display:block");document.getElementById("pagerText").innerHTML=Lang.find_count_hotels_ver2;document.getElementById("pager_count").setAttribute("style","display:block;");if(d.next_page){this_page=(d.next_page-1)*5;document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+this_page+"</b> "+Lang.find_count_IZ+" <b>"+d.total_hotels_count+"</b>"}else{this_page=(d.previous_page+1)*5;if((this_page-4)==d.total_hotels_count){document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> "+Lang.find_count_IZ+" <b>"+d.total_hotels_count+"</b>"}else{document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+d.total_hotels_count+"</b> "+Lang.find_count_IZ+" <b>"+d.total_hotels_count+"</b>"}}}}else{if(d.cities_count!=null){masLink[0]=null;create_city(search_str)}else{if(d.regions_count){masLink[0]=null;create_regions(search_str)}else{if(d.error){var a=document.createElement("div");a.setAttribute("style","display:block;");a.innerHTML=d.error;f.appendChild(a)}}}}}function tophotels(a){document.getElementById("search_button").disabled=false;kol_timeout=0;clearTimeout(peremen);back_button=null;document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none;");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none;");if(date_in_send!=null&&date_out_send!=null){date_in_str=date_in_send.split("-");date_out_str=date_out_send.split("-");var b=document.getElementById("date_inout_selected");b.setAttribute("style","display:block;");b.innerHTML=Lang.begin_date+" <b>"+date_in_str[2]+" "+month_global_mass[parseInt(date_in_str[1])-1]+" "+date_in_str[0]+"</b><br> "+Lang.end_date+" <b>"+date_out_str[2]+" "+month_global_mass[parseInt(date_out_str[1])-1]+" "+date_out_str[0]+"</b>"}var d=document.getElementById("search_result");for(var c in a.hotels){var e=document.createElement("div");e.setAttribute("style","display:block;");e.innerHTML="<span>"+Lang.short_city+a.hotels[c]["city"]+" </span><a href='javascript:create_roomsofhotel("+c+")'>"+a.hotels[c]["name"]+"</a>";d.appendChild(e)}if(a.error){var e=document.createElement("div");e.setAttribute("style","display:block;");e.innerHTML=a.error;d.appendChild(e)}}function first_search(){document.getElementById("search_button").disabled=true;kol_timeout=1;document.getElementById("arrow_str").innerHTML=Lang.arrow_str;document.getElementById("search_hotel").innerHTML=Lang.search_hotel;document.getElementById("search_example").innerHTML=Lang.search_example;document.getElementById("str_begin_date").innerHTML=Lang.begin_date;document.getElementById("str_end_date").innerHTML=Lang.end_date;document.getElementById("search_button").value=Lang.search_button;document.getElementById("day_word_in").innerHTML=Lang.day_word;document.getElementById("day_word_out").innerHTML=Lang.day_word;var a=document.createElement("script");if(top_type==1){a.src="http://search.hotels24.ua/search/index/tophotels/?callback=tophotels&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id+"&top_hotels_count="+top_hotels_count+"&top_type="+top_type}else{if(top_type==2){a.src="http://search.hotels24.ua/search/index/regioncities/?callback=getcityofregion&region_id="+selected_top_region_id+"&next_page=1&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id}}masLink[0]=a.src;a.type="text/javascript";document.body.appendChild(a);var a=document.createElement("script");a.src="http://search.hotels24.ua/search/index/year/?callback=server_year&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id;a.type="text/javascript";document.body.appendChild(a);peremen=setTimeout("connect_error()",60000)}function server_year(b){serv_year=b.year;var a=document.getElementById("sel_month_in");var d=document.createElement("option");d.setAttribute("selected","selected");d.setAttribute("id","option_mon_in");d.setAttribute("value",101);d.innerHTML=Lang.month_word;a.appendChild(d);i=0;j=0;time=new Date();var f=new Date(serv_year,time.getMonth()+1,0).getDate();while(i<=12){if(time.getMonth()+i>=12){var d=document.createElement("option");d.setAttribute("value",time.getMonth()+i);d.innerHTML=month_list[j]+" "+(parseInt(serv_year)+1);a.appendChild(d);j++}else{var d=document.createElement("option");d.setAttribute("value",(time.getMonth()+i));d.innerHTML=month_list[time.getMonth()+i]+" "+serv_year;a.appendChild(d)}i++}var c=document.getElementById("sel_month_out");var e=document.createElement("option");e.setAttribute("selected","selected");e.setAttribute("id","option_mon_out");e.setAttribute("value",101);e.innerHTML=Lang.month_word;c.appendChild(e);i=0;j=0;time=new Date();var f=new Date(serv_year,time.getMonth()+1,0).getDate();while(i<=12){if(time.getMonth()+i>=12){var e=document.createElement("option");e.setAttribute("value",(time.getMonth()+i));e.innerHTML=month_list[j]+" "+(parseInt(serv_year)+1);c.appendChild(e);j++}else{var e=document.createElement("option");e.setAttribute("value",(time.getMonth()+i));e.innerHTML=month_list[time.getMonth()+i]+" "+serv_year;c.appendChild(e)}i++}}function create_rooms(b){var a=document.createElement("script");if(date_in_send==null||date_out_send==null){a.src="http://search.hotels24.ua/search/index/rooms/?callback=getrooms&hotelid="+b+"&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{a.src="http://search.hotels24.ua/search/index/rooms/?callback=getrooms&hotelid="+b+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}a.type="text/javascript";document.body.appendChild(a);document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none")}function getrooms(a){document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");var d=document.getElementById("search_result");for(var c in a.rooms){var e=document.createElement("div");e.setAttribute("style","display:block;");e.innerHTML=a.rooms[c]["room_name"]+" цена "+a.rooms[c]["min_price"]+" грн. кол.свободных мест "+a.rooms[c]["avaible_count"];d.appendChild(e)}if(date_in_send!=null&&date_out_send!=null){date_in_str=date_in_send.split("-");date_out_str=date_out_send.split("-");var b=document.getElementById("date_inout_selected");b.setAttribute("style","display:block;");b.innerHTML="Дата заезда: <b>"+date_in_str[2]+" "+month_global_mass[parseInt(date_in_str[1])-1]+" "+date_in_str[0]+"</b><br> Дата выезда: <b>"+date_out_str[2]+" "+month_global_mass[parseInt(date_out_str[1])-1]+" "+date_out_str[0]+"</b>"}}function regions_next_page(b){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";peremen=setTimeout("connect_error()",60000);document.getElementById("search_button").disabled=true;kol_timeout=1;var a=document.createElement("script");if(date_in_send==null||date_out_send==null){a.src="http://search.hotels24.ua/search/index/regions/?callback=getregion&search_str="+search_str+"&affiliate_id="+affiliate_id+"&next_page="+b+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{a.src="http://search.hotels24.ua/search/index/regions/?callback=getregion&search_str="+search_str+"&affiliate_id="+affiliate_id+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page="+b+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}a.type="text/javascript";document.body.appendChild(a)}function create_regions(a){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";peremen=setTimeout("connect_error()",60000);document.getElementById("search_button").disabled=true;kol_timeout=1;var b=document.createElement("script");if(date_in_send==null||date_out_send==null){b.src="http://search.hotels24.ua/search/index/regions/?callback=getregion&search_str="+a+"&affiliate_id="+affiliate_id+"&next_page=1&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{b.src="http://search.hotels24.ua/search/index/regions/?callback=getregion&search_str="+a+"&affiliate_id="+affiliate_id+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page=1&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}elem=0;i=0;while(masLink[i]!=null&&masLink[i]!=0){elem=i;i++}masLink[i]=b.src;b.type="text/javascript";document.body.appendChild(b)}function getregion(b){document.getElementById("search_button").disabled=false;kol_timeout=0;clearTimeout(peremen);back_button=2;document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");var e=document.getElementById("search_result");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<h4 style='margin:0 0 10px 0!important; padding:0 !important; font-size:14px;'>"+Lang.regions_word+"</h4>";e.appendChild(g);for(var d in b.regions){var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<a href='javascript:create_cityofregion("+d+")' class='regionItem'>"+b.regions[d]+"</a>";e.appendChild(g)}if(b.next_page){document.getElementById("next_page_a").innerHTML="";next_page_parent=document.getElementById("next_page_a");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<a href='javascript:regions_next_page("+b.next_page+")' title='"+Lang.next_regions+"'></a>";next_page_parent.appendChild(g);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(b.previous_page){document.getElementById("previous_page_a").innerHTML="";previous_page_parent=document.getElementById("previous_page_a");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<a href='javascript:regions_next_page("+b.previous_page+")' title='"+Lang.previous_regions+"'></a>";previous_page_parent.appendChild(g);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(!document.getElementById("previous_request").textContent&&(masLink[1]!=null&&masLink[1]!=0)){elem=0;i=0;while(masLink[i]!=null&&masLink[i]!=0&&masLink[i]!="undefined"){elem=i;i++}document.getElementById("previous_request").setAttribute("style","display:block;");var a=document.getElementById("previous_request");var f=document.createElement("div");f.setAttribute("style","display:block;");f.innerHTML="<a href=javascript:request('"+masLink[elem-1]+"')>&laquo; "+Lang.back_str+"</a>";a.appendChild(f)}if(date_in_send!=null&&date_out_send!=null){date_in_str=date_in_send.split("-");date_out_str=date_out_send.split("-");var c=document.getElementById("date_inout_selected");c.setAttribute("style","display:block;");c.innerHTML=Lang.begin_date+" <b>"+date_in_str[2]+" "+month_global_mass[parseInt(date_in_str[1])-1]+" "+date_in_str[0]+"</b><br> "+Lang.end_date+" <b>"+date_out_str[2]+" "+month_global_mass[parseInt(date_out_str[1])-1]+" "+date_out_str[0]+"</b>"}if(b.total_regions_count&&(b.next_page||b.previous_page)){document.getElementById("pagerText").setAttribute("style","display:block");document.getElementById("pagerText").innerHTML=Lang.find_count_regions_ver2;document.getElementById("pager_count").setAttribute("style","display:block;");if(b.next_page){this_page=(b.next_page-1)*5;document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+this_page+"</b> "+Lang.find_count_IZ+" <b>"+b.total_regions_count+"</b>"}else{this_page=(b.previous_page+1)*5;if((this_page-4)==b.total_regions_count){document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> "+Lang.find_count_IZ+" <b>"+b.total_regions_count+"</b>"}else{document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+b.total_regions_count+"</b> "+Lang.find_count_IZ+" <b>"+b.total_regions_count+"</b>"}}}}function city_next_page(b){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";peremen=setTimeout("connect_error()",60000);document.getElementById("search_button").disabled=true;kol_timeout=1;var a=document.createElement("script");if(date_in_send==null||date_out_send==null){a.src="http://search.hotels24.ua/search/index/cities/?callback=getcity&search_str="+search_str+"&affiliate_id="+affiliate_id+"&next_page="+b+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{a.src="http://search.hotels24.ua/search/index/cities/?callback=getcity&search_str="+search_str+"&affiliate_id="+affiliate_id+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page="+b+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}a.type="text/javascript";document.body.appendChild(a)}function create_city(a){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";peremen=setTimeout("connect_error()",60000);document.getElementById("search_button").disabled=true;kol_timeout=1;var b=document.createElement("script");if(date_in_send==null||date_out_send==null){b.src="http://search.hotels24.ua/search/index/cities/?callback=getcity&search_str="+a+"&affiliate_id="+affiliate_id+"&next_page=1&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{b.src="http://search.hotels24.ua/search/index/cities/?callback=getcity&search_str="+a+"&affiliate_id="+affiliate_id+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page=1&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}elem=0;i=0;while(masLink[i]!=null&&masLink[i]!=0){elem=i;i++}masLink[i]=b.src;b.type="text/javascript";document.body.appendChild(b)}function getcity(d){document.getElementById("search_button").disabled=false;kol_timeout=0;clearTimeout(peremen);back_button=2;document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");var g=document.getElementById("search_result");for(var h in d.cities){var a=document.createElement("div");a.setAttribute("style","display:block;");a.innerHTML="<span>"+d.cities[h]["region"]+" "+Lang.short_region+"</span> <a href='javascript:create_hotelsofcity("+h+", 1)'>"+Lang.short_city+" "+d.cities[h]["name"]+"</a>";g.appendChild(a)}if(d.next_page){document.getElementById("next_page_a").innerHTML="";next_page_parent=document.getElementById("next_page_a");var a=document.createElement("div");a.setAttribute("style","display:block;");a.innerHTML="<a href='javascript:city_next_page("+d.next_page+")' title='"+Lang.next_cities+"'></a>";next_page_parent.appendChild(a);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(d.previous_page){document.getElementById("previous_page_a").innerHTML="";previous_page_parent=document.getElementById("previous_page_a");var a=document.createElement("div");a.setAttribute("style","display:block;");a.innerHTML="<a href='javascript:city_next_page("+d.previous_page+")' title='"+Lang.previous_cities+"'></a>";previous_page_parent.appendChild(a);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(d.regions_count){var f=document.getElementById("aregion");var c=document.createElement("div");c.setAttribute("style","display:block;");c.innerHTML='<a href=javascript:create_regions("'+search_str+'")>'+Lang.find_regions+"</a>";f.appendChild(c);document.getElementById("aregion").setAttribute("style","display:block;")}if(!document.getElementById("previous_request").textContent&&(masLink[1]!=null&&masLink[1]!=0)){elem=0;i=0;while(masLink[i]!=null&&masLink[i]!=0&&masLink[i]!="undefined"){elem=i;i++}document.getElementById("previous_request").setAttribute("style","display:block;");var k=document.getElementById("previous_request");var e=document.createElement("div");e.setAttribute("style","display:block;");e.innerHTML="<a href=javascript:request('"+masLink[elem-1]+"')>&laquo;  "+Lang.back_str+"</a>";k.appendChild(e)}if(date_in_send!=null&&date_out_send!=null){date_in_str=date_in_send.split("-");date_out_str=date_out_send.split("-");var b=document.getElementById("date_inout_selected");b.setAttribute("style","display:block;");b.innerHTML=Lang.begin_date+" <b>"+date_in_str[2]+" "+month_global_mass[parseInt(date_in_str[1])-1]+" "+date_in_str[0]+"</b><br> "+Lang.end_date+" <b>"+date_out_str[2]+" "+month_global_mass[parseInt(date_out_str[1])-1]+" "+date_out_str[0]+"</b>"}if(d.total_cities_count&&(d.next_page||d.previous_page)){document.getElementById("pagerText").setAttribute("style","display:block");document.getElementById("pagerText").innerHTML=Lang.find_count_cities_ver2;document.getElementById("pager_count").setAttribute("style","display:block;");if(d.next_page){this_page=(d.next_page-1)*5;document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+this_page+"</b> "+Lang.find_count_IZ+" <b>"+d.total_cities_count+"</b>"}else{this_page=(d.previous_page+1)*5;if((this_page-4)==d.total_cities_count){document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> "+Lang.find_count_IZ+" <b>"+d.total_cities_count+"</b>"}else{document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+d.total_cities_count+"</b> "+Lang.find_count_IZ+" <b>"+d.total_cities_count+"</b>"}}}}function create_allregions(){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";peremen=setTimeout("connect_error()",60000);document.getElementById("search_button").disabled=true;kol_timeout=1;var a=document.createElement("script");if(date_in_send==null||date_out_send==null){a.src="http://search.hotels24.ua/search/index/regions/?callback=getallregion&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{a.src="http://search.hotels24.ua/search/index/regions/?callback=getallregion&affiliate_id="+affiliate_id+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}a.type="text/javascript";document.body.appendChild(a)}function getallregion(a){document.getElementById("search_button").disabled=false;kol_timeout=0;clearTimeout(peremen);document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");var d=document.getElementById("search_result");for(var c in a.regions){var e=document.createElement("div");e.setAttribute("style","display:block;");e.innerHTML="<a href='javascript:create_cityofregion()'>"+a.regions[c]+"</a>";d.appendChild(e)}if(date_in_send!=null&&date_out_send!=null){date_in_str=date_in_send.split("-");date_out_str=date_out_send.split("-");var b=document.getElementById("date_inout_selected");b.setAttribute("style","display:block;");b.innerHTML=Lang.begin_date+" <b>"+date_in_str[2]+" "+month_global_mass[parseInt(date_in_str[1])-1]+" "+date_in_str[0]+"</b><br> "+Lang.end_date+" <b>"+date_out_str[2]+" "+month_global_mass[parseInt(date_out_str[1])-1]+" "+date_out_str[0]+"</b>"}if(a.total_regions_count&&(a.next_page||a.previous_page)){document.getElementById("pagerText").setAttribute("style","display:block");document.getElementById("pagerText").innerHTML=Lang.find_count_regions_ver2;document.getElementById("pager_count").setAttribute("style","display:block;");if(a.next_page){this_page=(a.next_page-1)*5;document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+this_page+"</b> "+Lang.find_count_IZ+" <b>"+a.total_regions_count+"</b>"}else{this_page=(a.previous_page+1)*5;if((this_page-4)==a.total_regions_count){document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> "+Lang.find_count_IZ+" <b>"+a.total_regions_count+"</b>"}else{document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+a.total_regions_count+"</b> "+Lang.find_count_IZ+" <b>"+a.total_regions_count+"</b>"}}}}function cityofregion_next_page(c,b){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";peremen=setTimeout("connect_error()",60000);document.getElementById("search_button").disabled=true;kol_timeout=1;var a=document.createElement("script");if(date_in_send==null||date_out_send==null){a.src="http://search.hotels24.ua/search/index/regioncities/?callback=getcityofregion&region_id="+b+"&next_page="+c+"&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{a.src="http://search.hotels24.ua/search/index/regioncities/?callback=getcityofregion&region_id="+b+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page="+c+"&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}a.type="text/javascript";document.body.appendChild(a)}function create_cityofregion(b){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";peremen=setTimeout("connect_error()",60000);document.getElementById("search_button").disabled=true;kol_timeout=1;var a=document.createElement("script");if(date_in_send==null||date_out_send==null){a.src="http://search.hotels24.ua/search/index/regioncities/?callback=getcityofregion&region_id="+b+"&next_page=1&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{a.src="http://search.hotels24.ua/search/index/regioncities/?callback=getcityofregion&region_id="+b+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page=1&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}i=0;while(masLink[i]!=null&&masLink[i]!=0){i++}masLink[i]=a.src;a.type="text/javascript";document.body.appendChild(a)}function getcityofregion(b){document.getElementById("search_button").disabled=false;kol_timeout=0;clearTimeout(peremen);document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");var e=document.getElementById("search_result");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<h4 style='margin:0 0 10px 0!important; padding:0 !important; font-size:14px;'>"+b.region+" "+Lang.region_word+"</h4>";if(masLink[1]!=null&&masLink[1]!=0&&masLink[1]!="undefined"&&masLink[1]!=""){if(back_button!=1||back_button==null){document.getElementById("search_field").value=b.region}}back_button=2;e.appendChild(g);for(var d in b.cities){var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<a href='javascript:create_hotelsofcity("+d+", 1)' class='cityOfHot'>"+b.cities[d]+"</a>";e.appendChild(g)}if(b.next_page){document.getElementById("next_page_a").innerHTML="";next_page_parent=document.getElementById("next_page_a");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<a href='javascript:cityofregion_next_page("+b.next_page+", "+b.region_id+")' title='"+Lang.next_cities+"'></a>";next_page_parent.appendChild(g);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(b.previous_page){document.getElementById("previous_page_a").innerHTML="";previous_page_parent=document.getElementById("previous_page_a");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<a href='javascript:cityofregion_next_page("+b.previous_page+", "+b.region_id+")' title='"+Lang.previous_cities+"'></a>";previous_page_parent.appendChild(g);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(!document.getElementById("previous_request").textContent){elem=0;i=0;while(masLink[i]!=null&&masLink[i]!=0&&masLink[i]!="undefined"){elem=i;i++}if(masLink[1]!=null&&masLink[1]!=0&&masLink[1]!="undefined"&&masLink[1]!=""){document.getElementById("previous_request").setAttribute("style","display:block;");var a=document.getElementById("previous_request");var f=document.createElement("div");f.setAttribute("style","display:block;");f.innerHTML="<a href=javascript:request('"+masLink[elem-1]+"')>&laquo;  "+Lang.back_str+"</a>";a.appendChild(f)}}if(date_in_send!=null&&date_out_send!=null){date_in_str=date_in_send.split("-");date_out_str=date_out_send.split("-");var c=document.getElementById("date_inout_selected");c.setAttribute("style","display:block;");c.innerHTML=Lang.begin_date+" <b>"+date_in_str[2]+" "+month_global_mass[parseInt(date_in_str[1])-1]+" "+date_in_str[0]+"</b><br> "+Lang.end_date+" <b>"+date_out_str[2]+" "+month_global_mass[parseInt(date_out_str[1])-1]+" "+date_out_str[0]+"</b>"}if(b.total_cities_count&&(b.next_page||b.previous_page)){document.getElementById("pagerText").setAttribute("style","display:block");document.getElementById("pagerText").innerHTML=Lang.find_count_cities_ver2;document.getElementById("pager_count").setAttribute("style","display:block;");if(b.next_page){this_page=(b.next_page-1)*5;document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+this_page+"</b> "+Lang.find_count_IZ+" <b>"+b.total_cities_count+"</b>"}else{this_page=(b.previous_page+1)*5;if((this_page-4)==b.total_cities_count){document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> "+Lang.find_count_IZ+" <b>"+b.total_cities_count+"</b>"}else{document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+b.total_cities_count+"</b> "+Lang.find_count_IZ+" <b>"+b.total_cities_count+"</b>"}}}}function hotelsofcity_next_page(b,c){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";document.getElementById("search_button").disabled=true;kol_timeout=1;peremen=setTimeout("connect_error()",60000);back_button=1;var a=document.createElement("script");if(date_in_send==null||date_out_send==null){a.src="http://search.hotels24.ua/search/index/cityhotels/?callback=gethotelsofcity&city_id="+c+"&next_page="+b+"&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{a.src="http://search.hotels24.ua/search/index/cityhotels/?callback=gethotelsofcity&city_id="+c+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page="+b+"&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}a.type="text/javascript";document.body.appendChild(a)}function create_hotelsofcity(b,c){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";document.getElementById("search_button").disabled=true;kol_timeout=1;peremen=setTimeout("connect_error()",60000);var a=document.createElement("script");if(date_in_send==null||date_out_send==null){a.src="http://search.hotels24.ua/search/index/cityhotels/?callback=gethotelsofcity&city_id="+b+"&next_page="+c+"&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{a.src="http://search.hotels24.ua/search/index/cityhotels/?callback=gethotelsofcity&city_id="+b+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page="+c+"&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}i=0;while(masLink[i]!=null&&masLink[i]!=0){i++}masLink[i]=a.src;a.type="text/javascript";document.body.appendChild(a)}function gethotelsofcity(b){document.getElementById("search_button").disabled=false;kol_timeout=0;clearTimeout(peremen);document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");var e=document.getElementById("search_result");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<h4 style='margin:0 0 10px 0!important; padding:0 !important; font-size:14px;'>"+Lang.city_word+" "+b.city_name+"</h4>";if(back_button!=1){document.getElementById("search_field").value=b.city_name}back_button=2;e.appendChild(g);for(var d in b.hotels){var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<a href='javascript:create_roomsofhotel("+d+")' class='cityOfHot'>"+b.hotels[d]+"</a>";e.appendChild(g)}if(b.next_page){document.getElementById("next_page_a").innerHTML="";next_page_parent=document.getElementById("next_page_a");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<a href='javascript:hotelsofcity_next_page("+b.next_page+", "+b.city_id+")' title='"+Lang.next_hotels+"'></a>";next_page_parent.appendChild(g);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(b.previous_page){document.getElementById("previous_page_a").innerHTML="";previous_page_parent=document.getElementById("previous_page_a");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<a href='javascript:hotelsofcity_next_page("+b.previous_page+", "+b.city_id+")' title='"+Lang.previous_hotels+"'></a>";previous_page_parent.appendChild(g);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(!document.getElementById("previous_request").textContent){elem=0;i=0;while(masLink[i]!=null&&masLink[i]!=0&&masLink[i]!="undefined"){elem=i;i++}document.getElementById("previous_request").setAttribute("style","display:block;");var a=document.getElementById("previous_request");var f=document.createElement("div");f.setAttribute("style","display:block;");f.innerHTML="<a href=javascript:request('"+masLink[elem-1]+"')>&laquo;  "+Lang.back_str+"</a>";a.appendChild(f)}if(date_in_send!=null&&date_out_send!=null){date_in_str=date_in_send.split("-");date_out_str=date_out_send.split("-");var c=document.getElementById("date_inout_selected");c.setAttribute("style","display:block;");c.innerHTML=Lang.begin_date+" <b>"+date_in_str[2]+" "+month_global_mass[parseInt(date_in_str[1])-1]+" "+date_in_str[0]+"</b><br> "+Lang.end_date+" <b>"+date_out_str[2]+" "+month_global_mass[parseInt(date_out_str[1])-1]+" "+date_out_str[0]+"</b>"}if(b.total_hotels_count&&(b.next_page||b.previous_page)){document.getElementById("pagerText").setAttribute("style","display:block");document.getElementById("pagerText").innerHTML=Lang.find_count_hotels_ver2;document.getElementById("pager_count").setAttribute("style","display:block;");if(b.next_page){this_page=(b.next_page-1)*5;document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+this_page+"</b> "+Lang.find_count_IZ+" <b>"+b.total_hotels_count+"</b>"}else{this_page=(b.previous_page+1)*5;if((this_page-4)==b.total_hotels_count){document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> "+Lang.find_count_IZ+" <b>"+b.total_hotels_count+"</b>"}else{document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+b.total_hotels_count+"</b> "+Lang.find_count_IZ+" <b>"+b.total_hotels_count+"</b>"}}}}function rooms_next_page(b,c){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";document.getElementById("search_button").disabled=true;kol_timeout=1;peremen=setTimeout("connect_error()",60000);var a=document.createElement("script");if(date_in_send==null||date_out_send==null){a.src="http://search.hotels24.ua/search/index/rooms/?callback=getroomsofhotel&hotel_id="+b+"&next_page="+c+"&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{a.src="http://search.hotels24.ua/search/index/rooms/?callback=getroomsofhotel&hotel_id="+b+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page="+c+"&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}a.type="text/javascript";document.body.appendChild(a)}function create_roomsofhotel(b){document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";document.getElementById("search_button").disabled=true;kol_timeout=1;peremen=setTimeout("connect_error()",60000);var a=document.createElement("script");if(date_in_send==null||date_out_send==null){a.src="http://search.hotels24.ua/search/index/rooms/?callback=getroomsofhotel&hotel_id="+b+"&next_page=1&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}else{a.src="http://search.hotels24.ua/search/index/rooms/?callback=getroomsofhotel&hotel_id="+b+"&begin_date="+date_in_send+"&end_date="+date_out_send+"&next_page=1&affiliate_id="+affiliate_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id}elem=0;i=0;while(masLink[i]!=null&&masLink[i]!=0){elem=i;i++}masLink[i]=a.src;a.type="text/javascript";document.body.appendChild(a)}function getroomsofhotel(b){document.getElementById("search_button").disabled=false;kol_timeout=0;clearTimeout(peremen);document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");var e=document.getElementById("search_result");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<h4 style='margin:0 0 10px 0!important; padding:0 !important; font-size:14px;'>"+Lang.short_city+b.city+" "+b.hotel+"</h4>";if(back_button==null){reg=/''([^\"]+)''/;hotel_field=reg.exec(b.hotel);str_value=b.city+", "+hotel_field[1];document.getElementById("search_field").value=str_value}else{if(back_button!=1){city_field=b.city;reg=/''([^\"]+)''/;hotel_field=reg.exec(b.hotel);str_value=city_field+", "+hotel_field[1];document.getElementById("search_field").value=str_value}}back_button=2;e.appendChild(g);for(var d in b.rooms){var g=document.createElement("div");g.setAttribute("style","display:block;");g.setAttribute("class","infoBlockWrap");rooms_avaible_str=b.rooms[d]["avaible_count"]+"";last_symbol=rooms_avaible_str.length-1;rooms_avaible_str=rooms_avaible_str.charAt(last_symbol);if(parseInt(rooms_avaible_str)==1){nomer_str=Lang.numer_str1}else{if(parseInt(rooms_avaible_str)==2||parseInt(rooms_avaible_str)==3||parseInt(rooms_avaible_str)==4){nomer_str=Lang.numer_str2}else{nomer_str=Lang.numer_str3}}if(b.rooms[d]["avaible_count"]>10&&b.rooms[d]["avaible_count"]<20){nomer_str=Lang.numer_str3}if(date_in_send==null||date_out_send==null){if(b.rooms[d]["room_name"]=="I"||b.rooms[d]["room_name"]=="II"||b.rooms[d]["room_name"]=="III"||b.rooms[d]["room_name"]=="IV"||b.rooms[d]["room_name"]=="V"||b.rooms[d]["room_name"]=="VI"||b.rooms[d]["room_name"]=="VII"||b.rooms[d]["room_name"]=="VIII"||b.rooms[d]["room_name"]=="IX"||b.rooms[d]["room_name"]=="X"||b.rooms[d]["room_name"]=="XI"||b.rooms[d]["room_name"]=="XII"){g.innerHTML="<span style='float:left !important; margin-left:0 !important; width:63%;'><a href='http://hotels24.ua/?target=brony&action=brony&hotel_id="+b.hotel_id+"&affiliate_id="+affiliate_id+"' target='_blank'>"+Lang.numer_word+" &quot;"+b.rooms[d]["room_name"]+"&quot;</a><u>"+b.rooms[d]["avaible_count"]+" "+nomer_str+"</u></span><div class='infopriceWid'><strong>"+b.rooms[d]["min_price"]+" "+Lang.valuta+" </strong></div>"}else{g.innerHTML="<span style='float:left !important; margin-left:0 !important; width:63%;'><a href='http://hotels24.ua/?target=brony&action=brony&hotel_id="+b.hotel_id+"&affiliate_id="+affiliate_id+"' target='_blank'>"+b.rooms[d]["room_name"]+"</a><u>"+b.rooms[d]["avaible_count"]+" "+nomer_str+"</u></span><div class='infopriceWid'><strong>"+b.rooms[d]["min_price"]+" "+Lang.valuta+" </strong></div>"}}else{if(b.rooms[d]["room_name"]=="I"||b.rooms[d]["room_name"]=="II"||b.rooms[d]["room_name"]=="III"||b.rooms[d]["room_name"]=="IV"||b.rooms[d]["room_name"]=="V"||b.rooms[d]["room_name"]=="VI"||b.rooms[d]["room_name"]=="VII"||b.rooms[d]["room_name"]=="VIII"||b.rooms[d]["room_name"]=="IX"||b.rooms[d]["room_name"]=="X"||b.rooms[d]["room_name"]=="XI"||b.rooms[d]["room_name"]=="XII"){g.innerHTML="<span style='float:left !important; margin-left:0 !important; width:63%;'><a href='http://hotels24.ua/?target=brony&action=brony&hotel_id="+b.hotel_id+"&affiliate_id="+affiliate_id+"&date_begin="+date_in_send+"&date_end="+date_out_send+"' target='_blank'>"+Lang.numer_word+" &quot;"+b.rooms[d]["room_name"]+"&quot;</a><u>"+b.rooms[d]["avaible_count"]+" "+nomer_str+"</u></span><div class='infopriceWid'><strong>"+b.rooms[d]["min_price"]+" "+Lang.valuta+" </strong></div>"}else{g.innerHTML="<span style='float:left !important; margin-left:0 !important; width:63%;'><a href='http://hotels24.ua/?target=brony&action=brony&hotel_id="+b.hotel_id+"&affiliate_id="+affiliate_id+"&date_begin="+date_in_send+"&date_end="+date_out_send+"' target='_blank'>"+b.rooms[d]["room_name"]+"</a><u>"+b.rooms[d]["avaible_count"]+" "+nomer_str+"</u></span><div class='infopriceWid'><strong>"+b.rooms[d]["min_price"]+" "+Lang.valuta+" </strong></div>"}}e.appendChild(g)}if(b.next_page){document.getElementById("next_page_a").innerHTML="";next_page_parent=document.getElementById("next_page_a");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<a href='javascript:rooms_next_page("+b.partner_hotel_id+", "+b.next_page+")' title='"+Lang.next_room+"'></a>";next_page_parent.appendChild(g);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(b.previous_page){document.getElementById("previous_page_a").innerHTML="";previous_page_parent=document.getElementById("previous_page_a");var g=document.createElement("div");g.setAttribute("style","display:block;");g.innerHTML="<a href='javascript:rooms_next_page("+b.partner_hotel_id+", "+b.previous_page+")' title='"+Lang.previous_room+"'></a>";previous_page_parent.appendChild(g);document.getElementById("pagerWid").setAttribute("style","display:block;")}if(!document.getElementById("previous_request").textContent&&masLink[1]!=null&&masLink[1]!=0){elem=0;i=0;while(masLink[i]!=null&&masLink[i]!=0&&masLink[i]!="undefined"){elem=i;i++}document.getElementById("previous_request").setAttribute("style","display:block;");var a=document.getElementById("previous_request");var f=document.createElement("div");f.setAttribute("style","display:block;");if(masLink[elem-1]!=null){f.innerHTML="<a href=javascript:request('"+masLink[elem-1]+"')>&laquo;  "+Lang.back_str+"</a>"}else{f.innerHTML="<a href=javascript:request('"+masLink[elem]+"')>&laquo;  "+Lang.back_str+"</a>"}a.appendChild(f)}else{if(!document.getElementById("previous_request").textContent&&(masLink[1]==null||masLink[1]==0)){search_str=b.city;document.getElementById("previous_request").setAttribute("style","display:block;");var a=document.getElementById("previous_request");var f=document.createElement("div");f.setAttribute("style","display:block;");request_hotels="http://search.hotels24.ua/search/index/hotels/?callback=search_request&search_str="+b.city+"&next_page=1&hotel_id="+b.hotel_id+"&lang_id="+lang_id+"&selected_region_id="+selected_region_id+"&selected_top_region_id="+selected_top_region_id;f.innerHTML="<a href=javascript:but_search('hotelsofcity')>&laquo;  "+Lang.hotels_of_city+"</a>";a.appendChild(f);elem=0;i=0}}if(date_in_send!=null&&date_out_send!=null){date_in_str=date_in_send.split("-");date_out_str=date_out_send.split("-");var c=document.getElementById("date_inout_selected");c.setAttribute("style","display:block;");c.innerHTML=Lang.begin_date+" <b>"+date_in_str[2]+" "+month_global_mass[parseInt(date_in_str[1])-1]+" "+date_in_str[0]+"</b><br> "+Lang.end_date+" <b>"+date_out_str[2]+" "+month_global_mass[parseInt(date_out_str[1])-1]+" "+date_out_str[0]+"</b>"}if(b.total_rooms_count&&(b.next_page||b.previous_page)){document.getElementById("pagerText").setAttribute("style","display:block");document.getElementById("pagerText").innerHTML=Lang.find_count_rooms_ver2;document.getElementById("pager_count").setAttribute("style","display:block;");if(b.next_page){this_page=(b.next_page-1)*5;document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+this_page+"</b> "+Lang.find_count_IZ+" <b>"+b.total_rooms_count+"</b>"}else{this_page=(b.previous_page+1)*5;if((this_page-4)==b.total_rooms_count){document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> "+Lang.find_count_IZ+" <b>"+b.total_rooms_count+"</b>"}else{document.getElementById("pager_count").innerHTML="<b>"+(this_page-4)+"</b> - <b>"+b.total_rooms_count+"</b> "+Lang.find_count_IZ+" <b>"+b.total_rooms_count+"</b>"}}}}function request(b){document.getElementById("search_button").disabled=true;kol_timeout=1;peremen=setTimeout("connect_error()",60000);back_button=1;i=0;elem=0;while(masLink[i]!=null&&masLink[i]!=0&&masLink[i]!="undefined"){elem=i;i++}masLink[elem]=0;document.getElementById("previous_request").innerHTML="";document.getElementById("previous_request").setAttribute("style","display:none;");document.getElementById("search_result").innerHTML="";document.getElementById("next_page_a").innerHTML="";document.getElementById("previous_page_a").innerHTML="";document.getElementById("pagerWid").setAttribute("style","display:none;");document.getElementById("acity").innerHTML="";document.getElementById("aregion").innerHTML="";document.getElementById("acity").setAttribute("style","display:none;");document.getElementById("aregion").setAttribute("style","display:none;");document.getElementById("date_inout_selected").innerHTML="";document.getElementById("date_inout_selected").setAttribute("style","display: none;");document.getElementById("pager_count").innerHTML="";document.getElementById("pager_count").setAttribute("style","display:none");document.getElementById("pagerText").innerHTML="";document.getElementById("pagerText").setAttribute("style","display:none");document.getElementById("search_result").innerHTML="<img src='http://widget.hotels24.ua/ajax-loader.gif'>";var a=document.createElement("script");a.src=b;a.type="text/javascript";document.body.appendChild(a)};
