$(function(){
	colocaflashs();
});

function colocaflashobj(id_target, swf, id_obj, width, height, flash_vars){
	var param = {};
	param.wmode = 'transparent';
	swfobject.embedSWF(swf, id_target, width, height, '9.0.0', '', flash_vars, param);
}

function colocaflashs(){
	var param = {};
	param.wmode = 'transparent';
	$('[flash]').each(function (j) {
		var flashvars = {txt : $(this).attr('flash')};
		wid = $(this).width();
		if(isNaN(wid)){
			wid = wid.substring(0,wid.length-2);
		}
		hei = $(this).height();
		if(isNaN(hei)){
			hei = hei.substring(0,hei.length-2);
		}
		swfobject.embedSWF('flash/titulo.swf', $(this).attr('id'), wid, hei, '9.0.0', '', flashvars, param);
	})
}
function envia(){
  var tex="nome";
  if (document.formulario.elements[tex].value.length<3){
     alert('Informe o nome!');
     document.formulario.elements[tex].focus();
	 return false;
   }
  var tex="email";
  if (document.formulario.elements[tex].value.length<3){
     alert('Informe o email!');
     document.formulario.elements[tex].focus();
	 return false;
   }
   if(ValidaEmail(document.formulario.elements[tex])==false){
	     return false;
   }
   var tex="telefone";
  if (document.formulario.elements[tex].value.length<3){
     alert('Informe o telefone!');
     document.formulario.elements[tex].focus();
	 return false;
   }
    var tex="men";
  if (document.formulario.elements[tex].value.length<3){
     alert('Escreva uma mensagem!');
     document.formulario.elements[tex].focus();
	 return false;
   }
   window.document.formulario.submit();
}
