// Rolar para o topo
$(document).ready(function(){
	$('.irtopo').click(function() {
		$('html').animate({scrollTop: 0},'slow');
	});
});
	
	
// Validação Contato
function validarContato(){
var d=document.contato;
	if(d.nome.value==""){
		alert('Por favor, digite seu nome.');
		d.nome.focus();
		return false;
		stop;
	}
	parte1 = d.email.value.indexOf("@");
	parte2 = d.email.value.indexOf(".");
	parte3 = d.email.value.length;
	if (!(parte1 >= 3 && parte2 != -1 && parte3 >= 9) || d.email.value=="") {
		alert('Informe seu e-mail corretamente.');
		d.email.focus();
		return false;
		stop;
	}
	if(d.telefone.value==""){
		alert('Por favor, informe seu telefone.');
		d.telefone.focus();
		return false;
		stop;
	}
	if(d.mensagem.value==""){
		alert('Por favor, informe o motivo do contato.');
		d.mensagem.focus();
		return false;
		stop;
	}
}


// Flash
/*
<script type="text/javascript">flash('swf/topo.swf','100%',364,true);</script>
Parâmetros: arquivo, largura, altura, transparência
*/
function flash(arquivo,w,h,transparente,params,id) {
	document.write('<object'+(((typeof id != 'undefined') && (navigator.appVersion.indexOf('MSIE') > -1))?' id="'+id+'"':'')+' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"' + ((typeof w == 'undefined')?'':' width="'+w+'"') + ((typeof h == 'undefined')?'':' height="'+h+'"') + '>');
	document.write('<param name="movie" value="'+arquivo+'">');
	document.write('<param name=quality value=high>');
	document.write('<param name="menu" value="false">');
	if (typeof params != 'undefined') {
		var p = '';

		for (var i in params) {
			p += i + '="' + params[i] + '" ';
			document.write('<param name="'+i+'" value="'+params[i]+'">');
		}
	}
	if (transparente) {
		document.write('<param name="wmode" value="transparent">');
	}
	document.write('<embed'+(((typeof id != 'undefined') && (navigator.appVersion.indexOf('MSIE') < 0))?' id="'+id+'"':'')+' src="'+arquivo+'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"' + ((typeof w == 'undefined')?'':' width="'+w+'"') + ((typeof h == 'undefined')?'':' height="'+h+'"') + ' ');
	if (transparente) {
		document.write('wmode="transparent" ');
	}
	document.write(p);
	document.write(' menu="false"></embed>');
	document.write('</object>');
}


