diff --git a/maxlength.inc b/maxlength.inc
index 5443577..d2e2843 100644
--- a/maxlength.inc
+++ b/maxlength.inc
@@ -77,6 +77,13 @@ function _maxlength_content_type_form_alter(&$form, &$form_state, $form_id) {
         '#default_value' => variable_get('maxlength_' . $label . '_text_' . $type, 'Content limited to !limit characters, remaining: <strong>!remaining</strong>'),
         '#description' => t('The text used in the Javascript message under the @type input, where "@limit", "@remaining" and "@count" are replaced by the appropriate numbers.', array('@type' => $label)),
       );
+      $form['submission']['maxlength_' . $label]['maxlength_' . $label . '_softlimit_value'] = array(
+        '#type' => 'textfield',
+        '#title' => t('Recommended number of characters'),
+        '#default_value' => variable_get('maxlength_' . $label . '_softlimit_value_' . $type, '0'),
+        '#description' => t('The value is used to set the value where the indicator will color red.  If the maximum number of characters is set, then the recommended number of characters must be lower or equal to this.'),
+        
+      );
     }
   }
 }
@@ -106,10 +113,18 @@ function _maxlength_cck_form_alter(&$form, &$form_state, $form_id) {
           '#default_value' => variable_get('maxlength_' . $field_key . '_text', 'Content limited to !limit characters, remaining: <strong>!remaining</strong>'),
           '#description' => t('The text used in the Javascript message under the input, where "!limit", "!remaining" and "!count" are replaced by the appropriate numbers.'),
         );
+
+        $new_fields['maxlength_' . $form['instance']['field_name']['#value'] . '_softlimit_value'] = array(
+          '#type' => 'textfield',
+          '#title' => t('Recommended number of characters'),
+          '#default_value' => variable_get('maxlength_' . $field_key . '_softlimit_value', '0'),
+          '#description' => t('The value is used to set the indicator.'),
+        );
       }
     }
     $form['field']['settings'] = $new_fields;
   }
+  $form['#validate'][] = '_maxlength_cck_form_validate';
   $form['#submit'][] = '_maxlength_cck_form_submit';
 }
 
@@ -119,31 +134,54 @@ function _maxlength_cck_form_submit($form, &$form_state) {
     variable_set('maxlength_' . $form['instance']['field_name']['#value'], $form_state['values']['field']['settings']['max_length']);
     variable_set('maxlength_' . $form['instance']['field_name']['#value'] . '_js', $form_state['values']['field']['settings']['maxlength_' . $form['instance']['field_name']['#value'] . '_js']);
     variable_set('maxlength_' . $form['instance']['field_name']['#value'] . '_text', $form_state['values']['field']['settings']['maxlength_' . $form['instance']['field_name']['#value'] . '_text']);
+    variable_set('maxlength_' . $form['instance']['field_name']['#value'] . '_softlimit_value', $form_state['values']['field']['settings']['maxlength_' . $form['instance']['field_name']['#value'] . '_softlimit_value']);
   }
   elseif ($type != '') {
     variable_set('maxlength_' . $form['instance']['field_name']['#value'] . '_' . $type, $form_state['values']['field']['settings']['max_length']);
     variable_set('maxlength_' . $form['instance']['field_name']['#value'] . '_js_' . $type, $form_state['values']['field']['settings']['maxlength_' . $form['instance']['field_name']['#value'] . '_js']);
     variable_set('maxlength_' . $form['instance']['field_name']['#value'] . '_text_' . $type, $form_state['values']['field']['settings']['maxlength_' . $form['instance']['field_name']['#value'] . '_text']);
+    variable_set('maxlength_' . $form['instance']['field_name']['#value'] . '_softlimit_value_' . $type, $form_state['values']['field']['settings']['maxlength_' . $form['instance']['field_name']['#value'] . '_softlimit_value']);
+  }
+}
+
+function _maxlength_cck_form_validate($form, &$form_state){
+  $max_length = $form['field']['settings']['max_length']['#value'];
+  
+  $softlimit = $form['field']['settings']['maxlength_field_testseset_softlimit_value']['#value'];
+
+//  drupal_set_message('<code><pre>'.print_r(($form),1).'</pre></code>');
+  if(!is_numeric($softlimit)) {
+    form_set_error('settings][maxlength_field_testseset_softlimit_value',t('Soft limit must be numerical.'));
+  }
+
+  if($max_length < $softlimit && is_numeric($max_length)) {
+    form_set_error('settings][maxlength_field_testseset_softlimit_value',t('The soft limit must be lower than the maximum limit.'));
   }
+  
+  
+  
 }
 
 function _maxlength_get_values($field = 'body', $type = '') {
   $values = '';
   $values['limit'] = FALSE;
+  $values['softlimit_value'] = FALSE;
 
   //CCK
   if (strpos($field, 'field_') === 0) {
     $values['limit'] = variable_get('maxlength_' . $field, FALSE);
     $values['use_js'] = variable_get('maxlength_' . $field . '_js', FALSE);
     $values['text'] = variable_get('maxlength_' . $field . '_text', FALSE);
+    $values['softlimit_value'] = variable_get('maxlength_' . $field . '_softlimit_value', FALSE);
   } //body and title
   elseif ($type != '') {
     $values['limit'] = variable_get('maxlength_' . $field . '_' . $type, FALSE);
     $values['use_js'] = variable_get('maxlength_' . $field . '_js_' . $type, FALSE);
     $values['text'] = variable_get('maxlength_' . $field . '_text_' . $type, FALSE);
+    $values['softlimit_value'] = variable_get('maxlength_' . $field . '_softlimit_value_' . $type, FALSE);
   }
 
-  if ($values['limit']) {
+  if ($values['limit'] || $values['softlimit_value']) {
     return $values;
   }
   else {
diff --git a/maxlength.info b/maxlength.info
index 69d0c3e..8ba09c8 100644
--- a/maxlength.info
+++ b/maxlength.info
@@ -2,3 +2,10 @@ name = "Maxlength"
 description = "Set a maximum length for body fields."
 core = 7.x
 
+
+; Information added by drupal.org packaging script on 2011-05-30
+version = "7.x-2.x-dev"
+core = "7.x"
+project = "maxlength"
+datestamp = "1306715110"
+
diff --git a/maxlength.js b/maxlength.js
index d67ecd2..96a1d3b 100644
--- a/maxlength.js
+++ b/maxlength.js
@@ -1,64 +1,114 @@
 (function ($) {
-Drupal.maxLength_limit = function (field) {
-
-  // Build maxlength values and settings
-  var id = $(field).attr('id');
-  // Skip form elements that do not exist. This sometimes occurs with more 
-  // complex multi step form building modules like pageroute.
-  if (id == undefined) {
-    return;
-  }
-  var limit = Drupal.settings.maxlength[id];
-  var maxlength = $('#maxlength-' + id.substr(5));
-  maxlength.show_count = false;
-  maxlength.span_remaining_count = maxlength.find('span.maxlength-counter-remaining');
-  maxlength.find('span.maxlength-count', function() {
-    maxlength.show_count = true;
-    maxlength.span_count = maxlength.find('span.maxlength-count');
-  });
+  Drupal.maxLength_limit = function (field) {
+    // Build maxlength values and settings
+    var id = $(field).attr('id');
+    // Skip form elements that do not exist. This sometimes occurs with more
+    // complex multi step form building modules like pageroute.
+    if (id == undefined) {
+      return;
+    }
+    var limit = Drupal.settings.maxlength[id];
+    var maxlength = $('#maxlength-' + id.substr(5));
+    maxlength.show_count = false;
+    maxlength.span_remaining_count = maxlength.find('span.maxlength-counter-remaining');
+    maxlength.find('span.maxlength-count', function() {
+      maxlength.show_count = true;
+      maxlength.span_count = maxlength.find('span.maxlength-count');
+    });
 
-  // calculate the remaining count of chars  
-  var length = $(field).val().length;
-  var remainingCount = limit - length;  
+    // calculate the remaining count of chars
+    var length = $(field).val().length;
+    var remainingCount = limit - length;
 
-  // if there is not remaining char, we clear additional content
-  if (remainingCount < 0) {
-    $(field).val($(field).val().substr(0, limit));    
-    remainingCount = 0;
-  }  
+    // if there is not remaining char, we clear additional content
+    if (remainingCount < 0) {
+      $(field).val($(field).val().substr(0, limit));
+      remainingCount = 0;
+    }
 
-  // Update the remaing chars text.
-  maxlength.span_remaining_count.html(remainingCount.toString());
-  // And the current count.
-  if (maxlength.show_count) {
-    maxlength.span_count.html(length.toString());
-  }  
-}
+    // Update the remaing chars text.
+    maxlength.span_remaining_count.html(remainingCount.toString());
+    // And the current count.
+    if (maxlength.show_count) {
+      maxlength.span_count.html(length.toString());
+    }
+  }
 
-Drupal.behaviors.maxlength ={ 
+  Drupal.behaviors.maxlength ={
     attach: function (context, settings) {
-    // Get all the settings, and save the limits in the fields.
-    var element = {};
-    for (var id in Drupal.settings.maxlength) {
-      element = $("#"+ id);    
+      // Get all the settings, and save the limits in the fields.
+      var element = {};
+      for (var id in Drupal.settings.maxlength) {
+        element = $("#"+ id);
       
-      if (element.length) {        
-        // Update the count at the page load.
-        Drupal.maxLength_limit(element);
-  
-        // Setup events
-        element.load(function() {
-          Drupal.maxLength_limit(this);
-        });
-        element.keyup(function() {
-          Drupal.maxLength_limit(this);
-        });
-        element.change(function() {
-          Drupal.maxLength_limit(this);
-        });
+        if (element.length) {
+          // Update the count at the page load.
+          Drupal.maxLength_limit(element);
+          
+          // Setup events
+          element.load(function() {
+            Drupal.maxLength_limit(this);
+          });
+          element.keyup(function() {
+            Drupal.maxLength_limit(this);
+          });
+          element.change(function() {
+            Drupal.maxLength_limit(this);
+          });
+        }
       }
     }
-  }
   };
-}(jQuery));
 
+  // Triggering the soft limit if it's set
+  Drupal.behaviors.softlimit = {
+    attach: function (context, settings){
+      for (var id in Drupal.settings.softlimit) {
+        element = $("#"+ id);
+        if (element.length) {
+          Drupal.softlimit_set(element)
+
+          element.load(function() {
+            Drupal.softlimit_set(this);
+          });
+          element.keyup(function() {
+            Drupal.softlimit_set(this);
+          });
+          element.change(function() {
+            Drupal.softlimit_set(this);
+          });
+        }
+      }
+    }
+  }
+
+  // Action to be executed when the limit is set
+  Drupal.softlimit_set = function(field) {
+    // Build maxlength values and settings
+    var id = $(field).attr('id');
+    // Fetching the limit, previously set as a drupal setting.
+    var limit_red = Drupal.settings.softlimit[id];
+    var limit_orange = Math.ceil(limit_red * 0.75)
+    // Now we have the limit, and the only thing we need to do is applying it to the field we're at.
+    var num_of_chars = $(field).val().length;
+
+    // Green
+    if(num_of_chars >= 0 && num_of_chars < limit_orange){
+      $(field).removeClass('limit-orange');
+      $(field).removeClass('limit-red');
+      $(field).addClass('limit-green');
+    }
+    // Orange
+    else if (num_of_chars >= limit_orange && num_of_chars < limit_red) {
+      $(field).removeClass('limit-green');
+      $(field).removeClass('limit-red');
+      $(field).addClass('limit-orange');
+    }
+    // Red
+    else {
+      $(field).removeClass('limit-green');
+      $(field).removeClass('limit-orange');
+      $(field).addClass('limit-red');
+    }
+  }
+}(jQuery));
\ No newline at end of file
diff --git a/maxlength.module b/maxlength.module
index 70acbba..63ec5c0 100644
--- a/maxlength.module
+++ b/maxlength.module
@@ -23,6 +23,7 @@ function maxlength_help($path, $arg) {
 function maxlength_form_alter(&$form, &$form_state, $form_id) {
   // Editing the content
   if (strpos($form['#id'], 'node-form') !== FALSE) {
+    $form['#attached']['css'][] = drupal_get_path('module','maxlength') . '/css/maxlength.css';
     module_load_include('inc', 'maxlength', 'maxlength');
     _maxlength_content_form_alter($form, $form_state, $form_id);
   }
@@ -62,6 +63,7 @@ function maxlength_form_alter(&$form, &$form_state, $form_id) {
     variable_del('maxlength_' . $form['field_name']['#value']);
     variable_del('maxlength_' . $form['field_name']['#value'] . '_js');
     variable_del('maxlength_' . $form['field_name']['#value'] . '_text');
+    variable_del('maxlength_' . $form['field_name']['#value'] . '_softlimit_value');
   }
 }
 
@@ -168,6 +170,7 @@ function _maxlength_format_element($element) {
         'maxlength' => array(
           'edit-' . $id => $values['limit'],
         ),
+        
       );
       drupal_add_js($js_settings, 'setting');
     }
@@ -175,5 +178,21 @@ function _maxlength_format_element($element) {
       class="maxlength-counter">' . t($values['text'], array('!limit' => $values['limit'], '!count' => '<span class="maxlength-count">' . drupal_strlen($value) . '</span>', '!remaining' => '<span class="maxlength-counter-remaining">' . $remaining . '</span>')) . '</div>';
     $processed[] = $element['#id'];
   }
+  if($values['softlimit_value'] > 0) {
+    drupal_add_js(drupal_get_path('module', 'maxlength') . '/maxlength.js');
+    $js_settings = array(
+        'softlimit' => array(
+          'edit-' . $id => $values['softlimit_value'],
+        ),
+    );
+    drupal_add_js($js_settings, 'setting');
+  }
   return $element;
 }
+
+/**
+ * Implementation of hook_init()
+ */
+function maxlength_init(){
+  drupal_add_css(drupal_get_path('module','maxlength').'/css/maxlength.css');
+}
\ No newline at end of file
