function toggleForm(on)
{
    if (document.getElementById("callback")) {
        document.getElementById("callback").style.display = "none";
    }
    document.getElementById("dirinclude").style.display = on ? "" : "none";
    document.forms["didata"].admin.focus();
}


function useHttpResponse_dirinclude()
{
    var f = document.forms["didata"];
    if (http.readyState == 4) {
        f.admin.value = "";
        f.url.value = "";
        f.contact.value = "";
        f.phone.value = "";
        f.email.value = "";
        document.getElementById("dicontent").innerHTML = "Thank-you.<br /><br />Someone from HSAConnect will contact you soon to confirm your information.";
    }
}


function sendDirData()
{
    var f = document.forms["didata"];
    if (f.admin.value.length == 0 || f.url.value.length == 0 || f.contact.value.length == 0 || f.phone.value.length == 0) {
        alert("Please enter complete phone number and zip cdoe");    
    }
    else {
        var params = "admin=" + f.admin.value + "&" +
                     "url=" + f.url.value + "&" +
                     "contact=" + f.contact.value + "&" +
                     "phone=" + f.phone.value + "&" +
                     "email=" + f.email.value;
        initAJAX("/includes/senddirinclude.php?" + params, "dirinclude");
    }
}


function closeDIBox()
{
    document.getElementById("dirinclude").style.display = "none";
}

