function adicionarCampo(numeroCampos)
{
	for(x=1; x<=numeroMaximoImgAdicionais; x++)
	{
		if(x > numeroCampos)
		{
			$('field_imagemAdicional_' + x).style.display = 'none';
		}
		else
		{
			$('field_imagemAdicional_' + x).style.display = '';
		}
	}
}
function Private()
{
	this.popup_excluir = false;
}

Private.prototype.quantidadeImagens = function(n)
{
	while(this.numeroImagens != n)
	{
		if(this.numeroImagens < n)
		{
			document.getElementById('imagem_'+this.numeroImagens).style.display = '';	
			this.numeroImagens++;	
		}
		else if(this.numeroImagens > n)
		{
			document.getElementById('imagem_'+(this.numeroImagens-1)).style.display = 'none';
			this.numeroImagens--;
		}
	}
	
	this.numeroImagens = n;
}

Private.prototype.abilitaLegenda = function(n)
{
	var obj = document.getElementById('imagem_'+n);
	if(obj.value)
		document.getElementById('imagem_legenda_'+n).disabled = true;
	else
		document.getElementById('imagem_legenda_'+n).disabled = false;
}



Private.prototype.excluir = function(urlExcluir,mensagem)
{
	if(!this.popup_excluir)
	{
		this.popup_excluir = document.getElementById('layerGeral_popup').innerHTML;
	}	
	else
	{
		document.getElementById('layerGeral_popup').innerHTML = this.popup_excluir;
	}	
	
	if(mensagem)
	document.getElementById('confirmacao_atencao').innerHTML = mensagem;
	
	document.getElementById('link_excluir').onclick = function (){LinkAjax.send(urlExcluir, 'miolo-excluir', 'carregando-excluir');}//""

	document.getElementById('layerGeral_popup').style.display = '';
	document.getElementById('layerOpaco_popup').style.display = '';
	
	var pagina = Diversos.getPageSize();
	
	document.getElementById('layerGeral_popup').style.height = pagina.pageHeight + 'px';
	document.getElementById('layerGeral_popup').style.width = pagina.pageWidth + 'px';
	
	document.getElementById('layerOpaco_popup').style.height = pagina.pageHeight + 'px';
	document.getElementById('layerOpaco_popup').style.width = pagina.pageWidth + 'px';
}

Private.prototype.excluirFechar = function()
{
	document.getElementById('layerOpaco_popup').style.display = 'none';
	document.getElementById('layerGeral_popup').style.display = 'none';
}

var Private = new Private();
