function stats(id) {
	document.getElementById('eihl_links').style.display = 'none';
	document.getElementById('epl_links').style.display = 'none';
	document.getElementById('more_links').style.display = 'none';
	document.getElementById('basic_eihl_links').className = '';
	document.getElementById('basic_epl_links').className = '';
	document.getElementById('basic_more_links').className = '';
	document.getElementById(id).style.display = 'block';
	document.getElementById('basic_'+id).className = 'stats_links_selected';
}
function ajax(id) {
	// validate input
	var http = false;
	if(navigator.appName == "Microsoft Internet Explorer") {
		http = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		http = new XMLHttpRequest();
	} 
	document.getElementById('loading').innerHTML = "<img src='http://www.britishicehockey.co.uk/ajax-loader.gif' width='24' height='24' alt='Loading...' border='0'/><br/><span style='font-size: 11px;'>Loading...</span>";
	
	full_link = "http://www.britishicehockey.co.uk/includes/boxes/stats_post.php?id="+id;
	
	http.open("GET", full_link, true);
	
	http.onreadystatechange=function() {
		if(http.readyState == 4) {
			document.getElementById('stats_box').innerHTML = http.responseText;
			document.getElementById('loading').style.display = 'none';
		}
	}
	http.send(null);
}
function change_news(img, title, short_story, link) {
	//document.getElementById('homenews_title').innerHTML = title;
	document.getElementById('homenews_title_ahref').innerHTML = title;
	document.getElementById('homenews_title_ahref').href = link;
	document.getElementById('homenews_intro').innerHTML = short_story;
	document.getElementById('homenews_img').src = img;
	document.getElementById('homenews_img_ahref').href = link;
}
function live_ajax(id) {
	// validate input
	var http = false;
	if(navigator.appName == "Microsoft Internet Explorer") {
		http = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		http = new XMLHttpRequest();
	} 
	document.getElementById('live_loading').innerHTML = "<img src='http://www.britishicehockey.co.uk/ajax-loader.gif' width='24' height='24' alt='Loading...' border='0'/><br/><span style='font-size: 11px;'>Loading...</span>";
	
	full_link = "includes/boxes/live.php?id="+id;
	
	http.open("GET", full_link, true);
	
	http.onreadystatechange=function() {
		if(http.readyState == 4) {
			document.getElementById('live_box').innerHTML = http.responseText;
			document.getElementById('live_loading').style.display = 'none';
			//setTimeout('live_ajax('+id+')',60000);
		}
	}
	http.send(null);
}