showSplash = function(){
new Effect.SlideDown($('splash'), {afterFinish:function(){setTimeout('hideSplash();',15000);}})
}
hideSplash = function(){
if ($('splash').style.display != 'none'){
	new Effect.SlideUp($('splash'));
}
}
showVideo = function(){
new Effect.SlideDown($('splash'));
}
menu = function (numMenu){
	$('conteudo').innerHTML = "<table width='770px' height='350px'><tr height='25%' width='100%'><td></td></tr><tr height='33%' width='100%'><td><center><img src='imagens/indicator.gif'></img></center></td></tr><tr height='33%' width='100%'><td></td></tr></table>";
	A = new Ajax.Request('paginas.php',{
								method:'post',
								parameters: {numMenu:numMenu},
								onSuccess: function(transport){menuSuccess(transport);}, 
								onFailure: function(){failure();}
						}
					);
}

menuSuccess = function (transport)
{
	
	var response = transport.responseText;
    $('conteudo').innerHTML = response;
}

failure = function ()
{
	$('conteudo').innerHTML = "<table class='module' style='width: 100%;' border='0' cellpadding='0' cellspacing='0'><tbody><tr><td class='topl'></td><td class='topr'></td></tr><tr><td class='boxmid'><div class='listlight promobg'><span class='promo'><b>Erro. </b></span><br><br>Infelizmente, o servidor se comportou de forma inesperada. Esperamos que ele volte ao seu estado normal quando você tentar novamente em alguns minutos.</div></td><td class='boxmidr'></td></tr><tr><td class='botl'></td><td class='botr'></td></tr></tbody></table>";
}

faleConosco = function (nome, email, assunto, mensagem, recipient, redirect){
	$('conteudo').innerHTML = "<table width='770px' height='350px'><tr height='25%' width='100%'><td></td></tr><tr height='33%' width='100%'><td><center><img src='imagens/indicator.gif'></img></center></td></tr><tr height='33%' width='100%'><td></td></tr></table>";
	
	A = new Ajax.Request('salvarmensagem.php',{
								method:'post',
								parameters: {nome:nome, email: email, assunto: assunto, mensagem: mensagem},
								onSuccess: function(transport){faleConoscoSuccess(transport);}, 
								onFailure: function(){failure();}
						}
					);
}

faleConoscoSuccess = function(transport, conteudo){
	var response = transport.responseText;
	alert(response);
	menu(9);
}