function NovaJanela(url,w,h,sb,rsz){
var top;
var left;
var nome;
  if (!w||!h) {sb='yes'};
  if (!w) {w=800}; 
  if (!h) {h=600};
  if (!sb) {sb='yes'};
  if (nome=='img_popup') {
  	top = 20;
	left = 20;
  } else {
  	top = (screen.height-h)/2;
	left = (screen.width-w)/2;
  }
  if (!rsz) {rsz='yes'};
  newWindow = window.open(url,nome,'width='+w+',height='+h+',top='+top+',left='+left+',toolbar=no,location=0,directories=0,statusbar=0,menuBar=no,scrollBars='+sb+',resizable='+rsz);
  newWindow.location.href = url;
  if (newWindow.opener == null) newWindow.opener = self;
  newWindow.focus();
}

function mostraSwf(src, w, h, vars, bg, mode, cssclass, id)
{
	document.write('<OBJECT id='+ id +' class='+ cssclass +' codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 \n');
	document.write('height='+ h +' width='+ w +' align=middle \n');
	document.write('classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000> \n');
	document.write('<PARAM NAME="_cx" VALUE="18627"> \n');
	document.write('<PARAM NAME="_cy" VALUE="1640"> \n');
	document.write('<PARAM NAME="FlashVars" VALUE="' + vars + '"> \n');
	
	document.write('<PARAM NAME="Movie" VALUE="' + src +  '"> \n');
	document.write('<PARAM NAME="Src" VALUE="' + src +  '"> \n');
	
	document.write('<PARAM NAME="WMode" VALUE="'+ mode +'"> \n');
	document.write('<PARAM NAME="Play" VALUE="-1"> \n');
	document.write('<PARAM NAME="Loop" VALUE="-1"> \n');
	document.write('<PARAM NAME="Quality" VALUE="High"> \n');
	document.write('<PARAM NAME="SAlign" VALUE=""> \n');
	document.write('<PARAM NAME="Menu" VALUE="-1"> \n');
	document.write('<PARAM NAME="Base" VALUE=""> \n');
	document.write('<PARAM NAME="AllowScriptAccess" VALUE="sameDomain"> \n');
	document.write('<PARAM NAME="Scale" VALUE="ShowAll"> \n');
	document.write('<PARAM NAME="DeviceFont" VALUE="0"> \n');
	document.write('<PARAM NAME="EmbedMovie" VALUE="0"> \n');
	document.write('<PARAM NAME="BGColor" VALUE="'+ bg +'"> \n');
	document.write('<PARAM NAME="SWRemote" VALUE=""> \n');
	document.write('<PARAM NAME="MovieData" VALUE=""> \n');
	document.write('<PARAM NAME="SeamlessTabbing" VALUE="false"> \n');
	
	document.write(' <embed \n');
	document.write(' src="' + src  + '"\n');
	document.write(' FlashVars="' + vars + '"  \n');
	document.write(' quality="high" bgcolor="#'+ bg +'" width="'+ w +'" height="'+ h +'" \n');
	document.write(' name="'+ id +'" align="middle" allowScriptAccess="sameDomain" SeamlessTabbing="false" \n');
	document.write(' wmode="'+ mode +'" type="application/x-shockwave-flash" \n');
	document.write(' pluginspage="http://www.macromedia.com/go/getflashplayer" /> \n');
	document.write('</OBJECT> \n');
}
