<!-- 
// 

function textCounter(campo, countcampo, maxlimit){//conta/mostra caracteres restantes e limita o tamanho do campo
    if (campo.value.length > maxlimit) //se passar do limite nao deixa entrar o caracter
        campo.value = campo.value.substring(0, maxlimit);
        //reduz o valor do campo de contadem
    else 
        countcampo.value = maxlimit - campo.value.length;
}


function confereComent()
{
	str = "&Eacute; preciso preencher o nome, o e-mail e o texto.";

	if (document.forms[0].nome.value.length == 0)
	{
		alert(str);
		return false;	
	}
	if (document.forms[0].email.value.length == 0)
	{
		alert(str);
		return false;	
	}
	if (document.forms[0].desc.value.length == 0)
	{
		alert(str);
		return false;	
	}
}

function popupabrefoto(largura,altura, id, gal)
{
	var popup_URL = "../texto/popup.php?id="+id+"&gal="+gal+"&h="+altura+"&w="+largura;
	popup = window.open(popup_URL,"FOTOS","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,menubar=no,width=" + largura + " height=" + altura + ",top=0,left=0");
	//,top="+((screen.availHeight/2)-(altura/2))+",left="+((screen.availWidth/2)-(largura/2))
	popup.focus();
}

function camada(nome_da_camada) 
{
	
	if( document.getElementById(nome_da_camada).style.visibility == "hidden" ) 
	{
	document.getElementById(nome_da_camada).style.visibility = "visible";
	}
	else 
	{ 
	document.getElementById(nome_da_camada).style.visibility = "hidden";
	}
}

function abre_layer(layer)
	{
	document.getElementById(layer).style.visibility = "visible";
	}
	
	
function fecha_layer(layer)
	{
	document.getElementById(layer).style.visibility = "hidden";
	}

function zeracamadas()
{
	document.getElementById("cursos").style.visibility = "hidden";
}

//-->

