
function valida_catalogo()
{

	var nome,endereco,complemento,bairro,cidade,uf,cep;

	nome = document.catalogo.txtnome;
	endereco = document.catalogo.txtendereco;
	complemento = document.catalogo.txtcomplemento;
	bairro = document.catalogo.txtbairro;
	cidade = document.catalogo.txtcidade;
	uf = document.catalogo.txtuf;
	cep = document.catalogo.txtcep;
    	
	if (RemoveEspaços2(nome.value) == ""){
		pixWndAlert('Informe o nome!', 'ATENÇÃO', null, ID_WND_INFORMATION,'catalogo','txtnome','')
		return false
	}

	if (RemoveEspaços2(endereco.value) == ""){
		pixWndAlert('Informe o endereço!', 'ATENÇÃO', null, ID_WND_INFORMATION,'catalogo','txtendereco','')
		return false
	}

	if (RemoveEspaços2(bairro.value) == ""){
		pixWndAlert('Informe o bairro!', 'ATENÇÃO', null, ID_WND_INFORMATION,'catalogo','txtbairro','')
		return false
	}

	if (RemoveEspaços2(cidade.value) == ""){
		pixWndAlert('Informe a cidade!', 'ATENÇÃO', null, ID_WND_INFORMATION,'catalogo','txtcidade','')
		return false
	}

	if (uf.selectedIndex==0) {
		pixWndAlert('Informe a UF!', 'ATENÇÃO', null, ID_WND_INFORMATION,'catalogo','txtuf','')
		return false
	}
	
	if (RemoveEspaços2(cep.value) == ""){
		pixWndAlert('Informe o CEP!', 'ATENÇÃO', null, ID_WND_INFORMATION,'catalogo','txtcep','')
		return false
	}

	if (cep.value.length!="8") {
		pixWndAlert('CEP deve possuir 8 dígitos!', 'ATENÇÃO', null, ID_WND_INFORMATION,'catalogo','txtcep','')
		return false
	}
	
	return true;
	
}


/***************************************************************************/

function recarrega()
{
  document.catalogo.action = "./CatalogoExtra.asp";
  document.catalogo.submit();
}

/***************************************************************************/

function Habilita_Campos_Catalogo(obj,obj2,obj3,obj4,obj5,obj6,obj7,obj8)
{
	var x=document.getElementById(obj);
	x.disabled=false;

	var x=document.getElementById(obj2);
	x.disabled=false;

	var x=document.getElementById(obj3);
	x.disabled=false;

	var x=document.getElementById(obj4);
	x.disabled=false;

	var x=document.getElementById(obj5);
	x.disabled=false;

	var x=document.getElementById(obj6);
	x.disabled=false;

	var x=document.getElementById(obj7);
	x.disabled=false;
	
	var x=document.getElementById(obj8);
	x.disabled=false;	
}