   // ##############################################################################
   // Arquivos de Funções Java Script
   // Ultima Alteração: 30/10/2007
   // ##############################################################################

	// Esta função no futuro deve ser juntamento com a paginação
	function troca(tipo)
	{
	//parent.Corpo.location.href = "CorpoVersaoIntegral.asp?pagina=" + document.frmVersaoIntegral.cboVersaoIntegral[document.frmVersaoIntegral.cboVersaoIntegral.selectedIndex].value;
	var Indice = 0
	var Total = 0

    Indice = frmVersaoIntegral.cboVersaoIntegral.selectedIndex
    Total =  frmVersaoIntegral.cboVersaoIntegral.options.length - 1
	
		if (Indice == 0 || Indice == Total)
		{
		parent.Corpo.location.href = "../Pdf/" + document.frmVersaoIntegral.cboVersaoIntegral[document.frmVersaoIntegral.cboVersaoIntegral.selectedIndex].value + ".pdf"
		}
		else
		{
  		 parent.Corpo.location.href = "corpoVersaoIntegral.asp?pagina=" + document.frmVersaoIntegral.cboVersaoIntegral[document.frmVersaoIntegral.cboVersaoIntegral.selectedIndex].value + "&Tipo=pdf"; 
		}
	
	     return false;
	}

	// ------------------------------------------------------------------------------
	// Funcão utlizada na versão integral para criar a paginação da visualização
	// ------------------------------------------------------------------------------
	function Paginacao(Tipo)
	{
	var Indice = 0
	var Total = 0
	var flag = 0

    Indice = frmVersaoIntegral.cboVersaoIntegral.selectedIndex 
    //Total =  frmVersaoIntegral.cboVersaoIntegral.options.length -1
	Total =  frmVersaoIntegral.cboVersaoIntegral.options.length 

	//alert('Indice: ' + Indice + 'Total:' + Total);

	// Para Esquerda
	if ( Tipo == 1 )
	{
	    //alert('Voltando');
		//alert('Indice: ' + Indice + 'Total:' + Total);
        if (Indice > 0 ) 
		{
		 //alert('Entrou > 0 ');
		 Indice = Indice - 1 ;
		 flag = 1;
		}
		
		if (Indice == 0 && flag == 0)
		{
		 //alert('Entrou =0 ');
		 //alert('FLAG ='+ flag);
		 Indice =  Total - 1;
		}
		
		
		//else(Indice == 0 ) 
		//{
		//alert('Entrou Aqui');
			//Indice =  Total - 1;
			//Indice =  Indice - 1;
		//}
		
	}	

    // Para Direita
	if ( Tipo == 2 )
	{
	    if (Indice < Total ) 
	    {
		 Indice = Indice +1 ;
	    }
	    if (Indice > Total || Indice ==Total ) 
	    {  
		 //alert('AJUSTE')
		 Indice = 0;
	    }
	}	
	
	  //alert(Indice);
	  
	  frmVersaoIntegral.cboVersaoIntegral.selectedIndex = Indice;
	  if (Indice == 0 || Indice == Total-1)
	  {
		parent.Corpo.location.href = "../Pdf/" + document.frmVersaoIntegral.cboVersaoIntegral[document.frmVersaoIntegral.cboVersaoIntegral.selectedIndex].value + ".pdf"
	  }
	  else
	  {
	   parent.Corpo.location.href = "corpoVersaoIntegral.asp?pagina=" + document.frmVersaoIntegral.cboVersaoIntegral[document.frmVersaoIntegral.cboVersaoIntegral.selectedIndex].value + "&Tipo=pdf"; 
	  }

      return false;
	
	}
	
	// ------------------------------------------------------------------------------

	//-------------------------------------------------------------------------------
	// Utilizada na Charge
	//-------------------------------------------------------------------------------
	function links(site)
	{
	 downloadWindow=window.open(site,"1","width=400,height=320,scrollbars=no");
	}
