// JavaScript para exibir o flash
function flash(largura, altura, arquivo){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+largura+'" height="'+altura+'" id="teste" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" />');
	document.write('<param name="movie" value="'+arquivo+'" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><embed src="'+arquivo+'" wmode="transparent" quality="best" width="'+largura+'" height="'+altura+'" name="teste" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
	
	<!--
	function altera(obj){
		if (document.getElementById(obj).style.display == ''){
			document.getElementById(obj).style.display = 'none';
		}
		else{
			document.getElementById(obj).style.display = '';
		}
	}
	
	function esconde(obj){
		document.getElementById(obj).style.display = 'none';
		}
	//-->
<!--
// valida cpf/cnpj do cliente (condicional)
function valida_cpf_cnpj(input){
	if (document.formcadastro.pessoa[0].checked){		
		return valida_CNPJ(input);
	}
	else{
		return valida_CPF(input);
	}
}
function formata_cpf_cnpj(input,event){
	if (document.formcadastro.pessoa[0].checked){
		if(ie) {return setcnpj(input,event)};
	}	
	else{
		if(ie) {return setcpf(input,event)};
	}
}
function tamanho_campo(input, qtde){
	if (document.formcadastro.pessoa[1].checked){
		countChars(input,qtde);
	}
}

// valida cpf/cnpj do sócio (condicional)
function valida_cpf_cnpj_soc(input){
	if (document.formcadastro.socpessoa[0].checked){		
		return valida_CNPJ(input);
	}
	else{
		return valida_CPF(input);
	}
}
function formata_cpf_cnpj_soc(input,event){
	if (document.formcadastro.socpessoa[0].checked){
		if(ie) {return setcnpj(input,event)};
	}	
	else{
		if(ie) {return setcpf(input,event)};
	}
}
function tamanho_campo_soc(input, qtde){
	if (document.formcadastro.socpessoa[1].checked){
		countChars(input,qtde);
	}
}

function ocultacampos(){
	if (document.formcadastro.pessoa[0].checked){
		mostra('representante');
	}
	else{
		oculta('representante');
	}
	document.formcadastro.cpf_cnpj.value = '';
}

function mostraoculta(obj,imgname){
	image01 = "imagens/seta.gif"  
	image02 = "imagens/setaoff.gif"

	if(document.getElementById(obj).style.display == 'none'){
		document.getElementById(obj).style.display = '';
		imgname.src = image02;
		imgname.alt = "Ocultar dados";
	}
	else{
		document.getElementById(obj).style.display = 'none';
		imgname.src = image01;
		imgname.alt = "Preencher dados";
	}
}

<!--
// valida cpf/cnpj do cliente (condicional)
function valida_cpf_cnpj(input){
	if (document.formcadastro.pessoa[0].checked){		
		return valida_CNPJ(input);
	}
	else{
		return valida_CPF(input);
	}
}
function formata_cpf_cnpj(input,event){
	if (document.formcadastro.pessoa[0].checked){
		if(ie) {return setcnpj(input,event)};
	}	
	else{
		if(ie) {return setcpf(input,event)};
	}
}
function tamanho_campo(input, qtde){
	if (document.formcadastro.pessoa[1].checked){
		countChars(input,qtde);
	}
}

// valida cpf/cnpj do sócio (condicional)
function valida_cpf_cnpj_soc(input){
	if (document.formcadastro.socpessoa[0].checked){		
		return valida_CNPJ(input);
	}
	else{
		return valida_CPF(input);
	}
}
function formata_cpf_cnpj_soc(input,event){
	if (document.formcadastro.socpessoa[0].checked){
		if(ie) {return setcnpj(input,event)};
	}	
	else{
		if(ie) {return setcpf(input,event)};
	}
}
function tamanho_campo_soc(input, qtde){
	if (document.formcadastro.socpessoa[1].checked){
		countChars(input,qtde);
	}
}

function ocultacampos(){
	if (document.formcadastro.pessoa[0].checked){
		mostra('representante');
	}
	else{
		oculta('representante');
	}
	document.formcadastro.cpf_cnpj.value = '';
}

function mostraoculta(obj,imgname){
	image01 = "imagens/seta.gif"  
	image02 = "imagens/setaoff.gif"

	if(document.getElementById(obj).style.display == 'none'){
		document.getElementById(obj).style.display = '';
		imgname.src = image02;
		imgname.alt = "Ocultar dados";
	}
	else{
		document.getElementById(obj).style.display = 'none';
		imgname.src = image01;
		imgname.alt = "Preencher dados";
	}
}
//-->

function showDetails(divID)
{     
   var strShow
       strShow = divID+"Show";
   var strHide
       strHide = divID+"Hide";
       
   document.all[divID].style.display = "block";
   document.all[strShow].style.display = "none";
   document.all[strHide].style.display = "block";
}

function hideDetails(divID)
{
   var strShow
       strShow = divID+"Show";
   var strHide
       strHide = divID+"Hide";

   document.all[divID].style.display = "none";
   document.all[strShow].style.display = "block";
   document.all[strHide].style.display = "none";
}

