$(document).ready(function() {
	$('#liga').live("change",function(){ 	
	$("#year").load('http://www.fanclub-fakel.ru/tournaments/year_ajax', {liga: document.getElementById('liga').value});
	$("#year").attr("disabled","");
	return false;
	});
});

$(document).ready(function() {
	$('#latest').live("click",function(){ 	
	$("#online_text").load('http://www.fanclub-fakel.ru/online/latest', {game: document.getElementById('game').value});
	$("#latest").attr("class","online_on");
	$("#all").attr("class","");
	$("#refresh").attr("value","0");
	return false;
	});
});
$(document).ready(function() {
	$('#all').live("click",function(){ 	
	$("#online_text").load('http://www.fanclub-fakel.ru/online/all', {game: document.getElementById('game').value});
	$("#all").attr("class","online_on");
	$("#latest").attr("class","");
	$("#refresh").attr("value","1");
	return false;
	});
});

$(document).ready(function() {
	$('#refresh_text').live("click",function(){ 	
	$("#online_result").load('http://www.fanclub-fakel.ru/online/new_result', {game: document.getElementById('game').value});
	if (document.getElementById('refresh').value==1){
	$("#online_text").load('http://www.fanclub-fakel.ru/online/all', {game: document.getElementById('game').value});}
	else {$("#online_text").load('http://www.fanclub-fakel.ru/online/latest', {game: document.getElementById('game').value});}
	
	return false;
	});
});



$(document).ready(function() {
	$('#latest_comments').live("click",function(){ 	
	$("#comments").load('http://www.fanclub-fakel.ru/online/comments', {game: document.getElementById('game').value});
	$("#latest_comments").attr("class","online_on");
	$("#all_comments").attr("class","");
	$("#refresh_com").attr("value","0");
	return false;
	});
});
$(document).ready(function() {
	$('#all_comments').live("click",function(){ 	
	$("#comments").load('http://www.fanclub-fakel.ru/online/comments_all', {game: document.getElementById('game').value});
	$("#all_comments").attr("class","online_on");
	$("#latest_comments").attr("class","");
	$("#refresh_com").attr("value","1");
	return false;
	});
});

$(document).ready(function() {
	$('#refresh_comments').live("click",function(){ 	
	
if (document.getElementById('refresh_com').value==1){
			$("#comments").load('http://www.fanclub-fakel.ru/online/comments_all', {game: document.getElementById('game').value});}
			else {$("#comments").load('http://www.fanclub-fakel.ru/online/comments', {game: document.getElementById('game').value});}
	
	return false;
	});
});


$(document).ready(function() {
	$('#online_btnsend').live("click",function(){ 	
	$("#online_btnsen").attr("disabled","disabled");
	$("#comments").load('http://www.fanclub-fakel.ru/online/add_comments', {game: document.getElementById('game').value,text: document.getElementById('text').value});
	$("#text").attr("value","");
	$("#online_btnsen").attr("disabled","");
	return false;
	});
});
  function show()  
  {  
     $("#online_result").load('http://www.fanclub-fakel.ru/online/new_result', {game: document.getElementById('game').value});
		if (document.getElementById('refresh').value==1){
			$("#online_text").load('http://www.fanclub-fakel.ru/online/all', {game: document.getElementById('game').value});}
			else {$("#online_text").load('http://www.fanclub-fakel.ru/online/latest', {game: document.getElementById('game').value});}
			
	
	
  }  
  
   function info()  
  {  
     $("#info").load('http://www.fanclub-fakel.ru/online/info', {game: document.getElementById('game').value});
		
	
	
  }  
  
  function show_comments()  
  {  
     		
	
if (document.getElementById('refresh_com').value==1){
			$("#comments").load('http://www.fanclub-fakel.ru/online/comments_all', {game: document.getElementById('game').value});}
			else {$("#comments").load('http://www.fanclub-fakel.ru/online/comments', {game: document.getElementById('game').value});}
			
	
  }  

$(document).ready(function(){  
//show();  
//setInterval('show()',60000); 
//setInterval('info()',60000);  
//setInterval('show_comments()',120000);  
});  
