function match(temp) {
    if (temp == 'next') {
	document.getElementById("last-match").style.display = 'none';
	document.getElementById("next-match").style.display = 'block';

	document.getElementById("btnlastmatch").className = 'btnnextmatch';
	document.getElementById("btnnextmatch").className = 'btnlastmatch';
    }
    if (temp == 'last') {
	document.getElementById("last-match").style.display = 'block';
	document.getElementById("next-match").style.display = 'none';

	document.getElementById("btnlastmatch").className = 'btnlastmatch';
	document.getElementById("btnnextmatch").className = 'btnnextmatch';
    }
}
