if(isset($_POST['estado']) == true){
	if($_POST['estado'] != ''){
	?>
	document.frm.estado.value = '<?= isset($_POST['estado']) ? htmlspecialchars($_POST['estado']) : ''; ?>';
	trocarSelect('frm', 'cidade', document.frm.estado.options[document.frm.estado.selectedIndex].value);
	<?
	}
}
?>
<?
if(isset($_POST['cidade']) == true){
	if($_POST['cidade'] != ''){
	?>
		document.frm.cidade.options[document.frm.cidade.length] = new Option("<?= isset($_POST['cidade']) ? htmlspecialchars($_POST['cidade']) : ''; ?>");
		document.frm.cidade.selectedIndex = document.frm.cidade.length - 1;
	<?
	}
}

