FindEventHelper						= {
	
	showMagazineSelectBox:function() {
		document.getElementById('eventSelectorBySector').className = "hide";
		document.getElementById('eventSelectorByMagazine').className = "show";
	},
	
	showSectorSelectBox:function() {
		document.getElementById('eventSelectorByMagazine').className = "hide";
		document.getElementById('eventSelectorBySector').className = "show";
	},
	
	getEvent:function() {
		var i = 0;
		var radioButtonChecked = "";
		var selectBox = "";
		var optionValue = "";
				
		for( i = 0; i < document.frmEventSearch.findBy.length; i++ ){
			if(document.frmEventSearch.findBy[i].checked == true )
				radioButtonChecked = document.frmEventSearch.findBy[i].value;
		}		
		
		if(radioButtonChecked == "byIndustrySector"){
			selectBox = document.getElementById("eventSelectorBySector");	
		}else if(radioButtonChecked == "byMagazine"){
			selectBox = document.getElementById("eventSelectorByMagazine");
		}	
		
		for(i = 0; i < selectBox.options.length; i++){
			if(selectBox.options[i].selected){
				optionValue = selectBox.options[i].value;
			}		
		}
		
		var event = optionValue.split(","); 
		
		FindEventHelper.goToEvent(event[0],event[1], event[2]);	
			
	},
	
	goToEvent:function(eventId, eventTypeId, eventSEOName) {
		if(eventTypeId == 1){
			window.location = '/awardDetail/'+ eventId + '/' + eventSEOName;
		}	
		if(eventTypeId == 2){
			window.location = '/conferenceDetail/' + eventId + '/' + eventSEOName;
		}	
		if(eventTypeId == 3){
			window.location = '/forumDetail/' + eventId + '/' + eventSEOName;	
		}
	}	
}
