// JavaScript Document

var ASearch = {
	
	init:function(){
		
	},
	resetAll:function(){
		
		$('day').selectedIndex = 0;
		$('location').selectedIndex = 0;
		$('type').selectedIndex = 0;
		$('time').selectedIndex = 0;
		$('level').selectedIndex = 0;
		$('term').value = '';
	},
	doSearch:function(){
	
	Element.update('searchresults',"<img src='images/loader_trans.gif' /> Searching . . . ");
	
	var _q =    "action=advancedsearch" +
				"&sort[day]=" + $F('day') +
				"&sort[location_id]="+$F('location') +
				"&sort[level]="+ $F('level') +
				"&sort[type]=" + $F('type') +
				"&sort[time]=" + $F('time') + 
				"&term="+$F('term');
		
				var ajax = new Ajax.Updater('searchresults','ajax',{
				onComplete:function(){
					
				},
				postBody:_q,
				method:'post',
				evalScripts:false});		
	}
}