
<!--

function carrega_edital()
{
	//document.forms[FormName].elements[FieldName].value = valor;
	ajaxHTML('carrega_pos','ajax_compartilhada.php?tipo=troca_form&curso_id='+document.getElementById('curso_id').value);
	//alert(document.getElementById('curso_id').value);
}


function limpa_campos(FormName, FieldName, valor)
{
	document.forms[FormName].elements[FieldName].value = valor;
}

function outros(combo_nome,div_campo,div_combo)
{

	if(document.getElementById(combo_nome).value == "")
	{
	document.getElementById(div_campo).style.display="block";
	document.getElementById(div_combo).style.display="none";
	}

}



function outros_02(div_campo,div_combo)
{
	document.getElementById(div_combo).style.display="block";
	document.getElementById(div_campo).style.display="none";
}


function checar_nao_checar(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}

function formatar(src, mask){
  var i = src.value.length;
  var saida = mask.substring(0,1);
  var texto = mask.substring(i)
if (texto.substring(0,1) != saida)
  {
    src.value += texto.substring(0,1); 
  }
}




function abre_janela(pagina,janela,caracteristicas)
{
	//"status , scrollbars=no ,width=400, height=350 , top=0 , left=0"
window.open(pagina,janela,caracteristicas); 
};

function clientSideInclude(id, url) {
  var req = false;
  // For Safari, Firefox, and other non-MS browsers
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
 if (!element) {
  alert("Bad id " + id + 
   "passed to clientSideInclude." +
   "You need a div or span element " +
   "with this id in your page.");
  return;
 }
  if (req) {
    // Synchronous request, wait till we have it all
    req.open('GET', url, false);
    req.send(null);
    element.innerHTML = req.responseText;
  } else {
    element.innerHTML =
   "Sorry, your browser does not support " +
      "XMLHTTPRequest objects. This page requires " +
      "Internet Explorer 5 or better for Windows, " +
      "or Firefox for any system, or Safari. Other " +
      "compatible browsers may also exist.";
  }
}


// JavaScript Document marcio radaic
//padrao ajax
function getXMLHttp(){
var xmlhttp = null;
	try{
		xmlhttp = new XMLHttpRequest();
	}catch(ee){
		try{
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			try{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(E){
				xmlhttp = false;
			}
		}
	}
return xmlhttp;
}

/////////////////////////////////////////////////////////////////

//FUNCAO PARA PEGAR OS ELEMENTOS DO FORM
function BuscaElementosForm(idForm) {
    var elementosFormulario = document.getElementById(idForm).elements;
    var qtdElementos = elementosFormulario.length;
    var queryString = "";
    var elemento;

    //Cria uma funcao interna para concatenar os elementos do form
    this.ConcatenaElemento = function(nome,valor) {
                                if (queryString.length>0) {
                                    queryString += "&";
                                }
                                //queryString += encodeURIComponent(nome) + "=" + encodeURIComponent(valor);
                                //queryString += encodeURI(nome) + "=" + encodeURI(valor).replace("&", "%26");
								queryString += nome + "=" + valor.replace("&", "%26");
                             };

    //Loop para percorrer todos os elementos
    for (var i=0; i<qtdElementos; i++) {
        //Pega o elemento
        elemento = elementosFormulario[i];
        if (!elemento.disabled) {
            //Trabalha com o elemento caso ele nao esteja desabilitado
            switch(elemento.type) {
                //Realiza a acao dependendo do tipo de elemento
                case 'text': case 'password': case 'hidden': case 'textarea':
                    this.ConcatenaElemento(elemento.name,elemento.value);
                    break;
                case 'select-one':
                    if (elemento.selectedIndex>=0) {
                        this.ConcatenaElemento(elemento.name,elemento.options[elemento.selectedIndex].value);
                    }
                    break;
                case 'select-multiple':
                    for (var j=0; j<elemento.options.length; j++) {
                        if (elemento.options[j].selected) {
                            this.ConcatenaElemento(elemento.name,elemento.options[j].value);
                        }
                    }
                    break;
                case 'checkbox': case 'radio':
                    if (elemento.checked) {
                        this.ConcatenaElemento(elemento.name,elemento.value);
                    }
                    break;
            }
        }
    }
    return queryString;
}

/////////////////////////////////////////////////////////////////
function LoadFlash(caminho,largura,altura)
{
    document.write('<object style="float:left;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+largura+'" height="'+altura+'">');
    document.write('<param name="movie" value="'+caminho+'">');
    document.write('<param name="quality" value="high">'); 
    document.write('<param name="wmode" value="transparent">');
    document.write('<param name="menu" value="false">');
    document.write('<embed src="'+caminho+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'"></embed>');
    document.write('</object>');
}	


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////INICIO - VALIDAÇÃO DE CAMPOS////////////////

function checar_campos(pagina)
{
var errormessage = new String();


switch(pagina)
{

case "verifica_cpf":

if(checa_cpf(document.form_verifica_cpf_01.verifica_cpf.value)){ errormessage += "\n\n- Por favor insira um CPF válido."; }
	
break;
	

case "interesse":

	if(checa_numeros(document.cadastro_interesse.telefone.value)){ errormessage += "\n\n- Por favor digite seu telefone corretamente."; }
	if(checa_numeros(document.cadastro_interesse.ddd.value)){ errormessage += "\n\n- Por favor digite seu DDD corretamente."; }
	if(WithoutContent(document.cadastro_interesse.nome.value)){ errormessage += "\n\n- Por favor digite seu nome."; }
	//if(WithoutCheck(document.cadastro_interesse.curso[])){ errormessage += "\n\n- Por favor escolha um curso."; }
	if(WithoutContent(document.cadastro_interesse.email.value)){ errormessage += "\n\n- Por favor digite seu e-mail."; }
	//if(checa_nome(document.form_01.txt_alunoNomePai.value)){ errormessage += "\n\n- Por favor digite o nome do seu pai."; }
	//if(checa_nome(document.form_01.txt_alunoNomeMae.value)){ errormessage += "\n\n- Por favor digite o nome de sua mãe."; }
	//if(checa_nome(document.form_01.txt_alunoEndereco.value)){ errormessage += "\n\n- Por favor digite seu endereço."; }
	//if(checa_numeros(document.form_01.txt_alunoCEP.value)){ errormessage += "\n\n- Por favor digite seu CEP usando apenas números."; }
	//if(checa_numeros(document.form_01.txt_alunoEndNumero.value)){ errormessage += "\n\n- Por favor digite seu número de endereço."; }
	//if(checa_nome(document.form_01.txt_alunoEndBairro.value)){ errormessage += "\n\n- Por favor digite seu bairro."; }
	if(WithoutSelectionValue(document.cadastro_interesse.id_franquia)){ errormessage += "\n\n- Por favor escolha uma unidade."; }
	//if(checa_numeros(document.form_01.txt_alunoTelResddd.value)){ errormessage += "\n\n- Por favor digite seu DDD usando apenas números."; }
	//if(checa_numeros(document.form_01.txt_alunoTelResNum.value)){ errormessage += "\n\n- Por favor digite seu telefone usando apenas números."; }
	//if(WithoutContent(document.form_01.txt_alunoTelResNum.value)){ errormessage += "\n\n- Por favor digite seu telefone."; }
	//if(checa_numeros(document.form_01.txt_AnoConclusaoGraduacao.value)){ errormessage += "\n\n- Por favor digite ano de conclusão."; }
	//if(WithoutCheck(document.form_01.cbx_Garante)){ errormessage += "\n\n- Por favor marque o campo garantindo a autencidade de dados."; }
	//if(checa_cpf(document.form_01.txt_alunoCpf.value)){ errormessage += "\n\n- Por favor insira um CPF válido."; }
	//if(WithoutSelectionValue(document.form_01.slt_alunoEndUF)){ errormessage += "\n\n- Por favor escolha seu estado."; }
	//if(checa_email(document.form_01.txt_alunoEmail.value)){ errormessage += "\n\n- Por favor digite um e-mail."; }
	//if(sem_dois_valores(document.form_01.slt_AlunoInstituicaoEnsino.value,document.form_01.txt_AlunoInstituicaoEnsino.value)){ errormessage += "\n\n- Por favor escolher ou preencher o campo com sua instituição de ensino."; }
	

	//if(sem_dois_valores(document.form_01.slt_AlunoProfissao.value,document.form_01.txt_AlunoProfissaoOutro.value)){ errormessage += "\n\n- Por favor escolha sua profissão."; }
	//if(sem_dois_valores(document.form_01.slt_alunoComplementoFormacao.value,document.form_01.txt_alunoComplementoFormacaoOutros.value)){ errormessage += "\n\n- Por favor escolha sua formação."; }
	//if(sem_dois_valores(document.form_01.slt_alunoComplementoAreaFormacao.value,document.form_01.txt_alunoComplementoAreaFormacaoOutros.value)){ errormessage += "\n\n- Por favor escolha sua área de formação."; }
	//if(WithoutContent(document.form_01.txt_AlunoInstituicaoEnsino.value)){ errormessage += "\n\n- Por favor digite o nome da instituição de ensino em que se formou."; }

break;




case "inscricao_aluno":

if(checa_nome(document.form_01.txt_alunoNome.value)){ errormessage += "\n\n- Por favor digite seu nome completo usando apenas letras."; }
if(checa_numeros(document.form_01.txt_alunoRG.value)){ errormessage += "\n\n- Por favor digite seu RG completo usando apenas números."; }
if(WithoutContent(document.form_01.txt_alunoRGExpedidor.value)){ errormessage += "\n\n- Por favor o expedidor do RG."; }
if(checar_data(document.form_01.txt_alunoDtNascimento.value)){ errormessage += "\n\n- Por favor digite a data de seu nascimento no formato sugerido."; }
if(NoneWithCheck(document.form_01.rdo_alunoSexo)){ errormessage += "\n\n- Por favor escolha seu sexo."; }
if(WithoutContent(document.form_01.slt_alunoEstadoCivil.value)){ errormessage += "\n\n- Por favor escolha seu estado civil."; }
if(checa_nome(document.form_01.txt_alunoNomePai.value)){ errormessage += "\n\n- Por favor digite o nome do seu pai."; }
if(checa_nome(document.form_01.txt_alunoNomeMae.value)){ errormessage += "\n\n- Por favor digite o nome de sua mãe."; }
if(checa_nome(document.form_01.txt_alunoEndereco.value)){ errormessage += "\n\n- Por favor digite seu endereço."; }
if(checa_numeros(document.form_01.txt_alunoCEP.value)){ errormessage += "\n\n- Por favor digite seu CEP usando apenas números."; }
if(checa_numeros(document.form_01.txt_alunoEndNumero.value)){ errormessage += "\n\n- Por favor digite seu número de endereço."; }
if(checa_nome(document.form_01.txt_alunoEndBairro.value)){ errormessage += "\n\n- Por favor digite seu bairro."; }
if(WithoutSelectionValue(document.form_01.unidade_id)){ errormessage += "\n\n- Por favor escolha uma unidade."; }
if(checa_numeros(document.form_01.txt_alunoTelResddd.value)){ errormessage += "\n\n- Por favor digite seu DDD usando apenas números."; }
if(checa_numeros(document.form_01.txt_alunoTelResNum.value)){ errormessage += "\n\n- Por favor digite seu telefone usando apenas números."; }
if(WithoutContent(document.form_01.txt_alunoTelResNum.value)){ errormessage += "\n\n- Por favor digite seu telefone."; }
if(checa_numeros(document.form_01.txt_AnoConclusaoGraduacao.value)){ errormessage += "\n\n- Por favor digite ano de conclusão."; }
if(WithoutCheck(document.form_01.cbx_Garante)){ errormessage += "\n\n- Por favor marque o campo garantindo a autencidade de dados."; }
if(checa_cpf(document.form_01.txt_alunoCpf.value)){ errormessage += "\n\n- Por favor insira um CPF válido."; }
if(WithoutSelectionValue(document.form_01.slt_alunoEndUF)){ errormessage += "\n\n- Por favor escolha seu estado."; }
if(checa_email(document.form_01.txt_alunoEmail.value)){ errormessage += "\n\n- Por favor digite um e-mail."; }
if(sem_dois_valores(document.form_01.slt_AlunoInstituicaoEnsino.value,document.form_01.txt_AlunoInstituicaoEnsino.value)){ errormessage += "\n\n- Por favor escolher ou preencher o campo com sua instituição de ensino."; }

if(document.getElementsByName('txt_alunoEndCidade').length)
{
if(WithoutSelectionValue(document.form_01.txt_alunoEndCidade)){ errormessage += "\n\n- Por favor escolha sua cidade."; }
}

//if(document.form_01.curso_id.type != "hidden")
//{
//if(WithoutSelectionValue(document.form_01.curso_id)){ errormessage += "\n\n- Por favor escolha seu curso."; }
//}


if(document.form_01.curso_id)
{
if(WithoutSelectionValue(document.form_01.curso_id)){ errormessage += "\n\n- Por favor escolha seu curso."; }
}
else
{
	errormessage += "\n\n- Por favor escolha uma unidade.";
}
//if(sem_dois_valores(document.form_01.slt_AlunoProfissao.value,document.form_01.txt_AlunoProfissaoOutro.value)){ errormessage += "\n\n- Por favor escolha sua profissão."; }
//if(sem_dois_valores(document.form_01.slt_alunoComplementoFormacao.value,document.form_01.txt_alunoComplementoFormacaoOutros.value)){ errormessage += "\n\n- Por favor escolha sua formação."; }
//if(sem_dois_valores(document.form_01.slt_alunoComplementoAreaFormacao.value,document.form_01.txt_alunoComplementoAreaFormacaoOutros.value)){ errormessage += "\n\n- Por favor escolha sua área de formação."; }
//if(WithoutContent(document.form_01.txt_AlunoInstituicaoEnsino.value)){ errormessage += "\n\n- Por favor digite o nome da instituição de ensino em que se formou."; }

break;


case "fale_conosco":

if(checa_nome(document.getElementById('txt_info').value)){ 
	errormessage += "\n\nPor favor preencha o campo com uma mensagem."; 
	document.getElementById('txt_info').style.backgroundColor = '#FFD2D2';
	document.getElementById('txt_info').focus();
}
if(checa_email(document.getElementById('txt_alunoEmail').value)){ 
	errormessage += "\n\nPor favor digite seu endereço de email corretamente."; 
	document.getElementById('txt_alunoEmail').style.backgroundColor = '#FFD2D2';
	document.getElementById('txt_alunoEmail').focus();
}
if(checa_nome(document.getElementById('txt_alunoNome').value)){ 
	errormessage += "\n\nPor favor digite seu nome completo"; 
	document.getElementById('txt_alunoNome').style.backgroundColor = '#FFD2D2';
	document.getElementById('txt_alunoNome').focus();
}

break;
//-------------------------------------------------------------------------

default:
  //code to be executed if n is
  //different from case 1 and 2
}



// Put field checks above this point.
if(errormessage.length > 2)
{
    alert('AVISO:' + errormessage);
    return false;
    }
return true;
} // end of function CheckRequiredFields()


//validar data ///////////////////////////////////////////////////////

function checar_data(campo) {
    var expReg = /^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[1-2][0-9]\d{2})$/;
    if ((!campo.match(expReg)) || (campo == ''))
	{
  		return true;
    } 
}


//verifica cpf/////////////////////////////////////////////////////////////////////////////
function checa_cpf(cpf) {
	
	//cpf = document.validacao.cpfID.value;
	 erro = new String;
	 if (cpf.length < 11){
		 return true;
	 }
	 
	 var nonNumbers = /\D/;
	 if (nonNumbers.test(cpf)) {
		 return true;
	 }
	 
	 if (cpf == "00000000000" || cpf == "11111111111" || cpf == "22222222222" || cpf == "33333333333" || cpf == "44444444444" || cpf == "55555555555" || cpf == "66666666666" || cpf == "77777777777" || cpf == "88888888888" || cpf == "99999999999"){
		
		return true;
   }
   
   var a = [];
   var b = new Number;
   var c = 11;
   for (i=0; i<11; i++){
		   a[i] = cpf.charAt(i);
		   if (i < 9) b += (a[i] * --c);
   }
   if ((x = b % 11) < 2) { a[9] = 0 } else { a[9] = 11-x }
   b = 0;
   c = 11;
   for (y=0; y<10; y++) b += (a[y] * c--); 
   if ((x = b % 11) < 2) { a[10] = 0; } else { a[10] = 11-x; }
   
   if ((cpf.charAt(9) != a[9]) || (cpf.charAt(10) != a[10])){
		   //erro +="Digito verificador com problema!";
		   return true;
   }
   //if (erro.length > 0){
	//       alert(erro);
   //        return false;
  // }
  //return true;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//validar rg(verificacao se contem apenas numeros e se não está vazio)//////////////////////////////////////////
function checa_numeros(campo)
{
	if (isNaN(campo) || campo.length == 0)
	{
	return true;
	}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//validar nome(verificacao se contem um número razoável de caracteres e não é só números)//////////////////////////////////////////
function checa_nome(campo)
{
	if ((campo.length < 3) || (!isNaN(campo)))
	{
	return true;
	}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////


//verifica e-mail //////////////////////////////////////////////////////////////////////////////////////////////


var reEmail1 = /^[\w!#$%&'*+\/=?^`{|}~-]+(\.[\w!#$%&'*+\/=?^`{|}~-]+)*@(([\w-]+\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/;
var reEmail2 = /^[\w-]+(\.[\w-]+)*@(([\w-]{2,63}\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/;
var reEmail3 = /^[\w-]+(\.[\w-]+)*@(([A-Za-z\d][A-Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/;
var reEmail = reEmail3;

function checa_email(email) {
	if (email == "") {
		return true;
	} else {
		prim = email.indexOf("@")
		if(prim < 2) { return true;}
		if(email.indexOf("@",prim + 1) != -1) {	return true;}
		if(email.indexOf(".") < 1) { return true;}
		if(email.indexOf(" ") != -1) { return true;}
		if(email.indexOf("zipmeil.com") > 0) { return true;}
		if(email.indexOf("hotmeil.com") > 0) { return true;}
		if(email.indexOf("gmeil.com") > 0) { return true;}		
		if(email.indexOf(".@") > 0) { return true;}
		if(email.indexOf("@.") > 0) { return true;}
		if(email.indexOf(".com.br.") > 0) {	return true;}
		if(email.indexOf("/") > 0) { return true;}
		if(email.indexOf("[") > 0) { return true;}
		if(email.indexOf("]") > 0) { return true;}
		if(email.indexOf("(") > 0) { return true;}
		if(email.indexOf(")") > 0) { return true;}
		if(email.indexOf("..") > 0) { return true;}
	}
		return false;
}



////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function sem_dois_valores(ss,sss) {
if((ss.length > 0)||(sss.length > 0)) { return false; }
return true;
}

function ChecaSenha(ss,sss) {
if(ss == sss) { return false; }
return true;
}

function NoneWithContent(ss) {
for(var i = 0; i < ss.length; i++) {
    if(ss[i].value.length > 0) { return false; }
    }
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
    if(ss[i].checked) { return false; }
    }
return true;
}

function WithoutCheck(ss) {
if(ss.checked) { return false; }
return true;
}

function WithoutCheck_02() {

var chk = document.form_01; 

	for(i=0;i<chk.length;i++)
	{
		
		if(chk.elements[i].name=='curso_id[]' && chk.elements[i].checked==false)
		{
			return true;
		}
	
	}
return true;
}


function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
    if(ss[i].selected) {
        if(ss[i].value.length) { return false; }
        }
    }
return true;
}




/////////////FINAL - VALIDAÇÃO DE CAMPOS//////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


		var timer;

		function clickButtonBarra(id){
			if (timer != undefined) return;

			var tamanhoC = document.getElementById("container").offsetHeight;

			elem = document.getElementsByTagName("A");
			for(i=0;i<elem.length;i++){
				if (elem[i].className == "botaoBarraAtiva")
					elem[i].className = "botaoBarra";
				if (elem[i].className == "botaoBarra")
					tamanhoC -= elem[i].offsetHeight;
			}

			var inc = Math.round(tamanhoC / 10);

			itemClicado = document.getElementById(id);
			itemClicado.className = "botaoBarraAtiva";

			barra = "";
			elem = document.getElementsByTagName("DIV");
			for(i=0;i<elem.length;i++){
				if ((elem[i].id.substring(0,8) == "Conteudo") && (elem[i].style.display == "block"))
					barra = elem[i].id;
			}

			if(barra!="" && barra == ("Conteudo" + id)) return;

			timer = setTimeout("timerResizeBarra('"+"Conteudo" + id +"','"+barra+"',0,"+tamanhoC+","+tamanhoC+",10,"+inc+")",10);
		}

		function timerResizeBarra(barraAtiva, barraInativa, alturaAtiva,
				 alturaInativa, tamanhoC, tempo, inc){
			b1 = document.getElementById(barraAtiva);

			if ((alturaAtiva + inc) <= tamanhoC){
				b1.style.height = alturaAtiva + inc;

				if (barraInativa != ""){
					b2 = document.getElementById(barraInativa);
					b2.style.height = alturaInativa - inc;
				}

				if (tamanhoC == alturaInativa){
					if (b1.style.display != "block")
						b1.style.display = "block";
					if ((barraInativa != "") && (b2.style.overflow != "hidden"))
						b2.style.overflow = "hidden";
				}

				timer = setTimeout("timerResizeBarra('"+barraAtiva+"','"+barraInativa+"',"+(alturaAtiva + inc)+","+(alturaInativa - inc)+","+tamanhoC+","+tempo+","+inc+")",tempo);
			}else{
				b1.style.height = tamanhoC;
				if (barraInativa != ""){
					b2 = document.getElementById(barraInativa);
					b2.style.height = 0;
					b2.style.display = "none";
				}

				b1.style.overflow = "auto";

				clearTimeout(timer);
				timer = undefined;
			}
		}

		window.onload = function(){

			elem = document.getElementsByTagName("A");
			for(i=0;i<elem.length;i++){
				if (elem[i].className == "botaoBarra"){
					clickButtonBarra(elem[i].id);
					return;
				}
			}

			// Preloading de imagens
			preloader();

		}

		window.onresize = function(){

			if (navigator.appName.indexOf("Microsoft") != -1){
				tamanhoC = document.body.offsetHeight-4;
			}else{
				tamanhoC = window.innerHeight;
			}

			elem = document.getElementsByTagName("A");
			for(i=0;i<elem.length;i++){
				if ((elem[i].className == "botaoBarra") || (elem[i].className == "botaoBarraAtiva"))
					tamanhoC -= elem[i].offsetHeight;
			}

			elem = document.getElementsByTagName("DIV");
			for(i=0;i<elem.length;i++){
				if ((elem[i].id.substring(0,8) == "Conteudo") && (elem[i].style.display == "block")){
					elem[i].style.height = tamanhoC;
					return;
				}
			}
		}

		function preloader(){
			img1 = new Image();
			img1.src = "bnt_01.jpg";
			img2 = new Image();
			img2.src = "bnt_02.jpg";
			img3 = new Image();
			img3.src = "bnt_03.jpg";
			img4 = new Image();
			img4.src = "bnt_04.jpg";
			img5 = new Image();
			img5.src = "fundo.jpg";

} 

///////////////////////////////TROCA DE IMAGENS////////////////////////////////////////////

var fadeimages=new Array()
fadeimages[0]=["http://heroi.ig.com.br//images/stories/imgs/fullmetal_hqheroi_capaprinc.jpg", "http://heroi.ig.com.br/index.php?option=com_content&amp;task=view&amp;id=2198&amp;Itemid=20&amp;catid=75",""]
fadeimages[1]=["http://heroi.ig.com.br//images/stories/imgs/comunidades-capa.jpg", "http://heroi.ig.com.br/index.php?option=com_content&amp;task=view&amp;id=2181&amp;Itemid=20&amp;catid=75",""]
fadeimages[2]=["http://heroi.ig.com.br//images/stories/imgs/star-wars-force-unleashed_capa.jpg", "http://heroi.ig.com.br/index.php?option=com_content&amp;task=view&amp;id=2175&amp;Itemid=20&amp;catid=75",""]
fadeimages[3]=["http://heroi.ig.com.br//images/stories/imgs/halo3-capa.jpg", "http://heroi.ig.com.br/index.php?option=com_content&amp;task=view&amp;id=2168&amp;Itemid=20&amp;catid=75",""]

var fadebgcolor="white"

var fadearray=new Array()
var fadeclear=new Array()

var dom=(document.getElementById)
var iebrowser=document.all

function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=20
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();})
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array()
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}

var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2

if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')

if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}

fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}


fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1)
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}

fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}


fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}


////////////////////////////////////LINK IMG//////////////////////////////////


function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=20
}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}

<!--
var windowHandle;
function abre_info() {

windowHandle = window.open('utilitario_informativo.php?info_email='+document.informativo.info_email.value+'&info='+document.informativo.info.value,'newsletter','width=350,height=350');
    if (!windowHandle.opener)
        windowHandle.opener = self;
    return false;
}

function abre_janela(nome_janela,alvo_janela){
window.open(nome_janela,alvo_janela,'width=500,height=500');
}


//-->


/*=    =)                    */
function soNums(e)
{
    if (document.all){var evt=event.keyCode;}
    else{var evt = e.charCode; }
    if (evt <20 || (evt >47 && evt<58) || evt == 44 || evt == 46)
	{
		return true;
	}
	alert('Digite apenas números');
    return false;
} 
//onkeypress="return (soNums(event))"
