//adicionar swf 

function addSWF(URL, WIDTH, HEIGHT, TRANSPARENT, ALIGN){

	document.write('<object classid="clsid:27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+ WIDTH +'" height="'+ HEIGHT +'" align="'+ ALIGN +'">');
	document.write('   <param name="movie" value="'+ URL +'" />');
	document.write('   <param name="quality" value="high" />');
	if(TRANSPARENT){
		document.write('  	<param name="Wmode" value="Transparent" />');	
		
	}
	document.write('   <embed src="'+ URL +'" quality="high"');
	if(TRANSPARENT){
		document.write(' Wmode = "transparent" ');
		
	}
	document.write(' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ WIDTH +'" height="'+ HEIGHT +'" align="'+ ALIGN +'"></embed>');
	document.write('</object>');

}


//



function VerificaDados() {
with (document.f){
	if (nome.value.length==0) {
		alert("Por favor, digite seu nome.");
		nome.focus();
		return false;
	}
	if (email.value.length==0) {
		alert("Por favor, digite seu email.");
		email.focus();
		return false;
	}
    if (email.value.indexOf('@' , 0) == -1){
		alert("E-mail inválido.");
		email.focus();
		return false;		
		}
    if (email.value.indexOf('.' , 0) == -1){
		alert("E-mail inválido.");
		email.focus();
		return false;		
		}
   if (email.value.length<5) {
		alert("E-mail inválido.");
		email.focus();
		return false;
      }
}
}

function Mascara(formato, objeto)

{
	campo = eval(objeto);
	
	//TELEFONE
	if(formato=='TELEFONE'){
		if(campo.value.length == 0)
			campo.value += "(";
		else if(campo.value.length == 3)
			campo.value += ") ";
		else if(campo.value.length == 9)
			campo.value += ".";
	}
	
	//CEP
	if(formato=='CEP'){
		if(campo.value.length == 5)
			campo.value += ".";
		}
}

//
function data(nomeCamada){
	if (f.visita.checked){
		document.getElementById('data').style.visibility="visible"; 
	}
	else {document.getElementById('data').style.visibility="hidden"; 
}
}


