Event.observe(window,'load',init);

function init()
{
    var uxTxtName = $('uxTxtName');
    var form1 = $('form1');
    
    if (uxTxtName != null)
        uxTxtName.focus();
    
    if (form1 != null)
        Event.observe(form1,'submit',checkForm);
}

function checkForm(evt)
{
    var target = Event.element(evt);
    if (ControlsOK('inputBox') && DoPassConfirm())
        return(true);
    else
    {
        Event.stop(evt);
        return(false);
    }
}

function DoPassConfirm()
{
    var theyMatch = ($('uxTxtPassword').value == $('uxTxtConfirmPassword').value);
    if (!theyMatch)
        alert('Your passwords must match.');
    return theyMatch;
}