function carregaCategoria(combo, idCategoriaPai, selecionada, texto)
{
	cleanDrop( combo );
	myOpt = new Option();
	myOpt.value = "";
	myOpt.text = "aguarde...";
	myOpt.selected = true;
	combo.options[0] = myOpt;

	var xmlDoc = new ActiveXObject( "Microsoft.XMLDOM" );
	xmlDoc.async = "false"; 		
	xmlDoc.load( "/include/getCategoriaXml.asp?ID=" + idCategoriaPai + "&texto=" + texto );
	campos = xmlDoc.documentElement.childNodes;  

	cleanDrop( combo );
	for ( i = 0; i < campos.length; i++ ) {
	   
	   txtValue = campos.item(i).attributes(0).value;
	   txtText  = campos.item(i).attributes(1).value;  
	   
	   myOption = new Option();
	   myOption.value = txtValue;
	   myOption.text = txtText;   
	   combo.options[combo.options.length] = myOption;
	   if (selecionada == txtValue) { myOption.selected = true; }
	}
}


function carregaCidade(combo, idEstado, selecionada, todos)
{
	cleanDrop( combo );
	myOpt = new Option();
	myOpt.value = "";
	myOpt.text = "aguarde...";
	myOpt.selected = true;
	combo.options[0] = myOpt;

	var xmlDoc = new ActiveXObject( "Microsoft.XMLDOM" );
	xmlDoc.async = "false";
	xmlDoc.load( "/include/getCidadeXml.asp?ID=" + idEstado + "&todos=" + todos);
	campos = xmlDoc.documentElement.childNodes;  

	cleanDrop( combo );

	for ( i = 0; i < campos.length; i++ ) {
	   
	   txtValue = campos.item(i).attributes(0).value;
	   txtText  = campos.item(i).attributes(1).value;  
	   
	   myOption = new Option();
	   myOption.value = txtValue;
	   myOption.text = txtText;   
	   combo.options[combo.options.length] = myOption;
	   if (selecionada == txtValue) { myOption.selected = true; }
	}
}