// Funções Macromedia
function trocaimagem() {
  var ic = 4; 
  var imagem = new Array(ic); 
  imagem[0] = "/imagens/back1.jpg"; 
  imagem[1] = "/imagens/back2.jpg"; 
  imagem[2] = "/imagens/back1.jpg";
  imagem[3] = "/imagens/back3.jpg";
  
  function pickRandom(range) { 
     if (Math.random) return Math.round(Math.random() * (range-1));
     else {
       var now = new Date();
       return (now.getTime() / 1000) % range; }
     } 
	 var escolha = pickRandom(ic); 
	 
 document.writeln('<body style="background:url('+imagem[escolha]+') center top no-repeat white;">'); 
}

/*
    ::::: incluir no header :::::::::::::::::::::::::::::::::::::::::
    ::                                                             ::
    ::  <script src="addFlash.js" language="JavaScript"></script>  ::
    ::                                                             ::
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

    ::::: trocar as tags do flash por :::::::::::::::::::::::::
    ::                                                       ::
    ::    <script language="JavaScript">                     ::
    ::      (addFlash('index2.swf,400,300));   ::
    ::    </script>                                          ::
    ::                                                       ::
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*/

function addFlash(_src,_w,_h){
	var novoHtml = '';
 	novoHtml += '  <OBJECT height="'+_h+'" width="'+_w+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	novoHtml += '  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ';
	novoHtml += '  wmode="transparent" ALIGN="">';
	novoHtml += '    <PARAM NAME="movie"   VALUE="'+_src+'">';
	novoHtml += '    <PARAM NAME="quality" VALUE="high">';
	novoHtml += '    <PARAM NAME="wmode"   VALUE="transparent">';
	novoHtml += '    <PARAM NAME="bgcolor" VALUE="#FFFFFF">';
	novoHtml += '    <EMBED wmode="transparent" src="'+_src+'" pluginspage="http://www.macromedia.com/go/getflashplayer" height="'+_h+'" width="'+_w+'"></EMBED>';
	novoHtml += '  </OBJECT>';
  document.write(novoHtml);
}


// Setando as variáveis de aumento de fonte

var defaultFontSize = 120;
var maximumFontSize = 400;
var currentFontSize = defaultFontSize;

function resetFontSize() {
	resetSize = defaultFontSize - currentFontSize;
	changeFontSize(resetSize);
}

function changeFontSize(sizeDifference) {
	currentFontSize = currentFontSize + sizeDifference;

	if(currentFontSize > maximumFontSize) { alert('Você já chegou ao tamanho máximo!'); currentFontSize = 300;  }
	else if(currentFontSize < 60) { alert('Você já chegou ao tamanho mínimo!'); currentFontSize = 60;  }

	setFontSize(currentFontSize);
}

function setFontSize(fontSize){ document.getElementById('areaTexto').style.fontSize = fontSize + '%'; }


function areaTexto(x) {
	if (x == "A") { changeFontSize(10); }
	else if (x == "D") { changeFontSize(-10); }
	else { resetFontSize(); }
}

function fncEsconderBanner()
{
  document.getElementById("bannerzao").style.display = 'none';
}

function open_center(url, name, params, Wwidth, Wheight) {
    Swidth = screen.width;
    Sheight = screen.height;

    Wleft = Math.floor((Swidth / 2) - (Wwidth / 2) - 8);
    Wtop = Math.floor((Sheight / 2) - (Wheight / 2) - 20);

    params = params+",left="+Wleft+",top="+Wtop+",width="+Wwidth+",height="+Wheight;

    window.open(url, name, params);
}

function MM_jumpMenu(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
