<script type="text/javascript">
function cekNamaReg() {
    var nm = document.getElementById("nama_lengkap").value;
    var em = document.getElementById("email").value;
    alert("Kirim nilai: "+nm+","+em);
    if (nm == "" || em == "") {
        document.getElementById("tampilForm").innerHTML = "";
        return;
    } else { 
        if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp = new XMLHttpRequest();
        } else {
            // code for IE6, IE5
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                document.getElementById("tampilForm").innerHTML = xmlhttp.responseText;
            }
        }
        xmlhttp.open("GET","modul/mod_reg_mahasiswa_baru/tampil_form.php?nm="+nm+"&em="+em,true);
        xmlhttp.send();
    }
}

function pilihKelurahan(str) {
    if (str == "") {
        document.getElementById("txtHintt").innerHTML = "";
        return;
    } else { 
        if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp = new XMLHttpRequest();
        } else {
            // code for IE6, IE5
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                document.getElementById("txtHintt").innerHTML = xmlhttp.responseText;
            }
        }
        xmlhttp.open("GET","modul/mod_reg_mahasiswa_baru/select_kelurahan.php?sl="+str,true);
        xmlhttp.send();
    }
}

function pilihKecamatan(str) {
    if (str == "") {
        document.getElementById("txtHint").innerHTML = "";
        return;
    } else { 
        if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp = new XMLHttpRequest();
        } else {
            // code for IE6, IE5
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
            }
        }
        xmlhttp.open("GET","modul/mod_reg_mahasiswa_baru/select_kabupaten.php?sk="+str,true);
        xmlhttp.send();
    }
}
function pilihKota(str) {
    if (str == "") {
        document.getElementById("txtHintKota").innerHTML = "";
        return;
    } else { 
        if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp = new XMLHttpRequest();
        } else {
            // code for IE6, IE5
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                document.getElementById("txtHintKota").innerHTML = xmlhttp.responseText;
            }
        }
        xmlhttp.open("GET","modul/mod_reg_mahasiswa_baru/select_kecamatan.php?sk="+str,true);
        xmlhttp.send();
    }
}
</script> 
<?Php
    $iu = $_GET['iu'];
    $ie = $_GET['ie'];
    
    if(empty($iu) && empty($ie)){
        include"form_add.php";
    }else{
        include"form_edit.php";
    }
?>

	<!-- GetButton.io widget -->
<script type="text/javascript">
    (function () {
        var options = {
            whatsapp: "+6289520003838", // WhatsApp number
            call_to_action: "hubungi kami", // Call to action
            position: "left", // Position may be 'right' or 'left'
        };
        var proto = document.location.protocol, host = "getbutton.io", url = proto + "//static." + host;
        var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = url + '/widget-send-button/js/init.js';
        s.onload = function () { WhWidgetSendButton.init(host, proto, options); };
        var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x);
    })();
</script>
<!-- /GetButton.io widget -->