function trocaimagem() {
  var ic = 4; 
  var imagem = new Array(ic); 
  imagem[0] = "/imagens/bg.jpg"; 
  imagem[1] = "/imagens/bg4.jpg"; 
  imagem[2] = "/imagens/bg5.jpg";
  imagem[3] = "/imagens/bg6.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 bottom no-repeat #01618B;">'); 
}

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" quality="high" src="'+_src+'" pluginspage="http://www.macromedia.com/go/getflashplayer" height="'+_h+'" width="'+_w+'"></EMBED>';
	novoHtml += '  </OBJECT>';
  document.write(novoHtml);
}


// Aumenta Reduz / Aumenta Fonte HOME objTimerBannerzao = setInterval('fncEsconderBanner()', 50000);

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('centro').style.fontSize = fontSize + '%'; }

function centro(x) {
	if (x == "A") { changeFontSize(10); }
	else if (x == "D") { changeFontSize(-10); }
	else { resetFontSize(); }
}

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 fncEsconderBanner()
{
  document.getElementById("bannerzao").style.display = 'none';
}
	function setLogin(){
		if( document.form_login.organization != null)
			document.form_login.login.value = document.form_login.organization.value+'-'+document.form_login.user.value;
		else
			document.form_login.login.value = document.form_login.user.value;			
	}
	
	function getLogin(){
		var cookie = '';
		if( document.form_login.organization != null)
			document.form_login.user.value= cookie.substring(cookie.indexOf('-')+1,cookie.length);
		else	
			document.form_login.user.value= cookie;

		if(document.form_login.user.value == '') {
			if(document.form_login.organization != null)
				document.form_login.organization.focus();
			else
				document.form_login.user.focus();
		}
		else
			document.form_login.passwd.focus();
	}
	
 	function openWindow(newWidth,newHeight,link) {					
		newScreenX  = screen.width - newWidth;	
		newScreenY  = 0;		
		Window1=window.open(link,'',"width="+newWidth+",height="+newHeight+",screenX="+newScreenX+",left="+newScreenX+",screenY="+newScreenY+",top="+newScreenY+",toolbar=no,scrollbars=yes,resizable=no");				
	}