Index: /trunk/expressoMail1_2/index.php
===================================================================
--- /trunk/expressoMail1_2/index.php	(revision 1608)
+++ /trunk/expressoMail1_2/index.php	(revision 1610)
@@ -71,4 +71,5 @@
     $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] : "0";
     $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] : "50";
+    $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_characters_number'] : "4";
     $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['num_max_certs_to_cipher'] = $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] ?  $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] : "10";
     $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] : "0";
Index: /trunk/expressoMail1_2/setup/phpgw_en.lang
===================================================================
--- /trunk/expressoMail1_2/setup/phpgw_en.lang	(revision 1609)
+++ /trunk/expressoMail1_2/setup/phpgw_en.lang	(revision 1610)
@@ -197,4 +197,5 @@
 What is the maximum number of messages per page?	expressoMail1_2	en	What is the maximum number of messages per page?
 What is the maximum number of results in an e-mail search?	expressoMail1_2	en	What is the maximum number of results in an e-mail search?
+What is the minimum number of characters in searching contacts?	expressoMail1_2	en	What is the minimum number of characters in searching contacts?
 Max size	expressoMail1_2	en	Max size
 Medium	expressoMail1_2	en	Medium
Index: /trunk/expressoMail1_2/inc/hook_settings.inc.php
===================================================================
--- /trunk/expressoMail1_2/inc/hook_settings.inc.php	(revision 1608)
+++ /trunk/expressoMail1_2/inc/hook_settings.inc.php	(revision 1610)
@@ -165,4 +165,14 @@
 
 create_select_box('What is the maximum number of results in an e-mail search?','search_result_number',$default,'');
+
+$default =  array(
+    '1' => lang('unlimited'),
+    '2'     => '2',
+    '3'     => '3',
+    '4'     => '4',
+    '5'     => '5'
+);
+
+create_select_box('What is the minimum number of characters in searching contacts?','search_characters_number',$default,'what is the minimum number of characters in searching contacts');
 
 create_select_box('What is the height of the lines in the list of messages?','line_height',$default,'');
Index: /trunk/expressoMail1_2/js/common_functions.js
===================================================================
--- /trunk/expressoMail1_2/js/common_functions.js	(revision 1595)
+++ /trunk/expressoMail1_2/js/common_functions.js	(revision 1610)
@@ -530,7 +530,7 @@
 		var search_for = emailList;
 	
-	if (search_for.length < 4){
-		alert(get_lang('Your search argument must be longer than 4 characters.'));
-		return false;
+	if (search_for.length < preferences.search_characters_number){
+            alert(get_lang('Your search argument must be longer than %1 characters.', preferences.search_characters_number));
+            return false;
 	}
 	
Index: /trunk/expressoMail1_2/js/QuickCatalogSearch.js
===================================================================
--- /trunk/expressoMail1_2/js/QuickCatalogSearch.js	(revision 810)
+++ /trunk/expressoMail1_2/js/QuickCatalogSearch.js	(revision 1610)
@@ -451,6 +451,6 @@
 	emQuickCatalogSearch.prototype.searchCatalogList = function (itemSearch){
 
-		if(itemSearch && Element('search_for').value.length < 4){
-			alert(get_lang('your search argument must be longer than 4 characters.'));
+		if(itemSearch && Element('search_for').value.length < preferences.search_characters_number){
+			alert(get_lang('Your search argument must be longer than %1 characters.', preferences.search_characters_number));
 			Element('search_for').focus();
 			return false;
