function ExibeFlash(w,h,wmode,movie) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+w+'" height="'+h+'">');
	document.write('<param name="wmode" value="'+wmode+'"/>');
	document.write('<param name="quality" value="high"/>');
	document.write('<param name="movie" value="'+movie+'"/>');
	document.write('<embed src="'+movie+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="'+wmode+'" width="'+w+'" height="'+h+'"></embed>');
	document.write('</object>');
}

function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',noresizable,status=no'
	win = window.open(mypage,myname,settings)
}

function VFaleConosco() {
	if (!document.MyForm.nome.value) { alert("Por favor, informe seu nome."); document.MyForm.nome.focus(); return false; };
  if (!VEmail( document.MyForm.email.value)) { alert("O seu e-mail não é válido!\nVerifique-o novamente."); document.MyForm.email.focus(); return false; };
  if (!document.MyForm.telefone.value) { alert("Por favor, informe o seu telefone."); document.MyForm.telefone.focus(); return false; };
	if (!document.MyForm.cidade.value) { alert("Por favor, informe a cidade."); document.MyForm.cidade.focus(); return false; };
  if (!document.MyForm.mensagem.value) { alert("Você deve escrever a mensagem."); document.MyForm.mensagem.focus(); return false; };
  return true;
}

function VEmail( strEmail ) {
     var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
     return (filter.test(strEmail));
}

function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',noresizable,status=no'
	win = window.open(mypage,myname,settings)
}

function MostraResposta(id) {
	document.getElementById(id).style.display = (document.getElementById(id).style.display == 'none') ? '' : 'none';
}
