/* SCRIPT DE VISUALIZAÇÃO DE FLASH */
/* Modo de usar: 
	<script>ExibeFlash('tamanho da largura','tamanho da altura','transparent','nome do arquivo','variáveis')</script>
*/

function ExibeFlash(w,h,wmode,movie,flashVars) {
	var isFlashVars = arguments.length==5;
	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+'"/>');
	if (isFlashVars){
		document.write('<param name="FlashVars" value="'+flashVars+'"/>');
	}
	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+'" ');
	if (isFlashVars){
		document.write(' FlashVars="'+flashVars+'"');
	}
	document.write('></embed>');
	document.write('</object>');
}

/* SCRIPT DE AUMENTAR OU DIMINUIR O TAMANHO DA FONTE */

var tam = 12;

function mudaFonte( tipo ){
	if( tipo == 'mais' ){
		if( tam < 18 ) tam += 2 ;
	}else{
		if( tam > 9 ) tam -= 2 ;
	}
	if( document.getElementById( 'mudaFonte' ) )
		mudaFonteRecursiva( tipo , document.getElementById( 'mudaFonte' ) ) ;

	if( document.getElementById( 'mudaFoto' ) )
	mudaFonteRecursiva( tipo , document.getElementById( 'mudaFoto' ) ) ;
}

function mudaFonteRecursiva( tipo , domElement ){
	for( var i = 0 ; i < domElement.childNodes.length ; i++ ){
		mudaFonteRecursiva( tipo , domElement.childNodes.item( i ) ) ;
	}
	if( domElement.style )
	domElement.style.fontSize = tam+'px';
}


/* OCULTAR EXIBIR DIV */
/* Modo de usar: 
	onclick="MM_callJS('MM_dmenu(\'cadastroTela2\'); MM_dmenuh(\'cadastroTela1\')')"
*/

function show(id)
{
	el = document.getElementById(id);
	if (el.style.display == 'none')
	{
		el.style.display = 'block';
		el = document.getElementById('more' + id);
	} else {
		el.style.display = 'none';
		el = document.getElementById('more' + id);
	}
}

function MM_dmenu(objname) {
                                 var obj = MM_findObj(objname);
                                 if(obj && obj.style) obj.style.display =
                               (obj.style.display=="none") ? "" : "none";
                               }
                               function MM_dmenuh() {
                                 var a=MM_dmenuh.arguments;
                                 for (i=0; i<a.length; i++) {var obj =
                               MM_findObj(a[i]); if(obj && obj.style)
                               obj.style.display = "none"; }
                               }

function MM_findObj(n, d) {
  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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_callJS(jsStr) {
  return eval(jsStr)
}

/* JUMP LISTMENU */
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}