var switch_play=1;function check_browser_ok(){var browser_error=document.getElementById('browser_error');browser_error.style.left=(document.body.offsetWidth-300)/2+'px';browser_error.style.top=(document.body.offsetHeight-110)/2+'px';if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var ieversion=new Number(RegExp.$1)
if(ieversion>=6)
return true;}}
function set_county(country_id)
{$("select#city option").remove();$("select#county option").remove();if(country_id!=1){$("#user_county").css("display","none");$("#user_city").css("display","none");if(country_id==1001){$("#other_country").css("display","");}
else
{$("#other_country").css("display","none");}
return;}else{$("#other_country").css("display","none");$("#user_county").css("display","");$("#user_city").css("display","");$("#user_county select").css("width","184px");$("#user_city select").css("width","184px");}
var row="<option>Loading...</option>";$(row).appendTo("select#county");$("select#county").width('186');if(country_id>0&&country_id!=""){$.ajax({type:"GET",dataType:"json",cache:false,url:'ajax.php?action=get_counties&country_id='+country_id,error:function(XMLHttpRequest,textStatus,errorThrown){this;},success:function(data){$("select#county option").remove();var row="<option>Alege Judetul</option>";$(row).appendTo("select#county");$.each(data,function(i,j){if(j.value!='undefined'){var row="<option value=\""+j.value+"\">"+j.text+"</option>";$(row).appendTo("select#county");}});$("select#county").width('186');if(!$("#user_county"))
initialize();}});}else{$("select#county option").remove();}}
function set_city(county_id)
{$("select#city option").remove();var row="<option>Loading...</option>";$(row).appendTo("select#city");if(county_id>0&&county_id!=""){$.ajax({type:"GET",dataType:"json",cache:false,url:'ajax.php?action=get_cities&county_id='+county_id,error:function(XMLHttpRequest,textStatus,errorThrown){},success:function(data){$("select#city option").remove();$.each(data,function(i,j){var row="<option value=\""+j.value+"\">"+j.text+"</option>";$(row).appendTo("select#city");});}});}else{$("select#city option").remove();}}
function set_city1(county_id)
{$("select#city1 option").remove();var row="<option>Loading...</option>";$(row).appendTo("select#city1");if(county_id>0&&county_id!=""){$.ajax({type:"GET",dataType:"json",cache:false,url:'ajax.php?action=get_cities&county_id='+county_id,error:function(XMLHttpRequest,textStatus,errorThrown){},success:function(data){$("select#city1 option").remove();$.each(data,function(i,j){var row="<option value=\""+j.value+"\">"+j.text+"</option>";$(row).appendTo("select#city1");});}});}else{$("select#city1 option").remove();}}
function set_event_type(cat)
{$("select#event_type2 option").remove();var row="<option>Loading...</option>";$(row).appendTo("select#event_type2");if(cat!=""){$.ajax({type:"GET",dataType:"json",cache:false,url:'ajax.php?action=get_event_types&cat='+cat,error:function(XMLHttpRequest,textStatus,errorThrown){},success:function(data){$("select#event_type2 option").remove();$.each(data,function(i,j){var row="<option value=\""+j.value+"\">"+j.text+"</option>";$(row).appendTo("select#event_type2");});}});}else{$("select#event_type2 option").remove();}}
function toggle_filter(id){var e=document.getElementById(id);if(e.checked)
e.checked=false;else
e.checked=true;}
function newsswitch(){if(switch_play==1){var $active=$('.news_list li.selected');if($active.length==0)$active=$('.news_list li:last');var $next=$active.next().length?$active.next():$('.news_list li:first');var id=$active.attr('alt');var next_id=$next.attr('alt');$("#news_description_"+id).css({'z-index':100});$("#news_description_"+next_id).css({'opacity':0.0}).animate({'opacity':1.0},1000,function(){$(this).addClass('active');$next.addClass('selected');$(".news_list").removeClass("selected");$active.removeClass("selected");$next.addClass("selected");$("#news_description_"+id).removeClass('active');});}}
function moreprods(){var p=$('#more_rooms').attr("title");$('#more_rooms').replaceWith('<div class="loader" id="loader1"><img src="images/loader.white___.gif" width="50"><br>LOADING...</div>');$.ajax({type:"GET",dataType:"text",cache:false,url:'ajax.php?action=more_rooms&'+p,timeout:8000,error:function(XMLHttpRequest,textStatus,errorThrown){this;},success:function(data){$("#loader1").parent().parent().replaceWith(data);}});return false;}
function backtop(){$(document).scrollTo(0,800,{queue:true});return false;}
