/////////////////////////////////////////////////////////////////////////////
//                          Script for the Length validator                //
//                            Written by: Miron Abramson.                  //
/////////////////////////////////////////////////////////////////////////////
function ValidateLength(source, args) { 
    var control = document.getElementById(source.controltovalidate);
    if( control )
    {
         args.IsValid = ( control.value.length >= source.getAttribute('MinLength') && control.value.length <= source.getAttribute('MaxLength') );
    }
}