function carregar(){
	img = new Array("img/topo1.png","img/topo2.png","img/topo3.png","img/home-frase.jpg","img/home-frase2.jpg","img/home-frase3.jpg","img/atleta.jpg","img/instituto.jpg","img/stand.jpg","img/competicoes.jpg","img/fotos.jpg","img/videos.jpg","img/contato.jpg","img/fundo-branco.png","img/fundo-branco2.png","img/cel1-1.png","img/cel1-2.png","img/cel1-3.png","img/fundo-fotos.gif","img/blog-azul.jpg","img/blog2-azul.jpg","img/blog-verde.jpg","img/blog2-verde.jpg","img/blog-rosa.jpg","img/blog2-rosa.jpg");
	for(i = 0; i < img.length; i++){
		var imgsrc = new Image();
		imgsrc.src = img[i];
	}
}
function m1(obj,foto){
	document.getElementById(obj).style.background = "url(img/"+foto+") no-repeat";
}

function limpar(obj,txt){
	if(obj.value == txt){
		obj.value = "";
	}
}
function voltar(obj,txt){
	if(obj.value == ""){
		obj.value = txt;
	}
}

function mudar(obj){
	switch(obj){
		case "atleta":
			document.getElementById('fundo-ney').style.background = "url(img/atleta.jpg) no-repeat";
			break;
		case "instituto":
			document.getElementById('fundo-ney').style.background = "url(img/instituto.jpg) no-repeat";
			break;
		case "stand":
			document.getElementById('fundo-ney').style.background = "url(img/stand.jpg) no-repeat";
			break;
		case "competicoes":
			document.getElementById('fundo-ney').style.background = "url(img/competicoes.jpg) no-repeat";
			break;
		case "fotos":
			document.getElementById('fundo-ney').style.background = "url(img/fotos.jpg) no-repeat";
			break;
		case "contato":
			document.getElementById('fundo-ney').style.background = "url(img/contato.jpg) no-repeat";
			break;
		case "videos":
			document.getElementById('fundo-ney').style.background = "url(img/videos.jpg) no-repeat";
			break;
		default:
			document.getElementById('fundo-ney').style.background = "url(img/home.jpg) no-repeat";
	}
}
function tam(pg) {
	document.getElementById("conteudo").height = 583;
	parent.document.getElementById("fundo-branco").style.background="url(img/fundo-branco2.png) no-repeat";
}
function tam2(pg) {
	document.getElementById("conteudo").height = 410;
	parent.document.getElementById("fundo-branco").style.background="url(img/fundo-branco.png) no-repeat";
}
/////////////////////////////////////////////////////////////////////////////////////////////////
//validação contato//////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////
function vazio(obj){
	if(obj == ""){
		return false;
	}else{
		return true;	
	}
}
function tamanho(obj,tam){
	if(obj.length < tam){
		return false;
	}else{
		return true;
	}
}
function num(obj){
	if(obj*1 != obj){
		return false;
	}else{
		return true;	
	}
}

////
function validaForm(form){
	with(form){
		//nome
		if(vazio(nome.value) == false){
			alert("Preencha o campo Nome!");
			nome.focus();
			return false;
		}
		if(num(nome.value)){
			alert("Preencha o campo Nome corretamente!");
			nome.focus();
			return false;
		}
		
		//cidade
		if(vazio(cidade.value) == false){
			alert("Preencha o campo Cidade!");
			cidade.focus();
			return false;
		}
		//estado
		if(vazio(estado.value) == false){
			alert("Preencha o campo Estado!");
			estado.focus();
			return false;
		}
		
		//e-mail
		var re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
		if (!re.test(email.value)) {
			alert("Preencha o E-mail corretamente!");
			email.focus();
			return false;
		}
		
		//mensagem
		if(vazio(mensagem.value) == false || mensagem.value == "Mensagem"){
			alert("Preencha o campo Mensagem corretamente!");
			mensagem.focus();
			return false;
		}
	}//fim de with
	return true;
}//fim de valida contato
