	function showList(_this,module)
{
	$("#loader").css("visibility", "visible");
	remoreAuto();

	var str = _this.value;
	if (str.length < 3) return false;
	
	//var cmd = eval("SmartyAjax.update('company-ac', '/index.php', 'get', '&a=location_search&location=' + str)");
	//setTimeout(cmd,1250);
	//SmartyAjax.update('company-ac', '/index.php', 'get', '&a=location_search&location=' + str);
	
	 $.ajax({
   type: "POST",
   url: "/index.php",
   data: "&a=ajax.location_search&location=" + str,
   success: function(msg){
     //alert( "Data Saved: " + msg );
	 $("#company-ac").html(msg);
	 $("#loader").css("visibility", "hidden");
   }
 });


	return false;
}

function checkBookingResult(orderid,onrequest)
{
	if(document.getElementById('stop').value=='1') return false;
	
	 $.ajax({
   type: "POST",
   url: "/index.php",
   data: "&a=ajax.payment_result&orderid=" + orderid+"&onRequest="+onrequest,
   success: function(msg){
     //alert( "Data Saved: " + msg );
	 var ResArr = msg.split('###');
	 
	 if(ResArr[0]=="stop"){
	 	$("#result").html(ResArr[1]);
		document.getElementById('stop').value='1';
	 }
	 
   }
 });


	return false;
}

function changeBgJob(_this,bool,fill)
{

	if( bool==1 )
	{
		_this.style.backgroundColor = "#F6FBFF";

	}
	else
	{
		if( fill%2>0 )
			_this.style.backgroundColor = "#FAFAFA";
		else
			_this.style.backgroundColor = "#FFFFFF";


	}

}

function remoreAuto()
{
	$('#company-ac').html('');
}

function showDescription(hotel){

	if(($("#hotel_menu_desc").attr("class")!='hotel_menu_active')) {
		
		$("#container_hotel_info").css("display", "block"); 
		$("#container_hotel_info").html('<img src="/img/progress.gif">');
		
		$("#hotel_menu_desc").attr("class",'hotel_menu_active');
		$("#hotel_menu_photos").attr("class",'hotel_menu');
		$("#hotel_menu_map").attr("class",'hotel_menu');
		$("#container_map").css("display", "none"); 
		
		$.ajax({
	   type: "POST",
	   url: "/index.php",
	   data: "&a=ajax.hotel_info&m=desc&HotelCode=" + hotel,
	   success: function(msg){
     //alert( "Data Saved: " + msg );
	 $("#container_hotel_info").html(msg);
   }
 	});


	
	}
	return false;
	
}

function showPhotos(hotel){
	
	if(($("#hotel_menu_photos").attr("class")!='hotel_menu_active')) {
		
		$("#container_hotel_info").css("display", "block"); 
		$("#container_hotel_info").html('<img src="/img/progress.gif">');
	
		$("#hotel_menu_desc").attr("class",'hotel_menu');
		$("#hotel_menu_photos").attr("class",'hotel_menu_active');
		$("#hotel_menu_map").attr("class",'hotel_menu');
		$("#container_map").css("display", "none"); 
		
	$.ajax({
	   	type: "POST",
	   	url: "/index.php",
	   	data: "&a=ajax.hotel_info&m=photos&HotelCode=" + hotel,
	   	success: function(msg){
     	//alert( "Data Saved: " + msg );
	 	$("#container_hotel_info").html(msg);
   		}
 	});
	
	}
		return false;
}

function showMap(hotel){
	
	if(($("#hotel_menu_map").attr("class")!='hotel_menu_active')) {
	
		$("#container_hotel_info").html('<img src="/img/progress.gif">');
	
		$("#hotel_menu_desc").attr("class",'hotel_menu');
		$("#hotel_menu_photos").attr("class",'hotel_menu');
		$("#hotel_menu_map").attr("class",'hotel_menu_active');
		$("#container_map").css("display", "block"); 
		$("#container_hotel_info").css("display", "none"); 
		
		
/*
	$.ajax({
	   type: "POST",
	   url: "/index.php",
	   data: "&a=ajax.hotel_info&m=map&HotelCode=" + hotel,
	   success: function(msg){
     //alert( "Data Saved: " + msg );
	 $("#container_hotel_info").html(msg);
   }
 	});
*/		
	}
	
	return false;
}

function showRooms(){
	
	if(($("#hotel_menu_rooms").attr("class")!='hotel_menu_active')) {
	
		//$("#container_hotel_res").html('<img src="/img/progress.gif">');
	
		$("#hotel_menu_res").attr("class",'hotel_menu');
		$("#hotel_menu_rooms").attr("class",'hotel_menu_active');
		$("#container_hotel_rooms").css("display", "block"); 
		$("#container_hotel_res").css("display", "none"); 
		
		
/*
	$.ajax({
	   type: "POST",
	   url: "/index.php",
	   data: "&a=ajax.hotel_info&m=map&HotelCode=" + hotel,
	   success: function(msg){
     //alert( "Data Saved: " + msg );
	 $("#container_hotel_info").html(msg);
   }
 	});
*/		
	}
	
	return false;
}

function showRes(){
	
	if(($("#hotel_menu_res").attr("class")!='hotel_menu_active')) {
	
		//$("#container_hotel_rooms").html('<img src="/img/progress.gif">');
	
		$("#hotel_menu_rooms").attr("class",'hotel_menu');
		$("#hotel_menu_res").attr("class",'hotel_menu_active');
		$("#container_hotel_res").css("display", "block"); 
		$("#container_hotel_rooms").css("display", "none"); 
		
		
/*
	$.ajax({
	   type: "POST",
	   url: "/index.php",
	   data: "&a=ajax.hotel_info&m=map&HotelCode=" + hotel,
	   success: function(msg){
     //alert( "Data Saved: " + msg );
	 $("#container_hotel_info").html(msg);
   }
 	});
*/		
	}
	
	return false;
}

function validate_search_form(){
//form.ping_new_link.value
	
	if(Validate())document.forms["search_form"].submit();
}

function unckeckStarsFilter(t){
	if(t=='0') {
	document.getElementById('s_any').checked = false;
	}
	if(t=='1') {
	document.getElementById('s_1').checked = false;
	document.getElementById('s_2').checked = false;
	document.getElementById('s_3').checked = false;
	document.getElementById('s_4').checked = false;
	document.getElementById('s_5').checked = false;
	}
}


