function pagamento()	
{
	var W, H;
	var tipoPagto 	= $elemento("id_pagamento_tipo").value;
	var parcelas 	= $elemento("it_parcelas").value;
	var eventoPreco	= $elemento("id_evento_preco").value;
	var equipe	 	= $elemento("id_equipe").value;
	var evento	 	= $elemento("id_evento").value;
	var pagamento	= $elemento("id_pagamento").value;
	
	if (tipoPagto == 0)
	{
		alert("Por favor, escolha uma forma de pagamento");
		return;
	}
	
	if (tipoPagto == 2)
	{
		location.href = 'codigos/pagamento.asp?id_evento='+evento+'&id_equipe='+equipe+'&id_pagamento_tipo='+tipoPagto+'&it_parcelas='+parcelas+'&id_evento_preco='+eventoPreco;
	}
	else
	{

		if (tipoPagto == 1 || tipoPagto == 3)
		{
			W = 675;
			H = 485;
		}
		else if (tipoPagto == 10 || tipoPagto == 11 || tipoPagto == 12)
		{
			W = 780;
			H = 460;
		}
		else
		{
			W = 650;
			H = 450;
		}
		
		var X = Math.ceil( (window.screen.height - H) / 2 ) - 20;
		var Y = Math.ceil( (window.screen.width - W) / 2 ) - 16;
	
		window.open('codigos/pagamento.asp?id_evento='+evento+'&id_equipe='+equipe+'&id_pagamento_tipo='+tipoPagto+'&it_parcelas='+parcelas+'&id_evento_preco='+eventoPreco+'&id_pagamento='+pagamento,'ls1_pagamento','width='+W+',height='+H+',top='+X+',left='+Y+',location=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,toolbar=no');
		location.href = './?actA=11&id_evento='+evento+'&id_equipe='+equipe+'&id_pagamento_tipo='+tipoPagto+'&it_parcelas='+parcelas+'&id_evento_preco='+eventoPreco;
	}
}

function armazenaFormaPagto(parcelas, tipo, preco)
{
	$elemento("it_parcelas").value 			= parcelas;
	$elemento("id_pagamento_tipo").value	= tipo;
	$elemento("id_evento_preco").value		= preco;
}
