function high(which2){
	theobject=which2
	highlighting=setInterval("highlightit(theobject)",60)
}

function low(which2){
	clearInterval(highlighting)
	which2.filters.alpha.opacity=50
}

function highlightit(cur2){
	return cur2.filters.alpha.opacity=100
}


function ValidaFaleConosco(){

   	var form = document.forms['formmail'];
   		if (form.nome.value == '')	
	  {
		alert('O campo Nome deve ser preenchido');
		form.nome.focus();
		return;
	  }
		if (form.email.value == '' || form.email.value.indexOf("@") < 2) {
			alert('O campo Email deve ser preenchido.\nOu deve ser preenchido corretamente.');
			form.email.focus();
			return;
		}
	  if (form.assunto.value == '')
	  {
		alert('O campo Assunto deve ser preenchido');
		form.assunto.focus();
		return;
	  }
	if (form.mensagem.value == '')
	  {
		alert('A Mensagem deve ser preenchida');
		form.mensagem.focus();
		return;
	  }
		form.action = 'includes/faleConosco.asp';
		form.submit();
}

function ValidaBusca(){

   	var f = document.forms['pesquisa'];
   	
   	if (f.busca.value == ''){
		alert('É necessário preencher o campo.');
		f.busca.focus();
		return;
	}
	
	f.target = "info";
	f.action = "funcs/busca.asp";
	f.submit();
	
 }


function AbreDiv(obj){
	
	var div;

	div = obj;
	if (document.getElementById(div).style.display == "none"){
		document.getElementById(div).style.display = "block";
		}
	else{
		document.getElementById(div).style.display = "none";
    	}
}


function AbreMidia(IDMidia){
	window.open('VerMidia.asp?IDMidia='+ IDMidia,'Midia','width=490,height=370')
}

function AbreGaleria(Id, Nome){

	window.open('http://www.jornal.coc.com.br/galeria.asp?Id='+ Id +'&Nome='+ Nome,'wind','toolbar=no,width=645,height=553,scrollbars=yes,resizable=no');
	
}

function AbreMidia1(Midia, Tipo, cesc){
	
	if (Tipo == 1){
		window.open('http://www.jornal.coc.com.br/fotos/'+ Midia,'wind','toolbar=no,width=628,height=504,scrollbars=yes,resizable=no');
		return
	}
	if (Tipo == 2){
		window.open('http://www.jornal.coc.com.br/EventosVideoXML.asp?Video=' + Midia +'&cesc='+ cesc,'video','width=325,height=300,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no')
		return
	}
}


function BuscaPalavra() {
	var f = document.forms['busca'];
	
   	if (f.busca.value == ''){
		alert('É necessário preencher o campo.');
		f.busca.focus();
		return;
	}	
	
	f.q.value = f.busca.value + ' site:www.revistajuridicaunicoc.com.br';
	f.target = '_blank'
	f.submit();
	f.reset();
}

function foiForm(ev){
   if(ev.keyCode == 13)
		return false;
}
	
	
function mudaTam(pagina, novoTam){

	var x = new Array();
	var qtde = document.getElementById('qtde').value
	if (pagina == 1){	// Default		
		x[1] = 12;
		x[2] = 10;
		for ( i=3; i<=100; i++){
			x[i] = 8;
		}
	}
	
	if (pagina == 2){	// Exibir Conteúdo - Notícia | Entrevista
		x[1] = 12;
		x[2] = 10;
	}
	
	if (pagina == 3){	// Lista Artigos 
		x[1] = 12;
		for ( i=2; i<=100; i++){
			x[i] = 8;
		}
	}
	
	if (pagina == 4){	// Lista Notícias
		x[1] = 12;
		for ( i=2; i<=100; i++){
			x[i] = 8;
		}
	}
	
	if (pagina == 5){	// Lista Entrevistas
		x[1] = 12;
		for ( i=2; i<=100; i++){
			x[i] = 8;
		}
	}
	
	if (pagina == 6){	// Jurisprudência
		x[1] = 12;
		for ( i=2; i<=250; i++){
			x[i] = 10;
		}
	}
	
	if (pagina ==7){		// Downloads
		x[1] = 12;
		x[2] = 10;
		for ( i=3; i<=20; i++){
			x[i] = 8;
		}
	}
	
	if (pagina == 8){	// Conselho Editorial
		x[1] = 12;
		x[2] = 10;
		x[3] = 8;
	}
	
	if (pagina ==9){		// Expediente
		x[1] = 12;
		for ( i=2; i<=50; i++){
			x[i] = 10;
		}
	}
	
	if (pagina ==10){	// Links
	
		var qtde1 = document.getElementById('qtde1').value
		
		total = 12 + novoTam;
		document.getElementById("tamanho1").style.fontSize = total + "pt";
		
		for(i=2;i<qtde;i++){
			total = 8 + novoTam;
			document.getElementById("tamanho"+ i).style.fontSize = total + "pt";
		}
		
		for(i=1;i<qtde1;i++){
			total = 10 + novoTam;
			document.getElementById("tamanho_"+ i).style.fontSize = total + "pt";
		}
		
		return;
					
		/*x[1] = 12;
		x[2] = 10;
		for ( i=3; i<=8; i++){
			x[i] = 8;
		}
		x[9] = 10;
		for ( i=10; i<=15; i++){
			x[i] = 8;
		}
		x[16] = 10;
		for ( i=17; i<=32; i++){
			x[i] = 8;
		}
		x[33] = 10;
		for ( i=34; i<=44; i++){
			x[i] = 8;
		}
		x[45] = 10;
		for ( i=46; i<=49; i++){
			x[i] = 8;
		}
		x[50] = 10;
		for ( i=51; i<=74; i++){
			x[i] = 8;
		}
		x[75] = 10;
		for ( i=76; i<=97; i++){
			x[i] = 8;
		}
		x[98] = 10;
		for ( i=99; i<=105; i++){
			x[i] = 8;
		}
		x[106] = 10;
		for ( i=107; i<=115; i++){
			x[i] = 8;
		}*/
	
	}
	
	if (pagina==11){		// Busca
		x[1] = 12;
		x[2] = 8;
		x[3] = 8;
		x[4] = 8;
		x[5] = 8;
		x[6] = 8;
		x[7] = 10;
		x[8] = 10;
		x[9] = 7;
		
		for ( i=10; i<=qtde; i++){
			x[i] = 8;
		}
	}	
	
	
	for(i=1;i<qtde;i++){
		total = x[i] + novoTam;
		document.getElementById("tamanho"+ i).style.fontSize = total + "pt";
	}
									
}





