
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


    var xmlhttp;
    var id;

	function CriaObjetoAjax(){
    try
    {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e)
    {
        try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (e)
        {    
        xmlhttp = false;
        }
    }
    
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined' )
    {
        try
        {
            xmlhttp = new XMLHttpRequest();
        }
        catch (e)
        {
            xmlhttp = false;
        }
    }
    }
	

    function change1()
    {
        if (xmlhttp.readyState==4)
        {
			texto=unescape(xmlhttp.responseText.replace(/\+/g," "));
            document.getElementById(form).innerHTML=texto;
			campos = "";
        }
    }	
	
    function EnviaForm(url,campos){    
		CriaObjetoAjax();
		form = "mensagem_news";
		document.getElementById(form).innerHTML="";
		if (xmlhttp) {
			xmlhttp.open("GET",url+campos,true);
			xmlhttp.onreadystatechange=change1;
			xmlhttp.send(null);	
		}
    }
	
	function EnviaFormColabore(url,campos){    
		CriaObjetoAjax();
		form = "mensagem_news_colabore";
		document.getElementById(form).innerHTML="";
		if (xmlhttp) {
			xmlhttp.open("GET",url+campos,true);
			xmlhttp.onreadystatechange=change1;
			xmlhttp.send(null);	
		}
    }
	
	function setarNews() {
		campos = "&nome="+encodeURI(document.getElementById('nome_news').value);
		campos += "&email="+encodeURI(document.getElementById('email_news').value);
		campos += "&cidade="+encodeURI(document.getElementById('cidade_news').value);		
		campos += "&dia="+encodeURI(document.getElementById('dia_news').value);				
		campos += "&mes="+encodeURI(document.getElementById('mes_news').value);						
		campos += "&opcao="+encodeURI(document.getElementById('opcao_news').value);						

		document.getElementById('nome_news').value = "Seu Nome";
		document.getElementById('email_news').value = "Seu E-mail";		
		document.getElementById('cidade_news').value = "Sua Cidade";		
		document.getElementById('dia_news').value = "0";
		document.getElementById('mes_news').value = "0";		
		document.getElementById('opcao_news').value = "cadastrar";				
	}	
	
	function setarNewsColabore() {
		campos = "&nome="+encodeURI(document.getElementById('nome_news_colabore').value);
		campos += "&email="+encodeURI(document.getElementById('email_news_colabore').value);				

		document.getElementById('nome_news_colabore').value = "Seu Nome";
		document.getElementById('email_news_colabore').value = "Seu E-mail";					
	}		
	
	
	
function TamanhoFonte(num, id)
{

	document.getElementById(id).className = "CinzaEscuro"+num;
	
	if (num == '10') {
		document.getElementById('opc1').style.fontWeight = 'bold';
		document.getElementById('opc1').style.color = '#333333';	
		
		document.getElementById('opc2').style.fontWeight = 'normal';
		document.getElementById('opc2').style.color = '#666666';
		
		document.getElementById('opc3').style.fontWeight = 'normal';
		document.getElementById('opc3').style.color = '#666666';
		
	}
	
	if (num == '14') {
		document.getElementById('opc2').style.fontWeight = 'bold';
		document.getElementById('opc2').style.color = '#333333';	
		
		document.getElementById('opc3').style.fontWeight = 'normal';
		document.getElementById('opc3').style.color = '#666666';
		
		document.getElementById('opc1').style.fontWeight = 'normal';
		document.getElementById('opc1').style.color = '#666666';
	}
	
	if (num == '16') {
		document.getElementById('opc3').style.fontWeight = 'bold';
		document.getElementById('opc3').style.color = '#333333';	
		
		document.getElementById('opc1').style.fontWeight = 'normal';
		document.getElementById('opc1').style.color = '#666666';	
		
		document.getElementById('opc2').style.fontWeight = 'normal';
		document.getElementById('opc2').style.color = '#666666';
	}	
}	


function Relogio(){ 
   	momentoAtual = new Date() 
   	hora = momentoAtual.getHours() 
   	minuto = momentoAtual.getMinutes() 
   	segundo = momentoAtual.getSeconds() 
	
	if (minuto < 10) {
		horaImprimivel = hora + ":" + "0" + minuto
	}else{
		horaImprimivel = hora + ":" + minuto
	}

   	

   	document.getElementById("hora_atual").innerHTML = horaImprimivel 

   	setTimeout("Relogio()",1000) 
} 

function Data(regiao){ 

	data = new Date();
	dia = data.getDate();
	mes = data.getMonth();
	ano = data.getFullYear();
	
	meses = new Array(12);
	
	meses[0] = "Janeiro";
	meses[1] = "Fevereiro";
	meses[2] = "Março";
	meses[3] = "Abril";
	meses[4] = "Maio";
	meses[5] = "Junho";
	meses[6] = "Julho";
	meses[7] = "Agosto";
	meses[8] = "Setembro";
	meses[9] = "Outubro";
	meses[10] = "Novembro";
	meses[11] = "Dezembro";
	
	
	document.getElementById("data_e_hora_atual").innerHTML = regiao + ", " + dia + " de " + meses[mes] + " de " + ano;
}
