__search = {
		
	sTimeOut: undefined,
	
	initialize: function(func){
		
		var _this = this;
		
		// bind events for inputs in search area
		$('#center-search').find('input,select').bind('click keyup', function(e){
			
			var sEvent = e.type;
			var sType = $(this).attr('type');
			
			if( (sEvent == 'click' && sType == 'text') || e.keyCode == 9 ){
				/*
				 * disable requests on TAB and CLICK in text-inputs * 
				 */
			}else{				
				
				if(_this.sTimeOut != undefined) {
	                clearTimeout(_this.sTimeOut);
		        }
		        
				_this.sTimeOut = setTimeout(function() {
	        		_this.sTimeOut = undefined;
	                
					_this.search(func);			
					
	        	}, 700);
			}
		});
		
		/* front map region labels */
		$('.landkort_wrap div.front_landsdel').each(function(){
			$(this).css('cursor', 'pointer');
			$(this).click(function(){				
				sType = $(this).attr('id').substring(6);
				
				$('#search-province input[type="checkbox"]').each(function(){
					$(this).attr('checked', false);
					if($(this).val() == sType){
						$(this).attr('checked', true);
					}
				});
				
				$('#center-search').submit();
			});
			
		});
		
		_this.search(func);
		
	},	
	search: function(func){
		var _this = this;
		
		oAjax.search(
			{ stConfig: $.toJSON(_this.config()) }
			, eval(func)
			, _handleAjaxError
		);				
	},
	config: function(){
		
		var aPr = [];
		$('input:checked[name="pr"]').each(function(){
			aPr.push($(this).val());
		})
		
		return {
			p: $('#p_elm').val(),
			t: $('#t_elm').attr('checked'),
			b: ($('#b_elm').val() == undefined)? '': $('#b_elm').val(),
			s: ($('#s_elm').val() == undefined)? '': $('#s_elm').val(),
			d: ($('#d_elm').val() == undefined)? '': $('#d_elm').val(),
			pr: aPr,
			at: ($('#at_elm').val() == undefined)? '': $('#at_elm').val(),
			ft: ($('#ft_elm').val() == undefined)? '': $('#ft_elm').val()
		}
	}
	
		
}
		
