function set_length(value, min, max) {
//Test number of characters in value against min and max values. If no value set for min it defaults 0 if no value for max it defaults to the length of value.
var vmin=(min == '')?0:min;
var vmax=(max == '')?value.length:max;
var re=((value.length < vmin) || (value.length > vmax))?false:true;
return re;
}