Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code so that OSX is now supported.
[xestiaab/.git] / source / contacteditor / frmContactEditor.cpp
index db50acb..8ad025b 100644 (file)
@@ -23,8 +23,8 @@
 #include "frmContactEditorTimezones.h"
 #include "frmContactEditorRelated.h"
 #include "frmContactEditorWebsites.h"
-#include "frmContactEditorTitles.h" 
-#include "frmContactEditorRoles.h" 
+#include "frmContactEditorTitles.h"
+#include "frmContactEditorRoles.h"
 #include "frmContactEditorGeoposition.h"
 #include "frmContactEditorGroups.h"
 
@@ -78,7 +78,7 @@
 // Replace intResult with intValueSeek.
 
 BEGIN_EVENT_TABLE(frmContactEditor, wxFrame)
-  EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, frmContactEditor::ContactFileChanged)
+EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, frmContactEditor::ContactFileChanged)
 END_EVENT_TABLE()
 
 frmContactEditor::frmContactEditor( wxWindow* parent )
@@ -97,7 +97,7 @@ frmContactEditorADT( parent )
     wxImage button_play_pngi(istream, wxBITMAP_TYPE_PNG);
     wxBitmap playiconbmp(button_play_pngi, -1);
     btnPlay->SetBitmapLabel(playiconbmp);
-
+    
     wxMemoryInputStream istream2(buttons_stop_png, sizeof(buttons_stop_png));
     wxImage button_stop_pngi(istream2, wxBITMAP_TYPE_PNG);
     wxBitmap stopiconbmp(button_stop_pngi, -1);
@@ -112,46 +112,46 @@ frmContactEditorADT( parent )
 void frmContactEditor::AddGeneralNickname( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
     frameCENickname->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralNicknamesList);
-    frameCENickname->SetupPointers(&GeneralNicknamesList,      
-       &GeneralNicknamesListAltID,
-       &GeneralNicknamesListPID,
-       &GeneralNicknamesListType,
-       &GeneralNicknamesListLanguage,  
-       &GeneralNicknamesListTokens,
-       &GeneralNicknamesListPref,
-       lboNicknames,
-       (intValueSeek));
-    frameCENickname->ShowModal(); 
+    frameCENickname->SetupPointers(&GeneralNicknamesList,
+                                   &GeneralNicknamesListAltID,
+                                   &GeneralNicknamesListPID,
+                                   &GeneralNicknamesListType,
+                                   &GeneralNicknamesListLanguage,
+                                   &GeneralNicknamesListTokens,
+                                   &GeneralNicknamesListPref,
+                                   lboNicknames,
+                                   (intValueSeek));
+    frameCENickname->ShowModal();
     delete frameCENickname;
     frameCENickname = NULL;
 }
 
 void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
 {
-
+    
     long longSelected = -1;
     int intSelectedData = 0;
-
-    if (!GetSelectedItem(lboNicknames, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    
+    if (!GetSelectedItem(lboNicknames,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
-    frameCENickname->SetupPointers(&GeneralNicknamesList,      
-       &GeneralNicknamesListAltID,
-       &GeneralNicknamesListPID,
-       &GeneralNicknamesListType,
-       &GeneralNicknamesListLanguage,  
-       &GeneralNicknamesListTokens,
-       &GeneralNicknamesListPref,
-       lboNicknames,
-       intSelectedData);    
+    frameCENickname->SetupPointers(&GeneralNicknamesList,
+                                   &GeneralNicknamesListAltID,
+                                   &GeneralNicknamesListPID,
+                                   &GeneralNicknamesListType,
+                                   &GeneralNicknamesListLanguage,
+                                   &GeneralNicknamesListTokens,
+                                   &GeneralNicknamesListPref,
+                                   lboNicknames,
+                                   intSelectedData);
     frameCENickname->SetEditorMode(TRUE, CE_GENERAL);
     frameCENickname->ShowModal();
     delete frameCENickname;
@@ -161,93 +161,93 @@ void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
 
 void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event )
 {
-
+    
     long longSelected = -1;
     int intSelectedData = 0;
-       
-    if (!GetSelectedItem(lboNicknames, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    
+    if (!GetSelectedItem(lboNicknames,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboNicknames->DeleteItem(longSelected);
     
-    DeleteMapData(intSelectedData, 
-    &GeneralNicknamesList,
-    &GeneralNicknamesListLanguage,
-    &GeneralNicknamesListAltID,
-    &GeneralNicknamesListPID,
-    &GeneralNicknamesListTokens,
-    &GeneralNicknamesListType,
-    &GeneralNicknamesListPref);
-
+    DeleteMapData(intSelectedData,
+                  &GeneralNicknamesList,
+                  &GeneralNicknamesListLanguage,
+                  &GeneralNicknamesListAltID,
+                  &GeneralNicknamesListPID,
+                  &GeneralNicknamesListTokens,
+                  &GeneralNicknamesListType,
+                  &GeneralNicknamesListPref);
+    
 }
 
 void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
 {
-
+    
     int intResult = 0;
-
+    
     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
     frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralAddressList);
     frameCEAddress->SetupPointers(&GeneralAddressList,
-       &GeneralAddressListTown,
-       &GeneralAddressListCounty,
-       &GeneralAddressListPostCode,
-       &GeneralAddressListCountry,
-       &GeneralAddressListLabel,
-       &GeneralAddressListLang,        
-       &GeneralAddressListAltID,
-       &GeneralAddressListPID,
-       &GeneralAddressListTokens,
-       &GeneralAddressListGeo,
-       &GeneralAddressListTimezone,
-       &GeneralAddressListType,
-       &GeneralAddressListMediatype,
-       &GeneralAddressListPref,
-       lboAddresses,
-       (intValueSeek));
-    frameCEAddress->ShowModal(); 
+                                  &GeneralAddressListTown,
+                                  &GeneralAddressListCounty,
+                                  &GeneralAddressListPostCode,
+                                  &GeneralAddressListCountry,
+                                  &GeneralAddressListLabel,
+                                  &GeneralAddressListLang,
+                                  &GeneralAddressListAltID,
+                                  &GeneralAddressListPID,
+                                  &GeneralAddressListTokens,
+                                  &GeneralAddressListGeo,
+                                  &GeneralAddressListTimezone,
+                                  &GeneralAddressListType,
+                                  &GeneralAddressListMediatype,
+                                  &GeneralAddressListPref,
+                                  lboAddresses,
+                                  (intValueSeek));
+    frameCEAddress->ShowModal();
     delete frameCEAddress;
     frameCEAddress = NULL;
 }
 
 void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
 {
-
+    
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboAddresses, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboAddresses,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     if (longSelected == -1){
-       return;
+        return;
     }
-       
+    
     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
     frameCEAddress->SetupPointers(&GeneralAddressList,
-       &GeneralAddressListTown,
-       &GeneralAddressListCounty,
-       &GeneralAddressListPostCode,
-       &GeneralAddressListCountry,
-       &GeneralAddressListLabel,
-       &GeneralAddressListLang,        
-       &GeneralAddressListAltID,
-       &GeneralAddressListPID,
-       &GeneralAddressListTokens,
-       &GeneralAddressListGeo,
-       &GeneralAddressListTimezone,
-       &GeneralAddressListType,
-       &GeneralAddressListMediatype,
-       &GeneralAddressListPref,
-       lboAddresses,
-       intSelectedData);    
+                                  &GeneralAddressListTown,
+                                  &GeneralAddressListCounty,
+                                  &GeneralAddressListPostCode,
+                                  &GeneralAddressListCountry,
+                                  &GeneralAddressListLabel,
+                                  &GeneralAddressListLang,
+                                  &GeneralAddressListAltID,
+                                  &GeneralAddressListPID,
+                                  &GeneralAddressListTokens,
+                                  &GeneralAddressListGeo,
+                                  &GeneralAddressListTimezone,
+                                  &GeneralAddressListType,
+                                  &GeneralAddressListMediatype,
+                                  &GeneralAddressListPref,
+                                  lboAddresses,
+                                  intSelectedData);
     frameCEAddress->SetEditorMode(TRUE, CE_GENERAL);
     frameCEAddress->ShowModal();
     delete frameCEAddress;
@@ -257,46 +257,46 @@ void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
 
 void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event )
 {
-       
+    
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboAddresses, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboAddresses,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboAddresses->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GeneralAddressList,
-    &GeneralAddressListTown, &GeneralAddressListCounty,
-    &GeneralAddressListPostCode, &GeneralAddressListCountry,
-    &GeneralAddressList, &GeneralAddressListLabel,
-    &GeneralAddressListLang, &GeneralAddressListAltID,
-    &GeneralAddressListPID, &GeneralAddressListTokens,
-    &GeneralAddressListGeo, &GeneralAddressListTimezone,
-    &GeneralAddressListType, &GeneralAddressListMediatype,
-    &GeneralAddressListPref);
-       
+                  &GeneralAddressListTown, &GeneralAddressListCounty,
+                  &GeneralAddressListPostCode, &GeneralAddressListCountry,
+                  &GeneralAddressList, &GeneralAddressListLabel,
+                  &GeneralAddressListLang, &GeneralAddressListAltID,
+                  &GeneralAddressListPID, &GeneralAddressListTokens,
+                  &GeneralAddressListGeo, &GeneralAddressListTimezone,
+                  &GeneralAddressListType, &GeneralAddressListMediatype,
+                  &GeneralAddressListPref);
+    
 }
 
 void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
     frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralAddressList);
     frameCEEmail->SetupPointers(&GeneralEmailList,
-       &GeneralEmailListAltID,
-       &GeneralEmailListPID,
-       &GeneralEmailListType,
-       &GeneralEmailListTokens,
-       &GeneralEmailListPref,
-       lboEmails,
-       (intValueSeek));
-    frameCEEmail->ShowModal(); 
+                                &GeneralEmailListAltID,
+                                &GeneralEmailListPID,
+                                &GeneralEmailListType,
+                                &GeneralEmailListTokens,
+                                &GeneralEmailListPref,
+                                lboEmails,
+                                (intValueSeek));
+    frameCEEmail->ShowModal();
     delete frameCEEmail;
     frameCEEmail = NULL;
 }
@@ -306,21 +306,21 @@ void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboEmails, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboEmails,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
     frameCEEmail->SetupPointers(&GeneralEmailList,
-       &GeneralEmailListAltID,
-       &GeneralEmailListPID,
-       &GeneralEmailListType,
-       &GeneralEmailListTokens,
-       &GeneralEmailListPref,
-       lboEmails,
-       intSelectedData);    
+                                &GeneralEmailListAltID,
+                                &GeneralEmailListPID,
+                                &GeneralEmailListType,
+                                &GeneralEmailListTokens,
+                                &GeneralEmailListPref,
+                                lboEmails,
+                                intSelectedData);
     frameCEEmail->SetEditorMode(TRUE, CE_GENERAL);
     frameCEEmail->ShowModal();
     delete frameCEEmail;
@@ -332,38 +332,38 @@ void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboEmails, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboEmails,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboEmails->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GeneralEmailList,
-    &GeneralEmailListAltID, &GeneralEmailListPID,
-    &GeneralEmailListType, &GeneralEmailListTokens,
-    &GeneralEmailListPref);
-
+                  &GeneralEmailListAltID, &GeneralEmailListPID,
+                  &GeneralEmailListType, &GeneralEmailListTokens,
+                  &GeneralEmailListPref);
+    
 }
 
 void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
     frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralIMList);
     frameCEIM->SetupPointers(&GeneralIMList,
-       &GeneralIMListAltID,
-       &GeneralIMListPID,
-       &GeneralIMListType,
-       &GeneralIMListTokens,
-       &GeneralIMListMediatype,        
-       &GeneralIMListPref,
-       lboIM,
-       (intValueSeek));
-    frameCEIM->ShowModal(); 
+                             &GeneralIMListAltID,
+                             &GeneralIMListPID,
+                             &GeneralIMListType,
+                             &GeneralIMListTokens,
+                             &GeneralIMListMediatype,
+                             &GeneralIMListPref,
+                             lboIM,
+                             (intValueSeek));
+    frameCEIM->ShowModal();
     delete frameCEIM;
     frameCEIM = NULL;
 }
@@ -373,22 +373,22 @@ void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboIM, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboIM,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
     frameCEIM->SetupPointers(&GeneralIMList,
-       &GeneralIMListAltID,
-       &GeneralIMListPID,
-       &GeneralIMListType,
-       &GeneralIMListTokens,
-       &GeneralIMListMediatype,        
-       &GeneralIMListPref,
-       lboIM,
-       intSelectedData);    
+                             &GeneralIMListAltID,
+                             &GeneralIMListPID,
+                             &GeneralIMListType,
+                             &GeneralIMListTokens,
+                             &GeneralIMListMediatype,
+                             &GeneralIMListPref,
+                             lboIM,
+                             intSelectedData);
     frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
     frameCEIM->ShowModal();
     delete frameCEIM;
@@ -400,37 +400,37 @@ void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboIM, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboIM,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboIM->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GeneralIMList,
-    &GeneralIMListAltID, &GeneralIMListPID,
-    &GeneralIMListType, &GeneralIMListTokens,
-    &GeneralIMListMediatype, &GeneralIMListPref);
+                  &GeneralIMListAltID, &GeneralIMListPID,
+                  &GeneralIMListType, &GeneralIMListTokens,
+                  &GeneralIMListMediatype, &GeneralIMListPref);
     
 }
 
 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
     frameCETel->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralTelephoneList);
     frameCETel->SetupPointers(&GeneralTelephoneList,
-       &GeneralTelephoneListAltID,
-       &GeneralTelephoneListPID,
-       &GeneralTelephoneListType,
-       &GeneralTelephoneListTokens,
-       &GeneralTelephoneListPref,
-       lboTelephone,
-       (intValueSeek));
-    frameCETel->ShowModal(); 
+                              &GeneralTelephoneListAltID,
+                              &GeneralTelephoneListPID,
+                              &GeneralTelephoneListType,
+                              &GeneralTelephoneListTokens,
+                              &GeneralTelephoneListPref,
+                              lboTelephone,
+                              (intValueSeek));
+    frameCETel->ShowModal();
     delete frameCETel;
     frameCETel = NULL;
 }
@@ -440,21 +440,21 @@ void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboTelephone, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboTelephone,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
     frameCETel->SetupPointers(&GeneralTelephoneList,
-       &GeneralTelephoneListAltID,
-       &GeneralTelephoneListPID,
-       &GeneralTelephoneListType,
-       &GeneralTelephoneListTokens,    
-       &GeneralTelephoneListPref,
-       lboTelephone,
-       intSelectedData);    
+                              &GeneralTelephoneListAltID,
+                              &GeneralTelephoneListPID,
+                              &GeneralTelephoneListType,
+                              &GeneralTelephoneListTokens,
+                              &GeneralTelephoneListPref,
+                              lboTelephone,
+                              intSelectedData);
     frameCETel->SetEditorMode(TRUE, CE_GENERAL);
     frameCETel->ShowModal();
     delete frameCETel;
@@ -466,37 +466,37 @@ void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboTelephone, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboTelephone,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboTelephone->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GeneralTelephoneList,
-    &GeneralTelephoneListAltID, &GeneralTelephoneListPID,
-    &GeneralTelephoneListType, &GeneralTelephoneListTokens,
-    &GeneralTelephoneListPref);
+                  &GeneralTelephoneListAltID, &GeneralTelephoneListPID,
+                  &GeneralTelephoneListType, &GeneralTelephoneListTokens,
+                  &GeneralTelephoneListPref);
     
 }
 
 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
     frameCELang->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralLanguageList);
     frameCELang->SetupPointers(&GeneralLanguageList,
-       &GeneralLanguageListAltID,
-       &GeneralLanguageListPID,
-       &GeneralLanguageListType,
-       &GeneralLanguageListTokens,
-       &GeneralLanguageListPref,
-       lboLanguages,
-       (intValueSeek));
-    frameCELang->ShowModal(); 
+                               &GeneralLanguageListAltID,
+                               &GeneralLanguageListPID,
+                               &GeneralLanguageListType,
+                               &GeneralLanguageListTokens,
+                               &GeneralLanguageListPref,
+                               lboLanguages,
+                               (intValueSeek));
+    frameCELang->ShowModal();
     delete frameCELang;
     frameCELang = NULL;
 }
@@ -506,21 +506,21 @@ void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboLanguages, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboLanguages,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
     frameCELang->SetupPointers(&GeneralLanguageList,
-       &GeneralLanguageListAltID,
-       &GeneralLanguageListPID,
-       &GeneralLanguageListType,
-       &GeneralLanguageListTokens,     
-       &GeneralLanguageListPref,
-       lboLanguages,
-       intSelectedData);
+                               &GeneralLanguageListAltID,
+                               &GeneralLanguageListPID,
+                               &GeneralLanguageListType,
+                               &GeneralLanguageListTokens,
+                               &GeneralLanguageListPref,
+                               lboLanguages,
+                               intSelectedData);
     frameCELang->SetEditorMode(TRUE, CE_GENERAL);
     frameCELang->ShowModal();
     delete frameCELang;
@@ -532,38 +532,38 @@ void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboLanguages, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboLanguages,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboLanguages->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GeneralLanguageList,
-    &GeneralLanguageListAltID, &GeneralLanguageListPID,
-    &GeneralLanguageListType, &GeneralLanguageListTokens,
-    &GeneralLanguageListPref);
+                  &GeneralLanguageListAltID, &GeneralLanguageListPID,
+                  &GeneralLanguageListType, &GeneralLanguageListTokens,
+                  &GeneralLanguageListPref);
     
 }
 
 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
     frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralTZList);
     frameCETZ->SetupPointers(&GeneralTZList,
-       &GeneralTZListAltID,
-       &GeneralTZListPID,
-       &GeneralTZListType,
-       &GeneralTZListTokens,
-       &GeneralTZListMediatype,        
-       &GeneralTZListPref,
-       lboTimezones,
-       (intValueSeek));
-    frameCETZ->ShowModal(); 
+                             &GeneralTZListAltID,
+                             &GeneralTZListPID,
+                             &GeneralTZListType,
+                             &GeneralTZListTokens,
+                             &GeneralTZListMediatype,
+                             &GeneralTZListPref,
+                             lboTimezones,
+                             (intValueSeek));
+    frameCETZ->ShowModal();
     delete frameCETZ;
     frameCETZ = NULL;
 }
@@ -573,22 +573,22 @@ void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboTimezones, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboTimezones,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
     frameCETZ->SetupPointers(&GeneralTZList,
-       &GeneralTZListAltID,
-       &GeneralTZListPID,
-       &GeneralTZListType,
-       &GeneralTZListTokens,
-       &GeneralTZListMediatype,        
-       &GeneralTZListPref,
-       lboTimezones,
-       intSelectedData);
+                             &GeneralTZListAltID,
+                             &GeneralTZListPID,
+                             &GeneralTZListType,
+                             &GeneralTZListTokens,
+                             &GeneralTZListMediatype,
+                             &GeneralTZListPref,
+                             lboTimezones,
+                             intSelectedData);
     frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
     frameCETZ->ShowModal();
     delete frameCETZ;
@@ -600,38 +600,38 @@ void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboTimezones, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboTimezones,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboTimezones->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GeneralTZList,
-    &GeneralTZListAltID, &GeneralTZListPID,
-    &GeneralTZListType, &GeneralTZListTokens,
-    &GeneralTZListMediatype, &GeneralTZListPref);
+                  &GeneralTZListAltID, &GeneralTZListPID,
+                  &GeneralTZListType, &GeneralTZListTokens,
+                  &GeneralTZListMediatype, &GeneralTZListPref);
     
 }
 
 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
     frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralGeographyList);
     frameCEGeo->SetupPointers(&GeneralGeographyList,
-       &GeneralGeographyListAltID,
-       &GeneralGeographyListPID,
-       &GeneralGeographyListType,
-       &GeneralGeographyListTokens,
-       &GeneralGeographyListMediatype, 
-       &GeneralGeographyListPref,
-       lboGeoposition,
-       (intValueSeek));
-    frameCEGeo->ShowModal(); 
+                              &GeneralGeographyListAltID,
+                              &GeneralGeographyListPID,
+                              &GeneralGeographyListType,
+                              &GeneralGeographyListTokens,
+                              &GeneralGeographyListMediatype,
+                              &GeneralGeographyListPref,
+                              lboGeoposition,
+                              (intValueSeek));
+    frameCEGeo->ShowModal();
     delete frameCEGeo;
     frameCEGeo = NULL;
 }
@@ -641,22 +641,22 @@ void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboGeoposition, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboGeoposition,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
     frameCEGeo->SetupPointers(&GeneralGeographyList,
-       &GeneralGeographyListAltID,
-       &GeneralGeographyListPID,
-       &GeneralGeographyListType,
-       &GeneralGeographyListTokens,
-       &GeneralGeographyListMediatype, 
-       &GeneralGeographyListPref,
-       lboGeoposition,
-       intSelectedData);
+                              &GeneralGeographyListAltID,
+                              &GeneralGeographyListPID,
+                              &GeneralGeographyListType,
+                              &GeneralGeographyListTokens,
+                              &GeneralGeographyListMediatype,
+                              &GeneralGeographyListPref,
+                              lboGeoposition,
+                              intSelectedData);
     frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
     frameCEGeo->ShowModal();
     delete frameCEGeo;
@@ -668,38 +668,38 @@ void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboGeoposition, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboGeoposition,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboGeoposition->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GeneralGeographyList,
-    &GeneralGeographyListAltID, &GeneralGeographyListPID,
-    &GeneralGeographyListType, &GeneralGeographyListTokens,
-    &GeneralGeographyListMediatype, &GeneralGeographyListPref);
+                  &GeneralGeographyListAltID, &GeneralGeographyListPID,
+                  &GeneralGeographyListType, &GeneralGeographyListTokens,
+                  &GeneralGeographyListMediatype, &GeneralGeographyListPref);
     
 }
 
 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
     frameCERel->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralRelatedList);
     frameCERel->SetupPointers(&GeneralRelatedList,
-       &GeneralRelatedListRelType,    
-       &GeneralRelatedListAltID,
-       &GeneralRelatedListPID,
-       &GeneralRelatedListType,
-       &GeneralRelatedListTokens,      
-       &GeneralRelatedListPref,
-       lboRelated,
-       (intValueSeek));
-     frameCERel->ShowModal();
+                              &GeneralRelatedListRelType,
+                              &GeneralRelatedListAltID,
+                              &GeneralRelatedListPID,
+                              &GeneralRelatedListType,
+                              &GeneralRelatedListTokens,
+                              &GeneralRelatedListPref,
+                              lboRelated,
+                              (intValueSeek));
+    frameCERel->ShowModal();
     delete frameCERel;
     frameCERel = NULL;
 }
@@ -709,22 +709,22 @@ void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboRelated, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboRelated,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
     frameCERel->SetupPointers(&GeneralRelatedList,
-       &GeneralRelatedListRelType,    
-       &GeneralRelatedListAltID,
-       &GeneralRelatedListPID,
-       &GeneralRelatedListType,
-       &GeneralRelatedListTokens,      
-       &GeneralRelatedListPref,
-       lboRelated,
-       intSelectedData);
+                              &GeneralRelatedListRelType,
+                              &GeneralRelatedListAltID,
+                              &GeneralRelatedListPID,
+                              &GeneralRelatedListType,
+                              &GeneralRelatedListTokens,
+                              &GeneralRelatedListPref,
+                              lboRelated,
+                              intSelectedData);
     frameCERel->SetEditorMode(TRUE, CE_GENERAL);
     frameCERel->ShowModal();
     delete frameCERel;
@@ -736,10 +736,10 @@ void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboRelated, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboRelated,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboRelated->DeleteItem(longSelected);
@@ -756,19 +756,19 @@ void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
     frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralWebsiteList);
     frameCEWeb->SetupPointers(&GeneralWebsiteList,
-       &GeneralWebsiteListAltID,
-       &GeneralWebsiteListPID,
-       &GeneralWebsiteListType,
-       &GeneralWebsiteListTokens,
-       &GeneralWebsiteListMediatype,
-       &GeneralWebsiteListPref,
-       lboWebsites,
-       (intValueSeek));
+                              &GeneralWebsiteListAltID,
+                              &GeneralWebsiteListPID,
+                              &GeneralWebsiteListType,
+                              &GeneralWebsiteListTokens,
+                              &GeneralWebsiteListMediatype,
+                              &GeneralWebsiteListPref,
+                              lboWebsites,
+                              (intValueSeek));
     frameCEWeb->ShowModal();
     delete frameCEWeb;
     frameCEWeb = NULL;
@@ -779,22 +779,22 @@ void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboWebsites, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboWebsites,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
     frameCEWeb->SetupPointers(&GeneralWebsiteList,
-       &GeneralWebsiteListAltID,
-       &GeneralWebsiteListPID,
-       &GeneralWebsiteListType,
-       &GeneralWebsiteListTokens,
-       &GeneralWebsiteListMediatype,   
-       &GeneralWebsiteListPref,
-       lboWebsites,
-       intSelectedData);
+                              &GeneralWebsiteListAltID,
+                              &GeneralWebsiteListPID,
+                              &GeneralWebsiteListType,
+                              &GeneralWebsiteListTokens,
+                              &GeneralWebsiteListMediatype,
+                              &GeneralWebsiteListPref,
+                              lboWebsites,
+                              intSelectedData);
     frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
     frameCEWeb->ShowModal();
     delete frameCEWeb;
@@ -806,37 +806,37 @@ void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboWebsites, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboWebsites,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboWebsites->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GeneralWebsiteList,
-    &GeneralWebsiteListAltID, &GeneralWebsiteListPID,
-    &GeneralWebsiteListType, &GeneralWebsiteListTokens,
-    &GeneralWebsiteListMediatype, &GeneralWebsiteListPref);
+                  &GeneralWebsiteListAltID, &GeneralWebsiteListPID,
+                  &GeneralWebsiteListType, &GeneralWebsiteListTokens,
+                  &GeneralWebsiteListMediatype, &GeneralWebsiteListPref);
     
 }
 
 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
     frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralTitleList);
     frameCETitle->SetupPointers(&GeneralTitleList,
-       &GeneralTitleListLanguage,    
-       &GeneralTitleListAltID,
-       &GeneralTitleListPID,
-       &GeneralTitleListType,
-       &GeneralTitleListTokens,
-       &GeneralTitleListPref,
-       lboTitles,
-       (intValueSeek));
+                                &GeneralTitleListLanguage,
+                                &GeneralTitleListAltID,
+                                &GeneralTitleListPID,
+                                &GeneralTitleListType,
+                                &GeneralTitleListTokens,
+                                &GeneralTitleListPref,
+                                lboTitles,
+                                (intValueSeek));
     frameCETitle->ShowModal();
     delete frameCETitle;
     frameCETitle = NULL;
@@ -847,22 +847,22 @@ void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboTitles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboTitles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
     frameCETitle->SetupPointers(&GeneralTitleList,
-       &GeneralTitleListLanguage,
-       &GeneralTitleListAltID,
-       &GeneralTitleListPID,
-       &GeneralTitleListType,
-       &GeneralTitleListTokens,        
-       &GeneralTitleListPref,
-       lboTitles,
-       intSelectedData);
+                                &GeneralTitleListLanguage,
+                                &GeneralTitleListAltID,
+                                &GeneralTitleListPID,
+                                &GeneralTitleListType,
+                                &GeneralTitleListTokens,
+                                &GeneralTitleListPref,
+                                lboTitles,
+                                intSelectedData);
     frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
     frameCETitle->ShowModal();
     delete frameCETitle;
@@ -874,37 +874,37 @@ void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboTitles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboTitles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboTitles->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GeneralTitleList,
-    &GeneralTitleListLanguage, &GeneralTitleListAltID,
-    &GeneralTitleListPID, &GeneralTitleListType,
-    &GeneralTitleListTokens, &GeneralTitleListPref);
+                  &GeneralTitleListLanguage, &GeneralTitleListAltID,
+                  &GeneralTitleListPID, &GeneralTitleListType,
+                  &GeneralTitleListTokens, &GeneralTitleListPref);
     
 }
 
 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
     frameCERole->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralRoleList);
     frameCERole->SetupPointers(&GeneralRoleList,
-       &GeneralRoleListLanguage,
-       &GeneralRoleListAltID,
-       &GeneralRoleListPID,
-       &GeneralRoleListType,
-       &GeneralRoleListTokens,
-       &GeneralRoleListPref,
-       lboRoles,
-       (intValueSeek));
+                               &GeneralRoleListLanguage,
+                               &GeneralRoleListAltID,
+                               &GeneralRoleListPID,
+                               &GeneralRoleListType,
+                               &GeneralRoleListTokens,
+                               &GeneralRoleListPref,
+                               lboRoles,
+                               (intValueSeek));
     frameCERole->ShowModal();
     delete frameCERole;
     frameCERole = NULL;
@@ -915,22 +915,22 @@ void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboRoles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboRoles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
     frameCERole->SetupPointers(&GeneralRoleList,
-       &GeneralRoleListLanguage,
-       &GeneralRoleListAltID,
-       &GeneralRoleListPID,
-       &GeneralRoleListType,
-       &GeneralRoleListTokens, 
-       &GeneralRoleListPref,
-       lboRoles,
-       intSelectedData);
+                               &GeneralRoleListLanguage,
+                               &GeneralRoleListAltID,
+                               &GeneralRoleListPID,
+                               &GeneralRoleListType,
+                               &GeneralRoleListTokens,
+                               &GeneralRoleListPref,
+                               lboRoles,
+                               intSelectedData);
     frameCERole->SetEditorMode(TRUE, CE_GENERAL);
     frameCERole->ShowModal();
     delete frameCERole;
@@ -942,38 +942,38 @@ void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboRoles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboRoles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboRoles->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GeneralRoleList,
-    &GeneralRoleListLanguage, &GeneralRoleListAltID,
-    &GeneralRoleListPID, &GeneralRoleListType,
-    &GeneralRoleListTokens, &GeneralRoleListPref);
+                  &GeneralRoleListLanguage, &GeneralRoleListAltID,
+                  &GeneralRoleListPID, &GeneralRoleListType,
+                  &GeneralRoleListTokens, &GeneralRoleListPref);
     
 }
 
 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
     frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralOrganisationsList);
     frameCEOrg->SetupPointers(&GeneralOrganisationsList,
-       &GeneralOrganisationsListLanguage,
-       &GeneralOrganisationsListSortAs,        
-       &GeneralOrganisationsListAltID,
-       &GeneralOrganisationsListPID,
-       &GeneralOrganisationsListType,
-       &GeneralOrganisationsListTokens,
-       &GeneralOrganisationsListPref,
-       lboOrganisations,
-       (intValueSeek));
+                              &GeneralOrganisationsListLanguage,
+                              &GeneralOrganisationsListSortAs,
+                              &GeneralOrganisationsListAltID,
+                              &GeneralOrganisationsListPID,
+                              &GeneralOrganisationsListType,
+                              &GeneralOrganisationsListTokens,
+                              &GeneralOrganisationsListPref,
+                              lboOrganisations,
+                              (intValueSeek));
     frameCEOrg->ShowModal();
     delete frameCEOrg;
     frameCEOrg = NULL;
@@ -984,23 +984,23 @@ void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboOrganisations, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboOrganisations,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
     frameCEOrg->SetupPointers(&GeneralOrganisationsList,
-       &GeneralOrganisationsListLanguage,
-       &GeneralOrganisationsListSortAs,        
-       &GeneralOrganisationsListAltID,
-       &GeneralOrganisationsListPID,
-       &GeneralOrganisationsListType,
-       &GeneralOrganisationsListTokens,        
-       &GeneralOrganisationsListPref,
-       lboOrganisations,
-       intSelectedData);
+                              &GeneralOrganisationsListLanguage,
+                              &GeneralOrganisationsListSortAs,
+                              &GeneralOrganisationsListAltID,
+                              &GeneralOrganisationsListPID,
+                              &GeneralOrganisationsListType,
+                              &GeneralOrganisationsListTokens,
+                              &GeneralOrganisationsListPref,
+                              lboOrganisations,
+                              intSelectedData);
     frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
     frameCEOrg->ShowModal();
     delete frameCEOrg;
@@ -1012,38 +1012,38 @@ void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboOrganisations, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboOrganisations,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboOrganisations->DeleteItem(longSelected);
-
+    
     DeleteMapData(intSelectedData, &GeneralOrganisationsList,
-    &GeneralOrganisationsListLanguage, &GeneralOrganisationsListSortAs,
-    &GeneralOrganisationsListAltID, &GeneralOrganisationsListPID,
-    &GeneralOrganisationsListType, &GeneralOrganisationsListTokens,
-    &GeneralOrganisationsListPref);
+                  &GeneralOrganisationsListLanguage, &GeneralOrganisationsListSortAs,
+                  &GeneralOrganisationsListAltID, &GeneralOrganisationsListPID,
+                  &GeneralOrganisationsListType, &GeneralOrganisationsListTokens,
+                  &GeneralOrganisationsListPref);
     
 }
 
 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
     frameCENote->SetEditorMode(FALSE, CE_GENERAL);
     intResult = GetLastInt(&GeneralNoteList);
     frameCENote->SetupPointers(&GeneralNoteList,
-       &GeneralNoteListLanguage,
-       &GeneralNoteListAltID,
-       &GeneralNoteListPID,
-       &GeneralNoteListType,
-       &GeneralNoteListTokens,
-       &GeneralNoteListPref,
-       lboNotes,
-       (intValueSeek));
+                               &GeneralNoteListLanguage,
+                               &GeneralNoteListAltID,
+                               &GeneralNoteListPID,
+                               &GeneralNoteListType,
+                               &GeneralNoteListTokens,
+                               &GeneralNoteListPref,
+                               lboNotes,
+                               (intValueSeek));
     frameCENote->ShowModal();
     delete frameCENote;
     frameCENote = NULL;
@@ -1054,22 +1054,22 @@ void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboNotes, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboNotes,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
     frameCENote->SetupPointers(&GeneralNoteList,
-       &GeneralNoteListLanguage,
-       &GeneralNoteListAltID,
-       &GeneralNoteListPID,
-       &GeneralNoteListType,
-       &GeneralNoteListTokens, 
-       &GeneralNoteListPref,
-       lboNotes,
-       intSelectedData);
+                               &GeneralNoteListLanguage,
+                               &GeneralNoteListAltID,
+                               &GeneralNoteListPID,
+                               &GeneralNoteListType,
+                               &GeneralNoteListTokens,
+                               &GeneralNoteListPref,
+                               lboNotes,
+                               intSelectedData);
     frameCENote->SetEditorMode(TRUE, CE_GENERAL);
     frameCENote->ShowModal();
     delete frameCENote;
@@ -1081,38 +1081,38 @@ void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboNotes, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboNotes,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboNotes->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GeneralNoteList,
-    &GeneralNoteListLanguage, &GeneralNoteListAltID,
-    &GeneralNoteListPID, &GeneralNoteListType,
-    &GeneralNoteListTokens, &GeneralNoteListPref);
+                  &GeneralNoteListLanguage, &GeneralNoteListAltID,
+                  &GeneralNoteListPID, &GeneralNoteListType,
+                  &GeneralNoteListTokens, &GeneralNoteListPref);
     
 }
 
 void frmContactEditor::AddHomeNickname( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
     frameCENickname->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeNicknamesList);
-    frameCENickname->SetupPointers(&HomeNicknamesList, 
-       &HomeNicknamesListAltID,
-       &HomeNicknamesListPID,
-       &HomeNicknamesListType,
-       &HomeNicknamesListLanguage,     
-       &HomeNicknamesListTokens,
-       &HomeNicknamesListPref,
-       lboHomeNicknames,
-       (intValueSeek));
-    frameCENickname->ShowModal(); 
+    frameCENickname->SetupPointers(&HomeNicknamesList,
+                                   &HomeNicknamesListAltID,
+                                   &HomeNicknamesListPID,
+                                   &HomeNicknamesListType,
+                                   &HomeNicknamesListLanguage,
+                                   &HomeNicknamesListTokens,
+                                   &HomeNicknamesListPref,
+                                   lboHomeNicknames,
+                                   (intValueSeek));
+    frameCENickname->ShowModal();
     delete frameCENickname;
     frameCENickname = NULL;
 }
@@ -1122,22 +1122,22 @@ void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeNicknames, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeNicknames,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
-    frameCENickname->SetupPointers(&HomeNicknamesList, 
-       &HomeNicknamesListAltID,
-       &HomeNicknamesListPID,
-       &HomeNicknamesListType,
-       &HomeNicknamesListLanguage,     
-       &HomeNicknamesListTokens,
-       &HomeNicknamesListPref,
-       lboHomeNicknames,
-       intSelectedData);    
+    frameCENickname->SetupPointers(&HomeNicknamesList,
+                                   &HomeNicknamesListAltID,
+                                   &HomeNicknamesListPID,
+                                   &HomeNicknamesListType,
+                                   &HomeNicknamesListLanguage,
+                                   &HomeNicknamesListTokens,
+                                   &HomeNicknamesListPref,
+                                   lboHomeNicknames,
+                                   intSelectedData);
     frameCENickname->SetEditorMode(TRUE, CE_HOME);
     frameCENickname->ShowModal();
     delete frameCENickname;
@@ -1146,54 +1146,54 @@ void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
 
 void frmContactEditor::DeleteHomeNickname( wxCommandEvent& event )
 {
-
+    
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeNicknames, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeNicknames,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeNicknames->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData,
-    &HomeNicknamesList,
-    &HomeNicknamesListLanguage,
-    &HomeNicknamesListAltID,
-    &HomeNicknamesListPID,
-    &HomeNicknamesListTokens,
-    &HomeNicknamesListType,
-    &HomeNicknamesListPref);
-
+                  &HomeNicknamesList,
+                  &HomeNicknamesListLanguage,
+                  &HomeNicknamesListAltID,
+                  &HomeNicknamesListPID,
+                  &HomeNicknamesListTokens,
+                  &HomeNicknamesListType,
+                  &HomeNicknamesListPref);
+    
 }
 
 void frmContactEditor::AddHomeAddress( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
     frameCEAddress->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeAddressList);
     frameCEAddress->SetupPointers(&HomeAddressList,
-       &HomeAddressListTown,
-       &HomeAddressListCounty,
-       &HomeAddressListPostCode,
-       &HomeAddressListCountry,
-       &HomeAddressListLabel,
-       &HomeAddressListLang,   
-       &HomeAddressListAltID,
-       &HomeAddressListPID,
-       &HomeAddressListTokens,
-       &HomeAddressListGeo,
-       &HomeAddressListTimezone,
-       &HomeAddressListType,
-       &HomeAddressListMediatype,
-       &HomeAddressListPref,
-       lboHomeAddresses,
-       (intValueSeek));
-    frameCEAddress->ShowModal(); 
+                                  &HomeAddressListTown,
+                                  &HomeAddressListCounty,
+                                  &HomeAddressListPostCode,
+                                  &HomeAddressListCountry,
+                                  &HomeAddressListLabel,
+                                  &HomeAddressListLang,
+                                  &HomeAddressListAltID,
+                                  &HomeAddressListPID,
+                                  &HomeAddressListTokens,
+                                  &HomeAddressListGeo,
+                                  &HomeAddressListTimezone,
+                                  &HomeAddressListType,
+                                  &HomeAddressListMediatype,
+                                  &HomeAddressListPref,
+                                  lboHomeAddresses,
+                                  (intValueSeek));
+    frameCEAddress->ShowModal();
     delete frameCEAddress;
     frameCEAddress = NULL;
 }
@@ -1203,30 +1203,30 @@ void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeAddresses, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeAddresses,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
     frameCEAddress->SetupPointers(&HomeAddressList,
-       &HomeAddressListTown,
-       &HomeAddressListCounty,
-       &HomeAddressListPostCode,
-       &HomeAddressListCountry,
-       &HomeAddressListLabel,
-       &HomeAddressListLang,   
-       &HomeAddressListAltID,
-       &HomeAddressListPID,
-       &HomeAddressListTokens,
-       &HomeAddressListGeo,
-       &HomeAddressListTimezone,
-       &HomeAddressListType,
-       &HomeAddressListMediatype,
-       &HomeAddressListPref,
-       lboHomeAddresses,
-       intSelectedData);    
+                                  &HomeAddressListTown,
+                                  &HomeAddressListCounty,
+                                  &HomeAddressListPostCode,
+                                  &HomeAddressListCountry,
+                                  &HomeAddressListLabel,
+                                  &HomeAddressListLang,
+                                  &HomeAddressListAltID,
+                                  &HomeAddressListPID,
+                                  &HomeAddressListTokens,
+                                  &HomeAddressListGeo,
+                                  &HomeAddressListTimezone,
+                                  &HomeAddressListType,
+                                  &HomeAddressListMediatype,
+                                  &HomeAddressListPref,
+                                  lboHomeAddresses,
+                                  intSelectedData);
     frameCEAddress->SetEditorMode(TRUE, CE_HOME);
     frameCEAddress->ShowModal();
     delete frameCEAddress;
@@ -1235,46 +1235,46 @@ void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
 
 void frmContactEditor::DeleteHomeAddress( wxCommandEvent& event )
 {
-
+    
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeAddresses, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeAddresses,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeAddresses->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeAddressList,
-    &HomeAddressListTown, &HomeAddressListCounty,
-    &HomeAddressListPostCode, &HomeAddressListCountry,
-    &HomeAddressList, &HomeAddressListLabel,
-    &HomeAddressListLang, &HomeAddressListAltID,
-    &HomeAddressListPID, &HomeAddressListTokens,
-    &HomeAddressListGeo, &HomeAddressListTimezone,
-    &HomeAddressListType, &HomeAddressListMediatype,
-    &HomeAddressListPref);
+                  &HomeAddressListTown, &HomeAddressListCounty,
+                  &HomeAddressListPostCode, &HomeAddressListCountry,
+                  &HomeAddressList, &HomeAddressListLabel,
+                  &HomeAddressListLang, &HomeAddressListAltID,
+                  &HomeAddressListPID, &HomeAddressListTokens,
+                  &HomeAddressListGeo, &HomeAddressListTimezone,
+                  &HomeAddressListType, &HomeAddressListMediatype,
+                  &HomeAddressListPref);
     
 }
 
 void frmContactEditor::AddHomeEmail( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
     frameCEEmail->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeAddressList);
     frameCEEmail->SetupPointers(&HomeEmailList,
-       &HomeEmailListAltID,
-       &HomeEmailListPID,
-       &HomeEmailListType,
-       &HomeEmailListTokens,
-       &HomeEmailListPref,
-       lboHomeEmails,
-       (intValueSeek));
-    frameCEEmail->ShowModal(); 
+                                &HomeEmailListAltID,
+                                &HomeEmailListPID,
+                                &HomeEmailListType,
+                                &HomeEmailListTokens,
+                                &HomeEmailListPref,
+                                lboHomeEmails,
+                                (intValueSeek));
+    frameCEEmail->ShowModal();
     delete frameCEEmail;
     frameCEEmail = NULL;
 }
@@ -1284,21 +1284,21 @@ void frmContactEditor::ModifyHomeEmail( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeEmails, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeEmails,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
     frameCEEmail->SetupPointers(&HomeEmailList,
-       &HomeEmailListAltID,
-       &HomeEmailListPID,
-       &HomeEmailListType,
-       &HomeEmailListTokens,
-       &HomeEmailListPref,
-       lboHomeEmails,
-       intSelectedData);    
+                                &HomeEmailListAltID,
+                                &HomeEmailListPID,
+                                &HomeEmailListType,
+                                &HomeEmailListTokens,
+                                &HomeEmailListPref,
+                                lboHomeEmails,
+                                intSelectedData);
     frameCEEmail->SetEditorMode(TRUE, CE_HOME);
     frameCEEmail->ShowModal();
     delete frameCEEmail;
@@ -1311,38 +1311,38 @@ void frmContactEditor::DeleteHomeEmail( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeEmails, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeEmails,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeEmails->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeEmailList,
-    &HomeEmailListAltID, &HomeEmailListPID,
-    &HomeEmailListType, &HomeEmailListTokens,
-    &HomeEmailListPref);
+                  &HomeEmailListAltID, &HomeEmailListPID,
+                  &HomeEmailListType, &HomeEmailListTokens,
+                  &HomeEmailListPref);
 }
 
 
 void frmContactEditor::AddHomeIM( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
     frameCEIM->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeIMList);
     frameCEIM->SetupPointers(&HomeIMList,
-       &HomeIMListAltID,
-       &HomeIMListPID,
-       &HomeIMListType,
-       &HomeIMListTokens,
-       &HomeIMListMediatype,   
-       &HomeIMListPref,
-       lboHomeIM,
-       (intValueSeek));
-    frameCEIM->ShowModal(); 
+                             &HomeIMListAltID,
+                             &HomeIMListPID,
+                             &HomeIMListType,
+                             &HomeIMListTokens,
+                             &HomeIMListMediatype,
+                             &HomeIMListPref,
+                             lboHomeIM,
+                             (intValueSeek));
+    frameCEIM->ShowModal();
     delete frameCEIM;
     frameCEIM = NULL;
 }
@@ -1352,22 +1352,22 @@ void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeIM, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeIM,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
     frameCEIM->SetupPointers(&HomeIMList,
-       &HomeIMListAltID,
-       &HomeIMListPID,
-       &HomeIMListType,
-       &HomeIMListTokens,
-       &HomeIMListMediatype,   
-       &HomeIMListPref,
-       lboHomeIM,
-       intSelectedData);    
+                             &HomeIMListAltID,
+                             &HomeIMListPID,
+                             &HomeIMListType,
+                             &HomeIMListTokens,
+                             &HomeIMListMediatype,
+                             &HomeIMListPref,
+                             lboHomeIM,
+                             intSelectedData);
     frameCEIM->SetEditorMode(TRUE, CE_HOME);
     frameCEIM->ShowModal();
     delete frameCEIM;
@@ -1379,37 +1379,37 @@ void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeIM, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeIM,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeIM->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeIMList,
-    &HomeIMListAltID, &HomeIMListPID,
-    &HomeIMListType, &HomeIMListTokens,
-    &HomeIMListMediatype, &HomeIMListPref);
+                  &HomeIMListAltID, &HomeIMListPID,
+                  &HomeIMListType, &HomeIMListTokens,
+                  &HomeIMListMediatype, &HomeIMListPref);
     
 }
 
 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
     frameCETel->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeTelephoneList);
     frameCETel->SetupPointers(&HomeTelephoneList,
-       &HomeTelephoneListAltID,
-       &HomeTelephoneListPID,
-       &HomeTelephoneListType,
-       &HomeTelephoneListTokens,
-       &HomeTelephoneListPref,
-       lboHomeTelephone,
-       (intValueSeek));
-    frameCETel->ShowModal(); 
+                              &HomeTelephoneListAltID,
+                              &HomeTelephoneListPID,
+                              &HomeTelephoneListType,
+                              &HomeTelephoneListTokens,
+                              &HomeTelephoneListPref,
+                              lboHomeTelephone,
+                              (intValueSeek));
+    frameCETel->ShowModal();
     delete frameCETel;
     frameCETel = NULL;
 }
@@ -1419,21 +1419,21 @@ void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeTelephone, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeTelephone,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
     frameCETel->SetupPointers(&HomeTelephoneList,
-       &HomeTelephoneListAltID,
-       &HomeTelephoneListPID,
-       &HomeTelephoneListType,
-       &HomeTelephoneListTokens,
-       &HomeTelephoneListPref,
-       lboHomeTelephone,
-       intSelectedData);    
+                              &HomeTelephoneListAltID,
+                              &HomeTelephoneListPID,
+                              &HomeTelephoneListType,
+                              &HomeTelephoneListTokens,
+                              &HomeTelephoneListPref,
+                              lboHomeTelephone,
+                              intSelectedData);
     frameCETel->SetEditorMode(TRUE, CE_HOME);
     frameCETel->ShowModal();
     delete frameCETel;
@@ -1445,37 +1445,37 @@ void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeTelephone, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeTelephone,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeTelephone->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeTelephoneList,
-    &HomeTelephoneListAltID, &HomeTelephoneListPID,
-    &HomeTelephoneListType, &HomeTelephoneListTokens,
-    &HomeTelephoneListPref);
+                  &HomeTelephoneListAltID, &HomeTelephoneListPID,
+                  &HomeTelephoneListType, &HomeTelephoneListTokens,
+                  &HomeTelephoneListPref);
     
 }
 
 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
     frameCELang->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeLanguageList);
     frameCELang->SetupPointers(&HomeLanguageList,
-       &HomeLanguageListAltID,
-       &HomeLanguageListPID,
-       &HomeLanguageListType,
-       &HomeLanguageListTokens,
-       &HomeLanguageListPref,
-       lboHomeLanguages,
-       (intValueSeek));
-    frameCELang->ShowModal(); 
+                               &HomeLanguageListAltID,
+                               &HomeLanguageListPID,
+                               &HomeLanguageListType,
+                               &HomeLanguageListTokens,
+                               &HomeLanguageListPref,
+                               lboHomeLanguages,
+                               (intValueSeek));
+    frameCELang->ShowModal();
     delete frameCELang;
     frameCELang = NULL;
 }
@@ -1485,21 +1485,21 @@ void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeLanguages, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeLanguages,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
     frameCELang->SetupPointers(&HomeLanguageList,
-       &HomeLanguageListAltID,
-       &HomeLanguageListPID,
-       &HomeLanguageListType,
-       &HomeLanguageListTokens,        
-       &HomeLanguageListPref,
-       lboHomeLanguages,
-       intSelectedData);    
+                               &HomeLanguageListAltID,
+                               &HomeLanguageListPID,
+                               &HomeLanguageListType,
+                               &HomeLanguageListTokens,
+                               &HomeLanguageListPref,
+                               lboHomeLanguages,
+                               intSelectedData);
     frameCELang->SetEditorMode(TRUE, CE_HOME);
     frameCELang->ShowModal();
     delete frameCELang;
@@ -1511,38 +1511,38 @@ void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeLanguages, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeLanguages,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeLanguages->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeLanguageList,
-    &HomeLanguageListAltID, &HomeLanguageListPID,
-    &HomeLanguageListType, &HomeLanguageListTokens,
-    &HomeLanguageListPref);
+                  &HomeLanguageListAltID, &HomeLanguageListPID,
+                  &HomeLanguageListType, &HomeLanguageListTokens,
+                  &HomeLanguageListPref);
     
 }
 
 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
     frameCETZ->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeTZList);
     frameCETZ->SetupPointers(&HomeTZList,
-       &HomeTZListAltID,
-       &HomeTZListPID,
-       &HomeTZListType,
-       &HomeTZListTokens,
-       &HomeTZListMediatype,   
-       &HomeTZListPref,
-       lboHomeTimezones,
-       (intValueSeek));
-    frameCETZ->ShowModal(); 
+                             &HomeTZListAltID,
+                             &HomeTZListPID,
+                             &HomeTZListType,
+                             &HomeTZListTokens,
+                             &HomeTZListMediatype,
+                             &HomeTZListPref,
+                             lboHomeTimezones,
+                             (intValueSeek));
+    frameCETZ->ShowModal();
     delete frameCETZ;
     frameCETZ = NULL;
 }
@@ -1552,22 +1552,22 @@ void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeTimezones, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeTimezones,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
     frameCETZ->SetupPointers(&HomeTZList,
-       &HomeTZListAltID,
-       &HomeTZListPID,
-       &HomeTZListType,
-       &HomeTZListTokens,
-       &HomeTZListMediatype,   
-       &HomeTZListPref,
-       lboHomeTimezones,
-       intSelectedData);
+                             &HomeTZListAltID,
+                             &HomeTZListPID,
+                             &HomeTZListType,
+                             &HomeTZListTokens,
+                             &HomeTZListMediatype,
+                             &HomeTZListPref,
+                             lboHomeTimezones,
+                             intSelectedData);
     frameCETZ->SetEditorMode(TRUE, CE_HOME);
     frameCETZ->ShowModal();
     delete frameCETZ;
@@ -1579,38 +1579,38 @@ void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeTimezones, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeTimezones,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeTimezones->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeTZList,
-    &HomeTZListAltID, &HomeTZListPID,
-    &HomeTZListType, &HomeTZListTokens,
-    &HomeTZListMediatype, &HomeTZListPref);
+                  &HomeTZListAltID, &HomeTZListPID,
+                  &HomeTZListType, &HomeTZListTokens,
+                  &HomeTZListMediatype, &HomeTZListPref);
     
 }
 
 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
     frameCEGeo->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeGeographyList);
     frameCEGeo->SetupPointers(&HomeGeographyList,
-       &HomeGeographyListAltID,
-       &HomeGeographyListPID,
-       &HomeGeographyListType,
-       &HomeGeographyListTokens,
-       &HomeGeographyListMediatype,    
-       &HomeGeographyListPref,
-       lboHomeGeoposition,
-       (intValueSeek));
-    frameCEGeo->ShowModal(); 
+                              &HomeGeographyListAltID,
+                              &HomeGeographyListPID,
+                              &HomeGeographyListType,
+                              &HomeGeographyListTokens,
+                              &HomeGeographyListMediatype,
+                              &HomeGeographyListPref,
+                              lboHomeGeoposition,
+                              (intValueSeek));
+    frameCEGeo->ShowModal();
     delete frameCEGeo;
     frameCEGeo = NULL;
 }
@@ -1620,22 +1620,22 @@ void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeGeoposition, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeGeoposition,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
     frameCEGeo->SetupPointers(&HomeGeographyList,
-       &HomeGeographyListAltID,
-       &HomeGeographyListPID,
-       &HomeGeographyListType,
-       &HomeGeographyListTokens,
-       &HomeGeographyListMediatype,    
-       &HomeGeographyListPref,
-       lboHomeGeoposition,
-       intSelectedData);
+                              &HomeGeographyListAltID,
+                              &HomeGeographyListPID,
+                              &HomeGeographyListType,
+                              &HomeGeographyListTokens,
+                              &HomeGeographyListMediatype,
+                              &HomeGeographyListPref,
+                              lboHomeGeoposition,
+                              intSelectedData);
     frameCEGeo->SetEditorMode(TRUE, CE_HOME);
     frameCEGeo->ShowModal();
     delete frameCEGeo;
@@ -1647,37 +1647,37 @@ void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeGeoposition, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeGeoposition,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeGeoposition->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeGeographyList,
-    &HomeGeographyListAltID, &HomeGeographyListPID,
-    &HomeGeographyListType, &HomeGeographyListTokens,
-    &HomeGeographyListMediatype, &HomeGeographyListPref);
+                  &HomeGeographyListAltID, &HomeGeographyListPID,
+                  &HomeGeographyListType, &HomeGeographyListTokens,
+                  &HomeGeographyListMediatype, &HomeGeographyListPref);
     
 }
 
 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
     frameCEWeb->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeWebsiteList);
     frameCEWeb->SetupPointers(&HomeWebsiteList,
-       &HomeWebsiteListAltID,
-       &HomeWebsiteListPID,
-       &HomeWebsiteListType,
-       &HomeWebsiteListTokens,
-       &HomeWebsiteListMediatype,
-       &HomeWebsiteListPref,
-       lboHomeWebsites,
-       (intValueSeek));
+                              &HomeWebsiteListAltID,
+                              &HomeWebsiteListPID,
+                              &HomeWebsiteListType,
+                              &HomeWebsiteListTokens,
+                              &HomeWebsiteListMediatype,
+                              &HomeWebsiteListPref,
+                              lboHomeWebsites,
+                              (intValueSeek));
     frameCEWeb->ShowModal();
     delete frameCEWeb;
     frameCEWeb = NULL;
@@ -1688,22 +1688,22 @@ void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeWebsites, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeWebsites,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
     frameCEWeb->SetupPointers(&HomeWebsiteList,
-       &HomeWebsiteListAltID,
-       &HomeWebsiteListPID,
-       &HomeWebsiteListType,
-       &HomeWebsiteListTokens,
-       &HomeWebsiteListMediatype,      
-       &HomeWebsiteListPref,
-       lboHomeWebsites,
-       intSelectedData);
+                              &HomeWebsiteListAltID,
+                              &HomeWebsiteListPID,
+                              &HomeWebsiteListType,
+                              &HomeWebsiteListTokens,
+                              &HomeWebsiteListMediatype,
+                              &HomeWebsiteListPref,
+                              lboHomeWebsites,
+                              intSelectedData);
     frameCEWeb->SetEditorMode(TRUE, CE_HOME);
     frameCEWeb->ShowModal();
     delete frameCEWeb;
@@ -1715,37 +1715,37 @@ void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeWebsites, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeWebsites,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeWebsites->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeWebsiteList,
-    &HomeWebsiteListAltID, &HomeWebsiteListPID,
-    &HomeWebsiteListType, &HomeWebsiteListTokens,
-    &HomeWebsiteListMediatype, &HomeWebsiteListPref);
+                  &HomeWebsiteListAltID, &HomeWebsiteListPID,
+                  &HomeWebsiteListType, &HomeWebsiteListTokens,
+                  &HomeWebsiteListMediatype, &HomeWebsiteListPref);
     
 }
 
 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
     frameCETitle->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeTitleList);
     frameCETitle->SetupPointers(&HomeTitleList,
-       &HomeTitleListLanguage,    
-       &HomeTitleListAltID,
-       &HomeTitleListPID,
-       &HomeTitleListType,
-       &HomeTitleListTokens,
-       &HomeTitleListPref,
-       lboHomeTitles,
-       (intValueSeek));
+                                &HomeTitleListLanguage,
+                                &HomeTitleListAltID,
+                                &HomeTitleListPID,
+                                &HomeTitleListType,
+                                &HomeTitleListTokens,
+                                &HomeTitleListPref,
+                                lboHomeTitles,
+                                (intValueSeek));
     frameCETitle->ShowModal();
     delete frameCETitle;
     frameCETitle = NULL;
@@ -1756,22 +1756,22 @@ void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeTitles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeTitles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
     frameCETitle->SetupPointers(&HomeTitleList,
-       &HomeTitleListLanguage,
-       &HomeTitleListAltID,
-       &HomeTitleListPID,
-       &HomeTitleListType,
-       &HomeTitleListTokens,   
-       &HomeTitleListPref,
-       lboHomeTitles,
-       intSelectedData);
+                                &HomeTitleListLanguage,
+                                &HomeTitleListAltID,
+                                &HomeTitleListPID,
+                                &HomeTitleListType,
+                                &HomeTitleListTokens,
+                                &HomeTitleListPref,
+                                lboHomeTitles,
+                                intSelectedData);
     frameCETitle->SetEditorMode(TRUE, CE_HOME);
     frameCETitle->ShowModal();
     delete frameCETitle;
@@ -1783,37 +1783,37 @@ void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeTitles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeTitles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeTitles->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeTitleList,
-    &HomeTitleListLanguage, &HomeTitleListAltID,
-    &HomeTitleListPID, &HomeTitleListType,
-    &HomeTitleListTokens, &HomeTitleListPref);
+                  &HomeTitleListLanguage, &HomeTitleListAltID,
+                  &HomeTitleListPID, &HomeTitleListType,
+                  &HomeTitleListTokens, &HomeTitleListPref);
     
 }
 
 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
     frameCERole->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeRoleList);
     frameCERole->SetupPointers(&HomeRoleList,
-       &HomeRoleListLanguage,
-       &HomeRoleListAltID,
-       &HomeRoleListPID,
-       &HomeRoleListType,
-       &HomeRoleListTokens,
-       &HomeRoleListPref,
-       lboHomeRoles,
-       (intValueSeek));
+                               &HomeRoleListLanguage,
+                               &HomeRoleListAltID,
+                               &HomeRoleListPID,
+                               &HomeRoleListType,
+                               &HomeRoleListTokens,
+                               &HomeRoleListPref,
+                               lboHomeRoles,
+                               (intValueSeek));
     frameCERole->ShowModal();
     delete frameCERole;
     frameCERole = NULL;
@@ -1824,22 +1824,22 @@ void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeRoles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeRoles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
     frameCERole->SetupPointers(&HomeRoleList,
-       &HomeRoleListLanguage,
-       &HomeRoleListAltID,
-       &HomeRoleListPID,
-       &HomeRoleListType,
-       &HomeRoleListTokens,    
-       &HomeRoleListPref,
-       lboHomeRoles,
-       intSelectedData);
+                               &HomeRoleListLanguage,
+                               &HomeRoleListAltID,
+                               &HomeRoleListPID,
+                               &HomeRoleListType,
+                               &HomeRoleListTokens,
+                               &HomeRoleListPref,
+                               lboHomeRoles,
+                               intSelectedData);
     frameCERole->SetEditorMode(TRUE, CE_HOME);
     frameCERole->ShowModal();
     delete frameCERole;
@@ -1851,38 +1851,38 @@ void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeRoles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeRoles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeRoles->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeRoleList,
-    &HomeRoleListLanguage, &HomeRoleListAltID,
-    &HomeRoleListPID, &HomeRoleListType,
-    &HomeRoleListTokens, &HomeRoleListPref);
+                  &HomeRoleListLanguage, &HomeRoleListAltID,
+                  &HomeRoleListPID, &HomeRoleListType,
+                  &HomeRoleListTokens, &HomeRoleListPref);
     
 }
 
 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
     frameCEOrg->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeOrganisationsList);
     frameCEOrg->SetupPointers(&HomeOrganisationsList,
-       &HomeOrganisationsListLanguage,
-       &HomeOrganisationsListSortAs,   
-       &HomeOrganisationsListAltID,
-       &HomeOrganisationsListPID,
-       &HomeOrganisationsListType,
-       &HomeOrganisationsListTokens,
-       &HomeOrganisationsListPref,
-       lboHomeOrganisations,
-       (intValueSeek));
+                              &HomeOrganisationsListLanguage,
+                              &HomeOrganisationsListSortAs,
+                              &HomeOrganisationsListAltID,
+                              &HomeOrganisationsListPID,
+                              &HomeOrganisationsListType,
+                              &HomeOrganisationsListTokens,
+                              &HomeOrganisationsListPref,
+                              lboHomeOrganisations,
+                              (intValueSeek));
     frameCEOrg->ShowModal();
     delete frameCEOrg;
     frameCEOrg = NULL;
@@ -1893,23 +1893,23 @@ void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeOrganisations, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeOrganisations,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
     frameCEOrg->SetupPointers(&HomeOrganisationsList,
-       &HomeOrganisationsListLanguage,
-       &HomeOrganisationsListSortAs,   
-       &HomeOrganisationsListAltID,
-       &HomeOrganisationsListPID,
-       &HomeOrganisationsListType,
-       &HomeOrganisationsListTokens,   
-       &HomeOrganisationsListPref,
-       lboHomeOrganisations,
-       intSelectedData);
+                              &HomeOrganisationsListLanguage,
+                              &HomeOrganisationsListSortAs,
+                              &HomeOrganisationsListAltID,
+                              &HomeOrganisationsListPID,
+                              &HomeOrganisationsListType,
+                              &HomeOrganisationsListTokens,
+                              &HomeOrganisationsListPref,
+                              lboHomeOrganisations,
+                              intSelectedData);
     frameCEOrg->SetEditorMode(TRUE, CE_HOME);
     frameCEOrg->ShowModal();
     delete frameCEOrg;
@@ -1921,38 +1921,38 @@ void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeOrganisations, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeOrganisations,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboHomeOrganisations->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeOrganisationsList,
-    &HomeOrganisationsListLanguage, &HomeOrganisationsListSortAs,
-    &HomeOrganisationsListAltID, &HomeOrganisationsListPID,
-    &HomeOrganisationsListType, &HomeOrganisationsListTokens,
-    &HomeOrganisationsListPref);
+                  &HomeOrganisationsListLanguage, &HomeOrganisationsListSortAs,
+                  &HomeOrganisationsListAltID, &HomeOrganisationsListPID,
+                  &HomeOrganisationsListType, &HomeOrganisationsListTokens,
+                  &HomeOrganisationsListPref);
     
 }
 
 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
     frameCENote->SetEditorMode(FALSE, CE_HOME);
     intResult = GetLastInt(&HomeNoteList);
     frameCENote->SetupPointers(&HomeNoteList,
-       &HomeNoteListLanguage,
-       &HomeNoteListAltID,
-       &HomeNoteListPID,
-       &HomeNoteListType,
-       &HomeNoteListTokens,
-       &HomeNoteListPref,
-       lboHomeNotes,
-       (intValueSeek));
+                               &HomeNoteListLanguage,
+                               &HomeNoteListAltID,
+                               &HomeNoteListPID,
+                               &HomeNoteListType,
+                               &HomeNoteListTokens,
+                               &HomeNoteListPref,
+                               lboHomeNotes,
+                               (intValueSeek));
     frameCENote->ShowModal();
     delete frameCENote;
     frameCENote = NULL;
@@ -1963,22 +1963,22 @@ void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeNotes, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeNotes,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
     frameCENote->SetupPointers(&HomeNoteList,
-       &HomeNoteListLanguage,
-       &HomeNoteListAltID,
-       &HomeNoteListPID,
-       &HomeNoteListType,
-       &HomeNoteListTokens,    
-       &HomeNoteListPref,
-       lboHomeNotes,
-       intSelectedData);
+                               &HomeNoteListLanguage,
+                               &HomeNoteListAltID,
+                               &HomeNoteListPID,
+                               &HomeNoteListType,
+                               &HomeNoteListTokens,
+                               &HomeNoteListPref,
+                               lboHomeNotes,
+                               intSelectedData);
     frameCENote->SetEditorMode(TRUE, CE_HOME);
     frameCENote->ShowModal();
     delete frameCENote;
@@ -1990,38 +1990,38 @@ void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboHomeNotes, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboHomeNotes,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboNotes->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &HomeNoteList,
-    &HomeNoteListLanguage, &HomeNoteListAltID,
-    &HomeNoteListPID, &HomeNoteListType,
-    &HomeNoteListTokens, &HomeNoteListPref);
+                  &HomeNoteListLanguage, &HomeNoteListAltID,
+                  &HomeNoteListPID, &HomeNoteListType,
+                  &HomeNoteListTokens, &HomeNoteListPref);
     
 }
 
 void frmContactEditor::AddBusinessNickname( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
     frameCENickname->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessNicknamesList);
-    frameCENickname->SetupPointers(&BusinessNicknamesList,     
-       &BusinessNicknamesListAltID,
-       &BusinessNicknamesListPID,
-       &BusinessNicknamesListType,
-       &BusinessNicknamesListLanguage, 
-       &BusinessNicknamesListTokens,
-       &BusinessNicknamesListPref,
-       lboBusinessNicknames,
-       (intValueSeek));
-    frameCENickname->ShowModal(); 
+    frameCENickname->SetupPointers(&BusinessNicknamesList,
+                                   &BusinessNicknamesListAltID,
+                                   &BusinessNicknamesListPID,
+                                   &BusinessNicknamesListType,
+                                   &BusinessNicknamesListLanguage,
+                                   &BusinessNicknamesListTokens,
+                                   &BusinessNicknamesListPref,
+                                   lboBusinessNicknames,
+                                   (intValueSeek));
+    frameCENickname->ShowModal();
     delete frameCENickname;
     frameCENickname = NULL;
 }
@@ -2031,22 +2031,22 @@ void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessNicknames, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessNicknames,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
-    frameCENickname->SetupPointers(&BusinessNicknamesList,     
-       &BusinessNicknamesListAltID,
-       &BusinessNicknamesListPID,
-       &BusinessNicknamesListType,
-       &BusinessNicknamesListLanguage, 
-       &BusinessNicknamesListTokens,
-       &BusinessNicknamesListPref,
-       lboBusinessNicknames,
-       intSelectedData);    
+    frameCENickname->SetupPointers(&BusinessNicknamesList,
+                                   &BusinessNicknamesListAltID,
+                                   &BusinessNicknamesListPID,
+                                   &BusinessNicknamesListType,
+                                   &BusinessNicknamesListLanguage,
+                                   &BusinessNicknamesListTokens,
+                                   &BusinessNicknamesListPref,
+                                   lboBusinessNicknames,
+                                   intSelectedData);
     frameCENickname->SetEditorMode(TRUE, CE_WORK);
     frameCENickname->ShowModal();
     delete frameCENickname;
@@ -2058,49 +2058,49 @@ void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessNicknames, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessNicknames,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessNicknames->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData,
-    &BusinessNicknamesList,
-    &BusinessNicknamesListLanguage,
-    &BusinessNicknamesListAltID,
-    &BusinessNicknamesListPID,
-    &BusinessNicknamesListTokens,
-    &BusinessNicknamesListType,
-    &BusinessNicknamesListPref);
+                  &BusinessNicknamesList,
+                  &BusinessNicknamesListLanguage,
+                  &BusinessNicknamesListAltID,
+                  &BusinessNicknamesListPID,
+                  &BusinessNicknamesListTokens,
+                  &BusinessNicknamesListType,
+                  &BusinessNicknamesListPref);
 }
 
 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
     frameCEAddress->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessAddressList);
     frameCEAddress->SetupPointers(&BusinessAddressList,
-       &BusinessAddressListTown,
-       &BusinessAddressListCounty,
-       &BusinessAddressListPostCode,
-       &BusinessAddressListCountry,
-       &BusinessAddressListLabel,
-       &BusinessAddressListLang,       
-       &BusinessAddressListAltID,
-       &BusinessAddressListPID,
-       &BusinessAddressListTokens,
-       &BusinessAddressListGeo,
-       &BusinessAddressListTimezone,
-       &BusinessAddressListType,
-       &BusinessAddressListMediatype,
-       &BusinessAddressListPref,
-       lboBusinessAddresses,
-       (intValueSeek));
-    frameCEAddress->ShowModal(); 
+                                  &BusinessAddressListTown,
+                                  &BusinessAddressListCounty,
+                                  &BusinessAddressListPostCode,
+                                  &BusinessAddressListCountry,
+                                  &BusinessAddressListLabel,
+                                  &BusinessAddressListLang,
+                                  &BusinessAddressListAltID,
+                                  &BusinessAddressListPID,
+                                  &BusinessAddressListTokens,
+                                  &BusinessAddressListGeo,
+                                  &BusinessAddressListTimezone,
+                                  &BusinessAddressListType,
+                                  &BusinessAddressListMediatype,
+                                  &BusinessAddressListPref,
+                                  lboBusinessAddresses,
+                                  (intValueSeek));
+    frameCEAddress->ShowModal();
     delete frameCEAddress;
     frameCEAddress = NULL;
 }
@@ -2110,30 +2110,30 @@ void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessAddresses, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessAddresses,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
     frameCEAddress->SetupPointers(&BusinessAddressList,
-       &BusinessAddressListTown,
-       &BusinessAddressListCounty,
-       &BusinessAddressListPostCode,
-       &BusinessAddressListCountry,
-       &BusinessAddressListLabel,
-       &BusinessAddressListLang,       
-       &BusinessAddressListAltID,
-       &BusinessAddressListPID,
-       &BusinessAddressListTokens,
-       &BusinessAddressListGeo,
-       &BusinessAddressListTimezone,
-       &BusinessAddressListType,
-       &BusinessAddressListMediatype,
-       &BusinessAddressListPref,
-       lboBusinessAddresses,
-       intSelectedData);    
+                                  &BusinessAddressListTown,
+                                  &BusinessAddressListCounty,
+                                  &BusinessAddressListPostCode,
+                                  &BusinessAddressListCountry,
+                                  &BusinessAddressListLabel,
+                                  &BusinessAddressListLang,
+                                  &BusinessAddressListAltID,
+                                  &BusinessAddressListPID,
+                                  &BusinessAddressListTokens,
+                                  &BusinessAddressListGeo,
+                                  &BusinessAddressListTimezone,
+                                  &BusinessAddressListType,
+                                  &BusinessAddressListMediatype,
+                                  &BusinessAddressListPref,
+                                  lboBusinessAddresses,
+                                  intSelectedData);
     frameCEAddress->SetEditorMode(TRUE, CE_WORK);
     frameCEAddress->ShowModal();
     delete frameCEAddress;
@@ -2145,41 +2145,41 @@ void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessAddresses, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessAddresses,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessAddresses->DeleteItem(longSelected);
     DeleteMapData(intSelectedData, &BusinessAddressList,
-    &BusinessAddressListTown, &BusinessAddressListCounty,
-    &BusinessAddressListPostCode, &BusinessAddressListCountry,
-    &BusinessAddressList, &BusinessAddressListLabel,
-    &BusinessAddressListLang, &BusinessAddressListAltID,
-    &BusinessAddressListPID, &BusinessAddressListTokens,
-    &BusinessAddressListGeo, &BusinessAddressListTimezone,
-    &BusinessAddressListType, &BusinessAddressListMediatype,
-    &BusinessAddressListPref);
+                  &BusinessAddressListTown, &BusinessAddressListCounty,
+                  &BusinessAddressListPostCode, &BusinessAddressListCountry,
+                  &BusinessAddressList, &BusinessAddressListLabel,
+                  &BusinessAddressListLang, &BusinessAddressListAltID,
+                  &BusinessAddressListPID, &BusinessAddressListTokens,
+                  &BusinessAddressListGeo, &BusinessAddressListTimezone,
+                  &BusinessAddressListType, &BusinessAddressListMediatype,
+                  &BusinessAddressListPref);
     
 }
 
 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
     frameCEEmail->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessAddressList);
     frameCEEmail->SetupPointers(&BusinessEmailList,
-       &BusinessEmailListAltID,
-       &BusinessEmailListPID,
-       &BusinessEmailListType,
-       &BusinessEmailListTokens,
-       &BusinessEmailListPref,
-       lboBusinessEmail,
-       (intValueSeek));
-    frameCEEmail->ShowModal(); 
+                                &BusinessEmailListAltID,
+                                &BusinessEmailListPID,
+                                &BusinessEmailListType,
+                                &BusinessEmailListTokens,
+                                &BusinessEmailListPref,
+                                lboBusinessEmail,
+                                (intValueSeek));
+    frameCEEmail->ShowModal();
     delete frameCEEmail;
     frameCEEmail = NULL;
 }
@@ -2189,21 +2189,21 @@ void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessEmail, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessEmail,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
     frameCEEmail->SetupPointers(&BusinessEmailList,
-       &BusinessEmailListAltID,
-       &BusinessEmailListPID,
-       &BusinessEmailListType,
-       &BusinessEmailListTokens,
-       &BusinessEmailListPref,
-       lboBusinessEmail,
-       intSelectedData);    
+                                &BusinessEmailListAltID,
+                                &BusinessEmailListPID,
+                                &BusinessEmailListType,
+                                &BusinessEmailListTokens,
+                                &BusinessEmailListPref,
+                                lboBusinessEmail,
+                                intSelectedData);
     frameCEEmail->SetEditorMode(TRUE, CE_WORK);
     frameCEEmail->ShowModal();
     delete frameCEEmail;
@@ -2215,38 +2215,38 @@ void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessEmail, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessEmail,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessEmail->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &BusinessEmailList,
-    &BusinessEmailListAltID, &BusinessEmailListPID,
-    &BusinessEmailListType, &BusinessEmailListTokens,
-    &BusinessEmailListPref);
+                  &BusinessEmailListAltID, &BusinessEmailListPID,
+                  &BusinessEmailListType, &BusinessEmailListTokens,
+                  &BusinessEmailListPref);
     
 }
 
 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
     frameCEIM->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessIMList);
     frameCEIM->SetupPointers(&BusinessIMList,
-       &BusinessIMListAltID,
-       &BusinessIMListPID,
-       &BusinessIMListType,
-       &BusinessIMListTokens,
-       &BusinessIMListMediatype,       
-       &BusinessIMListPref,
-       lboBusinessIM,
-       (intValueSeek));
-    frameCEIM->ShowModal(); 
+                             &BusinessIMListAltID,
+                             &BusinessIMListPID,
+                             &BusinessIMListType,
+                             &BusinessIMListTokens,
+                             &BusinessIMListMediatype,
+                             &BusinessIMListPref,
+                             lboBusinessIM,
+                             (intValueSeek));
+    frameCEIM->ShowModal();
     delete frameCEIM;
     frameCEIM = NULL;
 }
@@ -2256,22 +2256,22 @@ void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessIM, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessIM,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
     frameCEIM->SetupPointers(&BusinessIMList,
-       &BusinessIMListAltID,
-       &BusinessIMListPID,
-       &BusinessIMListType,
-       &BusinessIMListTokens,
-       &BusinessIMListMediatype,
-       &BusinessIMListPref,
-       lboBusinessIM,
-       intSelectedData);    
+                             &BusinessIMListAltID,
+                             &BusinessIMListPID,
+                             &BusinessIMListType,
+                             &BusinessIMListTokens,
+                             &BusinessIMListMediatype,
+                             &BusinessIMListPref,
+                             lboBusinessIM,
+                             intSelectedData);
     frameCEIM->SetEditorMode(TRUE, CE_WORK);
     frameCEIM->ShowModal();
     delete frameCEIM;
@@ -2283,37 +2283,37 @@ void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessIM, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessIM,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessIM->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &BusinessIMList,
-    &BusinessIMListAltID, &BusinessIMListPID,
-    &BusinessIMListType, &BusinessIMListTokens,
-    &BusinessIMListMediatype, &BusinessIMListPref);
+                  &BusinessIMListAltID, &BusinessIMListPID,
+                  &BusinessIMListType, &BusinessIMListTokens,
+                  &BusinessIMListMediatype, &BusinessIMListPref);
     
 }
 
 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
     frameCETel->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessTelephoneList);
     frameCETel->SetupPointers(&BusinessTelephoneList,
-       &BusinessTelephoneListAltID,
-       &BusinessTelephoneListPID,
-       &BusinessTelephoneListType,
-       &BusinessTelephoneListTokens,
-       &BusinessTelephoneListPref,
-       lboBusinessTelephone,
-       (intValueSeek));
-    frameCETel->ShowModal(); 
+                              &BusinessTelephoneListAltID,
+                              &BusinessTelephoneListPID,
+                              &BusinessTelephoneListType,
+                              &BusinessTelephoneListTokens,
+                              &BusinessTelephoneListPref,
+                              lboBusinessTelephone,
+                              (intValueSeek));
+    frameCETel->ShowModal();
     delete frameCETel;
     frameCETel = NULL;
 }
@@ -2323,21 +2323,21 @@ void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessTelephone, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessTelephone,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
     frameCETel->SetupPointers(&BusinessTelephoneList,
-       &BusinessTelephoneListAltID,
-       &BusinessTelephoneListPID,
-       &BusinessTelephoneListType,
-       &BusinessTelephoneListTokens,
-       &BusinessTelephoneListPref,
-       lboBusinessTelephone,
-       intSelectedData);    
+                              &BusinessTelephoneListAltID,
+                              &BusinessTelephoneListPID,
+                              &BusinessTelephoneListType,
+                              &BusinessTelephoneListTokens,
+                              &BusinessTelephoneListPref,
+                              lboBusinessTelephone,
+                              intSelectedData);
     frameCETel->SetEditorMode(TRUE, CE_WORK);
     frameCETel->ShowModal();
     delete frameCETel;
@@ -2349,37 +2349,37 @@ void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessTelephone, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessTelephone,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessTelephone->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &BusinessTelephoneList,
-    &BusinessTelephoneListAltID, &BusinessTelephoneListPID,
-    &BusinessTelephoneListType, &BusinessTelephoneListTokens,
-    &BusinessTelephoneListPref);
+                  &BusinessTelephoneListAltID, &BusinessTelephoneListPID,
+                  &BusinessTelephoneListType, &BusinessTelephoneListTokens,
+                  &BusinessTelephoneListPref);
     
 }
 
 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
     frameCELang->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessLanguageList);
     frameCELang->SetupPointers(&BusinessLanguageList,
-       &BusinessLanguageListAltID,
-       &BusinessLanguageListPID,
-       &BusinessLanguageListType,
-       &BusinessLanguageListTokens,
-       &BusinessLanguageListPref,
-       lboBusinessLanguages,
-       (intValueSeek));
-    frameCELang->ShowModal(); 
+                               &BusinessLanguageListAltID,
+                               &BusinessLanguageListPID,
+                               &BusinessLanguageListType,
+                               &BusinessLanguageListTokens,
+                               &BusinessLanguageListPref,
+                               lboBusinessLanguages,
+                               (intValueSeek));
+    frameCELang->ShowModal();
     delete frameCELang;
     frameCELang = NULL;
 }
@@ -2389,21 +2389,21 @@ void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessLanguages, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessLanguages,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
     frameCELang->SetupPointers(&BusinessLanguageList,
-       &BusinessLanguageListAltID,
-       &BusinessLanguageListPID,
-       &BusinessLanguageListType,
-       &BusinessLanguageListTokens,    
-       &BusinessLanguageListPref,
-       lboBusinessLanguages,
-       intSelectedData);    
+                               &BusinessLanguageListAltID,
+                               &BusinessLanguageListPID,
+                               &BusinessLanguageListType,
+                               &BusinessLanguageListTokens,
+                               &BusinessLanguageListPref,
+                               lboBusinessLanguages,
+                               intSelectedData);
     frameCELang->SetEditorMode(TRUE, CE_WORK);
     frameCELang->ShowModal();
     delete frameCELang;
@@ -2415,38 +2415,38 @@ void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessLanguages, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessLanguages,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessLanguages->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &BusinessLanguageList,
-    &BusinessLanguageListAltID, &BusinessLanguageListPID,
-    &BusinessLanguageListType, &BusinessLanguageListTokens,
-    &BusinessLanguageListPref);
+                  &BusinessLanguageListAltID, &BusinessLanguageListPID,
+                  &BusinessLanguageListType, &BusinessLanguageListTokens,
+                  &BusinessLanguageListPref);
     
 }
 
 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
     frameCETZ->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessTZList);
     frameCETZ->SetupPointers(&BusinessTZList,
-       &BusinessTZListAltID,
-       &BusinessTZListPID,
-       &BusinessTZListType,
-       &BusinessTZListTokens,
-       &BusinessTZListMediatype,       
-       &BusinessTZListPref,
-       lboBusinessTimezones,
-       (intValueSeek));
-    frameCETZ->ShowModal(); 
+                             &BusinessTZListAltID,
+                             &BusinessTZListPID,
+                             &BusinessTZListType,
+                             &BusinessTZListTokens,
+                             &BusinessTZListMediatype,
+                             &BusinessTZListPref,
+                             lboBusinessTimezones,
+                             (intValueSeek));
+    frameCETZ->ShowModal();
     delete frameCETZ;
     frameCETZ = NULL;
 }
@@ -2456,22 +2456,22 @@ void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessTimezones, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessTimezones,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
     frameCETZ->SetupPointers(&BusinessTZList,
-       &BusinessTZListAltID,
-       &BusinessTZListPID,
-       &BusinessTZListType,
-       &BusinessTZListTokens,
-       &BusinessTZListMediatype,       
-       &BusinessTZListPref,
-       lboBusinessTimezones,
-       intSelectedData);
+                             &BusinessTZListAltID,
+                             &BusinessTZListPID,
+                             &BusinessTZListType,
+                             &BusinessTZListTokens,
+                             &BusinessTZListMediatype,
+                             &BusinessTZListPref,
+                             lboBusinessTimezones,
+                             intSelectedData);
     frameCETZ->SetEditorMode(TRUE, CE_WORK);
     frameCETZ->ShowModal();
     delete frameCETZ;
@@ -2483,38 +2483,38 @@ void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessTimezones, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessTimezones,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessTimezones->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &BusinessTZList,
-    &BusinessTZListAltID, &BusinessTZListPID,
-    &BusinessTZListType, &BusinessTZListTokens,
-    &BusinessTZListMediatype, &BusinessTZListPref);
+                  &BusinessTZListAltID, &BusinessTZListPID,
+                  &BusinessTZListType, &BusinessTZListTokens,
+                  &BusinessTZListMediatype, &BusinessTZListPref);
     
 }
 
 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
     frameCEGeo->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessGeographyList);
     frameCEGeo->SetupPointers(&BusinessGeographyList,
-       &BusinessGeographyListAltID,
-       &BusinessGeographyListPID,
-       &BusinessGeographyListType,
-       &BusinessGeographyListTokens,
-       &BusinessGeographyListMediatype,        
-       &BusinessGeographyListPref,
-       lboBusinessGeoposition,
-       (intValueSeek));
-    frameCEGeo->ShowModal(); 
+                              &BusinessGeographyListAltID,
+                              &BusinessGeographyListPID,
+                              &BusinessGeographyListType,
+                              &BusinessGeographyListTokens,
+                              &BusinessGeographyListMediatype,
+                              &BusinessGeographyListPref,
+                              lboBusinessGeoposition,
+                              (intValueSeek));
+    frameCEGeo->ShowModal();
     delete frameCEGeo;
     frameCEGeo = NULL;
 }
@@ -2524,22 +2524,22 @@ void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessGeoposition, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessGeoposition,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
     frameCEGeo->SetupPointers(&BusinessGeographyList,
-       &BusinessGeographyListAltID,
-       &BusinessGeographyListPID,
-       &BusinessGeographyListType,
-       &BusinessGeographyListTokens,
-       &BusinessGeographyListMediatype,        
-       &BusinessGeographyListPref,
-       lboBusinessGeoposition,
-       intSelectedData);
+                              &BusinessGeographyListAltID,
+                              &BusinessGeographyListPID,
+                              &BusinessGeographyListType,
+                              &BusinessGeographyListTokens,
+                              &BusinessGeographyListMediatype,
+                              &BusinessGeographyListPref,
+                              lboBusinessGeoposition,
+                              intSelectedData);
     frameCEGeo->SetEditorMode(TRUE, CE_WORK);
     frameCEGeo->ShowModal();
     delete frameCEGeo;
@@ -2551,37 +2551,37 @@ void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessGeoposition, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessGeoposition,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessGeoposition->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &BusinessGeographyList,
-    &BusinessGeographyListAltID, &BusinessGeographyListPID,
-    &BusinessGeographyListType, &BusinessGeographyListTokens,
-    &BusinessGeographyListMediatype, &BusinessGeographyListPref);
+                  &BusinessGeographyListAltID, &BusinessGeographyListPID,
+                  &BusinessGeographyListType, &BusinessGeographyListTokens,
+                  &BusinessGeographyListMediatype, &BusinessGeographyListPref);
     
 }
 
 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
     frameCEWeb->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessWebsiteList);
     frameCEWeb->SetupPointers(&BusinessWebsiteList,
-       &BusinessWebsiteListAltID,
-       &BusinessWebsiteListPID,
-       &BusinessWebsiteListType,
-       &BusinessWebsiteListTokens,
-       &BusinessWebsiteListMediatype,
-       &BusinessWebsiteListPref,
-       lboBusinessWebsites,
-       (intValueSeek));
+                              &BusinessWebsiteListAltID,
+                              &BusinessWebsiteListPID,
+                              &BusinessWebsiteListType,
+                              &BusinessWebsiteListTokens,
+                              &BusinessWebsiteListMediatype,
+                              &BusinessWebsiteListPref,
+                              lboBusinessWebsites,
+                              (intValueSeek));
     frameCEWeb->ShowModal();
     delete frameCEWeb;
     frameCEWeb = NULL;
@@ -2592,22 +2592,22 @@ void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessWebsites, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessWebsites,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
     frameCEWeb->SetupPointers(&BusinessWebsiteList,
-       &BusinessWebsiteListAltID,
-       &BusinessWebsiteListPID,
-       &BusinessWebsiteListType,
-       &BusinessWebsiteListTokens,
-       &BusinessWebsiteListMediatype,  
-       &BusinessWebsiteListPref,
-       lboBusinessWebsites,
-       intSelectedData);
+                              &BusinessWebsiteListAltID,
+                              &BusinessWebsiteListPID,
+                              &BusinessWebsiteListType,
+                              &BusinessWebsiteListTokens,
+                              &BusinessWebsiteListMediatype,
+                              &BusinessWebsiteListPref,
+                              lboBusinessWebsites,
+                              intSelectedData);
     frameCEWeb->SetEditorMode(TRUE, CE_WORK);
     frameCEWeb->ShowModal();
     delete frameCEWeb;
@@ -2619,37 +2619,37 @@ void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessWebsites, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessWebsites,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessWebsites->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &BusinessWebsiteList,
-    &BusinessWebsiteListAltID, &BusinessWebsiteListPID,
-    &BusinessWebsiteListType, &BusinessWebsiteListTokens,
-    &BusinessWebsiteListMediatype, &BusinessWebsiteListPref);
+                  &BusinessWebsiteListAltID, &BusinessWebsiteListPID,
+                  &BusinessWebsiteListType, &BusinessWebsiteListTokens,
+                  &BusinessWebsiteListMediatype, &BusinessWebsiteListPref);
     
 }
 
 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
     frameCETitle->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessTitleList);
     frameCETitle->SetupPointers(&BusinessTitleList,
-       &BusinessTitleListLanguage,    
-       &BusinessTitleListAltID,
-       &BusinessTitleListPID,
-       &BusinessTitleListType,
-       &BusinessTitleListTokens,
-       &BusinessTitleListPref,
-       lboBusinessTitles,
-       (intValueSeek));
+                                &BusinessTitleListLanguage,
+                                &BusinessTitleListAltID,
+                                &BusinessTitleListPID,
+                                &BusinessTitleListType,
+                                &BusinessTitleListTokens,
+                                &BusinessTitleListPref,
+                                lboBusinessTitles,
+                                (intValueSeek));
     frameCETitle->ShowModal();
     delete frameCETitle;
     frameCETitle = NULL;
@@ -2660,22 +2660,22 @@ void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessTitles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessTitles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
     frameCETitle->SetupPointers(&BusinessTitleList,
-       &BusinessTitleListLanguage,
-       &BusinessTitleListAltID,
-       &BusinessTitleListPID,
-       &BusinessTitleListType,
-       &BusinessTitleListTokens,       
-       &BusinessTitleListPref,
-       lboBusinessTitles,
-       intSelectedData);
+                                &BusinessTitleListLanguage,
+                                &BusinessTitleListAltID,
+                                &BusinessTitleListPID,
+                                &BusinessTitleListType,
+                                &BusinessTitleListTokens,
+                                &BusinessTitleListPref,
+                                lboBusinessTitles,
+                                intSelectedData);
     frameCETitle->SetEditorMode(TRUE, CE_WORK);
     frameCETitle->ShowModal();
     delete frameCETitle;
@@ -2687,37 +2687,37 @@ void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessTitles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessTitles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboTitles->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &BusinessTitleList,
-    &BusinessTitleListLanguage, &BusinessTitleListAltID,
-    &BusinessTitleListPID, &BusinessTitleListType,
-    &BusinessTitleListTokens, &BusinessTitleListPref);
+                  &BusinessTitleListLanguage, &BusinessTitleListAltID,
+                  &BusinessTitleListPID, &BusinessTitleListType,
+                  &BusinessTitleListTokens, &BusinessTitleListPref);
     
 }
 
 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
     frameCERole->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessRoleList);
     frameCERole->SetupPointers(&BusinessRoleList,
-       &BusinessRoleListLanguage,
-       &BusinessRoleListAltID,
-       &BusinessRoleListPID,
-       &BusinessRoleListType,
-       &BusinessRoleListTokens,
-       &BusinessRoleListPref,
-       lboBusinessRoles,
-       (intValueSeek));
+                               &BusinessRoleListLanguage,
+                               &BusinessRoleListAltID,
+                               &BusinessRoleListPID,
+                               &BusinessRoleListType,
+                               &BusinessRoleListTokens,
+                               &BusinessRoleListPref,
+                               lboBusinessRoles,
+                               (intValueSeek));
     frameCERole->ShowModal();
     delete frameCERole;
     frameCERole = NULL;
@@ -2728,22 +2728,22 @@ void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessRoles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessRoles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
     frameCERole->SetupPointers(&BusinessRoleList,
-       &BusinessRoleListLanguage,
-       &BusinessRoleListAltID,
-       &BusinessRoleListPID,
-       &BusinessRoleListType,
-       &BusinessRoleListTokens,        
-       &BusinessRoleListPref,
-       lboBusinessRoles,
-       intSelectedData);
+                               &BusinessRoleListLanguage,
+                               &BusinessRoleListAltID,
+                               &BusinessRoleListPID,
+                               &BusinessRoleListType,
+                               &BusinessRoleListTokens,
+                               &BusinessRoleListPref,
+                               lboBusinessRoles,
+                               intSelectedData);
     frameCERole->SetEditorMode(TRUE, CE_WORK);
     frameCERole->ShowModal();
     delete frameCERole;
@@ -2755,38 +2755,38 @@ void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessRoles, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessRoles,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessRoles->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &BusinessRoleList,
-    &BusinessRoleListLanguage, &BusinessRoleListAltID,
-    &BusinessRoleListPID, &BusinessRoleListType,
-    &BusinessRoleListTokens, &BusinessRoleListPref);
+                  &BusinessRoleListLanguage, &BusinessRoleListAltID,
+                  &BusinessRoleListPID, &BusinessRoleListType,
+                  &BusinessRoleListTokens, &BusinessRoleListPref);
     
 }
 
 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
     frameCEOrg->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&GeneralOrganisationsList);
     frameCEOrg->SetupPointers(&GeneralOrganisationsList,
-       &BusinessOrganisationsListLanguage,
-       &BusinessOrganisationsListSortAs,       
-       &BusinessOrganisationsListAltID,
-       &BusinessOrganisationsListPID,
-       &BusinessOrganisationsListType,
-       &BusinessOrganisationsListTokens,
-       &BusinessOrganisationsListPref,
-       lboBusinessOrganisations,
-       (intValueSeek));
+                              &BusinessOrganisationsListLanguage,
+                              &BusinessOrganisationsListSortAs,
+                              &BusinessOrganisationsListAltID,
+                              &BusinessOrganisationsListPID,
+                              &BusinessOrganisationsListType,
+                              &BusinessOrganisationsListTokens,
+                              &BusinessOrganisationsListPref,
+                              lboBusinessOrganisations,
+                              (intValueSeek));
     frameCEOrg->ShowModal();
     delete frameCEOrg;
     frameCEOrg = NULL;
@@ -2797,23 +2797,23 @@ void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessOrganisations, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessOrganisations,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
     frameCEOrg->SetupPointers(&BusinessOrganisationsList,
-       &BusinessOrganisationsListLanguage,
-       &BusinessOrganisationsListSortAs,       
-       &BusinessOrganisationsListAltID,
-       &BusinessOrganisationsListPID,
-       &BusinessOrganisationsListType,
-       &BusinessOrganisationsListTokens,       
-       &BusinessOrganisationsListPref,
-       lboBusinessOrganisations,
-       intSelectedData);
+                              &BusinessOrganisationsListLanguage,
+                              &BusinessOrganisationsListSortAs,
+                              &BusinessOrganisationsListAltID,
+                              &BusinessOrganisationsListPID,
+                              &BusinessOrganisationsListType,
+                              &BusinessOrganisationsListTokens,
+                              &BusinessOrganisationsListPref,
+                              lboBusinessOrganisations,
+                              intSelectedData);
     frameCEOrg->SetEditorMode(TRUE, CE_WORK);
     frameCEOrg->ShowModal();
     delete frameCEOrg;
@@ -2825,38 +2825,38 @@ void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessOrganisations, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessOrganisations,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessOrganisations->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &BusinessOrganisationsList,
-    &BusinessOrganisationsListLanguage, &BusinessOrganisationsListSortAs,
-    &BusinessOrganisationsListAltID, &BusinessOrganisationsListPID,
-    &BusinessOrganisationsListType, &BusinessOrganisationsListTokens,
-    &BusinessOrganisationsListPref);
+                  &BusinessOrganisationsListLanguage, &BusinessOrganisationsListSortAs,
+                  &BusinessOrganisationsListAltID, &BusinessOrganisationsListPID,
+                  &BusinessOrganisationsListType, &BusinessOrganisationsListTokens,
+                  &BusinessOrganisationsListPref);
     
 }
 
 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
     frameCENote->SetEditorMode(FALSE, CE_WORK);
     intResult = GetLastInt(&BusinessNoteList);
     frameCENote->SetupPointers(&BusinessNoteList,
-       &BusinessNoteListLanguage,
-       &BusinessNoteListAltID,
-       &BusinessNoteListPID,
-       &BusinessNoteListType,
-       &BusinessNoteListTokens,
-       &BusinessNoteListPref,
-       lboBusinessNotes,
-       (intValueSeek));
+                               &BusinessNoteListLanguage,
+                               &BusinessNoteListAltID,
+                               &BusinessNoteListPID,
+                               &BusinessNoteListType,
+                               &BusinessNoteListTokens,
+                               &BusinessNoteListPref,
+                               lboBusinessNotes,
+                               (intValueSeek));
     frameCENote->ShowModal();
     delete frameCENote;
     frameCENote = NULL;
@@ -2867,22 +2867,22 @@ void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessNotes, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessNotes,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
     frameCENote->SetupPointers(&BusinessNoteList,
-       &BusinessNoteListLanguage,
-       &BusinessNoteListAltID,
-       &BusinessNoteListPID,
-       &BusinessNoteListType,
-       &BusinessNoteListTokens,        
-       &BusinessNoteListPref,
-       lboBusinessNotes,
-       intSelectedData);
+                               &BusinessNoteListLanguage,
+                               &BusinessNoteListAltID,
+                               &BusinessNoteListPID,
+                               &BusinessNoteListType,
+                               &BusinessNoteListTokens,
+                               &BusinessNoteListPref,
+                               lboBusinessNotes,
+                               intSelectedData);
     frameCENote->SetEditorMode(TRUE, CE_WORK);
     frameCENote->ShowModal();
     delete frameCENote;
@@ -2894,36 +2894,36 @@ void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboBusinessNotes, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboBusinessNotes,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboBusinessNotes->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &BusinessNoteList,
-    &BusinessNoteListLanguage, &BusinessNoteListAltID,
-    &BusinessNoteListPID, &BusinessNoteListType,
-    &BusinessNoteListTokens, &BusinessNoteListPref);
+                  &BusinessNoteListLanguage, &BusinessNoteListAltID,
+                  &BusinessNoteListPID, &BusinessNoteListType,
+                  &BusinessNoteListTokens, &BusinessNoteListPref);
     
 }
 
 void frmContactEditor::AddCategory( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorCategory *frameCECategory = new frmContactEditorCategory ( this );
     frameCECategory->SetEditorMode(FALSE);
     intResult = GetLastInt(&CategoriesList);
     frameCECategory->SetupPointers(&CategoriesList,
-       &CategoriesListAltID,
-       &CategoriesListPID,
-       &CategoriesListType,
-       &CategoriesListTokens,
-       &CategoriesListPref,
-       lboCategories,
-       (intValueSeek));
+                                   &CategoriesListAltID,
+                                   &CategoriesListPID,
+                                   &CategoriesListType,
+                                   &CategoriesListTokens,
+                                   &CategoriesListPref,
+                                   lboCategories,
+                                   (intValueSeek));
     frameCECategory->ShowModal();
     delete frameCECategory;
     frameCECategory = NULL;
@@ -2934,21 +2934,21 @@ void frmContactEditor::ModifyCategory( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboCategories, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboCategories,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorCategory *frameCECategory = new frmContactEditorCategory ( this );
     frameCECategory->SetupPointers(&CategoriesList,
-       &CategoriesListAltID,
-       &CategoriesListPID,
-       &CategoriesListType,
-       &CategoriesListTokens,  
-       &CategoriesListPref,
-       lboCategories,
-       intSelectedData);
+                                   &CategoriesListAltID,
+                                   &CategoriesListPID,
+                                   &CategoriesListType,
+                                   &CategoriesListTokens,
+                                   &CategoriesListPref,
+                                   lboCategories,
+                                   intSelectedData);
     frameCECategory->SetEditorMode(TRUE);
     frameCECategory->ShowModal();
     delete frameCECategory;
@@ -2960,35 +2960,35 @@ void frmContactEditor::DeleteCategory( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboCategories, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboCategories,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboCategories->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &CategoriesList,
-    &CategoriesListAltID, &CategoriesListPID,
-    &CategoriesListType, &CategoriesListTokens,
-    &CategoriesListPref);
-
+                  &CategoriesListAltID, &CategoriesListPID,
+                  &CategoriesListType, &CategoriesListTokens,
+                  &CategoriesListPref);
+    
 }
 
 void frmContactEditor::AddGroup( wxCommandEvent& event )
 {
     
     int intResult = 0;
-
+    
     XABViewMode XVMData = MainPtr->GetViewMode();
-
+    
     frmContactEditorGroup *frameCEGroup = new frmContactEditorGroup ( this );
     frameCEGroup->SetEditorMode(FALSE, XVMData);
     intResult = GetLastInt(&GroupsList);
     frameCEGroup->SetupPointers(&GroupsList,
-       lboGroups,
-       wxSContactAccount,
-       intValueSeek);
+                                lboGroups,
+                                wxSContactAccount,
+                                intValueSeek);
     frameCEGroup->ShowModal();
     delete frameCEGroup;
     frameCEGroup = NULL;
@@ -3004,40 +3004,40 @@ void frmContactEditor::ModifyGroup( wxCommandEvent& event )
 
 void frmContactEditor::DeleteGroup( wxCommandEvent& event )
 {
-
+    
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboGroups, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboGroups,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboGroups->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &GroupsList);
-
+    
 }
 
 void frmContactEditor::AddPicture( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorPicture *frameCEPicture = new frmContactEditorPicture ( this );
     frameCEPicture->SetEditorMode(FALSE);
     intResult = GetLastInt(&PicturesList);
     frameCEPicture->SetupPointers(&PicturesList,
-       &PicturesListAltID,
-       &PicturesListPID,
-       &PicturesListType,
-       &PicturesListPicEncType,        
-       &PicturesListPictureType,       
-       &PicturesListTokens,
-       &PicturesListMediatype, 
-       &PicturesListPref,
-       lboPictures,
-       (intValueSeek));
+                                  &PicturesListAltID,
+                                  &PicturesListPID,
+                                  &PicturesListType,
+                                  &PicturesListPicEncType,
+                                  &PicturesListPictureType,
+                                  &PicturesListTokens,
+                                  &PicturesListMediatype,
+                                  &PicturesListPref,
+                                  lboPictures,
+                                  (intValueSeek));
     frameCEPicture->ShowModal();
     delete frameCEPicture;
     frameCEPicture = NULL;
@@ -3048,28 +3048,28 @@ void frmContactEditor::ModifyPicture( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboPictures, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboPictures,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorPicture *frameCEPicture = new frmContactEditorPicture ( this );
     frameCEPicture->SetupPointers(&PicturesList,
-       &PicturesListAltID,
-       &PicturesListPID,
-       &PicturesListType,
-       &PicturesListPicEncType,        
-       &PicturesListPictureType,       
-       &PicturesListTokens,
-       &PicturesListMediatype, 
-       &PicturesListPref,
-       lboPictures,
-       intSelectedData);
+                                  &PicturesListAltID,
+                                  &PicturesListPID,
+                                  &PicturesListType,
+                                  &PicturesListPicEncType,
+                                  &PicturesListPictureType,
+                                  &PicturesListTokens,
+                                  &PicturesListMediatype,
+                                  &PicturesListPref,
+                                  lboPictures,
+                                  intSelectedData);
     frameCEPicture->SetEditorMode(TRUE);
     frameCEPicture->ShowModal();
     delete frameCEPicture;
-    frameCEPicture = NULL;   
+    frameCEPicture = NULL;
     
 }
 
@@ -3078,38 +3078,38 @@ void frmContactEditor::DeletePicture( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboPictures, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboPictures,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboPictures->DeleteItem(longSelected);
     
-    DeleteMapData(intSelectedData,     
-    &PicturesList, &PicturesListAltID, &PicturesListPID, &PicturesListType,
-    &PicturesListPicEncType, &PicturesListPictureType, &PicturesListTokens,
-    &PicturesListMediatype, &PicturesListPref);
-       
+    DeleteMapData(intSelectedData,
+                  &PicturesList, &PicturesListAltID, &PicturesListPID, &PicturesListType,
+                  &PicturesListPicEncType, &PicturesListPictureType, &PicturesListTokens,
+                  &PicturesListMediatype, &PicturesListPref);
+    
     wxMemoryInputStream istream(misc_emptyimage_png, sizeof(misc_emptyimage_png));
     wxImage misc_emptyimage_png(istream, wxBITMAP_TYPE_PNG);
-    PictureImage = (wxBitmap)misc_emptyimage_png;      
-       
+    PictureImage = (wxBitmap)misc_emptyimage_png;
+    
     imgPicture->SetBitmap(PictureImage);
 }
 
 void frmContactEditor::LoadPicture( wxListEvent& event )
 {
-
+    
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboPictures, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboPictures,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
+    
     std::string base64dec;
     
     std::map<int,std::string>::iterator initier;
@@ -3120,13 +3120,13 @@ void frmContactEditor::LoadPicture( wxListEvent& event )
     
     
     wxMemoryInputStream istream(base64dec.c_str(), (size_t)base64dec.size());
-    wxImage photo;    
+    wxImage photo;
     //wxMemoryInputStream istream(base64dec, (size_t)base64dec.size());
     
     if (!photo.LoadFile(istream, wxBITMAP_TYPE_ANY)){
-    
-       return;
-    
+        
+        return;
+        
     }
     
     
@@ -3137,16 +3137,16 @@ void frmContactEditor::LoadPicture( wxListEvent& event )
 
 void frmContactEditor::LoadLogo( wxListEvent& event )
 {
-
+    
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboLogos, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboLogos,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
+    
     std::string base64dec;
     
     std::map<int,std::string>::iterator initier;
@@ -3157,39 +3157,39 @@ void frmContactEditor::LoadLogo( wxListEvent& event )
     
     
     wxMemoryInputStream istream(base64dec.c_str(), (size_t)base64dec.size());
-    wxImage photo;    
+    wxImage photo;
     //wxMemoryInputStream istream(base64dec, (size_t)base64dec.size());
     
     if (!photo.LoadFile(istream, wxBITMAP_TYPE_ANY)){
-    
-       return;
-    
+        
+        return;
+        
     }
     
     
     LogoImage = (wxBitmap)photo;
     imgLogo->SetBitmap(LogoImage);
-
+    
 }
 
 void frmContactEditor::AddLogo( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorPicture *frameCELogo = new frmContactEditorPicture ( this );
     frameCELogo->SetEditorMode(FALSE);
     intResult = GetLastInt(&LogosList);
     frameCELogo->SetupPointers(&LogosList,
-       &LogosListAltID,
-       &LogosListPID,
-       &LogosListType,
-       &LogosListPicEncType,
-       &LogosListPictureType,  
-       &LogosListTokens,
-       &LogosListMediatype,    
-       &LogosListPref,
-       lboLogos,
-       (intValueSeek));
+                               &LogosListAltID,
+                               &LogosListPID,
+                               &LogosListType,
+                               &LogosListPicEncType,
+                               &LogosListPictureType,
+                               &LogosListTokens,
+                               &LogosListMediatype,
+                               &LogosListPref,
+                               lboLogos,
+                               (intValueSeek));
     frameCELogo->ShowModal();
     delete frameCELogo;
     frameCELogo = NULL;
@@ -3200,28 +3200,28 @@ void frmContactEditor::ModifyLogo( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboLogos, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboLogos,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorPicture *frameCELogo = new frmContactEditorPicture ( this );
     frameCELogo->SetupPointers(&LogosList,
-       &LogosListAltID,
-       &LogosListPID,
-       &LogosListType,
-       &LogosListPicEncType,   
-       &LogosListPictureType,  
-       &LogosListTokens,
-       &LogosListMediatype,    
-       &LogosListPref,
-       lboLogos,
-       intSelectedData);
+                               &LogosListAltID,
+                               &LogosListPID,
+                               &LogosListType,
+                               &LogosListPicEncType,
+                               &LogosListPictureType,
+                               &LogosListTokens,
+                               &LogosListMediatype,
+                               &LogosListPref,
+                               lboLogos,
+                               intSelectedData);
     frameCELogo->SetEditorMode(TRUE);
     frameCELogo->ShowModal();
     delete frameCELogo;
-    frameCELogo = NULL; 
+    frameCELogo = NULL;
 }
 
 void frmContactEditor::DeleteLogo( wxCommandEvent& event )
@@ -3229,19 +3229,19 @@ void frmContactEditor::DeleteLogo( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboLogos, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboLogos,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboLogos->DeleteItem(longSelected);
     
-    DeleteMapData(intSelectedData,     
-    &LogosList, &LogosListAltID, &LogosListPID, &LogosListType,
-    &LogosListPicEncType, &LogosListPictureType, &LogosListTokens,
-    &LogosListMediatype, &LogosListPref);
-       
+    DeleteMapData(intSelectedData,
+                  &LogosList, &LogosListAltID, &LogosListPID, &LogosListType,
+                  &LogosListPicEncType, &LogosListPictureType, &LogosListTokens,
+                  &LogosListMediatype, &LogosListPref);
+    
     wxMemoryInputStream istream(misc_emptyimage_png, sizeof(misc_emptyimage_png));
     wxImage misc_emptyimage_png(istream, wxBITMAP_TYPE_PNG);
     LogoImage = (wxBitmap)misc_emptyimage_png;
@@ -3252,21 +3252,21 @@ void frmContactEditor::DeleteLogo( wxCommandEvent& event )
 void frmContactEditor::AddSound( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorSound *frameCESound = new frmContactEditorSound ( this );
     frameCESound->SetEditorMode(FALSE);
     intResult = GetLastInt(&SoundsList);
     frameCESound->SetupPointers(&SoundsList,
-       &SoundsListAltID,
-       &SoundsListPID,
-       &SoundsListType,
-       &SoundsListAudioType,   
-       &SoundsListAudioEncType,
-       &SoundsListTokens,
-       &SoundsListMediatype,   
-       &SoundsListPref,
-       lboSounds,
-       (intValueSeek));
+                                &SoundsListAltID,
+                                &SoundsListPID,
+                                &SoundsListType,
+                                &SoundsListAudioType,
+                                &SoundsListAudioEncType,
+                                &SoundsListTokens,
+                                &SoundsListMediatype,
+                                &SoundsListPref,
+                                lboSounds,
+                                (intValueSeek));
     frameCESound->ShowModal();
     delete frameCESound;
     frameCESound = NULL;
@@ -3277,24 +3277,24 @@ void frmContactEditor::ModifySound( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboSounds, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboSounds,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorSound *frameCESound = new frmContactEditorSound ( this );
     frameCESound->SetupPointers(&SoundsList,
-       &SoundsListAltID,
-       &SoundsListPID,
-       &SoundsListType,
-       &SoundsListAudioType,
-       &SoundsListAudioEncType,        
-       &SoundsListTokens,
-       &SoundsListMediatype,
-       &SoundsListPref,
-       lboSounds,
-       intSelectedData);
+                                &SoundsListAltID,
+                                &SoundsListPID,
+                                &SoundsListType,
+                                &SoundsListAudioType,
+                                &SoundsListAudioEncType,
+                                &SoundsListTokens,
+                                &SoundsListMediatype,
+                                &SoundsListPref,
+                                lboSounds,
+                                intSelectedData);
     frameCESound->SetEditorMode(TRUE);
     frameCESound->ShowModal();
     delete frameCESound;
@@ -3306,61 +3306,61 @@ void frmContactEditor::DeleteSound( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboSounds, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboSounds,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboSounds->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &SoundsList, &SoundsListAltID,
-    &SoundsListPID, &SoundsListType, &SoundsListAudioType, 
-    &SoundsListAudioEncType, &SoundsListTokens, &SoundsListMediatype,
-    &SoundsListPref);
+                  &SoundsListPID, &SoundsListType, &SoundsListAudioType,
+                  &SoundsListAudioEncType, &SoundsListTokens, &SoundsListMediatype,
+                  &SoundsListPref);
     
 }
 
 void frmContactEditor::PlaySoundDetach()
 {
-   
+    
     if (!AudioStreamPlayback.openFromMemory(base64dec.c_str(), base64declen)){
-               
-       // Can't load file. We must flee...
-       // Also show an error message too.
-                       
-       wxMessageBox(_("This file is in an audio format that is unsupported or is not an audio file."), _("Error opening audio file"), wxICON_ERROR);
-                       
-       return;
-               
+        
+        // Can't load file. We must flee...
+        // Also show an error message too.
+        
+        wxMessageBox(_("This file is in an audio format that is unsupported or is not an audio file."), _("Error opening audio file"), wxICON_ERROR);
+        
+        return;
+        
     }
     
-    btnStop->Enable();    
+    btnStop->Enable();
     
     //AudioStreamPlayback.setbuffer(AudioBuffer);
     AudioStreamPlayback.play();
     
     /*timespec n1, n2;
-                                               
-    n1.tv_sec = 0;
-    n1.tv_nsec = 100000000L;*/
+     
+     n1.tv_sec = 0;
+     n1.tv_nsec = 100000000L;*/
     
     //while (TimeA != TimeB){
     while (AudioStreamPlayback.getStatus() == sf::SoundSource::Playing){
-    
-       // We poll this every 100ms in order to conserve CPU usage.
-       
-               SleepFor(100000000);
-    
+        
+        // We poll this every 100ms in order to conserve CPU usage.
+        
+        SleepFor(100000000);
+        
     }
     
-    btnStop->Disable();  
-
+    btnStop->Disable();
+    
 }
 
 void frmContactEditor::PlaySound( wxCommandEvent& event )
 {
-
+    
     //sf::Music *AudioPlayback = new sf::Music;
     //AudioStream *AudioStreamPlayback = new AudioStream;
     //sf::SoundBuffer *AudioBuffer = new sf::SoundBuffer;
@@ -3378,22 +3378,22 @@ void frmContactEditor::PlaySound( wxCommandEvent& event )
     //AudioBuffer = NULL;
     
     //return;
-
+    
     long longSelected = -1;
     int intSelectedData = 0;
     
     // Check if sound is still being played and if it is, stop it.
     
     if (AudioStreamPlayback.getStatus() == sf::SoundSource::Playing){
-    
-       AudioStreamPlayback.stop();
-    
+        
+        AudioStreamPlayback.stop();
+        
     }
     
-    if (!GetSelectedItem(lboSounds, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboSounds,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     std::map<int, std::string>::iterator initier;
@@ -3407,39 +3407,39 @@ void frmContactEditor::PlaySound( wxCommandEvent& event )
     AudioPlaybackThread.detach();
     
     return;
-
+    
 }
 
 void frmContactEditor::StopSound( wxCommandEvent& event )
 {
-
-    if (AudioStreamPlayback.getStatus() == sf::SoundSource::Playing){
-    
-       AudioStreamPlayback.stop();
     
+    if (AudioStreamPlayback.getStatus() == sf::SoundSource::Playing){
+        
+        AudioStreamPlayback.stop();
+        
     }
     
     btnStop->Disable();
     
     return;
-
+    
 }
 
 void frmContactEditor::AddCalendarAddress( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
     frameCECalAdr->SetEditorMode(FALSE);
     intResult = GetLastInt(&CalendarList);
     frameCECalAdr->SetupPointers(&CalendarList,
-       &CalendarListAltID,
-       &CalendarListPID,
-       &CalendarListType,
-       &CalendarListTokens,
-       &CalendarListPref,
-       lboCalendarAddresses,
-       (intValueSeek));
+                                 &CalendarListAltID,
+                                 &CalendarListPID,
+                                 &CalendarListType,
+                                 &CalendarListTokens,
+                                 &CalendarListPref,
+                                 lboCalendarAddresses,
+                                 (intValueSeek));
     frameCECalAdr->ShowModal();
     delete frameCECalAdr;
     frameCECalAdr = NULL;
@@ -3450,21 +3450,21 @@ void frmContactEditor::ModifyCalendarAddress( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboCalendarAddresses, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboCalendarAddresses,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
     frameCECalAdr->SetupPointers(&CalendarList,
-       &CalendarListAltID,
-       &CalendarListPID,
-       &CalendarListType,
-       &CalendarListTokens,    
-       &CalendarListPref,
-       lboCalendarAddresses,
-       intSelectedData);
+                                 &CalendarListAltID,
+                                 &CalendarListPID,
+                                 &CalendarListType,
+                                 &CalendarListTokens,
+                                 &CalendarListPref,
+                                 lboCalendarAddresses,
+                                 intSelectedData);
     frameCECalAdr->SetEditorMode(TRUE);
     frameCECalAdr->ShowModal();
     delete frameCECalAdr;
@@ -3476,35 +3476,35 @@ void frmContactEditor::DeleteCalendarAddress( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboCalendarAddresses, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboCalendarAddresses,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboCalendarAddresses->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &CalendarList, &CalendarListAltID,
-    &CalendarListPID, &CalendarListType, &CalendarListTokens,
-    &CalendarListPref);
+                  &CalendarListPID, &CalendarListType, &CalendarListTokens,
+                  &CalendarListPref);
     
 }
 
 void frmContactEditor::AddCalendarRequest( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
     frameCECalAdr->SetEditorMode(FALSE);
     intResult = GetLastInt(&CalendarRequestList);
     frameCECalAdr->SetupPointers(&CalendarRequestList,
-       &CalendarRequestListAltID,
-       &CalendarRequestListPID,
-       &CalendarRequestListType,
-       &CalendarRequestListTokens,
-       &CalendarRequestListPref,
-       lboCalendarRequestAddress,
-       (intValueSeek));
+                                 &CalendarRequestListAltID,
+                                 &CalendarRequestListPID,
+                                 &CalendarRequestListType,
+                                 &CalendarRequestListTokens,
+                                 &CalendarRequestListPref,
+                                 lboCalendarRequestAddress,
+                                 (intValueSeek));
     frameCECalAdr->ShowModal();
     delete frameCECalAdr;
     frameCECalAdr = NULL;
@@ -3515,21 +3515,21 @@ void frmContactEditor::ModifyCalendarRequest( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboCalendarRequestAddress, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboCalendarRequestAddress,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
     frameCECalAdr->SetupPointers(&CalendarList,
-       &CalendarRequestListAltID,
-       &CalendarRequestListPID,
-       &CalendarRequestListType,
-       &CalendarRequestListTokens,     
-       &CalendarRequestListPref,
-       lboCalendarRequestAddress,
-       intSelectedData);
+                                 &CalendarRequestListAltID,
+                                 &CalendarRequestListPID,
+                                 &CalendarRequestListType,
+                                 &CalendarRequestListTokens,
+                                 &CalendarRequestListPref,
+                                 lboCalendarRequestAddress,
+                                 intSelectedData);
     frameCECalAdr->SetEditorMode(TRUE);
     frameCECalAdr->ShowModal();
     delete frameCECalAdr;
@@ -3541,35 +3541,35 @@ void frmContactEditor::DeleteCalendarRequest( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboCalendarRequestAddress, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboCalendarRequestAddress,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboCalendarRequestAddress->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &CalendarRequestList,
-    &CalendarRequestListAltID, &CalendarRequestListPID,
-    &CalendarRequestListType, &CalendarRequestListTokens,
-    &CalendarRequestListPref);
+                  &CalendarRequestListAltID, &CalendarRequestListPID,
+                  &CalendarRequestListType, &CalendarRequestListTokens,
+                  &CalendarRequestListPref);
 }
 
 void frmContactEditor::AddFreeBusy( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
     frameCECalAdr->SetEditorMode(FALSE);
     intResult = GetLastInt(&FreeBusyList);
     frameCECalAdr->SetupPointers(&FreeBusyList,
-       &FreeBusyListAltID,
-       &FreeBusyListPID,
-       &FreeBusyListType,
-       &FreeBusyListTokens,
-       &FreeBusyListPref,
-       lboFreeBusyAddresses,
-       (intValueSeek));
+                                 &FreeBusyListAltID,
+                                 &FreeBusyListPID,
+                                 &FreeBusyListType,
+                                 &FreeBusyListTokens,
+                                 &FreeBusyListPref,
+                                 lboFreeBusyAddresses,
+                                 (intValueSeek));
     frameCECalAdr->ShowModal();
     delete frameCECalAdr;
     frameCECalAdr = NULL;
@@ -3580,21 +3580,21 @@ void frmContactEditor::ModifyFreeBusy( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboFreeBusyAddresses, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboFreeBusyAddresses,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
     frameCECalAdr->SetupPointers(&FreeBusyList,
-       &FreeBusyListAltID,
-       &FreeBusyListPID,
-       &FreeBusyListType,
-       &FreeBusyListTokens,    
-       &FreeBusyListPref,
-       lboFreeBusyAddresses,
-       intSelectedData);
+                                 &FreeBusyListAltID,
+                                 &FreeBusyListPID,
+                                 &FreeBusyListType,
+                                 &FreeBusyListTokens,
+                                 &FreeBusyListPref,
+                                 lboFreeBusyAddresses,
+                                 intSelectedData);
     frameCECalAdr->SetEditorMode(TRUE);
     frameCECalAdr->ShowModal();
     delete frameCECalAdr;
@@ -3606,37 +3606,37 @@ void frmContactEditor::DeleteFreeBusy( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboFreeBusyAddresses, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboFreeBusyAddresses,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboFreeBusyAddresses->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &FreeBusyList, &FreeBusyListAltID,
-    &FreeBusyListPID, &FreeBusyListType, &FreeBusyListTokens,
-    &FreeBusyListPref);
+                  &FreeBusyListPID, &FreeBusyListType, &FreeBusyListTokens,
+                  &FreeBusyListPref);
     
 }
 
 void frmContactEditor::AddKey( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorKey *frameCEKey = new frmContactEditorKey ( this );
     frameCEKey->SetEditorMode(FALSE);
     intResult = GetLastInt(&KeyList);
     frameCEKey->SetupPointers(&KeyList,
-       &KeyListAltID,
-       &KeyListPID,
-       &KeyListKeyType,
-       &KeyListDataType,
-       &KeyListType,
-       &KeyListTokens,
-       &KeyListPref,
-       lboKeys,
-       (intValueSeek));
+                              &KeyListAltID,
+                              &KeyListPID,
+                              &KeyListKeyType,
+                              &KeyListDataType,
+                              &KeyListType,
+                              &KeyListTokens,
+                              &KeyListPref,
+                              lboKeys,
+                              (intValueSeek));
     frameCEKey->ShowModal();
     delete frameCEKey;
     frameCEKey = NULL;
@@ -3647,23 +3647,23 @@ void frmContactEditor::ModifyKey( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboKeys, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboKeys,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorKey *frameCEKey = new frmContactEditorKey ( this );
     frameCEKey->SetupPointers(&KeyList,
-       &KeyListAltID,
-       &KeyListPID,
-       &KeyListKeyType,
-       &KeyListDataType,
-       &KeyListType,
-       &KeyListTokens,
-       &KeyListPref,
-       lboKeys,
-       intSelectedData);
+                              &KeyListAltID,
+                              &KeyListPID,
+                              &KeyListKeyType,
+                              &KeyListDataType,
+                              &KeyListType,
+                              &KeyListTokens,
+                              &KeyListPref,
+                              lboKeys,
+                              intSelectedData);
     frameCEKey->SetEditorMode(TRUE);
     frameCEKey->ShowModal();
     delete frameCEKey;
@@ -3675,32 +3675,32 @@ void frmContactEditor::DeleteKey( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboKeys, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboKeys,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboKeys->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &KeyList, &KeyListAltID,
-    &KeyListPID, &KeyListKeyType, &KeyListDataType, &KeyListType,
-    &KeyListTokens, &KeyListPref);
+                  &KeyListPID, &KeyListKeyType, &KeyListDataType, &KeyListType,
+                  &KeyListTokens, &KeyListPref);
     
 }
 
 void frmContactEditor::AddVendorNamespace( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
     frameCEVen->SetEditorMode(FALSE);
     intResult = GetLastInt(&VendorList);
     frameCEVen->SetupPointers(&VendorList,
-       &VendorListPEN,
-       &VendorListElement,     
-       lboVendorNamespace,
-       (intValueSeek));
+                              &VendorListPEN,
+                              &VendorListElement,
+                              lboVendorNamespace,
+                              (intValueSeek));
     frameCEVen->ShowModal();
     delete frameCEVen;
     frameCEVen = NULL;
@@ -3711,18 +3711,18 @@ void frmContactEditor::ModifyVendorNamespace( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboVendorNamespace, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboVendorNamespace,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
     frameCEVen->SetupPointers(&VendorList,
-       &VendorListPEN,
-       &VendorListElement,     
-       lboVendorNamespace,
-       intSelectedData);
+                              &VendorListPEN,
+                              &VendorListElement,
+                              lboVendorNamespace,
+                              intSelectedData);
     frameCEVen->SetEditorMode(TRUE);
     frameCEVen->ShowModal();
     delete frameCEVen;
@@ -3734,30 +3734,30 @@ void frmContactEditor::DeleteVendorNamespace( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboVendorNamespace, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboVendorNamespace,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboVendorNamespace->DeleteItem(longSelected);
     
     DeleteMapData(intSelectedData, &VendorList, &VendorListPEN,
-    &VendorListElement);
+                  &VendorListElement);
     
 }
 
 void frmContactEditor::AddXToken( wxCommandEvent& event )
 {
     int intResult = 0;
-
+    
     frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
     frameCEXT->SetEditorMode(FALSE);
     intResult = GetLastInt(&XTokenList);
     frameCEXT->SetupPointers(&XTokenList,
-       &XTokenListTokens,      
-       lboXToken,
-       (intValueSeek));
+                             &XTokenListTokens,
+                             lboXToken,
+                             (intValueSeek));
     frameCEXT->ShowModal();
     delete frameCEXT;
     frameCEXT = NULL;
@@ -3768,17 +3768,17 @@ void frmContactEditor::ModifyXToken( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboXToken, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboXToken,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
-       
+    
     frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
     frameCEXT->SetupPointers(&XTokenList,
-       &XTokenListTokens,
-       lboXToken,
-       intSelectedData);
+                             &XTokenListTokens,
+                             lboXToken,
+                             intSelectedData);
     frameCEXT->SetEditorMode(TRUE);
     frameCEXT->ShowModal();
     delete frameCEXT;
@@ -3790,10 +3790,10 @@ void frmContactEditor::DeleteXToken( wxCommandEvent& event )
     long longSelected = -1;
     int intSelectedData = 0;
     
-    if (!GetSelectedItem(lboXToken, 
-               &longSelected,
-               &intSelectedData)){
-       return;
+    if (!GetSelectedItem(lboXToken,
+                         &longSelected,
+                         &intSelectedData)){
+        return;
     }
     
     lboXToken->DeleteItem(longSelected);
@@ -3804,127 +3804,127 @@ void frmContactEditor::DeleteXToken( wxCommandEvent& event )
 
 void frmContactEditor::SaveContact( wxCommandEvent& event )
 {
-
+    
     // Check if Display As combo box has a value in it.
     // Do not go any further if there is no value.
     
     wxString cmbDisplayAsValue = cmbDisplayAs->GetValue();
     
     if (cmbDisplayAsValue.IsEmpty()){
+        
+        wxMessageBox(_("Display As value cannot be left blank."), _("Display As value empty"), wxICON_ERROR);
+        return;
+        
+    }
     
-       wxMessageBox(_("Display As value cannot be left blank."), _("Display As value empty"), wxICON_ERROR);
-       return;
-    
-    }
-
     // Save the updated contact data.
-
+    
     vCard ContactData;
     wxString FilenameFinal;
     bool ReplaceContact = FALSE;
-
-    if (cmbType->GetCurrentSelection() == 1 ||
-    cmbType->GetCurrentSelection() == 3 ||
-    cmbType->GetCurrentSelection() == 4){
-    
-       if (IsGroup == TRUE){
-       
-               // Mark contact for replacing.
-               
-               ReplaceContact = TRUE;
-       
-       }
     
+    if (cmbType->GetCurrentSelection() == 1 ||
+        cmbType->GetCurrentSelection() == 3 ||
+        cmbType->GetCurrentSelection() == 4){
+        
+        if (IsGroup == TRUE){
+            
+            // Mark contact for replacing.
+            
+            ReplaceContact = TRUE;
+            
+        }
+        
     } else if (cmbType->GetCurrentSelection() == 2){
-    
-       if (IsGroup == TRUE){
-       
-               // Mark contact for replacing.
-               
-               ReplaceContact = TRUE;
-       
-       }
-    
+        
+        if (IsGroup == TRUE){
+            
+            // Mark contact for replacing.
+            
+            ReplaceContact = TRUE;
+            
+        }
+        
     }
     
     if (ReplaceContact == TRUE){
-       
-       wxString wxDelSplitFilename;
-       wxString wxDelFinalFilename;
-       wxString wxSDelDataURL;
-       wxStringTokenizer wSTDelFilename(wxSContactFilename, wxT("/"));
-       while(wSTDelFilename.HasMoreTokens()){
-    
-               wxDelSplitFilename = wSTDelFilename.GetNextToken();
-    
-       }
-
-       wxSDelDataURL = wxDelSplitFilename;
-
-       // Delete the contact from the server as it will be useless in certain
-       // address book clients.
-       
-       ActMgrPtr->AddTask(2, cmbDisplayAs->GetValue(), wxSContactAccount, wxSDelDataURL, wxDelSplitFilename, wxSContactFilename, wxT(""));
-   
-       // Clear the filename so the trigger to recreate the UID is done.
-   
-       wxSContactFilename.Clear();
-       EditMode = FALSE;
-   
+        
+        wxString wxDelSplitFilename;
+        wxString wxDelFinalFilename;
+        wxString wxSDelDataURL;
+        wxStringTokenizer wSTDelFilename(wxSContactFilename, wxT("/"));
+        while(wSTDelFilename.HasMoreTokens()){
+            
+            wxDelSplitFilename = wSTDelFilename.GetNextToken();
+            
+        }
+        
+        wxSDelDataURL = wxDelSplitFilename;
+        
+        // Delete the contact from the server as it will be useless in certain
+        // address book clients.
+        
+        ActMgrPtr->AddTask(2, cmbDisplayAs->GetValue(), wxSContactAccount, wxSDelDataURL, wxDelSplitFilename, wxSContactFilename, wxT(""));
+        
+        // Clear the filename so the trigger to recreate the UID is done.
+        
+        wxSContactFilename.Clear();
+        EditMode = FALSE;
+        
     }
-
-    if (wxSContactFilename.IsEmpty()){
     
-       // Generate a random UUID.
-       
-       UIDToken = GenerateUUID();
-       UIDToken = UIDToken.MakeUpper();
-       
-       // Setup the filename.
-       
-       FilenameFinal = GetAccountDir(wxSContactAccount, FALSE);
-
+    if (wxSContactFilename.IsEmpty()){
+        
+        // Generate a random UUID.
+        
+        UIDToken = GenerateUUID();
+        UIDToken = UIDToken.MakeUpper();
+        
+        // Setup the filename.
+        
+        FilenameFinal = GetAccountDir(wxSContactAccount, FALSE);
+        
 #if defined(__HAIKU__)
-    
-       //preffilename = wxT("noo");
-
+        
+        //preffilename = wxT("noo");
+        
 #elif defined(__WIN32__)
-
-       FilenameFinal = GetAccountDir(wxSContactAccount, FALSE);
-       FilenameFinal.Append(UIDToken);
-       FilenameFinal.Append(wxT(".vcf"));
-       wxSContactFilename = FilenameFinal;
-
+        
+        FilenameFinal = GetAccountDir(wxSContactAccount, FALSE);
+        FilenameFinal.Append(UIDToken);
+        FilenameFinal.Append(wxT(".vcf"));
+        wxSContactFilename = FilenameFinal;
+        
 #else
-
-       FilenameFinal = GetAccountDir(wxSContactAccount, FALSE);
-       FilenameFinal.Append(UIDToken);
-       FilenameFinal.Append(wxT(".vcf"));
-       wxSContactFilename = FilenameFinal;
-
+        
+        FilenameFinal = GetAccountDir(wxSContactAccount, FALSE);
+        FilenameFinal.Append(UIDToken);
+        FilenameFinal.Append(wxT(".vcf"));
+        wxSContactFilename = FilenameFinal;
+        
 #endif
-    
+        
     } else {
+        
+        if (UIDToken.IsEmpty()){
+            
+            // UID Token is empty. (Shouldn't be).
+            // Generate a new UID Token.
+            
+            /*boost::uuids::uuid ContactUUID = boost::uuids::random_generator()();
+             std::string sstContactUUID = boost::uuids::to_string(ContactUUID);
+             wxString strContactUUID(sstContactUUID.c_str(), wxConvUTF8);
+             UIDToken = strContactUUID;*/
+            UIDToken = GenerateUUID();
+            UIDToken = UIDToken.MakeUpper();
+            
+        }
+        FilenameFinal = wxSContactFilename;
+        
+    }
     
-       if (UIDToken.IsEmpty()){
-       
-               // UID Token is empty. (Shouldn't be).
-               // Generate a new UID Token.
-               
-               /*boost::uuids::uuid ContactUUID = boost::uuids::random_generator()();
-               std::string sstContactUUID = boost::uuids::to_string(ContactUUID);
-               wxString strContactUUID(sstContactUUID.c_str(), wxConvUTF8);
-               UIDToken = strContactUUID;*/
-               UIDToken = GenerateUUID();
-               UIDToken = UIDToken.MakeUpper();
-       
-       }
-       FilenameFinal = wxSContactFilename;
-    
-    }
-       
     // Setup the data and write it into the account folder.
-       
+    
     // Begin preperations to write the contact to a file.
     
     bool boolValue = FALSE;
@@ -3932,17 +3932,17 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
     bool FNFirst = TRUE;
     bool NNGeneralFirst = TRUE;
     bool NNHomeFirst = TRUE;
-    bool NNWorkFirst = TRUE; 
-    int intFNCount = 0; 
+    bool NNWorkFirst = TRUE;
+    int intFNCount = 0;
     std::map<int,int>::iterator intiter;
-    std::map<int,wxString>::iterator striter; 
-     
+    std::map<int,wxString>::iterator striter;
+    
     ContactData.Add(wxT("BEGIN"), wxT("VCARD"), FALSE);
     ContactData.Add(wxT("VERSION"), wxT("4.0"), FALSE);
     
     // Setup the version string.
     
-    strValue.Append(wxT("-//Xestia//Address Book Version ")); 
+    strValue.Append(wxT("-//Xestia//Address Book Version "));
     strValue.Append(wxT(XSDAB_VERSION));
     strValue.Append(wxT("//KW"));
     
@@ -3955,45 +3955,45 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
     // Setup the name field.
     
     strValue = txtSurname->GetValue() + wxT(";") +
-               txtForename->GetValue() + wxT(";") +
-               txtOtherNames->GetValue() + wxT(";") +
-               txtTitle->GetValue() + wxT(";") +
-               txtSuffix->GetValue();
+    txtForename->GetValue() + wxT(";") +
+    txtOtherNames->GetValue() + wxT(";") +
+    txtTitle->GetValue() + wxT(";") +
+    txtSuffix->GetValue();
     
     strValue2 = ContactData.Convert(cmbDisplayAs->GetValue(), FALSE);
-    strValue2.Trim();    
+    strValue2.Trim();
     
     if (NameTokens.IsEmpty()){
-       ContactData.Add(wxT("N;SORT-AS=\"") + strValue2 + wxT("\""), strValue, FALSE);
+        ContactData.Add(wxT("N;SORT-AS=\"") + strValue2 + wxT("\""), strValue, FALSE);
     } else {
-       ContactData.Add(wxT("N;SORT-AS=\"") + strValue2 + wxT("\";") + NameTokens, strValue, FALSE);
+        ContactData.Add(wxT("N;SORT-AS=\"") + strValue2 + wxT("\";") + NameTokens, strValue, FALSE);
     }
     
     if (cmbType->GetCurrentSelection() == 1){
-    
-       ContactData.AddRaw(wxT("KIND"), wxT("individual"));
-       
+        
+        ContactData.AddRaw(wxT("KIND"), wxT("individual"));
+        
     } else if (cmbType->GetCurrentSelection() == 2){
-    
-       ContactData.AddRaw(wxT("KIND"), wxT("group"));
-    
-       // Go through each of the members and write them out.
-       
-       for (std::map<int, wxString>::iterator itemiter = GroupsList.begin();
-       itemiter != GroupsList.end(); ++itemiter){
-       
-           ContactData.Add(wxT("MEMBER:urn:uuid"), itemiter->second, FALSE);
-       
-       }
-           
+        
+        ContactData.AddRaw(wxT("KIND"), wxT("group"));
+        
+        // Go through each of the members and write them out.
+        
+        for (std::map<int, wxString>::iterator itemiter = GroupsList.begin();
+             itemiter != GroupsList.end(); ++itemiter){
+            
+            ContactData.Add(wxT("MEMBER:urn:uuid"), itemiter->second, FALSE);
+            
+        }
+        
     } else if (cmbType->GetCurrentSelection() == 3){
-    
-       ContactData.AddRaw(wxT("KIND"), wxT("org"));
-        
+        
+        ContactData.AddRaw(wxT("KIND"), wxT("org"));
+        
     } else if (cmbType->GetCurrentSelection() == 4){
-    
-       ContactData.AddRaw(wxT("KIND"), wxT("location"));
-           
+        
+        ContactData.AddRaw(wxT("KIND"), wxT("location"));
+        
     }
     
     
@@ -4001,1700 +4001,1700 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
     
     strValue.Clear();
     strValue2.Clear();
-    strValue3.Clear();    
-
+    strValue3.Clear();
+    
     boolValue = FALSE;
-    boolValue2 = FALSE;    
+    boolValue2 = FALSE;
     intValue2 = 0;
-    intValue  = 0; 
-
+    intValue  = 0;
+    
     // Setup the gender.
     
     if (cmbGender->GetCurrentSelection() != 0){
-    
-       switch(cmbGender->GetCurrentSelection()){
-       
-           case 1:
-               
-               strValue = wxT("M");
-               break;
-               
-           case 2:
-               
-               strValue = wxT("F");
-               break;  
-               
-           case 3:
-               
-               strValue = wxT("O");
-               break;
-               
-           case 4:
-               
-               strValue = wxT("N");
-               break;
-               
-           case 5:
-               
-               strValue = wxT("U");
-               break;
-       
-       }
-    
+        
+        switch(cmbGender->GetCurrentSelection()){
+                
+            case 1:
+                
+                strValue = wxT("M");
+                break;
+                
+            case 2:
+                
+                strValue = wxT("F");
+                break;
+                
+            case 3:
+                
+                strValue = wxT("O");
+                break;
+                
+            case 4:
+                
+                strValue = wxT("N");
+                break;
+                
+            case 5:
+                
+                strValue = wxT("U");
+                break;
+                
+        }
+        
     }
     
     if (!txtGenderDescription->IsEmpty()){
-       
-       strValue2 = txtGenderDescription->GetValue();
-       
+        
+        strValue2 = txtGenderDescription->GetValue();
+        
     }
     
     if (!strValue.IsEmpty() || !strValue2.IsEmpty()){
-
-       EscapeString(&strValue2, FALSE);
-
-       if (!GenderTokens.IsEmpty()){
-       
-               if (!strValue2.IsEmpty()){
-       
-                       ContactData.AddRaw(wxT("GENDER;") + GenderTokens, strValue + wxT(";") + strValue2);
-       
-               } else {
-       
-                       ContactData.AddRaw(wxT("GENDER;") + GenderTokens, strValue);    
-       
-               }
-       
-       } else {
-    
-               if (!strValue2.IsEmpty()){
-
-                       ContactData.AddRaw(wxT("GENDER"), strValue + wxT(";") + strValue2);
-       
-               } else {
-       
-                       ContactData.AddRaw(wxT("GENDER"), strValue);    
-       
-               }
-       
-       }
-    
+        
+        EscapeString(&strValue2, FALSE);
+        
+        if (!GenderTokens.IsEmpty()){
+            
+            if (!strValue2.IsEmpty()){
+                
+                ContactData.AddRaw(wxT("GENDER;") + GenderTokens, strValue + wxT(";") + strValue2);
+                
+            } else {
+                
+                ContactData.AddRaw(wxT("GENDER;") + GenderTokens, strValue);
+                
+            }
+            
+        } else {
+            
+            if (!strValue2.IsEmpty()){
+                
+                ContactData.AddRaw(wxT("GENDER"), strValue + wxT(";") + strValue2);
+                
+            } else {
+                
+                ContactData.AddRaw(wxT("GENDER"), strValue);
+                
+            }
+            
+        }
+        
     }
     
     strValue.Clear();
     strValue2.Clear();
-    strValue3.Clear();    
-
+    strValue3.Clear();
+    
     boolValue = FALSE;
-    boolValue2 = FALSE;    
+    boolValue2 = FALSE;
     intValue2 = 0;
     intValue  = 0;
     
     // Process Label.
-
-    strValue3 = BirthdayAltID; 
-    
-    if (!strValue3.IsEmpty()){
     
-       strValue3.Trim();
-       strValue3.Trim();
-       boolValue2 = TRUE;
-       strValue2.Append(wxT("ALTID=\"") + strValue3 + wxT("\""));
-    
-       boolValue = TRUE;           
+    strValue3 = BirthdayAltID;
     
+    if (!strValue3.IsEmpty()){
+        
+        strValue3.Trim();
+        strValue3.Trim();
+        boolValue2 = TRUE;
+        strValue2.Append(wxT("ALTID=\"") + strValue3 + wxT("\""));
+        
+        boolValue = TRUE;
+        
     }
-
+    
     //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
-    //strValue2 = 
-
+    //strValue2 =
+    
     // Process Language.
-
+    
     strValue3 = BirthdayCalScale;
-
+    
     if (!strValue3.IsEmpty()){
+        
+        strValue3.Trim();
+        strValue3.Trim();
+        
+        if (boolValue2 == TRUE){
+            
+            strValue2.Append(wxT(";"));
+            
+        } else {
+            
+            boolValue2 = TRUE;
+            
+        }
+        
+        strValue2.Append(wxT("CALSCALE=") + strValue3);
+        
+        boolValue = TRUE;
+        
+    }
     
-       strValue3.Trim();
-       strValue3.Trim();
-       
-       if (boolValue2 == TRUE){
-       
-               strValue2.Append(wxT(";"));
-       
-       } else {
-       
-               boolValue2 = TRUE;
-       
-       }
-       
-       strValue2.Append(wxT("CALSCALE=") + strValue3);
-    
-       boolValue = TRUE;           
-    
-    }  
-
     // Process Tokens.
-
+    
     strValue2 = BirthdayTokens;
-
+    
     // Get the birthday and write it.
-
+    
     ResetSaveProcessData();
     
     if (!txtBirthday->IsEmpty()){
-    
-       strValue = txtBirthday->GetValue();
-    
-       if (!strValue.IsEmpty() || !strValue2.IsEmpty()){
-    
-               if (!strValue2.IsEmpty()){
-       
-                   EscapeString(&strValue2, FALSE);
-                   EscapeString(&strValue, FALSE);
-       
-                   ContactData.AddRaw(wxT("BDAY;VALUE=text;") + strValue2 + wxT(";"), strValue);
-       
-               } else {
-       
-                   EscapeString(&strValue, FALSE);
-       
-                   ContactData.AddRaw(wxT("BDAY;VALUE=text"), strValue);
-       
-               }
-    
-       }
-    
+        
+        strValue = txtBirthday->GetValue();
+        
+        if (!strValue.IsEmpty() || !strValue2.IsEmpty()){
+            
+            if (!strValue2.IsEmpty()){
+                
+                EscapeString(&strValue2, FALSE);
+                EscapeString(&strValue, FALSE);
+                
+                ContactData.AddRaw(wxT("BDAY;VALUE=text;") + strValue2 + wxT(";"), strValue);
+                
+            } else {
+                
+                EscapeString(&strValue, FALSE);
+                
+                ContactData.AddRaw(wxT("BDAY;VALUE=text"), strValue);
+                
+            }
+            
+        }
+        
     } else {
-    
-       // Deal with date.
-       
-       // Get Day, Month & Year.
-       
-       wxDateTime BirthdayDate;
-       wxDateTime::Month BirthdayMonth;
-       int BirthdayDay;
-       int BirthdayYear;
-       wxString DataBeforeT;
-       wxString DataAfterT;
-       wxString FinalBirthdayString;
-       bool ProcessDataAfterT = FALSE;
-       
-       BirthdayDate = dapBirthday->GetValue();
-       
-       if (BirthdayDate.IsValid()){
-       
-               BirthdayDay = BirthdayDate.GetDay();
-               BirthdayMonth = BirthdayDate.GetMonth();
-               BirthdayYear = BirthdayDate.GetYear();
-       
-               // Look for T and replace data before this.
-       
-               wxStringTokenizer wSTDate(Birthday, wxT("T"));
-       
-               while (wSTDate.HasMoreTokens()){
-       
-                       if (ProcessDataAfterT == FALSE){
-       
-                               DataBeforeT = wSTDate.GetNextToken();
-                               ProcessDataAfterT = TRUE;
-               
-                       } else {
-               
-                               DataAfterT = wSTDate.GetNextToken();
-                               break;
-               
-                       }
-       
-               }
-       
-               // If there is not T then replace altogether.
-    
-               wxString FinalBirthdayDay;
-               wxString FinalBirthdayMonth;
-               wxString FinalBirthdayYear;
-               
-               if (BirthdayDay < 10){
-               
-                       FinalBirthdayDay = wxT("0") + wxString::Format(wxT("%i"), BirthdayDay);
-               
-               } else {
-               
-                       FinalBirthdayDay = wxString::Format(wxT("%i"), BirthdayDay);
-               
-               }
-       
-               if (((int)BirthdayMonth + 1) < 10){
-               
-                       FinalBirthdayMonth = wxT("0") + wxString::Format(wxT("%i"), ((int)BirthdayMonth + 1));
-               
-               } else {
-       
-                       FinalBirthdayMonth = wxString::Format(wxT("%i"), ((int)BirthdayMonth + 1));
-               
-               }
-               
-               if (BirthdayYear == 0){
-               
-                       FinalBirthdayYear = wxT("--");
-               
-               } else {
-               
-                       FinalBirthdayYear = wxString::Format(wxT("%i"), BirthdayYear);
-               
-               }    
-    
-               if (!DataAfterT.IsEmpty()){
-               
-                       FinalBirthdayString = FinalBirthdayYear + FinalBirthdayMonth + FinalBirthdayDay + wxT("T") + DataAfterT;
-       
-               } else {
-       
-                       FinalBirthdayString = FinalBirthdayYear + FinalBirthdayMonth + FinalBirthdayDay;
-       
-               }
-       
-               if (!FinalBirthdayString.IsEmpty() || !strValue2.IsEmpty()){
-    
-                       if (!strValue2.IsEmpty()){
-       
-                           EscapeString(&strValue2, FALSE);
-                           EscapeString(&strValue, FALSE);
-       
-                           ContactData.AddRaw(wxT("BDAY") + strValue2 + wxT(";"), FinalBirthdayString);
-       
-                       } else {
-       
-                           EscapeString(&strValue, FALSE);
-       
-                           ContactData.AddRaw(wxT("BDAY"), FinalBirthdayString);
-       
-                       }
-    
-               }       
-    
-       }
-    
+        
+        // Deal with date.
+        
+        // Get Day, Month & Year.
+        
+        wxDateTime BirthdayDate;
+        wxDateTime::Month BirthdayMonth;
+        int BirthdayDay;
+        int BirthdayYear;
+        wxString DataBeforeT;
+        wxString DataAfterT;
+        wxString FinalBirthdayString;
+        bool ProcessDataAfterT = FALSE;
+        
+        BirthdayDate = dapBirthday->GetValue();
+        
+        if (BirthdayDate.IsValid()){
+            
+            BirthdayDay = BirthdayDate.GetDay();
+            BirthdayMonth = BirthdayDate.GetMonth();
+            BirthdayYear = BirthdayDate.GetYear();
+            
+            // Look for T and replace data before this.
+            
+            wxStringTokenizer wSTDate(Birthday, wxT("T"));
+            
+            while (wSTDate.HasMoreTokens()){
+                
+                if (ProcessDataAfterT == FALSE){
+                    
+                    DataBeforeT = wSTDate.GetNextToken();
+                    ProcessDataAfterT = TRUE;
+                    
+                } else {
+                    
+                    DataAfterT = wSTDate.GetNextToken();
+                    break;
+                    
+                }
+                
+            }
+            
+            // If there is not T then replace altogether.
+            
+            wxString FinalBirthdayDay;
+            wxString FinalBirthdayMonth;
+            wxString FinalBirthdayYear;
+            
+            if (BirthdayDay < 10){
+                
+                FinalBirthdayDay = wxT("0") + wxString::Format(wxT("%i"), BirthdayDay);
+                
+            } else {
+                
+                FinalBirthdayDay = wxString::Format(wxT("%i"), BirthdayDay);
+                
+            }
+            
+            if (((int)BirthdayMonth + 1) < 10){
+                
+                FinalBirthdayMonth = wxT("0") + wxString::Format(wxT("%i"), ((int)BirthdayMonth + 1));
+                
+            } else {
+                
+                FinalBirthdayMonth = wxString::Format(wxT("%i"), ((int)BirthdayMonth + 1));
+                
+            }
+            
+            if (BirthdayYear == 0){
+                
+                FinalBirthdayYear = wxT("--");
+                
+            } else {
+                
+                FinalBirthdayYear = wxString::Format(wxT("%i"), BirthdayYear);
+                
+            }
+            
+            if (!DataAfterT.IsEmpty()){
+                
+                FinalBirthdayString = FinalBirthdayYear + FinalBirthdayMonth + FinalBirthdayDay + wxT("T") + DataAfterT;
+                
+            } else {
+                
+                FinalBirthdayString = FinalBirthdayYear + FinalBirthdayMonth + FinalBirthdayDay;
+                
+            }
+            
+            if (!FinalBirthdayString.IsEmpty() || !strValue2.IsEmpty()){
+                
+                if (!strValue2.IsEmpty()){
+                    
+                    EscapeString(&strValue2, FALSE);
+                    EscapeString(&strValue, FALSE);
+                    
+                    ContactData.AddRaw(wxT("BDAY") + strValue2 + wxT(";"), FinalBirthdayString);
+                    
+                } else {
+                    
+                    EscapeString(&strValue, FALSE);
+                    
+                    ContactData.AddRaw(wxT("BDAY"), FinalBirthdayString);
+                    
+                }
+                
+            }
+            
+        }
+        
     }
     
     ResetSaveProcessData();
     
     // Process Label.
-
-    strValue3 = AnniversaryAltID; 
-    
-    if (!strValue3.IsEmpty()){
     
-       strValue3.Trim();
-       strValue3.Trim();
-       boolValue2 = TRUE;
-       strValue2.Append(wxT("ALTID=\"") + strValue3 + wxT("\""));
-    
-       boolValue = TRUE;           
+    strValue3 = AnniversaryAltID;
     
+    if (!strValue3.IsEmpty()){
+        
+        strValue3.Trim();
+        strValue3.Trim();
+        boolValue2 = TRUE;
+        strValue2.Append(wxT("ALTID=\"") + strValue3 + wxT("\""));
+        
+        boolValue = TRUE;
+        
     }
-
+    
     //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
-    //strValue2 = 
-
+    //strValue2 =
+    
     // Process Language.
-
+    
     strValue3 = AnniversaryCalScale;
-
+    
     if (!strValue3.IsEmpty()){
+        
+        strValue3.Trim();
+        strValue3.Trim();
+        
+        if (boolValue2 == TRUE){
+            
+            strValue2.Append(wxT(";"));
+            
+        } else {
+            
+            boolValue2 = TRUE;
+            
+        }
+        
+        strValue2.Append(wxT("CALSCALE=") + strValue3);
+        
+        boolValue = TRUE;
+        
+    }
     
-       strValue3.Trim();
-       strValue3.Trim();
-       
-       if (boolValue2 == TRUE){
-       
-               strValue2.Append(wxT(";"));
-       
-       } else {
-       
-               boolValue2 = TRUE;
-       
-       }
-       
-       strValue2.Append(wxT("CALSCALE=") + strValue3);
-    
-       boolValue = TRUE;           
-    
-    }  
-
     // Process Tokens.
-
+    
     strValue2 = AnniversaryTokens;
     
     // Deal with ANNIVERSARY.
     
     if (!txtAnniversary->IsEmpty()){
+        
+        strValue = txtAnniversary->GetValue();
+        
+        if (!strValue.IsEmpty() || !strValue2.IsEmpty()){
+            
+            if (!strValue2.IsEmpty()){
+                
+                EscapeString(&strValue2, FALSE);
+                EscapeString(&strValue, FALSE);
+                
+                ContactData.AddRaw(wxT("ANNIVERSARY;VALUE=text;") + strValue2 + wxT(";"), strValue);
+                
+            } else {
+                
+                EscapeString(&strValue, FALSE);
+                
+                ContactData.AddRaw(wxT("ANNIVERSARY;VALUE=text"), strValue);
+                
+            }
+            
+        }
+        
+    } else {
+        
+        // Look for T and replace data before this.
+        
+        // Get Day, Month & Year.
+        
+        wxDateTime AnniversaryDate;
+        wxDateTime::Month AnniversaryMonth;
+        int AnniversaryDay;
+        int AnniversaryYear;
+        wxString DataBeforeT;
+        wxString DataAfterT;
+        wxString FinalAnniversaryString;
+        bool ProcessDataAfterT = FALSE;
+        
+        AnniversaryDate = dapAnniversary->GetValue();
+        
+        if (AnniversaryDate.IsValid()){
+            
+            AnniversaryDay = AnniversaryDate.GetDay();
+            AnniversaryMonth = AnniversaryDate.GetMonth();
+            AnniversaryYear = AnniversaryDate.GetYear();
+            
+            // Look for T and replace data before this.
+            
+            wxStringTokenizer wSTDate(Anniversary, wxT("T"));
+            
+            while (wSTDate.HasMoreTokens()){
+                
+                if (ProcessDataAfterT == FALSE){
+                    
+                    DataBeforeT = wSTDate.GetNextToken();
+                    ProcessDataAfterT = TRUE;
+                    
+                } else {
+                    
+                    DataAfterT = wSTDate.GetNextToken();
+                    break;
+                    
+                }
+                
+            }
+            
+            // If there is not T then replace altogether.
+            
+            wxString FinalAnniversaryDay;
+            wxString FinalAnniversaryMonth;
+            wxString FinalAnniversaryYear;
+            
+            if (AnniversaryDay < 10){
+                
+                FinalAnniversaryDay = wxT("0") + wxString::Format(wxT("%i"), AnniversaryDay);
+                
+            } else {
+                
+                FinalAnniversaryDay = wxString::Format(wxT("%i"), AnniversaryDay);
+                
+            }
+            
+            if (((int)AnniversaryMonth + 1) < 10){
+                
+                FinalAnniversaryMonth = wxT("0") + wxString::Format(wxT("%i"), ((int)AnniversaryMonth + 1));
+                
+            } else {
+                
+                FinalAnniversaryMonth = wxString::Format(wxT("%i"), ((int)AnniversaryMonth + 1));
+                
+            }
+            
+            if (AnniversaryYear == 0){
+                
+                FinalAnniversaryYear = wxT("--");
+                
+            } else {
+                
+                FinalAnniversaryYear = wxString::Format(wxT("%i"), AnniversaryYear);
+                
+            }
+            
+            if (!DataAfterT.IsEmpty()){
+                
+                FinalAnniversaryString = FinalAnniversaryYear + FinalAnniversaryMonth + FinalAnniversaryDay + wxT("T") + DataAfterT;
+                
+            } else {
+                
+                FinalAnniversaryString = FinalAnniversaryYear + FinalAnniversaryMonth + FinalAnniversaryDay;
+                
+            }
+            
+            if (!FinalAnniversaryString.IsEmpty() || !strValue2.IsEmpty()){
+                
+                if (!strValue2.IsEmpty()){
+                    
+                    EscapeString(&strValue2, FALSE);
+                    EscapeString(&strValue, FALSE);
+                    
+                    ContactData.AddRaw(wxT("ANNIVERSARY") + strValue2 + wxT(";"), FinalAnniversaryString);
+                    
+                } else {
+                    
+                    EscapeString(&strValue, FALSE);
+                    
+                    ContactData.AddRaw(wxT("ANNIVERSARY"), FinalAnniversaryString);
+                    
+                }
+                
+            }
+            
+        }
+        
+    }
     
-       strValue = txtAnniversary->GetValue();
+    // Setup the addresses (General, Home, Business).
     
-       if (!strValue.IsEmpty() || !strValue2.IsEmpty()){
+    //intValue = GeneralAddressList.size();
+    ResetSaveProcessData();
     
-               if (!strValue2.IsEmpty()){
-       
-                   EscapeString(&strValue2, FALSE);
-                   EscapeString(&strValue, FALSE);
-       
-                   ContactData.AddRaw(wxT("ANNIVERSARY;VALUE=text;") + strValue2 + wxT(";"), strValue);
-       
-               } else {
-       
-                   EscapeString(&strValue, FALSE);
-       
-                   ContactData.AddRaw(wxT("ANNIVERSARY;VALUE=text"), strValue);
-       
-               }
+    for (std::map<int,wxString>::iterator iter = GeneralAddressList.begin();
+         iter != GeneralAddressList.end(); ++iter){
+        
+        int intSeekValue = iter->first;
+        
+        wxString strAddressString;
+        wxString strAddressFinalValue;
+        std::map<int, wxString>::iterator iterValue;
+        
+        strAddressString.Append(wxT(";;"));
+        
+        // Get Address
+        
+        iterValue = GeneralAddressList.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        strAddressFinalValue.Clear();
+        
+        // Get Town
+        
+        iterValue = GeneralAddressListTown.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        strAddressFinalValue.Clear();
+        
+        // Get County
+        
+        iterValue = GeneralAddressListCounty.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        strAddressFinalValue.Clear();
+        
+        // Get Post Code
+        
+        iterValue = GeneralAddressListPostCode.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        strAddressFinalValue.Clear();
+        
+        // Get Country
+        
+        iterValue = GeneralAddressListCountry.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        strAddressString.Append(strAddressFinalValue);
+        strAddressFinalValue.Clear();
+        
+        ProcessSaveData(wxT("ADR"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &strAddressString, &ContactData,
+                        wxT("LABEL"), &GeneralAddressListLabel,
+                        wxT("LANGUAGE"), &GeneralAddressListLang,
+                        wxT("ALTID"), &GeneralAddressListAltID,
+                        wxT("PID"), &GeneralAddressListPID,
+                        wxT("GEO"), &GeneralAddressListGeo,
+                        wxT("TZ"), &GeneralAddressListTimezone,
+                        wxT("MEDIATYPE"), &GeneralAddressListMediatype,
+                        wxT("PREF"), &GeneralAddressListPref,
+                        wxT(""), &GeneralAddressListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
-       }
+    ResetSaveProcessData();
     
-    } else {
+    for (std::map<int,wxString>::iterator iter = HomeAddressList.begin();
+         iter != HomeAddressList.end(); ++iter){
+        
+        int intSeekValue = iter->first;
+        
+        wxString strAddressString;
+        wxString strAddressFinalValue;
+        std::map<int, wxString>::iterator iterValue;
+        
+        strAddressString.Append(wxT(";;"));
+        
+        // Get Address
+        
+        iterValue = HomeAddressList.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        
+        // Get Town
+        
+        iterValue = HomeAddressListTown.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        
+        // Get County
+        
+        iterValue = HomeAddressListCounty.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        
+        // Get Post Code
+        
+        iterValue = HomeAddressListPostCode.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        
+        // Get Country
+        
+        iterValue = HomeAddressListCountry.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressString.Append(strAddressFinalValue);
+        
+        ProcessSaveData(wxT("ADR;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &strAddressString, &ContactData,
+                        wxT("LABEL"), &HomeAddressListLabel,
+                        wxT("LANGUAGE"), &HomeAddressListLang,
+                        wxT("ALTID"), &HomeAddressListAltID,
+                        wxT("PID"), &HomeAddressListPID,
+                        wxT("GEO"), &HomeAddressListGeo,
+                        wxT("TZ"), &HomeAddressListTimezone,
+                        wxT("MEDIATYPE"), &HomeAddressListMediatype,
+                        wxT("PREF"), &HomeAddressListPref,
+                        wxT(""), &HomeAddressListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
-       // Look for T and replace data before this.
-       
-       // Get Day, Month & Year.
-       
-       wxDateTime AnniversaryDate;
-       wxDateTime::Month AnniversaryMonth;
-       int AnniversaryDay;
-       int AnniversaryYear;
-       wxString DataBeforeT;
-       wxString DataAfterT;
-       wxString FinalAnniversaryString;
-       bool ProcessDataAfterT = FALSE;
-       
-       AnniversaryDate = dapAnniversary->GetValue();
-       
-       if (AnniversaryDate.IsValid()){ 
-
-               AnniversaryDay = AnniversaryDate.GetDay();
-               AnniversaryMonth = AnniversaryDate.GetMonth();
-               AnniversaryYear = AnniversaryDate.GetYear();
-       
-               // Look for T and replace data before this.
-       
-               wxStringTokenizer wSTDate(Anniversary, wxT("T"));
-       
-               while (wSTDate.HasMoreTokens()){
-       
-                       if (ProcessDataAfterT == FALSE){
-       
-                               DataBeforeT = wSTDate.GetNextToken();
-                               ProcessDataAfterT = TRUE;
-               
-                       } else {
-               
-                               DataAfterT = wSTDate.GetNextToken();
-                               break;
-               
-                       }
-       
-               }
-       
-               // If there is not T then replace altogether.
-    
-               wxString FinalAnniversaryDay;
-               wxString FinalAnniversaryMonth;
-               wxString FinalAnniversaryYear;
-               
-               if (AnniversaryDay < 10){
-               
-                       FinalAnniversaryDay = wxT("0") + wxString::Format(wxT("%i"), AnniversaryDay);
-               
-               } else {
-               
-                       FinalAnniversaryDay = wxString::Format(wxT("%i"), AnniversaryDay);
-               
-               }
-       
-               if (((int)AnniversaryMonth + 1) < 10){
-               
-                       FinalAnniversaryMonth = wxT("0") + wxString::Format(wxT("%i"), ((int)AnniversaryMonth + 1));
-               
-               } else {
-       
-                       FinalAnniversaryMonth = wxString::Format(wxT("%i"), ((int)AnniversaryMonth + 1));
-               
-               }
-               
-               if (AnniversaryYear == 0){
-               
-                       FinalAnniversaryYear = wxT("--");
-               
-               } else {
-               
-                       FinalAnniversaryYear = wxString::Format(wxT("%i"), AnniversaryYear);
-               
-               }    
-    
-               if (!DataAfterT.IsEmpty()){
-               
-                       FinalAnniversaryString = FinalAnniversaryYear + FinalAnniversaryMonth + FinalAnniversaryDay + wxT("T") + DataAfterT;
-       
-               } else {
-       
-                       FinalAnniversaryString = FinalAnniversaryYear + FinalAnniversaryMonth + FinalAnniversaryDay;
-       
-               }
-       
-               if (!FinalAnniversaryString.IsEmpty() || !strValue2.IsEmpty()){
-    
-                       if (!strValue2.IsEmpty()){
-       
-                           EscapeString(&strValue2, FALSE);
-                           EscapeString(&strValue, FALSE);
-       
-                           ContactData.AddRaw(wxT("ANNIVERSARY") + strValue2 + wxT(";"), FinalAnniversaryString);
-       
-                       } else {
-       
-                           EscapeString(&strValue, FALSE);
-       
-                           ContactData.AddRaw(wxT("ANNIVERSARY"), FinalAnniversaryString);
-       
-                       }
-    
-               }
-       
-       }
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = BusinessAddressList.begin();
+         iter != BusinessAddressList.end(); ++iter){
+        
+        int intSeekValue = iter->first;
+        
+        wxString strAddressString;
+        wxString strAddressFinalValue;
+        std::map<int, wxString>::iterator iterValue;
+        
+        strAddressString.Append(wxT(";;"));
+        
+        // Get Address
+        
+        iterValue = BusinessAddressList.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        
+        // Get Town
+        
+        iterValue = BusinessAddressListTown.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        
+        // Get County
+        
+        iterValue = BusinessAddressListCounty.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        
+        // Get Post Code
+        
+        iterValue = BusinessAddressListPostCode.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressString.Append(strAddressFinalValue + wxT(";"));
+        
+        // Get Country
+        
+        iterValue = BusinessAddressListCountry.find(intSeekValue);
+        strAddressFinalValue = iterValue->second;
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressString.Append(strAddressFinalValue);
+        
+        ProcessSaveData(wxT("ADR;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &strAddressString, &ContactData,
+                        wxT("LABEL"), &BusinessAddressListLabel,
+                        wxT("LANGUAGE"), &BusinessAddressListLang,
+                        wxT("ALTID"), &BusinessAddressListAltID,
+                        wxT("PID"), &BusinessAddressListPID,
+                        wxT("GEO"), &BusinessAddressListGeo,
+                        wxT("TZ"), &BusinessAddressListTimezone,
+                        wxT("MEDIATYPE"), &BusinessAddressListMediatype,
+                        wxT("PREF"), &BusinessAddressListPref,
+                        wxT(""), &BusinessAddressListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    // Setup the addresses (General, Home, Business).
+    // Sort out nicknames (if any).
     
-    //intValue = GeneralAddressList.size();
-    ResetSaveProcessData();       
-    
-    for (std::map<int,wxString>::iterator iter = GeneralAddressList.begin(); 
-        iter != GeneralAddressList.end(); ++iter){
-       
-       int intSeekValue = iter->first;
-       
-       wxString strAddressString;      
-       wxString strAddressFinalValue;
-       std::map<int, wxString>::iterator iterValue;    
-
-       strAddressString.Append(wxT(";;"));
-
-       // Get Address
-
-       iterValue = GeneralAddressList.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       strAddressFinalValue.Clear();
-       
-       // Get Town
-
-       iterValue = GeneralAddressListTown.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       strAddressFinalValue.Clear();
-       
-       // Get County
-
-       iterValue = GeneralAddressListCounty.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       strAddressFinalValue.Clear();
-       
-       // Get Post Code
-
-       iterValue = GeneralAddressListPostCode.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       strAddressFinalValue.Clear();
-       
-       // Get Country
-       
-       iterValue = GeneralAddressListCountry.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       strAddressString.Append(strAddressFinalValue);
-       strAddressFinalValue.Clear();
-       
-       ProcessSaveData(wxT("ADR"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &strAddressString, &ContactData,
-               wxT("LABEL"), &GeneralAddressListLabel,
-               wxT("LANGUAGE"), &GeneralAddressListLang,
-               wxT("ALTID"), &GeneralAddressListAltID,
-               wxT("PID"), &GeneralAddressListPID,
-               wxT("GEO"), &GeneralAddressListGeo,
-               wxT("TZ"), &GeneralAddressListTimezone,
-               wxT("MEDIATYPE"), &GeneralAddressListMediatype,
-               wxT("PREF"), &GeneralAddressListPref,
-               wxT(""), &GeneralAddressListTokens );
-       
-       ResetSaveProcessData();
+    for (std::map<int,wxString>::iterator iter = GeneralNicknamesList.begin();
+         iter != GeneralNicknamesList.end(); ++iter){
+        
+        intValue2 = iter->first;
+        
+        // Process Alternative ID.
+        
+        ProcessSaveData(wxT("NICKNAME"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &GeneralNicknamesList, &ContactData,
+                        wxT("LANGUAGE"), &GeneralNicknamesListLanguage,
+                        wxT("ALTID"), &GeneralNicknamesListAltID,
+                        wxT("PID"), &GeneralNicknamesListPID,
+                        wxT("PREF"), &GeneralNicknamesListPref,
+                        wxT(""), &GeneralNicknamesListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
+    
+    ResetSaveProcessData();
+    
+    for (std::map<int,wxString>::iterator iter = HomeNicknamesList.begin();
+         iter != HomeNicknamesList.end(); ++iter){
+        
+        ProcessSaveData(wxT("NICKNAME;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &HomeNicknamesList, &ContactData,
+                        wxT("LANGUAGE"), &HomeNicknamesListLanguage,
+                        wxT("ALTID"), &HomeNicknamesListAltID,
+                        wxT("PID"), &HomeNicknamesListPID,
+                        wxT("PREF"), &HomeNicknamesListPref,
+                        wxT(""), &HomeNicknamesListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
+    ResetSaveProcessData();
+    
+    for (std::map<int,wxString>::iterator iter = BusinessNicknamesList.begin();
+         iter != BusinessNicknamesList.end(); ++iter){
+        
+        ProcessSaveData(wxT("NICKNAME;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &BusinessNicknamesList, &ContactData,
+                        wxT("LANGUAGE"), &BusinessNicknamesListLanguage,
+                        wxT("ALTID"), &BusinessNicknamesListAltID,
+                        wxT("PID"), &BusinessNicknamesListPID,
+                        wxT("PREF"), &BusinessNicknamesListPref,
+                        wxT(""), &BusinessNicknamesListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
     ResetSaveProcessData();
     
-    for (std::map<int,wxString>::iterator iter = HomeAddressList.begin(); 
-        iter != HomeAddressList.end(); ++iter){
-    
-       int intSeekValue = iter->first;
-       
-       wxString strAddressString;      
-       wxString strAddressFinalValue;
-       std::map<int, wxString>::iterator iterValue;    
-
-       strAddressString.Append(wxT(";;"));
-
-       // Get Address
-
-       iterValue = HomeAddressList.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       
-       // Get Town
-
-       iterValue = HomeAddressListTown.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       
-       // Get County
-
-       iterValue = HomeAddressListCounty.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       
-       // Get Post Code
-
-       iterValue = HomeAddressListPostCode.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       
-       // Get Country
-       
-       iterValue = HomeAddressListCountry.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressString.Append(strAddressFinalValue);
-    
-       ProcessSaveData(wxT("ADR;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &strAddressString, &ContactData,
-               wxT("LABEL"), &HomeAddressListLabel,
-               wxT("LANGUAGE"), &HomeAddressListLang,
-               wxT("ALTID"), &HomeAddressListAltID,
-               wxT("PID"), &HomeAddressListPID,
-               wxT("GEO"), &HomeAddressListGeo,
-               wxT("TZ"), &HomeAddressListTimezone,
-               wxT("MEDIATYPE"), &HomeAddressListMediatype,
-               wxT("PREF"), &HomeAddressListPref,
-               wxT(""), &HomeAddressListTokens );
-       
-       ResetSaveProcessData();
+    // Sort out email (general, home and business).
     
+    for (std::map<int,wxString>::iterator iter = GeneralEmailList.begin();
+         iter != GeneralEmailList.end(); ++iter){
+        
+        //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
+        //strValue2 =
+        
+        wxString strAddressFinalValue;
+        std::map<int, wxString>::iterator iterValue;
+        
+        ProcessSaveData(wxT("EMAIL"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &GeneralEmailList, &ContactData,
+                        wxT("ALTID"), &GeneralEmailListAltID,
+                        wxT("PID"), &GeneralEmailListPID,
+                        wxT("PREF"), &GeneralEmailListPref,
+                        wxT(""), &GeneralEmailListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
     ResetSaveProcessData();
     
-    for (std::map<int,wxString>::iterator iter = BusinessAddressList.begin(); 
-        iter != BusinessAddressList.end(); ++iter){
-    
-       int intSeekValue = iter->first;
-       
-       wxString strAddressString;
-       wxString strAddressFinalValue;
-       std::map<int, wxString>::iterator iterValue;    
-
-       strAddressString.Append(wxT(";;"));
-
-       // Get Address
-
-       iterValue = BusinessAddressList.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       
-       // Get Town
-
-       iterValue = BusinessAddressListTown.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       
-       // Get County
-
-       iterValue = BusinessAddressListCounty.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       
-       // Get Post Code
-
-       iterValue = BusinessAddressListPostCode.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressString.Append(strAddressFinalValue + wxT(";"));
-       
-       // Get Country
-       
-       iterValue = BusinessAddressListCountry.find(intSeekValue);
-       strAddressFinalValue = iterValue->second;
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressString.Append(strAddressFinalValue);
-       
-       ProcessSaveData(wxT("ADR;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &strAddressString, &ContactData,
-               wxT("LABEL"), &BusinessAddressListLabel,
-               wxT("LANGUAGE"), &BusinessAddressListLang,
-               wxT("ALTID"), &BusinessAddressListAltID,
-               wxT("PID"), &BusinessAddressListPID,
-               wxT("GEO"), &BusinessAddressListGeo,
-               wxT("TZ"), &BusinessAddressListTimezone,
-               wxT("MEDIATYPE"), &BusinessAddressListMediatype,
-               wxT("PREF"), &BusinessAddressListPref,
-               wxT(""), &BusinessAddressListTokens );
-       
-       ResetSaveProcessData();
+    for (std::map<int,wxString>::iterator iter = HomeEmailList.begin();
+         iter != HomeEmailList.end(); ++iter){
+        
+        //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
+        //strValue2 =
+        
+        ProcessSaveData(wxT("EMAIL;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &HomeEmailList, &ContactData,
+                        wxT("ALTID"), &HomeEmailListAltID,
+                        wxT("PID"), &HomeEmailListPID,
+                        wxT("PREF"), &HomeEmailListPref,
+                        wxT(""), &HomeEmailListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
+    
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = BusinessEmailList.begin();
+         iter != BusinessEmailList.end(); ++iter){
+        
+        //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
+        //strValue2 =
+        
+        ProcessSaveData(wxT("EMAIL;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &BusinessEmailList, &ContactData,
+                        wxT("ALTID"), &BusinessEmailListAltID,
+                        wxT("PID"), &BusinessEmailListPID,
+                        wxT("PREF"), &BusinessEmailListPref,
+                        wxT(""), &BusinessEmailListTokens );
+        
+        ResetSaveProcessData();
+        
     }
-
-    // Sort out nicknames (if any).
     
-    for (std::map<int,wxString>::iterator iter = GeneralNicknamesList.begin();
-        iter != GeneralNicknamesList.end(); ++iter){
-       
-       intValue2 = iter->first;
-       
-       // Process Alternative ID.
-       
-       ProcessSaveData(wxT("NICKNAME"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &GeneralNicknamesList, &ContactData,
-               wxT("LANGUAGE"), &GeneralNicknamesListLanguage,
-               wxT("ALTID"), &GeneralNicknamesListAltID,
-               wxT("PID"), &GeneralNicknamesListPID,
-               wxT("PREF"), &GeneralNicknamesListPref,
-               wxT(""), &GeneralNicknamesListTokens );
-
-       ResetSaveProcessData();
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = GeneralIMList.begin();
+         iter != GeneralIMList.end(); ++iter){
+        
+        intValue2 = iter->first;
+        
+        // Process Alternative ID.
+        
+        ProcessSaveData(wxT("IMPP"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &GeneralIMList, &ContactData,
+                        wxT("ALTID"), &GeneralIMListAltID,
+                        wxT("PID"), &GeneralIMListPID,
+                        wxT("MEDIATYPE"), &GeneralIMListMediatype,
+                        wxT("PREF"), &GeneralIMListPref,
+                        wxT(""), &GeneralIMListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
     ResetSaveProcessData();
     
-    for (std::map<int,wxString>::iterator iter = HomeNicknamesList.begin();
-        iter != HomeNicknamesList.end(); ++iter){
-       
-       ProcessSaveData(wxT("NICKNAME;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &HomeNicknamesList, &ContactData,
-               wxT("LANGUAGE"), &HomeNicknamesListLanguage,
-               wxT("ALTID"), &HomeNicknamesListAltID,
-               wxT("PID"), &HomeNicknamesListPID,
-               wxT("PREF"), &HomeNicknamesListPref,
-               wxT(""), &HomeNicknamesListTokens );
-       
-       ResetSaveProcessData();
+    for (std::map<int,wxString>::iterator iter = HomeIMList.begin();
+         iter != HomeIMList.end(); ++iter){
+        
+        ProcessSaveData(wxT("IMPP;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &HomeIMList, &ContactData,
+                        wxT("ALTID"), &HomeIMListAltID,
+                        wxT("PID"), &HomeIMListPID,
+                        wxT("MEDIATYPE"), &HomeIMListMediatype,
+                        wxT("PREF"), &HomeIMListPref,
+                        wxT(""), &HomeIMListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
+    ResetSaveProcessData();
+    
+    for (std::map<int,wxString>::iterator iter = BusinessIMList.begin();
+         iter != BusinessIMList.end(); ++iter){
+        
+        ProcessSaveData(wxT("IMPP;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &BusinessIMList, &ContactData,
+                        wxT("ALTID"), &BusinessIMListAltID,
+                        wxT("PID"), &BusinessIMListPID,
+                        wxT("MEDIATYPE"), &BusinessIMListMediatype,
+                        wxT("PREF"), &BusinessIMListPref,
+                        wxT(""), &BusinessIMListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
     ResetSaveProcessData();
     
-    for (std::map<int,wxString>::iterator iter = BusinessNicknamesList.begin();
-        iter != BusinessNicknamesList.end(); ++iter){
-       
-       ProcessSaveData(wxT("NICKNAME;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &BusinessNicknamesList, &ContactData,
-               wxT("LANGUAGE"), &BusinessNicknamesListLanguage,
-               wxT("ALTID"), &BusinessNicknamesListAltID,
-               wxT("PID"), &BusinessNicknamesListPID,
-               wxT("PREF"), &BusinessNicknamesListPref,
-               wxT(""), &BusinessNicknamesListTokens );
-       
-       ResetSaveProcessData();
+    for (std::map<int,wxString>::iterator iter = GeneralTelephoneList.begin();
+         iter != GeneralTelephoneList.end(); ++iter){
+        
+        wxString strAddressFinalValue = iter->second;
+        
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressFinalValue.insert(0, wxT("tel:"));
+        
+        ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &strAddressFinalValue, &ContactData,
+                        wxT("ALTID"), &GeneralTelephoneListAltID,
+                        wxT("PID"), &GeneralTelephoneListPID,
+                        wxT("TYPE"), &GeneralTelephoneListType,
+                        wxT("PREF"), &GeneralTelephoneListPref,
+                        wxT(""), &GeneralTelephoneListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
+    
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = HomeTelephoneList.begin();
+         iter != HomeTelephoneList.end(); ++iter){
+        
+        wxString strAddressFinalValue = iter->second;
+        
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressFinalValue.insert(0, wxT("tel:"));
+        
+        ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &strAddressFinalValue, &ContactData,
+                        wxT("ALTID"), &HomeTelephoneListAltID,
+                        wxT("PID"), &HomeTelephoneListPID,
+                        wxT("TYPE"), &HomeTelephoneListType,
+                        wxT("PREF"), &HomeTelephoneListPref,
+                        wxT(""), &HomeTelephoneListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
     ResetSaveProcessData();
-
-    // Sort out email (general, home and business).
     
-    for (std::map<int,wxString>::iterator iter = GeneralEmailList.begin(); 
-        iter != GeneralEmailList.end(); ++iter){
+    for (std::map<int,wxString>::iterator iter = BusinessTelephoneList.begin();
+         iter != BusinessTelephoneList.end(); ++iter){
+        
+        wxString strAddressFinalValue = iter->second;
+        
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressFinalValue.insert(0, wxT("tel:"));
+        
+        ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &strAddressFinalValue, &ContactData,
+                        wxT("ALTID"), &BusinessTelephoneListAltID,
+                        wxT("PID"), &BusinessTelephoneListPID,
+                        wxT("TYPE"), &BusinessTelephoneListType,
+                        wxT("PREF"), &BusinessTelephoneListPref,
+                        wxT(""), &BusinessTelephoneListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
-       //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
-       //strValue2 =   
-       
-       wxString strAddressFinalValue;
-       std::map<int, wxString>::iterator iterValue;
-       
-       ProcessSaveData(wxT("EMAIL"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &GeneralEmailList, &ContactData,
-               wxT("ALTID"), &GeneralEmailListAltID,
-               wxT("PID"), &GeneralEmailListPID,
-               wxT("PREF"), &GeneralEmailListPref,
-               wxT(""), &GeneralEmailListTokens );
-       
-       ResetSaveProcessData();
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = GeneralLanguageList.begin();
+         iter != GeneralLanguageList.end(); ++iter){
+        
+        intValue2 = iter->first;
+        
+        ProcessSaveData(wxT("LANG"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &GeneralLanguageList, &ContactData,
+                        wxT("ALTID"), &GeneralLanguageListAltID,
+                        wxT("PID"), &GeneralLanguageListPID,
+                        wxT("PREF"), &GeneralLanguageListPref,
+                        wxT(""), &GeneralLanguageListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
     ResetSaveProcessData();
     
-    for (std::map<int,wxString>::iterator iter = HomeEmailList.begin(); 
-        iter != HomeEmailList.end(); ++iter){
+    for (std::map<int,wxString>::iterator iter = HomeLanguageList.begin();
+         iter != HomeLanguageList.end(); ++iter){
+        
+        ProcessSaveData(wxT("LANG;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &HomeLanguageList, &ContactData,
+                        wxT("ALTID"), &HomeLanguageListAltID,
+                        wxT("PID"), &HomeLanguageListPID,
+                        wxT("PREF"), &HomeLanguageListPref,
+                        wxT(""), &HomeLanguageListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
-       //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
-       //strValue2 =   
-       
-       ProcessSaveData(wxT("EMAIL;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &HomeEmailList, &ContactData,
-               wxT("ALTID"), &HomeEmailListAltID,
-               wxT("PID"), &HomeEmailListPID,
-               wxT("PREF"), &HomeEmailListPref,
-               wxT(""), &HomeEmailListTokens );
-       
-       ResetSaveProcessData(); 
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = BusinessLanguageList.begin();
+         iter != BusinessLanguageList.end(); ++iter){
+        
+        ProcessSaveData(wxT("LANG;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &BusinessLanguageList, &ContactData,
+                        wxT("ALTID"), &BusinessLanguageListAltID,
+                        wxT("PID"), &BusinessLanguageListPID,
+                        wxT("PREF"), &BusinessLanguageListPref,
+                        wxT(""), &BusinessLanguageListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
     ResetSaveProcessData();
     
-    for (std::map<int,wxString>::iterator iter = BusinessEmailList.begin(); 
-        iter != BusinessEmailList.end(); ++iter){
-    
-       //strValue3 = ContactData.Convert(GeneralAddressList, FALSE);
-       //strValue2 =   
-       
-       ProcessSaveData(wxT("EMAIL;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &BusinessEmailList, &ContactData,
-               wxT("ALTID"), &BusinessEmailListAltID,
-               wxT("PID"), &BusinessEmailListPID,
-               wxT("PREF"), &BusinessEmailListPref,
-               wxT(""), &BusinessEmailListTokens );
-       
-       ResetSaveProcessData();         
-    
-    }    
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = GeneralIMList.begin(); 
-        iter != GeneralIMList.end(); ++iter){  
-       
-       intValue2 = iter->first;        
-       
-       // Process Alternative ID.
-       
-       ProcessSaveData(wxT("IMPP"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &GeneralIMList, &ContactData,
-               wxT("ALTID"), &GeneralIMListAltID,
-               wxT("PID"), &GeneralIMListPID,
-               wxT("MEDIATYPE"), &GeneralIMListMediatype,
-               wxT("PREF"), &GeneralIMListPref,
-               wxT(""), &GeneralIMListTokens );
-       
-       ResetSaveProcessData(); 
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = HomeIMList.begin(); 
-        iter != HomeIMList.end(); ++iter){     
-       
-       ProcessSaveData(wxT("IMPP;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &HomeIMList, &ContactData,
-               wxT("ALTID"), &HomeIMListAltID,
-               wxT("PID"), &HomeIMListPID,
-               wxT("MEDIATYPE"), &HomeIMListMediatype,
-               wxT("PREF"), &HomeIMListPref,
-               wxT(""), &HomeIMListTokens );
-       
-       ResetSaveProcessData();
-    
-    }
-    
-    ResetSaveProcessData();     
-    
-    for (std::map<int,wxString>::iterator iter = BusinessIMList.begin(); 
-        iter != BusinessIMList.end(); ++iter){
-       
-       ProcessSaveData(wxT("IMPP;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &BusinessIMList, &ContactData,
-               wxT("ALTID"), &BusinessIMListAltID,
-               wxT("PID"), &BusinessIMListPID,
-               wxT("MEDIATYPE"), &BusinessIMListMediatype,
-               wxT("PREF"), &BusinessIMListPref,
-               wxT(""), &BusinessIMListTokens );
-       
-       ResetSaveProcessData();
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = GeneralTelephoneList.begin(); 
-        iter != GeneralTelephoneList.end(); ++iter){
-       
-       wxString strAddressFinalValue = iter->second;
-       
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressFinalValue.insert(0, wxT("tel:"));
-       
-       ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &strAddressFinalValue, &ContactData,
-               wxT("ALTID"), &GeneralTelephoneListAltID,
-               wxT("PID"), &GeneralTelephoneListPID,
-               wxT("TYPE"), &GeneralTelephoneListType,
-               wxT("PREF"), &GeneralTelephoneListPref,
-               wxT(""), &GeneralTelephoneListTokens );
-       
-       ResetSaveProcessData();
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = HomeTelephoneList.begin(); 
-        iter != HomeTelephoneList.end(); ++iter){
-       
-       wxString strAddressFinalValue = iter->second;
-       
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressFinalValue.insert(0, wxT("tel:"));
-       
-       ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &strAddressFinalValue, &ContactData,
-               wxT("ALTID"), &HomeTelephoneListAltID,
-               wxT("PID"), &HomeTelephoneListPID,
-               wxT("TYPE"), &HomeTelephoneListType,
-               wxT("PREF"), &HomeTelephoneListPref,
-               wxT(""), &HomeTelephoneListTokens );
-       
-       ResetSaveProcessData();
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = BusinessTelephoneList.begin(); 
-        iter != BusinessTelephoneList.end(); ++iter){
-       
-       wxString strAddressFinalValue = iter->second;
-       
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressFinalValue.insert(0, wxT("tel:"));
-       
-       ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &strAddressFinalValue, &ContactData,
-               wxT("ALTID"), &BusinessTelephoneListAltID,
-               wxT("PID"), &BusinessTelephoneListPID,
-               wxT("TYPE"), &BusinessTelephoneListType,
-               wxT("PREF"), &BusinessTelephoneListPref,
-               wxT(""), &BusinessTelephoneListTokens );
-       
-       ResetSaveProcessData();
+    for (std::map<int,wxString>::iterator iter = GeneralTZList.begin();
+         iter != GeneralTZList.end(); ++iter){
+        
+        ProcessSaveData(wxT("TZ"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &GeneralTZList, &ContactData,
+                        wxT("ALTID"), &GeneralTZListAltID,
+                        wxT("PID"), &GeneralTZListPID,
+                        wxT("MEDIATYPE"), &GeneralTZListMediatype,
+                        wxT("PREF"), &GeneralTZListPref,
+                        wxT(""), &GeneralTZListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
-    }  
+    ResetSaveProcessData();
     
-    ResetSaveProcessData();     
+    for (std::map<int,wxString>::iterator iter = HomeTZList.begin();
+         iter != HomeTZList.end(); ++iter){
+        
+        ProcessSaveData(wxT("TZ;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &HomeTZList, &ContactData,
+                        wxT("ALTID"), &HomeTZListAltID,
+                        wxT("PID"), &HomeTZListPID,
+                        wxT("MEDIATYPE"), &HomeTZListMediatype,
+                        wxT("PREF"), &HomeTZListPref,
+                        wxT(""), &HomeTZListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
-    for (std::map<int,wxString>::iterator iter = GeneralLanguageList.begin(); 
-        iter != GeneralLanguageList.end(); ++iter){
-       
-       intValue2 = iter->first;
-       
-       ProcessSaveData(wxT("LANG"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &GeneralLanguageList, &ContactData,
-               wxT("ALTID"), &GeneralLanguageListAltID,
-               wxT("PID"), &GeneralLanguageListPID,
-               wxT("PREF"), &GeneralLanguageListPref,
-               wxT(""), &GeneralLanguageListTokens );
-       
-       ResetSaveProcessData();
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = BusinessTZList.begin();
+         iter != BusinessTZList.end(); ++iter){
+        
+        ProcessSaveData(wxT("TZ;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &BusinessTZList, &ContactData,
+                        wxT("ALTID"), &BusinessTZListAltID,
+                        wxT("PID"), &BusinessTZListPID,
+                        wxT("MEDIATYPE"), &BusinessTZListMediatype,
+                        wxT("PREF"), &BusinessTZListPref,
+                        wxT(""), &BusinessTZListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    ResetSaveProcessData();    
+    ResetSaveProcessData();
+    
+    for (std::map<int,wxString>::iterator iter = GeneralGeographyList.begin();
+         iter != GeneralGeographyList.end(); ++iter){
+        
+        wxString strAddressFinalValue = iter->second;
+        
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressFinalValue.insert(0, wxT("geo:"));
+        
+        ProcessSaveData(wxT("GEO"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &strAddressFinalValue, &ContactData,
+                        wxT("ALTID"), &GeneralGeographyListAltID,
+                        wxT("PID"), &GeneralGeographyListPID,
+                        wxT("MEDIATYPE"), &GeneralGeographyListMediatype,
+                        wxT("PREF"), &GeneralGeographyListPref,
+                        wxT(""), &GeneralGeographyListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
-    for (std::map<int,wxString>::iterator iter = HomeLanguageList.begin(); 
-        iter != HomeLanguageList.end(); ++iter){
-       
-       ProcessSaveData(wxT("LANG;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &HomeLanguageList, &ContactData,
-               wxT("ALTID"), &HomeLanguageListAltID,
-               wxT("PID"), &HomeLanguageListPID,
-               wxT("PREF"), &HomeLanguageListPref,
-               wxT(""), &HomeLanguageListTokens );
-       
-       ResetSaveProcessData();
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = HomeGeographyList.begin();
+         iter != HomeGeographyList.end(); ++iter){
+        
+        wxString strAddressFinalValue = iter->second;
+        
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressFinalValue.insert(0, wxT("geo:"));
+        
+        ProcessSaveData(wxT("GEO;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &HomeGeographyList, &ContactData,
+                        wxT("ALTID"), &HomeGeographyListAltID,
+                        wxT("PID"), &HomeGeographyListPID,
+                        wxT("MEDIATYPE"), &HomeGeographyListMediatype,
+                        wxT("PREF"), &HomeGeographyListPref,
+                        wxT(""), &HomeGeographyListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    ResetSaveProcessData();    
+    ResetSaveProcessData();
     
-    for (std::map<int,wxString>::iterator iter = BusinessLanguageList.begin(); 
-        iter != BusinessLanguageList.end(); ++iter){
-       
-       ProcessSaveData(wxT("LANG;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &BusinessLanguageList, &ContactData,
-               wxT("ALTID"), &BusinessLanguageListAltID,
-               wxT("PID"), &BusinessLanguageListPID,
-               wxT("PREF"), &BusinessLanguageListPref,
-               wxT(""), &BusinessLanguageListTokens );
-       
-       ResetSaveProcessData();
+    for (std::map<int,wxString>::iterator iter = BusinessGeographyList.begin();
+         iter != BusinessGeographyList.end(); ++iter){
+        
+        wxString strAddressFinalValue = iter->second;
+        
+        ProcessCaptureStrings(&strAddressFinalValue);
+        
+        strAddressFinalValue.insert(0, wxT("geo:"));
+        
+        ProcessSaveData(wxT("GEO;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &BusinessGeographyList, &ContactData,
+                        wxT("ALTID"), &BusinessGeographyListAltID,
+                        wxT("PID"), &BusinessGeographyListPID,
+                        wxT("MEDIATYPE"), &BusinessGeographyListMediatype,
+                        wxT("PREF"), &BusinessGeographyListPref,
+                        wxT(""), &BusinessGeographyListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
+    ResetSaveProcessData();
+    
+    for (std::map<int,wxString>::iterator iter = GeneralRelatedList.begin();
+         iter != GeneralRelatedList.end(); ++iter){
+        
+        ProcessSaveData(wxT("RELATED"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &GeneralRelatedList, &ContactData,
+                        wxT("ALTID"), &GeneralRelatedListAltID,
+                        wxT("PID"), &GeneralRelatedListPID,
+                        wxT("LANGUAGE"), &GeneralRelatedListLanguage,
+                        wxT("TYPE"), &GeneralRelatedListRelType,
+                        wxT("PREF"), &GeneralRelatedListPref,
+                        wxT(""), &GeneralRelatedListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    ResetSaveProcessData();   
+    ResetSaveProcessData();
+    
+    for (std::map<int,wxString>::iterator iter = GeneralWebsiteList.begin();
+         iter != GeneralWebsiteList.end(); ++iter){
+        
+        ProcessSaveData(wxT("URL"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &GeneralWebsiteList, &ContactData,
+                        wxT("ALTID"), &GeneralWebsiteListAltID,
+                        wxT("PID"), &GeneralWebsiteListPID,
+                        wxT("MEDIATYPE"), &GeneralWebsiteListMediatype,
+                        wxT("PREF"), &GeneralWebsiteListPref,
+                        wxT(""), &GeneralWebsiteListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
+    
+    ResetSaveProcessData();
+    
+    for (std::map<int,wxString>::iterator iter = HomeWebsiteList.begin();
+         iter != HomeWebsiteList.end(); ++iter){
+        
+        ProcessSaveData(wxT("URL;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &HomeWebsiteList, &ContactData,
+                        wxT("ALTID"), &HomeWebsiteListAltID,
+                        wxT("PID"), &HomeWebsiteListPID,
+                        wxT("MEDIATYPE"), &HomeWebsiteListMediatype,
+                        wxT("PREF"), &HomeWebsiteListPref,
+                        wxT(""), &HomeWebsiteListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
-    for (std::map<int,wxString>::iterator iter = GeneralTZList.begin(); 
-        iter != GeneralTZList.end(); ++iter){
-       
-       ProcessSaveData(wxT("TZ"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &GeneralTZList, &ContactData,
-               wxT("ALTID"), &GeneralTZListAltID,
-               wxT("PID"), &GeneralTZListPID,
-               wxT("MEDIATYPE"), &GeneralTZListMediatype,
-               wxT("PREF"), &GeneralTZListPref,
-               wxT(""), &GeneralTZListTokens );
-       
-       ResetSaveProcessData();    
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = HomeTZList.begin(); 
-        iter != HomeTZList.end(); ++iter){
-       
-       ProcessSaveData(wxT("TZ;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &HomeTZList, &ContactData,
-               wxT("ALTID"), &HomeTZListAltID,
-               wxT("PID"), &HomeTZListPID,
-               wxT("MEDIATYPE"), &HomeTZListMediatype,
-               wxT("PREF"), &HomeTZListPref,
-               wxT(""), &HomeTZListTokens );
-       
-       ResetSaveProcessData();
-       
-    } 
-       
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = BusinessTZList.begin(); 
-        iter != BusinessTZList.end(); ++iter){
-       
-       ProcessSaveData(wxT("TZ;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &BusinessTZList, &ContactData,
-               wxT("ALTID"), &BusinessTZListAltID,
-               wxT("PID"), &BusinessTZListPID,
-               wxT("MEDIATYPE"), &BusinessTZListMediatype,
-               wxT("PREF"), &BusinessTZListPref,
-               wxT(""), &BusinessTZListTokens );
-       
-       ResetSaveProcessData();
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = GeneralGeographyList.begin(); 
-        iter != GeneralGeographyList.end(); ++iter){
-       
-       wxString strAddressFinalValue = iter->second;
-       
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressFinalValue.insert(0, wxT("geo:"));
-       
-       ProcessSaveData(wxT("GEO"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &strAddressFinalValue, &ContactData,
-               wxT("ALTID"), &GeneralGeographyListAltID,
-               wxT("PID"), &GeneralGeographyListPID,
-               wxT("MEDIATYPE"), &GeneralGeographyListMediatype,
-               wxT("PREF"), &GeneralGeographyListPref,
-               wxT(""), &GeneralGeographyListTokens ); 
-
-       ResetSaveProcessData();
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = HomeGeographyList.begin(); 
-        iter != HomeGeographyList.end(); ++iter){
-       
-       wxString strAddressFinalValue = iter->second;
-       
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressFinalValue.insert(0, wxT("geo:"));
-       
-       ProcessSaveData(wxT("GEO;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &HomeGeographyList, &ContactData,
-               wxT("ALTID"), &HomeGeographyListAltID,
-               wxT("PID"), &HomeGeographyListPID,
-               wxT("MEDIATYPE"), &HomeGeographyListMediatype,
-               wxT("PREF"), &HomeGeographyListPref,
-               wxT(""), &HomeGeographyListTokens );
-       
-       ResetSaveProcessData();
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = BusinessGeographyList.begin(); 
-        iter != BusinessGeographyList.end(); ++iter){
-       
-       wxString strAddressFinalValue = iter->second;
-       
-       ProcessCaptureStrings(&strAddressFinalValue);
-       
-       strAddressFinalValue.insert(0, wxT("geo:"));
-       
-       ProcessSaveData(wxT("GEO;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &BusinessGeographyList, &ContactData,
-               wxT("ALTID"), &BusinessGeographyListAltID,
-               wxT("PID"), &BusinessGeographyListPID,
-               wxT("MEDIATYPE"), &BusinessGeographyListMediatype,
-               wxT("PREF"), &BusinessGeographyListPref,
-               wxT(""), &BusinessGeographyListTokens );
-       
-       ResetSaveProcessData();  
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = GeneralRelatedList.begin(); 
-        iter != GeneralRelatedList.end(); ++iter){
-       
-       ProcessSaveData(wxT("RELATED"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &GeneralRelatedList, &ContactData,
-               wxT("ALTID"), &GeneralRelatedListAltID,
-               wxT("PID"), &GeneralRelatedListPID,
-               wxT("LANGUAGE"), &GeneralRelatedListLanguage,
-               wxT("TYPE"), &GeneralRelatedListRelType,
-               wxT("PREF"), &GeneralRelatedListPref,
-               wxT(""), &GeneralRelatedListTokens );
-       
-       ResetSaveProcessData();
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = GeneralWebsiteList.begin(); 
-        iter != GeneralWebsiteList.end(); ++iter){
-       
-       ProcessSaveData(wxT("URL"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &GeneralWebsiteList, &ContactData,
-               wxT("ALTID"), &GeneralWebsiteListAltID,
-               wxT("PID"), &GeneralWebsiteListPID,
-               wxT("MEDIATYPE"), &GeneralWebsiteListMediatype,
-               wxT("PREF"), &GeneralWebsiteListPref,
-               wxT(""), &GeneralWebsiteListTokens );
-       
-       ResetSaveProcessData();
-    
-    }
-    
-    ResetSaveProcessData();     
-    
-    for (std::map<int,wxString>::iterator iter = HomeWebsiteList.begin(); 
-        iter != HomeWebsiteList.end(); ++iter){
-       
-       ProcessSaveData(wxT("URL;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &HomeWebsiteList, &ContactData,
-               wxT("ALTID"), &HomeWebsiteListAltID,
-               wxT("PID"), &HomeWebsiteListPID,
-               wxT("MEDIATYPE"), &HomeWebsiteListMediatype,
-               wxT("PREF"), &HomeWebsiteListPref,
-               wxT(""), &HomeWebsiteListTokens );
-       
-       ResetSaveProcessData();   
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = BusinessWebsiteList.begin(); 
-        iter != BusinessWebsiteList.end(); ++iter){
-       
-       ProcessSaveData(wxT("URL;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &BusinessWebsiteList, &ContactData,
-               wxT("ALTID"), &BusinessWebsiteListAltID,
-               wxT("PID"), &BusinessWebsiteListPID,
-               wxT("MEDIATYPE"), &BusinessWebsiteListMediatype,
-               wxT("PREF"), &BusinessWebsiteListPref,
-               wxT(""), &BusinessWebsiteListTokens );
-       
-       ResetSaveProcessData();    
-    
-    }
-    
-    ResetSaveProcessData();    
-    
-    for (std::map<int,wxString>::iterator iter = GeneralTitleList.begin(); 
-        iter != GeneralTitleList.end(); ++iter){
-       
-       ProcessSaveData(wxT("TITLE"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &GeneralTitleList, &ContactData,
-               wxT("ALTID"), &GeneralTitleListAltID,
-               wxT("PID"), &GeneralTitleListPID,
-               wxT("LANGUAGE"), &GeneralTitleListLanguage,
-               wxT("PREF"), &GeneralTitleListPref,
-               wxT(""), &GeneralTitleListTokens );
-       
-       ResetSaveProcessData();
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = BusinessWebsiteList.begin();
+         iter != BusinessWebsiteList.end(); ++iter){
+        
+        ProcessSaveData(wxT("URL;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &BusinessWebsiteList, &ContactData,
+                        wxT("ALTID"), &BusinessWebsiteListAltID,
+                        wxT("PID"), &BusinessWebsiteListPID,
+                        wxT("MEDIATYPE"), &BusinessWebsiteListMediatype,
+                        wxT("PREF"), &BusinessWebsiteListPref,
+                        wxT(""), &BusinessWebsiteListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    ResetSaveProcessData();  
+    ResetSaveProcessData();
     
-    for (std::map<int,wxString>::iterator iter = HomeTitleList.begin(); 
-        iter != HomeTitleList.end(); ++iter){
-       
-       ProcessSaveData(wxT("TITLE;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &HomeTitleList, &ContactData,
-               wxT("ALTID"), &HomeTitleListAltID,
-               wxT("PID"), &HomeTitleListPID,
-               wxT("LANGUAGE"), &HomeTitleListLanguage,
-               wxT("PREF"), &HomeTitleListPref,
-               wxT(""), &HomeTitleListTokens );
-       
-       ResetSaveProcessData();
-    
-    }    
+    for (std::map<int,wxString>::iterator iter = GeneralTitleList.begin();
+         iter != GeneralTitleList.end(); ++iter){
+        
+        ProcessSaveData(wxT("TITLE"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &GeneralTitleList, &ContactData,
+                        wxT("ALTID"), &GeneralTitleListAltID,
+                        wxT("PID"), &GeneralTitleListPID,
+                        wxT("LANGUAGE"), &GeneralTitleListLanguage,
+                        wxT("PREF"), &GeneralTitleListPref,
+                        wxT(""), &GeneralTitleListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
     ResetSaveProcessData();
     
-    for (std::map<int,wxString>::iterator iter = BusinessTitleList.begin(); 
-        iter != BusinessTitleList.end(); ++iter){
-       
-       ProcessSaveData(wxT("TITLE;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &BusinessTitleList, &ContactData,
-               wxT("ALTID"), &BusinessTitleListAltID,
-               wxT("PID"), &BusinessTitleListPID,
-               wxT("LANGUAGE"), &BusinessTitleListLanguage,
-               wxT("PREF"), &BusinessTitleListPref,
-               wxT(""), &BusinessTitleListTokens );
-       
-       ResetSaveProcessData();
+    for (std::map<int,wxString>::iterator iter = HomeTitleList.begin();
+         iter != HomeTitleList.end(); ++iter){
+        
+        ProcessSaveData(wxT("TITLE;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &HomeTitleList, &ContactData,
+                        wxT("ALTID"), &HomeTitleListAltID,
+                        wxT("PID"), &HomeTitleListPID,
+                        wxT("LANGUAGE"), &HomeTitleListLanguage,
+                        wxT("PREF"), &HomeTitleListPref,
+                        wxT(""), &HomeTitleListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
+    
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = BusinessTitleList.begin();
+         iter != BusinessTitleList.end(); ++iter){
+        
+        ProcessSaveData(wxT("TITLE;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &BusinessTitleList, &ContactData,
+                        wxT("ALTID"), &BusinessTitleListAltID,
+                        wxT("PID"), &BusinessTitleListPID,
+                        wxT("LANGUAGE"), &BusinessTitleListLanguage,
+                        wxT("PREF"), &BusinessTitleListPref,
+                        wxT(""), &BusinessTitleListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
     ResetSaveProcessData();
     
     for (std::map<int,wxString>::iterator iter = GeneralRoleList.begin();
-        iter != GeneralRoleList.end(); ++iter){
-       
-       ProcessSaveData(wxT("ROLE"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &GeneralRoleList, &ContactData,
-               wxT("ALTID"), &GeneralRoleListAltID,
-               wxT("PID"), &GeneralRoleListPID,
-               wxT("LANGUAGE"), &GeneralRoleListLanguage,
-               wxT("PREF"), &GeneralRoleListPref,
-               wxT(""), &GeneralRoleListTokens );
-
-       ResetSaveProcessData();
-    
+         iter != GeneralRoleList.end(); ++iter){
+        
+        ProcessSaveData(wxT("ROLE"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &GeneralRoleList, &ContactData,
+                        wxT("ALTID"), &GeneralRoleListAltID,
+                        wxT("PID"), &GeneralRoleListPID,
+                        wxT("LANGUAGE"), &GeneralRoleListLanguage,
+                        wxT("PREF"), &GeneralRoleListPref,
+                        wxT(""), &GeneralRoleListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
     ResetSaveProcessData();
     
     for (std::map<int,wxString>::iterator iter = HomeRoleList.begin();
-        iter != HomeRoleList.end(); ++iter){
-        
-       ProcessSaveData(wxT("ROLE;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &HomeRoleList, &ContactData,
-               wxT("ALTID"), &HomeRoleListAltID,
-               wxT("PID"), &HomeRoleListPID,
-               wxT("LANGUAGE"), &HomeRoleListLanguage,
-               wxT("PREF"), &HomeRoleListPref,
-               wxT(""), &HomeRoleListTokens );
-       
-       ResetSaveProcessData();
-    
+         iter != HomeRoleList.end(); ++iter){
+        
+        ProcessSaveData(wxT("ROLE;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &HomeRoleList, &ContactData,
+                        wxT("ALTID"), &HomeRoleListAltID,
+                        wxT("PID"), &HomeRoleListPID,
+                        wxT("LANGUAGE"), &HomeRoleListLanguage,
+                        wxT("PREF"), &HomeRoleListPref,
+                        wxT(""), &HomeRoleListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    ResetSaveProcessData();    
+    ResetSaveProcessData();
     
     for (std::map<int,wxString>::iterator iter = BusinessRoleList.begin();
-        iter != BusinessRoleList.end(); ++iter){
-       
-       ProcessSaveData(wxT("ROLE;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &BusinessRoleList, &ContactData,
-               wxT("ALTID"), &BusinessRoleListAltID,
-               wxT("PID"), &BusinessRoleListPID,
-               wxT("LANGUAGE"), &BusinessRoleListLanguage,
-               wxT("PREF"), &BusinessRoleListPref,
-               wxT(""), &BusinessRoleListTokens );
-       
-       ResetSaveProcessData();  
-    
-    }    
+         iter != BusinessRoleList.end(); ++iter){
+        
+        ProcessSaveData(wxT("ROLE;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &BusinessRoleList, &ContactData,
+                        wxT("ALTID"), &BusinessRoleListAltID,
+                        wxT("PID"), &BusinessRoleListPID,
+                        wxT("LANGUAGE"), &BusinessRoleListLanguage,
+                        wxT("PREF"), &BusinessRoleListPref,
+                        wxT(""), &BusinessRoleListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
-    ResetSaveProcessData();  
+    ResetSaveProcessData();
     
     for (std::map<int,wxString>::iterator iter = GeneralOrganisationsList.begin();
-        iter != GeneralOrganisationsList.end(); ++iter){
-       
-       ProcessSaveData(wxT("ORG"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &GeneralOrganisationsList, &ContactData,
-               wxT("ALTID"), &GeneralOrganisationsListAltID,
-               wxT("PID"), &GeneralOrganisationsListPID,
-               wxT("LANGUAGE"), &GeneralOrganisationsListLanguage,
-               wxT("SORT-AS"), &GeneralOrganisationsListSortAs,
-               wxT("PREF"), &GeneralOrganisationsListPref,
-               wxT(""), &GeneralOrganisationsListTokens );
-       
-       ResetSaveProcessData();  
-    
+         iter != GeneralOrganisationsList.end(); ++iter){
+        
+        ProcessSaveData(wxT("ORG"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &GeneralOrganisationsList, &ContactData,
+                        wxT("ALTID"), &GeneralOrganisationsListAltID,
+                        wxT("PID"), &GeneralOrganisationsListPID,
+                        wxT("LANGUAGE"), &GeneralOrganisationsListLanguage,
+                        wxT("SORT-AS"), &GeneralOrganisationsListSortAs,
+                        wxT("PREF"), &GeneralOrganisationsListPref,
+                        wxT(""), &GeneralOrganisationsListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    ResetSaveProcessData();    
+    ResetSaveProcessData();
     
     for (std::map<int,wxString>::iterator iter = HomeOrganisationsList.begin();
-        iter != HomeOrganisationsList.end(); ++iter){
-       
-       ProcessSaveData(wxT("ORG;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &HomeOrganisationsList, &ContactData,
-               wxT("ALTID"), &HomeOrganisationsListAltID,
-               wxT("PID"), &HomeOrganisationsListPID,
-               wxT("LANGUAGE"), &HomeOrganisationsListLanguage,
-               wxT("SORT-AS"), &HomeOrganisationsListSortAs,
-               wxT("PREF"), &HomeOrganisationsListPref,
-               wxT(""), &HomeOrganisationsListTokens );
-       
-       ResetSaveProcessData();
-    
+         iter != HomeOrganisationsList.end(); ++iter){
+        
+        ProcessSaveData(wxT("ORG;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &HomeOrganisationsList, &ContactData,
+                        wxT("ALTID"), &HomeOrganisationsListAltID,
+                        wxT("PID"), &HomeOrganisationsListPID,
+                        wxT("LANGUAGE"), &HomeOrganisationsListLanguage,
+                        wxT("SORT-AS"), &HomeOrganisationsListSortAs,
+                        wxT("PREF"), &HomeOrganisationsListPref,
+                        wxT(""), &HomeOrganisationsListTokens );
+        
+        ResetSaveProcessData();
+        
     }
-
-    ResetSaveProcessData();    
     
-    for (std::map<int,wxString>::iterator iter = BusinessOrganisationsList.begin();
-        iter != BusinessOrganisationsList.end(); ++iter){
-       
-       ProcessSaveData(wxT("ORG;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &BusinessOrganisationsList, &ContactData,
-               wxT("ALTID"), &BusinessOrganisationsListAltID,
-               wxT("PID"), &BusinessOrganisationsListPID,
-               wxT("LANGUAGE"), &BusinessOrganisationsListLanguage,
-               wxT("SORT-AS"), &BusinessOrganisationsListSortAs,
-               wxT("PREF"), &BusinessOrganisationsListPref,
-               wxT(""), &BusinessOrganisationsListTokens );
-       
-       ResetSaveProcessData();
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = BusinessOrganisationsList.begin();
+         iter != BusinessOrganisationsList.end(); ++iter){
+        
+        ProcessSaveData(wxT("ORG;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &BusinessOrganisationsList, &ContactData,
+                        wxT("ALTID"), &BusinessOrganisationsListAltID,
+                        wxT("PID"), &BusinessOrganisationsListPID,
+                        wxT("LANGUAGE"), &BusinessOrganisationsListLanguage,
+                        wxT("SORT-AS"), &BusinessOrganisationsListSortAs,
+                        wxT("PREF"), &BusinessOrganisationsListPref,
+                        wxT(""), &BusinessOrganisationsListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    ResetSaveProcessData();    
+    ResetSaveProcessData();
     
     for (std::map<int,wxString>::iterator iter = GeneralNoteList.begin();
-        iter != GeneralNoteList.end(); ++iter){
-    
-       ProcessSaveData(wxT("NOTE"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &GeneralNoteList, &ContactData,
-               wxT("ALTID"), &GeneralNoteListAltID,
-               wxT("PID"), &GeneralNoteListPID,
-               wxT("LANGUAGE"), &GeneralNoteListLanguage,
-               wxT("PREF"), &GeneralNoteListPref,
-               wxT(""), &GeneralNoteListTokens );
-       
-       ResetSaveProcessData();
-    
+         iter != GeneralNoteList.end(); ++iter){
+        
+        ProcessSaveData(wxT("NOTE"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &GeneralNoteList, &ContactData,
+                        wxT("ALTID"), &GeneralNoteListAltID,
+                        wxT("PID"), &GeneralNoteListPID,
+                        wxT("LANGUAGE"), &GeneralNoteListLanguage,
+                        wxT("PREF"), &GeneralNoteListPref,
+                        wxT(""), &GeneralNoteListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    ResetSaveProcessData();    
+    ResetSaveProcessData();
     
     for (std::map<int,wxString>::iterator iter = HomeNoteList.begin();
-        iter != HomeNoteList.end(); ++iter){
-       
-       ProcessSaveData(wxT("NOTE;TYPE=home"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &HomeNoteList, &ContactData,
-               wxT("ALTID"), &HomeNoteListAltID,
-               wxT("PID"), &HomeNoteListPID,
-               wxT("LANGUAGE"), &HomeNoteListLanguage,
-               wxT("PREF"), &HomeNoteListPref,
-               wxT(""), &HomeNoteListTokens );
-       
-       ResetSaveProcessData();
-    
+         iter != HomeNoteList.end(); ++iter){
+        
+        ProcessSaveData(wxT("NOTE;TYPE=home"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &HomeNoteList, &ContactData,
+                        wxT("ALTID"), &HomeNoteListAltID,
+                        wxT("PID"), &HomeNoteListPID,
+                        wxT("LANGUAGE"), &HomeNoteListLanguage,
+                        wxT("PREF"), &HomeNoteListPref,
+                        wxT(""), &HomeNoteListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    ResetSaveProcessData();   
+    ResetSaveProcessData();
     
     for (std::map<int,wxString>::iterator iter = BusinessNoteList.begin();
-        iter != BusinessNoteList.end(); ++iter){
-       
-       ProcessSaveData(wxT("NOTE;TYPE=work"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &BusinessNoteList, &ContactData,
-               wxT("ALTID"), &BusinessNoteListAltID,
-               wxT("PID"), &BusinessNoteListPID,
-               wxT("LANGUAGE"), &BusinessNoteListLanguage,
-               wxT("PREF"), &BusinessNoteListPref,
-               wxT(""), &BusinessNoteListTokens );
-       
-       ResetSaveProcessData();  
-    
+         iter != BusinessNoteList.end(); ++iter){
+        
+        ProcessSaveData(wxT("NOTE;TYPE=work"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &BusinessNoteList, &ContactData,
+                        wxT("ALTID"), &BusinessNoteListAltID,
+                        wxT("PID"), &BusinessNoteListPID,
+                        wxT("LANGUAGE"), &BusinessNoteListLanguage,
+                        wxT("PREF"), &BusinessNoteListPref,
+                        wxT(""), &BusinessNoteListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    ResetSaveProcessData();   
+    ResetSaveProcessData();
     
     for (std::map<int,wxString>::iterator iter = CategoriesList.begin();
-        iter != CategoriesList.end(); ++iter){
-       
-       ProcessSaveData(wxT("CATEGORIES"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &CategoriesList, &ContactData,
-               wxT("ALTID"), &CategoriesListAltID,
-               wxT("PID"), &CategoriesListPID,
-               wxT("TYPE"), &CategoriesListType,
-               wxT("PREF"), &CategoriesListPref,
-               wxT(""), &CategoriesListTokens );
-       
-       ResetSaveProcessData();
-    
+         iter != CategoriesList.end(); ++iter){
+        
+        ProcessSaveData(wxT("CATEGORIES"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &CategoriesList, &ContactData,
+                        wxT("ALTID"), &CategoriesListAltID,
+                        wxT("PID"), &CategoriesListPID,
+                        wxT("TYPE"), &CategoriesListType,
+                        wxT("PREF"), &CategoriesListPref,
+                        wxT(""), &CategoriesListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
     // Pictures.
-   
-       for (std::map<int, std::string>::iterator iter = PicturesList.begin();
-               iter != PicturesList.end(); ++iter){
-
-               int intValueIndex = iter->first;
-
-               std::map<int, std::string>::iterator stdstriter;
-               std::map<int, wxString>::iterator enciter;
-
-               striter = PicturesListPictureType.find(intValueIndex);
-               enciter = PicturesListPicEncType.find(intValueIndex);
-
-               ProcessSaveData(wxT("PHOTO"), &strValue2, &boolValue2, &boolValue,
-                       &iter, &PicturesList, &striter,
-                       &enciter, &ContactData,
-                       wxT("ALTID"), &PicturesListAltID,
-                       wxT("PID"), &PicturesListPID,
-                       wxT("TYPE"), &PicturesListType,
-                       wxT("PREF"), &PicturesListPref,
-                       wxT(""), &PicturesListTokens);
-
-               ResetSaveProcessData();
-
-       }
-
+    
+    for (std::map<int, std::string>::iterator iter = PicturesList.begin();
+         iter != PicturesList.end(); ++iter){
+        
+        int intValueIndex = iter->first;
+        
+        std::map<int, std::string>::iterator stdstriter;
+        std::map<int, wxString>::iterator enciter;
+        
+        striter = PicturesListPictureType.find(intValueIndex);
+        enciter = PicturesListPicEncType.find(intValueIndex);
+        
+        ProcessSaveData(wxT("PHOTO"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &PicturesList, &striter,
+                        &enciter, &ContactData,
+                        wxT("ALTID"), &PicturesListAltID,
+                        wxT("PID"), &PicturesListPID,
+                        wxT("TYPE"), &PicturesListType,
+                        wxT("PREF"), &PicturesListPref,
+                        wxT(""), &PicturesListTokens);
+        
+        ResetSaveProcessData();
+        
+    }
+    
     ResetSaveProcessData();
-
+    
     // Logos.
     
     for (std::map<int, std::string>::iterator iter = LogosList.begin();
-        iter != LogosList.end(); ++iter){
-       
-       int intValueIndex = iter->first;
-       
-       std::map<int, std::string>::iterator stdstriter;
-       std::map<int, wxString>::iterator enciter;
-       
-       striter = LogosListPictureType.find(intValueIndex);
-       enciter = LogosListPicEncType.find(intValueIndex);
-       
-       ProcessSaveData(wxT("LOGO"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &LogosList, &striter, 
-               &enciter, &ContactData,
-               wxT("ALTID"), &LogosListAltID,
-               wxT("PID"), &LogosListPID,
-               wxT("TYPE"), &LogosListType,
-               wxT("PREF"), &LogosListPref,
-               wxT(""), &LogosListTokens );    
-       
-       ResetSaveProcessData();   
-    
+         iter != LogosList.end(); ++iter){
+        
+        int intValueIndex = iter->first;
+        
+        std::map<int, std::string>::iterator stdstriter;
+        std::map<int, wxString>::iterator enciter;
+        
+        striter = LogosListPictureType.find(intValueIndex);
+        enciter = LogosListPicEncType.find(intValueIndex);
+        
+        ProcessSaveData(wxT("LOGO"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &LogosList, &striter,
+                        &enciter, &ContactData,
+                        wxT("ALTID"), &LogosListAltID,
+                        wxT("PID"), &LogosListPID,
+                        wxT("TYPE"), &LogosListType,
+                        wxT("PREF"), &LogosListPref,
+                        wxT(""), &LogosListTokens );
+        
+        ResetSaveProcessData();
+        
     }
-
+    
     ResetSaveProcessData();
     
     // Sounds.
     
     for (std::map<int, std::string>::iterator iter = SoundsList.begin();
-        iter != SoundsList.end(); ++iter){
-       
-       int intValueIndex = iter->first;
-       
-       std::map<int, std::string>::iterator stdstriter;
-       std::map<int, wxString>::iterator enciter;
-       
-       striter = SoundsListAudioType.find(intValueIndex);
-       enciter = SoundsListAudioEncType.find(intValueIndex);
-       
-       ProcessSaveData(wxT("SOUND"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &SoundsList, &striter, 
-               &enciter, &ContactData,
-               wxT("ALTID"), &SoundsListAltID,
-               wxT("PID"), &SoundsListPID,
-               wxT("TYPE"), &SoundsListType,
-               wxT("PREF"), &SoundsListPref,
-               wxT(""), &SoundsListTokens );   
-       
-       ResetSaveProcessData();   
-    
+         iter != SoundsList.end(); ++iter){
+        
+        int intValueIndex = iter->first;
+        
+        std::map<int, std::string>::iterator stdstriter;
+        std::map<int, wxString>::iterator enciter;
+        
+        striter = SoundsListAudioType.find(intValueIndex);
+        enciter = SoundsListAudioEncType.find(intValueIndex);
+        
+        ProcessSaveData(wxT("SOUND"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &SoundsList, &striter,
+                        &enciter, &ContactData,
+                        wxT("ALTID"), &SoundsListAltID,
+                        wxT("PID"), &SoundsListPID,
+                        wxT("TYPE"), &SoundsListType,
+                        wxT("PREF"), &SoundsListPref,
+                        wxT(""), &SoundsListTokens );
+        
+        ResetSaveProcessData();
+        
     }
-
-    ResetSaveProcessData();  
     
-    for (std::map<int,wxString>::iterator iter = CalendarList.begin();
-        iter != CalendarList.end(); ++iter){
-       
-       ProcessSaveData(wxT("CALURI"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &CalendarList, &ContactData,
-               wxT("ALTID"), &CalendarListAltID,
-               wxT("PID"), &CalendarListPID,
-               wxT("MEDIATYPE"), &CalendarListMediatype,
-               wxT("TYPE"), &CalendarListType,
-               wxT("PREF"), &CalendarListPref,
-               wxT(""), &CalendarListTokens );
-       
-       ResetSaveProcessData();  
+    ResetSaveProcessData();
     
+    for (std::map<int,wxString>::iterator iter = CalendarList.begin();
+         iter != CalendarList.end(); ++iter){
+        
+        ProcessSaveData(wxT("CALURI"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &CalendarList, &ContactData,
+                        wxT("ALTID"), &CalendarListAltID,
+                        wxT("PID"), &CalendarListPID,
+                        wxT("MEDIATYPE"), &CalendarListMediatype,
+                        wxT("TYPE"), &CalendarListType,
+                        wxT("PREF"), &CalendarListPref,
+                        wxT(""), &CalendarListTokens );
+        
+        ResetSaveProcessData();
+        
     }
     
-    ResetSaveProcessData();   
+    ResetSaveProcessData();
     
     for (std::map<int,wxString>::iterator iter = CalendarRequestList.begin();
-        iter != CalendarRequestList.end(); ++iter){
-       
-       ProcessSaveData(wxT("CALADRURI"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &CalendarRequestList, &ContactData,
-               wxT("ALTID"), &CalendarRequestListAltID,
-               wxT("PID"), &CalendarRequestListPID,
-               wxT("MEDIATYPE"), &CalendarRequestListMediatype,
-               wxT("TYPE"), &CalendarRequestListType,
-               wxT("PREF"), &CalendarRequestListPref,
-               wxT(""), &CalendarRequestListTokens );
-       
-       ResetSaveProcessData();    
-    
-    }   
-    
-    ResetSaveProcessData();    
+         iter != CalendarRequestList.end(); ++iter){
+        
+        ProcessSaveData(wxT("CALADRURI"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &CalendarRequestList, &ContactData,
+                        wxT("ALTID"), &CalendarRequestListAltID,
+                        wxT("PID"), &CalendarRequestListPID,
+                        wxT("MEDIATYPE"), &CalendarRequestListMediatype,
+                        wxT("TYPE"), &CalendarRequestListType,
+                        wxT("PREF"), &CalendarRequestListPref,
+                        wxT(""), &CalendarRequestListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
-    for (std::map<int,wxString>::iterator iter = FreeBusyList.begin();
-        iter != FreeBusyList.end(); ++iter){
-       
-       ProcessSaveData(wxT("FBURL"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &FreeBusyList, &ContactData,
-               wxT("ALTID"), &FreeBusyListAltID,
-               wxT("PID"), &FreeBusyListPID,
-               wxT("MEDIATYPE"), &FreeBusyListMediatype,
-               wxT("TYPE"), &FreeBusyListType,
-               wxT("PREF"), &FreeBusyListPref,
-               wxT(""), &FreeBusyListTokens );
-       
-       ResetSaveProcessData();   
+    ResetSaveProcessData();
     
-    }  
+    for (std::map<int,wxString>::iterator iter = FreeBusyList.begin();
+         iter != FreeBusyList.end(); ++iter){
+        
+        ProcessSaveData(wxT("FBURL"), &strValue2, &boolValue2, &boolValue,
+                        &iter, &FreeBusyList, &ContactData,
+                        wxT("ALTID"), &FreeBusyListAltID,
+                        wxT("PID"), &FreeBusyListPID,
+                        wxT("MEDIATYPE"), &FreeBusyListMediatype,
+                        wxT("TYPE"), &FreeBusyListType,
+                        wxT("PREF"), &FreeBusyListPref,
+                        wxT(""), &FreeBusyListTokens );
+        
+        ResetSaveProcessData();
+        
+    }
     
     for (std::map<int, wxString>::iterator iter = KeyList.begin();
-        iter != KeyList.end(); ++iter){
-
-       intValue2 = iter->first;        
-       
-       // Process Alternative ID.
-       
-       striter = KeyListAltID.find(intValue2);
-       
-       if (striter->first == intValue2){
-       
-           strValue3 = striter->second;
-       
-           if (!strValue3.IsEmpty()){
-           
-               strValue3.Trim();
-               strValue3.Trim();
-               
-               if (boolValue2 == TRUE){
-               
-                   strValue2.Append(wxT(";"));
-               
-               } else {
-               
-                   boolValue2 = TRUE;
-               
-               }
-               
-               strValue2.Append(wxT("ALTID=") + strValue3);
-           
-               boolValue = TRUE;           
-           
-           }
-       
-       }
-       
-       // Process PID.
-       
-       striter = KeyListPID.find(intValue2);
-       
-       if (striter->first == intValue2){
-       
-           strValue3 = striter->second;
-       
-           if (!strValue3.IsEmpty()){
-           
-               strValue3.Trim();
-               strValue3.Trim();
-               
-               if (boolValue2 == TRUE){
-               
-                   strValue2.Append(wxT(";"));
-               
-               } else {
-               
-                   boolValue2 = TRUE;
-               
-               }
-               
-               strValue2.Append(wxT("PID=") + strValue3);
-           
-               boolValue = TRUE;           
-           
-           }
-       
-       }
-       
-       // Process Type.
-       
-       striter = KeyListType.find(intValue2);
-       
-       if (striter->first == intValue2){
-       
-           strValue3 = striter->second;
-       
-           if (!strValue3.IsEmpty()){
-           
-               strValue3.Trim();
-               strValue3.Trim();
-               
-               if (boolValue2 == TRUE){
-               
-                   strValue2.Append(wxT(";"));
-               
-               } else {
-               
-                   boolValue2 = TRUE;
-               
-               }
-               
-               strValue2.Append(wxT("TYPE=") + strValue3);
-           
-               boolValue = TRUE;           
-           
-           }
-       
-       }
-       
-       intiter = KeyListPref.find(intValue2);
-       
-       if (intiter->first == intValue2){
-       
-           intValue3 = intiter->second;
-       
-           if (intValue3){
-       
-               if (boolValue2 == TRUE){
-               
-                   strValue2.Append(wxT(";"));
-               
-               } else {
-               
-                   boolValue2 = TRUE;
-               
-               }
-               
-               strValue2.Append(wxT("PREF=") + wxString::Format(wxT("%i"), intValue3));
-               
-               boolValue = TRUE;
-           
-           }
-       
-       }       
-       
-       // Process Tokens.
-       
-       striter = KeyListTokens.find(intValue2);
-       
-       if (striter->first == intValue2){
-       
-           strValue3 = striter->second;
-       
-           if (!strValue3.IsEmpty()){
-           
-               strValue3.Trim();
-               strValue3.Trim();
-               
-               if (boolValue2 == TRUE){
-               
-                   strValue2.Append(wxT(";"));
-               
-               } else {
-               
-                   boolValue2 = TRUE;
-               
-               }
-               
-               strValue2.Append(strValue3);
-               
-               boolValue = TRUE;
-           
-           }
-       
-       }       
-       
-       // Get the key information.
-
-       std::map<int, wxString>::iterator enciter;
-       
-       striter = KeyListDataType.find(intValue2);      
-       //enciter = KeyListAudioEncType.find(intValue2);
-       
-       wxString strValueData;
-       
-       strValueData = iter->second;    
-       //strValueData.insert(0, wxT("data:") + striter->second + wxT(";") + enciter->second + wxT(","));
-       strValueData.insert(0, wxT("data:") + striter->second + wxT(";base64,"));       
-       
-       
-       // Add to the vCard.
-    
-       if (boolValue == TRUE){
-       
-               ContactData.AddRaw(wxT("KEY;") + strValue2, strValueData);
-       
-       } else {
-       
-               ContactData.Add(wxT("KEY"), strValueData, TRUE);
-       
-       }
-       
-       ResetSaveProcessData();   
-    
+         iter != KeyList.end(); ++iter){
+        
+        intValue2 = iter->first;
+        
+        // Process Alternative ID.
+        
+        striter = KeyListAltID.find(intValue2);
+        
+        if (striter->first == intValue2){
+            
+            strValue3 = striter->second;
+            
+            if (!strValue3.IsEmpty()){
+                
+                strValue3.Trim();
+                strValue3.Trim();
+                
+                if (boolValue2 == TRUE){
+                    
+                    strValue2.Append(wxT(";"));
+                    
+                } else {
+                    
+                    boolValue2 = TRUE;
+                    
+                }
+                
+                strValue2.Append(wxT("ALTID=") + strValue3);
+                
+                boolValue = TRUE;
+                
+            }
+            
+        }
+        
+        // Process PID.
+        
+        striter = KeyListPID.find(intValue2);
+        
+        if (striter->first == intValue2){
+            
+            strValue3 = striter->second;
+            
+            if (!strValue3.IsEmpty()){
+                
+                strValue3.Trim();
+                strValue3.Trim();
+                
+                if (boolValue2 == TRUE){
+                    
+                    strValue2.Append(wxT(";"));
+                    
+                } else {
+                    
+                    boolValue2 = TRUE;
+                    
+                }
+                
+                strValue2.Append(wxT("PID=") + strValue3);
+                
+                boolValue = TRUE;
+                
+            }
+            
+        }
+        
+        // Process Type.
+        
+        striter = KeyListType.find(intValue2);
+        
+        if (striter->first == intValue2){
+            
+            strValue3 = striter->second;
+            
+            if (!strValue3.IsEmpty()){
+                
+                strValue3.Trim();
+                strValue3.Trim();
+                
+                if (boolValue2 == TRUE){
+                    
+                    strValue2.Append(wxT(";"));
+                    
+                } else {
+                    
+                    boolValue2 = TRUE;
+                    
+                }
+                
+                strValue2.Append(wxT("TYPE=") + strValue3);
+                
+                boolValue = TRUE;
+                
+            }
+            
+        }
+        
+        intiter = KeyListPref.find(intValue2);
+        
+        if (intiter->first == intValue2){
+            
+            intValue3 = intiter->second;
+            
+            if (intValue3){
+                
+                if (boolValue2 == TRUE){
+                    
+                    strValue2.Append(wxT(";"));
+                    
+                } else {
+                    
+                    boolValue2 = TRUE;
+                    
+                }
+                
+                strValue2.Append(wxT("PREF=") + wxString::Format(wxT("%i"), intValue3));
+                
+                boolValue = TRUE;
+                
+            }
+            
+        }      
+        
+        // Process Tokens.
+        
+        striter = KeyListTokens.find(intValue2);
+        
+        if (striter->first == intValue2){
+            
+            strValue3 = striter->second;
+            
+            if (!strValue3.IsEmpty()){
+                
+                strValue3.Trim();
+                strValue3.Trim();
+                
+                if (boolValue2 == TRUE){
+                    
+                    strValue2.Append(wxT(";"));
+                    
+                } else {
+                    
+                    boolValue2 = TRUE;
+                    
+                }
+                
+                strValue2.Append(strValue3);
+                
+                boolValue = TRUE;
+                
+            }
+            
+        }      
+        
+        // Get the key information.
+        
+        std::map<int, wxString>::iterator enciter;
+        
+        striter = KeyListDataType.find(intValue2);     
+        //enciter = KeyListAudioEncType.find(intValue2);
+        
+        wxString strValueData;
+        
+        strValueData = iter->second;   
+        //strValueData.insert(0, wxT("data:") + striter->second + wxT(";") + enciter->second + wxT(","));
+        strValueData.insert(0, wxT("data:") + striter->second + wxT(";base64,"));      
+        
+        
+        // Add to the vCard.
+        
+        if (boolValue == TRUE){
+            
+            ContactData.AddRaw(wxT("KEY;") + strValue2, strValueData);
+            
+        } else {
+            
+            ContactData.Add(wxT("KEY"), strValueData, TRUE);
+            
+        }
+        
+        ResetSaveProcessData();   
+        
     }
     
     // Vendor specific items.
@@ -5702,54 +5702,54 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
     ResetSaveProcessData();   
     
     for (std::map<int,wxString>::iterator iter = VendorList.begin();
-        iter != VendorList.end(); ++iter){
-       
-       intValue2 = iter->first;        
-       
-       // Get the IANA PEN number.
-       
-       striter = VendorListPEN.find(intValue2);
-       
-       if (striter->first == intValue2){
-       
-           strValue2 = striter->second;
-       
-       }
-       
-       // Get the element name.
-       
-       striter = VendorListElement.find(intValue2);
-       
-       if (striter->first == intValue2){
-       
-           strValue3 = striter->second;
-       
-       }
-       
-       // Get the address.
-       
-       striter = VendorList.find(intValue2);
-       
-       if (striter->first == intValue2){
-       
-           strValue = striter->second;
-       
-       }
-       
-       // Add to the vCard.
-    
-       if (boolValue == TRUE){
-       
-               ContactData.AddRaw(wxT("VND-") + strValue2 + wxT("-") + strValue3, strValue);
-       
-       } else {
-       
-               ContactData.Add(wxT("VND-") + strValue2 + wxT("-") + strValue3, strValue, FALSE);
-       
-       }
-       
-       ResetSaveProcessData();
-    
+         iter != VendorList.end(); ++iter){
+        
+        intValue2 = iter->first;       
+        
+        // Get the IANA PEN number.
+        
+        striter = VendorListPEN.find(intValue2);
+        
+        if (striter->first == intValue2){
+            
+            strValue2 = striter->second;
+            
+        }
+        
+        // Get the element name.
+        
+        striter = VendorListElement.find(intValue2);
+        
+        if (striter->first == intValue2){
+            
+            strValue3 = striter->second;
+            
+        }
+        
+        // Get the address.
+        
+        striter = VendorList.find(intValue2);
+        
+        if (striter->first == intValue2){
+            
+            strValue = striter->second;
+            
+        }
+        
+        // Add to the vCard.
+        
+        if (boolValue == TRUE){
+            
+            ContactData.AddRaw(wxT("VND-") + strValue2 + wxT("-") + strValue3, strValue);
+            
+        } else {
+            
+            ContactData.Add(wxT("VND-") + strValue2 + wxT("-") + strValue3, strValue, FALSE);
+            
+        }
+        
+        ResetSaveProcessData();
+        
     }              
     
     ResetSaveProcessData();  
@@ -5757,89 +5757,89 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
     // X-Tokens.
     
     for (std::map<int,wxString>::iterator iter = XTokenList.begin();
-        iter != XTokenList.end(); ++iter){
-       
-       intValue2 = iter->first;        
-       
-       // Get the element name.
-       
-       striter = XTokenListTokens.find(intValue2);
-       
-       if (striter->first == intValue2){
-       
-           strValue2 = striter->second;
-       
-       }       
-       
-       // Get the address.
-       
-       striter = XTokenList.find(intValue2);
-       
-       if (striter->first == intValue2){
-       
-           strValue = striter->second;
-       
-       }
-       
-       // Add to the vCard.
-    
-       if (boolValue == TRUE){
-       
-           ContactData.AddRaw(wxT("X-") + strValue2, strValue);
-       
-       } else {
-       
-           ContactData.Add(wxT("X-") + strValue2, strValue, FALSE);
-       
-       }
-       
-       ResetSaveProcessData();
-    
+         iter != XTokenList.end(); ++iter){
+        
+        intValue2 = iter->first;       
+        
+        // Get the element name.
+        
+        striter = XTokenListTokens.find(intValue2);
+        
+        if (striter->first == intValue2){
+            
+            strValue2 = striter->second;
+            
+        }      
+        
+        // Get the address.
+        
+        striter = XTokenList.find(intValue2);
+        
+        if (striter->first == intValue2){
+            
+            strValue = striter->second;
+            
+        }
+        
+        // Add to the vCard.
+        
+        if (boolValue == TRUE){
+            
+            ContactData.AddRaw(wxT("X-") + strValue2, strValue);
+            
+        } else {
+            
+            ContactData.Add(wxT("X-") + strValue2, strValue, FALSE);
+            
+        }
+        
+        ResetSaveProcessData();
+        
     }
     
     ResetSaveProcessData();
-
-    if (FullNamesList.size() == 0){
-    
-        wxString FullName = cmbDisplayAs->GetValue();
-        FullNamesList.insert(std::make_pair(0, FullName));
-        FullNamesListAltID.insert(std::make_pair(0, wxT("")));
-        FullNamesListPID.insert(std::make_pair(0, wxT("")));
-        FullNamesListType.insert(std::make_pair(0, wxT("")));
-        FullNamesListLanguage.insert(std::make_pair(0, wxT("")));
-        FullNamesListPref.insert(std::make_pair(0, 0));
-        FullNamesListTokens.insert(std::make_pair(0, wxT("")));
-        FNFirst = FALSE;
     
+    if (FullNamesList.size() == 0){
+        
+        wxString FullName = cmbDisplayAs->GetValue();
+        FullNamesList.insert(std::make_pair(0, FullName));
+        FullNamesListAltID.insert(std::make_pair(0, wxT("")));
+        FullNamesListPID.insert(std::make_pair(0, wxT("")));
+        FullNamesListType.insert(std::make_pair(0, wxT("")));
+        FullNamesListLanguage.insert(std::make_pair(0, wxT("")));
+        FullNamesListPref.insert(std::make_pair(0, 0));
+        FullNamesListTokens.insert(std::make_pair(0, wxT("")));
+        FNFirst = FALSE;
+        
     }
     
     for (std::map<int, wxString>::iterator iter = FullNamesList.begin();
-        iter != FullNamesList.end(); ++iter){
-       
-       if (FNFirst == TRUE){
-       
-           iter->second = cmbDisplayAs->GetValue();
-           FNFirst = FALSE;
-       
-       }
-       
-       std::map<int,wxString>::iterator mapS;
-       
-       mapS = FullNamesListTokens.find(iter->first);
-       
-       ProcessSaveData(wxT("FN"), &strValue2, &boolValue2, &boolValue, 
-               &iter, &FullNamesList, &ContactData,
-               wxT("ALTID"), &FullNamesListAltID,
-               wxT("PID"), &FullNamesListPID,
-               wxT("TYPE"), &FullNamesListType,
-               wxT("LANGUAGE"), &FullNamesListLanguage,
-               wxT("PREF"), &FullNamesListPref,
-               wxT(""), &FullNamesListTokens );
-       
-       // Get the address.
-       
-       ResetSaveProcessData();    
-    
+         iter != FullNamesList.end(); ++iter){
+        
+        if (FNFirst == TRUE){
+            
+            iter->second = cmbDisplayAs->GetValue();
+            FNFirst = FALSE;
+            
+        }
+        
+        std::map<int,wxString>::iterator mapS;
+        
+        mapS = FullNamesListTokens.find(iter->first);
+        
+        ProcessSaveData(wxT("FN"), &strValue2, &boolValue2, &boolValue, 
+                        &iter, &FullNamesList, &ContactData,
+                        wxT("ALTID"), &FullNamesListAltID,
+                        wxT("PID"), &FullNamesListPID,
+                        wxT("TYPE"), &FullNamesListType,
+                        wxT("LANGUAGE"), &FullNamesListLanguage,
+                        wxT("PREF"), &FullNamesListPref,
+                        wxT(""), &FullNamesListTokens );
+        
+        // Get the address.
+        
+        ResetSaveProcessData();    
+        
     }
     
     //ContactData.Add(wxT("FN"), cmbDisplayAs->GetValue(), FALSE);
@@ -5857,27 +5857,27 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
     int intYear = DateTimeNow.GetYear();
     int intMonth = DateTimeNow.GetMonth();
     int intDay = DateTimeNow.GetDay();
-
+    
     DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intYear));
     
     if (intMonth < 10){
-    
-       DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intMonth));
-    
+        
+        DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intMonth));
+        
     } else {
-    
-       DateRev.Append(wxString::Format(wxT("%i"), intMonth));
-
+        
+        DateRev.Append(wxString::Format(wxT("%i"), intMonth));
+        
     }
     
     if (intDay < 10){
-    
-       DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intDay));
-    
+        
+        DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intDay));
+        
     } else {
-    
-       DateRev.Append(wxString::Format(wxT("%i"), intDay));
-
+        
+        DateRev.Append(wxString::Format(wxT("%i"), intDay));
+        
     }
     
     //DateRev.Append(wx);
@@ -5886,46 +5886,46 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
     DateRev.Append(wxT("T"));
     
     // Set hour, minute and second.
-
+    
     int intHour = DateTimeNow.GetHour();
     int intMinute = DateTimeNow.GetMinute();
     int intSecond = DateTimeNow.GetSecond();
-
-    if (intHour < 10){
-    
-       DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intHour));
     
+    if (intHour < 10){
+        
+        DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intHour));
+        
     } else {
-    
-       DateRev.Append(wxString::Format(wxT("%i"), intHour));    
-    
+        
+        DateRev.Append(wxString::Format(wxT("%i"), intHour));    
+        
     }
     
     if (intMinute < 10){
-    
-       DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intMinute));
-    
+        
+        DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intMinute));
+        
     } else {
-    
-       DateRev.Append(wxString::Format(wxT("%i"), intMinute));
-    
+        
+        DateRev.Append(wxString::Format(wxT("%i"), intMinute));
+        
     }
     
     if (intSecond < 10){
-    
-       DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intSecond));
-    
+        
+        DateRev.Append(wxT("0") + wxString::Format(wxT("%i"), intSecond));
+        
     } else {
-    
-       DateRev.Append(wxString::Format(wxT("%i"), intSecond));
-    
+        
+        DateRev.Append(wxString::Format(wxT("%i"), intSecond));
+        
     }
-
- //   DateRev.Append(wx);
- //   DateRev.Append(wx);
- //   DateRev.Append(wxString DateTimeNow->);
+    
   //   DateRev.Append(wx);
   //   DateRev.Append(wx);
   //   DateRev.Append(wxString DateTimeNow->);
     DateRev.Append(wxT("Z"));    
-
+    
     ContactData.Add(wxT("UID"), UIDToken, FALSE);
     
     // Generate ETag data for the contact if it does not exist.
@@ -5934,7 +5934,7 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
     srand (time(NULL));
     
     ContactData.Add(wxT("END"), wxT("VCARD"), FALSE);
-
+    
     FMTimer.Stop();
     ContactData.WriteFile(FilenameFinal);
     
@@ -5950,48 +5950,48 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
     
 #if defined(__HAIKU__)
     
-       //preffilename = wxT("noo");
-
+    //preffilename = wxT("noo");
+    
 #elif defined(__WIN32__)
-
-       PrefDir = GetUserPrefDir();
-
-       wxStringTokenizer wSTFilename(wxSContactFilename, wxT("\\"));
-
+    
+    PrefDir = GetUserPrefDir();
+    
+    wxStringTokenizer wSTFilename(wxSContactFilename, wxT("\\"));
+    
 #else
-
-       PrefDir = GetUserPrefDir();
-       
-       wxStringTokenizer wSTFilename(wxSContactFilename, wxT("/"));
-
+    
+    PrefDir = GetUserPrefDir();
+    
+    wxStringTokenizer wSTFilename(wxSContactFilename, wxT("/"));
+    
 #endif
     
     XABPreferences PrefData(PrefDir);
     
-       wxString AccountType;
-
+    wxString AccountType;
+    
     for (int i = 0; i < PrefData.accounts.GetCount(); i++){
-
-               AccountDir = PrefData.accounts.GetAccountDirectory(i) + wxT(".carddav");
-
-               if (AccountDir == wxSContactAccount){
-       
-                       AccountDirPrefix = PrefData.accounts.GetAccountDirPrefix(i);
-                       AccountDirPrefix.Trim();
-                       AccountType = PrefData.accounts.GetAccountType(i);
-                       break;
-       
-               }
-
+        
+        AccountDir = PrefData.accounts.GetAccountDirectory(i) + wxT(".carddav");
+        
+        if (AccountDir == wxSContactAccount){
+            
+            AccountDirPrefix = PrefData.accounts.GetAccountDirPrefix(i);
+            AccountDirPrefix.Trim();
+            AccountType = PrefData.accounts.GetAccountType(i);
+            break;
+            
+        }
+        
     }
     
     wxString wxSplitFilename;
     wxString wxSDataURL;
     
     while(wSTFilename.HasMoreTokens()){
-    
-       wxSplitFilename = wSTFilename.GetNextToken();
-    
+        
+        wxSplitFilename = wSTFilename.GetNextToken();
+        
     }
     
     wxSDataURL = wxSplitFilename;
@@ -5999,61 +5999,61 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
     
     // Find out if the filename exists in the table.
     
-       if (AccountType == wxT("CardDAV") || AccountType == wxT("carddav")){
-
-               wxString ETagResult;
-               wxString ETagOriginal;
-
-               ETagDB *ETagDBPtr = NULL;
-
-               ETagDBPtr = ETagTmrPtr->GetPointer(wxSContactAccount);
-
-               wxString wxSETag = ETagDBPtr->GetETag(wxSplitFilename);
-               wxString wxSETagOrig = ETagDBPtr->GetETagOriginal(wxSplitFilename);
-
-               if (wxSETagOrig.IsEmpty()){
-
-                       // Generate the ETag.
-
-                       wxSETagOrig = wxString::Format(wxT("%X%X%X%X"), rand() % 1024, rand() % 1024, rand() % 1024, rand() % 1024);
-
-               }
-
-               if (wxSETag.IsEmpty()){
-
-                       // Update empty ETag.
-
-                       wxSETag = wxSETagOrig;
-                       ETagDBPtr->UpdateETag(wxSplitFilename, wxSETag, wxSETagOrig);
-
-               }
-               else {
-
-                       // Don't change original ETag.
-
-                       wxSETag = wxString::Format(wxT("%X%X%X%X"), rand() % 1024, rand() % 1024, rand() % 1024, rand() % 1024);
-                       ETagDBPtr->UpdateETag(wxSplitFilename, wxSETag);
-
-               }
-
-               if (EditMode == FALSE){
-
-                       ActMgrPtr->AddTask(0, cmbDisplayAs->GetValue(), wxSContactAccount, wxSDataURL, wxSplitFilename, FilenameFinal, wxSData);
-                       EditMode = TRUE;
-                       FMTimer.SetFilename(FilenameFinal);
-                       FMTimer.UpdateTimestamp();
-                       FMTimer.Start(10000, FALSE);
-
-               }
-               else {
-
-                       ActMgrPtr->AddTask(1, cmbDisplayAs->GetValue(), wxSContactAccount, wxSDataURL, wxSplitFilename, FilenameFinal, wxSData);
-                       FMTimer.UpdateTimestamp();
-                       FMTimer.Start(10000, FALSE);
-
-               }
-
-       }
+    if (AccountType == wxT("CardDAV") || AccountType == wxT("carddav")){
+        
+        wxString ETagResult;
+        wxString ETagOriginal;
+        
+        ETagDB *ETagDBPtr = NULL;
+        
+        ETagDBPtr = ETagTmrPtr->GetPointer(wxSContactAccount);
+        
+        wxString wxSETag = ETagDBPtr->GetETag(wxSplitFilename);
+        wxString wxSETagOrig = ETagDBPtr->GetETagOriginal(wxSplitFilename);
+        
+        if (wxSETagOrig.IsEmpty()){
+            
+            // Generate the ETag.
+            
+            wxSETagOrig = wxString::Format(wxT("%X%X%X%X"), rand() % 1024, rand() % 1024, rand() % 1024, rand() % 1024);
+            
+        }
+        
+        if (wxSETag.IsEmpty()){
+            
+            // Update empty ETag.
+            
+            wxSETag = wxSETagOrig;
+            ETagDBPtr->UpdateETag(wxSplitFilename, wxSETag, wxSETagOrig);
+            
+        }
+        else {
+            
+            // Don't change original ETag.
+            
+            wxSETag = wxString::Format(wxT("%X%X%X%X"), rand() % 1024, rand() % 1024, rand() % 1024, rand() % 1024);
+            ETagDBPtr->UpdateETag(wxSplitFilename, wxSETag);
+            
+        }
+        
+        if (EditMode == FALSE){
+            
+            ActMgrPtr->AddTask(0, cmbDisplayAs->GetValue(), wxSContactAccount, wxSDataURL, wxSplitFilename, FilenameFinal, wxSData);
+            EditMode = TRUE;
+            FMTimer.SetFilename(FilenameFinal);
+            FMTimer.UpdateTimestamp();
+            FMTimer.Start(10000, FALSE);
+            
+        }
+        else {
+            
+            ActMgrPtr->AddTask(1, cmbDisplayAs->GetValue(), wxSContactAccount, wxSDataURL, wxSplitFilename, FilenameFinal, wxSData);
+            FMTimer.UpdateTimestamp();
+            FMTimer.Start(10000, FALSE);
+            
+        }
+        
+    }
     
     // Send a notification to update the main window
     // with the new details.
@@ -6070,939 +6070,939 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
     ucd->ContactNameArray = ContactData.GetName();
     
     for (std::map<int,wxString>::iterator gniter = GeneralNicknamesList.begin();
-    gniter != GeneralNicknamesList.end(); gniter++){
-    
-               ucd->ContactNickname = gniter->second;
-               break;
-    
+         gniter != GeneralNicknamesList.end(); gniter++){
+        
+        ucd->ContactNickname = gniter->second;
+        break;
+        
     }
     
-    wxCommandEvent event(CE_UPDATECONTACTLIST);
-    event.SetClientData(ucd);
-    wxPostEvent(MainPtr, event);
-
+    wxCommandEvent event2(CE_UPDATECONTACTLIST);
+    event2.SetClientData(ucd);
+    wxPostEvent(MainPtr, event2);
+    
 }
 
 void frmContactEditor::SaveCloseContact( wxCommandEvent& event )
 {
-
-       // Save the updated contact data and close the form.
-
+    
+    // Save the updated contact data and close the form.
+    
 }
 
 void frmContactEditor::CloseContact( wxCommandEvent& event )
 {
-
-       Close();
-
+    
+    Close();
+    
 }
 
 void frmContactEditor::CloseWindow( wxCloseEvent& event )
 {
-
-       // TODO: Check if any changes have been made,
-       // ask if the changes should be made, process
-       // action based on question and then close.
-       
-       WindowData *WData = new WindowData;
-
-       WData->DataType = 1;
-       WData->WindowPointer = this;
-       WData->WindowID = ContactEditorUID;
-
-       wxCommandEvent delevent(WINDOW_CLOSE);
-       delevent.SetClientData(WData);
-       wxPostEvent(GetParent(), delevent);
-       
-       Destroy();
-
+    
+    // TODO: Check if any changes have been made,
+    // ask if the changes should be made, process
+    // action based on question and then close.
+    
+    WindowData *WData = new WindowData;
+    
+    WData->DataType = 1;
+    WData->WindowPointer = this;
+    WData->WindowID = ContactEditorUID;
+    
+    wxCommandEvent delevent(WINDOW_CLOSE);
+    delevent.SetClientData(WData);
+    wxPostEvent(GetParent(), delevent);
+    
+    Destroy();
+    
 }
 
 
 void frmContactEditor::CutText( wxCommandEvent& event )
 {
-       // This function left empty for future implementation.
+    // This function left empty for future implementation.
 }
 
 void frmContactEditor::CopyText( wxCommandEvent& event )
 {
-       // This function left empty for future implementation.
+    // This function left empty for future implementation.
 }
 
 void frmContactEditor::PasteText( wxCommandEvent& event )
 {
-       // This function left empty for future implementation.
+    // This function left empty for future implementation.
 }
 
 void frmContactEditor::SetupContact( wxString AccountName )
 {
-
-       wxSContactAccount = AccountName;
-
+    
+    wxSContactAccount = AccountName;
+    
 }
 
 bool frmContactEditor::ProcessEvent(wxEvent& event)
 {
-
-       // This section has been taken from the wxWidgets sample code of richtext.cpp
-       // so that simple Cut/Copy/Paste code can be made.
-       
-       // As this code comes from the samples of the wxWidgets library, this is licenced
-       // under the wxWindows Library Licence and is compatable with the LGPL and is
-       // compatable with Xestia Address Book's licence.
-
-       if (event.IsCommandEvent() && !event.IsKindOf(CLASSINFO(wxChildFocusEvent)))
-       {
-               // Problem: we can get infinite recursion because the events
-               // climb back up to this frame, and repeat.
-               // Assume that command events don't cause another command event
-               // to be called, so we can rely on inCommand not being overwritten
-       
-               static int s_eventType = 0;
-               static wxWindowID s_id = 0;
-               
-               if (s_id != event.GetId() && s_eventType != event.GetEventType())
-               {
-                       s_eventType = event.GetEventType();
-                       s_id = event.GetId();
-                       
-                       wxWindow* focusWin = wxFindFocusDescendant(this);
-                       if (focusWin && focusWin->GetEventHandler()->ProcessEvent(event))
-                       {
-                       //s_command = NULL;
-                               s_eventType = 0;
-                               s_id = 0;
-                               return true;
-                       }
-                       s_eventType = 0;
-                       s_id = 0;
-               }
-               else
-               {
-                       return false;
-               }
-       }
-       
-       return wxFrame::ProcessEvent(event);
+    
+    // This section has been taken from the wxWidgets sample code of richtext.cpp
+    // so that simple Cut/Copy/Paste code can be made.
+    
+    // As this code comes from the samples of the wxWidgets library, this is licenced
+    // under the wxWindows Library Licence and is compatable with the LGPL and is
+    // compatable with Xestia Address Book's licence.
+    
+    if (event.IsCommandEvent() && !event.IsKindOf(CLASSINFO(wxChildFocusEvent)))
+    {
+        // Problem: we can get infinite recursion because the events
+        // climb back up to this frame, and repeat.
+        // Assume that command events don't cause another command event
+        // to be called, so we can rely on inCommand not being overwritten
+        
+        static int s_eventType = 0;
+        static wxWindowID s_id = 0;
+        
+        if (s_id != event.GetId() && s_eventType != event.GetEventType())
+        {
+            s_eventType = event.GetEventType();
+            s_id = event.GetId();
+            
+            wxWindow* focusWin = wxFindFocusDescendant(this);
+            if (focusWin && focusWin->GetEventHandler()->ProcessEvent(event))
+            {
+                //s_command = NULL;
+                s_eventType = 0;
+                s_id = 0;
+                return true;
+            }
+            s_eventType = 0;
+            s_id = 0;
+        }
+        else
+        {
+            return false;
+        }
+    }
+    
+    return wxFrame::ProcessEvent(event);
 }
 
 void frmContactEditor::SetupHeaders()
 {
-
-       /* Items for the General Tab */
-
-       SetupColumn(CE_NICKNAME, lboNicknames);
-       SetupColumn(CE_ADDRESS, lboAddresses);
-       SetupColumn(CE_EMAIL, lboEmails);
-       SetupColumn(CE_IM, lboIM);
-       SetupColumn(CE_TELEPHONE, lboTelephone);
-       SetupColumn(CE_LANG, lboLanguages);
-       SetupColumn(CE_TZ, lboTimezones);
-       SetupColumn(CE_GEOPOSITION, lboGeoposition);
-       SetupColumn(CE_RELATED, lboRelated);
-       SetupColumn(CE_WEBSITE, lboWebsites);
-       SetupColumn(CE_TITLE, lboTitles);
-       SetupColumn(CE_ROLE, lboRoles);
-       SetupColumn(CE_ORG, lboOrganisations);
-       SetupColumn(CE_NOTE, lboNotes);
-       
-       /* Items for the Home Tab */
-       
-       SetupColumn(CE_NICKNAME, lboHomeNicknames);
-       SetupColumn(CE_ADDRESS, lboHomeAddresses);
-       SetupColumn(CE_EMAIL, lboHomeEmails);
-       SetupColumn(CE_IM, lboHomeIM);
-       SetupColumn(CE_TELEPHONE, lboHomeTelephone);    
-       SetupColumn(CE_LANG, lboHomeLanguages);
-       SetupColumn(CE_TZ, lboHomeTimezones);
-       SetupColumn(CE_GEOPOSITION, lboHomeGeoposition);
-       SetupColumn(CE_WEBSITE, lboHomeWebsites);
-       SetupColumn(CE_TITLE, lboHomeTitles);
-       SetupColumn(CE_ROLE, lboHomeRoles);
-       SetupColumn(CE_ORG, lboHomeOrganisations);
-       SetupColumn(CE_NOTE, lboHomeNotes);
-       
-       /* Items for the Business Tab */
-       
-       SetupColumn(CE_NICKNAME, lboBusinessNicknames);
-       SetupColumn(CE_ADDRESS, lboBusinessAddresses);
-       SetupColumn(CE_EMAIL, lboBusinessEmail);
-       SetupColumn(CE_IM, lboBusinessIM);
-       SetupColumn(CE_TELEPHONE, lboBusinessTelephone);        
-       SetupColumn(CE_LANG, lboBusinessLanguages);
-       SetupColumn(CE_TZ, lboBusinessTimezones);
-       SetupColumn(CE_GEOPOSITION, lboBusinessGeoposition);
-       SetupColumn(CE_WEBSITE, lboBusinessWebsites);
-       SetupColumn(CE_TITLE, lboBusinessTitles);
-       SetupColumn(CE_ROLE, lboBusinessRoles);
-       SetupColumn(CE_ORG, lboBusinessOrganisations);
-       SetupColumn(CE_NOTE, lboBusinessNotes); 
-       
-       /* Items for the Categories Tab */
-       
-       SetupColumn(CE_CATEGORIES, lboCategories);
-       
-       /* Items for the Groups Tab */
-       
-       SetupColumn(CE_GROUPS, lboGroups);
-       
-       /* Items for the Pictures and Logos Tab */
-       
-       SetupColumn(CE_PICTURES, lboPictures);
-       SetupColumn(CE_PICTURES, lboLogos);     
-       
-       /* Items for the Sounds Tab */
-       
-       SetupColumn(CE_SOUNDS, lboSounds);
-       
-       /* Items for the Calendaring Tab */
-       
-       SetupColumn(CE_CALENDAR, lboCalendarAddresses);
-       SetupColumn(CE_CALENDAR, lboCalendarRequestAddress);
-       SetupColumn(CE_CALENDAR, lboFreeBusyAddresses); 
-       
-       /* Items for the Security Tab */
-       
-       SetupColumn(CE_KEY, lboKeys);
-       
-       /* Items for the Other Tab */
-       
-       SetupColumn(CE_TOKEN, lboVendorNamespace);
-       SetupColumn(CE_TOKEN, lboXToken);
-       
+    
+    /* Items for the General Tab */
+    
+    SetupColumn(CE_NICKNAME, lboNicknames);
+    SetupColumn(CE_ADDRESS, lboAddresses);
+    SetupColumn(CE_EMAIL, lboEmails);
+    SetupColumn(CE_IM, lboIM);
+    SetupColumn(CE_TELEPHONE, lboTelephone);
+    SetupColumn(CE_LANG, lboLanguages);
+    SetupColumn(CE_TZ, lboTimezones);
+    SetupColumn(CE_GEOPOSITION, lboGeoposition);
+    SetupColumn(CE_RELATED, lboRelated);
+    SetupColumn(CE_WEBSITE, lboWebsites);
+    SetupColumn(CE_TITLE, lboTitles);
+    SetupColumn(CE_ROLE, lboRoles);
+    SetupColumn(CE_ORG, lboOrganisations);
+    SetupColumn(CE_NOTE, lboNotes);
+    
+    /* Items for the Home Tab */
+    
+    SetupColumn(CE_NICKNAME, lboHomeNicknames);
+    SetupColumn(CE_ADDRESS, lboHomeAddresses);
+    SetupColumn(CE_EMAIL, lboHomeEmails);
+    SetupColumn(CE_IM, lboHomeIM);
+    SetupColumn(CE_TELEPHONE, lboHomeTelephone);       
+    SetupColumn(CE_LANG, lboHomeLanguages);
+    SetupColumn(CE_TZ, lboHomeTimezones);
+    SetupColumn(CE_GEOPOSITION, lboHomeGeoposition);
+    SetupColumn(CE_WEBSITE, lboHomeWebsites);
+    SetupColumn(CE_TITLE, lboHomeTitles);
+    SetupColumn(CE_ROLE, lboHomeRoles);
+    SetupColumn(CE_ORG, lboHomeOrganisations);
+    SetupColumn(CE_NOTE, lboHomeNotes);
+    
+    /* Items for the Business Tab */
+    
+    SetupColumn(CE_NICKNAME, lboBusinessNicknames);
+    SetupColumn(CE_ADDRESS, lboBusinessAddresses);
+    SetupColumn(CE_EMAIL, lboBusinessEmail);
+    SetupColumn(CE_IM, lboBusinessIM);
+    SetupColumn(CE_TELEPHONE, lboBusinessTelephone);   
+    SetupColumn(CE_LANG, lboBusinessLanguages);
+    SetupColumn(CE_TZ, lboBusinessTimezones);
+    SetupColumn(CE_GEOPOSITION, lboBusinessGeoposition);
+    SetupColumn(CE_WEBSITE, lboBusinessWebsites);
+    SetupColumn(CE_TITLE, lboBusinessTitles);
+    SetupColumn(CE_ROLE, lboBusinessRoles);
+    SetupColumn(CE_ORG, lboBusinessOrganisations);
+    SetupColumn(CE_NOTE, lboBusinessNotes);    
+    
+    /* Items for the Categories Tab */
+    
+    SetupColumn(CE_CATEGORIES, lboCategories);
+    
+    /* Items for the Groups Tab */
+    
+    SetupColumn(CE_GROUPS, lboGroups);
+    
+    /* Items for the Pictures and Logos Tab */
+    
+    SetupColumn(CE_PICTURES, lboPictures);
+    SetupColumn(CE_PICTURES, lboLogos);        
+    
+    /* Items for the Sounds Tab */
+    
+    SetupColumn(CE_SOUNDS, lboSounds);
+    
+    /* Items for the Calendaring Tab */
+    
+    SetupColumn(CE_CALENDAR, lboCalendarAddresses);
+    SetupColumn(CE_CALENDAR, lboCalendarRequestAddress);
+    SetupColumn(CE_CALENDAR, lboFreeBusyAddresses);    
+    
+    /* Items for the Security Tab */
+    
+    SetupColumn(CE_KEY, lboKeys);
+    
+    /* Items for the Other Tab */
+    
+    SetupColumn(CE_TOKEN, lboVendorNamespace);
+    SetupColumn(CE_TOKEN, lboXToken);
+    
 }
 
 void frmContactEditor::SetupColumn(wxString ColumnType, wxListCtrl *ListCtrl)
 {
-       
-       wxListItem coldata;     
-       
-       if (ColumnType == CE_NICKNAME){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Nickname"));
-               coldata.SetWidth(128);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(1, coldata);             
-       
-       } else if (ColumnType == CE_ADDRESS){
-               
-               coldata.SetId(0);
-               coldata.SetText(_("Address"));
-               coldata.SetWidth(128);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Town"));
-               coldata.SetWidth(64);
-               ListCtrl->InsertColumn(1, coldata);             
-               
-               coldata.SetId(2);
-               coldata.SetText(_("County"));
-               coldata.SetWidth(64);
-               ListCtrl->InsertColumn(2, coldata);
-               
-               coldata.SetId(3);
-               coldata.SetText(_("Post code"));
-               coldata.SetWidth(48);
-               ListCtrl->InsertColumn(3, coldata);
-               
-               coldata.SetId(4);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(4, coldata);             
-               
-       } else if (ColumnType == CE_EMAIL){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Email address"));
-               coldata.SetWidth(304);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(1, coldata);
-       
-       } else if (ColumnType == CE_IM){
-
-               coldata.SetId(0);
-               coldata.SetText(_("Type"));
-               coldata.SetWidth(64);
-               ListCtrl->InsertColumn(0, coldata);
-
-               coldata.SetId(1);
-               coldata.SetText(_("Address"));
-               coldata.SetWidth(240);
-               ListCtrl->InsertColumn(1, coldata);
-               
-               coldata.SetId(2);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(2, coldata);             
-       
-       } else if (ColumnType == CE_TELEPHONE){
-               
-               coldata.SetId(0);
-               coldata.SetText(_("Telephone number"));
-               coldata.SetWidth(128);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Type"));
-               coldata.SetWidth(64);
-               ListCtrl->InsertColumn(1, coldata);             
-               
-               coldata.SetId(2);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(2, coldata);             
-       
-       } else if (ColumnType == CE_LANG){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Language"));
-               coldata.SetWidth(128);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(1, coldata);             
-       
-       } else if (ColumnType == CE_TZ){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Timezone"));
-               coldata.SetWidth(192);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(1, coldata);             
-       
-       } else if (ColumnType == CE_RELATED){
-               
-               coldata.SetId(0);
-               coldata.SetText(_("Type"));
-               coldata.SetWidth(64);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Name/Description"));
-               coldata.SetWidth(192);
-               ListCtrl->InsertColumn(1, coldata);
-               
-               coldata.SetId(2);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(2, coldata);
-       
-       } else if (ColumnType == CE_WEBSITE){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Website"));
-               coldata.SetWidth(288);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(1, coldata);
-       
-       } else if (ColumnType == CE_TITLE){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Title"));
-               coldata.SetWidth(288);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(1, coldata);
-       
-       } else if (ColumnType == CE_ROLE){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Role"));
-               coldata.SetWidth(288);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(1, coldata);
-       
-       } else if (ColumnType == CE_ORG){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Organisation"));
-               coldata.SetWidth(288);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(1, coldata);
-       
-       } else if (ColumnType == CE_NOTE){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Notes"));
-               coldata.SetWidth(288);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(1, coldata);     
-       
-       } else if (ColumnType == CE_CATEGORIES){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Category"));
-               coldata.SetWidth(320);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(1, coldata);
-               
-       } else if (ColumnType == CE_GROUPS){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Member"));
-               coldata.SetWidth(320);
-               ListCtrl->InsertColumn(0, coldata);
-
-       } else if (ColumnType == CE_GEOPOSITION){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Geoposition"));
-               coldata.SetWidth(320);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(1, coldata);
-               
-       } else if (ColumnType == CE_PICTURES){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Pictures"));
-               coldata.SetWidth(128);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Type"));
-               coldata.SetWidth(64);
-               ListCtrl->InsertColumn(1, coldata);             
-               
-               coldata.SetId(2);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(2, coldata);
-               
-       } else if (ColumnType == CE_SOUNDS){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Sounds"));
-               coldata.SetWidth(128);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Type"));
-               coldata.SetWidth(64);
-               ListCtrl->InsertColumn(1, coldata);             
-               
-               coldata.SetId(2);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(2, coldata);
-               
-       } else if (ColumnType == CE_CALENDAR){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Calendar Address"));
-               coldata.SetWidth(224);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Type"));
-               coldata.SetWidth(64);
-               ListCtrl->InsertColumn(1, coldata);             
-               
-               coldata.SetId(2);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(2, coldata);
-               
-       } else if (ColumnType == CE_KEY){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Key information"));
-               coldata.SetWidth(224);
-               ListCtrl->InsertColumn(0, coldata);
-               
-               coldata.SetId(1);
-               coldata.SetText(_("Type"));
-               coldata.SetWidth(64);
-               ListCtrl->InsertColumn(1, coldata);             
-               
-               coldata.SetId(2);
-               coldata.SetText(_("Pri."));
-               coldata.SetWidth(32);
-               ListCtrl->InsertColumn(2, coldata);
-               
-       } else if (ColumnType == CE_TOKEN){
-       
-               coldata.SetId(0);
-               coldata.SetText(_("Token"));
-               coldata.SetWidth(320);
-               ListCtrl->InsertColumn(0, coldata);
-               
-       }
-       
+    
+    wxListItem coldata;        
+    
+    if (ColumnType == CE_NICKNAME){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Nickname"));
+        coldata.SetWidth(128);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(1, coldata);            
+        
+    } else if (ColumnType == CE_ADDRESS){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Address"));
+        coldata.SetWidth(128);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Town"));
+        coldata.SetWidth(64);
+        ListCtrl->InsertColumn(1, coldata);            
+        
+        coldata.SetId(2);
+        coldata.SetText(_("County"));
+        coldata.SetWidth(64);
+        ListCtrl->InsertColumn(2, coldata);
+        
+        coldata.SetId(3);
+        coldata.SetText(_("Post code"));
+        coldata.SetWidth(48);
+        ListCtrl->InsertColumn(3, coldata);
+        
+        coldata.SetId(4);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(4, coldata);            
+        
+    } else if (ColumnType == CE_EMAIL){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Email address"));
+        coldata.SetWidth(304);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(1, coldata);
+        
+    } else if (ColumnType == CE_IM){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Type"));
+        coldata.SetWidth(64);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Address"));
+        coldata.SetWidth(240);
+        ListCtrl->InsertColumn(1, coldata);
+        
+        coldata.SetId(2);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(2, coldata);            
+        
+    } else if (ColumnType == CE_TELEPHONE){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Telephone number"));
+        coldata.SetWidth(128);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Type"));
+        coldata.SetWidth(64);
+        ListCtrl->InsertColumn(1, coldata);            
+        
+        coldata.SetId(2);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(2, coldata);            
+        
+    } else if (ColumnType == CE_LANG){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Language"));
+        coldata.SetWidth(128);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(1, coldata);            
+        
+    } else if (ColumnType == CE_TZ){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Timezone"));
+        coldata.SetWidth(192);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(1, coldata);            
+        
+    } else if (ColumnType == CE_RELATED){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Type"));
+        coldata.SetWidth(64);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Name/Description"));
+        coldata.SetWidth(192);
+        ListCtrl->InsertColumn(1, coldata);
+        
+        coldata.SetId(2);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(2, coldata);
+        
+    } else if (ColumnType == CE_WEBSITE){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Website"));
+        coldata.SetWidth(288);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(1, coldata);
+        
+    } else if (ColumnType == CE_TITLE){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Title"));
+        coldata.SetWidth(288);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(1, coldata);
+        
+    } else if (ColumnType == CE_ROLE){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Role"));
+        coldata.SetWidth(288);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(1, coldata);
+        
+    } else if (ColumnType == CE_ORG){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Organisation"));
+        coldata.SetWidth(288);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(1, coldata);
+        
+    } else if (ColumnType == CE_NOTE){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Notes"));
+        coldata.SetWidth(288);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(1, coldata);    
+        
+    } else if (ColumnType == CE_CATEGORIES){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Category"));
+        coldata.SetWidth(320);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(1, coldata);
+        
+    } else if (ColumnType == CE_GROUPS){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Member"));
+        coldata.SetWidth(320);
+        ListCtrl->InsertColumn(0, coldata);
+        
+    } else if (ColumnType == CE_GEOPOSITION){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Geoposition"));
+        coldata.SetWidth(320);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(1, coldata);
+        
+    } else if (ColumnType == CE_PICTURES){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Pictures"));
+        coldata.SetWidth(128);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Type"));
+        coldata.SetWidth(64);
+        ListCtrl->InsertColumn(1, coldata);            
+        
+        coldata.SetId(2);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(2, coldata);
+        
+    } else if (ColumnType == CE_SOUNDS){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Sounds"));
+        coldata.SetWidth(128);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Type"));
+        coldata.SetWidth(64);
+        ListCtrl->InsertColumn(1, coldata);            
+        
+        coldata.SetId(2);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(2, coldata);
+        
+    } else if (ColumnType == CE_CALENDAR){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Calendar Address"));
+        coldata.SetWidth(224);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Type"));
+        coldata.SetWidth(64);
+        ListCtrl->InsertColumn(1, coldata);            
+        
+        coldata.SetId(2);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(2, coldata);
+        
+    } else if (ColumnType == CE_KEY){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Key information"));
+        coldata.SetWidth(224);
+        ListCtrl->InsertColumn(0, coldata);
+        
+        coldata.SetId(1);
+        coldata.SetText(_("Type"));
+        coldata.SetWidth(64);
+        ListCtrl->InsertColumn(1, coldata);            
+        
+        coldata.SetId(2);
+        coldata.SetText(_("Pri."));
+        coldata.SetWidth(32);
+        ListCtrl->InsertColumn(2, coldata);
+        
+    } else if (ColumnType == CE_TOKEN){
+        
+        coldata.SetId(0);
+        coldata.SetText(_("Token"));
+        coldata.SetWidth(320);
+        ListCtrl->InsertColumn(0, coldata);
+        
+    }
+    
 }
 
 int frmContactEditor::GetLastInt(std::map<int, wxString> *MapData){
-
-       /*
-       int intResult = 0;
-
-       std::map<int,wxString>::iterator iwxsit;
-
-       for( iwxsit=(*MapData).begin(); iwxsit != (*MapData).end(); iwxsit++){
-               intResult = (*iwxsit).first;
-       }
-       
-       return intResult;
-       */
-       
-       intValueSeek++;
-       return intValueSeek;
-
+    
+    /*
+     int intResult = 0;
+     
+     std::map<int,wxString>::iterator iwxsit;
+     
+     for( iwxsit=(*MapData).begin(); iwxsit != (*MapData).end(); iwxsit++){
+     intResult = (*iwxsit).first;
+     }
+     
+     return intResult;
+     */
+    
+    intValueSeek++;
+    return intValueSeek;
+    
 }
 
 int frmContactEditor::GetLastInt(std::map<int, std::string> *MapData){
-
-       /* int intResult = 0;
-
-       std::map<int,std::string>::iterator iwxsit;
-
-       for( iwxsit=(*MapData).begin(); iwxsit != (*MapData).end(); iwxsit++){
-               intResult = (*iwxsit).first;
-       }*/
-       
-       intValueSeek++;
-       return intValueSeek;
-
+    
+    /* int intResult = 0;
+     
+     std::map<int,std::string>::iterator iwxsit;
+     
+     for( iwxsit=(*MapData).begin(); iwxsit != (*MapData).end(); iwxsit++){
+     intResult = (*iwxsit).first;
+     }*/
+    
+    intValueSeek++;
+    return intValueSeek;
+    
 }
 
 bool frmContactEditor::GetSelectedItem(wxListCtrl *ListCtrlPtr, 
-                                       long *longSelected,
-                                       int *intSelectedData){
-
+                                       long *longSelected,
+                                       int *intSelectedData){
+    
     *longSelected = -1;
     *intSelectedData = 0;
-
+    
     *longSelected = ListCtrlPtr->GetNextItem(*longSelected, 
-       wxLIST_NEXT_ALL,
-       wxLIST_STATE_SELECTED);
-
-       if (*longSelected == -1){
-               return FALSE;
-       }
-       else {
-               return TRUE;
-       }
-
-    *intSelectedData = ListCtrlPtr->GetItemData(*longSelected);  
-
-}
-
-void frmContactEditor::DeleteMapDataProcess(int IndexNum, std::map<int, std::string>* MapData){
-       MapData->erase(IndexNum);
-}
-
-void frmContactEditor::DeleteMapDataProcess(int IndexNum, std::map<int, wxString>* MapData){
-       MapData->erase(IndexNum);
-}
-
-void frmContactEditor::DeleteMapDataProcess(int IndexNum, std::map<int, int>* MapData){
-       MapData->erase(IndexNum);
-}
-
-void frmContactEditor::DeleteMapDataProcess(int IndexNum, std::map<int, bool>* MapData){
-       MapData->erase(IndexNum);
-}
-
-void frmContactEditor::ProcessSaveDataProc( wxString PropName,
-                                       std::map<int,int>* MapData){
-
-       int intIterVal = (*iterDataPtr)->first;
-       
-       std::map<int,int>::iterator intIter;
-       
-       intIter = MapData->find(intIterVal);
-       
-       int intPropValue; 
-       
-       if (intIter->first == intIterVal){
-       
-           intPropValue = intIter->second;
-       
-           if (intPropValue){
-
-               if (*boolAdditionalPtr == TRUE){
-               
-                   strPropertyPtr->Append(wxT(";"));
-               
-               } else {
-               
-                   *boolAdditionalPtr = TRUE;
-               
-               }
-
-               strPropertyPtr->Append(PropName + wxT("=") + wxString::Format(wxT("%i"), intPropValue));
-           
-               *boolExtraPtr = TRUE;
-           
-           }
-       
-       }
-
-}
-
-void frmContactEditor::ProcessSaveDataProc( wxString PropName,
-                                       std::map<int,wxString>* MapData){
-
-       int intIterVal;
-
-       intIterVal = (*iterDataPtr)->first;
-       
-       std::map<int,wxString>::iterator strIter;
-       
-       strIter = MapData->find(intIterVal);
-
-       if (strIter == MapData->end()){
-
-               return;
-
-       }
-
-       wxString strPropValue;
-       
-       if (strIter->first == intIterVal){
-
-           strPropValue = strIter->second;
-               
-           if (!strPropValue.IsEmpty() && PropName.IsEmpty()){
-       
-               strPropValue.Trim();
-               strPropValue.Trim();
-
-               if (*boolAdditionalPtr == TRUE){
-       
-                   strPropertyPtr->Append(wxT(";"));
-       
-               } else {
-       
-                   *boolAdditionalPtr = TRUE;
-       
-               }
-
-               strPropertyPtr->Append(strPropValue);   
-               
-               *boolExtraPtr = TRUE;
-       
-               return;
-       
-           }
-       
-           if (!strPropValue.IsEmpty()){
-           
-               strPropValue.Trim();
-               strPropValue.Trim();
-
-               if (*boolAdditionalPtr == TRUE){
-               
-                   strPropertyPtr->Append(wxT(";"));
-               
-               } else {
-               
-                   *boolAdditionalPtr = TRUE;
-               
-               }
-               
-               // Look for semi-colon in property name and if there is then
-               // quote the value.
-
-               if (PropName != wxT("TYPE")){
-               
-                       EscapeString(&strPropValue, FALSE);     
-               
-               }
-               
-               if (strPropValue.find(wxT(";")) == wxNOT_FOUND && strPropValue.find(wxT(":")) == wxNOT_FOUND &&
-                   strPropValue.find(wxT(",")) == wxNOT_FOUND){
-
-                       strPropertyPtr->Append(PropName + wxT("=") + strPropValue);
-               
-               } else {
-
-                       strPropertyPtr->Append(PropName + wxT("=\"") + strPropValue + wxT("\""));
-                       
-               }
-           
-               *boolExtraPtr = TRUE;
-           
-           }
-       
-       }
-
-}
-
-void frmContactEditor::ProcessSaveDataStrProc( wxString PropName,
-                                       std::map<int,std::string>* MapData){
-
-       int intIterVal = (*iterDataStringPtr)->first;
-       
-       //std::map<int,wxString>::iterator strIter;
-       
-       std::map<int,std::string>::iterator stdstrIter;
-       
-       stdstrIter = MapData->find(intIterVal); 
-       
-       if (stdstrIter->first == intIterVal){
-       
-           wxString strPropValue(stdstrIter->second.c_str(), wxConvUTF8);
-
-               if (!strPropValue.IsEmpty() && PropName.IsEmpty()){
-
-                       strPropValue.Trim();
-                       strPropValue.Trim();
-
-                       if (*boolAdditionalPtr == TRUE){
-
-                               strPropertyPtr->Append(wxT(";"));
-
-                       } else {
-
-                               *boolAdditionalPtr = TRUE;
-
-                       }
-
-                       strPropertyPtr->Append(strPropValue);
-
-                       *boolExtraPtr = TRUE;
-
-                       return;
-
-               }
-       
-               if (!strPropValue.IsEmpty()){
-
-                       strPropValue.Trim();
-                       strPropValue.Trim();
-
-                       if (*boolAdditionalPtr == TRUE){
-
-                               strPropertyPtr->Append(wxT(";"));
-
-                       } else {
-
-                               *boolAdditionalPtr = TRUE;
-
-                       }
-
-                       // Look for semi-colon in property name and if there is then
-                       // quote the value.
-
-                       if (PropName != wxT("TYPE")){
-
-                               EscapeString(&strPropValue, FALSE);
-
-                       }
-
-                       if (strPropValue.find(wxT(";")) == wxNOT_FOUND && strPropValue.find(wxT(":")) == wxNOT_FOUND &&
-                               strPropValue.find(wxT(",")) == wxNOT_FOUND){
+                                             wxLIST_NEXT_ALL,
+                                             wxLIST_STATE_SELECTED);
+    
+    if (*longSelected == -1){
+        return FALSE;
+    }
+    else {
+        return TRUE;
+    }
+    
+    *intSelectedData = ListCtrlPtr->GetItemData(*longSelected);  
+    
+}
 
-                               strPropertyPtr->Append(PropName + wxT("=") + strPropValue);
+void frmContactEditor::DeleteMapDataProcess(int IndexNum, std::map<int, std::string>* MapData){
+    MapData->erase(IndexNum);
+}
 
-                       } else {
+void frmContactEditor::DeleteMapDataProcess(int IndexNum, std::map<int, wxString>* MapData){
+    MapData->erase(IndexNum);
+}
 
-                               strPropertyPtr->Append(PropName + wxT("=\"") + strPropValue + wxT("\""));
+void frmContactEditor::DeleteMapDataProcess(int IndexNum, std::map<int, int>* MapData){
+    MapData->erase(IndexNum);
+}
 
-                       }
+void frmContactEditor::DeleteMapDataProcess(int IndexNum, std::map<int, bool>* MapData){
+    MapData->erase(IndexNum);
+}
 
-                       *boolExtraPtr = TRUE;
+void frmContactEditor::ProcessSaveDataProc( wxString PropName,
+                                           std::map<int,int>* MapData){
+    
+    int intIterVal = (*iterDataPtr)->first;
+    
+    std::map<int,int>::iterator intIter;
+    
+    intIter = MapData->find(intIterVal);
+    
+    int intPropValue; 
+    
+    if (intIter->first == intIterVal){
+        
+        intPropValue = intIter->second;
+        
+        if (intPropValue){
+            
+            if (*boolAdditionalPtr == TRUE){
+                
+                strPropertyPtr->Append(wxT(";"));
+                
+            } else {
+                
+                *boolAdditionalPtr = TRUE;
+                
+            }
+            
+            strPropertyPtr->Append(PropName + wxT("=") + wxString::Format(wxT("%i"), intPropValue));
+            
+            *boolExtraPtr = TRUE;
+            
+        }
+        
+    }
+    
+}
 
-               }
-       
-       }
+void frmContactEditor::ProcessSaveDataProc( wxString PropName,
+                                           std::map<int,wxString>* MapData){
+    
+    int intIterVal;
+    
+    intIterVal = (*iterDataPtr)->first;
+    
+    std::map<int,wxString>::iterator strIter;
+    
+    strIter = MapData->find(intIterVal);
+    
+    if (strIter == MapData->end()){
+        
+        return;
+        
+    }
+    
+    wxString strPropValue;
+    
+    if (strIter->first == intIterVal){
+        
+        strPropValue = strIter->second;
+        
+        if (!strPropValue.IsEmpty() && PropName.IsEmpty()){
+            
+            strPropValue.Trim();
+            strPropValue.Trim();
+            
+            if (*boolAdditionalPtr == TRUE){
+                
+                strPropertyPtr->Append(wxT(";"));
+                
+            } else {
+                
+                *boolAdditionalPtr = TRUE;
+                
+            }
+            
+            strPropertyPtr->Append(strPropValue);      
+            
+            *boolExtraPtr = TRUE;
+            
+            return;
+            
+        }
+        
+        if (!strPropValue.IsEmpty()){
+            
+            strPropValue.Trim();
+            strPropValue.Trim();
+            
+            if (*boolAdditionalPtr == TRUE){
+                
+                strPropertyPtr->Append(wxT(";"));
+                
+            } else {
+                
+                *boolAdditionalPtr = TRUE;
+                
+            }
+            
+            // Look for semi-colon in property name and if there is then
+            // quote the value.
+            
+            if (PropName != wxT("TYPE")){
+                
+                EscapeString(&strPropValue, FALSE);    
+                
+            }
+            
+            if (strPropValue.find(wxT(";")) == wxNOT_FOUND && strPropValue.find(wxT(":")) == wxNOT_FOUND &&
+                strPropValue.find(wxT(",")) == wxNOT_FOUND){
+                
+                strPropertyPtr->Append(PropName + wxT("=") + strPropValue);
+                
+            } else {
+                
+                strPropertyPtr->Append(PropName + wxT("=\"") + strPropValue + wxT("\""));
+                
+            }
+            
+            *boolExtraPtr = TRUE;
+            
+        }
+        
+    }
+    
+}
 
+void frmContactEditor::ProcessSaveDataStrProc( wxString PropName,
+                                              std::map<int,std::string>* MapData){
+    
+    int intIterVal = (*iterDataStringPtr)->first;
+    
+    //std::map<int,wxString>::iterator strIter;
+    
+    std::map<int,std::string>::iterator stdstrIter;
+    
+    stdstrIter = MapData->find(intIterVal);    
+    
+    if (stdstrIter->first == intIterVal){
+        
+        wxString strPropValue(stdstrIter->second.c_str(), wxConvUTF8);
+        
+        if (!strPropValue.IsEmpty() && PropName.IsEmpty()){
+            
+            strPropValue.Trim();
+            strPropValue.Trim();
+            
+            if (*boolAdditionalPtr == TRUE){
+                
+                strPropertyPtr->Append(wxT(";"));
+                
+            } else {
+                
+                *boolAdditionalPtr = TRUE;
+                
+            }
+            
+            strPropertyPtr->Append(strPropValue);
+            
+            *boolExtraPtr = TRUE;
+            
+            return;
+            
+        }
+        
+        if (!strPropValue.IsEmpty()){
+            
+            strPropValue.Trim();
+            strPropValue.Trim();
+            
+            if (*boolAdditionalPtr == TRUE){
+                
+                strPropertyPtr->Append(wxT(";"));
+                
+            } else {
+                
+                *boolAdditionalPtr = TRUE;
+                
+            }
+            
+            // Look for semi-colon in property name and if there is then
+            // quote the value.
+            
+            if (PropName != wxT("TYPE")){
+                
+                EscapeString(&strPropValue, FALSE);
+                
+            }
+            
+            if (strPropValue.find(wxT(";")) == wxNOT_FOUND && strPropValue.find(wxT(":")) == wxNOT_FOUND &&
+                strPropValue.find(wxT(",")) == wxNOT_FOUND){
+                
+                strPropertyPtr->Append(PropName + wxT("=") + strPropValue);
+                
+            } else {
+                
+                strPropertyPtr->Append(PropName + wxT("=\"") + strPropValue + wxT("\""));
+                
+            }
+            
+            *boolExtraPtr = TRUE;
+            
+        }
+        
+    }
+    
 }
 
 
 void frmContactEditor::ProcessSaveDataStrProc( wxString PropName,
-                                       std::map<int,int>* MapData){
-
-       int intIterVal = (*iterDataStringPtr)->first;
-       
-       std::map<int,int>::iterator intIter;
-       
-       intIter = MapData->find(intIterVal);
-       
-       int intPropValue; 
-       
-       if (intIter->first == intIterVal){
-       
-           intPropValue = intIter->second;
-       
-           if (intPropValue){
-
-               if (*boolAdditionalPtr == TRUE){
-               
-                   strPropertyPtr->Append(wxT(";"));
-               
-               } else {
-               
-                   *boolAdditionalPtr = TRUE;
-               
-               }
-
-               strPropertyPtr->Append(PropName + wxT("=") + wxString::Format(wxT("%i"), intPropValue));
-           
-               *boolExtraPtr = TRUE;
-           
-           }
-       
-       }
-
+                                              std::map<int,int>* MapData){
+    
+    int intIterVal = (*iterDataStringPtr)->first;
+    
+    std::map<int,int>::iterator intIter;
+    
+    intIter = MapData->find(intIterVal);
+    
+    int intPropValue; 
+    
+    if (intIter->first == intIterVal){
+        
+        intPropValue = intIter->second;
+        
+        if (intPropValue){
+            
+            if (*boolAdditionalPtr == TRUE){
+                
+                strPropertyPtr->Append(wxT(";"));
+                
+            } else {
+                
+                *boolAdditionalPtr = TRUE;
+                
+            }
+            
+            strPropertyPtr->Append(PropName + wxT("=") + wxString::Format(wxT("%i"), intPropValue));
+            
+            *boolExtraPtr = TRUE;
+            
+        }
+        
+    }
+    
 }
 
 void frmContactEditor::ProcessSaveDataStrProc( wxString PropName,
-                                       std::map<int,wxString>* MapData){
-
-       int intIterVal;
-
-       intIterVal = (*iterDataStringPtr)->first;
-       
-       std::map<int,wxString>::iterator strIter;
-       
-       strIter = MapData->find(intIterVal);
-       
-       wxString strPropValue;
-       
-       if (strIter->first == intIterVal){
-
-           strPropValue = strIter->second;
-               
-           if (!strPropValue.IsEmpty() && PropName.IsEmpty()){
-       
-               strPropValue.Trim();
-               strPropValue.Trim();
-
-               if (*boolAdditionalPtr == TRUE){
-       
-                   strPropertyPtr->Append(wxT(";"));
-       
-               } else {
-       
-                   *boolAdditionalPtr = TRUE;
-       
-               }
-
-               strPropertyPtr->Append(strPropValue);   
-               
-               *boolExtraPtr = TRUE;
-       
-               return;
-       
-           }
-       
-           if (!strPropValue.IsEmpty()){
-           
-               strPropValue.Trim();
-               strPropValue.Trim();
-
-               if (*boolAdditionalPtr == TRUE){
-               
-                   strPropertyPtr->Append(wxT(";"));
-               
-               } else {
-               
-                   *boolAdditionalPtr = TRUE;
-               
-               }
-               
-               // Look for semi-colon in property name and if there is then
-               // quote the value.
-
-               if (PropName != wxT("TYPE")){
-               
-                       EscapeString(&strPropValue, FALSE);
-               
-               }
-               
-               if (strPropValue.find(wxT(";")) == wxNOT_FOUND && strPropValue.find(wxT(":")) == wxNOT_FOUND &&
-                   strPropValue.find(wxT(",")) == wxNOT_FOUND){
-
-                       strPropertyPtr->Append(PropName + wxT("=") + strPropValue);
-               
-               } else {
-
-                       strPropertyPtr->Append(PropName + wxT("=\"") + strPropValue + wxT("\""));
-                       
-               }
-           
-               *boolExtraPtr = TRUE;
-           
-           }
-       
-       }
-
+                                              std::map<int,wxString>* MapData){
+    
+    int intIterVal;
+    
+    intIterVal = (*iterDataStringPtr)->first;
+    
+    std::map<int,wxString>::iterator strIter;
+    
+    strIter = MapData->find(intIterVal);
+    
+    wxString strPropValue;
+    
+    if (strIter->first == intIterVal){
+        
+        strPropValue = strIter->second;
+        
+        if (!strPropValue.IsEmpty() && PropName.IsEmpty()){
+            
+            strPropValue.Trim();
+            strPropValue.Trim();
+            
+            if (*boolAdditionalPtr == TRUE){
+                
+                strPropertyPtr->Append(wxT(";"));
+                
+            } else {
+                
+                *boolAdditionalPtr = TRUE;
+                
+            }
+            
+            strPropertyPtr->Append(strPropValue);      
+            
+            *boolExtraPtr = TRUE;
+            
+            return;
+            
+        }
+        
+        if (!strPropValue.IsEmpty()){
+            
+            strPropValue.Trim();
+            strPropValue.Trim();
+            
+            if (*boolAdditionalPtr == TRUE){
+                
+                strPropertyPtr->Append(wxT(";"));
+                
+            } else {
+                
+                *boolAdditionalPtr = TRUE;
+                
+            }
+            
+            // Look for semi-colon in property name and if there is then
+            // quote the value.
+            
+            if (PropName != wxT("TYPE")){
+                
+                EscapeString(&strPropValue, FALSE);
+                
+            }
+            
+            if (strPropValue.find(wxT(";")) == wxNOT_FOUND && strPropValue.find(wxT(":")) == wxNOT_FOUND &&
+                strPropValue.find(wxT(",")) == wxNOT_FOUND){
+                
+                strPropertyPtr->Append(PropName + wxT("=") + strPropValue);
+                
+            } else {
+                
+                strPropertyPtr->Append(PropName + wxT("=\"") + strPropValue + wxT("\""));
+                
+            }
+            
+            *boolExtraPtr = TRUE;
+            
+        }
+        
+    }
+    
 }
 
 void frmContactEditor::ProcessCaptureStringsProc(wxString *strCapture){
-
+    
     CaptureString(strCapture, FALSE);
-
+    
 }
 
 void frmContactEditor::ResetSaveProcessData(){
-
+    
     strValue.Clear();
     strValue2.Clear();
     strValue3.Clear();    
-
+    
     boolValue = FALSE;
     boolValue2 = FALSE;    
     intValue2 = 0;
     intValue  = 0;
-
+    
 }
 
 void frmContactEditor::SetupPointers(frmActivityMgr *ActMgr, wxETagProcessTimer *ETagProc,
-                                       frmMain *MainPtrInc){
-
+                                     frmMain *MainPtrInc){
+    
     ActMgrPtr = ActMgr;
     ETagTmrPtr = ETagProc;
     MainPtr = MainPtrInc;
-
+    
 }
 
 void frmContactEditor::ClearContact(){
-
+    
     // Clear out the GUI and values.
     
     // Clear GUI.
@@ -7112,7 +7112,7 @@ void frmContactEditor::ClearContact(){
     wxString NameLanguage;
     wxString NameAltID;
     wxString NameTokens;
-
+    
     wxString Birthday;
     wxString BirthdayAltID;
     wxString BirthdayCalScale;
@@ -7121,19 +7121,19 @@ void frmContactEditor::ClearContact(){
     wxString AnniversaryAltID;
     wxString AnniversaryCalScale;
     wxString AnniversaryTokens;
-
+    
     wxString Gender;
     wxString GenderDetails;
     wxString GenderTokens;
-
+    
     wxString UIDToken;
-
+    
     /* We don't use these at the moment but we want to keep
-      them for compatability reasons */
-
+     them for compatability reasons */
+    
     /*std::map<int, wxString> ExtraFullNames;*/
     /*std::map<int, wxString> ExtraNicknames;*/
-
+    
     FullNamesList.clear();    
     FullNamesListType.clear();
     FullNamesListLanguage.clear();
@@ -7141,7 +7141,7 @@ void frmContactEditor::ClearContact(){
     FullNamesListPID.clear();
     FullNamesListTokens.clear();
     FullNamesListPref.clear();
-
+    
     GeneralNicknamesList.clear();
     GeneralNicknamesListType.clear();
     GeneralNicknamesListLanguage.clear();
@@ -7149,7 +7149,7 @@ void frmContactEditor::ClearContact(){
     GeneralNicknamesListPID.clear();
     GeneralNicknamesListTokens.clear();        
     GeneralNicknamesListPref.clear();        
-
+    
     GeneralAddressList.clear();
     GeneralAddressListTown.clear();
     GeneralAddressListCounty.clear();
@@ -7165,14 +7165,14 @@ void frmContactEditor::ClearContact(){
     GeneralAddressListType.clear();
     GeneralAddressListMediatype.clear();
     GeneralAddressListPref.clear();
-
+    
     GeneralEmailList.clear();
     GeneralEmailListAltID.clear();
     GeneralEmailListPID.clear();
     GeneralEmailListType.clear();
     GeneralEmailListTokens.clear();
     GeneralEmailListPref.clear();
-
+    
     GeneralIMList.clear();
     GeneralIMListAltID.clear();
     GeneralIMListPID.clear();
@@ -7180,21 +7180,21 @@ void frmContactEditor::ClearContact(){
     GeneralIMListTokens.clear();
     GeneralIMListMediatype.clear();
     GeneralIMListPref.clear();
-
+    
     GeneralTelephoneList.clear();
     GeneralTelephoneListAltID.clear();
     GeneralTelephoneListPID.clear();
     GeneralTelephoneListType.clear();
     GeneralTelephoneListTokens.clear();
     GeneralTelephoneListPref.clear();
-
+    
     GeneralLanguageList.clear();
     GeneralLanguageListAltID.clear();
     GeneralLanguageListPID.clear();
     GeneralLanguageListType.clear();
     GeneralLanguageListTokens.clear();
     GeneralLanguageListPref.clear();
-
+    
     GeneralTZList.clear();
     GeneralTZListAltID.clear();
     GeneralTZListPID.clear();
@@ -7202,7 +7202,7 @@ void frmContactEditor::ClearContact(){
     GeneralTZListTokens.clear();
     GeneralTZListMediatype.clear();
     GeneralTZListPref.clear();
-
+    
     GeneralGeographyList.clear();
     GeneralGeographyListAltID.clear();
     GeneralGeographyListPID.clear();
@@ -7210,7 +7210,7 @@ void frmContactEditor::ClearContact(){
     GeneralGeographyListTokens.clear();
     GeneralGeographyListMediatype.clear();
     GeneralGeographyListPref.clear();
-
+    
     GeneralRelatedList.clear();
     GeneralRelatedListRelType.clear();
     GeneralRelatedListLanguage.clear();
@@ -7219,7 +7219,7 @@ void frmContactEditor::ClearContact(){
     GeneralRelatedListType.clear();
     GeneralRelatedListTokens.clear();
     GeneralRelatedListPref.clear();
-
+    
     GeneralWebsiteList.clear();
     GeneralWebsiteListAltID.clear();
     GeneralWebsiteListPID.clear();
@@ -7227,7 +7227,7 @@ void frmContactEditor::ClearContact(){
     GeneralWebsiteListTokens.clear();
     GeneralWebsiteListMediatype.clear();
     GeneralWebsiteListPref.clear();
-
+    
     GeneralTitleList.clear();
     GeneralTitleListLanguage.clear();        
     GeneralTitleListAltID.clear();
@@ -7235,7 +7235,7 @@ void frmContactEditor::ClearContact(){
     GeneralTitleListType.clear();
     GeneralTitleListTokens.clear();
     GeneralTitleListPref.clear();
-
+    
     GeneralRoleList.clear();
     GeneralRoleListLanguage.clear();        
     GeneralRoleListAltID.clear();
@@ -7243,7 +7243,7 @@ void frmContactEditor::ClearContact(){
     GeneralRoleListType.clear();
     GeneralRoleListTokens.clear();
     GeneralRoleListPref.clear();
-
+    
     GeneralOrganisationsList.clear();
     GeneralOrganisationsListLanguage.clear();        
     GeneralOrganisationsListAltID.clear();
@@ -7252,7 +7252,7 @@ void frmContactEditor::ClearContact(){
     GeneralOrganisationsListTokens.clear();
     GeneralOrganisationsListSortAs.clear();
     GeneralOrganisationsListPref.clear();
-
+    
     GeneralNoteList.clear();
     GeneralNoteListLanguage.clear();        
     GeneralNoteListAltID.clear();
@@ -7260,9 +7260,9 @@ void frmContactEditor::ClearContact(){
     GeneralNoteListType.clear();
     GeneralNoteListTokens.clear();
     GeneralNoteListPref.clear();
-
+    
     /* Items on Home Tab */        
-
+    
     HomeNicknamesList.clear();
     HomeNicknamesListType.clear();
     HomeNicknamesListLanguage.clear();
@@ -7270,7 +7270,7 @@ void frmContactEditor::ClearContact(){
     HomeNicknamesListPID.clear();
     HomeNicknamesListTokens.clear();        
     HomeNicknamesListPref.clear();        
-
+    
     HomeAddressList.clear();
     HomeAddressListTown.clear();
     HomeAddressListCounty.clear();
@@ -7286,14 +7286,14 @@ void frmContactEditor::ClearContact(){
     HomeAddressListType.clear();
     HomeAddressListMediatype.clear();
     HomeAddressListPref.clear();
-
+    
     HomeEmailList.clear();
     HomeEmailListAltID.clear();
     HomeEmailListPID.clear();
     HomeEmailListType.clear();
     HomeEmailListTokens.clear();
     HomeEmailListPref.clear();
-
+    
     HomeIMList.clear();
     HomeIMListAltID.clear();
     HomeIMListPID.clear();
@@ -7301,21 +7301,21 @@ void frmContactEditor::ClearContact(){
     HomeIMListTokens.clear();
     HomeIMListMediatype.clear();
     HomeIMListPref.clear();
-
+    
     HomeTelephoneList.clear();
     HomeTelephoneListAltID.clear();
     HomeTelephoneListPID.clear();
     HomeTelephoneListType.clear();
     HomeTelephoneListTokens.clear();
     HomeTelephoneListPref.clear();
-
+    
     HomeLanguageList.clear();
     HomeLanguageListAltID.clear();
     HomeLanguageListPID.clear();
     HomeLanguageListType.clear();
     HomeLanguageListTokens.clear();
     HomeLanguageListPref.clear();
-
+    
     HomeTZList.clear();
     HomeTZListAltID.clear();
     HomeTZListPID.clear();
@@ -7323,7 +7323,7 @@ void frmContactEditor::ClearContact(){
     HomeTZListTokens.clear();
     HomeTZListMediatype.clear();
     HomeTZListPref.clear();
-
+    
     HomeGeographyList.clear();
     HomeGeographyListAltID.clear();
     HomeGeographyListPID.clear();
@@ -7331,7 +7331,7 @@ void frmContactEditor::ClearContact(){
     HomeGeographyListTokens.clear();
     HomeGeographyListMediatype.clear();
     HomeGeographyListPref.clear();
-
+    
     HomeRelatedList.clear();
     HomeRelatedListRelType.clear();
     HomeRelatedListLanguage.clear();
@@ -7340,7 +7340,7 @@ void frmContactEditor::ClearContact(){
     HomeRelatedListType.clear();
     HomeRelatedListTokens.clear();
     HomeRelatedListPref.clear();        
-
+    
     HomeWebsiteList.clear();
     HomeWebsiteListAltID.clear();
     HomeWebsiteListPID.clear();
@@ -7348,7 +7348,7 @@ void frmContactEditor::ClearContact(){
     HomeWebsiteListTokens.clear();
     HomeWebsiteListMediatype.clear();
     HomeWebsiteListPref.clear();
-
+    
     HomeTitleList.clear();
     HomeTitleListLanguage.clear();
     HomeTitleListAltID.clear();
@@ -7356,7 +7356,7 @@ void frmContactEditor::ClearContact(){
     HomeTitleListType.clear();
     HomeTitleListTokens.clear();
     HomeTitleListPref.clear();
-
+    
     HomeRoleList.clear();
     HomeRoleListLanguage.clear();        
     HomeRoleListAltID.clear();
@@ -7364,7 +7364,7 @@ void frmContactEditor::ClearContact(){
     HomeRoleListType.clear();
     HomeRoleListTokens.clear();
     HomeRoleListPref.clear();
-
+    
     HomeOrganisationsList.clear();
     HomeOrganisationsListLanguage.clear();        
     HomeOrganisationsListAltID.clear();
@@ -7373,7 +7373,7 @@ void frmContactEditor::ClearContact(){
     HomeOrganisationsListTokens.clear();
     HomeOrganisationsListSortAs.clear();
     HomeOrganisationsListPref.clear();
-
+    
     HomeNoteList.clear();
     HomeNoteListLanguage.clear();        
     HomeNoteListAltID.clear();
@@ -7381,9 +7381,9 @@ void frmContactEditor::ClearContact(){
     HomeNoteListType.clear();
     HomeNoteListTokens.clear();
     HomeNoteListPref.clear();        
-
+    
     /* Items on the Business tab */
-
+    
     BusinessNicknamesList.clear();
     BusinessNicknamesListType.clear();
     BusinessNicknamesListLanguage.clear();
@@ -7391,7 +7391,7 @@ void frmContactEditor::ClearContact(){
     BusinessNicknamesListPID.clear();
     BusinessNicknamesListTokens.clear();        
     BusinessNicknamesListPref.clear();        
-
+    
     BusinessAddressList.clear();
     BusinessAddressListTown.clear();
     BusinessAddressListCounty.clear();
@@ -7407,14 +7407,14 @@ void frmContactEditor::ClearContact(){
     BusinessAddressListType.clear();
     BusinessAddressListMediatype.clear();
     BusinessAddressListPref.clear();
-
+    
     BusinessEmailList.clear();
     BusinessEmailListAltID.clear();
     BusinessEmailListPID.clear();
     BusinessEmailListType.clear();
     BusinessEmailListTokens.clear();
     BusinessEmailListPref.clear();
-
+    
     BusinessIMList.clear();
     BusinessIMListAltID.clear();
     BusinessIMListPID.clear();
@@ -7422,21 +7422,21 @@ void frmContactEditor::ClearContact(){
     BusinessIMListTokens.clear();
     BusinessIMListMediatype.clear();
     BusinessIMListPref.clear();
-
+    
     BusinessTelephoneList.clear();
     BusinessTelephoneListAltID.clear();
     BusinessTelephoneListPID.clear();
     BusinessTelephoneListType.clear();
     BusinessTelephoneListTokens.clear();
     BusinessTelephoneListPref.clear();
-
+    
     BusinessLanguageList.clear();
     BusinessLanguageListAltID.clear();
     BusinessLanguageListPID.clear();
     BusinessLanguageListType.clear();
     BusinessLanguageListTokens.clear();
     BusinessLanguageListPref.clear();
-
+    
     BusinessTZList.clear();
     BusinessTZListAltID.clear();
     BusinessTZListPID.clear();
@@ -7444,7 +7444,7 @@ void frmContactEditor::ClearContact(){
     BusinessTZListTokens.clear();
     BusinessTZListMediatype.clear();
     BusinessTZListPref.clear();
-
+    
     BusinessGeographyList.clear();
     BusinessGeographyListAltID.clear();
     BusinessGeographyListPID.clear();
@@ -7452,7 +7452,7 @@ void frmContactEditor::ClearContact(){
     BusinessGeographyListTokens.clear();
     BusinessGeographyListMediatype.clear();
     BusinessGeographyListPref.clear();
-
+    
     BusinessRelatedList.clear();
     BusinessRelatedListRelType.clear();
     BusinessRelatedListLanguage.clear();
@@ -7461,7 +7461,7 @@ void frmContactEditor::ClearContact(){
     BusinessRelatedListType.clear();
     BusinessRelatedListTokens.clear();
     BusinessRelatedListPref.clear();            
-
+    
     BusinessWebsiteList.clear();
     BusinessWebsiteListAltID.clear();
     BusinessWebsiteListPID.clear();
@@ -7469,7 +7469,7 @@ void frmContactEditor::ClearContact(){
     BusinessWebsiteListTokens.clear();
     BusinessWebsiteListMediatype.clear();
     BusinessWebsiteListPref.clear();
-
+    
     BusinessTitleList.clear();
     BusinessTitleListLanguage.clear();        
     BusinessTitleListAltID.clear();
@@ -7477,7 +7477,7 @@ void frmContactEditor::ClearContact(){
     BusinessTitleListType.clear();
     BusinessTitleListTokens.clear();
     BusinessTitleListPref.clear();
-
+    
     BusinessRoleList.clear();
     BusinessRoleListLanguage.clear();        
     BusinessRoleListAltID.clear();
@@ -7485,7 +7485,7 @@ void frmContactEditor::ClearContact(){
     BusinessRoleListType.clear();
     BusinessRoleListTokens.clear();
     BusinessRoleListPref.clear();
-
+    
     BusinessOrganisationsList.clear();
     BusinessOrganisationsListLanguage.clear();        
     BusinessOrganisationsListAltID.clear();
@@ -7494,7 +7494,7 @@ void frmContactEditor::ClearContact(){
     BusinessOrganisationsListTokens.clear();
     BusinessOrganisationsListSortAs.clear();        
     BusinessOrganisationsListPref.clear();
-
+    
     BusinessNoteList.clear();
     BusinessNoteListLanguage.clear();        
     BusinessNoteListAltID.clear();
@@ -7502,27 +7502,27 @@ void frmContactEditor::ClearContact(){
     BusinessNoteListType.clear();
     BusinessNoteListTokens.clear();
     BusinessNoteListPref.clear();        
-
+    
     /* Items on the Categories tab */
-
+    
     CategoriesList.clear();
     CategoriesListAltID.clear();
     CategoriesListPID.clear();
     CategoriesListType.clear();
     CategoriesListTokens.clear();
     CategoriesListPref.clear();    
-
+    
     /* Items on the Groups tab */
-
+    
     GroupsList.clear();
     GroupsListAltID.clear();
     GroupsListPID.clear();
     GroupsListType.clear();
     GroupsListTokens.clear();
     GroupsListPref.clear();
-
+    
     /* Items on the Pictures tab */
-
+    
     PicturesList.clear();
     PicturesListAltID.clear();
     PicturesListPID.clear();
@@ -7532,9 +7532,9 @@ void frmContactEditor::ClearContact(){
     PicturesListTokens.clear();
     PicturesListMediatype.clear();        
     PicturesListPref.clear();
-
+    
     /* Items on the Logos tab */
-
+    
     LogosList.clear();
     LogosListAltID.clear();
     LogosListPID.clear();
@@ -7544,9 +7544,9 @@ void frmContactEditor::ClearContact(){
     LogosListTokens.clear();
     LogosListMediatype.clear();        
     LogosListPref.clear();
-
+    
     /* Items on the Sounds tab */
-
+    
     SoundsList.clear();
     SoundsListAltID.clear();
     SoundsListPID.clear();
@@ -7556,9 +7556,9 @@ void frmContactEditor::ClearContact(){
     SoundsListTokens.clear();
     SoundsListMediatype.clear();        
     SoundsListPref.clear();    
-
+    
     /* Items on the Calendaring tab */
-
+    
     CalendarList.clear();
     CalendarListAltID.clear();
     CalendarListPID.clear();
@@ -7566,7 +7566,7 @@ void frmContactEditor::ClearContact(){
     CalendarListTokens.clear();
     CalendarListMediatype.clear();        
     CalendarListPref.clear();
-
+    
     CalendarRequestList.clear();
     CalendarRequestListAltID.clear();
     CalendarRequestListPID.clear();
@@ -7574,7 +7574,7 @@ void frmContactEditor::ClearContact(){
     CalendarRequestListTokens.clear();
     CalendarRequestListMediatype.clear();        
     CalendarRequestListPref.clear();        
-
+    
     FreeBusyList.clear();
     FreeBusyListAltID.clear();
     FreeBusyListPID.clear();
@@ -7582,9 +7582,9 @@ void frmContactEditor::ClearContact(){
     FreeBusyListTokens.clear();
     FreeBusyListMediatype.clear();        
     FreeBusyListPref.clear();
-
+    
     /* Items on the Security tab */
-
+    
     KeyList.clear();
     KeyListAltID.clear();
     KeyListPID.clear();
@@ -7594,29 +7594,29 @@ void frmContactEditor::ClearContact(){
     KeyListType.clear();
     KeyListTokens.clear();
     KeyListPref.clear();
-
+    
     /* Items on the Other tab */
-
+    
     VendorList.clear();
     VendorListPEN.clear();
     VendorListElement.clear();
-
+    
     XTokenList.clear();        
     XTokenListTokens.clear();
     
     wxSContactFilename.Clear();
     boolContactModified = FALSE;
     intSeekSelectedData = 0;
-
+    
     /* Section for saving/loading data */
-
+    
     ETag.Clear();
     ETagOriginal.Clear();
-
+    
     strValue.Clear();
     strValue2.Clear();
     strValue3.Clear();
-
+    
     boolValue = FALSE;
     boolValue2 = FALSE;
     intValue = 0;
@@ -7625,116 +7625,116 @@ void frmContactEditor::ClearContact(){
     BinaryDataProc = FALSE;
     EditMode = TRUE;
     DialogOpen = FALSE;
-
+    
     PictureImage = wxNullBitmap;
     LogoImage = wxNullBitmap;
     
 }
 
 void frmContactEditor::ContactFileChanged( wxCommandEvent &event ){
-
+    
     // Stop the timer.
-
+    
     FMTimer.Stop();
     
     // Check if a dialog is already open.
     
     if (DialogOpen == TRUE){
-    
-       FMTimer.Start(1000, FALSE);
-       return;
-    
+        
+        FMTimer.Start(1000, FALSE);
+        return;
+        
     }
-
+    
     // Bring up a Yes/No modal dialog asking if the changed file should be reloaded.
-
+    
     int QuestionResponse;
     
     QuestionResponse = wxMessageBox(_("This contact has changed. Saving the contact may overwrite or lose any changes done by that change. Do you want to reload the contact with the changes made?"), _("Contact information has changed"), wxYES_NO, this);
     
     if (QuestionResponse == wxYES){
-    
-       // Reload the contact.
-       wxString wxSReloadContactName = wxSContactFilename;
-       ClearContact();
-       LoadContact(wxSReloadContactName);
-    
+        
+        // Reload the contact.
+        wxString wxSReloadContactName = wxSContactFilename;
+        ClearContact();
+        LoadContact(wxSReloadContactName);
+        
     } else {
-    
-       // Do nothing other than update the timestamp so this message
-       // doesn't appear until the next time it changes.
-       
-       FMTimer.UpdateTimestamp();
-    
+        
+        // Do nothing other than update the timestamp so this message
+        // doesn't appear until the next time it changes.
+        
+        FMTimer.UpdateTimestamp();
+        
     }  
     
     // Start the timer.
     
     FMTimer.Start();
-
+    
 }
 
 void frmContactEditor::UpdateMembersTab( wxCommandEvent &event ){
-
-       if (cmbType->GetCurrentSelection() == 2){
-       
-               tabMembers->Show();     
-       
-       } else {
-       
-               tabMembers->Hide();
-       
-       }
-
+    
+    if (cmbType->GetCurrentSelection() == 2){
+        
+        tabMembers->Show();    
+        
+    } else {
+        
+        tabMembers->Hide();
+        
+    }
+    
 }
 
 void frmContactEditor::SetUID(int UID){
-
-       ContactEditorUID = UID;
-
+    
+    ContactEditorUID = UID;
+    
 }
 
 void frmContactEditor::UpdateDisplayAs( wxCommandEvent &event ){
-
-       // Generate a drop down list of common names to use for the display as drop down box.
-
-       wxString SetValue = cmbDisplayAs->GetValue();
-
-       cmbDisplayAs->Clear();
-       cmbDisplayAs->Append(txtForename->GetValue() + wxT(" ") + txtSurname->GetValue());
-       if (!txtOtherNames->GetValue().IsEmpty()){
-       
-               cmbDisplayAs->Append(txtForename->GetValue() + wxT(" ") + txtOtherNames->GetValue()  + wxT(" ") + txtForename->GetValue());     
-       
-       }
-       cmbDisplayAs->Append(txtSurname->GetValue() + wxT(", ") + txtForename->GetValue());     
-       if (!txtOtherNames->GetValue().IsEmpty()){
-       
-               cmbDisplayAs->Append(txtForename->GetValue() + wxT(", ") + wxT(" ") + txtForename->GetValue() + wxT(" ") + txtOtherNames->GetValue());
-       
-       }
-       if (!txtTitle->GetValue().IsEmpty()){
-               cmbDisplayAs->Append(txtTitle->GetValue() + wxT(" ") + txtSurname->GetValue() + wxT(" ") + txtForename->GetValue());
-       }
-
-       cmbDisplayAs->SetValue(SetValue);
-
-       this->SetTitle(cmbDisplayAs->GetValue());
-
+    
+    // Generate a drop down list of common names to use for the display as drop down box.
+    
+    wxString SetValue = cmbDisplayAs->GetValue();
+    
+    cmbDisplayAs->Clear();
+    cmbDisplayAs->Append(txtForename->GetValue() + wxT(" ") + txtSurname->GetValue());
+    if (!txtOtherNames->GetValue().IsEmpty()){
+        
+        cmbDisplayAs->Append(txtForename->GetValue() + wxT(" ") + txtOtherNames->GetValue()  + wxT(" ") + txtForename->GetValue());    
+        
+    }
+    cmbDisplayAs->Append(txtSurname->GetValue() + wxT(", ") + txtForename->GetValue());        
+    if (!txtOtherNames->GetValue().IsEmpty()){
+        
+        cmbDisplayAs->Append(txtForename->GetValue() + wxT(", ") + wxT(" ") + txtForename->GetValue() + wxT(" ") + txtOtherNames->GetValue());
+        
+    }
+    if (!txtTitle->GetValue().IsEmpty()){
+        cmbDisplayAs->Append(txtTitle->GetValue() + wxT(" ") + txtSurname->GetValue() + wxT(" ") + txtForename->GetValue());
+    }
+    
+    cmbDisplayAs->SetValue(SetValue);
+    
+    this->SetTitle(cmbDisplayAs->GetValue());
+    
 }
 
 void frmContactEditor::UpdateName( wxCommandEvent &event ){
-
-       this->SetTitle(cmbDisplayAs->GetValue());
-
-       WindowData *WData = new WindowData;
-
-       WData->DataType = 1;
-       WData->WindowPointer = this;
-       WData->WindowID = ContactEditorUID;
-
-       wxCommandEvent editevent(WINDOW_EDIT);
-       editevent.SetClientData(WData);
-       wxPostEvent(GetParent(), editevent);
-
+    
+    this->SetTitle(cmbDisplayAs->GetValue());
+    
+    WindowData *WData = new WindowData;
+    
+    WData->DataType = 1;
+    WData->WindowPointer = this;
+    WData->WindowID = ContactEditorUID;
+    
+    wxCommandEvent editevent(WINDOW_EDIT);
+    editevent.SetClientData(WData);
+    wxPostEvent(GetParent(), editevent);
+    
 }
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy