
function get(id) {
	return document.getElementById(id);
}

function exibe(el){
	document.getElementById(el).style.display="block"
}
function oculta(el){
	document.getElementById(el).style.display="none"
}

function apaga(o){
	if(o.value == "nome" || o.value == "e-mail" ){
		o.value="";
	}
}

function validaNewsletter(){
	e=document.form_newsletter
	if(e.nome.value == "" || e.nome.value == "nome"){
		alert("O campo Nome é obrigatório.");
		e.nome.focus();
		return false;	
	}
	if (e.email.value.search(/^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$/) == -1) {
		alert ("O campo E-mail deve conter um endereço eletrônico!");
		e.email.focus();
		return false;
	}	
	return true
}


function validaContato(){
	e=document.form1
	if(e.nome.value == ""){
		alert("O campo Nome é obrigatório.");
		e.nome.focus();
		return false;	
	}
	if (e.email.value.search(/^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$/) == -1) {
		alert ("O campo E-mail deve conter um endereço eletrônico!");
		e.email.focus();
		return false;
	}
	if(e.comentarios.value == ""){
		alert("O campo Comentários é obrigatório.")
		e.comentarios.focus()
		return false
	}
	
	return true
}

/*
function legenda(nome){
	document.write("<div style='position:absolute; top:400px; right:0px; padding:10px; width:100px; height:30px;  text-transform:uppercase; font-size:18px;' >"+nome+"</div>")
}
*/

function x(){
if (document.getElementById)
return document.getElementById("legenda")
}

function label(aaa){
		x().innerHTML = aaa;
}

