var AUTH_ELEMENT = 0;
var AUTH_VALUE = 1;

function AuthForm()
{
    this.Defaults = new Array();

    this.GetDefault = function(Element)
    {
        for (var Iterator = 0 ; Iterator < this.Defaults.length ; Iterator++)
        {
            if (this.Defaults[Iterator][AUTH_ELEMENT] == Element)
                return this.Defaults[Iterator][AUTH_VALUE];
        }
        this.Defaults.push(new Array(Element, Element.value));
        return Element.value;
    }

    this.FocusField = function(Element)
    {
        if (Element.value == this.GetDefault(Element))
            Element.value = "";
    }
    
    this.BlurField = function(Element)
    {
        if (Element.value == "")
            Element.value = this.GetDefault(Element);
    }
}
var AuthForm = new AuthForm();