 function gettourscount(){   
											
									jQuery.getJSON("http://www.tourtrans.ru/ajax/jsonSearch_tours.html?"+jQuery("#tours_search_form").serialize()+"&jsoncallback=?", function(data) {	
											jQuery("#SearchForm_result").html(data.result);						
										});	
										
								    }

								    function getcities(country, i){
								    
								    $("#SearchForm_city_"+i).attr("disabled", "true");
									gettourscount();
								    
								    jQuery.getJSON("http://www.tourtrans.ru/ajax/jsonDynamiccities.html?country_id="+country+"&jsoncallback=?", function(data) {	
										jQuery("#SearchForm_city_"+i).html(data.cities).removeAttr("disabled");							
									});
									
									for (b=i+1;b<3;b++){
											$("#SearchForm_country_"+b).val(0).attr("disabled", "true");
											$("#SearchForm_city_"+b).val(0).attr("disabled", "true");
										}

										if (i<2){
										
										jQuery.getJSON("http://www.tourtrans.ru/ajax/jsonDynamiccountries.html?"+jQuery("#tours_search_form").serialize()+"&jsoncallback=?", function(data) {	
											jQuery("#SearchForm_country_"+(i+1)).html(data.countries).removeAttr("disabled");						
										});	
									}
										
								}

function gettoursearch(url){
jQuery.getJSON("http://www.tourtrans.ru/ajax/exportSearch.html?url="+encodeURIComponent(url)+"&"+window.location.search+"&jsoncallback=?", function(data) {
		
				$('#search_tours').html(data.search);				
					
					var $inp=$(".selectbycountry");
							     	$inp.each(function() {
							 			if ($(this).children().size()<=1) $(this).attr("disabled", "true");							     			
							    	});
					
					$("#avia_dateout").datepicker({minDate:'0',showAnim:'slideDown',showOn:'both',buttonImage:'http://www.tourtrans.ru/js/agencies/ui/images/calendar_01.png',buttonImageOnly:true,numberOfMonths:3});$("#ui-datepicker-div").css("font-size", "0.5em");
					$("#avia_dateback").datepicker({minDate:'0',showAnim:'slideDown',showOn:'both',buttonImage:'http://www.tourtrans.ru/js/agencies/ui/images/calendar_01.png',buttonImageOnly:true,numberOfMonths:3});$("#ui-datepicker-div").css("font-size", "0.5em");		    	
					
		
				});
}
