﻿//alert("The Configurator will be down today at 5:00pm Central for upgrades. The Configurator should be back up and running no later than 5:30pm Central Time\n\nWe apologize for the inconvenience.");

function showHideForm()
{
    var obj = $get('accessForm');
    
    obj.style.visibility = (obj.style.visibility == "hidden") ? "visible" : "hidden";
    obj.style.display = (obj.style.display = "none") ? "block" : "none";
}
function checkAgree()
{
    var iAgree = $get('iAgree');
    
    if (iAgree.checked == false)
    {
        alert("Please review and accept the terms and conditions to proceed.");
        return false;
    }
    else
    {
        $get('ctl00_ContentPlaceHolder1_submitAction').value = 'login';
        return true;
    }
} 
function checkAgree2(enc)
{
    var iAgree = $get('iAgree');
    
    if (iAgree.checked == false)
    {
        alert("Please review and accept the terms and conditions to proceed.");
        return true;
    }
    else
    {
        window.location = "01Choose.aspx?" + enc;
    }
}
function checkAgree3()
{
    var iAgree = $get('iAgree');
    
    if (iAgree.checked == false)
    {
        $get('ctl00_ContentPlaceHolder1_submitAction').value = '';
        alert("Please review and accept the terms and conditions to proceed.");
        return false;
    }
    else
    {
        $get('ctl00_ContentPlaceHolder1_submitAction').value = 'create';
        return true;
    }
    return false;
} 
function CheckUsername(t)
{    
    DropDowns.CheckUsername(t.value, CheckUsernameComplete);
}
function CheckUsernameComplete(arg)
{
    var obj = $get('ctl00_ContentPlaceHolder1_signupErrLbl');
    var btnObj = $get('ctl00_ContentPlaceHolder1_createBtn');
    var hidObj = $get('ctl00_ContentPlaceHolder1_submitAction');
    
    hidObj.value = "create";

    if (arg)
    {
        obj.innerHTML = "That username already exists";
        btnObj.disabled = true;
    }
    else
    {
        obj.innerHTML = "";
        btnObj.disabled = false;
    }
}