// Setando as variáveis de aumento de fonte

var defaultFontSize = 100;
var maximumFontSize = 300;
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 changeImg() {
images = new Array(5);
images[0] = '/imagens/img01.jpg';
images[1] = '/imagens/img02.jpg';
images[2] = '/imagens/img03.jpg';
images[3] = '/imagens/img04.jpg';
images[4] = '/imagens/img05.jpg';

index = Math.floor(Math.random()*images.length);

document.write('<img src="' + images[index] + '" alt="" />');
}
	

function changeFlash() {
images = new Array(2);
images[0] = '/banner_evolucao.swf';
images[1] = '/bnn_ceicoc03.swf';

index = Math.floor(Math.random()*images.length);

addFlash(images[index],"770","183","7,0,19,0");
}
	

//Função para adicionar arquivos em Flash às páginas

function addFlash(_src,_w,_h,_version){
	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='+_version+'" ';
	novoHtml += '  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);
}

function btns() {
	if (document.getElementById('btn')) {
	document.getElementById('btn').style.display = 'block';
	document.getElementById('btn').innerHTML = '<a href="javascript:void(0);" onclick="window.print();" >Imprimir</a>'
}
}

window.onload=btns;