function seasonSelect(season){
	$('.trnmntItem').addClass("dispNone");
	$('.season-'+season).removeClass("dispNone");	
}
function showProfilePics(){
	$('#gallery li').css("display", "");
	
}

function selectorSeason(val){
	$('.trnContainer').addClass('dispNone');
	$('#trnContainer-'+val).removeClass('dispNone');
	initCastomForms();
}

function goTournament(){
	var season = $('#selSeason').val();
	var tournament = $('#selTournament-'+season).val();
	document.location = '/tournaments/'+tournament+'/';
}

function goTour(val,cur){
	if (val == cur) return false;
	document.location = '/matchcenter/tour/'+val;
}

function sidebarTournament(tournament){
	if (cstfix == tournament) return false;
	cstfix = tournament;
	$('#sidebarTournament').html('<div style="text-align:center"><br /><br /><img src="images/loading.gif" alt=""/></div>');

	$.get('/ajax/tournament/'+tournament+'/', function(data){
		$('#sidebarTournament').html(data);
	});
}
function getComments(sender, news, page){
	$('.wm_paging a').removeClass('active_sit');
	$(sender).addClass('active_sit');
	document.getElementById('commentContainer').innerHTML = '<img src="images/loading.gif" alt="..."/>';
	var mypage = location.href.replace( /(.*)#.*/, "$1"); 
	location.href = mypage + "#comments";	
	$.get('/ajax/comments/'+news+'/'+(page!==undefined ? page+'/':''), function(data){
		$('#commentContainer').html(data);
	});
}
function reply(text) {
	var o = document.getElementById('comment');
	o.value += "[b]"+text+"[/b], \r\n";
	var mypage = location.href.replace( /(.*)#.*/, "$1"); 
	location.href = mypage + "#newcomment";
	o.focus();
}
