var oc_history = new Array();

function oc(area,competition,state) {
	if (oc_history[area]!=null) {
		if (oc_history[area]!=competition) {
			c = document.getElementById('a'+area+'c'+oc_history[area]);
			c.style.display='none';
		}
	}
	c = document.getElementById('a'+area+'c'+competition);
	if (c.style.display=='none' || state=='open') {
		c.style.display = '';
		symbol = '-';
	} else {
		c.style.display = 'none';
		symbol = '+';
	}
	oc_history[area] = competition;
	l = document.getElementById('oc'+area);
	l.href = 'javascript:oc('+area+','+competition+');';
	l.innerHTML = symbol;
	l = document.getElementById('link'+area);
	l.href = 'competitions.php?competition='+competition;
}