function limpar (objeto, msg) {if (objeto.value == msg)objeto.value = '';}
function mostrar (objeto, msg) {if (objeto.value == '')objeto.value = msg;}

var isEmail = function(iCampo, iNomeCampo) {
	var str = iCampo.value;
	var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
	var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
	if ( (!r1.test(str) && r2.test(str)) ) {
		return true;
	} else {
		alert(iNomeCampo + ' inválido.'); return false;
	}
	return true;
}

var VerificaIndiqueMusica = function(f) {	
	if(f.IndiqueMusica.value=='Nome da música que quer ouvir'){alert('Por favor, informe a música indicada'); f.IndiqueMusica.focus(); return false;}
	if(f.BandaQueToca.value=='Nome da banda que toca'){alert('Por favor, informe a banda que toca'); f.BandaQueToca.focus(); return false;}
	if(f.Nome.value=='Seu nome'){alert('Por favor, informe seu nome'); f.Nome.focus(); return false;}
	if(isEmail(f.Email,'E-mail')==false){f.Email.focus(); f.Email.select(); return false;}
}

var VerificaNews = function(f) {	
	if(f.Nome.value=='Seu nome'){alert('Por favor, informe seu nome'); f.Nome.focus(); return false;}
	if(isEmail(f.Email,'E-mail')==false){f.Email.focus(); f.Email.select(); return false;}
}

var VerificaContato = function(f) {
	
	if(f.Nome.value=='Seu nome'){alert('Por favor, informe seu nome'); f.Nome.focus(); return false;}
	if(isEmail(f.Email, 'E-mail')==false){f.Email.focus(); f.Email.select(); return false;}
	if(f.Assunto.value=='Assunto'){alert('Por favor, informe o assunto'); f.Assunto.focus(); return false;}
	if(f.Texto.value=='Texto' || f.Texto.value==''){alert('Por favor, descreva o que deseja'); f.Texto.focus(); return false;}
	
}
