<!----------- Componente Adiciona Flash -------------->
function addFlash(file,w,h,wmode,bgcolor,vgif){
	if(wmode == null || wmode == "" || wmode == "yes"){
		wmode = "transparent";
	}
        else if(wmode == "no"){
		wmode = "";
        }

	if(bgcolor == null || bgcolor == ""){
		bgcolor = "#FFFFFF";
	}

	if(vgif == null || vgif == ""){
		vgif = "gif.gif";
	}

	gif = "<img src=\""+vgif+"\" width=\""+w+"\" height=\""+h+"\">";

	swf = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+w+"' height='"+h+"' align='middle'>";
	swf += "	<param name=\"allowScriptAccess\" value=\"sameDomain\"/>";
	swf += "	<param name=\"movie\" value=\""+file+"\" />";
	swf += "	<param name=\"menu\" value=\"false\" />";
	swf += "	<param name=\"scale\" value=\"yes\" />";
	swf += "	<param name=\"salign\" value=\"CT\" />";
	swf += "	<param name='quality' value='high' />";
	swf += "	<param name='wmode' value='"+wmode+"' />";
	swf += "	<param name='bgcolor' value='"+bgcolor+"' />";
	swf += "	<embed src='"+file+"' wmode='"+wmode+"' menu=\"false\" scale=\"yes\" salign=\"LT\" quality='high' bgcolor='"+bgcolor+"' width='"+w+"' height='"+h+"' align='middle' allowScriptAccess='sameDomain' TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></embed>";
	swf += "</object>";

	MM_FlashDispatch(gif, swf, "5.0", false, !MM_FlashUserDemurred(), true)
	//MM_FlashDispatch(swf,gif, "5.0", false, !MM_FlashUserDemurred(), true)


}

<!----------- Mostra e Esconde Popup interna -------------->
function AchaObjeto(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=AchaObjeto(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MostraEsconde() { //v6.0
  var i,p,v,obj,args=MostraEsconde.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=AchaObjeto(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='Mostra')?'visible':(v=='Esconde')?'hidden':v; }
    obj.visibility=v; }
}

<!----------- Abre Pop-up centralizada -------------->
var win = null;
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+''
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}


<!------------------ esconde/exibi divs ---------------------->
     function show_div(div) {
if (document.getElementById(div).style.visibility == "hidden") {
   document.getElementById(div).style.visibility = "visible";
   document.getElementById(div).style.position = "relative";
}
else {
   document.getElementById(div).style.visibility = "hidden";
   document.getElementById(div).style.position = "absolute";
   }
     }
