function show(rid)
{
    document.getElementById(rid).style.display = "";
}

function hide(rid)
{
    document.getElementById(rid).style.display = "none";
}

function gomzeYes(type, rid)
{
	if(type=='sponsor') { value = 0; } else { value = 15; }
	hide('homeClub' + rid);
	hide('homeClub2' + rid);
	document.getElementById('gomzeTotal' + rid).value = value;
	setTotal(type);
}

function gomzeNo(type, rid)
{ 
	if(type=='sponsor') { value = 0; } else { value = 60; }
	show('homeClub' + rid);
	show('homeClub2' + rid);
	document.getElementById('gomzeTotal' + rid).value = value;
	setTotal(type);
}

function setTotal(type)
{
	if(type=='single') {
		totalSpons = 0;
		totalGomze = parseInt(document.getElementById('gomzeTotal1').value);
	
	total = parseInt(totalSpons) + parseInt(totalGomze);
	document.getElementById('Total').innerHTML = total;
	document.getElementById('Total2').innerHTML = total;
	}
	
	if(type=='team') {
		totalP1 = parseInt(document.getElementById('gomzeTotal1').value);
		document.getElementById('totalPlayer1').innerHTML = totalP1;
		
		totalP2 = parseInt(document.getElementById('gomzeTotal2').value);
		document.getElementById('totalPlayer2').innerHTML = totalP2;
		
		totalP3 = parseInt(document.getElementById('gomzeTotal3').value);
		document.getElementById('totalPlayer3').innerHTML = totalP3;
		
		totalP4 = parseInt(document.getElementById('gomzeTotal4').value);
		document.getElementById('totalPlayer4').innerHTML = totalP4;
	}
	
	if(type=='sponsor')  {
		totalSpons = 550;
		totalGomze = parseInt(document.getElementById('gomzeTotal1').value) + parseInt(document.getElementById('gomzeTotal2').value) + parseInt(document.getElementById('gomzeTotal3').value) + parseInt(document.getElementById('gomzeTotal4').value);
	
	total = parseInt(totalSpons) + parseInt(totalGomze);
	document.getElementById('Total').innerHTML = total;
	document.getElementById('Total2').innerHTML = total;
	}
}

function clearGomze(i)
{
    document.getElementById('club' + i).value = '';
    document.getElementById('club' + i).focus();
}

function completeTeam(name) {
	document.getElementById('teamName').innerHTML = name;
}
