
	function abreJanela(local,alvo,largura,altura)	{
		window.open (local,alvo,'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=' + largura + ',height=' + altura + ',top=0,left=0');
	}
	

	function veResultadosVotacao(catID, anoSel, vrtSel)	{
		abreJanela ('aces_resultados.asp?y=' + anoSel + '&v=' + vrtSel + '#c' + catID,'aces',450,300)
	}

	function mostraTorneio(id)	{
		if (opener)	{
				opener.top.location= 'eventos_torneios.asp?id=' + id; 
			}	else	{
				top.location = 'eventos_torneios.asp?id=' + id;
		}
	}

	function mostraVideo (media)	{
		abreJanela ('mostraMedia.asp?v=' + media,400,300)
	}

	function mostraFoto (media)	{
		abreJanela ('mostraMedia.asp?f=' + media,800,600)
	}

	function meses(mesInt)	{
		if (mesInt==1) return 'Janeiro';
		if (mesInt==2) return 'Fevereiro';
		if (mesInt==3) return 'Março';
		if (mesInt==4) return 'Abril';
		if (mesInt==5) return 'Maio';
		if (mesInt==6) return 'Junho';
		if (mesInt==7) return 'Julho';
		if (mesInt==8) return 'Agosto';
		if (mesInt==9) return 'Setembro';
		if (mesInt==10) return 'Outubro';
		if (mesInt==11) return 'Novembro';
		if (mesInt==12) return 'Dezembro';
	}

	function fadeOut() {
		if (fotoPrincipal)	{
			fotoPrincipal.style.filter="blendTrans(duration=2)";
			// Make sure the filter is not playing.
			if (fotoPrincipal.filters.blendTrans.status != 2) {
				fotoPrincipal.filters.blendTrans.apply();
				fotoPrincipal.style.visibility="hidden";
				fotoPrincipal.filters.blendTrans.play();
			}
		}
	}
	function fadeIn() {
		if (fotoPrincipal)	{
			fotoPrincipal.style.filter="blendTrans(duration=2)";
			// Make sure the filter is not playing.
			if (fotoPrincipal.filters.blendTrans.status != 2) {
				fotoPrincipal.filters.blendTrans.apply();
				fotoPrincipal.style.visibility="visible";
				fotoPrincipal.filters.blendTrans.play();
			}
		}
	}

	function enviaMail()	{
		if (formMsg.texto.value.length==0)	{
			alert("Preencha o texto antes de enviar a mensagem.");
			formMsg.texto.focus();
		}	else	{
			formMsg.submit();
		}
	}
		
    function highlight(elemnt,mensagem) {
        document.getElementById(elemnt).select();
        document.getElementById(elemnt).focus();
        if (document.all) {
            textRange = document.getElementById(elemnt).createTextRange();
            textRange.execCommand("RemoveFormat");
            textRange.execCommand("Copy");
            alert(mensagem);
        }
    }

	var mHFases = new Array()
	mHFases[0]	= 860;
	mHFases[1]	= 430;
	mHFases[2]	= 235;
	mHFases[3]	= 105;
	mHFases[4]	= 5;

	/*
	mHFases[0]	= 430;
	mHFases[1]	= 235;
	mHFases[2]	= 100;
	mHFases[3]	= 1;
    */


	function ACE_jogador(strJogador) {
		var mTmpJogador = strJogador.split("|")
		
		this.codigo			=mTmpJogador[0];
		this.nome			=mTmpJogador[1];
		this.valor			=parseInt(mTmpJogador[2]);
		this.data			=mTmpJogador[3];
		this.custo			=parseInt(mTmpJogador[4]);
	}

	function ACE_estadoEscada(strDisponibilidade) {
		var mTmpEstado = strDisponibilidade.split("|")
		this.inicio			    =parseInt(mTmpEstado[0]);
		this.fim			        =parseInt(mTmpEstado[1]);
		this.descritivo		=mTmpEstado[2];
	}

	function ACE_playerDevelopment_gesto(strGesto) {
		var mTmpGesto = strGesto.split("|")
		this.codigo			    =mTmpGesto[0];
		this.positivo            =mTmpGesto[1];
		this.negativo          =mTmpGesto[2];
		this.publico		         =parseInt(mTmpGesto[3]);
	}

	function ACE_playerDevelopment_posicao(strPosicao) {
		var mTmpPosicao = strPosicao.split("|")
		this.analise			    =parseInt(mTmpPosicao[0]);
		this.positivo            =mTmpPosicao[1];
		this.negativo		    =mTmpPosicao[2];
		this.fase		            =mTmpPosicao[3];
	}

  function ConvDataInteger(anoInput,mesInput,diaInput)      {
        var tmpDataInteger="";
        tmpDataInteger+= anoInput;
       
        if (mesInput.length==1) { tmpDataInteger+= "0"};
        tmpDataInteger+= mesInput;
       
        if (diaInput.length==1) { tmpDataInteger+= "0"};
        tmpDataInteger+= diaInput;
        
       return parseInt(tmpDataInteger);
  }


  function ConvMomentoInteger(anoInput,mesInput,diaInput,horaInput)      {
        var tmpDataInteger="";
        tmpDataInteger+= anoInput;
       
        if (mesInput.length==1) { tmpDataInteger+= "0"};
        tmpDataInteger+= mesInput;
       
        if (diaInput.length==1) { tmpDataInteger+= "0"};
        tmpDataInteger+= diaInput;
        
        if (horaInput.length==1) { tmpDataInteger += "0"};
        tmpDataInteger+= horaInput + "00";
        
       return tmpDataInteger;
  }

	function ACE_reservas(strReservas) {
		var mTmp = strReservas.split("|")
		this.court			    =parseInt(mTmp[0]);
		this.inicio			    =parseInt(mTmp[1]);
		this.fim		            =parseInt(mTmp[2]);
	}
