function toggleWrapper(id) {
    o = document.getElementById(id);
	if (o.style.display == 'none') o.style.display = '';
	else o.style.display = 'none';
    o = document.getElementById("t"+id);
	if (o.style.display == 'none') o.style.display = '';
	else o.style.display = 'none';
}

function toggleMatch(id) {
    o = document.getElementById("t1"+id);
	if (o.style.display == 'none') o.style.display = '';
	else o.style.display = 'none';
    o = document.getElementById("t3"+id);
	if (o.style.display == 'none') o.style.display = '';
	else o.style.display = 'none';

    selectMatch(id);

}

function selectMatch(matchId) {
    navels = $$(".matchPreviewSelected");
    navels.each(function(e){
        e.className = e.getAttribute("oclass");//"matchPreview";
    });
    strMatch = "match"+matchId;
    document.getElementById(strMatch).className = "matchPreviewSelected";
}
