<script>
	
	var a = document.getElementById('idioma');
	if (a.value == "es") {
		<?php if (defined("BANDERA_ES")) { ?>
			document.getElementById('banderaPais').innerHTML = '<span class="flag-icon flag-icon-<?php echo BANDERA_ES; ?>"></span>&nbsp;';
		<?php } else { ?>
			document.getElementById('banderaPais').innerHTML = '<span class="flag-icon flag-icon-mx"></span>&nbsp;';
		<?php } ?>

	} else {

		document.getElementById('banderaPais').innerHTML = '<span class="flag-icon flag-icon-um"></span>&nbsp;';

	}

	$(document).ready(function() {
		$('.modal').modal({
			dismissible: false
		});
		var Arreglo = $('select');
		for (var i = 0; i < Arreglo.length; i++) {
			if (Arreglo[i].id != '') {
				$("#" + Arreglo[i].id).formSelect();
			}
		}
	});

</script>