var eventWin;

function popEvent(id,typeid) {
	var x = 50;
	var y = 50;
	if (typeid == 4) {
		var thisURL = "athletic_event_detail.cfm?&id="+id;
	} else {
		var thisURL = "event_detail.cfm?&id="+id;
	}
	var features = "scrollbars=1,left="+x+",top="+y+",screenX="+x+",screenY="+y+",width=505,height=410";
	if (!eventWin || eventWin.closed) {
		eventWin = window.open(thisURL,"win",features);
	} else {
		eventWin.location = thisURL;
		eventWin.focus();
	}
}

	function setVal(form) {
		var val = form.sport_season.options[form.sport_season.selectedIndex].value;
		var sportid =  val.substring(0,val.indexOf("_"));
		var seasonid = val.substring(val.indexOf("_")+1);
		form.sport_id.value = sportid;
		form.season_id.value = seasonid;
		form.submit();	
	}
	
function popDirections(id) {
	var x = 50;
	var y = 50;
	var thisURL = "opponent_directions.cfm?&id="+id;
	
	var features = "scrollbars=1,left="+x+",top="+y+",screenX="+x+",screenY="+y+",width=505,height=410";
	
	if (!eventWin || eventWin.closed) {
		eventWin = window.open(thisURL,"win",features);
	} else {
		eventWin.location = thisURL;
		eventWin.focus();
	}
}

function navToOpponent(obj) {
	var val = obj.options[obj.selectedIndex].value;
	location.href = "#"+val;
}