Galeria = {
	
		
	carregaThumbs : function(id_evento){
		if(id_evento!=0){
			document.form1.submit();
			//FuncoesGerais.AlteraTexto('divGaleria','Carregando...');
			//classGaleriaFotos.seleciona(0, id_evento, '', 1,Galeria.carregaThumbsRetorno);
		}
	},
	
	carregaThumbsRetorno : function(retorno){
		var ds = retorno.value;
		if(ds!=null && typeof(ds) == "object" && ds.Tables!=null){
			FuncoesGerais.AlteraTexto('divGaleria','');
			for(var i=0; i<ds.Tables[0].Rows.length; i++){
				var row = ds.Tables[0].Rows[i];
				var conteudo = '<div><a href="/_IMG/galeria_de_fotos/' + row.fotoP + '" rel="lightbox">';
				conteudo += '<img src="/_IMG/galeria_de_fotos/' + row.fotoT + '" alt="" width="101" height="68" border="0"></a><br> ';
				conteudo += '<a href="/_inc/download.aspx?arquivo=../_img/galeria_de_fotos/' + row.fotog + '">Download</a></div>';
				FuncoesGerais.SomaTexto('divGaleria',conteudo);
			}
		}
	},


	
	abreLightbox : function(video){
		
		FuncoesGerais.CarregaFlashDiv(video,'425','344','flash')
		
		document.getElementById('divOpaca').style.display = '';
		document.getElementById('divVideo').style.display = '';
		div = document.getElementById('divOpaca');
	
		var page = FG.tPg();
		
		if (navigator.appName == 'Microsoft Internet Explorer')
			div.style.height = FG.tPg().ph;
		else
			div.style.height = FG.tPg().ph;
			
		div.style.width = FG.tPg().pw;
		div.style.display='';
		
	},

	fechaLightbox : function(){
		document.getElementById('divOpaca').style.display = 'none';
		document.getElementById('divVideo').style.display = 'none';
		document.getElementById('flash').innerHTML = '';
	}
	
}



/*
CarregaEstado_CallBackNSelecione : function(response){
		if(response.error == null){
			nomecampoestado = document.getElementById("NomeCampoEstado").value;
			var retorno = response.value;
			var ds = retorno;
			if(ds!=null && typeof(ds) == "object" && ds.Tables!=null){
				//define a quantidade de itens do dropdown(1 a mais da quantidade de itens do dataset)
				document.getElementById(nomecampoestado).length =ds.Tables[0].Rows.length;
				
				//adiciona os itens do dataset no dropdown
				for(var i=0; i<ds.Tables[0].Rows.length; i++){
					var row = ds.Tables[0].Rows[i];
					document.getElementById(nomecampoestado).options[i].text= row.uf;
					document.getElementById(nomecampoestado).options[i].value= row.uf;
				}
			} 
		}	
	},*/