var Suggest = {
	search: function (url){ 
		if ($('show_similar_properties') && !$('show_similar_properties').visible()){
			
			$('suggest_similar_progress') ? $('suggest_similar_progress').show() : null;
			new Ajax.Updater ('show_similar_properties','/secciones/ajax_suggest.php',{
				method:'get',
				asynchronous:true,
				evalScripts:true,
				parameters:url,
				
				onFailure:function(request){ alert('Failure'); },
				
				onSuccess:function(request){ 
					/*new Effect.BlindDown('show_similar_properties', {duration: 0.5, afterFinish:function(){
						new Effect.ScrollTo('show_similar_properties', {offset: -150});
					}});
					*/
					$('show_similar_properties') ? $('show_similar_properties').show() : null;
				},
					
				onComplete:function(request){ 
					$('suggest_similar_progress') ? $('suggest_similar_progress').hide() : null;
				}
			});
		}
		else{
			$('show_similar_properties') ? $('show_similar_properties').hide() : null;
		}
	}
	
}

var Search = {
	location:function (url){
		
		if ($('show_other_properties') && !$('show_other_properties').visible()){
			
			$('show_other_properties_progress') ? $('show_other_properties_progress').show() : null;
			$('comment_other_properties') ? $('comment_other_properties').show() : null;
			
			new Ajax.Updater ('show_other_properties','/secciones/ajax_search_location.php',{
				method:'get',
				asynchronous:true,
				evalScripts:true,
				parameters:url,
				
				onFailure:function(request){ alert('Failure'); },
				
				onSuccess:function(request){ 
					/*new Effect.BlindDown('show_similar_properties', {duration: 0.5, afterFinish:function(){
						new Effect.ScrollTo('show_similar_properties', {offset: -150});
					}});
					*/
					$('show_other_properties') ? $('show_other_properties').show() : null;
				},
					
				onComplete:function(request){ 
					$('show_other_properties_progress') ? $('show_other_properties_progress').hide() : null;
					$('comment_other_properties') ? $('comment_other_properties').hide() : null;
				}
			});
		}
		else{
			$('show_other_properties') ? $('show_other_properties').hide() : null;
		}
	}
	
}