function submitForm(e)
{
	var obj = getEventObject(e);
	
	if (obj.id != 'tournament' & obj.id != 'season')
	{
		//If anything other than the tournament/season dropdowns are selected
		// the aforementioned dropdowns must be initialised
		if (document.getElementById('tournament'))
		{
			tt = document.getElementById('tournament');
			tt.selectedIndex = 0;
		}
		if (document.getElementById('season'))
		{
			ss = document.getElementById('season');
			ss.selectedIndex = 0;
		}
	}

	document.roh.submit();	
}

function addListeners(e)
{
	if (!document.getElementById)
    	return;
  
	if (document.getElementById('tournamentcategory'))
	{
		var dropdown = document.getElementById('tournamentcategory');
		addEvent(dropdown,'change',submitForm,false);		
	}
	
	if (document.getElementsByName('searchtype'))
	{
		radios = document.getElementsByName('searchtype');	
		for(i=0;i<radios.length;i++)
		{
			addEvent(radios[i],'click',submitForm,false);
		}
	}
//	if (document.getElementById('tournamentsearch'))
//	{
//		var radios = document.getElementById('tournamentsearch');	
//			addEvent(radios,'change',submitForm,false);
//	}
//	if (document.getElementById('seasonsearch'))
//	{
//		radios = document.getElementById('seasonsearch');	
//
//			addEvent(radios,'change',submitForm,false);
//
//	}

	if (document.getElementById('tournament'))
	{
		var dropdown = document.getElementById('tournament');
		addEvent(dropdown,'change',submitForm,false);		
	}
	if (document.getElementById('season'))
	{
		var dropdown = document.getElementById('season');
		addEvent(dropdown,'change',submitForm,false);		
	}

}