/********************Galeria girando************************************/

function janela()
	{ 
	rodar();
	open ("templates/aprovados.html","janela", "status=no,width=500, height=144")
	}


var cont=1;

var max=4;

function ocultar_galeria(){

	for(i=1;i<=4;i++){

		document.getElementById("galeria"+i).style.display="none";

		document.getElementById('li'+i).style.background="#CCCCCC";

	}

}



function exibir_galeria(x){

	ocultar_galeria();

	document.getElementById('galeria'+x).style.display="block";

	document.getElementById('li'+x).style.background="#000000";

	cont=x;

}

function rodar() {

ocultar_galeria();


//document.getElementById('img1').style.display="block";

//document.getElementById('img2').style.display="none";

document.getElementById('galeria'+cont).style.display=['block'];

document.getElementById('li'+cont).style.background="#000000";

if (cont==max){

	cont=1;

	}

else {

cont++;

}

setTimeout("rodar()",3000);

}

/********************//************************************/



/********************Topo Menu************************************/



function exibe_menu(x){

document.getElementById('menu1.'+x).style['display']='block';

/*if (x==1){

document.getElementById('menu1.'+x).style.cssText = "margin-left:238px; *margin-left:360px";

}

else if (x==2){

document.getElementById('menu1.'+x).style.cssText = "margin-left:360px; *margin-left:480px";

}

else if(x==3){

document.getElementById('menu1.'+x).style.cssText = "margin-left:450px; *margin-left:570px";

}

//document.getElementById('menu1.'+x).style.marginLeft="5px";*/

}

function oculta_menu(){

var i;

	for (i=1;i<5;i++){

		menu='menu1.'+i;

		document.getElementById(menu).style['display']='none';

	}

}

function pesquisa() {

var nome = document.getElementById('busca').value;

if (nome == ''){

  alert ('Digite uma palavra para fazer a pesquisa');

  }

else{

window.location='http://www.google.com.br/search?hl=pt-BR&q='+nome+'&meta='

	}

}



function validar_login(){

login=document.getElementById('login').value;

senha=document.getElementById('senha').value;

if ((login =='')|| (senha=='')){

	alert ('Entre com login e senha')

	}

else

	{

	alert('Logando...')

	}

}



/********************//***********************************/



function validar_form_contato(){

var campo1 = document.getElementById('nome').value;

var campo2 = document.getElementById('assunto').value;

var campo4 = document.getElementById('email').value;

var campo5 = document.getElementById('conteudo').value;

var form = document.getElementById('form_contato');



if (campo1 != '')

	{

	form.submit();

	}

else 	

	{

		document.getElementById('error_formulario').style.display='block';

	}

	

}



function exibe_coordenador(x){

oculta_coordenador();

document.getElementById('foto'+x).style.display="block";

}



function oculta_coordenador(){

for(i=1;i<5;i++){

	document.getElementById('foto'+i).style.display="none";

	}

}



function popup()

  {

	window.open('templates/projeto.html','page','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=520,height=520');  

  }

  

function debug()

{

var danilo =document.getElementById('1').value;

alert (danilo);

}



function popup_galeria()

{

   window.open('../iemp/galeria_site/galeria.swf','page','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=640,height=480');  

}



function rodar_recados(x)

 {



if (x==1){

document.getElementById('img1').style.display="none";

document.getElementById('img2').style.display="block";

 }

 else if (x==2){

document.getElementById('img1').style.display="block";

document.getElementById('img2').style.display="none";

 }

}



function enquete(){

form.submit();

}

