function inserir_flash(name, movie, width, height, background, parameters) {
 var movie_width;
 var movie_height;
 var flash_movie;
 
 if(!isNaN(width)) {
  movie_width = 'width="'+width+'"' ;
 }
    
 if(!isNaN(height)) {
  movie_height = 'height="'+height+'"';
 }
 
 if(parameters != "") {
   flash_movie = movie;
 } else {
   flash_movie = movie;
 }
 
 document.writeln('<object type="application/x-shockwave-flash" data="'+movie+'" '+movie_width + movie_height+'>');
 
 document.writeln('<param name="movie" value="'+flash_movie+'" />');
 
 if(background != "") {
   document.writeln('<param name="bgcolor" value="#'+background+'" />'); 
 } else {
  document.writeln('<param name="wmode" value="transparent">');
 }
  document.writeln(' <param name="FlashVars" value="'+parameters+'" />');
  document.writeln(' <param name="allowScriptAccess" value="sameDomain" />');
  document.writeln('</object>');
}

