function slide(where) {
	if (document.getElementById(where).style.display == "none") {
		$('#'+where).slideDown('fast', function() {});		
	} else {
		$('#'+where).slideUp('fast', function() {});		

	}

}

var nao_esconde_mais = false;

function mostrar(where) {
	if (document.getElementById(where).style.display == "none") {
		document.getElementById(where).style.display = "inline";
	} else {
		document.getElementById(where).style.display = "none";
	}
}

function esconder(where) {
	if (nao_esconde_mais) { 
		return
	}
	document.getElementById(where).style.display = 'none';
}

function mostrar_texto(where,variavel) {
	if (nao_esconde_mais) { 
		return
	}
	document.getElementById(where).style.display = "inline";
	document.getElementById(where).innerHTML = variavel;
}

// -----

var tempo = 15;

first_time = true;

function fade_in(where) {
	if (document.getElementById(where).style.display == 'none') {
		i = 0;
		document.getElementById(where).style.opacity = 0;
		if (document.getElementById(where).style.display == 'none') {
			document.getElementById(where).style.display = "";
		}
		fade_in_var = window.setInterval("fade_in_app('"+where+"')", tempo);	
	}
	else { 
		first_time = true;
		fade_out(where);
	}
}
function fade_in_app(where) {
	document.getElementById(where).style.opacity = i / 10;
	i++;
	if (i==10) {
		clearInterval(fade_in_var); 
		document.getElementById(where).style.opacity = 1;
	}
}

// -----

function fade_out(where) {
	i = 10;
	document.getElementById(where).style.opacity = 1;
	fade_out_var = window.setInterval("fade_out_app('"+where+"')", tempo);
}
function fade_out_app(where) {
	document.getElementById(where).style.opacity = i / 10;
	i--;
	if (i<=0) {
		clearInterval(fade_out_var);
		document.getElementById(where).style.display = "none";
		document.getElementById(where).style.opacity = 0;
	}
}

// -----

