    function RadTextBoxInit(s, e)
    {
        s.get_element()._extender = s.get_id();        
    }    
    
    function RadTextBoxValidated(s, e)
    {
        var c = $find(s.get_controlToValidate().id);
        var t = $get(s.get_controlToValidate().id + '_text');

        if ((c != null) && (t != null))
        {
            if (c._invalid && s.get_isValid() && (t._owner == s._id))
            {
                RadTextBoxValid(c, t);
            }
            else if (!c._invalid && !s.get_isValid())
            {
                RadTextBoxInvalid(c, t, s.get_id(), s.getErrorMessage());
            }
        }
    }
 
    function RadTextBoxInvalid(c, t, id, m)
    {
        c._invalid = true;
        c.updateCssClass();
        t._owner = id;
        t.title = m;
    }
    
    function RadTextBoxValid(c, t)
    {
        c._invalid = false; 
        c.updateCssClass();           
        t.title = "";
    }
    
    function RadEditorInit(s, e)
    {
        s.get_element()._extender = s.get_id();        
    }    
    
    function RadEditorValidated(s, e)
    {
        var c = $find(s.get_controlToValidate().id);
        var t = $get(s.get_controlToValidate().id);

        if ((c != null) && (t != null))
        {
            if (c._invalid && s.get_isValid() && (t._owner == s._id))
            {
                RadEditorValid(c, t);
            }
            else if (!c._invalid && !s.get_isValid())
            {
                RadEditorInvalid(c, t, s.get_id(), s.getErrorMessage());
            }
        }
    }
    
    function RadEditorInvalid(c, t, id, m)
    {            
        var ca = c.get_contentArea();
        Sys.UI.DomElement.addCssClass(ca, "invalid");
        t._owner = id;
        ca.title = m;
        c._invalid = true;
    }
    
    function RadEditorValid(c, t)
    {       
        var ca = c.get_contentArea();
        Sys.UI.DomElement.removeCssClass(ca, "invalid");
        ca.title = "";
        c._invalid = false;
    }       
    
    function WebSvcValidator_Fail(error) {}

    function WebSvcValidator_Complete(val, source) 
    {
        source.isvalid = val;
        ValidatorUpdateDisplay(source);
        ValidatorUpdateIsValid();
        ValidationSummaryOnSubmit(source.validationGroup);
        
        if (source._extender)
            $find(source._extender).setValid(val);            
    }
