function addFlash(URL, WIDTH, HEIGHT, TRANSPARENT){
	document.write (' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
	document.write (' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
	document.write (' width="'+ WIDTH +'" height="'+ HEIGHT +'">');
	document.write (' <param name="movie" value="'+ URL +'" />');
	document.write (' <param name="quality" value="high" />');

	if ( TRANSPARENT ) {
	  document.write (' <param name="Wmode" value="Transparent" />');
	}

	document.write (' <embed src="'+ URL +'" quality="high" ');

	if ( TRANSPARENT ) {
	document.write (' Wmode = "transparent" ');
	}

	document.write (' pluginspage="http://www.macromedia.com/go/getflashplayer" ');
	document.write (' type="application/x-shockwave-flash" width="'+ WIDTH +'" height="'+ HEIGHT +'"></embed> ');
	document.write (' </object>');
}

function onFocus(aFrm, aCampo){
	document.forms[aFrm].elements[aCampo.name].style.border = "1px solid #C80376";
}

function onBlur(aFrm, aCampo){
	document.forms[aFrm].elements[aCampo.name].style.border = "1px solid #DADADA";
}

function abrePopup(anUrl, aTituloPagina, anOpcao){
	window.open(anUrl, aTituloPagina, anOpcao); 
}

function centralizarPopup(aLargura, anAltura){
	var popup_largura = aLargura;
	var popup_altura  = anAltura;
	
	var alturaTela  = window.screen.availHeight;
	var larguraTela = window.screen.availWidth;
	
	var ponto_x = parseInt(larguraTela / 2) - parseInt(popup_largura / 2);
	
	var ponto_y = parseInt(alturaTela / 2) - parseInt(popup_altura / 2);
	
	window.moveTo(ponto_x, ponto_y);
}


function displaySetor(anObj) {
	if (document.getElementById(anObj).style.display == 'none') {
		document.getElementById(anObj).style.display = '';
	}else{
		document.getElementById(anObj).style.display = 'none';
	}
}

function escreverLabelHTML(anObj, mensagem){
	document.getElementById(anObj).innerHTML = mensagem;
}



var maxTextSize   = 15;
var minTextSize   = 10;
var textSizeAtual = 11;
function alterarFontSize(anAcao, anObj){
	switch (anAcao){
		case 'aumentar':
			if((textSizeAtual) < maxTextSize){
				textSizeAtual++;
			}
		break;

		case 'diminuir':
			if((textSizeAtual) > minTextSize){
				textSizeAtual--;
			}
		break;
	}

	document.getElementById(anObj).style.fontSize   = (textSizeAtual) + "px";
}



function manterMenuSelecionado(anOidMenu, anAction){

	menu = document.getElementById(anOidMenu);

	if (anAction == 'OVER'){
		menu.style.background = 'url(/prototipos/itc/site/central/imgs/' + anOidMenu + '.jpg) 0px -52px no-repeat';
	}

	if (anAction == 'OUT'){
		menu.style.background = 'url(/prototipos/itc/site/central/imgs/' + anOidMenu + '.jpg) 0px 0px no-repeat';
	}

}

function displayMenu(anObj) {
	if (document.getElementById(anObj).style.display == 'none') {
		document.getElementById(anObj).style.display = 'inline';
	}else{
		document.getElementById(anObj).style.display = 'none';
	}
}
