Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code so that OSX is now supported.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 30 Jul 2015 06:32:04 +0000 (07:32 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 30 Jul 2015 06:32:04 +0000 (07:32 +0100)
14 files changed:
source/AppXestiaAddrBk.cpp
source/AppXestiaAddrBk.h
source/common/defaults.cpp
source/common/dirs.cpp
source/common/etag.cpp
source/common/etag.h
source/common/mime.cpp
source/common/timers.cpp
source/common/timers.h
source/common/uuid.cpp
source/contacteditor/frmContactEditor.cpp
source/frmMain.cpp
source/frmNewAccount.cpp
source/frmNewAccount.h

index 57ad0b1..c880b86 100644 (file)
 
 frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-       
-       mnuMain = new wxMenuBar( 0 );
-       mnuManage = new wxMenu();
-       wxMenuItem* mnuNewAB;
-       mnuNewAB = new wxMenuItem( mnuManage, ID_MANAGE_NEWAB, wxString( wxT("New Address Book...") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuManage->Append( mnuNewAB );
-       
-       mnuManage->AppendSeparator();
-       
-       wxMenuItem* mnuRefreshAB;
-       mnuRefreshAB = new wxMenuItem( mnuManage, wxID_ANY, wxString( wxT("Refresh Address Book") ) + wxT('\t') + wxT("CTRL+R"), wxEmptyString, wxITEM_NORMAL );
-       mnuManage->Append( mnuRefreshAB );
-       
-       mnuManage->AppendSeparator();
-       
-       wxMenuItem* mnuImport;
-       mnuImport = new wxMenuItem( mnuManage, ID_MANAGE_IMPORT, wxString( wxT("Import...") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuManage->Append( mnuImport );
-       
-       wxMenuItem* mnuExport;
-       mnuExport = new wxMenuItem( mnuManage, ID_MANAGE_EXPORT, wxString( wxT("Export...") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuManage->Append( mnuExport );
-       
-       mnuManage->AppendSeparator();
-       
-       wxMenuItem* mnuPreferences;
-       mnuPreferences = new wxMenuItem( mnuManage, ID_MANAGE_PREFERENCES, wxString( wxT("Preferences...") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuManage->Append( mnuPreferences );
-       
-       mnuManage->AppendSeparator();
-       
-       wxMenuItem* mnuExit;
-       mnuExit = new wxMenuItem( mnuManage, ID_MANAGE_EXIT, wxString( wxT("Exit") ) + wxT('\t') + wxT("CTRL+Q"), wxEmptyString, wxITEM_NORMAL );
-       #ifdef __WXMSW__
-       mnuExit->SetBitmaps( wxNullBitmap );
-       #elif defined( __WXGTK__ )
-       mnuExit->SetBitmap( wxNullBitmap );
-       #endif
-       mnuManage->Append( mnuExit );
-       
-       mnuMain->Append( mnuManage, wxT("Manage") ); 
-       
-       mnuContact = new wxMenu();
-       wxMenuItem* mnuNewContact;
-       mnuNewContact = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("New Contact...") ) + wxT('\t') + wxT("CTRL+N"), wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( mnuNewContact );
-       
-       wxMenuItem* mnuEditContact;
-       mnuEditContact = new wxMenuItem( mnuContact, ID_CONTACT_EDIT, wxString( wxT("Edit Contact...") ) + wxT('\t') + wxT("CTRL+E"), wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( mnuEditContact );
-       
-       wxMenuItem* deleteContact;
-       deleteContact = new wxMenuItem( mnuContact, ID_CONTACT_DELETE, wxString( wxT("Delete Contact...") ) + wxT('\t') + wxT("CTRL+D"), wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( deleteContact );
-       
-       mnuContact->AppendSeparator();
-       
-       setContactAsMyself = new wxMenuItem( mnuContact, ID_SET_CONTACT_AS_MYSELF, wxString( wxT("Set contact as myself") ) + wxT('\t') + wxT("CTRL+M"), wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( setContactAsMyself );
-       
-       m_separator5 = mnuContact->AppendSeparator();
-       
-       wxMenuItem* mnuFindContact;
-       mnuFindContact = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("Find Contacts...") ) + wxT('\t') + wxT("CTRL+F"), wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( mnuFindContact );
-       
-       mnuMain->Append( mnuContact, wxT("Contact") ); 
-       
-       mnuView = new wxMenu();
-       mnuShowContactsAs = new wxMenu();
-       wxMenuItem* mnuViewFNLN;
-       mnuViewFNLN = new wxMenuItem( mnuShowContactsAs, ID_VIEW_FNLN, wxString( wxT("First Name, Last Name") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuShowContactsAs->Append( mnuViewFNLN );
-       
-       wxMenuItem* mnuViewLNFN;
-       mnuViewLNFN = new wxMenuItem( mnuShowContactsAs, ID_VIEW_LNFN, wxString( wxT("Last Name, First Name") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuShowContactsAs->Append( mnuViewLNFN );
-       
-       wxMenuItem* mnuViewNick;
-       mnuViewNick = new wxMenuItem( mnuShowContactsAs, ID_VIEW_NICK, wxString( wxT("Nickname") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuShowContactsAs->Append( mnuViewNick );
-       
-       wxMenuItem* mnuViewDisplayAs;
-       mnuViewDisplayAs = new wxMenuItem( mnuShowContactsAs, wxID_ANY, wxString( wxT("Display As Name") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuShowContactsAs->Append( mnuViewDisplayAs );
-       
-       mnuView->Append( -1, wxT("Show Contacts As"), mnuShowContactsAs );
-       
-       mnuViewSortBy = new wxMenu();
-       wxMenuItem* mnuViewAsc;
-       mnuViewAsc = new wxMenuItem( mnuViewSortBy, ID_VIEW_ASC, wxString( wxT("Ascending") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuViewSortBy->Append( mnuViewAsc );
-       
-       wxMenuItem* mnuViewDesc;
-       mnuViewDesc = new wxMenuItem( mnuViewSortBy, ID_VIEW_DESC, wxString( wxT("Descending") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuViewSortBy->Append( mnuViewDesc );
-       
-       mnuView->Append( -1, wxT("Sort By"), mnuViewSortBy );
-       
-       mnuViewShow = new wxMenu();
-       wxMenuItem* mnuViewStatusBar;
-       mnuViewStatusBar = new wxMenuItem( mnuViewShow, ID_VIEW_STATUSBAR, wxString( wxT("Status Bar") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuViewShow->Append( mnuViewStatusBar );
-       
-       mnuView->Append( -1, wxT("Show"), mnuViewShow );
-       
-       mnuView->AppendSeparator();
-       
-       wxMenuItem* mnuViewActivity;
-       mnuViewActivity = new wxMenuItem( mnuView, wxID_ANY, wxString( wxT("Activity Manager") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuView->Append( mnuViewActivity );
-       
-       mnuMain->Append( mnuView, wxT("View") ); 
-       
-       mnuEdit = new wxMenu();
-       wxMenuItem* mnuCut;
-       mnuCut = new wxMenuItem( mnuEdit, ID_MANAGE_CUT, wxString( wxT("Cut") ) + wxT('\t') + wxT("CTRL+X"), wxEmptyString, wxITEM_NORMAL );
-       mnuEdit->Append( mnuCut );
-       
-       wxMenuItem* mnuCopy;
-       mnuCopy = new wxMenuItem( mnuEdit, ID_MANAGE_COPY, wxString( wxT("Copy") ) + wxT('\t') + wxT("CTRL+C"), wxEmptyString, wxITEM_NORMAL );
-       mnuEdit->Append( mnuCopy );
-       
-       wxMenuItem* mnuPaste;
-       mnuPaste = new wxMenuItem( mnuEdit, ID_MANAGE_PASTE, wxString( wxT("Paste") ) + wxT('\t') + wxT("CTRL+V"), wxEmptyString, wxITEM_NORMAL );
-       mnuEdit->Append( mnuPaste );
-       
-       mnuMain->Append( mnuEdit, wxT("Edit") ); 
-       
-       mnuWindow = new wxMenu();
-       mnuMain->Append( mnuWindow, wxT("Window") ); 
-       
-       mnuHelp = new wxMenu();
-       wxMenuItem* showHelp;
-       showHelp = new wxMenuItem( mnuHelp, ID_HELP_SHOW, wxString( wxT("Show Help...") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
-       mnuHelp->Append( showHelp );
-       
-       mnuHelp->AppendSeparator();
-       
-       wxMenuItem* mnuHelpUpdates;
-       mnuHelpUpdates = new wxMenuItem( mnuHelp, ID_MANAGE_UPDATE, wxString( wxT("Check for updates...") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuHelp->Append( mnuHelpUpdates );
-       
-       mnuHelp->AppendSeparator();
-       
-       wxMenuItem* mnuAbout;
-       mnuAbout = new wxMenuItem( mnuHelp, ID_HELP_ABOUT, wxString( wxT("About") ) + wxT('\t') + wxT("SHIFT+CTRL+A"), wxEmptyString, wxITEM_NORMAL );
-       mnuHelp->Append( mnuAbout );
-       
-       mnuMain->Append( mnuHelp, wxT("Help") ); 
-       
-       this->SetMenuBar( mnuMain );
-       
-       szrMain = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer396;
-       bSizer396 = new wxBoxSizer( wxHORIZONTAL );
-       
-       bmpIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer396->Add( bmpIcon, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       AccCtrl = new wxComboCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCB_READONLY|wxEXPAND);
-       bSizer396->Add( AccCtrl, 0, wxALL, 5 );
-       
-       
-       szrMain->Add( bSizer396, 0, wxEXPAND|wxLEFT, 5 );
-       
-       m_splitter13 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
-       m_splitter13->Connect( wxEVT_IDLE, wxIdleEventHandler( frmMainADT::m_splitter13OnIdle ), NULL, this );
-       m_splitter13->SetMinimumPaneSize( 1 );
-       
-       m_panel19 = new wxPanel( m_splitter13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       szrContactList = new wxFlexGridSizer( 0, 1, 0, 0 );
-       szrContactList->AddGrowableCol( 0 );
-       szrContactList->AddGrowableRow( 1 );
-       szrContactList->SetFlexibleDirection( wxBOTH );
-       szrContactList->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       szrAccList = new wxFlexGridSizer( 0, 2, 0, 0 );
-       szrAccList->SetFlexibleDirection( wxVERTICAL );
-       szrAccList->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       
-       szrContactList->Add( szrAccList, 0, 0, 5 );
-       
-       lstContacts = new wxListCtrl( m_panel19, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT|wxSUNKEN_BORDER );
-       szrContactList->Add( lstContacts, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       m_panel19->SetSizer( szrContactList );
-       m_panel19->Layout();
-       szrContactList->Fit( m_panel19 );
-       m_panel20 = new wxPanel( m_splitter13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer12;
-       bSizer12 = new wxBoxSizer( wxVERTICAL );
-       
-       htmContactData = new wxHtmlWindow( m_panel20, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxSUNKEN_BORDER );
-       bSizer12->Add( htmContactData, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       m_panel20->SetSizer( bSizer12 );
-       m_panel20->Layout();
-       bSizer12->Fit( m_panel20 );
-       m_splitter13->SplitVertically( m_panel19, m_panel20, 184 );
-       szrMain->Add( m_splitter13, 1, wxEXPAND, 5 );
-       
-       
-       this->SetSizer( szrMain );
-       this->Layout();
-       stbBottom = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       this->Connect( mnuNewAB->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenNewABDialog ) );
-       this->Connect( mnuRefreshAB->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::RefreshAddressBook ) );
-       this->Connect( mnuImport->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenImportDialog ) );
-       this->Connect( mnuExport->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenExportDialog ) );
-       this->Connect( mnuPreferences->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenPreferences ) );
-       this->Connect( mnuExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) );
-       this->Connect( mnuNewContact->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowContactEditorNew ) );
-       this->Connect( mnuEditContact->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowContactEditorEdit ) );
-       this->Connect( deleteContact->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::DeleteContact ) );
-       this->Connect( setContactAsMyself->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SetContactAsSelf ) );
-       this->Connect( mnuFindContact->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenFindContactsWindow ) );
-       this->Connect( mnuViewFNLN->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortFNLN ) );
-       this->Connect( mnuViewLNFN->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortLNFN ) );
-       this->Connect( mnuViewNick->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortNickname ) );
-       this->Connect( mnuViewDisplayAs->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortDisplayAs ) );
-       this->Connect( mnuViewAsc->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortAscending ) );
-       this->Connect( mnuViewDesc->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortDescending ) );
-       this->Connect( mnuViewStatusBar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ToggleStatusBar ) );
-       this->Connect( mnuViewActivity->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowActivityWindow ) );
-       this->Connect( mnuCut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CutAction ) );
-       this->Connect( mnuCopy->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CopyAction ) );
-       this->Connect( mnuPaste->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::PasteAction ) );
-       this->Connect( showHelp->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowHelp ) );
-       this->Connect( mnuHelpUpdates->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CheckUpdates ) );
-       this->Connect( mnuAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowAboutWindow ) );
-       lstContacts->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( frmMainADT::OpenContactInfo ), NULL, this );
-       lstContacts->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmMainADT::ShowContactInfo ), NULL, this );
-       lstContacts->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmMainADT::ShowContactInfo ), NULL, this );
-       htmContactData->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( frmMainADT::ShowContactSubmenu ), NULL, this );
-       stbBottom->Connect( wxEVT_SIZE, wxSizeEventHandler( frmMainADT::UpdateSBIconPlacement ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+    
+    mnuMain = new wxMenuBar( 0 );
+    mnuManage = new wxMenu();
+    wxMenuItem* mnuNewAB;
+    mnuNewAB = new wxMenuItem( mnuManage, ID_MANAGE_NEWAB, wxString( wxT("New Address Book...") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuManage->Append( mnuNewAB );
+    
+    mnuManage->AppendSeparator();
+    
+    wxMenuItem* mnuRefreshAB;
+    mnuRefreshAB = new wxMenuItem( mnuManage, wxID_ANY, wxString( wxT("Refresh Address Book") ) + wxT('\t') + wxT("CTRL+R"), wxEmptyString, wxITEM_NORMAL );
+    mnuManage->Append( mnuRefreshAB );
+    
+    mnuManage->AppendSeparator();
+    
+    wxMenuItem* mnuImport;
+    mnuImport = new wxMenuItem( mnuManage, ID_MANAGE_IMPORT, wxString( wxT("Import...") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuManage->Append( mnuImport );
+    
+    wxMenuItem* mnuExport;
+    mnuExport = new wxMenuItem( mnuManage, ID_MANAGE_EXPORT, wxString( wxT("Export...") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuManage->Append( mnuExport );
+    
+    mnuPrefSep = mnuManage->AppendSeparator();
+    
+    wxMenuItem* mnuPreferences;
+    mnuPreferences = new wxMenuItem( mnuManage, wxID_PREFERENCES, wxString( wxT("Preferences...") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuManage->Append( mnuPreferences );
+    
+    mnuExitSep = mnuManage->AppendSeparator();
+    
+    wxMenuItem* mnuExit;
+    mnuExit = new wxMenuItem( mnuManage, wxID_EXIT, wxString( wxT("Exit") ) + wxT('\t') + wxT("CTRL+Q"), wxEmptyString, wxITEM_NORMAL );
+#ifdef __WXMSW__
+    mnuExit->SetBitmaps( wxNullBitmap );
+#elif defined( __WXGTK__ )
+    mnuExit->SetBitmap( wxNullBitmap );
+#endif
+    mnuManage->Append( mnuExit );
+    
+    mnuMain->Append( mnuManage, wxT("Manage") );
+    
+    mnuContact = new wxMenu();
+    wxMenuItem* mnuNewContact;
+    mnuNewContact = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("New Contact...") ) + wxT('\t') + wxT("CTRL+N"), wxEmptyString, wxITEM_NORMAL );
+    mnuContact->Append( mnuNewContact );
+    
+    wxMenuItem* mnuEditContact;
+    mnuEditContact = new wxMenuItem( mnuContact, ID_CONTACT_EDIT, wxString( wxT("Edit Contact...") ) + wxT('\t') + wxT("CTRL+E"), wxEmptyString, wxITEM_NORMAL );
+    mnuContact->Append( mnuEditContact );
+    
+    wxMenuItem* deleteContact;
+    deleteContact = new wxMenuItem( mnuContact, ID_CONTACT_DELETE, wxString( wxT("Delete Contact...") ) + wxT('\t') + wxT("CTRL+D"), wxEmptyString, wxITEM_NORMAL );
+    mnuContact->Append( deleteContact );
+    
+    mnuContact->AppendSeparator();
+    
+    wxMenuItem* mnuFindContact;
+    mnuFindContact = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("Find Contacts...") ) + wxT('\t') + wxT("CTRL+F"), wxEmptyString, wxITEM_NORMAL );
+    mnuContact->Append( mnuFindContact );
+    
+    mnuMain->Append( mnuContact, wxT("Contact") );
+    
+    mnuView = new wxMenu();
+    mnuShowContactsAs = new wxMenu();
+    wxMenuItem* mnuViewFNLN;
+    mnuViewFNLN = new wxMenuItem( mnuShowContactsAs, ID_VIEW_FNLN, wxString( wxT("First Name, Last Name") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuShowContactsAs->Append( mnuViewFNLN );
+    
+    wxMenuItem* mnuViewLNFN;
+    mnuViewLNFN = new wxMenuItem( mnuShowContactsAs, ID_VIEW_LNFN, wxString( wxT("Last Name, First Name") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuShowContactsAs->Append( mnuViewLNFN );
+    
+    wxMenuItem* mnuViewNick;
+    mnuViewNick = new wxMenuItem( mnuShowContactsAs, ID_VIEW_NICK, wxString( wxT("Nickname") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuShowContactsAs->Append( mnuViewNick );
+    
+    wxMenuItem* mnuViewDisplayAs;
+    mnuViewDisplayAs = new wxMenuItem( mnuShowContactsAs, wxID_ANY, wxString( wxT("Display As Name") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuShowContactsAs->Append( mnuViewDisplayAs );
+    
+    mnuView->Append( -1, wxT("Show Contacts As"), mnuShowContactsAs );
+    
+    mnuViewSortBy = new wxMenu();
+    wxMenuItem* mnuViewAsc;
+    mnuViewAsc = new wxMenuItem( mnuViewSortBy, ID_VIEW_ASC, wxString( wxT("Ascending") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuViewSortBy->Append( mnuViewAsc );
+    
+    wxMenuItem* mnuViewDesc;
+    mnuViewDesc = new wxMenuItem( mnuViewSortBy, ID_VIEW_DESC, wxString( wxT("Descending") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuViewSortBy->Append( mnuViewDesc );
+    
+    mnuView->Append( -1, wxT("Sort By"), mnuViewSortBy );
+    
+    mnuViewShow = new wxMenu();
+    wxMenuItem* mnuViewStatusBar;
+    mnuViewStatusBar = new wxMenuItem( mnuViewShow, ID_VIEW_STATUSBAR, wxString( wxT("Status Bar") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuViewShow->Append( mnuViewStatusBar );
+    
+    mnuView->Append( -1, wxT("Show"), mnuViewShow );
+    
+    mnuView->AppendSeparator();
+    
+    wxMenuItem* mnuViewActivity;
+    mnuViewActivity = new wxMenuItem( mnuView, wxID_ANY, wxString( wxT("Activity Manager") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuView->Append( mnuViewActivity );
+    
+    mnuMain->Append( mnuView, wxT("View") );
+    
+    mnuEdit = new wxMenu();
+    wxMenuItem* mnuCut;
+    mnuCut = new wxMenuItem( mnuEdit, ID_MANAGE_CUT, wxString( wxT("Cut") ) + wxT('\t') + wxT("CTRL+X"), wxEmptyString, wxITEM_NORMAL );
+    mnuEdit->Append( mnuCut );
+    
+    wxMenuItem* mnuCopy;
+    mnuCopy = new wxMenuItem( mnuEdit, ID_MANAGE_COPY, wxString( wxT("Copy") ) + wxT('\t') + wxT("CTRL+C"), wxEmptyString, wxITEM_NORMAL );
+    mnuEdit->Append( mnuCopy );
+    
+    wxMenuItem* mnuPaste;
+    mnuPaste = new wxMenuItem( mnuEdit, ID_MANAGE_PASTE, wxString( wxT("Paste") ) + wxT('\t') + wxT("CTRL+V"), wxEmptyString, wxITEM_NORMAL );
+    mnuEdit->Append( mnuPaste );
+    
+    mnuMain->Append( mnuEdit, wxT("Edit") );
+    
+    mnuWindow = new wxMenu();
+    mnuMain->Append( mnuWindow, wxT("Window") );
+    
+    mnuHelp = new wxMenu();
+    wxMenuItem* showHelp;
+    showHelp = new wxMenuItem( mnuHelp, ID_HELP_SHOW, wxString( wxT("Show Help...") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
+    mnuHelp->Append( showHelp );
+    
+    mnuHelp->AppendSeparator();
+    
+    wxMenuItem* mnuHelpUpdates;
+    mnuHelpUpdates = new wxMenuItem( mnuHelp, ID_MANAGE_UPDATE, wxString( wxT("Check for updates...") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuHelp->Append( mnuHelpUpdates );
+    
+    mnuHelpAboutSep = mnuHelp->AppendSeparator();
+    
+    wxMenuItem* mnuAbout;
+    mnuAbout = new wxMenuItem( mnuHelp, wxID_ABOUT, wxString( wxT("About") ) + wxT('\t') + wxT("SHIFT+CTRL+A"), wxEmptyString, wxITEM_NORMAL );
+    mnuHelp->Append( mnuAbout );
+    
+    mnuMain->Append( mnuHelp, wxT("Help") );
+    
+    this->SetMenuBar( mnuMain );
+    
+    szrMain = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer396;
+    bSizer396 = new wxBoxSizer( wxHORIZONTAL );
+    
+    bmpIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer396->Add( bmpIcon, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    AccCtrl = new wxComboCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCB_READONLY|wxEXPAND);
+    bSizer396->Add( AccCtrl, 0, wxALL, 5 );
+    
+    
+    szrMain->Add( bSizer396, 0, wxEXPAND|wxLEFT, 5 );
+    
+    m_splitter13 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
+    m_splitter13->Connect( wxEVT_IDLE, wxIdleEventHandler( frmMainADT::m_splitter13OnIdle ), NULL, this );
+    m_splitter13->SetMinimumPaneSize( 1 );
+    
+    m_panel19 = new wxPanel( m_splitter13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    szrContactList = new wxFlexGridSizer( 0, 1, 0, 0 );
+    szrContactList->AddGrowableCol( 0 );
+    szrContactList->AddGrowableRow( 1 );
+    szrContactList->SetFlexibleDirection( wxBOTH );
+    szrContactList->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    szrAccList = new wxFlexGridSizer( 0, 2, 0, 0 );
+    szrAccList->SetFlexibleDirection( wxVERTICAL );
+    szrAccList->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    
+    szrContactList->Add( szrAccList, 0, 0, 5 );
+    
+    lstContacts = new wxListCtrl( m_panel19, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT|wxSUNKEN_BORDER );
+    szrContactList->Add( lstContacts, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    m_panel19->SetSizer( szrContactList );
+    m_panel19->Layout();
+    szrContactList->Fit( m_panel19 );
+    m_panel20 = new wxPanel( m_splitter13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer12;
+    bSizer12 = new wxBoxSizer( wxVERTICAL );
+    
+    htmContactData = new wxHtmlWindow( m_panel20, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxSUNKEN_BORDER );
+    bSizer12->Add( htmContactData, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    m_panel20->SetSizer( bSizer12 );
+    m_panel20->Layout();
+    bSizer12->Fit( m_panel20 );
+    m_splitter13->SplitVertically( m_panel19, m_panel20, 184 );
+    szrMain->Add( m_splitter13, 1, wxEXPAND, 5 );
+    
+    
+    this->SetSizer( szrMain );
+    this->Layout();
+    stbBottom = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    this->Connect( mnuNewAB->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenNewABDialog ) );
+    this->Connect( mnuRefreshAB->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::RefreshAddressBook ) );
+    this->Connect( mnuImport->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenImportDialog ) );
+    this->Connect( mnuExport->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenExportDialog ) );
+    this->Connect( mnuPreferences->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenPreferences ) );
+    this->Connect( mnuExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) );
+    this->Connect( mnuNewContact->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowContactEditorNew ) );
+    this->Connect( mnuEditContact->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowContactEditorEdit ) );
+    this->Connect( deleteContact->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::DeleteContact ) );
+    this->Connect( mnuFindContact->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenFindContactsWindow ) );
+    this->Connect( mnuViewFNLN->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortFNLN ) );
+    this->Connect( mnuViewLNFN->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortLNFN ) );
+    this->Connect( mnuViewNick->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortNickname ) );
+    this->Connect( mnuViewDisplayAs->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortDisplayAs ) );
+    this->Connect( mnuViewAsc->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortAscending ) );
+    this->Connect( mnuViewDesc->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortDescending ) );
+    this->Connect( mnuViewStatusBar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ToggleStatusBar ) );
+    this->Connect( mnuViewActivity->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowActivityWindow ) );
+    this->Connect( mnuCut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CutAction ) );
+    this->Connect( mnuCopy->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CopyAction ) );
+    this->Connect( mnuPaste->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::PasteAction ) );
+    this->Connect( showHelp->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowHelp ) );
+    this->Connect( mnuHelpUpdates->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CheckUpdates ) );
+    this->Connect( mnuAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowAboutWindow ) );
+    lstContacts->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( frmMainADT::OpenContactInfo ), NULL, this );
+    lstContacts->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmMainADT::ShowContactInfo ), NULL, this );
+    lstContacts->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmMainADT::ShowContactInfo ), NULL, this );
+    htmContactData->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( frmMainADT::ShowContactSubmenu ), NULL, this );
+    stbBottom->Connect( wxEVT_SIZE, wxSizeEventHandler( frmMainADT::UpdateSBIconPlacement ), NULL, this );
 }
 
 frmMainADT::~frmMainADT()
 {
-       // Disconnect Events
-       this->Disconnect( ID_MANAGE_NEWAB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenNewABDialog ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::RefreshAddressBook ) );
-       this->Disconnect( ID_MANAGE_IMPORT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenImportDialog ) );
-       this->Disconnect( ID_MANAGE_EXPORT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenExportDialog ) );
-       this->Disconnect( ID_MANAGE_PREFERENCES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenPreferences ) );
-       this->Disconnect( ID_MANAGE_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowContactEditorNew ) );
-       this->Disconnect( ID_CONTACT_EDIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowContactEditorEdit ) );
-       this->Disconnect( ID_CONTACT_DELETE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::DeleteContact ) );
-       this->Disconnect( ID_SET_CONTACT_AS_MYSELF, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SetContactAsSelf ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenFindContactsWindow ) );
-       this->Disconnect( ID_VIEW_FNLN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortFNLN ) );
-       this->Disconnect( ID_VIEW_LNFN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortLNFN ) );
-       this->Disconnect( ID_VIEW_NICK, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortNickname ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortDisplayAs ) );
-       this->Disconnect( ID_VIEW_ASC, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortAscending ) );
-       this->Disconnect( ID_VIEW_DESC, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortDescending ) );
-       this->Disconnect( ID_VIEW_STATUSBAR, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ToggleStatusBar ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowActivityWindow ) );
-       this->Disconnect( ID_MANAGE_CUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CutAction ) );
-       this->Disconnect( ID_MANAGE_COPY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CopyAction ) );
-       this->Disconnect( ID_MANAGE_PASTE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::PasteAction ) );
-       this->Disconnect( ID_HELP_SHOW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowHelp ) );
-       this->Disconnect( ID_MANAGE_UPDATE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CheckUpdates ) );
-       this->Disconnect( ID_HELP_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowAboutWindow ) );
-       lstContacts->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( frmMainADT::OpenContactInfo ), NULL, this );
-       lstContacts->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmMainADT::ShowContactInfo ), NULL, this );
-       lstContacts->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmMainADT::ShowContactInfo ), NULL, this );
-       htmContactData->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( frmMainADT::ShowContactSubmenu ), NULL, this );
-       stbBottom->Disconnect( wxEVT_SIZE, wxSizeEventHandler( frmMainADT::UpdateSBIconPlacement ), NULL, this );
-       
+    // Disconnect Events
+    this->Disconnect( ID_MANAGE_NEWAB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenNewABDialog ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::RefreshAddressBook ) );
+    this->Disconnect( ID_MANAGE_IMPORT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenImportDialog ) );
+    this->Disconnect( ID_MANAGE_EXPORT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenExportDialog ) );
+    this->Disconnect( wxID_PREFERENCES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenPreferences ) );
+    this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowContactEditorNew ) );
+    this->Disconnect( ID_CONTACT_EDIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowContactEditorEdit ) );
+    this->Disconnect( ID_CONTACT_DELETE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::DeleteContact ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenFindContactsWindow ) );
+    this->Disconnect( ID_VIEW_FNLN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortFNLN ) );
+    this->Disconnect( ID_VIEW_LNFN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortLNFN ) );
+    this->Disconnect( ID_VIEW_NICK, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortNickname ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortDisplayAs ) );
+    this->Disconnect( ID_VIEW_ASC, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortAscending ) );
+    this->Disconnect( ID_VIEW_DESC, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::SortDescending ) );
+    this->Disconnect( ID_VIEW_STATUSBAR, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ToggleStatusBar ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowActivityWindow ) );
+    this->Disconnect( ID_MANAGE_CUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CutAction ) );
+    this->Disconnect( ID_MANAGE_COPY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CopyAction ) );
+    this->Disconnect( ID_MANAGE_PASTE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::PasteAction ) );
+    this->Disconnect( ID_HELP_SHOW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowHelp ) );
+    this->Disconnect( ID_MANAGE_UPDATE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CheckUpdates ) );
+    this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowAboutWindow ) );
+    lstContacts->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( frmMainADT::OpenContactInfo ), NULL, this );
+    lstContacts->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmMainADT::ShowContactInfo ), NULL, this );
+    lstContacts->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmMainADT::ShowContactInfo ), NULL, this );
+    htmContactData->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( frmMainADT::ShowContactSubmenu ), NULL, this );
+    stbBottom->Disconnect( wxEVT_SIZE, wxSizeEventHandler( frmMainADT::UpdateSBIconPlacement ), NULL, this );
+    
 }
 
 frmUpdateADT::frmUpdateADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer390;
-       bSizer390 = new wxBoxSizer( wxVERTICAL );
-       
-       pnlUpdateData = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer391;
-       bSizer391 = new wxBoxSizer( wxVERTICAL );
-       
-       wxFlexGridSizer* fgSizer45;
-       fgSizer45 = new wxFlexGridSizer( 3, 2, 0, 0 );
-       fgSizer45->SetFlexibleDirection( wxBOTH );
-       fgSizer45->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblRunningText = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("Running version is:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblRunningText->Wrap( -1 );
-       fgSizer45->Add( lblRunningText, 0, wxALL, 5 );
-       
-       lblRunningVer = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("UPDATEVER"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblRunningVer->Wrap( -1 );
-       fgSizer45->Add( lblRunningVer, 0, wxALL, 5 );
-       
-       lblAvailableText = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("Available version is:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAvailableText->Wrap( -1 );
-       fgSizer45->Add( lblAvailableText, 0, wxALL, 5 );
-       
-       lblAvailableVer = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("AVAILVER"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAvailableVer->Wrap( -1 );
-       fgSizer45->Add( lblAvailableVer, 0, wxALL, 5 );
-       
-       lblBuildTypeText = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("Build type is:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBuildTypeText->Wrap( -1 );
-       fgSizer45->Add( lblBuildTypeText, 0, wxALL, 5 );
-       
-       lblBuildType = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("BUILDTYPE"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBuildType->Wrap( -1 );
-       fgSizer45->Add( lblBuildType, 0, wxALL, 5 );
-       
-       
-       bSizer391->Add( fgSizer45, 0, wxEXPAND, 5 );
-       
-       lblUpdateMessage = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("MESSAGE"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblUpdateMessage->Wrap( -1 );
-       bSizer391->Add( lblUpdateMessage, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       pnlUpdateData->SetSizer( bSizer391 );
-       pnlUpdateData->Layout();
-       bSizer391->Fit( pnlUpdateData );
-       bSizer390->Add( pnlUpdateData, 1, wxEXPAND | wxALL, 5 );
-       
-       statLine = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
-       bSizer390->Add( statLine, 0, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer392;
-       bSizer392 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnVisitGelforn = new wxButton( this, wxID_ANY, wxT("Visit Gelforn"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer392->Add( btnVisitGelforn, 0, wxALIGN_RIGHT|wxBOTTOM|wxLEFT, 5 );
-       
-       btnVisitPREMIUM = new wxButton( this, wxID_ANY, wxT("Visit PREMIUM"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer392->Add( btnVisitPREMIUM, 0, wxBOTTOM|wxLEFT, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer392->Add( btnClose, 0, wxALIGN_RIGHT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
-       
-       
-       bSizer390->Add( bSizer392, 0, wxALIGN_RIGHT, 0 );
-       
-       
-       this->SetSizer( bSizer390 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       btnVisitGelforn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::VisitGelforn ), NULL, this );
-       btnVisitPREMIUM->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::VisitPREMIUM ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer390;
+    bSizer390 = new wxBoxSizer( wxVERTICAL );
+    
+    pnlUpdateData = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer391;
+    bSizer391 = new wxBoxSizer( wxVERTICAL );
+    
+    wxFlexGridSizer* fgSizer45;
+    fgSizer45 = new wxFlexGridSizer( 3, 2, 0, 0 );
+    fgSizer45->SetFlexibleDirection( wxBOTH );
+    fgSizer45->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblRunningText = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("Running version is:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblRunningText->Wrap( -1 );
+    fgSizer45->Add( lblRunningText, 0, wxALL, 5 );
+    
+    lblRunningVer = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("UPDATEVER"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblRunningVer->Wrap( -1 );
+    fgSizer45->Add( lblRunningVer, 0, wxALL, 5 );
+    
+    lblAvailableText = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("Available version is:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAvailableText->Wrap( -1 );
+    fgSizer45->Add( lblAvailableText, 0, wxALL, 5 );
+    
+    lblAvailableVer = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("AVAILVER"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAvailableVer->Wrap( -1 );
+    fgSizer45->Add( lblAvailableVer, 0, wxALL, 5 );
+    
+    lblBuildTypeText = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("Build type is:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBuildTypeText->Wrap( -1 );
+    fgSizer45->Add( lblBuildTypeText, 0, wxALL, 5 );
+    
+    lblBuildType = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("BUILDTYPE"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBuildType->Wrap( -1 );
+    fgSizer45->Add( lblBuildType, 0, wxALL, 5 );
+    
+    
+    bSizer391->Add( fgSizer45, 0, wxEXPAND, 5 );
+    
+    lblUpdateMessage = new wxStaticText( pnlUpdateData, wxID_ANY, wxT("MESSAGE"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblUpdateMessage->Wrap( -1 );
+    bSizer391->Add( lblUpdateMessage, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    pnlUpdateData->SetSizer( bSizer391 );
+    pnlUpdateData->Layout();
+    bSizer391->Fit( pnlUpdateData );
+    bSizer390->Add( pnlUpdateData, 1, wxEXPAND | wxALL, 5 );
+    
+    statLine = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+    bSizer390->Add( statLine, 0, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer392;
+    bSizer392 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnVisitGelforn = new wxButton( this, wxID_ANY, wxT("Visit Gelforn"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer392->Add( btnVisitGelforn, 0, wxALIGN_RIGHT|wxBOTTOM|wxLEFT, 5 );
+    
+    btnVisitPREMIUM = new wxButton( this, wxID_ANY, wxT("Visit PREMIUM"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer392->Add( btnVisitPREMIUM, 0, wxBOTTOM|wxLEFT, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer392->Add( btnClose, 0, wxALIGN_RIGHT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
+    
+    
+    bSizer390->Add( bSizer392, 0, wxALIGN_RIGHT, 0 );
+    
+    
+    this->SetSizer( bSizer390 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    btnVisitGelforn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::VisitGelforn ), NULL, this );
+    btnVisitPREMIUM->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::VisitPREMIUM ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::CloseWindow ), NULL, this );
 }
 
 frmUpdateADT::~frmUpdateADT()
 {
-       // Disconnect Events
-       btnVisitGelforn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::VisitGelforn ), NULL, this );
-       btnVisitPREMIUM->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::VisitPREMIUM ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    btnVisitGelforn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::VisitGelforn ), NULL, this );
+    btnVisitPREMIUM->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::VisitPREMIUM ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmUpdateADT::CloseWindow ), NULL, this );
+    
 }
 
 frmSearchADT::frmSearchADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxSize( 300,450 ), wxDefaultSize );
-       
-       stbBottom = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
-       wxBoxSizer* bSizer368;
-       bSizer368 = new wxBoxSizer( wxVERTICAL );
-       
-       m_splitter4 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
-       m_splitter4->Connect( wxEVT_IDLE, wxIdleEventHandler( frmSearchADT::m_splitter4OnIdle ), NULL, this );
-       m_splitter4->SetMinimumPaneSize( 1 );
-       
-       m_panel60 = new wxPanel( m_splitter4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer382;
-       bSizer382 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer369;
-       bSizer369 = new wxBoxSizer( wxHORIZONTAL );
-       
-       nbkSearch = new wxNotebook( m_panel60, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabSearch = new wxScrolledWindow( nbkSearch, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE|wxHSCROLL|wxVSCROLL );
-       tabSearch->SetScrollRate( 5, 5 );
-       szrSearch = new wxFlexGridSizer( 0, 1, 0, 0 );
-       szrSearch->AddGrowableCol( 0 );
-       szrSearch->SetFlexibleDirection( wxVERTICAL );
-       szrSearch->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       
-       tabSearch->SetSizer( szrSearch );
-       tabSearch->Layout();
-       szrSearch->Fit( tabSearch );
-       nbkSearch->AddPage( tabSearch, wxT("Search"), true );
-       tabAdvanced = new wxScrolledWindow( nbkSearch, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabAdvanced->SetScrollRate( 5, 5 );
-       wxBoxSizer* bSizer384;
-       bSizer384 = new wxBoxSizer( wxVERTICAL );
-       
-       btnSelectAccounts = new wxButton( tabAdvanced, wxID_ANY, wxT("Select Accounts..."), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer384->Add( btnSelectAccounts, 0, wxALL, 5 );
-       
-       
-       tabAdvanced->SetSizer( bSizer384 );
-       tabAdvanced->Layout();
-       bSizer384->Fit( tabAdvanced );
-       nbkSearch->AddPage( tabAdvanced, wxT("Advanced"), false );
-       
-       bSizer369->Add( nbkSearch, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer371;
-       bSizer371 = new wxBoxSizer( wxVERTICAL );
-       
-       btnSearch = new wxButton( m_panel60, wxID_ANY, wxT("Search"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer371->Add( btnSearch, 0, wxALL, 5 );
-       
-       btnReset = new wxButton( m_panel60, wxID_ANY, wxT("Reset"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer371->Add( btnReset, 0, wxALL, 5 );
-       
-       
-       bSizer369->Add( bSizer371, 0, wxEXPAND, 5 );
-       
-       
-       bSizer382->Add( bSizer369, 1, wxEXPAND, 5 );
-       
-       
-       m_panel60->SetSizer( bSizer382 );
-       m_panel60->Layout();
-       bSizer382->Fit( m_panel60 );
-       m_panel61 = new wxPanel( m_splitter4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer386;
-       bSizer386 = new wxBoxSizer( wxVERTICAL );
-       
-       lstResults = new wxListCtrl( m_panel61, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer386->Add( lstResults, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       m_panel61->SetSizer( bSizer386 );
-       m_panel61->Layout();
-       bSizer386->Fit( m_panel61 );
-       m_splitter4->SplitHorizontally( m_panel60, m_panel61, 178 );
-       bSizer368->Add( m_splitter4, 1, wxEXPAND, 5 );
-       
-       
-       this->SetSizer( bSizer368 );
-       this->Layout();
-       m_menubar5 = new wxMenuBar( 0 );
-       mnuContact = new wxMenu();
-       wxMenuItem* mnuContactOpen;
-       mnuContactOpen = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("Open Contact...") ) + wxT('\t') + wxT("CTRL+O"), wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( mnuContactOpen );
-       
-       wxMenuItem* mnuContactEdit;
-       mnuContactEdit = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("Edit Contact...") ) + wxT('\t') + wxT("CTRL+E"), wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( mnuContactEdit );
-       
-       wxMenuItem* mnuContactReveal;
-       mnuContactReveal = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("Reveal Contact") ) + wxT('\t') + wxT("CTRL+R"), wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( mnuContactReveal );
-       
-       mnuContact->AppendSeparator();
-       
-       wxMenuItem* mnuContactClose;
-       mnuContactClose = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("Close Window") ) + wxT('\t') + wxT("ALT+F4"), wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( mnuContactClose );
-       
-       m_menubar5->Append( mnuContact, wxT("Contact") ); 
-       
-       this->SetMenuBar( m_menubar5 );
-       
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmSearchADT::CloseWindow ) );
-       btnSelectAccounts->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::SelectAccounts ), NULL, this );
-       btnSearch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::SearchContacts ), NULL, this );
-       btnReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::ResetContacts ), NULL, this );
-       this->Connect( mnuContactOpen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::OpenContact ) );
-       this->Connect( mnuContactEdit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::EditContact ) );
-       this->Connect( mnuContactReveal->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::RevealContact ) );
-       this->Connect( mnuContactClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::CloseWindow ) );
+    this->SetSizeHints( wxSize( 300,450 ), wxDefaultSize );
+    
+    stbBottom = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
+    wxBoxSizer* bSizer368;
+    bSizer368 = new wxBoxSizer( wxVERTICAL );
+    
+    m_splitter4 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
+    m_splitter4->Connect( wxEVT_IDLE, wxIdleEventHandler( frmSearchADT::m_splitter4OnIdle ), NULL, this );
+    m_splitter4->SetMinimumPaneSize( 1 );
+    
+    m_panel60 = new wxPanel( m_splitter4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer382;
+    bSizer382 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer369;
+    bSizer369 = new wxBoxSizer( wxHORIZONTAL );
+    
+    nbkSearch = new wxNotebook( m_panel60, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabSearch = new wxScrolledWindow( nbkSearch, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE|wxHSCROLL|wxVSCROLL );
+    tabSearch->SetScrollRate( 5, 5 );
+    szrSearch = new wxFlexGridSizer( 0, 1, 0, 0 );
+    szrSearch->AddGrowableCol( 0 );
+    szrSearch->SetFlexibleDirection( wxVERTICAL );
+    szrSearch->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    
+    tabSearch->SetSizer( szrSearch );
+    tabSearch->Layout();
+    szrSearch->Fit( tabSearch );
+    nbkSearch->AddPage( tabSearch, wxT("Search"), true );
+    tabAdvanced = new wxScrolledWindow( nbkSearch, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabAdvanced->SetScrollRate( 5, 5 );
+    wxBoxSizer* bSizer384;
+    bSizer384 = new wxBoxSizer( wxVERTICAL );
+    
+    btnSelectAccounts = new wxButton( tabAdvanced, wxID_ANY, wxT("Select Accounts..."), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer384->Add( btnSelectAccounts, 0, wxALL, 5 );
+    
+    
+    tabAdvanced->SetSizer( bSizer384 );
+    tabAdvanced->Layout();
+    bSizer384->Fit( tabAdvanced );
+    nbkSearch->AddPage( tabAdvanced, wxT("Advanced"), false );
+    
+    bSizer369->Add( nbkSearch, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer371;
+    bSizer371 = new wxBoxSizer( wxVERTICAL );
+    
+    btnSearch = new wxButton( m_panel60, wxID_ANY, wxT("Search"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer371->Add( btnSearch, 0, wxALL, 5 );
+    
+    btnReset = new wxButton( m_panel60, wxID_ANY, wxT("Reset"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer371->Add( btnReset, 0, wxALL, 5 );
+    
+    
+    bSizer369->Add( bSizer371, 0, wxEXPAND, 5 );
+    
+    
+    bSizer382->Add( bSizer369, 1, wxEXPAND, 5 );
+    
+    
+    m_panel60->SetSizer( bSizer382 );
+    m_panel60->Layout();
+    bSizer382->Fit( m_panel60 );
+    m_panel61 = new wxPanel( m_splitter4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer386;
+    bSizer386 = new wxBoxSizer( wxVERTICAL );
+    
+    lstResults = new wxListCtrl( m_panel61, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer386->Add( lstResults, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    m_panel61->SetSizer( bSizer386 );
+    m_panel61->Layout();
+    bSizer386->Fit( m_panel61 );
+    m_splitter4->SplitHorizontally( m_panel60, m_panel61, 178 );
+    bSizer368->Add( m_splitter4, 1, wxEXPAND, 5 );
+    
+    
+    this->SetSizer( bSizer368 );
+    this->Layout();
+    m_menubar5 = new wxMenuBar( 0 );
+    mnuContact = new wxMenu();
+    wxMenuItem* mnuContactOpen;
+    mnuContactOpen = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("Open Contact...") ) + wxT('\t') + wxT("CTRL+O"), wxEmptyString, wxITEM_NORMAL );
+    mnuContact->Append( mnuContactOpen );
+    
+    wxMenuItem* mnuContactEdit;
+    mnuContactEdit = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("Edit Contact...") ) + wxT('\t') + wxT("CTRL+E"), wxEmptyString, wxITEM_NORMAL );
+    mnuContact->Append( mnuContactEdit );
+    
+    wxMenuItem* mnuContactReveal;
+    mnuContactReveal = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("Reveal Contact") ) + wxT('\t') + wxT("CTRL+R"), wxEmptyString, wxITEM_NORMAL );
+    mnuContact->Append( mnuContactReveal );
+    
+    mnuContact->AppendSeparator();
+    
+    wxMenuItem* mnuContactClose;
+    mnuContactClose = new wxMenuItem( mnuContact, wxID_ANY, wxString( wxT("Close Window") ) + wxT('\t') + wxT("ALT+F4"), wxEmptyString, wxITEM_NORMAL );
+    mnuContact->Append( mnuContactClose );
+    
+    m_menubar5->Append( mnuContact, wxT("Contact") );
+    
+    this->SetMenuBar( m_menubar5 );
+    
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmSearchADT::CloseWindow ) );
+    btnSelectAccounts->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::SelectAccounts ), NULL, this );
+    btnSearch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::SearchContacts ), NULL, this );
+    btnReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::ResetContacts ), NULL, this );
+    this->Connect( mnuContactOpen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::OpenContact ) );
+    this->Connect( mnuContactEdit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::EditContact ) );
+    this->Connect( mnuContactReveal->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::RevealContact ) );
+    this->Connect( mnuContactClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::CloseWindow ) );
 }
 
 frmSearchADT::~frmSearchADT()
 {
-       // Disconnect Events
-       this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmSearchADT::CloseWindow ) );
-       btnSelectAccounts->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::SelectAccounts ), NULL, this );
-       btnSearch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::SearchContacts ), NULL, this );
-       btnReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::ResetContacts ), NULL, this );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::OpenContact ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::EditContact ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::RevealContact ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::CloseWindow ) );
-       
+    // Disconnect Events
+    this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmSearchADT::CloseWindow ) );
+    btnSelectAccounts->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::SelectAccounts ), NULL, this );
+    btnSearch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::SearchContacts ), NULL, this );
+    btnReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchADT::ResetContacts ), NULL, this );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::OpenContact ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::EditContact ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::RevealContact ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmSearchADT::CloseWindow ) );
+    
 }
 
 frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxSize( 450,400 ), wxSize( 450,400 ) );
-       
-       wxBoxSizer* szrMain;
-       szrMain = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* szrTabs;
-       szrTabs = new wxBoxSizer( wxVERTICAL );
-       
-       NbtPreferences = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* szrChecks;
-       szrChecks = new wxBoxSizer( wxVERTICAL );
-       
-       chkSaveWindowPosition = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Save window position on exit"), wxDefaultPosition, wxDefaultSize, 0 );
-       szrChecks->Add( chkSaveWindowPosition, 0, wxALL, 5 );
-       
-       chkHideLocal = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Hide local address books"), wxDefaultPosition, wxDefaultSize, 0 );
-       szrChecks->Add( chkHideLocal, 0, wxALL, 5 );
-       
-       
-       tabGeneral->SetSizer( szrChecks );
-       tabGeneral->Layout();
-       szrChecks->Fit( tabGeneral );
-       NbtPreferences->AddPage( tabGeneral, wxT("General"), false );
-       tabTheme = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       tabTheme->Hide();
-       
-       wxGridSizer* szrTheme;
-       szrTheme = new wxGridSizer( 1, 1, 0, 0 );
-       
-       wxBoxSizer* bSizer161;
-       bSizer161 = new wxBoxSizer( wxVERTICAL );
-       
-       lstThemes = new wxListCtrl( tabTheme, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer161->Add( lstThemes, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer151;
-       bSizer151 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnThemeAdd = new wxButton( tabTheme, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer151->Add( btnThemeAdd, 0, wxALL, 5 );
-       
-       btnThemeModify = new wxButton( tabTheme, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       btnThemeModify->Enable( false );
-       
-       bSizer151->Add( btnThemeModify, 0, wxALL, 5 );
-       
-       btnThemeDelete = new wxButton( tabTheme, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       btnThemeDelete->Enable( false );
-       
-       bSizer151->Add( btnThemeDelete, 0, wxALL, 5 );
-       
-       
-       bSizer161->Add( bSizer151, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL, 0 );
-       
-       
-       szrTheme->Add( bSizer161, 1, wxEXPAND, 5 );
-       
-       
-       tabTheme->SetSizer( szrTheme );
-       tabTheme->Layout();
-       szrTheme->Fit( tabTheme );
-       NbtPreferences->AddPage( tabTheme, wxT("Themes"), false );
-       tabAccounts = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxGridSizer* szrAccounts;
-       szrAccounts = new wxGridSizer( 1, 1, 0, 0 );
-       
-       wxBoxSizer* bSizer16;
-       bSizer16 = new wxBoxSizer( wxVERTICAL );
-       
-       lstAccounts = new wxListCtrl( tabAccounts, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer16->Add( lstAccounts, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer15;
-       bSizer15 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAccountAdd = new wxButton( tabAccounts, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer15->Add( btnAccountAdd, 0, wxALL, 5 );
-       
-       btnAccountModify = new wxButton( tabAccounts, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       btnAccountModify->Enable( false );
-       
-       bSizer15->Add( btnAccountModify, 0, wxALL, 5 );
-       
-       btnAccountDelete = new wxButton( tabAccounts, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       btnAccountDelete->Enable( false );
-       
-       bSizer15->Add( btnAccountDelete, 0, wxALL, 5 );
-       
-       
-       bSizer16->Add( bSizer15, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL, 0 );
-       
-       
-       szrAccounts->Add( bSizer16, 1, wxEXPAND, 5 );
-       
-       
-       tabAccounts->SetSizer( szrAccounts );
-       tabAccounts->Layout();
-       szrAccounts->Fit( tabAccounts );
-       NbtPreferences->AddPage( tabAccounts, wxT("Accounts"), true );
-       
-       szrTabs->Add( NbtPreferences, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       szrMain->Add( szrTabs, 1, wxEXPAND, 0 );
-       
-       wxBoxSizer* szrButtons;
-       szrButtons = new wxBoxSizer( wxHORIZONTAL );
-       
-       
-       szrButtons->Add( 1, 0, 1, wxEXPAND, 0 );
-       
-       btnSave = new wxButton( this, wxID_ANY, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 );
-       btnSave->SetDefault(); 
-       szrButtons->Add( btnSave, 0, wxALIGN_RIGHT, 0 );
-       
-       
-       szrButtons->Add( 5, 0, 0, 0, 0 );
-       
-       btnCancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
-       szrButtons->Add( btnCancel, 0, wxALIGN_RIGHT, 0 );
-       
-       
-       szrButtons->Add( 5, 0, 0, wxEXPAND, 0 );
-       
-       
-       szrMain->Add( szrButtons, 0, wxBOTTOM|wxEXPAND, 5 );
-       
-       
-       this->SetSizer( szrMain );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmPreferencesADT::LoadPreferences ) );
-       lstThemes->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
-       lstThemes->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
-       btnThemeAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
-       btnThemeModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
-       btnThemeDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
-       lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
-       lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
-       btnAccountAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
-       btnAccountModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
-       btnAccountDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
-       btnSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::SavePreferences ), NULL, this );
-       btnCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxSize( 450,400 ), wxSize( 450,400 ) );
+    
+    wxBoxSizer* szrMain;
+    szrMain = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* szrTabs;
+    szrTabs = new wxBoxSizer( wxVERTICAL );
+    
+    NbtPreferences = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* szrChecks;
+    szrChecks = new wxBoxSizer( wxVERTICAL );
+    
+    chkSaveWindowPosition = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Save window position on exit"), wxDefaultPosition, wxDefaultSize, 0 );
+    szrChecks->Add( chkSaveWindowPosition, 0, wxALL, 5 );
+    
+    chkHideLocal = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Hide local address books"), wxDefaultPosition, wxDefaultSize, 0 );
+    szrChecks->Add( chkHideLocal, 0, wxALL, 5 );
+    
+    
+    tabGeneral->SetSizer( szrChecks );
+    tabGeneral->Layout();
+    szrChecks->Fit( tabGeneral );
+    NbtPreferences->AddPage( tabGeneral, wxT("General"), false );
+    tabTheme = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    tabTheme->Hide();
+    
+    wxGridSizer* szrTheme;
+    szrTheme = new wxGridSizer( 1, 1, 0, 0 );
+    
+    wxBoxSizer* bSizer161;
+    bSizer161 = new wxBoxSizer( wxVERTICAL );
+    
+    lstThemes = new wxListCtrl( tabTheme, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer161->Add( lstThemes, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer151;
+    bSizer151 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnThemeAdd = new wxButton( tabTheme, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer151->Add( btnThemeAdd, 0, wxALL, 5 );
+    
+    btnThemeModify = new wxButton( tabTheme, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    btnThemeModify->Enable( false );
+    
+    bSizer151->Add( btnThemeModify, 0, wxALL, 5 );
+    
+    btnThemeDelete = new wxButton( tabTheme, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    btnThemeDelete->Enable( false );
+    
+    bSizer151->Add( btnThemeDelete, 0, wxALL, 5 );
+    
+    
+    bSizer161->Add( bSizer151, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL, 0 );
+    
+    
+    szrTheme->Add( bSizer161, 1, wxEXPAND, 5 );
+    
+    
+    tabTheme->SetSizer( szrTheme );
+    tabTheme->Layout();
+    szrTheme->Fit( tabTheme );
+    NbtPreferences->AddPage( tabTheme, wxT("Themes"), true );
+    tabAccounts = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxGridSizer* szrAccounts;
+    szrAccounts = new wxGridSizer( 1, 1, 0, 0 );
+    
+    wxBoxSizer* bSizer16;
+    bSizer16 = new wxBoxSizer( wxVERTICAL );
+    
+    lstAccounts = new wxListCtrl( tabAccounts, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer16->Add( lstAccounts, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer15;
+    bSizer15 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAccountAdd = new wxButton( tabAccounts, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer15->Add( btnAccountAdd, 0, wxALL, 5 );
+    
+    btnAccountModify = new wxButton( tabAccounts, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    btnAccountModify->Enable( false );
+    
+    bSizer15->Add( btnAccountModify, 0, wxALL, 5 );
+    
+    btnAccountDelete = new wxButton( tabAccounts, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    btnAccountDelete->Enable( false );
+    
+    bSizer15->Add( btnAccountDelete, 0, wxALL, 5 );
+    
+    
+    bSizer16->Add( bSizer15, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL, 0 );
+    
+    
+    szrAccounts->Add( bSizer16, 1, wxEXPAND, 5 );
+    
+    
+    tabAccounts->SetSizer( szrAccounts );
+    tabAccounts->Layout();
+    szrAccounts->Fit( tabAccounts );
+    NbtPreferences->AddPage( tabAccounts, wxT("Accounts"), false );
+    
+    szrTabs->Add( NbtPreferences, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    szrMain->Add( szrTabs, 1, wxEXPAND, 0 );
+    
+    wxBoxSizer* szrButtons;
+    szrButtons = new wxBoxSizer( wxHORIZONTAL );
+    
+    
+    szrButtons->Add( 1, 0, 1, wxEXPAND, 0 );
+    
+    btnSave = new wxButton( this, wxID_ANY, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 );
+    btnSave->SetDefault();
+    szrButtons->Add( btnSave, 0, wxALIGN_RIGHT, 0 );
+    
+    
+    szrButtons->Add( 5, 0, 0, 0, 0 );
+    
+    btnCancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+    szrButtons->Add( btnCancel, 0, wxALIGN_RIGHT, 0 );
+    
+    
+    szrButtons->Add( 5, 0, 0, wxEXPAND, 0 );
+    
+    
+    szrMain->Add( szrButtons, 0, wxBOTTOM|wxEXPAND, 5 );
+    
+    
+    this->SetSizer( szrMain );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmPreferencesADT::LoadPreferences ) );
+    lstThemes->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
+    lstThemes->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
+    btnThemeAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
+    btnThemeModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
+    btnThemeDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
+    lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
+    lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
+    btnAccountAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
+    btnAccountModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
+    btnAccountDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
+    btnSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::SavePreferences ), NULL, this );
+    btnCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::CloseWindow ), NULL, this );
 }
 
 frmPreferencesADT::~frmPreferencesADT()
 {
-       // Disconnect Events
-       this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmPreferencesADT::LoadPreferences ) );
-       lstThemes->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
-       lstThemes->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
-       btnThemeAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
-       btnThemeModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
-       btnThemeDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
-       lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
-       lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
-       btnAccountAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
-       btnAccountModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
-       btnAccountDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
-       btnSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::SavePreferences ), NULL, this );
-       btnCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmPreferencesADT::LoadPreferences ) );
+    lstThemes->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
+    lstThemes->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
+    btnThemeAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
+    btnThemeModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
+    btnThemeDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
+    lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
+    lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
+    btnAccountAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
+    btnAccountModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
+    btnAccountDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
+    btnSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::SavePreferences ), NULL, this );
+    btnCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::CloseWindow ), NULL, this );
+    
 }
 
 frmAboutADT::frmAboutADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxSize( 350,400 ), wxDefaultSize );
-       
-       wxBoxSizer* szrMain;
-       szrMain = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* szrLogo;
-       szrLogo = new wxBoxSizer( wxVERTICAL );
-       
-       szrLogo->SetMinSize( wxSize( 350,100 ) ); 
-       bmpLogo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxPoint( 0,0 ), wxSize( 350,100 ), 0 );
-       szrLogo->Add( bmpLogo, 0, wxALL, 0 );
-       
-       
-       szrMain->Add( szrLogo, 0, wxFIXED_MINSIZE, 0 );
-       
-       wxBoxSizer* szrDetails;
-       szrDetails = new wxBoxSizer( wxVERTICAL );
-       
-       lblVersion = new wxStaticText( this, wxID_ANY, wxT("Version 0.00"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblVersion->Wrap( -1 );
-       lblVersion->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) );
-       
-       szrDetails->Add( lblVersion, 0, wxALL, 5 );
-       
-       lblCompileTime = new wxStaticText( this, wxID_ANY, wxT("Built on (date) at (time)"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblCompileTime->Wrap( -1 );
-       szrDetails->Add( lblCompileTime, 0, wxALL, 5 );
-       
-       lblCopyright = new wxStaticText( this, wxID_ANY, wxT("(c) 2012-2015 Xestia Software Development"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblCopyright->Wrap( -1 );
-       szrDetails->Add( lblCopyright, 0, wxALL, 5 );
-       
-       
-       szrMain->Add( szrDetails, 5, wxEXPAND, 1 );
-       
-       wxBoxSizer* szrButtons;
-       szrButtons = new wxBoxSizer( wxVERTICAL );
-       
-       szrButtons->SetMinSize( wxSize( -1,35 ) ); 
-       btnClose = new wxButton( this, wxID_ANY, wxT("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       szrButtons->Add( btnClose, 0, wxALIGN_RIGHT|wxRIGHT, 5 );
-       
-       
-       szrMain->Add( szrButtons, 0, wxEXPAND, 0 );
-       
-       
-       this->SetSizer( szrMain );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmAboutADT::CloseAboutWindow ), NULL, this );
+    this->SetSizeHints( wxSize( 350,400 ), wxDefaultSize );
+    
+    wxBoxSizer* szrMain;
+    szrMain = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* szrLogo;
+    szrLogo = new wxBoxSizer( wxVERTICAL );
+    
+    szrLogo->SetMinSize( wxSize( 350,100 ) );
+    bmpLogo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxPoint( 0,0 ), wxSize( 350,100 ), 0 );
+    szrLogo->Add( bmpLogo, 0, wxALL, 0 );
+    
+    
+    szrMain->Add( szrLogo, 0, wxFIXED_MINSIZE, 0 );
+    
+    wxBoxSizer* szrDetails;
+    szrDetails = new wxBoxSizer( wxVERTICAL );
+    
+    lblVersion = new wxStaticText( this, wxID_ANY, wxT("Version 0.00"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblVersion->Wrap( -1 );
+    lblVersion->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) );
+    
+    szrDetails->Add( lblVersion, 0, wxALL, 5 );
+    
+    lblCompileTime = new wxStaticText( this, wxID_ANY, wxT("Built on (date) at (time)"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblCompileTime->Wrap( -1 );
+    szrDetails->Add( lblCompileTime, 0, wxALL, 5 );
+    
+    lblCopyright = new wxStaticText( this, wxID_ANY, wxT("(c) 2012-2015 Xestia Software Development"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblCopyright->Wrap( -1 );
+    szrDetails->Add( lblCopyright, 0, wxALL, 5 );
+    
+    
+    szrMain->Add( szrDetails, 5, wxEXPAND, 1 );
+    
+    wxBoxSizer* szrButtons;
+    szrButtons = new wxBoxSizer( wxVERTICAL );
+    
+    szrButtons->SetMinSize( wxSize( -1,35 ) );
+    btnClose = new wxButton( this, wxID_ANY, wxT("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    szrButtons->Add( btnClose, 0, wxALIGN_RIGHT|wxRIGHT, 5 );
+    
+    
+    szrMain->Add( szrButtons, 0, wxEXPAND, 0 );
+    
+    
+    this->SetSizer( szrMain );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmAboutADT::CloseAboutWindow ), NULL, this );
 }
 
 frmAboutADT::~frmAboutADT()
 {
-       // Disconnect Events
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmAboutADT::CloseAboutWindow ), NULL, this );
-       
+    // Disconnect Events
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmAboutADT::CloseAboutWindow ), NULL, this );
+    
 }
 
 frmContactADT::frmContactADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxSize( 320,240 ), wxDefaultSize );
-       
-       wxBoxSizer* bSizer13;
-       bSizer13 = new wxBoxSizer( wxVERTICAL );
-       
-       htmContactData = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxSUNKEN_BORDER );
-       bSizer13->Add( htmContactData, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       this->SetSizer( bSizer13 );
-       this->Layout();
-       m_menubar2 = new wxMenuBar( 0 );
-       contact = new wxMenu();
-       wxMenuItem* mnuContactClose;
-       mnuContactClose = new wxMenuItem( contact, ID_CONTACT_CLOSE, wxString( wxT("Close") ) + wxT('\t') + wxT("CTRL+F4"), wxEmptyString, wxITEM_NORMAL );
-       contact->Append( mnuContactClose );
-       
-       m_menubar2->Append( contact, wxT("Contact") ); 
-       
-       this->SetMenuBar( m_menubar2 );
-       
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmContactADT::CloseWindow ) );
-       this->Connect( mnuContactClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactADT::CloseWindow ) );
+    this->SetSizeHints( wxSize( 320,240 ), wxDefaultSize );
+    
+    wxBoxSizer* bSizer13;
+    bSizer13 = new wxBoxSizer( wxVERTICAL );
+    
+    htmContactData = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxSUNKEN_BORDER );
+    bSizer13->Add( htmContactData, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    this->SetSizer( bSizer13 );
+    this->Layout();
+    m_menubar2 = new wxMenuBar( 0 );
+    contact = new wxMenu();
+    wxMenuItem* mnuContactClose;
+    mnuContactClose = new wxMenuItem( contact, ID_CONTACT_CLOSE, wxString( wxT("Close") ) + wxT('\t') + wxT("CTRL+F4"), wxEmptyString, wxITEM_NORMAL );
+    contact->Append( mnuContactClose );
+    
+    m_menubar2->Append( contact, wxT("Contact") );
+    
+    this->SetMenuBar( m_menubar2 );
+    
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmContactADT::CloseWindow ) );
+    this->Connect( mnuContactClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactADT::CloseWindow ) );
 }
 
 frmContactADT::~frmContactADT()
 {
-       // Disconnect Events
-       this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmContactADT::CloseWindow ) );
-       this->Disconnect( ID_CONTACT_CLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactADT::CloseWindow ) );
-       
+    // Disconnect Events
+    this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmContactADT::CloseWindow ) );
+    this->Disconnect( ID_CONTACT_CLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactADT::CloseWindow ) );
+    
 }
 
 frmNewAccountADT::frmNewAccountADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxSize( 425,330 ), wxSize( 425,330 ) );
-       
-       wxFlexGridSizer* fgSizer30;
-       fgSizer30 = new wxFlexGridSizer( 0, 1, 0, 0 );
-       fgSizer30->AddGrowableCol( 0 );
-       fgSizer30->AddGrowableRow( 0 );
-       fgSizer30->SetFlexibleDirection( wxBOTH );
-       fgSizer30->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       szrNewAccount = new wxBoxSizer( wxVERTICAL );
-       
-       tabType = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer32;
-       fgSizer32 = new wxFlexGridSizer( 0, 1, 0, 0 );
-       fgSizer32->AddGrowableCol( 0 );
-       fgSizer32->SetFlexibleDirection( wxBOTH );
-       fgSizer32->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
-       
-       lblEnterText = new wxStaticText( tabType, wxID_ANY, wxT("Enter the details below and click on Next."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblEnterText->Wrap( -1 );
-       fgSizer32->Add( lblEnterText, 0, wxALL, 5 );
-       
-       wxFlexGridSizer* fgSizer33;
-       fgSizer33 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer33->AddGrowableCol( 1 );
-       fgSizer33->AddGrowableRow( 0 );
-       fgSizer33->SetFlexibleDirection( wxBOTH );
-       fgSizer33->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
-       
-       lblType = new wxStaticText( tabType, wxID_ANY, wxT("Server Type:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblType->Wrap( -1 );
-       fgSizer33->Add( lblType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       wxString cmbServerTypeChoices[] = { wxT("Local"), wxT("CardDAV") };
-       int cmbServerTypeNChoices = sizeof( cmbServerTypeChoices ) / sizeof( wxString );
-       cmbServerType = new wxChoice( tabType, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbServerTypeNChoices, cmbServerTypeChoices, 0 );
-       cmbServerType->SetSelection( 1 );
-       fgSizer33->Add( cmbServerType, 0, wxALL, 5 );
-       
-       lblServerAddress = new wxStaticText( tabType, wxID_ANY, wxT("Server Address:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblServerAddress->Wrap( -1 );
-       fgSizer33->Add( lblServerAddress, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtServerAddress = new wxTextCtrl( tabType, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtServerAddress->SetMaxLength( 0 ); 
-       fgSizer33->Add( txtServerAddress, 1, wxALL|wxEXPAND, 5 );
-       
-       lblServerPort = new wxStaticText( tabType, wxID_ANY, wxT("Server Port:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblServerPort->Wrap( -1 );
-       fgSizer33->Add( lblServerPort, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtServerPort = new wxTextCtrl( tabType, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtServerPort->SetMaxLength( 0 ); 
-       fgSizer33->Add( txtServerPort, 0, wxALL, 5 );
-       
-       lblUsername = new wxStaticText( tabType, wxID_ANY, wxT("Username:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblUsername->Wrap( -1 );
-       fgSizer33->Add( lblUsername, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtUsername = new wxTextCtrl( tabType, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtUsername->SetMaxLength( 0 ); 
-       fgSizer33->Add( txtUsername, 1, wxALL|wxEXPAND, 5 );
-       
-       lblPassword = new wxStaticText( tabType, wxID_ANY, wxT("Password:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPassword->Wrap( -1 );
-       fgSizer33->Add( lblPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtPassword = new wxTextCtrl( tabType, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
-       txtPassword->SetMaxLength( 0 ); 
-       fgSizer33->Add( txtPassword, 0, wxALL|wxEXPAND, 5 );
-       
-       lblSSL = new wxStaticText( tabType, wxID_ANY, wxT("SSL:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblSSL->Wrap( -1 );
-       fgSizer33->Add( lblSSL, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       wxBoxSizer* bSizer3221;
-       bSizer3221 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUseSSL = new wxCheckBox( tabType, wxID_ANY, wxT("Use SSL"), wxDefaultPosition, wxDefaultSize, 0 );
-       chkUseSSL->SetValue(true); 
-       bSizer3221->Add( chkUseSSL, 0, wxALL, 5 );
-       
-       
-       fgSizer33->Add( bSizer3221, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer32->Add( fgSizer33, 1, wxEXPAND, 5 );
-       
-       
-       tabType->SetSizer( fgSizer32 );
-       tabType->Layout();
-       fgSizer32->Fit( tabType );
-       szrNewAccount->Add( tabType, 1, wxEXPAND | wxALL, 5 );
-       
-       tabConn = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       tabConn->Hide();
-       
-       wxBoxSizer* bSizer323;
-       bSizer323 = new wxBoxSizer( wxVERTICAL );
-       
-       lblConnectionResult = new wxStaticText( tabConn, wxID_ANY, wxT("Connection Results:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblConnectionResult->Wrap( -1 );
-       lblConnectionResult->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Sans") ) );
-       
-       bSizer323->Add( lblConnectionResult, 0, wxALL, 5 );
-       
-       wxFlexGridSizer* fgSizer34;
-       fgSizer34 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer34->SetFlexibleDirection( wxBOTH );
-       fgSizer34->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblServerConnected = new wxStaticText( tabConn, wxID_ANY, wxT("Server connected:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblServerConnected->Wrap( -1 );
-       fgSizer34->Add( lblServerConnected, 0, wxALL, 5 );
-       
-       lblServerConnResult = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblServerConnResult->Wrap( -1 );
-       fgSizer34->Add( lblServerConnResult, 0, wxALL, 5 );
-       
-       lblValidResponse = new wxStaticText( tabConn, wxID_ANY, wxT("Server gave valid response:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblValidResponse->Wrap( -1 );
-       fgSizer34->Add( lblValidResponse, 0, wxALL, 5 );
-       
-       lblServerResponse = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblServerResponse->Wrap( -1 );
-       fgSizer34->Add( lblServerResponse, 0, wxALL, 5 );
-       
-       lblUseSSL = new wxStaticText( tabConn, wxID_ANY, wxT("Server uses SSL:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblUseSSL->Wrap( -1 );
-       fgSizer34->Add( lblUseSSL, 0, wxALL, 5 );
-       
-       lblServerSSLResult = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblServerSSLResult->Wrap( -1 );
-       fgSizer34->Add( lblServerSSLResult, 0, wxALL, 5 );
-       
-       lblServerSSLCert = new wxStaticText( tabConn, wxID_ANY, wxT("Server has valid SSL certificate:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblServerSSLCert->Wrap( -1 );
-       fgSizer34->Add( lblServerSSLCert, 0, wxALL, 5 );
-       
-       lblServerSSLValid = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblServerSSLValid->Wrap( -1 );
-       fgSizer34->Add( lblServerSSLValid, 0, wxALL, 5 );
-       
-       lblServerUsernamePassword = new wxStaticText( tabConn, wxID_ANY, wxT("Able to Login:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblServerUsernamePassword->Wrap( -1 );
-       fgSizer34->Add( lblServerUsernamePassword, 0, wxALL, 5 );
-       
-       lblAbleToLoginResult = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAbleToLoginResult->Wrap( -1 );
-       fgSizer34->Add( lblAbleToLoginResult, 0, wxALL, 5 );
-       
-       lblIsCalDAV = new wxStaticText( tabConn, wxID_ANY, wxT("Server has CardDAV Support:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblIsCalDAV->Wrap( -1 );
-       fgSizer34->Add( lblIsCalDAV, 0, wxALL, 5 );
-       
-       lblCardDAVSupportResult = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblCardDAVSupportResult->Wrap( -1 );
-       fgSizer34->Add( lblCardDAVSupportResult, 0, wxALL, 5 );
-       
-       
-       bSizer323->Add( fgSizer34, 1, wxEXPAND, 5 );
-       
-       m_staticline3 = new wxStaticLine( tabConn, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
-       bSizer323->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
-       
-       lblConnectionResultText = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblConnectionResultText->Wrap( 360 );
-       lblConnectionResultText->SetMinSize( wxSize( -1,40 ) );
-       
-       bSizer323->Add( lblConnectionResultText, 0, wxALL|wxEXPAND, 5 );
-       
-       
-       tabConn->SetSizer( bSizer323 );
-       tabConn->Layout();
-       bSizer323->Fit( tabConn );
-       szrNewAccount->Add( tabConn, 1, wxEXPAND | wxALL, 5 );
-       
-       tabFinish = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       tabFinish->Hide();
-       
-       wxBoxSizer* bSizer3231;
-       bSizer3231 = new wxBoxSizer( wxVERTICAL );
-       
-       lblFinishText = new wxStaticText( tabFinish, wxID_ANY, wxT("Enter the account name and click on Finish."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblFinishText->Wrap( -1 );
-       bSizer3231->Add( lblFinishText, 0, wxALL, 5 );
-       
-       wxFlexGridSizer* fgSizer341;
-       fgSizer341 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer341->AddGrowableCol( 1 );
-       fgSizer341->SetFlexibleDirection( wxBOTH );
-       fgSizer341->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblAccountName = new wxStaticText( tabFinish, wxID_ANY, wxT("Account Name:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAccountName->Wrap( -1 );
-       fgSizer341->Add( lblAccountName, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtAccountName = new wxTextCtrl( tabFinish, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtAccountName->SetMaxLength( 0 ); 
-       fgSizer341->Add( txtAccountName, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer3231->Add( fgSizer341, 1, wxEXPAND, 5 );
-       
-       
-       tabFinish->SetSizer( bSizer3231 );
-       tabFinish->Layout();
-       bSizer3231->Fit( tabFinish );
-       szrNewAccount->Add( tabFinish, 1, wxEXPAND | wxALL, 5 );
-       
-       
-       fgSizer30->Add( szrNewAccount, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer322;
-       bSizer322 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnPrevious = new wxButton( this, wxID_ANY, wxT("< Previous"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer322->Add( btnPrevious, 0, wxALL, 5 );
-       
-       btnNext = new wxButton( this, wxID_ANY, wxT("Next >"), wxDefaultPosition, wxDefaultSize, 0 );
-       btnNext->SetDefault(); 
-       bSizer322->Add( btnNext, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer322->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       fgSizer30->Add( bSizer322, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( fgSizer30 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       cmbServerType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmNewAccountADT::UpdateRequirements ), NULL, this );
-       txtAccountName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmNewAccountADT::CheckAccountName ), NULL, this );
-       btnPrevious->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::ProcessPrevious ), NULL, this );
-       btnNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::ProcessNext ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxSize( 425,330 ), wxSize( 425,330 ) );
+    
+    wxFlexGridSizer* fgSizer30;
+    fgSizer30 = new wxFlexGridSizer( 0, 1, 0, 0 );
+    fgSizer30->AddGrowableCol( 0 );
+    fgSizer30->AddGrowableRow( 0 );
+    fgSizer30->SetFlexibleDirection( wxBOTH );
+    fgSizer30->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    szrNewAccount = new wxBoxSizer( wxVERTICAL );
+    
+    tabType = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer32;
+    fgSizer32 = new wxFlexGridSizer( 0, 1, 0, 0 );
+    fgSizer32->AddGrowableCol( 0 );
+    fgSizer32->SetFlexibleDirection( wxBOTH );
+    fgSizer32->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
+    
+    lblEnterText = new wxStaticText( tabType, wxID_ANY, wxT("Enter the details below and click on Next."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblEnterText->Wrap( -1 );
+    fgSizer32->Add( lblEnterText, 0, wxALL, 5 );
+    
+    wxFlexGridSizer* fgSizer33;
+    fgSizer33 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer33->AddGrowableCol( 1 );
+    fgSizer33->AddGrowableRow( 0 );
+    fgSizer33->SetFlexibleDirection( wxBOTH );
+    fgSizer33->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
+    
+    lblType = new wxStaticText( tabType, wxID_ANY, wxT("Server Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblType->Wrap( -1 );
+    fgSizer33->Add( lblType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    wxString cmbServerTypeChoices[] = { wxT("Local"), wxT("CardDAV") };
+    int cmbServerTypeNChoices = sizeof( cmbServerTypeChoices ) / sizeof( wxString );
+    cmbServerType = new wxChoice( tabType, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbServerTypeNChoices, cmbServerTypeChoices, 0 );
+    cmbServerType->SetSelection( 1 );
+    fgSizer33->Add( cmbServerType, 0, wxALL, 5 );
+    
+    lblServerAddress = new wxStaticText( tabType, wxID_ANY, wxT("Server Address:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblServerAddress->Wrap( -1 );
+    fgSizer33->Add( lblServerAddress, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtServerAddress = new wxTextCtrl( tabType, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtServerAddress->SetMaxLength( 0 );
+    fgSizer33->Add( txtServerAddress, 1, wxALL|wxEXPAND, 5 );
+    
+    lblServerPort = new wxStaticText( tabType, wxID_ANY, wxT("Server Port:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblServerPort->Wrap( -1 );
+    fgSizer33->Add( lblServerPort, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtServerPort = new wxTextCtrl( tabType, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtServerPort->SetMaxLength( 0 );
+    fgSizer33->Add( txtServerPort, 0, wxALL, 5 );
+    
+    lblUsername = new wxStaticText( tabType, wxID_ANY, wxT("Username:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblUsername->Wrap( -1 );
+    fgSizer33->Add( lblUsername, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtUsername = new wxTextCtrl( tabType, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtUsername->SetMaxLength( 0 );
+    fgSizer33->Add( txtUsername, 1, wxALL|wxEXPAND, 5 );
+    
+    lblPassword = new wxStaticText( tabType, wxID_ANY, wxT("Password:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPassword->Wrap( -1 );
+    fgSizer33->Add( lblPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtPassword = new wxTextCtrl( tabType, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
+    txtPassword->SetMaxLength( 0 );
+    fgSizer33->Add( txtPassword, 0, wxALL|wxEXPAND, 5 );
+    
+    lblSSL = new wxStaticText( tabType, wxID_ANY, wxT("SSL:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblSSL->Wrap( -1 );
+    fgSizer33->Add( lblSSL, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    wxBoxSizer* bSizer3221;
+    bSizer3221 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUseSSL = new wxCheckBox( tabType, wxID_ANY, wxT("Use SSL"), wxDefaultPosition, wxDefaultSize, 0 );
+    chkUseSSL->SetValue(true);
+    bSizer3221->Add( chkUseSSL, 0, wxALL, 5 );
+    
+    
+    fgSizer33->Add( bSizer3221, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer32->Add( fgSizer33, 1, wxEXPAND, 5 );
+    
+    
+    tabType->SetSizer( fgSizer32 );
+    tabType->Layout();
+    fgSizer32->Fit( tabType );
+    szrNewAccount->Add( tabType, 1, wxEXPAND | wxALL, 5 );
+    
+    tabConn = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    tabConn->Hide();
+    
+    wxBoxSizer* bSizer323;
+    bSizer323 = new wxBoxSizer( wxVERTICAL );
+    
+    lblConnectionResult = new wxStaticText( tabConn, wxID_ANY, wxT("Connection Results:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblConnectionResult->Wrap( -1 );
+    lblConnectionResult->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Sans") ) );
+    
+    bSizer323->Add( lblConnectionResult, 0, wxALL, 5 );
+    
+    wxFlexGridSizer* fgSizer34;
+    fgSizer34 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer34->SetFlexibleDirection( wxBOTH );
+    fgSizer34->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblServerConnected = new wxStaticText( tabConn, wxID_ANY, wxT("Server connected:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblServerConnected->Wrap( -1 );
+    fgSizer34->Add( lblServerConnected, 0, wxALL, 5 );
+    
+    lblServerConnResult = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblServerConnResult->Wrap( -1 );
+    fgSizer34->Add( lblServerConnResult, 0, wxALL, 5 );
+    
+    lblValidResponse = new wxStaticText( tabConn, wxID_ANY, wxT("Server gave valid response:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblValidResponse->Wrap( -1 );
+    fgSizer34->Add( lblValidResponse, 0, wxALL, 5 );
+    
+    lblServerResponse = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblServerResponse->Wrap( -1 );
+    fgSizer34->Add( lblServerResponse, 0, wxALL, 5 );
+    
+    lblUseSSL = new wxStaticText( tabConn, wxID_ANY, wxT("Server uses SSL:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblUseSSL->Wrap( -1 );
+    fgSizer34->Add( lblUseSSL, 0, wxALL, 5 );
+    
+    lblServerSSLResult = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblServerSSLResult->Wrap( -1 );
+    fgSizer34->Add( lblServerSSLResult, 0, wxALL, 5 );
+    
+    lblServerSSLCert = new wxStaticText( tabConn, wxID_ANY, wxT("Server has valid SSL certificate:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblServerSSLCert->Wrap( -1 );
+    fgSizer34->Add( lblServerSSLCert, 0, wxALL, 5 );
+    
+    lblServerSSLValid = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblServerSSLValid->Wrap( -1 );
+    fgSizer34->Add( lblServerSSLValid, 0, wxALL, 5 );
+    
+    lblServerUsernamePassword = new wxStaticText( tabConn, wxID_ANY, wxT("Able to Login:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblServerUsernamePassword->Wrap( -1 );
+    fgSizer34->Add( lblServerUsernamePassword, 0, wxALL, 5 );
+    
+    lblAbleToLoginResult = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAbleToLoginResult->Wrap( -1 );
+    fgSizer34->Add( lblAbleToLoginResult, 0, wxALL, 5 );
+    
+    lblIsCalDAV = new wxStaticText( tabConn, wxID_ANY, wxT("Server has CardDAV Support:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblIsCalDAV->Wrap( -1 );
+    fgSizer34->Add( lblIsCalDAV, 0, wxALL, 5 );
+    
+    lblCardDAVSupportResult = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblCardDAVSupportResult->Wrap( -1 );
+    fgSizer34->Add( lblCardDAVSupportResult, 0, wxALL, 5 );
+    
+    
+    bSizer323->Add( fgSizer34, 1, wxEXPAND, 5 );
+    
+    m_staticline3 = new wxStaticLine( tabConn, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+    bSizer323->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
+    
+    lblConnectionResultText = new wxStaticText( tabConn, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblConnectionResultText->Wrap( 360 );
+    lblConnectionResultText->SetMinSize( wxSize( -1,40 ) );
+    
+    bSizer323->Add( lblConnectionResultText, 0, wxALL|wxEXPAND, 5 );
+    
+    
+    tabConn->SetSizer( bSizer323 );
+    tabConn->Layout();
+    bSizer323->Fit( tabConn );
+    szrNewAccount->Add( tabConn, 1, wxEXPAND | wxALL, 5 );
+    
+    tabFinish = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    tabFinish->Hide();
+    
+    wxBoxSizer* bSizer3231;
+    bSizer3231 = new wxBoxSizer( wxVERTICAL );
+    
+    lblFinishText = new wxStaticText( tabFinish, wxID_ANY, wxT("Enter the account name and click on Finish."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblFinishText->Wrap( -1 );
+    bSizer3231->Add( lblFinishText, 0, wxALL, 5 );
+    
+    wxFlexGridSizer* fgSizer341;
+    fgSizer341 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer341->AddGrowableCol( 1 );
+    fgSizer341->SetFlexibleDirection( wxBOTH );
+    fgSizer341->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblAccountName = new wxStaticText( tabFinish, wxID_ANY, wxT("Account Name:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAccountName->Wrap( -1 );
+    fgSizer341->Add( lblAccountName, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtAccountName = new wxTextCtrl( tabFinish, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtAccountName->SetMaxLength( 0 );
+    fgSizer341->Add( txtAccountName, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer3231->Add( fgSizer341, 1, wxEXPAND, 5 );
+    
+    
+    tabFinish->SetSizer( bSizer3231 );
+    tabFinish->Layout();
+    bSizer3231->Fit( tabFinish );
+    szrNewAccount->Add( tabFinish, 1, wxEXPAND | wxALL, 5 );
+    
+    
+    fgSizer30->Add( szrNewAccount, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer322;
+    bSizer322 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnPrevious = new wxButton( this, wxID_ANY, wxT("< Previous"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer322->Add( btnPrevious, 0, wxALL, 5 );
+    
+    btnNext = new wxButton( this, wxID_ANY, wxT("Next >"), wxDefaultPosition, wxDefaultSize, 0 );
+    btnNext->SetDefault();
+    bSizer322->Add( btnNext, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer322->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    fgSizer30->Add( bSizer322, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( fgSizer30 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    cmbServerType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmNewAccountADT::UpdateRequirements ), NULL, this );
+    txtAccountName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmNewAccountADT::CheckAccountName ), NULL, this );
+    btnPrevious->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::ProcessPrevious ), NULL, this );
+    btnNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::ProcessNext ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::CloseWindow ), NULL, this );
 }
 
 frmNewAccountADT::~frmNewAccountADT()
 {
-       // Disconnect Events
-       cmbServerType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmNewAccountADT::UpdateRequirements ), NULL, this );
-       txtAccountName->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmNewAccountADT::CheckAccountName ), NULL, this );
-       btnPrevious->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::ProcessPrevious ), NULL, this );
-       btnNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::ProcessNext ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    cmbServerType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmNewAccountADT::UpdateRequirements ), NULL, this );
+    txtAccountName->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmNewAccountADT::CheckAccountName ), NULL, this );
+    btnPrevious->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::ProcessPrevious ), NULL, this );
+    btnNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::ProcessNext ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmNewAccountADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorADT::frmContactEditorADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
-       this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-       
-       wxBoxSizer* bSizer17;
-       bSizer17 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkContact = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabGeneral->SetScrollRate( 5, 5 );
-       wxBoxSizer* bSizer18;
-       bSizer18 = new wxBoxSizer( wxVERTICAL );
-       
-       wxGridSizer* gSizer7;
-       gSizer7 = new wxGridSizer( 0, 6, 0, 0 );
-       
-       lblTitle = new wxStaticText( tabGeneral, wxID_ANY, wxT("Title:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblTitle->Wrap( -1 );
-       gSizer7->Add( lblTitle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtTitle = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtTitle->SetMaxLength( 0 ); 
-       gSizer7->Add( txtTitle, 0, wxALL|wxEXPAND, 5 );
-       
-       
-       gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblForename = new wxStaticText( tabGeneral, wxID_ANY, wxT("Forename:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblForename->Wrap( -1 );
-       gSizer7->Add( lblForename, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtForename = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtForename->SetMaxLength( 0 ); 
-       gSizer7->Add( txtForename, 0, wxALL|wxEXPAND, 5 );
-       
-       lblSurname = new wxStaticText( tabGeneral, wxID_ANY, wxT("Surname:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblSurname->Wrap( -1 );
-       gSizer7->Add( lblSurname, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtSurname = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtSurname->SetMaxLength( 0 ); 
-       gSizer7->Add( txtSurname, 0, wxALL|wxEXPAND, 5 );
-       
-       lblOtherNames = new wxStaticText( tabGeneral, wxID_ANY, wxT("Other Names:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblOtherNames->Wrap( -1 );
-       gSizer7->Add( lblOtherNames, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtOtherNames = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtOtherNames->SetMaxLength( 0 ); 
-       gSizer7->Add( txtOtherNames, 0, wxALL|wxEXPAND, 5 );
-       
-       lblSuffix = new wxStaticText( tabGeneral, wxID_ANY, wxT("Suffix:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblSuffix->Wrap( -1 );
-       gSizer7->Add( lblSuffix, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtSuffix = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtSuffix->SetMaxLength( 0 ); 
-       gSizer7->Add( txtSuffix, 0, wxALL|wxEXPAND, 5 );
-       
-       
-       gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       bSizer18->Add( gSizer7, 0, wxEXPAND, 5 );
-       
-       wxFlexGridSizer* fgSizer5;
-       fgSizer5 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer5->AddGrowableCol( 1 );
-       fgSizer5->SetFlexibleDirection( wxBOTH );
-       fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblDisplayAs = new wxStaticText( tabGeneral, wxID_ANY, wxT("Display As:"), wxPoint( -1,-1 ), wxDefaultSize, 0 );
-       lblDisplayAs->Wrap( -1 );
-       fgSizer5->Add( lblDisplayAs, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       cmbDisplayAs = new wxComboBox( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
-       fgSizer5->Add( cmbDisplayAs, 0, wxALL|wxEXPAND, 5 );
-       
-       lblBirthday = new wxStaticText( tabGeneral, wxID_ANY, wxT("Birthday:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBirthday->Wrap( -1 );
-       fgSizer5->Add( lblBirthday, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       wxBoxSizer* bSizer318;
-       bSizer318 = new wxBoxSizer( wxHORIZONTAL );
-       
-       dapBirthday = new wxDatePickerCtrl( tabGeneral, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_ALLOWNONE|wxDP_DEFAULT|wxDP_DROPDOWN|wxDP_SHOWCENTURY );
-       dapBirthday->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
-       dapBirthday->SetToolTip( wxT("If you don't wish to enter a year, please use '0000' as the year.") );
-       dapBirthday->SetMinSize( wxSize( -1,25 ) );
-       
-       bSizer318->Add( dapBirthday, 0, wxALL|wxEXPAND, 5 );
-       
-       txtBirthday = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtBirthday->SetMaxLength( 0 ); 
-       bSizer318->Add( txtBirthday, 1, wxALL, 5 );
-       
-       
-       fgSizer5->Add( bSizer318, 1, wxEXPAND, 5 );
-       
-       lblAnniversary = new wxStaticText( tabGeneral, wxID_ANY, wxT("Anniversary:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAnniversary->Wrap( -1 );
-       fgSizer5->Add( lblAnniversary, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       wxBoxSizer* bSizer319;
-       bSizer319 = new wxBoxSizer( wxHORIZONTAL );
-       
-       dapAnniversary = new wxDatePickerCtrl( tabGeneral, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_ALLOWNONE|wxDP_DEFAULT|wxDP_DROPDOWN|wxDP_SHOWCENTURY );
-       dapAnniversary->SetToolTip( wxT("If you don't wish to enter a year, please use '0000' as the year.") );
-       dapAnniversary->SetMinSize( wxSize( -1,25 ) );
-       
-       bSizer319->Add( dapAnniversary, 0, wxALL|wxEXPAND, 5 );
-       
-       txtAnniversary = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtAnniversary->SetMaxLength( 0 ); 
-       bSizer319->Add( txtAnniversary, 1, wxALL, 5 );
-       
-       
-       fgSizer5->Add( bSizer319, 1, wxEXPAND, 5 );
-       
-       lblGender = new wxStaticText( tabGeneral, wxID_ANY, wxT("Gender:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblGender->Wrap( -1 );
-       fgSizer5->Add( lblGender, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       wxBoxSizer* bSizer20;
-       bSizer20 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxString cmbGenderChoices[] = { wxEmptyString, wxT("Male"), wxT("Female"), wxT("Other"), wxT("None/Not Applicable"), wxT("Unknown") };
-       int cmbGenderNChoices = sizeof( cmbGenderChoices ) / sizeof( wxString );
-       cmbGender = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbGenderNChoices, cmbGenderChoices, 0 );
-       cmbGender->SetSelection( 0 );
-       bSizer20->Add( cmbGender, 0, wxALL, 5 );
-       
-       txtGenderDescription = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtGenderDescription->SetMaxLength( 0 ); 
-       bSizer20->Add( txtGenderDescription, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       
-       fgSizer5->Add( bSizer20, 1, wxEXPAND, 5 );
-       
-       lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblType->Wrap( -1 );
-       fgSizer5->Add( lblType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       wxString cmbTypeChoices[] = { wxT("(Unspecified)"), wxT("Individual"), wxT("Group"), wxT("Organisation"), wxT("Location") };
-       int cmbTypeNChoices = sizeof( cmbTypeChoices ) / sizeof( wxString );
-       cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeNChoices, cmbTypeChoices, 0 );
-       cmbType->SetSelection( 0 );
-       fgSizer5->Add( cmbType, 0, wxALL, 5 );
-       
-       lblNicknames = new wxStaticText( tabGeneral, wxID_ANY, wxT("Nicknames:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblNicknames->Wrap( -1 );
-       fgSizer5->Add( lblNicknames, 0, wxALL, 5 );
-       
-       wxBoxSizer* szrNicknames;
-       szrNicknames = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboNicknames = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       szrNicknames->Add( lboNicknames, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrAddressesOuter3;
-       szrAddressesOuter3 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer464;
-       bSizer464 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer474;
-       bSizer474 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddGeneralNickname = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer474->Add( btnAddGeneralNickname, 0, wxALL, 5 );
-       
-       btnModifyGeneralNickname = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer474->Add( btnModifyGeneralNickname, 0, wxALL, 5 );
-       
-       btnDeleteGeneralNickname = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer474->Add( btnDeleteGeneralNickname, 0, wxALL, 5 );
-       
-       
-       bSizer464->Add( bSizer474, 1, wxEXPAND, 5 );
-       
-       
-       szrAddressesOuter3->Add( bSizer464, 1, wxEXPAND, 5 );
-       
-       
-       szrNicknames->Add( szrAddressesOuter3, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( szrNicknames, 1, wxEXPAND, 5 );
-       
-       lblAddress = new wxStaticText( tabGeneral, wxID_ANY, wxT("Addresses:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAddress->Wrap( -1 );
-       fgSizer5->Add( lblAddress, 0, wxALL, 5 );
-       
-       wxBoxSizer* szrAddresses;
-       szrAddresses = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboAddresses = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       szrAddresses->Add( lboAddresses, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrAddressesOuter;
-       szrAddressesOuter = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46;
-       bSizer46 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47;
-       bSizer47 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddGeneralAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47->Add( btnAddGeneralAddress, 0, wxALL, 5 );
-       
-       btnModifyGeneralAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47->Add( btnModifyGeneralAddress, 0, wxALL, 5 );
-       
-       btnDeleteGeneralAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47->Add( btnDeleteGeneralAddress, 0, wxALL, 5 );
-       
-       
-       bSizer46->Add( bSizer47, 1, wxEXPAND, 5 );
-       
-       
-       szrAddressesOuter->Add( bSizer46, 1, wxEXPAND, 5 );
-       
-       
-       szrAddresses->Add( szrAddressesOuter, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( szrAddresses, 1, wxEXPAND, 5 );
-       
-       lblEmail = new wxStaticText( tabGeneral, wxID_ANY, wxT("E-mail:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblEmail->Wrap( -1 );
-       fgSizer5->Add( lblEmail, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer301;
-       bSizer301 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboEmails = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer301->Add( lboEmails, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer351;
-       bSizer351 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer461;
-       bSizer461 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer471;
-       bSizer471 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddEmailAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471->Add( btnAddEmailAddress, 0, wxALL, 5 );
-       
-       btnModifyEmailAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471->Add( btnModifyEmailAddress, 0, wxALL, 5 );
-       
-       btnDeleteEmailAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471->Add( btnDeleteEmailAddress, 0, wxALL, 5 );
-       
-       
-       bSizer461->Add( bSizer471, 1, wxEXPAND, 5 );
-       
-       
-       bSizer351->Add( bSizer461, 1, wxEXPAND, 5 );
-       
-       
-       bSizer301->Add( bSizer351, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer301, 1, wxEXPAND, 5 );
-       
-       lblIM = new wxStaticText( tabGeneral, wxID_ANY, wxT("Instant Messaging:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblIM->Wrap( 0 );
-       fgSizer5->Add( lblIM, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3011;
-       bSizer3011 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboIM = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3011->Add( lboIM, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3511;
-       bSizer3511 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4611;
-       bSizer4611 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4711;
-       bSizer4711 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddIMAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711->Add( btnAddIMAddress, 0, wxALL, 5 );
-       
-       btnModifyIMAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711->Add( btnModifyIMAddress, 0, wxALL, 5 );
-       
-       btnDeleteIMAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711->Add( btnDeleteIMAddress, 0, wxALL, 5 );
-       
-       
-       bSizer4611->Add( bSizer4711, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3511->Add( bSizer4611, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3011->Add( bSizer3511, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer3011, 1, wxEXPAND, 5 );
-       
-       lblTelephone = new wxStaticText( tabGeneral, wxID_ANY, wxT("Telephone:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblTelephone->Wrap( 0 );
-       fgSizer5->Add( lblTelephone, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30111;
-       bSizer30111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboTelephone = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30111->Add( lboTelephone, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35111;
-       bSizer35111 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46111;
-       bSizer46111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47111;
-       bSizer47111 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddTelephone = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111->Add( btnAddTelephone, 0, wxALL, 5 );
-       
-       btnModifyTelephone = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111->Add( btnModifyTelephone, 0, wxALL, 5 );
-       
-       btnDeleteTelephone = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111->Add( btnDeleteTelephone, 0, wxALL, 5 );
-       
-       
-       bSizer46111->Add( bSizer47111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35111->Add( bSizer46111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30111->Add( bSizer35111, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer30111, 1, wxEXPAND, 5 );
-       
-       lblLanguages = new wxStaticText( tabGeneral, wxID_ANY, wxT("Languages:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLanguages->Wrap( 0 );
-       fgSizer5->Add( lblLanguages, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer301111;
-       bSizer301111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboLanguages = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer301111->Add( lboLanguages, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer351111;
-       bSizer351111 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer461111;
-       bSizer461111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer471111;
-       bSizer471111 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddLanguage = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111->Add( btnAddLanguage, 0, wxALL, 5 );
-       
-       btnModifyLanguage = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111->Add( btnModifyLanguage, 0, wxALL, 5 );
-       
-       btnDeleteLanguage = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111->Add( btnDeleteLanguage, 0, wxALL, 5 );
-       
-       
-       bSizer461111->Add( bSizer471111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer351111->Add( bSizer461111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer301111->Add( bSizer351111, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer301111, 1, wxEXPAND, 5 );
-       
-       lblTimezone = new wxStaticText( tabGeneral, wxID_ANY, wxT("Timezones:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblTimezone->Wrap( 0 );
-       fgSizer5->Add( lblTimezone, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3011111;
-       bSizer3011111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboTimezones = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3011111->Add( lboTimezones, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3511111;
-       bSizer3511111 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4611111;
-       bSizer4611111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4711111;
-       bSizer4711111 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddTimezone = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111->Add( btnAddTimezone, 0, wxALL, 5 );
-       
-       btnModifyTimezone = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111->Add( btnModifyTimezone, 0, wxALL, 5 );
-       
-       btnDeleteTimezone = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111->Add( btnDeleteTimezone, 0, wxALL, 5 );
-       
-       
-       bSizer4611111->Add( bSizer4711111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3511111->Add( bSizer4611111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3011111->Add( bSizer3511111, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer3011111, 1, wxEXPAND, 5 );
-       
-       lblGeopositioning = new wxStaticText( tabGeneral, wxID_ANY, wxT("Geopositioning:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblGeopositioning->Wrap( -1 );
-       fgSizer5->Add( lblGeopositioning, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30111114;
-       bSizer30111114 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboGeoposition = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30111114->Add( lboGeoposition, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35111114;
-       bSizer35111114 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46111114;
-       bSizer46111114 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47111114;
-       bSizer47111114 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddGeneralGeoposition = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111114->Add( btnAddGeneralGeoposition, 0, wxALL, 5 );
-       
-       btnModifyGeneralGeoposition = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111114->Add( btnModifyGeneralGeoposition, 0, wxALL, 5 );
-       
-       btnDeleteGeneralGeoposition = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111114->Add( btnDeleteGeneralGeoposition, 0, wxALL, 5 );
-       
-       
-       bSizer46111114->Add( bSizer47111114, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35111114->Add( bSizer46111114, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30111114->Add( bSizer35111114, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer30111114, 1, wxEXPAND, 5 );
-       
-       lblRelated = new wxStaticText( tabGeneral, wxID_ANY, wxT("Related people:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblRelated->Wrap( 1 );
-       fgSizer5->Add( lblRelated, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30111111;
-       bSizer30111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboRelated = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30111111->Add( lboRelated, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35111111;
-       bSizer35111111 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46111111;
-       bSizer46111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47111111;
-       bSizer47111111 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddRelated = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111->Add( btnAddRelated, 0, wxALL, 5 );
-       
-       btnModifyRelated = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111->Add( btnModifyRelated, 0, wxALL, 5 );
-       
-       btnDeleteRelated = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111->Add( btnDeleteRelated, 0, wxALL, 5 );
-       
-       
-       bSizer46111111->Add( bSizer47111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35111111->Add( bSizer46111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30111111->Add( bSizer35111111, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer30111111, 1, wxEXPAND, 5 );
-       
-       lblWebsites = new wxStaticText( tabGeneral, wxID_ANY, wxT("Websites:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblWebsites->Wrap( 1 );
-       fgSizer5->Add( lblWebsites, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer301111111;
-       bSizer301111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboWebsites = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer301111111->Add( lboWebsites, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer351111111;
-       bSizer351111111 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer461111111;
-       bSizer461111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer471111111;
-       bSizer471111111 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddWebsite = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111->Add( btnAddWebsite, 0, wxALL, 5 );
-       
-       btnModifyWebsite = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111->Add( btnModifyWebsite, 0, wxALL, 5 );
-       
-       btnDeleteWebsite = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111->Add( btnDeleteWebsite, 0, wxALL, 5 );
-       
-       
-       bSizer461111111->Add( bSizer471111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer351111111->Add( bSizer461111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer301111111->Add( bSizer351111111, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer301111111, 1, wxEXPAND, 5 );
-       
-       lblTitles = new wxStaticText( tabGeneral, wxID_ANY, wxT("Titles:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblTitles->Wrap( 1 );
-       fgSizer5->Add( lblTitles, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3011111111;
-       bSizer3011111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboTitles = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3011111111->Add( lboTitles, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3511111111;
-       bSizer3511111111 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4611111111;
-       bSizer4611111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4711111111;
-       bSizer4711111111 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddTitle = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111->Add( btnAddTitle, 0, wxALL, 5 );
-       
-       btnModifyTitle = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111->Add( btnModifyTitle, 0, wxALL, 5 );
-       
-       btnDeleteTitle = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111->Add( btnDeleteTitle, 0, wxALL, 5 );
-       
-       
-       bSizer4611111111->Add( bSizer4711111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3511111111->Add( bSizer4611111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3011111111->Add( bSizer3511111111, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer3011111111, 1, wxEXPAND, 5 );
-       
-       lblRoles = new wxStaticText( tabGeneral, wxID_ANY, wxT("Roles:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblRoles->Wrap( 1 );
-       fgSizer5->Add( lblRoles, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30111111111;
-       bSizer30111111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboRoles = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30111111111->Add( lboRoles, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35111111111;
-       bSizer35111111111 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46111111111;
-       bSizer46111111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47111111111;
-       bSizer47111111111 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddRole = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111111->Add( btnAddRole, 0, wxALL, 5 );
-       
-       btnModifyRole = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111111->Add( btnModifyRole, 0, wxALL, 5 );
-       
-       btnDeleteRole = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111111->Add( btnDeleteRole, 0, wxALL, 5 );
-       
-       
-       bSizer46111111111->Add( bSizer47111111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35111111111->Add( bSizer46111111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30111111111->Add( bSizer35111111111, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer30111111111, 1, wxEXPAND, 5 );
-       
-       lblOrganisations = new wxStaticText( tabGeneral, wxID_ANY, wxT("Organisations:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblOrganisations->Wrap( 1 );
-       fgSizer5->Add( lblOrganisations, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer301111111111;
-       bSizer301111111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboOrganisations = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer301111111111->Add( lboOrganisations, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer351111111111;
-       bSizer351111111111 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer461111111111;
-       bSizer461111111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer471111111111;
-       bSizer471111111111 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddOrganisations = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111111->Add( btnAddOrganisations, 0, wxALL, 5 );
-       
-       btnModifyOrganisations = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111111->Add( btnModifyOrganisations, 0, wxALL, 5 );
-       
-       btnDeleteOrganisations = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111111->Add( btnDeleteOrganisations, 0, wxALL, 5 );
-       
-       
-       bSizer461111111111->Add( bSizer471111111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer351111111111->Add( bSizer461111111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer301111111111->Add( bSizer351111111111, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer301111111111, 1, wxEXPAND, 5 );
-       
-       lblNotes = new wxStaticText( tabGeneral, wxID_ANY, wxT("Notes:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblNotes->Wrap( 1 );
-       fgSizer5->Add( lblNotes, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3011111111111;
-       bSizer3011111111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboNotes = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3011111111111->Add( lboNotes, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3511111111111;
-       bSizer3511111111111 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4611111111111;
-       bSizer4611111111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4711111111111;
-       bSizer4711111111111 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddNote = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111111->Add( btnAddNote, 0, wxALL, 5 );
-       
-       btnModifyNote = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111111->Add( btnModifyNote, 0, wxALL, 5 );
-       
-       btnDeleteNote = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111111->Add( btnDeleteNote, 0, wxALL, 5 );
-       
-       
-       bSizer4611111111111->Add( bSizer4711111111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3511111111111->Add( bSizer4611111111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3011111111111->Add( bSizer3511111111111, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5->Add( bSizer3011111111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer18->Add( fgSizer5, 0, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( bSizer18 );
-       tabGeneral->Layout();
-       bSizer18->Fit( tabGeneral );
-       nbkContact->AddPage( tabGeneral, wxT("General"), false );
-       tabHome = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabHome->SetScrollRate( 5, 5 );
-       wxBoxSizer* bSizer181;
-       bSizer181 = new wxBoxSizer( wxVERTICAL );
-       
-       wxGridSizer* gSizer71;
-       gSizer71 = new wxGridSizer( 2, 6, 0, 0 );
-       
-       
-       bSizer181->Add( gSizer71, 0, wxEXPAND, 5 );
-       
-       wxFlexGridSizer* fgSizer51;
-       fgSizer51 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer51->AddGrowableCol( 1 );
-       fgSizer51->SetFlexibleDirection( wxBOTH );
-       fgSizer51->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblHomeNickname = new wxStaticText( tabHome, wxID_ANY, wxT("Home Nicknames:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeNickname->Wrap( 0 );
-       fgSizer51->Add( lblHomeNickname, 0, wxALL, 5 );
-       
-       wxBoxSizer* szrAddresses12;
-       szrAddresses12 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeNicknames = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       szrAddresses12->Add( lboHomeNicknames, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrAddressesOuter11;
-       szrAddressesOuter11 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4622;
-       bSizer4622 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4722;
-       bSizer4722 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeNickname = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4722->Add( btnAddHomeNickname, 0, wxALL, 5 );
-       
-       btnModifyHomeNickname = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4722->Add( btnModifyHomeNickname, 0, wxALL, 5 );
-       
-       btnDeleteHomeNickname = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4722->Add( btnDeleteHomeNickname, 0, wxALL, 5 );
-       
-       
-       bSizer4622->Add( bSizer4722, 1, wxEXPAND, 5 );
-       
-       
-       szrAddressesOuter11->Add( bSizer4622, 1, wxEXPAND, 5 );
-       
-       
-       szrAddresses12->Add( szrAddressesOuter11, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( szrAddresses12, 1, wxEXPAND, 5 );
-       
-       lblHomeAddresses = new wxStaticText( tabHome, wxID_ANY, wxT("Home Addresses:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeAddresses->Wrap( 1 );
-       fgSizer51->Add( lblHomeAddresses, 0, wxALL, 5 );
-       
-       wxBoxSizer* szrAddresses1;
-       szrAddresses1 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeAddresses = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       szrAddresses1->Add( lboHomeAddresses, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrAddressesOuter1;
-       szrAddressesOuter1 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer462;
-       bSizer462 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer472;
-       bSizer472 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeAddress = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer472->Add( btnAddHomeAddress, 0, wxALL, 5 );
-       
-       btnModifyHomeAddress = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer472->Add( btnModifyHomeAddress, 0, wxALL, 5 );
-       
-       btnDeleteHomeAddress = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer472->Add( btnDeleteHomeAddress, 0, wxALL, 5 );
-       
-       
-       bSizer462->Add( bSizer472, 1, wxEXPAND, 5 );
-       
-       
-       szrAddressesOuter1->Add( bSizer462, 1, wxEXPAND, 5 );
-       
-       
-       szrAddresses1->Add( szrAddressesOuter1, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( szrAddresses1, 1, wxEXPAND, 5 );
-       
-       lblHomeEmail = new wxStaticText( tabHome, wxID_ANY, wxT("Home Emails:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeEmail->Wrap( 1 );
-       fgSizer51->Add( lblHomeEmail, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3012;
-       bSizer3012 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeEmails = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3012->Add( lboHomeEmails, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3512;
-       bSizer3512 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4612;
-       bSizer4612 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4712;
-       bSizer4712 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeEmailAddress = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4712->Add( btnAddHomeEmailAddress, 0, wxALL, 5 );
-       
-       btnModifyHomeEmailAddress = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4712->Add( btnModifyHomeEmailAddress, 0, wxALL, 5 );
-       
-       btnDeleteHomeEmailAddress = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4712->Add( btnDeleteHomeEmailAddress, 0, wxALL, 5 );
-       
-       
-       bSizer4612->Add( bSizer4712, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3512->Add( bSizer4612, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3012->Add( bSizer3512, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( bSizer3012, 1, wxEXPAND, 5 );
-       
-       lblHomeIM = new wxStaticText( tabHome, wxID_ANY, wxT("Home Instant Messaging:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeIM->Wrap( 0 );
-       fgSizer51->Add( lblHomeIM, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30112;
-       bSizer30112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeIM = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30112->Add( lboHomeIM, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35112;
-       bSizer35112 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46112;
-       bSizer46112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47112;
-       bSizer47112 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeIMAddress = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47112->Add( btnAddHomeIMAddress, 0, wxALL, 5 );
-       
-       btnModifyHomeIMAddress = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47112->Add( btnModifyHomeIMAddress, 0, wxALL, 5 );
-       
-       btnDeleteHomeIMAddress = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47112->Add( btnDeleteHomeIMAddress, 0, wxALL, 5 );
-       
-       
-       bSizer46112->Add( bSizer47112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35112->Add( bSizer46112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30112->Add( bSizer35112, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( bSizer30112, 1, wxEXPAND, 5 );
-       
-       lblHomeTelephone = new wxStaticText( tabHome, wxID_ANY, wxT("Home Telephone:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeTelephone->Wrap( 0 );
-       fgSizer51->Add( lblHomeTelephone, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer301112;
-       bSizer301112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeTelephone = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer301112->Add( lboHomeTelephone, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer351112;
-       bSizer351112 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer461112;
-       bSizer461112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer471112;
-       bSizer471112 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeTelephone = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471112->Add( btnAddHomeTelephone, 0, wxALL, 5 );
-       
-       btnModifyHomeTelephone = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471112->Add( btnModifyHomeTelephone, 0, wxALL, 5 );
-       
-       btnDeleteHomeTelephone = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471112->Add( btnDeleteHomeTelephone, 0, wxALL, 5 );
-       
-       
-       bSizer461112->Add( bSizer471112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer351112->Add( bSizer461112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer301112->Add( bSizer351112, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( bSizer301112, 1, wxEXPAND, 5 );
-       
-       lblHomeLanguages = new wxStaticText( tabHome, wxID_ANY, wxT("Home Languages:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeLanguages->Wrap( 0 );
-       fgSizer51->Add( lblHomeLanguages, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3011112;
-       bSizer3011112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeLanguages = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3011112->Add( lboHomeLanguages, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3511112;
-       bSizer3511112 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4611112;
-       bSizer4611112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4711112;
-       bSizer4711112 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeLanguage = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711112->Add( btnAddHomeLanguage, 0, wxALL, 5 );
-       
-       btnModifyHomeLanguage = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711112->Add( btnModifyHomeLanguage, 0, wxALL, 5 );
-       
-       btnDeleteHomeLanguage = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711112->Add( btnDeleteHomeLanguage, 0, wxALL, 5 );
-       
-       
-       bSizer4611112->Add( bSizer4711112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3511112->Add( bSizer4611112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3011112->Add( bSizer3511112, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( bSizer3011112, 1, wxEXPAND, 5 );
-       
-       lblHomeTimezone = new wxStaticText( tabHome, wxID_ANY, wxT("Home Timezones:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeTimezone->Wrap( 0 );
-       fgSizer51->Add( lblHomeTimezone, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30111112;
-       bSizer30111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeTimezones = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30111112->Add( lboHomeTimezones, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35111112;
-       bSizer35111112 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46111112;
-       bSizer46111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47111112;
-       bSizer47111112 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeTimezone = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111112->Add( btnAddHomeTimezone, 0, wxALL, 5 );
-       
-       btnModifyHomeTimezone = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111112->Add( btnModifyHomeTimezone, 0, wxALL, 5 );
-       
-       btnDeleteHomeTimezone = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111112->Add( btnDeleteHomeTimezone, 0, wxALL, 5 );
-       
-       
-       bSizer46111112->Add( bSizer47111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35111112->Add( bSizer46111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30111112->Add( bSizer35111112, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( bSizer30111112, 1, wxEXPAND, 5 );
-       
-       lblHomeGeopositioning = new wxStaticText( tabHome, wxID_ANY, wxT("Home Geopositioning:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeGeopositioning->Wrap( 0 );
-       fgSizer51->Add( lblHomeGeopositioning, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer301111141;
-       bSizer301111141 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeGeoposition = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer301111141->Add( lboHomeGeoposition, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer351111141;
-       bSizer351111141 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer461111141;
-       bSizer461111141 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer471111141;
-       bSizer471111141 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeGeoposition = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111141->Add( btnAddHomeGeoposition, 0, wxALL, 5 );
-       
-       btnModifyHomeGeoposition = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111141->Add( btnModifyHomeGeoposition, 0, wxALL, 5 );
-       
-       btnDeleteHomePosition = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111141->Add( btnDeleteHomePosition, 0, wxALL, 5 );
-       
-       
-       bSizer461111141->Add( bSizer471111141, 1, wxEXPAND, 5 );
-       
-       
-       bSizer351111141->Add( bSizer461111141, 1, wxEXPAND, 5 );
-       
-       
-       bSizer301111141->Add( bSizer351111141, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( bSizer301111141, 1, wxEXPAND, 5 );
-       
-       lblHomeWebsites = new wxStaticText( tabHome, wxID_ANY, wxT("Home Websites:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeWebsites->Wrap( 1 );
-       fgSizer51->Add( lblHomeWebsites, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3011111112;
-       bSizer3011111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeWebsites = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3011111112->Add( lboHomeWebsites, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3511111112;
-       bSizer3511111112 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4611111112;
-       bSizer4611111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4711111112;
-       bSizer4711111112 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeWebsite = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111112->Add( btnAddHomeWebsite, 0, wxALL, 5 );
-       
-       btnHomeModifyWebsite = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111112->Add( btnHomeModifyWebsite, 0, wxALL, 5 );
-       
-       btnDeleteHomeWebsite = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111112->Add( btnDeleteHomeWebsite, 0, wxALL, 5 );
-       
-       
-       bSizer4611111112->Add( bSizer4711111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3511111112->Add( bSizer4611111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3011111112->Add( bSizer3511111112, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( bSizer3011111112, 1, wxEXPAND, 5 );
-       
-       lblHomeTitles = new wxStaticText( tabHome, wxID_ANY, wxT("Home Titles:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeTitles->Wrap( 1 );
-       fgSizer51->Add( lblHomeTitles, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30111111112;
-       bSizer30111111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeTitles = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30111111112->Add( lboHomeTitles, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35111111112;
-       bSizer35111111112 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46111111112;
-       bSizer46111111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47111111112;
-       bSizer47111111112 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeTitle = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111112->Add( btnAddHomeTitle, 0, wxALL, 5 );
-       
-       btnModifyHomeTitle = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111112->Add( btnModifyHomeTitle, 0, wxALL, 5 );
-       
-       btnDeleteHomeTitle = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111112->Add( btnDeleteHomeTitle, 0, wxALL, 5 );
-       
-       
-       bSizer46111111112->Add( bSizer47111111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35111111112->Add( bSizer46111111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30111111112->Add( bSizer35111111112, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( bSizer30111111112, 1, wxEXPAND, 5 );
-       
-       lblHomeRoles = new wxStaticText( tabHome, wxID_ANY, wxT("Home Roles:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeRoles->Wrap( 1 );
-       fgSizer51->Add( lblHomeRoles, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer301111111112;
-       bSizer301111111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeRoles = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer301111111112->Add( lboHomeRoles, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer351111111112;
-       bSizer351111111112 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer461111111112;
-       bSizer461111111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer471111111112;
-       bSizer471111111112 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeRole = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111112->Add( btnAddHomeRole, 0, wxALL, 5 );
-       
-       btnModifyHomeRole = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111112->Add( btnModifyHomeRole, 0, wxALL, 5 );
-       
-       btnDeleteHomeRole = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111112->Add( btnDeleteHomeRole, 0, wxALL, 5 );
-       
-       
-       bSizer461111111112->Add( bSizer471111111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer351111111112->Add( bSizer461111111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer301111111112->Add( bSizer351111111112, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( bSizer301111111112, 1, wxEXPAND, 5 );
-       
-       lblHomeOrganisations = new wxStaticText( tabHome, wxID_ANY, wxT("Home Organisations:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeOrganisations->Wrap( 1 );
-       fgSizer51->Add( lblHomeOrganisations, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3011111111112;
-       bSizer3011111111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeOrganisations = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3011111111112->Add( lboHomeOrganisations, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3511111111112;
-       bSizer3511111111112 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4611111111112;
-       bSizer4611111111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4711111111112;
-       bSizer4711111111112 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeOrganisations = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111112->Add( btnAddHomeOrganisations, 0, wxALL, 5 );
-       
-       btnModifyHomeOrganisations = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111112->Add( btnModifyHomeOrganisations, 0, wxALL, 5 );
-       
-       btnDeleteHomeOrganisations = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111112->Add( btnDeleteHomeOrganisations, 0, wxALL, 5 );
-       
-       
-       bSizer4611111111112->Add( bSizer4711111111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3511111111112->Add( bSizer4611111111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3011111111112->Add( bSizer3511111111112, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( bSizer3011111111112, 1, wxEXPAND, 5 );
-       
-       lblHomeNotes = new wxStaticText( tabHome, wxID_ANY, wxT("Home Notes:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHomeNotes->Wrap( 1 );
-       fgSizer51->Add( lblHomeNotes, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30111111111111;
-       bSizer30111111111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboHomeNotes = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30111111111111->Add( lboHomeNotes, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35111111111111;
-       bSizer35111111111111 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46111111111111;
-       bSizer46111111111111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47111111111111;
-       bSizer47111111111111 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddHomeNote = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111111111->Add( btnAddHomeNote, 0, wxALL, 5 );
-       
-       btnModifyHomeNote = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111111111->Add( btnModifyHomeNote, 0, wxALL, 5 );
-       
-       btnDeleteHomeNote = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111111111->Add( btnDeleteHomeNote, 0, wxALL, 5 );
-       
-       
-       bSizer46111111111111->Add( bSizer47111111111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35111111111111->Add( bSizer46111111111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30111111111111->Add( bSizer35111111111111, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer51->Add( bSizer30111111111111, 1, wxEXPAND, 5 );
-       
-       
-       bSizer181->Add( fgSizer51, 0, wxEXPAND, 5 );
-       
-       
-       tabHome->SetSizer( bSizer181 );
-       tabHome->Layout();
-       bSizer181->Fit( tabHome );
-       nbkContact->AddPage( tabHome, wxT("Home"), false );
-       tabBusiness = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabBusiness->SetScrollRate( 5, 5 );
-       wxBoxSizer* bSizer182;
-       bSizer182 = new wxBoxSizer( wxVERTICAL );
-       
-       wxGridSizer* gSizer72;
-       gSizer72 = new wxGridSizer( 2, 6, 0, 0 );
-       
-       
-       bSizer182->Add( gSizer72, 0, wxEXPAND, 5 );
-       
-       wxFlexGridSizer* fgSizer52;
-       fgSizer52 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer52->AddGrowableCol( 1 );
-       fgSizer52->SetFlexibleDirection( wxBOTH );
-       fgSizer52->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblBusinessNickname = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Nicknames:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessNickname->Wrap( 0 );
-       fgSizer52->Add( lblBusinessNickname, 0, wxALL, 5 );
-       
-       wxBoxSizer* szrAddresses22;
-       szrAddresses22 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessNicknames = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       szrAddresses22->Add( lboBusinessNicknames, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrAddressesOuter22;
-       szrAddressesOuter22 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4632;
-       bSizer4632 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4732;
-       bSizer4732 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddBusinessNickname = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4732->Add( btnAddBusinessNickname, 0, wxALL, 5 );
-       
-       btnModifyBusinessNickname = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4732->Add( btnModifyBusinessNickname, 0, wxALL, 5 );
-       
-       btnDeleteBusinessNickname = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4732->Add( btnDeleteBusinessNickname, 0, wxALL, 5 );
-       
-       
-       bSizer4632->Add( bSizer4732, 1, wxEXPAND, 5 );
-       
-       
-       szrAddressesOuter22->Add( bSizer4632, 1, wxEXPAND, 5 );
-       
-       
-       szrAddresses22->Add( szrAddressesOuter22, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( szrAddresses22, 1, wxEXPAND, 5 );
-       
-       lblBusinessAddress = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Addresses:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessAddress->Wrap( 0 );
-       fgSizer52->Add( lblBusinessAddress, 0, wxALL, 5 );
-       
-       wxBoxSizer* szrAddresses2;
-       szrAddresses2 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessAddresses = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       szrAddresses2->Add( lboBusinessAddresses, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrAddressesOuter2;
-       szrAddressesOuter2 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer463;
-       bSizer463 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer473;
-       bSizer473 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddBusinessAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer473->Add( btnAddBusinessAddress, 0, wxALL, 5 );
-       
-       btnModifyBusinessAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer473->Add( btnModifyBusinessAddress, 0, wxALL, 5 );
-       
-       btnDeleteBusinessAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer473->Add( btnDeleteBusinessAddress, 0, wxALL, 5 );
-       
-       
-       bSizer463->Add( bSizer473, 1, wxEXPAND, 5 );
-       
-       
-       szrAddressesOuter2->Add( bSizer463, 1, wxEXPAND, 5 );
-       
-       
-       szrAddresses2->Add( szrAddressesOuter2, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( szrAddresses2, 1, wxEXPAND, 5 );
-       
-       lblBusinessEmail = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business E-mail:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessEmail->Wrap( 0 );
-       fgSizer52->Add( lblBusinessEmail, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3013;
-       bSizer3013 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessEmail = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3013->Add( lboBusinessEmail, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3513;
-       bSizer3513 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4613;
-       bSizer4613 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4713;
-       bSizer4713 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddBusinessEmailAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4713->Add( btnAddBusinessEmailAddress, 0, wxALL, 5 );
-       
-       btnModifyBusinessEmailAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4713->Add( btnModifyBusinessEmailAddress, 0, wxALL, 5 );
-       
-       btnDeleteBusinessEmailAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4713->Add( btnDeleteBusinessEmailAddress, 0, wxALL, 5 );
-       
-       
-       bSizer4613->Add( bSizer4713, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3513->Add( bSizer4613, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3013->Add( bSizer3513, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( bSizer3013, 1, wxEXPAND, 5 );
-       
-       lblBusinessIM = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Instant Messaging:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessIM->Wrap( 0 );
-       fgSizer52->Add( lblBusinessIM, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30113;
-       bSizer30113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessIM = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30113->Add( lboBusinessIM, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35113;
-       bSizer35113 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46113;
-       bSizer46113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47113;
-       bSizer47113 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddBusinessIMAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47113->Add( btnAddBusinessIMAddress, 0, wxALL, 5 );
-       
-       btnModifyBusinessIMAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47113->Add( btnModifyBusinessIMAddress, 0, wxALL, 5 );
-       
-       btnDeleteBusinessIMAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47113->Add( btnDeleteBusinessIMAddress, 0, wxALL, 5 );
-       
-       
-       bSizer46113->Add( bSizer47113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35113->Add( bSizer46113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30113->Add( bSizer35113, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( bSizer30113, 1, wxEXPAND, 5 );
-       
-       lblBusinessTelephone = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Telephone:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessTelephone->Wrap( 0 );
-       fgSizer52->Add( lblBusinessTelephone, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer301113;
-       bSizer301113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessTelephone = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer301113->Add( lboBusinessTelephone, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer351113;
-       bSizer351113 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer461113;
-       bSizer461113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer471113;
-       bSizer471113 = new wxBoxSizer( wxVERTICAL );
-       
-       btnBusinessAddTelephone = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471113->Add( btnBusinessAddTelephone, 0, wxALL, 5 );
-       
-       btnBusinessModifyTelephone = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471113->Add( btnBusinessModifyTelephone, 0, wxALL, 5 );
-       
-       btnBusinessDeleteTelephone = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471113->Add( btnBusinessDeleteTelephone, 0, wxALL, 5 );
-       
-       
-       bSizer461113->Add( bSizer471113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer351113->Add( bSizer461113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer301113->Add( bSizer351113, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( bSizer301113, 1, wxEXPAND, 5 );
-       
-       lblBusinessLanguage = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Languages:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessLanguage->Wrap( 0 );
-       fgSizer52->Add( lblBusinessLanguage, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3011113;
-       bSizer3011113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessLanguages = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3011113->Add( lboBusinessLanguages, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3511113;
-       bSizer3511113 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4611113;
-       bSizer4611113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4711113;
-       bSizer4711113 = new wxBoxSizer( wxVERTICAL );
-       
-       btnBusinessAddLanguage = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711113->Add( btnBusinessAddLanguage, 0, wxALL, 5 );
-       
-       btnBusinessModifyLanguage = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711113->Add( btnBusinessModifyLanguage, 0, wxALL, 5 );
-       
-       btnBusinessDeleteLanguage = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711113->Add( btnBusinessDeleteLanguage, 0, wxALL, 5 );
-       
-       
-       bSizer4611113->Add( bSizer4711113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3511113->Add( bSizer4611113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3011113->Add( bSizer3511113, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( bSizer3011113, 1, wxEXPAND, 5 );
-       
-       lblBusinessTimezones = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Timezones:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessTimezones->Wrap( 0 );
-       fgSizer52->Add( lblBusinessTimezones, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30111113;
-       bSizer30111113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessTimezones = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30111113->Add( lboBusinessTimezones, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35111113;
-       bSizer35111113 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46111113;
-       bSizer46111113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47111113;
-       bSizer47111113 = new wxBoxSizer( wxVERTICAL );
-       
-       btnBusinessAddTimezone = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111113->Add( btnBusinessAddTimezone, 0, wxALL, 5 );
-       
-       btnBusinessModifyTimezone = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111113->Add( btnBusinessModifyTimezone, 0, wxALL, 5 );
-       
-       btnDeleteBusinessTimezone = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111113->Add( btnDeleteBusinessTimezone, 0, wxALL, 5 );
-       
-       
-       bSizer46111113->Add( bSizer47111113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35111113->Add( bSizer46111113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30111113->Add( bSizer35111113, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( bSizer30111113, 1, wxEXPAND, 5 );
-       
-       lblBusinessGeopositioning = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Geopositioning:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessGeopositioning->Wrap( 0 );
-       fgSizer52->Add( lblBusinessGeopositioning, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3011111411;
-       bSizer3011111411 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessGeoposition = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3011111411->Add( lboBusinessGeoposition, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3511111411;
-       bSizer3511111411 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4611111411;
-       bSizer4611111411 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4711111411;
-       bSizer4711111411 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddBusinessGeoposition = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111411->Add( btnAddBusinessGeoposition, 0, wxALL, 5 );
-       
-       btnModifyBusinessGeoposition = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111411->Add( btnModifyBusinessGeoposition, 0, wxALL, 5 );
-       
-       btnDeleteBusinessGeoposition = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111411->Add( btnDeleteBusinessGeoposition, 0, wxALL, 5 );
-       
-       
-       bSizer4611111411->Add( bSizer4711111411, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3511111411->Add( bSizer4611111411, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3011111411->Add( bSizer3511111411, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( bSizer3011111411, 1, wxEXPAND, 5 );
-       
-       lblBusinessWebsites = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Websites:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessWebsites->Wrap( 1 );
-       fgSizer52->Add( lblBusinessWebsites, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3011111113;
-       bSizer3011111113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessWebsites = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3011111113->Add( lboBusinessWebsites, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3511111113;
-       bSizer3511111113 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4611111113;
-       bSizer4611111113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4711111113;
-       bSizer4711111113 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddBusinessWebsite = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111113->Add( btnAddBusinessWebsite, 0, wxALL, 5 );
-       
-       btnModifyBusinessWebsite = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111113->Add( btnModifyBusinessWebsite, 0, wxALL, 5 );
-       
-       btnDeleteBusinessWebsite = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111113->Add( btnDeleteBusinessWebsite, 0, wxALL, 5 );
-       
-       
-       bSizer4611111113->Add( bSizer4711111113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3511111113->Add( bSizer4611111113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3011111113->Add( bSizer3511111113, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( bSizer3011111113, 1, wxEXPAND, 5 );
-       
-       lblBusinessTitles = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Titles:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessTitles->Wrap( 1 );
-       fgSizer52->Add( lblBusinessTitles, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30111111113;
-       bSizer30111111113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessTitles = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER );
-       bSizer30111111113->Add( lboBusinessTitles, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35111111113;
-       bSizer35111111113 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46111111113;
-       bSizer46111111113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47111111113;
-       bSizer47111111113 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddBusinessTitle = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111113->Add( btnAddBusinessTitle, 0, wxALL, 5 );
-       
-       btnModifyBusinessTitle = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111113->Add( btnModifyBusinessTitle, 0, wxALL, 5 );
-       
-       btnDeleteBusinessTitle = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111113->Add( btnDeleteBusinessTitle, 0, wxALL, 5 );
-       
-       
-       bSizer46111111113->Add( bSizer47111111113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35111111113->Add( bSizer46111111113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30111111113->Add( bSizer35111111113, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( bSizer30111111113, 1, wxEXPAND, 5 );
-       
-       lblBusinessRoles = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Roles:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessRoles->Wrap( 1 );
-       fgSizer52->Add( lblBusinessRoles, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer301111111113;
-       bSizer301111111113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessRoles = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer301111111113->Add( lboBusinessRoles, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer351111111113;
-       bSizer351111111113 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer461111111113;
-       bSizer461111111113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer471111111113;
-       bSizer471111111113 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddBusinessRole = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111113->Add( btnAddBusinessRole, 0, wxALL, 5 );
-       
-       btnModifyBusinessRole = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111113->Add( btnModifyBusinessRole, 0, wxALL, 5 );
-       
-       btnDeleteBusinessRole = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471111111113->Add( btnDeleteBusinessRole, 0, wxALL, 5 );
-       
-       
-       bSizer461111111113->Add( bSizer471111111113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer351111111113->Add( bSizer461111111113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer301111111113->Add( bSizer351111111113, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( bSizer301111111113, 1, wxEXPAND, 5 );
-       
-       lblBusinessOrganisations = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Organisations:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessOrganisations->Wrap( 1 );
-       fgSizer52->Add( lblBusinessOrganisations, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer3011111111113;
-       bSizer3011111111113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessOrganisations = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer3011111111113->Add( lboBusinessOrganisations, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer3511111111113;
-       bSizer3511111111113 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4611111111113;
-       bSizer4611111111113 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4711111111113;
-       bSizer4711111111113 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddBusinessOrganisations = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111113->Add( btnAddBusinessOrganisations, 0, wxALL, 5 );
-       
-       btnModifyBusinessOrganisations = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111113->Add( btnModifyBusinessOrganisations, 0, wxALL, 5 );
-       
-       btnDeleteBusinessOrganisations = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4711111111113->Add( btnDeleteBusinessOrganisations, 0, wxALL, 5 );
-       
-       
-       bSizer4611111111113->Add( bSizer4711111111113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3511111111113->Add( bSizer4611111111113, 1, wxEXPAND, 5 );
-       
-       
-       bSizer3011111111113->Add( bSizer3511111111113, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( bSizer3011111111113, 1, wxEXPAND, 5 );
-       
-       lblBusinessNotes = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Notes:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblBusinessNotes->Wrap( 1 );
-       fgSizer52->Add( lblBusinessNotes, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30111111111112;
-       bSizer30111111111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboBusinessNotes = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30111111111112->Add( lboBusinessNotes, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35111111111112;
-       bSizer35111111111112 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46111111111112;
-       bSizer46111111111112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47111111111112;
-       bSizer47111111111112 = new wxBoxSizer( wxVERTICAL );
-       
-       btnBusinessAddNote = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111111112->Add( btnBusinessAddNote, 0, wxALL, 5 );
-       
-       btnBusinessModifyNote = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111111112->Add( btnBusinessModifyNote, 0, wxALL, 5 );
-       
-       btnBusinessDeleteNote = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47111111111112->Add( btnBusinessDeleteNote, 0, wxALL, 5 );
-       
-       
-       bSizer46111111111112->Add( bSizer47111111111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35111111111112->Add( bSizer46111111111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30111111111112->Add( bSizer35111111111112, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer52->Add( bSizer30111111111112, 1, wxEXPAND, 5 );
-       
-       
-       bSizer182->Add( fgSizer52, 0, wxEXPAND, 5 );
-       
-       
-       tabBusiness->SetSizer( bSizer182 );
-       tabBusiness->Layout();
-       bSizer182->Fit( tabBusiness );
-       nbkContact->AddPage( tabBusiness, wxT("Business"), false );
-       tabCategories = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabCategories->SetScrollRate( 5, 5 );
-       wxBoxSizer* szrAddresses11;
-       szrAddresses11 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboCategories = new wxListCtrl( tabCategories, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       szrAddresses11->Add( lboCategories, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrCategoriesOuter;
-       szrCategoriesOuter = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4621;
-       bSizer4621 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4721;
-       bSizer4721 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddCategory = new wxButton( tabCategories, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4721->Add( btnAddCategory, 0, wxALL, 5 );
-       
-       btnModifyCategory = new wxButton( tabCategories, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4721->Add( btnModifyCategory, 0, wxALL, 5 );
-       
-       btnDeleteCategory = new wxButton( tabCategories, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4721->Add( btnDeleteCategory, 0, wxALL, 5 );
-       
-       
-       bSizer4621->Add( bSizer4721, 1, wxEXPAND, 5 );
-       
-       
-       szrCategoriesOuter->Add( bSizer4621, 1, wxEXPAND, 5 );
-       
-       
-       szrAddresses11->Add( szrCategoriesOuter, 0, wxEXPAND, 5 );
-       
-       
-       tabCategories->SetSizer( szrAddresses11 );
-       tabCategories->Layout();
-       szrAddresses11->Fit( tabCategories );
-       nbkContact->AddPage( tabCategories, wxT("Categories"), false );
-       tabMembers = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabMembers->SetScrollRate( 5, 5 );
-       wxBoxSizer* szrAddresses111;
-       szrAddresses111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboGroups = new wxListCtrl( tabMembers, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       szrAddresses111->Add( lboGroups, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrCategoriesOuter1;
-       szrCategoriesOuter1 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46211;
-       bSizer46211 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47211;
-       bSizer47211 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddGroups = new wxButton( tabMembers, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47211->Add( btnAddGroups, 0, wxALL, 5 );
-       
-       btnModifyGroups = new wxButton( tabMembers, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47211->Add( btnModifyGroups, 0, wxALL, 5 );
-       
-       btnDeleteGroups = new wxButton( tabMembers, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47211->Add( btnDeleteGroups, 0, wxALL, 5 );
-       
-       
-       bSizer46211->Add( bSizer47211, 1, wxEXPAND, 5 );
-       
-       
-       szrCategoriesOuter1->Add( bSizer46211, 1, wxEXPAND, 5 );
-       
-       
-       szrAddresses111->Add( szrCategoriesOuter1, 0, wxEXPAND, 5 );
-       
-       
-       tabMembers->SetSizer( szrAddresses111 );
-       tabMembers->Layout();
-       szrAddresses111->Fit( tabMembers );
-       nbkContact->AddPage( tabMembers, wxT("Members"), false );
-       tabPictures = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabPictures->SetScrollRate( 5, 5 );
-       wxBoxSizer* bSizer210;
-       bSizer210 = new wxBoxSizer( wxHORIZONTAL );
-       
-       imgPicture = new wxStaticBitmap( tabPictures, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER );
-       bSizer210->Add( imgPicture, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer211;
-       bSizer211 = new wxBoxSizer( wxVERTICAL );
-       
-       lboPictures = new wxListCtrl( tabPictures, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer211->Add( lboPictures, 0, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer212;
-       bSizer212 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer213;
-       bSizer213 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAddPicture = new wxButton( tabPictures, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer213->Add( btnAddPicture, 0, wxALL, 5 );
-       
-       btnModifyPicture = new wxButton( tabPictures, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer213->Add( btnModifyPicture, 0, wxALL, 5 );
-       
-       btnDeletePicture = new wxButton( tabPictures, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer213->Add( btnDeletePicture, 0, wxALL, 5 );
-       
-       
-       bSizer212->Add( bSizer213, 1, wxEXPAND, 5 );
-       
-       
-       bSizer211->Add( bSizer212, 0, wxEXPAND, 5 );
-       
-       
-       bSizer210->Add( bSizer211, 1, wxEXPAND, 5 );
-       
-       
-       tabPictures->SetSizer( bSizer210 );
-       tabPictures->Layout();
-       bSizer210->Fit( tabPictures );
-       nbkContact->AddPage( tabPictures, wxT("Pictures"), false );
-       tabLogo = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabLogo->SetScrollRate( 5, 5 );
-       wxBoxSizer* bSizer2101;
-       bSizer2101 = new wxBoxSizer( wxHORIZONTAL );
-       
-       imgLogo = new wxStaticBitmap( tabLogo, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER );
-       bSizer2101->Add( imgLogo, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer2111;
-       bSizer2111 = new wxBoxSizer( wxVERTICAL );
-       
-       lboLogos = new wxListCtrl( tabLogo, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer2111->Add( lboLogos, 0, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer2121;
-       bSizer2121 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer2131;
-       bSizer2131 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAddLogo = new wxButton( tabLogo, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer2131->Add( btnAddLogo, 0, wxALL, 5 );
-       
-       btnModifyLogo = new wxButton( tabLogo, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer2131->Add( btnModifyLogo, 0, wxALL, 5 );
-       
-       btnDeleteLogo = new wxButton( tabLogo, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer2131->Add( btnDeleteLogo, 0, wxALL, 5 );
-       
-       
-       bSizer2121->Add( bSizer2131, 1, wxEXPAND, 5 );
-       
-       
-       bSizer2111->Add( bSizer2121, 0, wxEXPAND, 5 );
-       
-       
-       bSizer2101->Add( bSizer2111, 1, wxEXPAND, 5 );
-       
-       
-       tabLogo->SetSizer( bSizer2101 );
-       tabLogo->Layout();
-       bSizer2101->Fit( tabLogo );
-       nbkContact->AddPage( tabLogo, wxT("Logos"), false );
-       tabSounds = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabSounds->SetScrollRate( 5, 5 );
-       wxBoxSizer* szrAddresses1111;
-       szrAddresses1111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboSounds = new wxListCtrl( tabSounds, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       szrAddresses1111->Add( lboSounds, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrCategoriesOuter11;
-       szrCategoriesOuter11 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer462111;
-       bSizer462111 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer472111;
-       bSizer472111 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddSound = new wxButton( tabSounds, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer472111->Add( btnAddSound, 0, wxALL, 5 );
-       
-       btnModifySound = new wxButton( tabSounds, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer472111->Add( btnModifySound, 0, wxALL, 5 );
-       
-       btnDeleteSound = new wxButton( tabSounds, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer472111->Add( btnDeleteSound, 0, wxALL, 5 );
-       
-       m_staticline1 = new wxStaticLine( tabSounds, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
-       bSizer472111->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer348;
-       bSizer348 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnPlay = new wxBitmapButton( tabSounds, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
-       btnPlay->SetMinSize( wxSize( -1,32 ) );
-       
-       bSizer348->Add( btnPlay, 0, wxALL|wxEXPAND, 5 );
-       
-       btnStop = new wxBitmapButton( tabSounds, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
-       btnStop->SetMinSize( wxSize( -1,32 ) );
-       
-       bSizer348->Add( btnStop, 0, wxALL, 5 );
-       
-       
-       bSizer472111->Add( bSizer348, 0, wxALIGN_CENTER, 5 );
-       
-       
-       bSizer462111->Add( bSizer472111, 1, wxEXPAND, 5 );
-       
-       
-       szrCategoriesOuter11->Add( bSizer462111, 1, wxEXPAND, 5 );
-       
-       
-       szrAddresses1111->Add( szrCategoriesOuter11, 0, wxEXPAND, 5 );
-       
-       
-       tabSounds->SetSizer( szrAddresses1111 );
-       tabSounds->Layout();
-       szrAddresses1111->Fit( tabSounds );
-       nbkContact->AddPage( tabSounds, wxT("Sounds"), true );
-       tabCalendaring = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabCalendaring->SetScrollRate( 5, 5 );
-       wxBoxSizer* bSizer1821;
-       bSizer1821 = new wxBoxSizer( wxVERTICAL );
-       
-       wxFlexGridSizer* fgSizer521;
-       fgSizer521 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer521->AddGrowableCol( 1 );
-       fgSizer521->SetFlexibleDirection( wxBOTH );
-       fgSizer521->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblCalendarAddresses = new wxStaticText( tabCalendaring, wxID_ANY, wxT("Calendar Addresses:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblCalendarAddresses->Wrap( 0 );
-       fgSizer521->Add( lblCalendarAddresses, 0, wxALL, 5 );
-       
-       wxBoxSizer* szrAddresses21;
-       szrAddresses21 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboCalendarAddresses = new wxListCtrl( tabCalendaring, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       szrAddresses21->Add( lboCalendarAddresses, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrAddressesOuter21;
-       szrAddressesOuter21 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer4631;
-       bSizer4631 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer4731;
-       bSizer4731 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddCalendarAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4731->Add( btnAddCalendarAddress, 0, wxALL, 5 );
-       
-       btnModifyCalendarAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4731->Add( btnModifyCalendarAddress, 0, wxALL, 5 );
-       
-       btnDeleteCalendarAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer4731->Add( btnDeleteCalendarAddress, 0, wxALL, 5 );
-       
-       
-       bSizer4631->Add( bSizer4731, 1, wxEXPAND, 5 );
-       
-       
-       szrAddressesOuter21->Add( bSizer4631, 1, wxEXPAND, 5 );
-       
-       
-       szrAddresses21->Add( szrAddressesOuter21, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer521->Add( szrAddresses21, 1, wxEXPAND, 5 );
-       
-       lblCalendarRequestAddresses = new wxStaticText( tabCalendaring, wxID_ANY, wxT("Calendar Request Address:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblCalendarRequestAddresses->Wrap( 0 );
-       fgSizer521->Add( lblCalendarRequestAddresses, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer30131;
-       bSizer30131 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboCalendarRequestAddress = new wxListCtrl( tabCalendaring, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer30131->Add( lboCalendarRequestAddress, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer35131;
-       bSizer35131 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46131;
-       bSizer46131 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47131;
-       bSizer47131 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddCalendarRequestAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47131->Add( btnAddCalendarRequestAddress, 0, wxALL, 5 );
-       
-       btnModifyCalendarRequestAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47131->Add( btnModifyCalendarRequestAddress, 0, wxALL, 5 );
-       
-       btnDeleteCalendarRequestAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47131->Add( btnDeleteCalendarRequestAddress, 0, wxALL, 5 );
-       
-       
-       bSizer46131->Add( bSizer47131, 1, wxEXPAND, 5 );
-       
-       
-       bSizer35131->Add( bSizer46131, 1, wxEXPAND, 5 );
-       
-       
-       bSizer30131->Add( bSizer35131, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer521->Add( bSizer30131, 1, wxEXPAND, 5 );
-       
-       lblFreeBusyAddresses = new wxStaticText( tabCalendaring, wxID_ANY, wxT("Free/Busy Addresses:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblFreeBusyAddresses->Wrap( 0 );
-       fgSizer521->Add( lblFreeBusyAddresses, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer301131;
-       bSizer301131 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboFreeBusyAddresses = new wxListCtrl( tabCalendaring, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer301131->Add( lboFreeBusyAddresses, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer351131;
-       bSizer351131 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer461131;
-       bSizer461131 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer471131;
-       bSizer471131 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddFreeBusyAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471131->Add( btnAddFreeBusyAddress, 0, wxALL, 5 );
-       
-       btnModifyFreeBusyAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471131->Add( btnModifyFreeBusyAddress, 0, wxALL, 5 );
-       
-       btnDeleteFreeBusyAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471131->Add( btnDeleteFreeBusyAddress, 0, wxALL, 5 );
-       
-       
-       bSizer461131->Add( bSizer471131, 1, wxEXPAND, 5 );
-       
-       
-       bSizer351131->Add( bSizer461131, 1, wxEXPAND, 5 );
-       
-       
-       bSizer301131->Add( bSizer351131, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer521->Add( bSizer301131, 1, wxEXPAND, 5 );
-       
-       
-       bSizer1821->Add( fgSizer521, 0, wxEXPAND, 5 );
-       
-       
-       tabCalendaring->SetSizer( bSizer1821 );
-       tabCalendaring->Layout();
-       bSizer1821->Fit( tabCalendaring );
-       nbkContact->AddPage( tabCalendaring, wxT("Calendaring"), false );
-       tabSecurity = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabSecurity->SetScrollRate( 5, 5 );
-       wxBoxSizer* szrAddresses1112;
-       szrAddresses1112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboKeys = new wxListCtrl( tabSecurity, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       szrAddresses1112->Add( lboKeys, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrCategoriesOuter12;
-       szrCategoriesOuter12 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer462112;
-       bSizer462112 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer472112;
-       bSizer472112 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddKey = new wxButton( tabSecurity, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer472112->Add( btnAddKey, 0, wxALL, 5 );
-       
-       btnModifyKey = new wxButton( tabSecurity, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer472112->Add( btnModifyKey, 0, wxALL, 5 );
-       
-       btnDeleteKey = new wxButton( tabSecurity, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer472112->Add( btnDeleteKey, 0, wxALL, 5 );
-       
-       
-       bSizer462112->Add( bSizer472112, 1, wxEXPAND, 5 );
-       
-       
-       szrCategoriesOuter12->Add( bSizer462112, 1, wxEXPAND, 5 );
-       
-       
-       szrAddresses1112->Add( szrCategoriesOuter12, 0, wxEXPAND, 5 );
-       
-       
-       tabSecurity->SetSizer( szrAddresses1112 );
-       tabSecurity->Layout();
-       szrAddresses1112->Fit( tabSecurity );
-       nbkContact->AddPage( tabSecurity, wxT("Security"), false );
-       tabOther = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
-       tabOther->SetScrollRate( 5, 5 );
-       wxFlexGridSizer* fgSizer5211;
-       fgSizer5211 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer5211->AddGrowableCol( 1 );
-       fgSizer5211->SetFlexibleDirection( wxBOTH );
-       fgSizer5211->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblVendorNamespace = new wxStaticText( tabOther, wxID_ANY, wxT("Vendor Namespace:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblVendorNamespace->Wrap( 0 );
-       fgSizer5211->Add( lblVendorNamespace, 0, wxALL, 5 );
-       
-       wxBoxSizer* szrAddresses211;
-       szrAddresses211 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboVendorNamespace = new wxListCtrl( tabOther, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER );
-       szrAddresses211->Add( lboVendorNamespace, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* szrAddressesOuter211;
-       szrAddressesOuter211 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer46311;
-       bSizer46311 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer47311;
-       bSizer47311 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddVendorNamespace = new wxButton( tabOther, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47311->Add( btnAddVendorNamespace, 0, wxALL, 5 );
-       
-       btnModifyVendorNamespace = new wxButton( tabOther, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47311->Add( btnModifyVendorNamespace, 0, wxALL, 5 );
-       
-       btnDeleteVendorNamespace = new wxButton( tabOther, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer47311->Add( btnDeleteVendorNamespace, 0, wxALL, 5 );
-       
-       
-       bSizer46311->Add( bSizer47311, 1, wxEXPAND, 5 );
-       
-       
-       szrAddressesOuter211->Add( bSizer46311, 1, wxEXPAND, 5 );
-       
-       
-       szrAddresses211->Add( szrAddressesOuter211, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5211->Add( szrAddresses211, 1, wxEXPAND, 5 );
-       
-       lblXTokens = new wxStaticText( tabOther, wxID_ANY, wxT("X-Tokens:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblXTokens->Wrap( 0 );
-       fgSizer5211->Add( lblXTokens, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer301311;
-       bSizer301311 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lboXToken = new wxListCtrl( tabOther, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer301311->Add( lboXToken, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer351311;
-       bSizer351311 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer461311;
-       bSizer461311 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer471311;
-       bSizer471311 = new wxBoxSizer( wxVERTICAL );
-       
-       btnAddXToken = new wxButton( tabOther, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471311->Add( btnAddXToken, 0, wxALL, 5 );
-       
-       btnModifyXToken = new wxButton( tabOther, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471311->Add( btnModifyXToken, 0, wxALL, 5 );
-       
-       btnDeleteXToken = new wxButton( tabOther, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer471311->Add( btnDeleteXToken, 0, wxALL, 5 );
-       
-       
-       bSizer461311->Add( bSizer471311, 1, wxEXPAND, 5 );
-       
-       
-       bSizer351311->Add( bSizer461311, 1, wxEXPAND, 5 );
-       
-       
-       bSizer301311->Add( bSizer351311, 0, wxEXPAND, 5 );
-       
-       
-       fgSizer5211->Add( bSizer301311, 1, wxEXPAND, 5 );
-       
-       
-       tabOther->SetSizer( fgSizer5211 );
-       tabOther->Layout();
-       fgSizer5211->Fit( tabOther );
-       nbkContact->AddPage( tabOther, wxT("Other"), false );
-       
-       bSizer17->Add( nbkContact, 1, wxEXPAND | wxALL, 5 );
-       
-       
-       this->SetSizer( bSizer17 );
-       this->Layout();
-       m_menubar3 = new wxMenuBar( 0 );
-       mnuContact = new wxMenu();
-       wxMenuItem* mnuContactSave;
-       mnuContactSave = new wxMenuItem( mnuContact, CONTACT_SAVE, wxString( wxT("Save") ) + wxT('\t') + wxT("Ctrl+S"), wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( mnuContactSave );
-       
-       wxMenuItem* mnuContactSaveClose;
-       mnuContactSaveClose = new wxMenuItem( mnuContact, CONTACT_SAVECLOSE, wxString( wxT("&Save and Close Contact") ) + wxT('\t') + wxT("Ctrl+Shift+S"), wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( mnuContactSaveClose );
-       
-       mnuContact->AppendSeparator();
-       
-       wxMenuItem* mnuContactClose;
-       mnuContactClose = new wxMenuItem( mnuContact, CONTACT_CLOSE, wxString( wxT("Close") ) , wxEmptyString, wxITEM_NORMAL );
-       mnuContact->Append( mnuContactClose );
-       
-       m_menubar3->Append( mnuContact, wxT("&Contact") ); 
-       
-       mnuEdit = new wxMenu();
-       wxMenuItem* mnuEditCut;
-       mnuEditCut = new wxMenuItem( mnuEdit, wxID_CUT, wxString( wxT("Cu&t") ) + wxT('\t') + wxT("Ctrl+X"), wxEmptyString, wxITEM_NORMAL );
-       mnuEdit->Append( mnuEditCut );
-       
-       wxMenuItem* mnuEditCopy;
-       mnuEditCopy = new wxMenuItem( mnuEdit, wxID_COPY, wxString( wxT("&Copy") ) + wxT('\t') + wxT("Ctrl+C"), wxEmptyString, wxITEM_NORMAL );
-       mnuEdit->Append( mnuEditCopy );
-       
-       wxMenuItem* mnuEditPaste;
-       mnuEditPaste = new wxMenuItem( mnuEdit, wxID_PASTE, wxString( wxT("&Paste") ) + wxT('\t') + wxT("Ctrl+V"), wxEmptyString, wxITEM_NORMAL );
-       mnuEdit->Append( mnuEditPaste );
-       
-       m_menubar3->Append( mnuEdit, wxT("&Edit") ); 
-       
-       this->SetMenuBar( m_menubar3 );
-       
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmContactEditorADT::CloseWindow ) );
-       txtTitle->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
-       txtForename->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
-       txtSurname->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
-       txtOtherNames->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
-       txtSuffix->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
-       cmbDisplayAs->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorADT::UpdateName ), NULL, this );
-       cmbDisplayAs->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateName ), NULL, this );
-       cmbType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmContactEditorADT::UpdateMembersTab ), NULL, this );
-       btnAddGeneralNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralNickname ), NULL, this );
-       btnModifyGeneralNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralNickname ), NULL, this );
-       btnDeleteGeneralNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralNickname ), NULL, this );
-       btnAddGeneralAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralAddress ), NULL, this );
-       btnModifyGeneralAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralAddress ), NULL, this );
-       btnDeleteGeneralAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralAddress ), NULL, this );
-       btnAddEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralEmail ), NULL, this );
-       btnModifyEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralEmail ), NULL, this );
-       btnDeleteEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralEmail ), NULL, this );
-       btnAddIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralIM ), NULL, this );
-       btnModifyIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralIM ), NULL, this );
-       btnDeleteIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralIM ), NULL, this );
-       btnAddTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTelephone ), NULL, this );
-       btnModifyTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTelephone ), NULL, this );
-       btnDeleteTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTelephone ), NULL, this );
-       btnAddLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralLanguages ), NULL, this );
-       btnModifyLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralLanguages ), NULL, this );
-       btnDeleteLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralLanguage ), NULL, this );
-       btnAddTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTimezone ), NULL, this );
-       btnModifyTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTimezone ), NULL, this );
-       btnDeleteTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTimezone ), NULL, this );
-       btnAddGeneralGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralGeoposition ), NULL, this );
-       btnModifyGeneralGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralGeoposition ), NULL, this );
-       btnDeleteGeneralGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralGeoposition ), NULL, this );
-       btnAddRelated->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralRelated ), NULL, this );
-       btnModifyRelated->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralRelated ), NULL, this );
-       btnDeleteRelated->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralRelated ), NULL, this );
-       btnAddWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralWebsite ), NULL, this );
-       btnModifyWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralWebsite ), NULL, this );
-       btnDeleteWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralWebsite ), NULL, this );
-       btnAddTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTitle ), NULL, this );
-       btnModifyTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTitle ), NULL, this );
-       btnDeleteTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTitle ), NULL, this );
-       btnAddRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralRole ), NULL, this );
-       btnModifyRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralRole ), NULL, this );
-       btnDeleteRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralRole ), NULL, this );
-       btnAddOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralOrganisation ), NULL, this );
-       btnModifyOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralOrganisation ), NULL, this );
-       btnDeleteOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralOrganisation ), NULL, this );
-       btnAddNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralNote ), NULL, this );
-       btnModifyNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralNote ), NULL, this );
-       btnDeleteNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralNote ), NULL, this );
-       btnAddHomeNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeNickname ), NULL, this );
-       btnModifyHomeNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeNickname ), NULL, this );
-       btnDeleteHomeNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeNickname ), NULL, this );
-       btnAddHomeAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeAddress ), NULL, this );
-       btnModifyHomeAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeAddress ), NULL, this );
-       btnDeleteHomeAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeAddress ), NULL, this );
-       btnAddHomeEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeEmail ), NULL, this );
-       btnModifyHomeEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeEmail ), NULL, this );
-       btnDeleteHomeEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeEmail ), NULL, this );
-       btnAddHomeIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeIM ), NULL, this );
-       btnModifyHomeIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeIM ), NULL, this );
-       btnDeleteHomeIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeIM ), NULL, this );
-       btnAddHomeTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTelephone ), NULL, this );
-       btnModifyHomeTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTelephone ), NULL, this );
-       btnDeleteHomeTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTelephone ), NULL, this );
-       btnAddHomeLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeLanguage ), NULL, this );
-       btnModifyHomeLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeLanguage ), NULL, this );
-       btnDeleteHomeLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeLanguage ), NULL, this );
-       btnAddHomeTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTimezone ), NULL, this );
-       btnModifyHomeTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTimezone ), NULL, this );
-       btnDeleteHomeTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTimezone ), NULL, this );
-       btnAddHomeGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeGeoposition ), NULL, this );
-       btnModifyHomeGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeGeoposition ), NULL, this );
-       btnDeleteHomePosition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeGeoposition ), NULL, this );
-       btnAddHomeWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeWebsite ), NULL, this );
-       btnHomeModifyWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeWebsite ), NULL, this );
-       btnDeleteHomeWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeWebsite ), NULL, this );
-       btnAddHomeTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTitle ), NULL, this );
-       btnModifyHomeTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTitle ), NULL, this );
-       btnDeleteHomeTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTitle ), NULL, this );
-       btnAddHomeRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeRole ), NULL, this );
-       btnModifyHomeRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeRole ), NULL, this );
-       btnDeleteHomeRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeRole ), NULL, this );
-       btnAddHomeOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeOrganisation ), NULL, this );
-       btnModifyHomeOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeOrganisation ), NULL, this );
-       btnDeleteHomeOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeOrganisation ), NULL, this );
-       btnAddHomeNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeNote ), NULL, this );
-       btnModifyHomeNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeNote ), NULL, this );
-       btnDeleteHomeNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeNote ), NULL, this );
-       btnAddBusinessNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessNickname ), NULL, this );
-       btnModifyBusinessNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessNickname ), NULL, this );
-       btnDeleteBusinessNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessNickname ), NULL, this );
-       btnAddBusinessAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessAddress ), NULL, this );
-       btnModifyBusinessAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessAddress ), NULL, this );
-       btnDeleteBusinessAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessAddress ), NULL, this );
-       btnAddBusinessEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessEmail ), NULL, this );
-       btnModifyBusinessEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessEmail ), NULL, this );
-       btnDeleteBusinessEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessEmail ), NULL, this );
-       btnAddBusinessIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessIM ), NULL, this );
-       btnModifyBusinessIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessIM ), NULL, this );
-       btnDeleteBusinessIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessIM ), NULL, this );
-       btnBusinessAddTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTelephone ), NULL, this );
-       btnBusinessModifyTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTelephone ), NULL, this );
-       btnBusinessDeleteTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTelephone ), NULL, this );
-       btnBusinessAddLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessLanguage ), NULL, this );
-       btnBusinessModifyLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessLanguage ), NULL, this );
-       btnBusinessDeleteLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessLanguage ), NULL, this );
-       btnBusinessAddTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTimezone ), NULL, this );
-       btnBusinessModifyTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTimezone ), NULL, this );
-       btnDeleteBusinessTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTimezone ), NULL, this );
-       btnAddBusinessGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessGeoposition ), NULL, this );
-       btnModifyBusinessGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessGeoposition ), NULL, this );
-       btnDeleteBusinessGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessGeoposition ), NULL, this );
-       btnAddBusinessWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessWebsite ), NULL, this );
-       btnModifyBusinessWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessWebsite ), NULL, this );
-       btnDeleteBusinessWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessWebsite ), NULL, this );
-       btnAddBusinessTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTitle ), NULL, this );
-       btnModifyBusinessTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTitle ), NULL, this );
-       btnDeleteBusinessTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTitle ), NULL, this );
-       btnAddBusinessRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessRole ), NULL, this );
-       btnModifyBusinessRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessRole ), NULL, this );
-       btnDeleteBusinessRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessRole ), NULL, this );
-       btnAddBusinessOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessOrganisation ), NULL, this );
-       btnModifyBusinessOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessOrganisation ), NULL, this );
-       btnDeleteBusinessOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessOrganisation ), NULL, this );
-       btnBusinessAddNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessNote ), NULL, this );
-       btnBusinessModifyNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessNote ), NULL, this );
-       btnBusinessDeleteNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessNote ), NULL, this );
-       btnAddCategory->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCategory ), NULL, this );
-       btnModifyCategory->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCategory ), NULL, this );
-       btnDeleteCategory->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCategory ), NULL, this );
-       btnAddGroups->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGroup ), NULL, this );
-       btnModifyGroups->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGroup ), NULL, this );
-       btnDeleteGroups->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGroup ), NULL, this );
-       lboPictures->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmContactEditorADT::LoadPicture ), NULL, this );
-       btnAddPicture->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddPicture ), NULL, this );
-       btnModifyPicture->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyPicture ), NULL, this );
-       btnDeletePicture->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeletePicture ), NULL, this );
-       lboLogos->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmContactEditorADT::LoadLogo ), NULL, this );
-       btnAddLogo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddLogo ), NULL, this );
-       btnModifyLogo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyLogo ), NULL, this );
-       btnDeleteLogo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteLogo ), NULL, this );
-       btnAddSound->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddSound ), NULL, this );
-       btnModifySound->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifySound ), NULL, this );
-       btnDeleteSound->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteSound ), NULL, this );
-       btnPlay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::PlaySound ), NULL, this );
-       btnStop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::StopSound ), NULL, this );
-       btnAddCalendarAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCalendarAddress ), NULL, this );
-       btnModifyCalendarAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCalendarAddress ), NULL, this );
-       btnDeleteCalendarAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCalendarAddress ), NULL, this );
-       btnAddCalendarRequestAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCalendarRequest ), NULL, this );
-       btnModifyCalendarRequestAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCalendarRequest ), NULL, this );
-       btnDeleteCalendarRequestAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCalendarAddress ), NULL, this );
-       btnAddFreeBusyAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddFreeBusy ), NULL, this );
-       btnModifyFreeBusyAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyFreeBusy ), NULL, this );
-       btnDeleteFreeBusyAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteFreeBusy ), NULL, this );
-       btnAddKey->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddKey ), NULL, this );
-       btnModifyKey->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyKey ), NULL, this );
-       btnDeleteKey->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteKey ), NULL, this );
-       btnAddVendorNamespace->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddVendorNamespace ), NULL, this );
-       btnModifyVendorNamespace->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyVendorNamespace ), NULL, this );
-       btnDeleteVendorNamespace->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteVendorNamespace ), NULL, this );
-       btnAddXToken->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddXToken ), NULL, this );
-       btnModifyXToken->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyXToken ), NULL, this );
-       btnDeleteXToken->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteXToken ), NULL, this );
-       this->Connect( mnuContactSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::SaveContact ) );
-       this->Connect( mnuContactSaveClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::SaveCloseContact ) );
-       this->Connect( mnuContactClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CloseContact ) );
-       this->Connect( mnuEditCut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CutText ) );
-       this->Connect( mnuEditCopy->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CopyText ) );
-       this->Connect( mnuEditPaste->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::PasteText ) );
+    this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
+    this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+    
+    wxBoxSizer* bSizer17;
+    bSizer17 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkContact = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabGeneral->SetScrollRate( 5, 5 );
+    wxBoxSizer* bSizer18;
+    bSizer18 = new wxBoxSizer( wxVERTICAL );
+    
+    wxGridSizer* gSizer7;
+    gSizer7 = new wxGridSizer( 0, 6, 0, 0 );
+    
+    lblTitle = new wxStaticText( tabGeneral, wxID_ANY, wxT("Title:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblTitle->Wrap( -1 );
+    gSizer7->Add( lblTitle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtTitle = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtTitle->SetMaxLength( 0 );
+    gSizer7->Add( txtTitle, 0, wxALL|wxEXPAND, 5 );
+    
+    
+    gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblForename = new wxStaticText( tabGeneral, wxID_ANY, wxT("Forename:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblForename->Wrap( -1 );
+    gSizer7->Add( lblForename, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtForename = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtForename->SetMaxLength( 0 );
+    gSizer7->Add( txtForename, 0, wxALL|wxEXPAND, 5 );
+    
+    lblSurname = new wxStaticText( tabGeneral, wxID_ANY, wxT("Surname:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblSurname->Wrap( -1 );
+    gSizer7->Add( lblSurname, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtSurname = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtSurname->SetMaxLength( 0 );
+    gSizer7->Add( txtSurname, 0, wxALL|wxEXPAND, 5 );
+    
+    lblOtherNames = new wxStaticText( tabGeneral, wxID_ANY, wxT("Other Names:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblOtherNames->Wrap( -1 );
+    gSizer7->Add( lblOtherNames, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtOtherNames = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtOtherNames->SetMaxLength( 0 );
+    gSizer7->Add( txtOtherNames, 0, wxALL|wxEXPAND, 5 );
+    
+    lblSuffix = new wxStaticText( tabGeneral, wxID_ANY, wxT("Suffix:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblSuffix->Wrap( -1 );
+    gSizer7->Add( lblSuffix, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtSuffix = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtSuffix->SetMaxLength( 0 );
+    gSizer7->Add( txtSuffix, 0, wxALL|wxEXPAND, 5 );
+    
+    
+    gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    gSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    bSizer18->Add( gSizer7, 0, wxEXPAND, 5 );
+    
+    wxFlexGridSizer* fgSizer5;
+    fgSizer5 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer5->AddGrowableCol( 1 );
+    fgSizer5->SetFlexibleDirection( wxBOTH );
+    fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblDisplayAs = new wxStaticText( tabGeneral, wxID_ANY, wxT("Display As:"), wxPoint( -1,-1 ), wxDefaultSize, 0 );
+    lblDisplayAs->Wrap( -1 );
+    fgSizer5->Add( lblDisplayAs, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    cmbDisplayAs = new wxComboBox( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+    fgSizer5->Add( cmbDisplayAs, 0, wxALL|wxEXPAND, 5 );
+    
+    lblBirthday = new wxStaticText( tabGeneral, wxID_ANY, wxT("Birthday:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBirthday->Wrap( -1 );
+    fgSizer5->Add( lblBirthday, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    wxBoxSizer* bSizer318;
+    bSizer318 = new wxBoxSizer( wxHORIZONTAL );
+    
+    dapBirthday = new wxDatePickerCtrl( tabGeneral, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_ALLOWNONE|wxDP_DEFAULT|wxDP_DROPDOWN|wxDP_SHOWCENTURY );
+    dapBirthday->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+    dapBirthday->SetToolTip( wxT("If you don't wish to enter a year, please use '0000' as the year.") );
+    dapBirthday->SetMinSize( wxSize( -1,25 ) );
+    
+    bSizer318->Add( dapBirthday, 0, wxALL|wxEXPAND, 5 );
+    
+    txtBirthday = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtBirthday->SetMaxLength( 0 );
+    bSizer318->Add( txtBirthday, 1, wxALL, 5 );
+    
+    
+    fgSizer5->Add( bSizer318, 1, wxEXPAND, 5 );
+    
+    lblAnniversary = new wxStaticText( tabGeneral, wxID_ANY, wxT("Anniversary:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAnniversary->Wrap( -1 );
+    fgSizer5->Add( lblAnniversary, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    wxBoxSizer* bSizer319;
+    bSizer319 = new wxBoxSizer( wxHORIZONTAL );
+    
+    dapAnniversary = new wxDatePickerCtrl( tabGeneral, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_ALLOWNONE|wxDP_DEFAULT|wxDP_DROPDOWN|wxDP_SHOWCENTURY );
+    dapAnniversary->SetToolTip( wxT("If you don't wish to enter a year, please use '0000' as the year.") );
+    dapAnniversary->SetMinSize( wxSize( -1,25 ) );
+    
+    bSizer319->Add( dapAnniversary, 0, wxALL|wxEXPAND, 5 );
+    
+    txtAnniversary = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtAnniversary->SetMaxLength( 0 );
+    bSizer319->Add( txtAnniversary, 1, wxALL, 5 );
+    
+    
+    fgSizer5->Add( bSizer319, 1, wxEXPAND, 5 );
+    
+    lblGender = new wxStaticText( tabGeneral, wxID_ANY, wxT("Gender:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblGender->Wrap( -1 );
+    fgSizer5->Add( lblGender, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    wxBoxSizer* bSizer20;
+    bSizer20 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxString cmbGenderChoices[] = { wxEmptyString, wxT("Male"), wxT("Female"), wxT("Other"), wxT("None/Not Applicable"), wxT("Unknown") };
+    int cmbGenderNChoices = sizeof( cmbGenderChoices ) / sizeof( wxString );
+    cmbGender = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbGenderNChoices, cmbGenderChoices, 0 );
+    cmbGender->SetSelection( 0 );
+    bSizer20->Add( cmbGender, 0, wxALL, 5 );
+    
+    txtGenderDescription = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtGenderDescription->SetMaxLength( 0 );
+    bSizer20->Add( txtGenderDescription, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    
+    fgSizer5->Add( bSizer20, 1, wxEXPAND, 5 );
+    
+    lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblType->Wrap( -1 );
+    fgSizer5->Add( lblType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    wxString cmbTypeChoices[] = { wxT("(Unspecified)"), wxT("Individual"), wxT("Group"), wxT("Organisation"), wxT("Location") };
+    int cmbTypeNChoices = sizeof( cmbTypeChoices ) / sizeof( wxString );
+    cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeNChoices, cmbTypeChoices, 0 );
+    cmbType->SetSelection( 0 );
+    fgSizer5->Add( cmbType, 0, wxALL, 5 );
+    
+    lblNicknames = new wxStaticText( tabGeneral, wxID_ANY, wxT("Nicknames:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblNicknames->Wrap( -1 );
+    fgSizer5->Add( lblNicknames, 0, wxALL, 5 );
+    
+    wxBoxSizer* szrNicknames;
+    szrNicknames = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboNicknames = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    szrNicknames->Add( lboNicknames, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrAddressesOuter3;
+    szrAddressesOuter3 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer464;
+    bSizer464 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer474;
+    bSizer474 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddGeneralNickname = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer474->Add( btnAddGeneralNickname, 0, wxALL, 5 );
+    
+    btnModifyGeneralNickname = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer474->Add( btnModifyGeneralNickname, 0, wxALL, 5 );
+    
+    btnDeleteGeneralNickname = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer474->Add( btnDeleteGeneralNickname, 0, wxALL, 5 );
+    
+    
+    bSizer464->Add( bSizer474, 1, wxEXPAND, 5 );
+    
+    
+    szrAddressesOuter3->Add( bSizer464, 1, wxEXPAND, 5 );
+    
+    
+    szrNicknames->Add( szrAddressesOuter3, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( szrNicknames, 1, wxEXPAND, 5 );
+    
+    lblAddress = new wxStaticText( tabGeneral, wxID_ANY, wxT("Addresses:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAddress->Wrap( -1 );
+    fgSizer5->Add( lblAddress, 0, wxALL, 5 );
+    
+    wxBoxSizer* szrAddresses;
+    szrAddresses = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboAddresses = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    szrAddresses->Add( lboAddresses, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrAddressesOuter;
+    szrAddressesOuter = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46;
+    bSizer46 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47;
+    bSizer47 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddGeneralAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47->Add( btnAddGeneralAddress, 0, wxALL, 5 );
+    
+    btnModifyGeneralAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47->Add( btnModifyGeneralAddress, 0, wxALL, 5 );
+    
+    btnDeleteGeneralAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47->Add( btnDeleteGeneralAddress, 0, wxALL, 5 );
+    
+    
+    bSizer46->Add( bSizer47, 1, wxEXPAND, 5 );
+    
+    
+    szrAddressesOuter->Add( bSizer46, 1, wxEXPAND, 5 );
+    
+    
+    szrAddresses->Add( szrAddressesOuter, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( szrAddresses, 1, wxEXPAND, 5 );
+    
+    lblEmail = new wxStaticText( tabGeneral, wxID_ANY, wxT("E-mail:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblEmail->Wrap( -1 );
+    fgSizer5->Add( lblEmail, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer301;
+    bSizer301 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboEmails = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer301->Add( lboEmails, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer351;
+    bSizer351 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer461;
+    bSizer461 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer471;
+    bSizer471 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddEmailAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471->Add( btnAddEmailAddress, 0, wxALL, 5 );
+    
+    btnModifyEmailAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471->Add( btnModifyEmailAddress, 0, wxALL, 5 );
+    
+    btnDeleteEmailAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471->Add( btnDeleteEmailAddress, 0, wxALL, 5 );
+    
+    
+    bSizer461->Add( bSizer471, 1, wxEXPAND, 5 );
+    
+    
+    bSizer351->Add( bSizer461, 1, wxEXPAND, 5 );
+    
+    
+    bSizer301->Add( bSizer351, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer301, 1, wxEXPAND, 5 );
+    
+    lblIM = new wxStaticText( tabGeneral, wxID_ANY, wxT("Instant Messaging:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblIM->Wrap( 0 );
+    fgSizer5->Add( lblIM, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3011;
+    bSizer3011 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboIM = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3011->Add( lboIM, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3511;
+    bSizer3511 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4611;
+    bSizer4611 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4711;
+    bSizer4711 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddIMAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711->Add( btnAddIMAddress, 0, wxALL, 5 );
+    
+    btnModifyIMAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711->Add( btnModifyIMAddress, 0, wxALL, 5 );
+    
+    btnDeleteIMAddress = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711->Add( btnDeleteIMAddress, 0, wxALL, 5 );
+    
+    
+    bSizer4611->Add( bSizer4711, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3511->Add( bSizer4611, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3011->Add( bSizer3511, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer3011, 1, wxEXPAND, 5 );
+    
+    lblTelephone = new wxStaticText( tabGeneral, wxID_ANY, wxT("Telephone:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblTelephone->Wrap( 0 );
+    fgSizer5->Add( lblTelephone, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30111;
+    bSizer30111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboTelephone = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30111->Add( lboTelephone, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35111;
+    bSizer35111 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46111;
+    bSizer46111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47111;
+    bSizer47111 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddTelephone = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111->Add( btnAddTelephone, 0, wxALL, 5 );
+    
+    btnModifyTelephone = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111->Add( btnModifyTelephone, 0, wxALL, 5 );
+    
+    btnDeleteTelephone = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111->Add( btnDeleteTelephone, 0, wxALL, 5 );
+    
+    
+    bSizer46111->Add( bSizer47111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35111->Add( bSizer46111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30111->Add( bSizer35111, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer30111, 1, wxEXPAND, 5 );
+    
+    lblLanguages = new wxStaticText( tabGeneral, wxID_ANY, wxT("Languages:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLanguages->Wrap( 0 );
+    fgSizer5->Add( lblLanguages, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer301111;
+    bSizer301111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboLanguages = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer301111->Add( lboLanguages, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer351111;
+    bSizer351111 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer461111;
+    bSizer461111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer471111;
+    bSizer471111 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddLanguage = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111->Add( btnAddLanguage, 0, wxALL, 5 );
+    
+    btnModifyLanguage = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111->Add( btnModifyLanguage, 0, wxALL, 5 );
+    
+    btnDeleteLanguage = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111->Add( btnDeleteLanguage, 0, wxALL, 5 );
+    
+    
+    bSizer461111->Add( bSizer471111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer351111->Add( bSizer461111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer301111->Add( bSizer351111, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer301111, 1, wxEXPAND, 5 );
+    
+    lblTimezone = new wxStaticText( tabGeneral, wxID_ANY, wxT("Timezones:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblTimezone->Wrap( 0 );
+    fgSizer5->Add( lblTimezone, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3011111;
+    bSizer3011111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboTimezones = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3011111->Add( lboTimezones, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3511111;
+    bSizer3511111 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4611111;
+    bSizer4611111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4711111;
+    bSizer4711111 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddTimezone = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111->Add( btnAddTimezone, 0, wxALL, 5 );
+    
+    btnModifyTimezone = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111->Add( btnModifyTimezone, 0, wxALL, 5 );
+    
+    btnDeleteTimezone = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111->Add( btnDeleteTimezone, 0, wxALL, 5 );
+    
+    
+    bSizer4611111->Add( bSizer4711111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3511111->Add( bSizer4611111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3011111->Add( bSizer3511111, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer3011111, 1, wxEXPAND, 5 );
+    
+    lblGeopositioning = new wxStaticText( tabGeneral, wxID_ANY, wxT("Geopositioning:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblGeopositioning->Wrap( -1 );
+    fgSizer5->Add( lblGeopositioning, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30111114;
+    bSizer30111114 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboGeoposition = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30111114->Add( lboGeoposition, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35111114;
+    bSizer35111114 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46111114;
+    bSizer46111114 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47111114;
+    bSizer47111114 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddGeneralGeoposition = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111114->Add( btnAddGeneralGeoposition, 0, wxALL, 5 );
+    
+    btnModifyGeneralGeoposition = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111114->Add( btnModifyGeneralGeoposition, 0, wxALL, 5 );
+    
+    btnDeleteGeneralGeoposition = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111114->Add( btnDeleteGeneralGeoposition, 0, wxALL, 5 );
+    
+    
+    bSizer46111114->Add( bSizer47111114, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35111114->Add( bSizer46111114, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30111114->Add( bSizer35111114, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer30111114, 1, wxEXPAND, 5 );
+    
+    lblRelated = new wxStaticText( tabGeneral, wxID_ANY, wxT("Related people:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblRelated->Wrap( 1 );
+    fgSizer5->Add( lblRelated, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30111111;
+    bSizer30111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboRelated = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30111111->Add( lboRelated, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35111111;
+    bSizer35111111 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46111111;
+    bSizer46111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47111111;
+    bSizer47111111 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddRelated = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111->Add( btnAddRelated, 0, wxALL, 5 );
+    
+    btnModifyRelated = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111->Add( btnModifyRelated, 0, wxALL, 5 );
+    
+    btnDeleteRelated = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111->Add( btnDeleteRelated, 0, wxALL, 5 );
+    
+    
+    bSizer46111111->Add( bSizer47111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35111111->Add( bSizer46111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30111111->Add( bSizer35111111, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer30111111, 1, wxEXPAND, 5 );
+    
+    lblWebsites = new wxStaticText( tabGeneral, wxID_ANY, wxT("Websites:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblWebsites->Wrap( 1 );
+    fgSizer5->Add( lblWebsites, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer301111111;
+    bSizer301111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboWebsites = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer301111111->Add( lboWebsites, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer351111111;
+    bSizer351111111 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer461111111;
+    bSizer461111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer471111111;
+    bSizer471111111 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddWebsite = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111->Add( btnAddWebsite, 0, wxALL, 5 );
+    
+    btnModifyWebsite = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111->Add( btnModifyWebsite, 0, wxALL, 5 );
+    
+    btnDeleteWebsite = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111->Add( btnDeleteWebsite, 0, wxALL, 5 );
+    
+    
+    bSizer461111111->Add( bSizer471111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer351111111->Add( bSizer461111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer301111111->Add( bSizer351111111, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer301111111, 1, wxEXPAND, 5 );
+    
+    lblTitles = new wxStaticText( tabGeneral, wxID_ANY, wxT("Titles:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblTitles->Wrap( 1 );
+    fgSizer5->Add( lblTitles, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3011111111;
+    bSizer3011111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboTitles = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3011111111->Add( lboTitles, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3511111111;
+    bSizer3511111111 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4611111111;
+    bSizer4611111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4711111111;
+    bSizer4711111111 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddTitle = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111->Add( btnAddTitle, 0, wxALL, 5 );
+    
+    btnModifyTitle = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111->Add( btnModifyTitle, 0, wxALL, 5 );
+    
+    btnDeleteTitle = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111->Add( btnDeleteTitle, 0, wxALL, 5 );
+    
+    
+    bSizer4611111111->Add( bSizer4711111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3511111111->Add( bSizer4611111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3011111111->Add( bSizer3511111111, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer3011111111, 1, wxEXPAND, 5 );
+    
+    lblRoles = new wxStaticText( tabGeneral, wxID_ANY, wxT("Roles:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblRoles->Wrap( 1 );
+    fgSizer5->Add( lblRoles, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30111111111;
+    bSizer30111111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboRoles = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30111111111->Add( lboRoles, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35111111111;
+    bSizer35111111111 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46111111111;
+    bSizer46111111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47111111111;
+    bSizer47111111111 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddRole = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111111->Add( btnAddRole, 0, wxALL, 5 );
+    
+    btnModifyRole = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111111->Add( btnModifyRole, 0, wxALL, 5 );
+    
+    btnDeleteRole = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111111->Add( btnDeleteRole, 0, wxALL, 5 );
+    
+    
+    bSizer46111111111->Add( bSizer47111111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35111111111->Add( bSizer46111111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30111111111->Add( bSizer35111111111, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer30111111111, 1, wxEXPAND, 5 );
+    
+    lblOrganisations = new wxStaticText( tabGeneral, wxID_ANY, wxT("Organisations:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblOrganisations->Wrap( 1 );
+    fgSizer5->Add( lblOrganisations, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer301111111111;
+    bSizer301111111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboOrganisations = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer301111111111->Add( lboOrganisations, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer351111111111;
+    bSizer351111111111 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer461111111111;
+    bSizer461111111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer471111111111;
+    bSizer471111111111 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddOrganisations = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111111->Add( btnAddOrganisations, 0, wxALL, 5 );
+    
+    btnModifyOrganisations = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111111->Add( btnModifyOrganisations, 0, wxALL, 5 );
+    
+    btnDeleteOrganisations = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111111->Add( btnDeleteOrganisations, 0, wxALL, 5 );
+    
+    
+    bSizer461111111111->Add( bSizer471111111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer351111111111->Add( bSizer461111111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer301111111111->Add( bSizer351111111111, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer301111111111, 1, wxEXPAND, 5 );
+    
+    lblNotes = new wxStaticText( tabGeneral, wxID_ANY, wxT("Notes:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblNotes->Wrap( 1 );
+    fgSizer5->Add( lblNotes, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3011111111111;
+    bSizer3011111111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboNotes = new wxListCtrl( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3011111111111->Add( lboNotes, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3511111111111;
+    bSizer3511111111111 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4611111111111;
+    bSizer4611111111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4711111111111;
+    bSizer4711111111111 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddNote = new wxButton( tabGeneral, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111111->Add( btnAddNote, 0, wxALL, 5 );
+    
+    btnModifyNote = new wxButton( tabGeneral, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111111->Add( btnModifyNote, 0, wxALL, 5 );
+    
+    btnDeleteNote = new wxButton( tabGeneral, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111111->Add( btnDeleteNote, 0, wxALL, 5 );
+    
+    
+    bSizer4611111111111->Add( bSizer4711111111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3511111111111->Add( bSizer4611111111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3011111111111->Add( bSizer3511111111111, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5->Add( bSizer3011111111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer18->Add( fgSizer5, 0, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( bSizer18 );
+    tabGeneral->Layout();
+    bSizer18->Fit( tabGeneral );
+    nbkContact->AddPage( tabGeneral, wxT("General"), false );
+    tabHome = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabHome->SetScrollRate( 5, 5 );
+    wxBoxSizer* bSizer181;
+    bSizer181 = new wxBoxSizer( wxVERTICAL );
+    
+    wxGridSizer* gSizer71;
+    gSizer71 = new wxGridSizer( 2, 6, 0, 0 );
+    
+    
+    bSizer181->Add( gSizer71, 0, wxEXPAND, 5 );
+    
+    wxFlexGridSizer* fgSizer51;
+    fgSizer51 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer51->AddGrowableCol( 1 );
+    fgSizer51->SetFlexibleDirection( wxBOTH );
+    fgSizer51->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblHomeNickname = new wxStaticText( tabHome, wxID_ANY, wxT("Home Nicknames:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeNickname->Wrap( 0 );
+    fgSizer51->Add( lblHomeNickname, 0, wxALL, 5 );
+    
+    wxBoxSizer* szrAddresses12;
+    szrAddresses12 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeNicknames = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    szrAddresses12->Add( lboHomeNicknames, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrAddressesOuter11;
+    szrAddressesOuter11 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4622;
+    bSizer4622 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4722;
+    bSizer4722 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeNickname = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4722->Add( btnAddHomeNickname, 0, wxALL, 5 );
+    
+    btnModifyHomeNickname = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4722->Add( btnModifyHomeNickname, 0, wxALL, 5 );
+    
+    btnDeleteHomeNickname = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4722->Add( btnDeleteHomeNickname, 0, wxALL, 5 );
+    
+    
+    bSizer4622->Add( bSizer4722, 1, wxEXPAND, 5 );
+    
+    
+    szrAddressesOuter11->Add( bSizer4622, 1, wxEXPAND, 5 );
+    
+    
+    szrAddresses12->Add( szrAddressesOuter11, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( szrAddresses12, 1, wxEXPAND, 5 );
+    
+    lblHomeAddresses = new wxStaticText( tabHome, wxID_ANY, wxT("Home Addresses:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeAddresses->Wrap( 1 );
+    fgSizer51->Add( lblHomeAddresses, 0, wxALL, 5 );
+    
+    wxBoxSizer* szrAddresses1;
+    szrAddresses1 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeAddresses = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    szrAddresses1->Add( lboHomeAddresses, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrAddressesOuter1;
+    szrAddressesOuter1 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer462;
+    bSizer462 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer472;
+    bSizer472 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeAddress = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer472->Add( btnAddHomeAddress, 0, wxALL, 5 );
+    
+    btnModifyHomeAddress = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer472->Add( btnModifyHomeAddress, 0, wxALL, 5 );
+    
+    btnDeleteHomeAddress = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer472->Add( btnDeleteHomeAddress, 0, wxALL, 5 );
+    
+    
+    bSizer462->Add( bSizer472, 1, wxEXPAND, 5 );
+    
+    
+    szrAddressesOuter1->Add( bSizer462, 1, wxEXPAND, 5 );
+    
+    
+    szrAddresses1->Add( szrAddressesOuter1, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( szrAddresses1, 1, wxEXPAND, 5 );
+    
+    lblHomeEmail = new wxStaticText( tabHome, wxID_ANY, wxT("Home Emails:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeEmail->Wrap( 1 );
+    fgSizer51->Add( lblHomeEmail, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3012;
+    bSizer3012 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeEmails = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3012->Add( lboHomeEmails, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3512;
+    bSizer3512 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4612;
+    bSizer4612 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4712;
+    bSizer4712 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeEmailAddress = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4712->Add( btnAddHomeEmailAddress, 0, wxALL, 5 );
+    
+    btnModifyHomeEmailAddress = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4712->Add( btnModifyHomeEmailAddress, 0, wxALL, 5 );
+    
+    btnDeleteHomeEmailAddress = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4712->Add( btnDeleteHomeEmailAddress, 0, wxALL, 5 );
+    
+    
+    bSizer4612->Add( bSizer4712, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3512->Add( bSizer4612, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3012->Add( bSizer3512, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( bSizer3012, 1, wxEXPAND, 5 );
+    
+    lblHomeIM = new wxStaticText( tabHome, wxID_ANY, wxT("Home Instant Messaging:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeIM->Wrap( 0 );
+    fgSizer51->Add( lblHomeIM, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30112;
+    bSizer30112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeIM = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30112->Add( lboHomeIM, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35112;
+    bSizer35112 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46112;
+    bSizer46112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47112;
+    bSizer47112 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeIMAddress = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47112->Add( btnAddHomeIMAddress, 0, wxALL, 5 );
+    
+    btnModifyHomeIMAddress = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47112->Add( btnModifyHomeIMAddress, 0, wxALL, 5 );
+    
+    btnDeleteHomeIMAddress = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47112->Add( btnDeleteHomeIMAddress, 0, wxALL, 5 );
+    
+    
+    bSizer46112->Add( bSizer47112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35112->Add( bSizer46112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30112->Add( bSizer35112, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( bSizer30112, 1, wxEXPAND, 5 );
+    
+    lblHomeTelephone = new wxStaticText( tabHome, wxID_ANY, wxT("Home Telephone:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeTelephone->Wrap( 0 );
+    fgSizer51->Add( lblHomeTelephone, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer301112;
+    bSizer301112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeTelephone = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer301112->Add( lboHomeTelephone, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer351112;
+    bSizer351112 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer461112;
+    bSizer461112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer471112;
+    bSizer471112 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeTelephone = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471112->Add( btnAddHomeTelephone, 0, wxALL, 5 );
+    
+    btnModifyHomeTelephone = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471112->Add( btnModifyHomeTelephone, 0, wxALL, 5 );
+    
+    btnDeleteHomeTelephone = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471112->Add( btnDeleteHomeTelephone, 0, wxALL, 5 );
+    
+    
+    bSizer461112->Add( bSizer471112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer351112->Add( bSizer461112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer301112->Add( bSizer351112, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( bSizer301112, 1, wxEXPAND, 5 );
+    
+    lblHomeLanguages = new wxStaticText( tabHome, wxID_ANY, wxT("Home Languages:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeLanguages->Wrap( 0 );
+    fgSizer51->Add( lblHomeLanguages, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3011112;
+    bSizer3011112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeLanguages = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3011112->Add( lboHomeLanguages, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3511112;
+    bSizer3511112 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4611112;
+    bSizer4611112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4711112;
+    bSizer4711112 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeLanguage = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711112->Add( btnAddHomeLanguage, 0, wxALL, 5 );
+    
+    btnModifyHomeLanguage = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711112->Add( btnModifyHomeLanguage, 0, wxALL, 5 );
+    
+    btnDeleteHomeLanguage = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711112->Add( btnDeleteHomeLanguage, 0, wxALL, 5 );
+    
+    
+    bSizer4611112->Add( bSizer4711112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3511112->Add( bSizer4611112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3011112->Add( bSizer3511112, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( bSizer3011112, 1, wxEXPAND, 5 );
+    
+    lblHomeTimezone = new wxStaticText( tabHome, wxID_ANY, wxT("Home Timezones:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeTimezone->Wrap( 0 );
+    fgSizer51->Add( lblHomeTimezone, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30111112;
+    bSizer30111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeTimezones = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30111112->Add( lboHomeTimezones, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35111112;
+    bSizer35111112 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46111112;
+    bSizer46111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47111112;
+    bSizer47111112 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeTimezone = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111112->Add( btnAddHomeTimezone, 0, wxALL, 5 );
+    
+    btnModifyHomeTimezone = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111112->Add( btnModifyHomeTimezone, 0, wxALL, 5 );
+    
+    btnDeleteHomeTimezone = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111112->Add( btnDeleteHomeTimezone, 0, wxALL, 5 );
+    
+    
+    bSizer46111112->Add( bSizer47111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35111112->Add( bSizer46111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30111112->Add( bSizer35111112, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( bSizer30111112, 1, wxEXPAND, 5 );
+    
+    lblHomeGeopositioning = new wxStaticText( tabHome, wxID_ANY, wxT("Home Geopositioning:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeGeopositioning->Wrap( 0 );
+    fgSizer51->Add( lblHomeGeopositioning, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer301111141;
+    bSizer301111141 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeGeoposition = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer301111141->Add( lboHomeGeoposition, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer351111141;
+    bSizer351111141 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer461111141;
+    bSizer461111141 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer471111141;
+    bSizer471111141 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeGeoposition = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111141->Add( btnAddHomeGeoposition, 0, wxALL, 5 );
+    
+    btnModifyHomeGeoposition = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111141->Add( btnModifyHomeGeoposition, 0, wxALL, 5 );
+    
+    btnDeleteHomePosition = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111141->Add( btnDeleteHomePosition, 0, wxALL, 5 );
+    
+    
+    bSizer461111141->Add( bSizer471111141, 1, wxEXPAND, 5 );
+    
+    
+    bSizer351111141->Add( bSizer461111141, 1, wxEXPAND, 5 );
+    
+    
+    bSizer301111141->Add( bSizer351111141, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( bSizer301111141, 1, wxEXPAND, 5 );
+    
+    lblHomeWebsites = new wxStaticText( tabHome, wxID_ANY, wxT("Home Websites:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeWebsites->Wrap( 1 );
+    fgSizer51->Add( lblHomeWebsites, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3011111112;
+    bSizer3011111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeWebsites = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3011111112->Add( lboHomeWebsites, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3511111112;
+    bSizer3511111112 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4611111112;
+    bSizer4611111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4711111112;
+    bSizer4711111112 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeWebsite = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111112->Add( btnAddHomeWebsite, 0, wxALL, 5 );
+    
+    btnHomeModifyWebsite = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111112->Add( btnHomeModifyWebsite, 0, wxALL, 5 );
+    
+    btnDeleteHomeWebsite = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111112->Add( btnDeleteHomeWebsite, 0, wxALL, 5 );
+    
+    
+    bSizer4611111112->Add( bSizer4711111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3511111112->Add( bSizer4611111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3011111112->Add( bSizer3511111112, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( bSizer3011111112, 1, wxEXPAND, 5 );
+    
+    lblHomeTitles = new wxStaticText( tabHome, wxID_ANY, wxT("Home Titles:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeTitles->Wrap( 1 );
+    fgSizer51->Add( lblHomeTitles, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30111111112;
+    bSizer30111111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeTitles = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30111111112->Add( lboHomeTitles, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35111111112;
+    bSizer35111111112 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46111111112;
+    bSizer46111111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47111111112;
+    bSizer47111111112 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeTitle = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111112->Add( btnAddHomeTitle, 0, wxALL, 5 );
+    
+    btnModifyHomeTitle = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111112->Add( btnModifyHomeTitle, 0, wxALL, 5 );
+    
+    btnDeleteHomeTitle = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111112->Add( btnDeleteHomeTitle, 0, wxALL, 5 );
+    
+    
+    bSizer46111111112->Add( bSizer47111111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35111111112->Add( bSizer46111111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30111111112->Add( bSizer35111111112, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( bSizer30111111112, 1, wxEXPAND, 5 );
+    
+    lblHomeRoles = new wxStaticText( tabHome, wxID_ANY, wxT("Home Roles:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeRoles->Wrap( 1 );
+    fgSizer51->Add( lblHomeRoles, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer301111111112;
+    bSizer301111111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeRoles = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer301111111112->Add( lboHomeRoles, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer351111111112;
+    bSizer351111111112 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer461111111112;
+    bSizer461111111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer471111111112;
+    bSizer471111111112 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeRole = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111112->Add( btnAddHomeRole, 0, wxALL, 5 );
+    
+    btnModifyHomeRole = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111112->Add( btnModifyHomeRole, 0, wxALL, 5 );
+    
+    btnDeleteHomeRole = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111112->Add( btnDeleteHomeRole, 0, wxALL, 5 );
+    
+    
+    bSizer461111111112->Add( bSizer471111111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer351111111112->Add( bSizer461111111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer301111111112->Add( bSizer351111111112, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( bSizer301111111112, 1, wxEXPAND, 5 );
+    
+    lblHomeOrganisations = new wxStaticText( tabHome, wxID_ANY, wxT("Home Organisations:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeOrganisations->Wrap( 1 );
+    fgSizer51->Add( lblHomeOrganisations, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3011111111112;
+    bSizer3011111111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeOrganisations = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3011111111112->Add( lboHomeOrganisations, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3511111111112;
+    bSizer3511111111112 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4611111111112;
+    bSizer4611111111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4711111111112;
+    bSizer4711111111112 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeOrganisations = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111112->Add( btnAddHomeOrganisations, 0, wxALL, 5 );
+    
+    btnModifyHomeOrganisations = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111112->Add( btnModifyHomeOrganisations, 0, wxALL, 5 );
+    
+    btnDeleteHomeOrganisations = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111112->Add( btnDeleteHomeOrganisations, 0, wxALL, 5 );
+    
+    
+    bSizer4611111111112->Add( bSizer4711111111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3511111111112->Add( bSizer4611111111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3011111111112->Add( bSizer3511111111112, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( bSizer3011111111112, 1, wxEXPAND, 5 );
+    
+    lblHomeNotes = new wxStaticText( tabHome, wxID_ANY, wxT("Home Notes:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHomeNotes->Wrap( 1 );
+    fgSizer51->Add( lblHomeNotes, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30111111111111;
+    bSizer30111111111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboHomeNotes = new wxListCtrl( tabHome, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30111111111111->Add( lboHomeNotes, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35111111111111;
+    bSizer35111111111111 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46111111111111;
+    bSizer46111111111111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47111111111111;
+    bSizer47111111111111 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddHomeNote = new wxButton( tabHome, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111111111->Add( btnAddHomeNote, 0, wxALL, 5 );
+    
+    btnModifyHomeNote = new wxButton( tabHome, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111111111->Add( btnModifyHomeNote, 0, wxALL, 5 );
+    
+    btnDeleteHomeNote = new wxButton( tabHome, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111111111->Add( btnDeleteHomeNote, 0, wxALL, 5 );
+    
+    
+    bSizer46111111111111->Add( bSizer47111111111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35111111111111->Add( bSizer46111111111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30111111111111->Add( bSizer35111111111111, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer51->Add( bSizer30111111111111, 1, wxEXPAND, 5 );
+    
+    
+    bSizer181->Add( fgSizer51, 0, wxEXPAND, 5 );
+    
+    
+    tabHome->SetSizer( bSizer181 );
+    tabHome->Layout();
+    bSizer181->Fit( tabHome );
+    nbkContact->AddPage( tabHome, wxT("Home"), false );
+    tabBusiness = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabBusiness->SetScrollRate( 5, 5 );
+    wxBoxSizer* bSizer182;
+    bSizer182 = new wxBoxSizer( wxVERTICAL );
+    
+    wxGridSizer* gSizer72;
+    gSizer72 = new wxGridSizer( 2, 6, 0, 0 );
+    
+    
+    bSizer182->Add( gSizer72, 0, wxEXPAND, 5 );
+    
+    wxFlexGridSizer* fgSizer52;
+    fgSizer52 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer52->AddGrowableCol( 1 );
+    fgSizer52->SetFlexibleDirection( wxBOTH );
+    fgSizer52->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblBusinessNickname = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Nicknames:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessNickname->Wrap( 0 );
+    fgSizer52->Add( lblBusinessNickname, 0, wxALL, 5 );
+    
+    wxBoxSizer* szrAddresses22;
+    szrAddresses22 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessNicknames = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    szrAddresses22->Add( lboBusinessNicknames, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrAddressesOuter22;
+    szrAddressesOuter22 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4632;
+    bSizer4632 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4732;
+    bSizer4732 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddBusinessNickname = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4732->Add( btnAddBusinessNickname, 0, wxALL, 5 );
+    
+    btnModifyBusinessNickname = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4732->Add( btnModifyBusinessNickname, 0, wxALL, 5 );
+    
+    btnDeleteBusinessNickname = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4732->Add( btnDeleteBusinessNickname, 0, wxALL, 5 );
+    
+    
+    bSizer4632->Add( bSizer4732, 1, wxEXPAND, 5 );
+    
+    
+    szrAddressesOuter22->Add( bSizer4632, 1, wxEXPAND, 5 );
+    
+    
+    szrAddresses22->Add( szrAddressesOuter22, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( szrAddresses22, 1, wxEXPAND, 5 );
+    
+    lblBusinessAddress = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Addresses:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessAddress->Wrap( 0 );
+    fgSizer52->Add( lblBusinessAddress, 0, wxALL, 5 );
+    
+    wxBoxSizer* szrAddresses2;
+    szrAddresses2 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessAddresses = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    szrAddresses2->Add( lboBusinessAddresses, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrAddressesOuter2;
+    szrAddressesOuter2 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer463;
+    bSizer463 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer473;
+    bSizer473 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddBusinessAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer473->Add( btnAddBusinessAddress, 0, wxALL, 5 );
+    
+    btnModifyBusinessAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer473->Add( btnModifyBusinessAddress, 0, wxALL, 5 );
+    
+    btnDeleteBusinessAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer473->Add( btnDeleteBusinessAddress, 0, wxALL, 5 );
+    
+    
+    bSizer463->Add( bSizer473, 1, wxEXPAND, 5 );
+    
+    
+    szrAddressesOuter2->Add( bSizer463, 1, wxEXPAND, 5 );
+    
+    
+    szrAddresses2->Add( szrAddressesOuter2, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( szrAddresses2, 1, wxEXPAND, 5 );
+    
+    lblBusinessEmail = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business E-mail:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessEmail->Wrap( 0 );
+    fgSizer52->Add( lblBusinessEmail, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3013;
+    bSizer3013 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessEmail = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3013->Add( lboBusinessEmail, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3513;
+    bSizer3513 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4613;
+    bSizer4613 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4713;
+    bSizer4713 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddBusinessEmailAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4713->Add( btnAddBusinessEmailAddress, 0, wxALL, 5 );
+    
+    btnModifyBusinessEmailAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4713->Add( btnModifyBusinessEmailAddress, 0, wxALL, 5 );
+    
+    btnDeleteBusinessEmailAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4713->Add( btnDeleteBusinessEmailAddress, 0, wxALL, 5 );
+    
+    
+    bSizer4613->Add( bSizer4713, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3513->Add( bSizer4613, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3013->Add( bSizer3513, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( bSizer3013, 1, wxEXPAND, 5 );
+    
+    lblBusinessIM = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Instant Messaging:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessIM->Wrap( 0 );
+    fgSizer52->Add( lblBusinessIM, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30113;
+    bSizer30113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessIM = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30113->Add( lboBusinessIM, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35113;
+    bSizer35113 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46113;
+    bSizer46113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47113;
+    bSizer47113 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddBusinessIMAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47113->Add( btnAddBusinessIMAddress, 0, wxALL, 5 );
+    
+    btnModifyBusinessIMAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47113->Add( btnModifyBusinessIMAddress, 0, wxALL, 5 );
+    
+    btnDeleteBusinessIMAddress = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47113->Add( btnDeleteBusinessIMAddress, 0, wxALL, 5 );
+    
+    
+    bSizer46113->Add( bSizer47113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35113->Add( bSizer46113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30113->Add( bSizer35113, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( bSizer30113, 1, wxEXPAND, 5 );
+    
+    lblBusinessTelephone = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Telephone:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessTelephone->Wrap( 0 );
+    fgSizer52->Add( lblBusinessTelephone, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer301113;
+    bSizer301113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessTelephone = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer301113->Add( lboBusinessTelephone, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer351113;
+    bSizer351113 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer461113;
+    bSizer461113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer471113;
+    bSizer471113 = new wxBoxSizer( wxVERTICAL );
+    
+    btnBusinessAddTelephone = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471113->Add( btnBusinessAddTelephone, 0, wxALL, 5 );
+    
+    btnBusinessModifyTelephone = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471113->Add( btnBusinessModifyTelephone, 0, wxALL, 5 );
+    
+    btnBusinessDeleteTelephone = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471113->Add( btnBusinessDeleteTelephone, 0, wxALL, 5 );
+    
+    
+    bSizer461113->Add( bSizer471113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer351113->Add( bSizer461113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer301113->Add( bSizer351113, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( bSizer301113, 1, wxEXPAND, 5 );
+    
+    lblBusinessLanguage = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Languages:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessLanguage->Wrap( 0 );
+    fgSizer52->Add( lblBusinessLanguage, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3011113;
+    bSizer3011113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessLanguages = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3011113->Add( lboBusinessLanguages, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3511113;
+    bSizer3511113 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4611113;
+    bSizer4611113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4711113;
+    bSizer4711113 = new wxBoxSizer( wxVERTICAL );
+    
+    btnBusinessAddLanguage = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711113->Add( btnBusinessAddLanguage, 0, wxALL, 5 );
+    
+    btnBusinessModifyLanguage = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711113->Add( btnBusinessModifyLanguage, 0, wxALL, 5 );
+    
+    btnBusinessDeleteLanguage = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711113->Add( btnBusinessDeleteLanguage, 0, wxALL, 5 );
+    
+    
+    bSizer4611113->Add( bSizer4711113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3511113->Add( bSizer4611113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3011113->Add( bSizer3511113, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( bSizer3011113, 1, wxEXPAND, 5 );
+    
+    lblBusinessTimezones = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Timezones:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessTimezones->Wrap( 0 );
+    fgSizer52->Add( lblBusinessTimezones, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30111113;
+    bSizer30111113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessTimezones = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30111113->Add( lboBusinessTimezones, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35111113;
+    bSizer35111113 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46111113;
+    bSizer46111113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47111113;
+    bSizer47111113 = new wxBoxSizer( wxVERTICAL );
+    
+    btnBusinessAddTimezone = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111113->Add( btnBusinessAddTimezone, 0, wxALL, 5 );
+    
+    btnBusinessModifyTimezone = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111113->Add( btnBusinessModifyTimezone, 0, wxALL, 5 );
+    
+    btnDeleteBusinessTimezone = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111113->Add( btnDeleteBusinessTimezone, 0, wxALL, 5 );
+    
+    
+    bSizer46111113->Add( bSizer47111113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35111113->Add( bSizer46111113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30111113->Add( bSizer35111113, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( bSizer30111113, 1, wxEXPAND, 5 );
+    
+    lblBusinessGeopositioning = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Geopositioning:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessGeopositioning->Wrap( 0 );
+    fgSizer52->Add( lblBusinessGeopositioning, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3011111411;
+    bSizer3011111411 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessGeoposition = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3011111411->Add( lboBusinessGeoposition, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3511111411;
+    bSizer3511111411 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4611111411;
+    bSizer4611111411 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4711111411;
+    bSizer4711111411 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddBusinessGeoposition = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111411->Add( btnAddBusinessGeoposition, 0, wxALL, 5 );
+    
+    btnModifyBusinessGeoposition = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111411->Add( btnModifyBusinessGeoposition, 0, wxALL, 5 );
+    
+    btnDeleteBusinessGeoposition = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111411->Add( btnDeleteBusinessGeoposition, 0, wxALL, 5 );
+    
+    
+    bSizer4611111411->Add( bSizer4711111411, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3511111411->Add( bSizer4611111411, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3011111411->Add( bSizer3511111411, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( bSizer3011111411, 1, wxEXPAND, 5 );
+    
+    lblBusinessWebsites = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Websites:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessWebsites->Wrap( 1 );
+    fgSizer52->Add( lblBusinessWebsites, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3011111113;
+    bSizer3011111113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessWebsites = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3011111113->Add( lboBusinessWebsites, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3511111113;
+    bSizer3511111113 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4611111113;
+    bSizer4611111113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4711111113;
+    bSizer4711111113 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddBusinessWebsite = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111113->Add( btnAddBusinessWebsite, 0, wxALL, 5 );
+    
+    btnModifyBusinessWebsite = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111113->Add( btnModifyBusinessWebsite, 0, wxALL, 5 );
+    
+    btnDeleteBusinessWebsite = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111113->Add( btnDeleteBusinessWebsite, 0, wxALL, 5 );
+    
+    
+    bSizer4611111113->Add( bSizer4711111113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3511111113->Add( bSizer4611111113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3011111113->Add( bSizer3511111113, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( bSizer3011111113, 1, wxEXPAND, 5 );
+    
+    lblBusinessTitles = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Titles:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessTitles->Wrap( 1 );
+    fgSizer52->Add( lblBusinessTitles, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30111111113;
+    bSizer30111111113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessTitles = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER );
+    bSizer30111111113->Add( lboBusinessTitles, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35111111113;
+    bSizer35111111113 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46111111113;
+    bSizer46111111113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47111111113;
+    bSizer47111111113 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddBusinessTitle = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111113->Add( btnAddBusinessTitle, 0, wxALL, 5 );
+    
+    btnModifyBusinessTitle = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111113->Add( btnModifyBusinessTitle, 0, wxALL, 5 );
+    
+    btnDeleteBusinessTitle = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111113->Add( btnDeleteBusinessTitle, 0, wxALL, 5 );
+    
+    
+    bSizer46111111113->Add( bSizer47111111113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35111111113->Add( bSizer46111111113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30111111113->Add( bSizer35111111113, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( bSizer30111111113, 1, wxEXPAND, 5 );
+    
+    lblBusinessRoles = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Roles:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessRoles->Wrap( 1 );
+    fgSizer52->Add( lblBusinessRoles, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer301111111113;
+    bSizer301111111113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessRoles = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer301111111113->Add( lboBusinessRoles, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer351111111113;
+    bSizer351111111113 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer461111111113;
+    bSizer461111111113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer471111111113;
+    bSizer471111111113 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddBusinessRole = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111113->Add( btnAddBusinessRole, 0, wxALL, 5 );
+    
+    btnModifyBusinessRole = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111113->Add( btnModifyBusinessRole, 0, wxALL, 5 );
+    
+    btnDeleteBusinessRole = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471111111113->Add( btnDeleteBusinessRole, 0, wxALL, 5 );
+    
+    
+    bSizer461111111113->Add( bSizer471111111113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer351111111113->Add( bSizer461111111113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer301111111113->Add( bSizer351111111113, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( bSizer301111111113, 1, wxEXPAND, 5 );
+    
+    lblBusinessOrganisations = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Organisations:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessOrganisations->Wrap( 1 );
+    fgSizer52->Add( lblBusinessOrganisations, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer3011111111113;
+    bSizer3011111111113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessOrganisations = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer3011111111113->Add( lboBusinessOrganisations, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer3511111111113;
+    bSizer3511111111113 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4611111111113;
+    bSizer4611111111113 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4711111111113;
+    bSizer4711111111113 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddBusinessOrganisations = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111113->Add( btnAddBusinessOrganisations, 0, wxALL, 5 );
+    
+    btnModifyBusinessOrganisations = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111113->Add( btnModifyBusinessOrganisations, 0, wxALL, 5 );
+    
+    btnDeleteBusinessOrganisations = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4711111111113->Add( btnDeleteBusinessOrganisations, 0, wxALL, 5 );
+    
+    
+    bSizer4611111111113->Add( bSizer4711111111113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3511111111113->Add( bSizer4611111111113, 1, wxEXPAND, 5 );
+    
+    
+    bSizer3011111111113->Add( bSizer3511111111113, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( bSizer3011111111113, 1, wxEXPAND, 5 );
+    
+    lblBusinessNotes = new wxStaticText( tabBusiness, wxID_ANY, wxT("Business Notes:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblBusinessNotes->Wrap( 1 );
+    fgSizer52->Add( lblBusinessNotes, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30111111111112;
+    bSizer30111111111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboBusinessNotes = new wxListCtrl( tabBusiness, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30111111111112->Add( lboBusinessNotes, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35111111111112;
+    bSizer35111111111112 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46111111111112;
+    bSizer46111111111112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47111111111112;
+    bSizer47111111111112 = new wxBoxSizer( wxVERTICAL );
+    
+    btnBusinessAddNote = new wxButton( tabBusiness, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111111112->Add( btnBusinessAddNote, 0, wxALL, 5 );
+    
+    btnBusinessModifyNote = new wxButton( tabBusiness, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111111112->Add( btnBusinessModifyNote, 0, wxALL, 5 );
+    
+    btnBusinessDeleteNote = new wxButton( tabBusiness, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47111111111112->Add( btnBusinessDeleteNote, 0, wxALL, 5 );
+    
+    
+    bSizer46111111111112->Add( bSizer47111111111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35111111111112->Add( bSizer46111111111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30111111111112->Add( bSizer35111111111112, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer52->Add( bSizer30111111111112, 1, wxEXPAND, 5 );
+    
+    
+    bSizer182->Add( fgSizer52, 0, wxEXPAND, 5 );
+    
+    
+    tabBusiness->SetSizer( bSizer182 );
+    tabBusiness->Layout();
+    bSizer182->Fit( tabBusiness );
+    nbkContact->AddPage( tabBusiness, wxT("Business"), false );
+    tabCategories = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabCategories->SetScrollRate( 5, 5 );
+    wxBoxSizer* szrAddresses11;
+    szrAddresses11 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboCategories = new wxListCtrl( tabCategories, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    szrAddresses11->Add( lboCategories, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrCategoriesOuter;
+    szrCategoriesOuter = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4621;
+    bSizer4621 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4721;
+    bSizer4721 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddCategory = new wxButton( tabCategories, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4721->Add( btnAddCategory, 0, wxALL, 5 );
+    
+    btnModifyCategory = new wxButton( tabCategories, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4721->Add( btnModifyCategory, 0, wxALL, 5 );
+    
+    btnDeleteCategory = new wxButton( tabCategories, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4721->Add( btnDeleteCategory, 0, wxALL, 5 );
+    
+    
+    bSizer4621->Add( bSizer4721, 1, wxEXPAND, 5 );
+    
+    
+    szrCategoriesOuter->Add( bSizer4621, 1, wxEXPAND, 5 );
+    
+    
+    szrAddresses11->Add( szrCategoriesOuter, 0, wxEXPAND, 5 );
+    
+    
+    tabCategories->SetSizer( szrAddresses11 );
+    tabCategories->Layout();
+    szrAddresses11->Fit( tabCategories );
+    nbkContact->AddPage( tabCategories, wxT("Categories"), false );
+    tabMembers = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabMembers->SetScrollRate( 5, 5 );
+    wxBoxSizer* szrAddresses111;
+    szrAddresses111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboGroups = new wxListCtrl( tabMembers, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    szrAddresses111->Add( lboGroups, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrCategoriesOuter1;
+    szrCategoriesOuter1 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46211;
+    bSizer46211 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47211;
+    bSizer47211 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddGroups = new wxButton( tabMembers, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47211->Add( btnAddGroups, 0, wxALL, 5 );
+    
+    btnModifyGroups = new wxButton( tabMembers, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47211->Add( btnModifyGroups, 0, wxALL, 5 );
+    
+    btnDeleteGroups = new wxButton( tabMembers, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47211->Add( btnDeleteGroups, 0, wxALL, 5 );
+    
+    
+    bSizer46211->Add( bSizer47211, 1, wxEXPAND, 5 );
+    
+    
+    szrCategoriesOuter1->Add( bSizer46211, 1, wxEXPAND, 5 );
+    
+    
+    szrAddresses111->Add( szrCategoriesOuter1, 0, wxEXPAND, 5 );
+    
+    
+    tabMembers->SetSizer( szrAddresses111 );
+    tabMembers->Layout();
+    szrAddresses111->Fit( tabMembers );
+    nbkContact->AddPage( tabMembers, wxT("Members"), false );
+    tabPictures = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabPictures->SetScrollRate( 5, 5 );
+    wxBoxSizer* bSizer210;
+    bSizer210 = new wxBoxSizer( wxHORIZONTAL );
+    
+    imgPicture = new wxStaticBitmap( tabPictures, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER );
+    bSizer210->Add( imgPicture, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer211;
+    bSizer211 = new wxBoxSizer( wxVERTICAL );
+    
+    lboPictures = new wxListCtrl( tabPictures, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer211->Add( lboPictures, 0, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer212;
+    bSizer212 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer213;
+    bSizer213 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAddPicture = new wxButton( tabPictures, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer213->Add( btnAddPicture, 0, wxALL, 5 );
+    
+    btnModifyPicture = new wxButton( tabPictures, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer213->Add( btnModifyPicture, 0, wxALL, 5 );
+    
+    btnDeletePicture = new wxButton( tabPictures, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer213->Add( btnDeletePicture, 0, wxALL, 5 );
+    
+    
+    bSizer212->Add( bSizer213, 1, wxEXPAND, 5 );
+    
+    
+    bSizer211->Add( bSizer212, 0, wxEXPAND, 5 );
+    
+    
+    bSizer210->Add( bSizer211, 1, wxEXPAND, 5 );
+    
+    
+    tabPictures->SetSizer( bSizer210 );
+    tabPictures->Layout();
+    bSizer210->Fit( tabPictures );
+    nbkContact->AddPage( tabPictures, wxT("Pictures"), false );
+    tabLogo = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabLogo->SetScrollRate( 5, 5 );
+    wxBoxSizer* bSizer2101;
+    bSizer2101 = new wxBoxSizer( wxHORIZONTAL );
+    
+    imgLogo = new wxStaticBitmap( tabLogo, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER );
+    bSizer2101->Add( imgLogo, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer2111;
+    bSizer2111 = new wxBoxSizer( wxVERTICAL );
+    
+    lboLogos = new wxListCtrl( tabLogo, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer2111->Add( lboLogos, 0, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer2121;
+    bSizer2121 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer2131;
+    bSizer2131 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAddLogo = new wxButton( tabLogo, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer2131->Add( btnAddLogo, 0, wxALL, 5 );
+    
+    btnModifyLogo = new wxButton( tabLogo, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer2131->Add( btnModifyLogo, 0, wxALL, 5 );
+    
+    btnDeleteLogo = new wxButton( tabLogo, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer2131->Add( btnDeleteLogo, 0, wxALL, 5 );
+    
+    
+    bSizer2121->Add( bSizer2131, 1, wxEXPAND, 5 );
+    
+    
+    bSizer2111->Add( bSizer2121, 0, wxEXPAND, 5 );
+    
+    
+    bSizer2101->Add( bSizer2111, 1, wxEXPAND, 5 );
+    
+    
+    tabLogo->SetSizer( bSizer2101 );
+    tabLogo->Layout();
+    bSizer2101->Fit( tabLogo );
+    nbkContact->AddPage( tabLogo, wxT("Logos"), false );
+    tabSounds = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabSounds->SetScrollRate( 5, 5 );
+    wxBoxSizer* szrAddresses1111;
+    szrAddresses1111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboSounds = new wxListCtrl( tabSounds, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    szrAddresses1111->Add( lboSounds, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrCategoriesOuter11;
+    szrCategoriesOuter11 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer462111;
+    bSizer462111 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer472111;
+    bSizer472111 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddSound = new wxButton( tabSounds, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer472111->Add( btnAddSound, 0, wxALL, 5 );
+    
+    btnModifySound = new wxButton( tabSounds, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer472111->Add( btnModifySound, 0, wxALL, 5 );
+    
+    btnDeleteSound = new wxButton( tabSounds, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer472111->Add( btnDeleteSound, 0, wxALL, 5 );
+    
+    m_staticline1 = new wxStaticLine( tabSounds, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+    bSizer472111->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer348;
+    bSizer348 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnPlay = new wxBitmapButton( tabSounds, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
+    btnPlay->SetMinSize( wxSize( -1,32 ) );
+    
+    bSizer348->Add( btnPlay, 0, wxALL|wxEXPAND, 5 );
+    
+    btnStop = new wxBitmapButton( tabSounds, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
+    btnStop->SetMinSize( wxSize( -1,32 ) );
+    
+    bSizer348->Add( btnStop, 0, wxALL, 5 );
+    
+    
+    bSizer472111->Add( bSizer348, 0, wxALIGN_CENTER, 5 );
+    
+    
+    bSizer462111->Add( bSizer472111, 1, wxEXPAND, 5 );
+    
+    
+    szrCategoriesOuter11->Add( bSizer462111, 1, wxEXPAND, 5 );
+    
+    
+    szrAddresses1111->Add( szrCategoriesOuter11, 0, wxEXPAND, 5 );
+    
+    
+    tabSounds->SetSizer( szrAddresses1111 );
+    tabSounds->Layout();
+    szrAddresses1111->Fit( tabSounds );
+    nbkContact->AddPage( tabSounds, wxT("Sounds"), true );
+    tabCalendaring = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabCalendaring->SetScrollRate( 5, 5 );
+    wxBoxSizer* bSizer1821;
+    bSizer1821 = new wxBoxSizer( wxVERTICAL );
+    
+    wxFlexGridSizer* fgSizer521;
+    fgSizer521 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer521->AddGrowableCol( 1 );
+    fgSizer521->SetFlexibleDirection( wxBOTH );
+    fgSizer521->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblCalendarAddresses = new wxStaticText( tabCalendaring, wxID_ANY, wxT("Calendar Addresses:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblCalendarAddresses->Wrap( 0 );
+    fgSizer521->Add( lblCalendarAddresses, 0, wxALL, 5 );
+    
+    wxBoxSizer* szrAddresses21;
+    szrAddresses21 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboCalendarAddresses = new wxListCtrl( tabCalendaring, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    szrAddresses21->Add( lboCalendarAddresses, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrAddressesOuter21;
+    szrAddressesOuter21 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer4631;
+    bSizer4631 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer4731;
+    bSizer4731 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddCalendarAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4731->Add( btnAddCalendarAddress, 0, wxALL, 5 );
+    
+    btnModifyCalendarAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4731->Add( btnModifyCalendarAddress, 0, wxALL, 5 );
+    
+    btnDeleteCalendarAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer4731->Add( btnDeleteCalendarAddress, 0, wxALL, 5 );
+    
+    
+    bSizer4631->Add( bSizer4731, 1, wxEXPAND, 5 );
+    
+    
+    szrAddressesOuter21->Add( bSizer4631, 1, wxEXPAND, 5 );
+    
+    
+    szrAddresses21->Add( szrAddressesOuter21, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer521->Add( szrAddresses21, 1, wxEXPAND, 5 );
+    
+    lblCalendarRequestAddresses = new wxStaticText( tabCalendaring, wxID_ANY, wxT("Calendar Request Address:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblCalendarRequestAddresses->Wrap( 0 );
+    fgSizer521->Add( lblCalendarRequestAddresses, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer30131;
+    bSizer30131 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboCalendarRequestAddress = new wxListCtrl( tabCalendaring, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer30131->Add( lboCalendarRequestAddress, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer35131;
+    bSizer35131 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46131;
+    bSizer46131 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47131;
+    bSizer47131 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddCalendarRequestAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47131->Add( btnAddCalendarRequestAddress, 0, wxALL, 5 );
+    
+    btnModifyCalendarRequestAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47131->Add( btnModifyCalendarRequestAddress, 0, wxALL, 5 );
+    
+    btnDeleteCalendarRequestAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47131->Add( btnDeleteCalendarRequestAddress, 0, wxALL, 5 );
+    
+    
+    bSizer46131->Add( bSizer47131, 1, wxEXPAND, 5 );
+    
+    
+    bSizer35131->Add( bSizer46131, 1, wxEXPAND, 5 );
+    
+    
+    bSizer30131->Add( bSizer35131, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer521->Add( bSizer30131, 1, wxEXPAND, 5 );
+    
+    lblFreeBusyAddresses = new wxStaticText( tabCalendaring, wxID_ANY, wxT("Free/Busy Addresses:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblFreeBusyAddresses->Wrap( 0 );
+    fgSizer521->Add( lblFreeBusyAddresses, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer301131;
+    bSizer301131 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboFreeBusyAddresses = new wxListCtrl( tabCalendaring, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer301131->Add( lboFreeBusyAddresses, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer351131;
+    bSizer351131 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer461131;
+    bSizer461131 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer471131;
+    bSizer471131 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddFreeBusyAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471131->Add( btnAddFreeBusyAddress, 0, wxALL, 5 );
+    
+    btnModifyFreeBusyAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471131->Add( btnModifyFreeBusyAddress, 0, wxALL, 5 );
+    
+    btnDeleteFreeBusyAddress = new wxButton( tabCalendaring, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471131->Add( btnDeleteFreeBusyAddress, 0, wxALL, 5 );
+    
+    
+    bSizer461131->Add( bSizer471131, 1, wxEXPAND, 5 );
+    
+    
+    bSizer351131->Add( bSizer461131, 1, wxEXPAND, 5 );
+    
+    
+    bSizer301131->Add( bSizer351131, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer521->Add( bSizer301131, 1, wxEXPAND, 5 );
+    
+    
+    bSizer1821->Add( fgSizer521, 0, wxEXPAND, 5 );
+    
+    
+    tabCalendaring->SetSizer( bSizer1821 );
+    tabCalendaring->Layout();
+    bSizer1821->Fit( tabCalendaring );
+    nbkContact->AddPage( tabCalendaring, wxT("Calendaring"), false );
+    tabSecurity = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabSecurity->SetScrollRate( 5, 5 );
+    wxBoxSizer* szrAddresses1112;
+    szrAddresses1112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboKeys = new wxListCtrl( tabSecurity, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    szrAddresses1112->Add( lboKeys, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrCategoriesOuter12;
+    szrCategoriesOuter12 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer462112;
+    bSizer462112 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer472112;
+    bSizer472112 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddKey = new wxButton( tabSecurity, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer472112->Add( btnAddKey, 0, wxALL, 5 );
+    
+    btnModifyKey = new wxButton( tabSecurity, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer472112->Add( btnModifyKey, 0, wxALL, 5 );
+    
+    btnDeleteKey = new wxButton( tabSecurity, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer472112->Add( btnDeleteKey, 0, wxALL, 5 );
+    
+    
+    bSizer462112->Add( bSizer472112, 1, wxEXPAND, 5 );
+    
+    
+    szrCategoriesOuter12->Add( bSizer462112, 1, wxEXPAND, 5 );
+    
+    
+    szrAddresses1112->Add( szrCategoriesOuter12, 0, wxEXPAND, 5 );
+    
+    
+    tabSecurity->SetSizer( szrAddresses1112 );
+    tabSecurity->Layout();
+    szrAddresses1112->Fit( tabSecurity );
+    nbkContact->AddPage( tabSecurity, wxT("Security"), false );
+    tabOther = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+    tabOther->SetScrollRate( 5, 5 );
+    wxFlexGridSizer* fgSizer5211;
+    fgSizer5211 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer5211->AddGrowableCol( 1 );
+    fgSizer5211->SetFlexibleDirection( wxBOTH );
+    fgSizer5211->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblVendorNamespace = new wxStaticText( tabOther, wxID_ANY, wxT("Vendor Namespace:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblVendorNamespace->Wrap( 0 );
+    fgSizer5211->Add( lblVendorNamespace, 0, wxALL, 5 );
+    
+    wxBoxSizer* szrAddresses211;
+    szrAddresses211 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboVendorNamespace = new wxListCtrl( tabOther, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER );
+    szrAddresses211->Add( lboVendorNamespace, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* szrAddressesOuter211;
+    szrAddressesOuter211 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer46311;
+    bSizer46311 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer47311;
+    bSizer47311 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddVendorNamespace = new wxButton( tabOther, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47311->Add( btnAddVendorNamespace, 0, wxALL, 5 );
+    
+    btnModifyVendorNamespace = new wxButton( tabOther, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47311->Add( btnModifyVendorNamespace, 0, wxALL, 5 );
+    
+    btnDeleteVendorNamespace = new wxButton( tabOther, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer47311->Add( btnDeleteVendorNamespace, 0, wxALL, 5 );
+    
+    
+    bSizer46311->Add( bSizer47311, 1, wxEXPAND, 5 );
+    
+    
+    szrAddressesOuter211->Add( bSizer46311, 1, wxEXPAND, 5 );
+    
+    
+    szrAddresses211->Add( szrAddressesOuter211, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5211->Add( szrAddresses211, 1, wxEXPAND, 5 );
+    
+    lblXTokens = new wxStaticText( tabOther, wxID_ANY, wxT("X-Tokens:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblXTokens->Wrap( 0 );
+    fgSizer5211->Add( lblXTokens, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer301311;
+    bSizer301311 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lboXToken = new wxListCtrl( tabOther, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer301311->Add( lboXToken, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer351311;
+    bSizer351311 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer461311;
+    bSizer461311 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer471311;
+    bSizer471311 = new wxBoxSizer( wxVERTICAL );
+    
+    btnAddXToken = new wxButton( tabOther, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471311->Add( btnAddXToken, 0, wxALL, 5 );
+    
+    btnModifyXToken = new wxButton( tabOther, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471311->Add( btnModifyXToken, 0, wxALL, 5 );
+    
+    btnDeleteXToken = new wxButton( tabOther, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer471311->Add( btnDeleteXToken, 0, wxALL, 5 );
+    
+    
+    bSizer461311->Add( bSizer471311, 1, wxEXPAND, 5 );
+    
+    
+    bSizer351311->Add( bSizer461311, 1, wxEXPAND, 5 );
+    
+    
+    bSizer301311->Add( bSizer351311, 0, wxEXPAND, 5 );
+    
+    
+    fgSizer5211->Add( bSizer301311, 1, wxEXPAND, 5 );
+    
+    
+    tabOther->SetSizer( fgSizer5211 );
+    tabOther->Layout();
+    fgSizer5211->Fit( tabOther );
+    nbkContact->AddPage( tabOther, wxT("Other"), false );
+    
+    bSizer17->Add( nbkContact, 1, wxEXPAND | wxALL, 5 );
+    
+    
+    this->SetSizer( bSizer17 );
+    this->Layout();
+    m_menubar3 = new wxMenuBar( 0 );
+    mnuContact = new wxMenu();
+    wxMenuItem* mnuContactSave;
+    mnuContactSave = new wxMenuItem( mnuContact, CONTACT_SAVE, wxString( wxT("Save") ) + wxT('\t') + wxT("Ctrl+S"), wxEmptyString, wxITEM_NORMAL );
+    mnuContact->Append( mnuContactSave );
+    
+    wxMenuItem* mnuContactSaveClose;
+    mnuContactSaveClose = new wxMenuItem( mnuContact, CONTACT_SAVECLOSE, wxString( wxT("&Save and Close Contact") ) + wxT('\t') + wxT("Ctrl+Shift+S"), wxEmptyString, wxITEM_NORMAL );
+    mnuContact->Append( mnuContactSaveClose );
+    
+    mnuContact->AppendSeparator();
+    
+    wxMenuItem* mnuContactClose;
+    mnuContactClose = new wxMenuItem( mnuContact, CONTACT_CLOSE, wxString( wxT("Close") ) , wxEmptyString, wxITEM_NORMAL );
+    mnuContact->Append( mnuContactClose );
+    
+    m_menubar3->Append( mnuContact, wxT("&Contact") );
+    
+    mnuEdit = new wxMenu();
+    wxMenuItem* mnuEditCut;
+    mnuEditCut = new wxMenuItem( mnuEdit, wxID_CUT, wxString( wxT("Cu&t") ) + wxT('\t') + wxT("Ctrl+X"), wxEmptyString, wxITEM_NORMAL );
+    mnuEdit->Append( mnuEditCut );
+    
+    wxMenuItem* mnuEditCopy;
+    mnuEditCopy = new wxMenuItem( mnuEdit, wxID_COPY, wxString( wxT("&Copy") ) + wxT('\t') + wxT("Ctrl+C"), wxEmptyString, wxITEM_NORMAL );
+    mnuEdit->Append( mnuEditCopy );
+    
+    wxMenuItem* mnuEditPaste;
+    mnuEditPaste = new wxMenuItem( mnuEdit, wxID_PASTE, wxString( wxT("&Paste") ) + wxT('\t') + wxT("Ctrl+V"), wxEmptyString, wxITEM_NORMAL );
+    mnuEdit->Append( mnuEditPaste );
+    
+    m_menubar3->Append( mnuEdit, wxT("&Edit") );
+    
+    this->SetMenuBar( m_menubar3 );
+    
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmContactEditorADT::CloseWindow ) );
+    txtTitle->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
+    txtForename->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
+    txtSurname->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
+    txtOtherNames->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
+    txtSuffix->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
+    cmbDisplayAs->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorADT::UpdateName ), NULL, this );
+    cmbDisplayAs->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateName ), NULL, this );
+    cmbType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmContactEditorADT::UpdateMembersTab ), NULL, this );
+    btnAddGeneralNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralNickname ), NULL, this );
+    btnModifyGeneralNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralNickname ), NULL, this );
+    btnDeleteGeneralNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralNickname ), NULL, this );
+    btnAddGeneralAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralAddress ), NULL, this );
+    btnModifyGeneralAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralAddress ), NULL, this );
+    btnDeleteGeneralAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralAddress ), NULL, this );
+    btnAddEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralEmail ), NULL, this );
+    btnModifyEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralEmail ), NULL, this );
+    btnDeleteEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralEmail ), NULL, this );
+    btnAddIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralIM ), NULL, this );
+    btnModifyIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralIM ), NULL, this );
+    btnDeleteIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralIM ), NULL, this );
+    btnAddTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTelephone ), NULL, this );
+    btnModifyTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTelephone ), NULL, this );
+    btnDeleteTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTelephone ), NULL, this );
+    btnAddLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralLanguages ), NULL, this );
+    btnModifyLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralLanguages ), NULL, this );
+    btnDeleteLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralLanguage ), NULL, this );
+    btnAddTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTimezone ), NULL, this );
+    btnModifyTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTimezone ), NULL, this );
+    btnDeleteTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTimezone ), NULL, this );
+    btnAddGeneralGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralGeoposition ), NULL, this );
+    btnModifyGeneralGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralGeoposition ), NULL, this );
+    btnDeleteGeneralGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralGeoposition ), NULL, this );
+    btnAddRelated->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralRelated ), NULL, this );
+    btnModifyRelated->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralRelated ), NULL, this );
+    btnDeleteRelated->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralRelated ), NULL, this );
+    btnAddWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralWebsite ), NULL, this );
+    btnModifyWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralWebsite ), NULL, this );
+    btnDeleteWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralWebsite ), NULL, this );
+    btnAddTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTitle ), NULL, this );
+    btnModifyTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTitle ), NULL, this );
+    btnDeleteTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTitle ), NULL, this );
+    btnAddRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralRole ), NULL, this );
+    btnModifyRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralRole ), NULL, this );
+    btnDeleteRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralRole ), NULL, this );
+    btnAddOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralOrganisation ), NULL, this );
+    btnModifyOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralOrganisation ), NULL, this );
+    btnDeleteOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralOrganisation ), NULL, this );
+    btnAddNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralNote ), NULL, this );
+    btnModifyNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralNote ), NULL, this );
+    btnDeleteNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralNote ), NULL, this );
+    btnAddHomeNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeNickname ), NULL, this );
+    btnModifyHomeNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeNickname ), NULL, this );
+    btnDeleteHomeNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeNickname ), NULL, this );
+    btnAddHomeAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeAddress ), NULL, this );
+    btnModifyHomeAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeAddress ), NULL, this );
+    btnDeleteHomeAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeAddress ), NULL, this );
+    btnAddHomeEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeEmail ), NULL, this );
+    btnModifyHomeEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeEmail ), NULL, this );
+    btnDeleteHomeEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeEmail ), NULL, this );
+    btnAddHomeIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeIM ), NULL, this );
+    btnModifyHomeIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeIM ), NULL, this );
+    btnDeleteHomeIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeIM ), NULL, this );
+    btnAddHomeTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTelephone ), NULL, this );
+    btnModifyHomeTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTelephone ), NULL, this );
+    btnDeleteHomeTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTelephone ), NULL, this );
+    btnAddHomeLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeLanguage ), NULL, this );
+    btnModifyHomeLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeLanguage ), NULL, this );
+    btnDeleteHomeLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeLanguage ), NULL, this );
+    btnAddHomeTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTimezone ), NULL, this );
+    btnModifyHomeTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTimezone ), NULL, this );
+    btnDeleteHomeTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTimezone ), NULL, this );
+    btnAddHomeGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeGeoposition ), NULL, this );
+    btnModifyHomeGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeGeoposition ), NULL, this );
+    btnDeleteHomePosition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeGeoposition ), NULL, this );
+    btnAddHomeWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeWebsite ), NULL, this );
+    btnHomeModifyWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeWebsite ), NULL, this );
+    btnDeleteHomeWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeWebsite ), NULL, this );
+    btnAddHomeTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTitle ), NULL, this );
+    btnModifyHomeTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTitle ), NULL, this );
+    btnDeleteHomeTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTitle ), NULL, this );
+    btnAddHomeRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeRole ), NULL, this );
+    btnModifyHomeRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeRole ), NULL, this );
+    btnDeleteHomeRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeRole ), NULL, this );
+    btnAddHomeOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeOrganisation ), NULL, this );
+    btnModifyHomeOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeOrganisation ), NULL, this );
+    btnDeleteHomeOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeOrganisation ), NULL, this );
+    btnAddHomeNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeNote ), NULL, this );
+    btnModifyHomeNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeNote ), NULL, this );
+    btnDeleteHomeNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeNote ), NULL, this );
+    btnAddBusinessNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessNickname ), NULL, this );
+    btnModifyBusinessNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessNickname ), NULL, this );
+    btnDeleteBusinessNickname->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessNickname ), NULL, this );
+    btnAddBusinessAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessAddress ), NULL, this );
+    btnModifyBusinessAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessAddress ), NULL, this );
+    btnDeleteBusinessAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessAddress ), NULL, this );
+    btnAddBusinessEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessEmail ), NULL, this );
+    btnModifyBusinessEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessEmail ), NULL, this );
+    btnDeleteBusinessEmailAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessEmail ), NULL, this );
+    btnAddBusinessIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessIM ), NULL, this );
+    btnModifyBusinessIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessIM ), NULL, this );
+    btnDeleteBusinessIMAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessIM ), NULL, this );
+    btnBusinessAddTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTelephone ), NULL, this );
+    btnBusinessModifyTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTelephone ), NULL, this );
+    btnBusinessDeleteTelephone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTelephone ), NULL, this );
+    btnBusinessAddLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessLanguage ), NULL, this );
+    btnBusinessModifyLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessLanguage ), NULL, this );
+    btnBusinessDeleteLanguage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessLanguage ), NULL, this );
+    btnBusinessAddTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTimezone ), NULL, this );
+    btnBusinessModifyTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTimezone ), NULL, this );
+    btnDeleteBusinessTimezone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTimezone ), NULL, this );
+    btnAddBusinessGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessGeoposition ), NULL, this );
+    btnModifyBusinessGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessGeoposition ), NULL, this );
+    btnDeleteBusinessGeoposition->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessGeoposition ), NULL, this );
+    btnAddBusinessWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessWebsite ), NULL, this );
+    btnModifyBusinessWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessWebsite ), NULL, this );
+    btnDeleteBusinessWebsite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessWebsite ), NULL, this );
+    btnAddBusinessTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTitle ), NULL, this );
+    btnModifyBusinessTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTitle ), NULL, this );
+    btnDeleteBusinessTitle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTitle ), NULL, this );
+    btnAddBusinessRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessRole ), NULL, this );
+    btnModifyBusinessRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessRole ), NULL, this );
+    btnDeleteBusinessRole->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessRole ), NULL, this );
+    btnAddBusinessOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessOrganisation ), NULL, this );
+    btnModifyBusinessOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessOrganisation ), NULL, this );
+    btnDeleteBusinessOrganisations->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessOrganisation ), NULL, this );
+    btnBusinessAddNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessNote ), NULL, this );
+    btnBusinessModifyNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessNote ), NULL, this );
+    btnBusinessDeleteNote->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessNote ), NULL, this );
+    btnAddCategory->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCategory ), NULL, this );
+    btnModifyCategory->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCategory ), NULL, this );
+    btnDeleteCategory->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCategory ), NULL, this );
+    btnAddGroups->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGroup ), NULL, this );
+    btnModifyGroups->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGroup ), NULL, this );
+    btnDeleteGroups->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGroup ), NULL, this );
+    lboPictures->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmContactEditorADT::LoadPicture ), NULL, this );
+    btnAddPicture->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddPicture ), NULL, this );
+    btnModifyPicture->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyPicture ), NULL, this );
+    btnDeletePicture->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeletePicture ), NULL, this );
+    lboLogos->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmContactEditorADT::LoadLogo ), NULL, this );
+    btnAddLogo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddLogo ), NULL, this );
+    btnModifyLogo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyLogo ), NULL, this );
+    btnDeleteLogo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteLogo ), NULL, this );
+    btnAddSound->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddSound ), NULL, this );
+    btnModifySound->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifySound ), NULL, this );
+    btnDeleteSound->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteSound ), NULL, this );
+    btnPlay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::PlaySound ), NULL, this );
+    btnStop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::StopSound ), NULL, this );
+    btnAddCalendarAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCalendarAddress ), NULL, this );
+    btnModifyCalendarAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCalendarAddress ), NULL, this );
+    btnDeleteCalendarAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCalendarAddress ), NULL, this );
+    btnAddCalendarRequestAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCalendarRequest ), NULL, this );
+    btnModifyCalendarRequestAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCalendarRequest ), NULL, this );
+    btnDeleteCalendarRequestAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCalendarAddress ), NULL, this );
+    btnAddFreeBusyAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddFreeBusy ), NULL, this );
+    btnModifyFreeBusyAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyFreeBusy ), NULL, this );
+    btnDeleteFreeBusyAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteFreeBusy ), NULL, this );
+    btnAddKey->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddKey ), NULL, this );
+    btnModifyKey->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyKey ), NULL, this );
+    btnDeleteKey->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteKey ), NULL, this );
+    btnAddVendorNamespace->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddVendorNamespace ), NULL, this );
+    btnModifyVendorNamespace->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyVendorNamespace ), NULL, this );
+    btnDeleteVendorNamespace->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteVendorNamespace ), NULL, this );
+    btnAddXToken->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddXToken ), NULL, this );
+    btnModifyXToken->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyXToken ), NULL, this );
+    btnDeleteXToken->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteXToken ), NULL, this );
+    this->Connect( mnuContactSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::SaveContact ) );
+    this->Connect( mnuContactSaveClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::SaveCloseContact ) );
+    this->Connect( mnuContactClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CloseContact ) );
+    this->Connect( mnuEditCut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CutText ) );
+    this->Connect( mnuEditCopy->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CopyText ) );
+    this->Connect( mnuEditPaste->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::PasteText ) );
 }
 
 frmContactEditorADT::~frmContactEditorADT()
 {
-       // Disconnect Events
-       this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmContactEditorADT::CloseWindow ) );
-       txtTitle->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
-       txtForename->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
-       txtSurname->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
-       txtOtherNames->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
-       txtSuffix->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
-       cmbDisplayAs->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorADT::UpdateName ), NULL, this );
-       cmbDisplayAs->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateName ), NULL, this );
-       cmbType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmContactEditorADT::UpdateMembersTab ), NULL, this );
-       btnAddGeneralNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralNickname ), NULL, this );
-       btnModifyGeneralNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralNickname ), NULL, this );
-       btnDeleteGeneralNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralNickname ), NULL, this );
-       btnAddGeneralAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralAddress ), NULL, this );
-       btnModifyGeneralAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralAddress ), NULL, this );
-       btnDeleteGeneralAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralAddress ), NULL, this );
-       btnAddEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralEmail ), NULL, this );
-       btnModifyEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralEmail ), NULL, this );
-       btnDeleteEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralEmail ), NULL, this );
-       btnAddIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralIM ), NULL, this );
-       btnModifyIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralIM ), NULL, this );
-       btnDeleteIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralIM ), NULL, this );
-       btnAddTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTelephone ), NULL, this );
-       btnModifyTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTelephone ), NULL, this );
-       btnDeleteTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTelephone ), NULL, this );
-       btnAddLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralLanguages ), NULL, this );
-       btnModifyLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralLanguages ), NULL, this );
-       btnDeleteLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralLanguage ), NULL, this );
-       btnAddTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTimezone ), NULL, this );
-       btnModifyTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTimezone ), NULL, this );
-       btnDeleteTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTimezone ), NULL, this );
-       btnAddGeneralGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralGeoposition ), NULL, this );
-       btnModifyGeneralGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralGeoposition ), NULL, this );
-       btnDeleteGeneralGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralGeoposition ), NULL, this );
-       btnAddRelated->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralRelated ), NULL, this );
-       btnModifyRelated->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralRelated ), NULL, this );
-       btnDeleteRelated->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralRelated ), NULL, this );
-       btnAddWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralWebsite ), NULL, this );
-       btnModifyWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralWebsite ), NULL, this );
-       btnDeleteWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralWebsite ), NULL, this );
-       btnAddTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTitle ), NULL, this );
-       btnModifyTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTitle ), NULL, this );
-       btnDeleteTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTitle ), NULL, this );
-       btnAddRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralRole ), NULL, this );
-       btnModifyRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralRole ), NULL, this );
-       btnDeleteRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralRole ), NULL, this );
-       btnAddOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralOrganisation ), NULL, this );
-       btnModifyOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralOrganisation ), NULL, this );
-       btnDeleteOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralOrganisation ), NULL, this );
-       btnAddNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralNote ), NULL, this );
-       btnModifyNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralNote ), NULL, this );
-       btnDeleteNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralNote ), NULL, this );
-       btnAddHomeNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeNickname ), NULL, this );
-       btnModifyHomeNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeNickname ), NULL, this );
-       btnDeleteHomeNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeNickname ), NULL, this );
-       btnAddHomeAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeAddress ), NULL, this );
-       btnModifyHomeAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeAddress ), NULL, this );
-       btnDeleteHomeAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeAddress ), NULL, this );
-       btnAddHomeEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeEmail ), NULL, this );
-       btnModifyHomeEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeEmail ), NULL, this );
-       btnDeleteHomeEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeEmail ), NULL, this );
-       btnAddHomeIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeIM ), NULL, this );
-       btnModifyHomeIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeIM ), NULL, this );
-       btnDeleteHomeIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeIM ), NULL, this );
-       btnAddHomeTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTelephone ), NULL, this );
-       btnModifyHomeTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTelephone ), NULL, this );
-       btnDeleteHomeTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTelephone ), NULL, this );
-       btnAddHomeLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeLanguage ), NULL, this );
-       btnModifyHomeLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeLanguage ), NULL, this );
-       btnDeleteHomeLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeLanguage ), NULL, this );
-       btnAddHomeTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTimezone ), NULL, this );
-       btnModifyHomeTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTimezone ), NULL, this );
-       btnDeleteHomeTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTimezone ), NULL, this );
-       btnAddHomeGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeGeoposition ), NULL, this );
-       btnModifyHomeGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeGeoposition ), NULL, this );
-       btnDeleteHomePosition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeGeoposition ), NULL, this );
-       btnAddHomeWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeWebsite ), NULL, this );
-       btnHomeModifyWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeWebsite ), NULL, this );
-       btnDeleteHomeWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeWebsite ), NULL, this );
-       btnAddHomeTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTitle ), NULL, this );
-       btnModifyHomeTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTitle ), NULL, this );
-       btnDeleteHomeTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTitle ), NULL, this );
-       btnAddHomeRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeRole ), NULL, this );
-       btnModifyHomeRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeRole ), NULL, this );
-       btnDeleteHomeRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeRole ), NULL, this );
-       btnAddHomeOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeOrganisation ), NULL, this );
-       btnModifyHomeOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeOrganisation ), NULL, this );
-       btnDeleteHomeOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeOrganisation ), NULL, this );
-       btnAddHomeNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeNote ), NULL, this );
-       btnModifyHomeNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeNote ), NULL, this );
-       btnDeleteHomeNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeNote ), NULL, this );
-       btnAddBusinessNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessNickname ), NULL, this );
-       btnModifyBusinessNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessNickname ), NULL, this );
-       btnDeleteBusinessNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessNickname ), NULL, this );
-       btnAddBusinessAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessAddress ), NULL, this );
-       btnModifyBusinessAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessAddress ), NULL, this );
-       btnDeleteBusinessAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessAddress ), NULL, this );
-       btnAddBusinessEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessEmail ), NULL, this );
-       btnModifyBusinessEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessEmail ), NULL, this );
-       btnDeleteBusinessEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessEmail ), NULL, this );
-       btnAddBusinessIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessIM ), NULL, this );
-       btnModifyBusinessIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessIM ), NULL, this );
-       btnDeleteBusinessIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessIM ), NULL, this );
-       btnBusinessAddTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTelephone ), NULL, this );
-       btnBusinessModifyTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTelephone ), NULL, this );
-       btnBusinessDeleteTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTelephone ), NULL, this );
-       btnBusinessAddLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessLanguage ), NULL, this );
-       btnBusinessModifyLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessLanguage ), NULL, this );
-       btnBusinessDeleteLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessLanguage ), NULL, this );
-       btnBusinessAddTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTimezone ), NULL, this );
-       btnBusinessModifyTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTimezone ), NULL, this );
-       btnDeleteBusinessTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTimezone ), NULL, this );
-       btnAddBusinessGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessGeoposition ), NULL, this );
-       btnModifyBusinessGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessGeoposition ), NULL, this );
-       btnDeleteBusinessGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessGeoposition ), NULL, this );
-       btnAddBusinessWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessWebsite ), NULL, this );
-       btnModifyBusinessWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessWebsite ), NULL, this );
-       btnDeleteBusinessWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessWebsite ), NULL, this );
-       btnAddBusinessTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTitle ), NULL, this );
-       btnModifyBusinessTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTitle ), NULL, this );
-       btnDeleteBusinessTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTitle ), NULL, this );
-       btnAddBusinessRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessRole ), NULL, this );
-       btnModifyBusinessRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessRole ), NULL, this );
-       btnDeleteBusinessRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessRole ), NULL, this );
-       btnAddBusinessOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessOrganisation ), NULL, this );
-       btnModifyBusinessOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessOrganisation ), NULL, this );
-       btnDeleteBusinessOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessOrganisation ), NULL, this );
-       btnBusinessAddNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessNote ), NULL, this );
-       btnBusinessModifyNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessNote ), NULL, this );
-       btnBusinessDeleteNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessNote ), NULL, this );
-       btnAddCategory->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCategory ), NULL, this );
-       btnModifyCategory->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCategory ), NULL, this );
-       btnDeleteCategory->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCategory ), NULL, this );
-       btnAddGroups->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGroup ), NULL, this );
-       btnModifyGroups->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGroup ), NULL, this );
-       btnDeleteGroups->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGroup ), NULL, this );
-       lboPictures->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmContactEditorADT::LoadPicture ), NULL, this );
-       btnAddPicture->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddPicture ), NULL, this );
-       btnModifyPicture->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyPicture ), NULL, this );
-       btnDeletePicture->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeletePicture ), NULL, this );
-       lboLogos->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmContactEditorADT::LoadLogo ), NULL, this );
-       btnAddLogo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddLogo ), NULL, this );
-       btnModifyLogo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyLogo ), NULL, this );
-       btnDeleteLogo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteLogo ), NULL, this );
-       btnAddSound->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddSound ), NULL, this );
-       btnModifySound->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifySound ), NULL, this );
-       btnDeleteSound->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteSound ), NULL, this );
-       btnPlay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::PlaySound ), NULL, this );
-       btnStop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::StopSound ), NULL, this );
-       btnAddCalendarAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCalendarAddress ), NULL, this );
-       btnModifyCalendarAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCalendarAddress ), NULL, this );
-       btnDeleteCalendarAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCalendarAddress ), NULL, this );
-       btnAddCalendarRequestAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCalendarRequest ), NULL, this );
-       btnModifyCalendarRequestAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCalendarRequest ), NULL, this );
-       btnDeleteCalendarRequestAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCalendarAddress ), NULL, this );
-       btnAddFreeBusyAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddFreeBusy ), NULL, this );
-       btnModifyFreeBusyAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyFreeBusy ), NULL, this );
-       btnDeleteFreeBusyAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteFreeBusy ), NULL, this );
-       btnAddKey->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddKey ), NULL, this );
-       btnModifyKey->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyKey ), NULL, this );
-       btnDeleteKey->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteKey ), NULL, this );
-       btnAddVendorNamespace->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddVendorNamespace ), NULL, this );
-       btnModifyVendorNamespace->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyVendorNamespace ), NULL, this );
-       btnDeleteVendorNamespace->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteVendorNamespace ), NULL, this );
-       btnAddXToken->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddXToken ), NULL, this );
-       btnModifyXToken->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyXToken ), NULL, this );
-       btnDeleteXToken->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteXToken ), NULL, this );
-       this->Disconnect( CONTACT_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::SaveContact ) );
-       this->Disconnect( CONTACT_SAVECLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::SaveCloseContact ) );
-       this->Disconnect( CONTACT_CLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CloseContact ) );
-       this->Disconnect( wxID_CUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CutText ) );
-       this->Disconnect( wxID_COPY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CopyText ) );
-       this->Disconnect( wxID_PASTE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::PasteText ) );
-       
+    // Disconnect Events
+    this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmContactEditorADT::CloseWindow ) );
+    txtTitle->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
+    txtForename->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
+    txtSurname->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
+    txtOtherNames->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
+    txtSuffix->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateDisplayAs ), NULL, this );
+    cmbDisplayAs->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorADT::UpdateName ), NULL, this );
+    cmbDisplayAs->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorADT::UpdateName ), NULL, this );
+    cmbType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmContactEditorADT::UpdateMembersTab ), NULL, this );
+    btnAddGeneralNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralNickname ), NULL, this );
+    btnModifyGeneralNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralNickname ), NULL, this );
+    btnDeleteGeneralNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralNickname ), NULL, this );
+    btnAddGeneralAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralAddress ), NULL, this );
+    btnModifyGeneralAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralAddress ), NULL, this );
+    btnDeleteGeneralAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralAddress ), NULL, this );
+    btnAddEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralEmail ), NULL, this );
+    btnModifyEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralEmail ), NULL, this );
+    btnDeleteEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralEmail ), NULL, this );
+    btnAddIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralIM ), NULL, this );
+    btnModifyIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralIM ), NULL, this );
+    btnDeleteIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralIM ), NULL, this );
+    btnAddTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTelephone ), NULL, this );
+    btnModifyTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTelephone ), NULL, this );
+    btnDeleteTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTelephone ), NULL, this );
+    btnAddLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralLanguages ), NULL, this );
+    btnModifyLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralLanguages ), NULL, this );
+    btnDeleteLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralLanguage ), NULL, this );
+    btnAddTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTimezone ), NULL, this );
+    btnModifyTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTimezone ), NULL, this );
+    btnDeleteTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTimezone ), NULL, this );
+    btnAddGeneralGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralGeoposition ), NULL, this );
+    btnModifyGeneralGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralGeoposition ), NULL, this );
+    btnDeleteGeneralGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralGeoposition ), NULL, this );
+    btnAddRelated->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralRelated ), NULL, this );
+    btnModifyRelated->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralRelated ), NULL, this );
+    btnDeleteRelated->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralRelated ), NULL, this );
+    btnAddWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralWebsite ), NULL, this );
+    btnModifyWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralWebsite ), NULL, this );
+    btnDeleteWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralWebsite ), NULL, this );
+    btnAddTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralTitle ), NULL, this );
+    btnModifyTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralTitle ), NULL, this );
+    btnDeleteTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralTitle ), NULL, this );
+    btnAddRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralRole ), NULL, this );
+    btnModifyRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralRole ), NULL, this );
+    btnDeleteRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralRole ), NULL, this );
+    btnAddOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralOrganisation ), NULL, this );
+    btnModifyOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralOrganisation ), NULL, this );
+    btnDeleteOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralOrganisation ), NULL, this );
+    btnAddNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGeneralNote ), NULL, this );
+    btnModifyNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGeneralNote ), NULL, this );
+    btnDeleteNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGeneralNote ), NULL, this );
+    btnAddHomeNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeNickname ), NULL, this );
+    btnModifyHomeNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeNickname ), NULL, this );
+    btnDeleteHomeNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeNickname ), NULL, this );
+    btnAddHomeAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeAddress ), NULL, this );
+    btnModifyHomeAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeAddress ), NULL, this );
+    btnDeleteHomeAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeAddress ), NULL, this );
+    btnAddHomeEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeEmail ), NULL, this );
+    btnModifyHomeEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeEmail ), NULL, this );
+    btnDeleteHomeEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeEmail ), NULL, this );
+    btnAddHomeIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeIM ), NULL, this );
+    btnModifyHomeIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeIM ), NULL, this );
+    btnDeleteHomeIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeIM ), NULL, this );
+    btnAddHomeTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTelephone ), NULL, this );
+    btnModifyHomeTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTelephone ), NULL, this );
+    btnDeleteHomeTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTelephone ), NULL, this );
+    btnAddHomeLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeLanguage ), NULL, this );
+    btnModifyHomeLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeLanguage ), NULL, this );
+    btnDeleteHomeLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeLanguage ), NULL, this );
+    btnAddHomeTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTimezone ), NULL, this );
+    btnModifyHomeTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTimezone ), NULL, this );
+    btnDeleteHomeTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTimezone ), NULL, this );
+    btnAddHomeGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeGeoposition ), NULL, this );
+    btnModifyHomeGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeGeoposition ), NULL, this );
+    btnDeleteHomePosition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeGeoposition ), NULL, this );
+    btnAddHomeWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeWebsite ), NULL, this );
+    btnHomeModifyWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeWebsite ), NULL, this );
+    btnDeleteHomeWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeWebsite ), NULL, this );
+    btnAddHomeTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeTitle ), NULL, this );
+    btnModifyHomeTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeTitle ), NULL, this );
+    btnDeleteHomeTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeTitle ), NULL, this );
+    btnAddHomeRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeRole ), NULL, this );
+    btnModifyHomeRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeRole ), NULL, this );
+    btnDeleteHomeRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeRole ), NULL, this );
+    btnAddHomeOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeOrganisation ), NULL, this );
+    btnModifyHomeOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeOrganisation ), NULL, this );
+    btnDeleteHomeOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeOrganisation ), NULL, this );
+    btnAddHomeNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddHomeNote ), NULL, this );
+    btnModifyHomeNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyHomeNote ), NULL, this );
+    btnDeleteHomeNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteHomeNote ), NULL, this );
+    btnAddBusinessNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessNickname ), NULL, this );
+    btnModifyBusinessNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessNickname ), NULL, this );
+    btnDeleteBusinessNickname->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessNickname ), NULL, this );
+    btnAddBusinessAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessAddress ), NULL, this );
+    btnModifyBusinessAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessAddress ), NULL, this );
+    btnDeleteBusinessAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessAddress ), NULL, this );
+    btnAddBusinessEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessEmail ), NULL, this );
+    btnModifyBusinessEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessEmail ), NULL, this );
+    btnDeleteBusinessEmailAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessEmail ), NULL, this );
+    btnAddBusinessIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessIM ), NULL, this );
+    btnModifyBusinessIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessIM ), NULL, this );
+    btnDeleteBusinessIMAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessIM ), NULL, this );
+    btnBusinessAddTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTelephone ), NULL, this );
+    btnBusinessModifyTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTelephone ), NULL, this );
+    btnBusinessDeleteTelephone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTelephone ), NULL, this );
+    btnBusinessAddLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessLanguage ), NULL, this );
+    btnBusinessModifyLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessLanguage ), NULL, this );
+    btnBusinessDeleteLanguage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessLanguage ), NULL, this );
+    btnBusinessAddTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTimezone ), NULL, this );
+    btnBusinessModifyTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTimezone ), NULL, this );
+    btnDeleteBusinessTimezone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTimezone ), NULL, this );
+    btnAddBusinessGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessGeoposition ), NULL, this );
+    btnModifyBusinessGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessGeoposition ), NULL, this );
+    btnDeleteBusinessGeoposition->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessGeoposition ), NULL, this );
+    btnAddBusinessWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessWebsite ), NULL, this );
+    btnModifyBusinessWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessWebsite ), NULL, this );
+    btnDeleteBusinessWebsite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessWebsite ), NULL, this );
+    btnAddBusinessTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessTitle ), NULL, this );
+    btnModifyBusinessTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessTitle ), NULL, this );
+    btnDeleteBusinessTitle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessTitle ), NULL, this );
+    btnAddBusinessRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessRole ), NULL, this );
+    btnModifyBusinessRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessRole ), NULL, this );
+    btnDeleteBusinessRole->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessRole ), NULL, this );
+    btnAddBusinessOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessOrganisation ), NULL, this );
+    btnModifyBusinessOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessOrganisation ), NULL, this );
+    btnDeleteBusinessOrganisations->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessOrganisation ), NULL, this );
+    btnBusinessAddNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddBusinessNote ), NULL, this );
+    btnBusinessModifyNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyBusinessNote ), NULL, this );
+    btnBusinessDeleteNote->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteBusinessNote ), NULL, this );
+    btnAddCategory->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCategory ), NULL, this );
+    btnModifyCategory->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCategory ), NULL, this );
+    btnDeleteCategory->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCategory ), NULL, this );
+    btnAddGroups->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddGroup ), NULL, this );
+    btnModifyGroups->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyGroup ), NULL, this );
+    btnDeleteGroups->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteGroup ), NULL, this );
+    lboPictures->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmContactEditorADT::LoadPicture ), NULL, this );
+    btnAddPicture->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddPicture ), NULL, this );
+    btnModifyPicture->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyPicture ), NULL, this );
+    btnDeletePicture->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeletePicture ), NULL, this );
+    lboLogos->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmContactEditorADT::LoadLogo ), NULL, this );
+    btnAddLogo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddLogo ), NULL, this );
+    btnModifyLogo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyLogo ), NULL, this );
+    btnDeleteLogo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteLogo ), NULL, this );
+    btnAddSound->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddSound ), NULL, this );
+    btnModifySound->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifySound ), NULL, this );
+    btnDeleteSound->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteSound ), NULL, this );
+    btnPlay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::PlaySound ), NULL, this );
+    btnStop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::StopSound ), NULL, this );
+    btnAddCalendarAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCalendarAddress ), NULL, this );
+    btnModifyCalendarAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCalendarAddress ), NULL, this );
+    btnDeleteCalendarAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCalendarAddress ), NULL, this );
+    btnAddCalendarRequestAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCalendarRequest ), NULL, this );
+    btnModifyCalendarRequestAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyCalendarRequest ), NULL, this );
+    btnDeleteCalendarRequestAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteCalendarAddress ), NULL, this );
+    btnAddFreeBusyAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddFreeBusy ), NULL, this );
+    btnModifyFreeBusyAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyFreeBusy ), NULL, this );
+    btnDeleteFreeBusyAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteFreeBusy ), NULL, this );
+    btnAddKey->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddKey ), NULL, this );
+    btnModifyKey->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyKey ), NULL, this );
+    btnDeleteKey->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteKey ), NULL, this );
+    btnAddVendorNamespace->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddVendorNamespace ), NULL, this );
+    btnModifyVendorNamespace->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyVendorNamespace ), NULL, this );
+    btnDeleteVendorNamespace->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteVendorNamespace ), NULL, this );
+    btnAddXToken->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddXToken ), NULL, this );
+    btnModifyXToken->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyXToken ), NULL, this );
+    btnDeleteXToken->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteXToken ), NULL, this );
+    this->Disconnect( CONTACT_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::SaveContact ) );
+    this->Disconnect( CONTACT_SAVECLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::SaveCloseContact ) );
+    this->Disconnect( CONTACT_CLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CloseContact ) );
+    this->Disconnect( wxID_CUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CutText ) );
+    this->Disconnect( wxID_COPY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::CopyText ) );
+    this->Disconnect( wxID_PASTE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmContactEditorADT::PasteText ) );
+    
 }
 
 frmContactEditorAddressADT::frmContactEditorAddressADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkAddress = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 2, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblAddress = new wxStaticText( tabGeneral, wxID_ANY, wxT("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAddress->Wrap( -1 );
-       fgSizer6->Add( lblAddress, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtAddress = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtAddress->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtAddress, 0, wxALL|wxEXPAND, 5 );
-       
-       m_staticText61 = new wxStaticText( tabGeneral, wxID_ANY, wxT("Town/City:"), wxDefaultPosition, wxDefaultSize, 0 );
-       m_staticText61->Wrap( -1 );
-       fgSizer6->Add( m_staticText61, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtTownCity = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtTownCity->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtTownCity, 0, wxALL|wxEXPAND, 5 );
-       
-       lblCountyState = new wxStaticText( tabGeneral, wxID_ANY, wxT("County:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblCountyState->Wrap( -1 );
-       fgSizer6->Add( lblCountyState, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtCounty = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtCounty->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtCounty, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPostCode = new wxStaticText( tabGeneral, wxID_ANY, wxT("Post Code:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPostCode->Wrap( -1 );
-       fgSizer6->Add( lblPostCode, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtPostCode = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtPostCode->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtPostCode, 0, wxALL, 5 );
-       
-       lblCountry = new wxStaticText( tabGeneral, wxID_ANY, wxT("Country:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblCountry->Wrap( -1 );
-       fgSizer6->Add( lblCountry, 0, wxALL, 5 );
-       
-       txtCountry = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtCountry->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtCountry, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkAddress->AddPage( tabGeneral, wxT("General"), true );
-       tabLabel = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer253;
-       bSizer253 = new wxBoxSizer( wxVERTICAL );
-       
-       btnCopyMailing = new wxButton( tabLabel, wxID_ANY, wxT("Copy Address to Label"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer253->Add( btnCopyMailing, 0, wxALL, 5 );
-       
-       txtLabel = new wxTextCtrl( tabLabel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
-       txtLabel->SetMaxLength( 0 ); 
-       bSizer253->Add( txtLabel, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       tabLabel->SetSizer( bSizer253 );
-       tabLabel->Layout();
-       bSizer253->Fit( tabLabel );
-       nbkAddress->AddPage( tabLabel, wxT("Label"), false );
-       tabOther = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer61;
-       fgSizer61 = new wxFlexGridSizer( 2, 2, 0, 0 );
-       fgSizer61->AddGrowableCol( 1 );
-       fgSizer61->SetFlexibleDirection( wxVERTICAL );
-       fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblLanguage = new wxStaticText( tabOther, wxID_ANY, wxT("Language:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLanguage->Wrap( -1 );
-       fgSizer61->Add( lblLanguage, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       cmbLanguage = new wxComboBox( tabOther, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
-       fgSizer61->Add( cmbLanguage, 0, wxALL, 5 );
-       
-       lblGeography = new wxStaticText( tabOther, wxID_ANY, wxT("Geopositioning:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblGeography->Wrap( -1 );
-       fgSizer61->Add( lblGeography, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtGeo = new wxTextCtrl( tabOther, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtGeo->SetMaxLength( 0 ); 
-       fgSizer61->Add( txtGeo, 0, wxALL|wxEXPAND, 5 );
-       
-       lblTimezone = new wxStaticText( tabOther, wxID_ANY, wxT("Timezone:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblTimezone->Wrap( -1 );
-       fgSizer61->Add( lblTimezone, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtTimezone = new wxTextCtrl( tabOther, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtTimezone->SetMaxLength( 0 ); 
-       fgSizer61->Add( txtTimezone, 0, wxALL|wxEXPAND, 5 );
-       
-       
-       tabOther->SetSizer( fgSizer61 );
-       tabOther->Layout();
-       fgSizer61->Fit( tabOther );
-       nbkAddress->AddPage( tabOther, wxT("Other"), false );
-       
-       bSizer251->Add( nbkAddress, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorAddressADT::InitAddressEditor ) );
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::EnablePriority ), NULL, this );
-       btnCopyMailing->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::CopyAddress ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::ProcessData ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkAddress = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 2, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblAddress = new wxStaticText( tabGeneral, wxID_ANY, wxT("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAddress->Wrap( -1 );
+    fgSizer6->Add( lblAddress, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtAddress = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtAddress->SetMaxLength( 0 );
+    fgSizer6->Add( txtAddress, 0, wxALL|wxEXPAND, 5 );
+    
+    m_staticText61 = new wxStaticText( tabGeneral, wxID_ANY, wxT("Town/City:"), wxDefaultPosition, wxDefaultSize, 0 );
+    m_staticText61->Wrap( -1 );
+    fgSizer6->Add( m_staticText61, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtTownCity = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtTownCity->SetMaxLength( 0 );
+    fgSizer6->Add( txtTownCity, 0, wxALL|wxEXPAND, 5 );
+    
+    lblCountyState = new wxStaticText( tabGeneral, wxID_ANY, wxT("County:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblCountyState->Wrap( -1 );
+    fgSizer6->Add( lblCountyState, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtCounty = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtCounty->SetMaxLength( 0 );
+    fgSizer6->Add( txtCounty, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPostCode = new wxStaticText( tabGeneral, wxID_ANY, wxT("Post Code:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPostCode->Wrap( -1 );
+    fgSizer6->Add( lblPostCode, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtPostCode = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtPostCode->SetMaxLength( 0 );
+    fgSizer6->Add( txtPostCode, 0, wxALL, 5 );
+    
+    lblCountry = new wxStaticText( tabGeneral, wxID_ANY, wxT("Country:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblCountry->Wrap( -1 );
+    fgSizer6->Add( lblCountry, 0, wxALL, 5 );
+    
+    txtCountry = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtCountry->SetMaxLength( 0 );
+    fgSizer6->Add( txtCountry, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkAddress->AddPage( tabGeneral, wxT("General"), true );
+    tabLabel = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer253;
+    bSizer253 = new wxBoxSizer( wxVERTICAL );
+    
+    btnCopyMailing = new wxButton( tabLabel, wxID_ANY, wxT("Copy Address to Label"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer253->Add( btnCopyMailing, 0, wxALL, 5 );
+    
+    txtLabel = new wxTextCtrl( tabLabel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+    txtLabel->SetMaxLength( 0 );
+    bSizer253->Add( txtLabel, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    tabLabel->SetSizer( bSizer253 );
+    tabLabel->Layout();
+    bSizer253->Fit( tabLabel );
+    nbkAddress->AddPage( tabLabel, wxT("Label"), false );
+    tabOther = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer61;
+    fgSizer61 = new wxFlexGridSizer( 2, 2, 0, 0 );
+    fgSizer61->AddGrowableCol( 1 );
+    fgSizer61->SetFlexibleDirection( wxVERTICAL );
+    fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblLanguage = new wxStaticText( tabOther, wxID_ANY, wxT("Language:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLanguage->Wrap( -1 );
+    fgSizer61->Add( lblLanguage, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    cmbLanguage = new wxComboBox( tabOther, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+    fgSizer61->Add( cmbLanguage, 0, wxALL, 5 );
+    
+    lblGeography = new wxStaticText( tabOther, wxID_ANY, wxT("Geopositioning:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblGeography->Wrap( -1 );
+    fgSizer61->Add( lblGeography, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtGeo = new wxTextCtrl( tabOther, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtGeo->SetMaxLength( 0 );
+    fgSizer61->Add( txtGeo, 0, wxALL|wxEXPAND, 5 );
+    
+    lblTimezone = new wxStaticText( tabOther, wxID_ANY, wxT("Timezone:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblTimezone->Wrap( -1 );
+    fgSizer61->Add( lblTimezone, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtTimezone = new wxTextCtrl( tabOther, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtTimezone->SetMaxLength( 0 );
+    fgSizer61->Add( txtTimezone, 0, wxALL|wxEXPAND, 5 );
+    
+    
+    tabOther->SetSizer( fgSizer61 );
+    tabOther->Layout();
+    fgSizer61->Fit( tabOther );
+    nbkAddress->AddPage( tabOther, wxT("Other"), false );
+    
+    bSizer251->Add( nbkAddress, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorAddressADT::InitAddressEditor ) );
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::EnablePriority ), NULL, this );
+    btnCopyMailing->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::CopyAddress ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::ProcessData ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorAddressADT::~frmContactEditorAddressADT()
 {
-       // Disconnect Events
-       this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorAddressADT::InitAddressEditor ) );
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::EnablePriority ), NULL, this );
-       btnCopyMailing->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::CopyAddress ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::ProcessData ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorAddressADT::InitAddressEditor ) );
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::EnablePriority ), NULL, this );
+    btnCopyMailing->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::CopyAddress ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::ProcessData ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorAddressADT::CloseWindow ), NULL, this );
+    
 }
 
 frmConflictResolutionADT::frmConflictResolutionADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxFlexGridSizer* fgSizer39;
-       fgSizer39 = new wxFlexGridSizer( 0, 1, 0, 0 );
-       fgSizer39->AddGrowableCol( 0 );
-       fgSizer39->AddGrowableRow( 0 );
-       fgSizer39->SetFlexibleDirection( wxBOTH );
-       fgSizer39->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       wxBoxSizer* bSizer363;
-       bSizer363 = new wxBoxSizer( wxHORIZONTAL );
-       
-       wxBoxSizer* bSizer364;
-       bSizer364 = new wxBoxSizer( wxVERTICAL );
-       
-       lblText = new wxStaticText( this, wxID_ANY, wxT("An update for this contact has also taken place on the server.\nChoose which version to keep and either press Keep Local or Keep Server.\nTo decide later, click on Decide Later."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblText->Wrap( -1 );
-       bSizer364->Add( lblText, 0, wxALL|wxEXPAND, 5 );
-       
-       m_splitter3 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
-       m_splitter3->Connect( wxEVT_IDLE, wxIdleEventHandler( frmConflictResolutionADT::m_splitter3OnIdle ), NULL, this );
-       
-       m_panel44 = new wxPanel( m_splitter3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer365;
-       bSizer365 = new wxBoxSizer( wxVERTICAL );
-       
-       htmClient = new wxHtmlWindow( m_panel44, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
-       bSizer365->Add( htmClient, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       m_panel44->SetSizer( bSizer365 );
-       m_panel44->Layout();
-       bSizer365->Fit( m_panel44 );
-       m_panel45 = new wxPanel( m_splitter3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer366;
-       bSizer366 = new wxBoxSizer( wxVERTICAL );
-       
-       htmServer = new wxHtmlWindow( m_panel45, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
-       bSizer366->Add( htmServer, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       m_panel45->SetSizer( bSizer366 );
-       m_panel45->Layout();
-       bSizer366->Fit( m_panel45 );
-       m_splitter3->SplitVertically( m_panel44, m_panel45, 257 );
-       bSizer364->Add( m_splitter3, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer367;
-       bSizer367 = new wxBoxSizer( wxHORIZONTAL );
-       
-       
-       bSizer367->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       btnKeepLocal = new wxButton( this, wxID_ANY, wxT("Keep Local"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer367->Add( btnKeepLocal, 0, wxALL, 5 );
-       
-       btnKeepServer = new wxButton( this, wxID_ANY, wxT("Keep Server"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer367->Add( btnKeepServer, 0, wxALL, 5 );
-       
-       btnDecideLater = new wxButton( this, wxID_ANY, wxT("Decide Later"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer367->Add( btnDecideLater, 0, wxALL, 5 );
-       
-       
-       bSizer367->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       bSizer364->Add( bSizer367, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-       
-       
-       bSizer363->Add( bSizer364, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer39->Add( bSizer363, 1, wxEXPAND, 5 );
-       
-       
-       this->SetSizer( fgSizer39 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       btnKeepLocal->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::KeepLocalData ), NULL, this );
-       btnKeepServer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::KeepServerData ), NULL, this );
-       btnDecideLater->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::DecideLater ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxFlexGridSizer* fgSizer39;
+    fgSizer39 = new wxFlexGridSizer( 0, 1, 0, 0 );
+    fgSizer39->AddGrowableCol( 0 );
+    fgSizer39->AddGrowableRow( 0 );
+    fgSizer39->SetFlexibleDirection( wxBOTH );
+    fgSizer39->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    wxBoxSizer* bSizer363;
+    bSizer363 = new wxBoxSizer( wxHORIZONTAL );
+    
+    wxBoxSizer* bSizer364;
+    bSizer364 = new wxBoxSizer( wxVERTICAL );
+    
+    lblText = new wxStaticText( this, wxID_ANY, wxT("An update for this contact has also taken place on the server.\nChoose which version to keep and either press Keep Local or Keep Server.\nTo decide later, click on Decide Later."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblText->Wrap( -1 );
+    bSizer364->Add( lblText, 0, wxALL|wxEXPAND, 5 );
+    
+    m_splitter3 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
+    m_splitter3->Connect( wxEVT_IDLE, wxIdleEventHandler( frmConflictResolutionADT::m_splitter3OnIdle ), NULL, this );
+    
+    m_panel44 = new wxPanel( m_splitter3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer365;
+    bSizer365 = new wxBoxSizer( wxVERTICAL );
+    
+    htmClient = new wxHtmlWindow( m_panel44, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
+    bSizer365->Add( htmClient, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    m_panel44->SetSizer( bSizer365 );
+    m_panel44->Layout();
+    bSizer365->Fit( m_panel44 );
+    m_panel45 = new wxPanel( m_splitter3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer366;
+    bSizer366 = new wxBoxSizer( wxVERTICAL );
+    
+    htmServer = new wxHtmlWindow( m_panel45, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
+    bSizer366->Add( htmServer, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    m_panel45->SetSizer( bSizer366 );
+    m_panel45->Layout();
+    bSizer366->Fit( m_panel45 );
+    m_splitter3->SplitVertically( m_panel44, m_panel45, 257 );
+    bSizer364->Add( m_splitter3, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer367;
+    bSizer367 = new wxBoxSizer( wxHORIZONTAL );
+    
+    
+    bSizer367->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    btnKeepLocal = new wxButton( this, wxID_ANY, wxT("Keep Local"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer367->Add( btnKeepLocal, 0, wxALL, 5 );
+    
+    btnKeepServer = new wxButton( this, wxID_ANY, wxT("Keep Server"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer367->Add( btnKeepServer, 0, wxALL, 5 );
+    
+    btnDecideLater = new wxButton( this, wxID_ANY, wxT("Decide Later"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer367->Add( btnDecideLater, 0, wxALL, 5 );
+    
+    
+    bSizer367->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    bSizer364->Add( bSizer367, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+    
+    
+    bSizer363->Add( bSizer364, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer39->Add( bSizer363, 1, wxEXPAND, 5 );
+    
+    
+    this->SetSizer( fgSizer39 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    btnKeepLocal->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::KeepLocalData ), NULL, this );
+    btnKeepServer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::KeepServerData ), NULL, this );
+    btnDecideLater->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::DecideLater ), NULL, this );
 }
 
 frmConflictResolutionADT::~frmConflictResolutionADT()
 {
-       // Disconnect Events
-       btnKeepLocal->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::KeepLocalData ), NULL, this );
-       btnKeepServer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::KeepServerData ), NULL, this );
-       btnDecideLater->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::DecideLater ), NULL, this );
-       
+    // Disconnect Events
+    btnKeepLocal->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::KeepLocalData ), NULL, this );
+    btnKeepServer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::KeepServerData ), NULL, this );
+    btnDecideLater->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmConflictResolutionADT::DecideLater ), NULL, this );
+    
 }
 
 frmActivityMgrADT::frmActivityMgrADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxSize( 400,300 ), wxDefaultSize );
-       
-       mnuMenuBar = new wxMenuBar( 0 );
-       mnuWindow = new wxMenu();
-       wxMenuItem* mnuStopActivity;
-       mnuStopActivity = new wxMenuItem( mnuWindow, wxID_ANY, wxString( wxT("&Stop Activity") ) + wxT('\t') + wxT("CTRL+ALT+S"), wxEmptyString, wxITEM_NORMAL );
-       mnuWindow->Append( mnuStopActivity );
-       
-       wxMenuItem* mnuActivityStopAll;
-       mnuActivityStopAll = new wxMenuItem( mnuWindow, wxID_ANY, wxString( wxT("Stop All Activities") ) + wxT('\t') + wxT("CTRL+SHIFT+ALT+S"), wxEmptyString, wxITEM_NORMAL );
-       mnuWindow->Append( mnuActivityStopAll );
-       
-       wxMenuItem* mnuRetryActivity;
-       mnuRetryActivity = new wxMenuItem( mnuWindow, wxID_ANY, wxString( wxT("&Retry Activity") ) + wxT('\t') + wxT("CTRL+R"), wxEmptyString, wxITEM_NORMAL );
-       mnuWindow->Append( mnuRetryActivity );
-       
-       mnuWindow->AppendSeparator();
-       
-       wxMenuItem* mnuSleepMode;
-       mnuSleepMode = new wxMenuItem( mnuWindow, wxID_ANY, wxString( wxT("Sleep Mode") ) , wxEmptyString, wxITEM_CHECK );
-       #ifdef __WXMSW__
-       mnuSleepMode->SetBitmaps( wxNullBitmap );
-       #elif defined( __WXGTK__ )
-       mnuSleepMode->SetBitmap( wxNullBitmap );
-       #endif
-       mnuWindow->Append( mnuSleepMode );
-       
-       mnuWindow->AppendSeparator();
-       
-       wxMenuItem* mnuWindowClose;
-       mnuWindowClose = new wxMenuItem( mnuWindow, wxID_ANY, wxString( wxT("&Close Window") ) + wxT('\t') + wxT("ALT+F4"), wxEmptyString, wxITEM_NORMAL );
-       mnuWindow->Append( mnuWindowClose );
-       
-       mnuMenuBar->Append( mnuWindow, wxT("&Activity") ); 
-       
-       this->SetMenuBar( mnuMenuBar );
-       
-       wxFlexGridSizer* fgSizer38;
-       fgSizer38 = new wxFlexGridSizer( 0, 1, 0, 0 );
-       fgSizer38->AddGrowableCol( 0 );
-       fgSizer38->AddGrowableRow( 1 );
-       fgSizer38->SetFlexibleDirection( wxBOTH );
-       fgSizer38->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       m_panel43 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer363;
-       bSizer363 = new wxBoxSizer( wxHORIZONTAL );
-       
-       bmpActivity = new wxStaticBitmap( m_panel43, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
-       bmpActivity->SetMinSize( wxSize( 64,64 ) );
-       
-       bSizer363->Add( bmpActivity, 0, wxALL, 5 );
-       
-       m_panel46 = new wxPanel( m_panel43, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer364;
-       bSizer364 = new wxBoxSizer( wxVERTICAL );
-       
-       
-       bSizer364->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblDetails = new wxStaticText( m_panel46, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
-       lblDetails->Wrap( -1 );
-       bSizer364->Add( lblDetails, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 0 );
-       
-       
-       bSizer364->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       GauProgress = new wxGauge( m_panel46, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL );
-       GauProgress->SetValue( 0 ); 
-       GauProgress->SetMinSize( wxSize( -1,20 ) );
-       
-       bSizer364->Add( GauProgress, 0, wxALL|wxEXPAND, 0 );
-       
-       
-       bSizer364->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       m_panel46->SetSizer( bSizer364 );
-       m_panel46->Layout();
-       bSizer364->Fit( m_panel46 );
-       bSizer363->Add( m_panel46, 1, wxEXPAND | wxALL, 5 );
-       
-       
-       m_panel43->SetSizer( bSizer363 );
-       m_panel43->Layout();
-       bSizer363->Fit( m_panel43 );
-       fgSizer38->Add( m_panel43, 1, wxALL|wxEXPAND, 0 );
-       
-       m_panel44 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer365;
-       bSizer365 = new wxBoxSizer( wxVERTICAL );
-       
-       lstActivity = new wxListCtrl( m_panel44, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
-       bSizer365->Add( lstActivity, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       m_panel44->SetSizer( bSizer365 );
-       m_panel44->Layout();
-       bSizer365->Fit( m_panel44 );
-       fgSizer38->Add( m_panel44, 5, wxALL|wxEXPAND, 0 );
-       
-       
-       this->SetSizer( fgSizer38 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmActivityMgrADT::CloseWindow ) );
-       this->Connect( mnuStopActivity->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::StopTask ) );
-       this->Connect( mnuActivityStopAll->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::StopAllTasks ) );
-       this->Connect( mnuRetryActivity->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::RetryTask ) );
-       this->Connect( mnuSleepMode->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::SleepMode ) );
-       this->Connect( mnuWindowClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::CloseWindow ) );
+    this->SetSizeHints( wxSize( 400,300 ), wxDefaultSize );
+    
+    mnuMenuBar = new wxMenuBar( 0 );
+    mnuWindow = new wxMenu();
+    wxMenuItem* mnuStopActivity;
+    mnuStopActivity = new wxMenuItem( mnuWindow, wxID_ANY, wxString( wxT("&Stop Activity") ) + wxT('\t') + wxT("CTRL+ALT+S"), wxEmptyString, wxITEM_NORMAL );
+    mnuWindow->Append( mnuStopActivity );
+    
+    wxMenuItem* mnuActivityStopAll;
+    mnuActivityStopAll = new wxMenuItem( mnuWindow, wxID_ANY, wxString( wxT("Stop All Activities") ) + wxT('\t') + wxT("CTRL+SHIFT+ALT+S"), wxEmptyString, wxITEM_NORMAL );
+    mnuWindow->Append( mnuActivityStopAll );
+    
+    wxMenuItem* mnuRetryActivity;
+    mnuRetryActivity = new wxMenuItem( mnuWindow, wxID_ANY, wxString( wxT("&Retry Activity") ) + wxT('\t') + wxT("CTRL+R"), wxEmptyString, wxITEM_NORMAL );
+    mnuWindow->Append( mnuRetryActivity );
+    
+    mnuWindow->AppendSeparator();
+    
+    wxMenuItem* mnuSleepMode;
+    mnuSleepMode = new wxMenuItem( mnuWindow, wxID_ANY, wxString( wxT("Sleep Mode") ) , wxEmptyString, wxITEM_CHECK );
+#ifdef __WXMSW__
+    mnuSleepMode->SetBitmaps( wxNullBitmap );
+#elif defined( __WXGTK__ )
+    mnuSleepMode->SetBitmap( wxNullBitmap );
+#endif
+    mnuWindow->Append( mnuSleepMode );
+    
+    mnuWindow->AppendSeparator();
+    
+    wxMenuItem* mnuWindowClose;
+    mnuWindowClose = new wxMenuItem( mnuWindow, wxID_ANY, wxString( wxT("&Close Window") ) + wxT('\t') + wxT("ALT+F4"), wxEmptyString, wxITEM_NORMAL );
+    mnuWindow->Append( mnuWindowClose );
+    
+    mnuMenuBar->Append( mnuWindow, wxT("&Activity") );
+    
+    this->SetMenuBar( mnuMenuBar );
+    
+    wxFlexGridSizer* fgSizer38;
+    fgSizer38 = new wxFlexGridSizer( 0, 1, 0, 0 );
+    fgSizer38->AddGrowableCol( 0 );
+    fgSizer38->AddGrowableRow( 1 );
+    fgSizer38->SetFlexibleDirection( wxBOTH );
+    fgSizer38->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    m_panel43 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer363;
+    bSizer363 = new wxBoxSizer( wxHORIZONTAL );
+    
+    bmpActivity = new wxStaticBitmap( m_panel43, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+    bmpActivity->SetMinSize( wxSize( 64,64 ) );
+    
+    bSizer363->Add( bmpActivity, 0, wxALL, 5 );
+    
+    m_panel46 = new wxPanel( m_panel43, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer364;
+    bSizer364 = new wxBoxSizer( wxVERTICAL );
+    
+    
+    bSizer364->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblDetails = new wxStaticText( m_panel46, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
+    lblDetails->Wrap( -1 );
+    bSizer364->Add( lblDetails, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 0 );
+    
+    
+    bSizer364->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    GauProgress = new wxGauge( m_panel46, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL );
+    GauProgress->SetValue( 0 );
+    GauProgress->SetMinSize( wxSize( -1,20 ) );
+    
+    bSizer364->Add( GauProgress, 0, wxALL|wxEXPAND, 0 );
+    
+    
+    bSizer364->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    m_panel46->SetSizer( bSizer364 );
+    m_panel46->Layout();
+    bSizer364->Fit( m_panel46 );
+    bSizer363->Add( m_panel46, 1, wxEXPAND | wxALL, 5 );
+    
+    
+    m_panel43->SetSizer( bSizer363 );
+    m_panel43->Layout();
+    bSizer363->Fit( m_panel43 );
+    fgSizer38->Add( m_panel43, 1, wxALL|wxEXPAND, 0 );
+    
+    m_panel44 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer365;
+    bSizer365 = new wxBoxSizer( wxVERTICAL );
+    
+    lstActivity = new wxListCtrl( m_panel44, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
+    bSizer365->Add( lstActivity, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    m_panel44->SetSizer( bSizer365 );
+    m_panel44->Layout();
+    bSizer365->Fit( m_panel44 );
+    fgSizer38->Add( m_panel44, 5, wxALL|wxEXPAND, 0 );
+    
+    
+    this->SetSizer( fgSizer38 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmActivityMgrADT::CloseWindow ) );
+    this->Connect( mnuStopActivity->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::StopTask ) );
+    this->Connect( mnuActivityStopAll->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::StopAllTasks ) );
+    this->Connect( mnuRetryActivity->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::RetryTask ) );
+    this->Connect( mnuSleepMode->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::SleepMode ) );
+    this->Connect( mnuWindowClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::CloseWindow ) );
 }
 
 frmActivityMgrADT::~frmActivityMgrADT()
 {
-       // Disconnect Events
-       this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmActivityMgrADT::CloseWindow ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::StopTask ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::StopAllTasks ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::RetryTask ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::SleepMode ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::CloseWindow ) );
-       
+    // Disconnect Events
+    this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmActivityMgrADT::CloseWindow ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::StopTask ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::StopAllTasks ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::RetryTask ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::SleepMode ) );
+    this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmActivityMgrADT::CloseWindow ) );
+    
 }
 
 frmContactEditorNicknameADT::frmContactEditorNicknameADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkAddress = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblNickname = new wxStaticText( tabGeneral, wxID_ANY, wxT("Nickname:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblNickname->Wrap( -1 );
-       fgSizer6->Add( lblNickname, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtNickname = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtNickname->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtNickname, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkAddress->AddPage( tabGeneral, wxT("General"), true );
-       tabOther = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer61;
-       fgSizer61 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer61->AddGrowableCol( 1 );
-       fgSizer61->SetFlexibleDirection( wxBOTH );
-       fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblLanguage = new wxStaticText( tabOther, wxID_ANY, wxT("Language:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLanguage->Wrap( -1 );
-       fgSizer61->Add( lblLanguage, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       cmbLanguage = new wxComboBox( tabOther, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
-       fgSizer61->Add( cmbLanguage, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       tabOther->SetSizer( fgSizer61 );
-       tabOther->Layout();
-       fgSizer61->Fit( tabOther );
-       nbkAddress->AddPage( tabOther, wxT("Other"), false );
-       
-       bSizer251->Add( nbkAddress, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorNicknameADT::InitAddressEditor ) );
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::ProcessData ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkAddress = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblNickname = new wxStaticText( tabGeneral, wxID_ANY, wxT("Nickname:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblNickname->Wrap( -1 );
+    fgSizer6->Add( lblNickname, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtNickname = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtNickname->SetMaxLength( 0 );
+    fgSizer6->Add( txtNickname, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkAddress->AddPage( tabGeneral, wxT("General"), true );
+    tabOther = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer61;
+    fgSizer61 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer61->AddGrowableCol( 1 );
+    fgSizer61->SetFlexibleDirection( wxBOTH );
+    fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblLanguage = new wxStaticText( tabOther, wxID_ANY, wxT("Language:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLanguage->Wrap( -1 );
+    fgSizer61->Add( lblLanguage, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    cmbLanguage = new wxComboBox( tabOther, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+    fgSizer61->Add( cmbLanguage, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    tabOther->SetSizer( fgSizer61 );
+    tabOther->Layout();
+    fgSizer61->Fit( tabOther );
+    nbkAddress->AddPage( tabOther, wxT("Other"), false );
+    
+    bSizer251->Add( nbkAddress, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorNicknameADT::InitAddressEditor ) );
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::ProcessData ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorNicknameADT::~frmContactEditorNicknameADT()
 {
-       // Disconnect Events
-       this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorNicknameADT::InitAddressEditor ) );
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::ProcessData ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorNicknameADT::InitAddressEditor ) );
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::ProcessData ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNicknameADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorGroupsADT::frmContactEditorGroupsADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkGroup = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkGroup, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->AddGrowableRow( 0 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblContacts = new wxStaticText( tabGeneral, wxID_ANY, wxT("Contacts:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblContacts->Wrap( -1 );
-       fgSizer6->Add( lblContacts, 0, wxALIGN_TOP|wxALL, 5 );
-       
-       wxArrayString chkContactsChoices;
-       chkContacts = new wxCheckListBox( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, chkContactsChoices, wxLB_ALWAYS_SB|wxLB_MULTIPLE );
-       fgSizer6->Add( chkContacts, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkGroup->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkGroup, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorGroupsADT::FetchContacts ) );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGroupsADT::ProcessData ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGroupsADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkGroup = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkGroup, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->AddGrowableRow( 0 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblContacts = new wxStaticText( tabGeneral, wxID_ANY, wxT("Contacts:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblContacts->Wrap( -1 );
+    fgSizer6->Add( lblContacts, 0, wxALIGN_TOP|wxALL, 5 );
+    
+    wxArrayString chkContactsChoices;
+    chkContacts = new wxCheckListBox( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, chkContactsChoices, wxLB_ALWAYS_SB|wxLB_MULTIPLE );
+    fgSizer6->Add( chkContacts, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkGroup->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkGroup, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorGroupsADT::FetchContacts ) );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGroupsADT::ProcessData ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGroupsADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorGroupsADT::~frmContactEditorGroupsADT()
 {
-       // Disconnect Events
-       this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorGroupsADT::FetchContacts ) );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGroupsADT::ProcessData ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGroupsADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( frmContactEditorGroupsADT::FetchContacts ) );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGroupsADT::ProcessData ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGroupsADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorRolesADT::frmContactEditorRolesADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkRole = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkRole, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblRole = new wxStaticText( tabGeneral, wxID_ANY, wxT("Role Name:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblRole->Wrap( -1 );
-       fgSizer6->Add( lblRole, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtRole = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtRole->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtRole, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkRole->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkRole, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkRole = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkRole, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblRole = new wxStaticText( tabGeneral, wxID_ANY, wxT("Role Name:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblRole->Wrap( -1 );
+    fgSizer6->Add( lblRole, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtRole = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtRole->SetMaxLength( 0 );
+    fgSizer6->Add( txtRole, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkRole->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkRole, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorRolesADT::~frmContactEditorRolesADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRolesADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorOrganisationsADT::frmContactEditorOrganisationsADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkOrganisation = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkOrganisation, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxBOTH );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblOrganisation = new wxStaticText( tabGeneral, wxID_ANY, wxT("Organisation:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblOrganisation->Wrap( -1 );
-       fgSizer6->Add( lblOrganisation, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtOrganisation = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtOrganisation->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtOrganisation, 0, wxALL|wxEXPAND, 5 );
-       
-       lblSortAs = new wxStaticText( tabGeneral, wxID_ANY, wxT("Sort As:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblSortAs->Wrap( -1 );
-       fgSizer6->Add( lblSortAs, 0, wxALL, 5 );
-       
-       cmbSortAs = new wxComboBox( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
-       fgSizer6->Add( cmbSortAs, 1, wxALL, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkOrganisation->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkOrganisation, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       txtOrganisation->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorOrganisationsADT::UpdateSortAs ), NULL, this );
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkOrganisation = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkOrganisation, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxBOTH );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblOrganisation = new wxStaticText( tabGeneral, wxID_ANY, wxT("Organisation:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblOrganisation->Wrap( -1 );
+    fgSizer6->Add( lblOrganisation, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtOrganisation = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtOrganisation->SetMaxLength( 0 );
+    fgSizer6->Add( txtOrganisation, 0, wxALL|wxEXPAND, 5 );
+    
+    lblSortAs = new wxStaticText( tabGeneral, wxID_ANY, wxT("Sort As:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblSortAs->Wrap( -1 );
+    fgSizer6->Add( lblSortAs, 0, wxALL, 5 );
+    
+    cmbSortAs = new wxComboBox( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+    fgSizer6->Add( cmbSortAs, 1, wxALL, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkOrganisation->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkOrganisation, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    txtOrganisation->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorOrganisationsADT::UpdateSortAs ), NULL, this );
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorOrganisationsADT::~frmContactEditorOrganisationsADT()
 {
-       // Disconnect Events
-       txtOrganisation->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorOrganisationsADT::UpdateSortAs ), NULL, this );
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    txtOrganisation->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmContactEditorOrganisationsADT::UpdateSortAs ), NULL, this );
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorOrganisationsADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorNotesADT::frmContactEditorNotesADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkNotes = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkNotes, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer353;
-       bSizer353 = new wxBoxSizer( wxVERTICAL );
-       
-       txtNote = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
-       txtNote->SetMaxLength( 0 ); 
-       bSizer353->Add( txtNote, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( bSizer353 );
-       tabGeneral->Layout();
-       bSizer353->Fit( tabGeneral );
-       nbkNotes->AddPage( tabGeneral, wxT("General"), true );
-       tabPriority = new wxPanel( nbkNotes, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer61;
-       fgSizer61 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer61->AddGrowableCol( 1 );
-       fgSizer61->SetFlexibleDirection( wxVERTICAL );
-       fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblPriority = new wxStaticText( tabPriority, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer61->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer2601;
-       bSizer2601 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabPriority, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer2601->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer2541;
-       bSizer2541 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer2561;
-       bSizer2561 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabPriority, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer2561->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer2541->Add( bSizer2561, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer2551;
-       bSizer2551 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabPriority, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer2551->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer2551->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabPriority, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer2551->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer2541->Add( bSizer2551, 1, wxEXPAND, 0 );
-       
-       
-       bSizer2601->Add( bSizer2541, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer61->Add( bSizer2601, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer61->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabPriority->SetSizer( fgSizer61 );
-       tabPriority->Layout();
-       fgSizer61->Fit( tabPriority );
-       nbkNotes->AddPage( tabPriority, wxT("Priority"), false );
-       tabLanguage = new wxPanel( nbkNotes, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer611;
-       fgSizer611 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer611->AddGrowableCol( 0 );
-       fgSizer611->SetFlexibleDirection( wxBOTH );
-       fgSizer611->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblLanguage = new wxStaticText( tabLanguage, wxID_ANY, wxT("Language:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLanguage->Wrap( -1 );
-       fgSizer611->Add( lblLanguage, 1, wxALL, 5 );
-       
-       cmbLanguage = new wxComboBox( tabLanguage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
-       fgSizer611->Add( cmbLanguage, 1, wxALL, 5 );
-       
-       
-       tabLanguage->SetSizer( fgSizer611 );
-       tabLanguage->Layout();
-       fgSizer611->Fit( tabLanguage );
-       nbkNotes->AddPage( tabLanguage, wxT("Language"), false );
-       
-       bSizer251->Add( nbkNotes, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkNotes = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkNotes, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer353;
+    bSizer353 = new wxBoxSizer( wxVERTICAL );
+    
+    txtNote = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+    txtNote->SetMaxLength( 0 );
+    bSizer353->Add( txtNote, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( bSizer353 );
+    tabGeneral->Layout();
+    bSizer353->Fit( tabGeneral );
+    nbkNotes->AddPage( tabGeneral, wxT("General"), true );
+    tabPriority = new wxPanel( nbkNotes, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer61;
+    fgSizer61 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer61->AddGrowableCol( 1 );
+    fgSizer61->SetFlexibleDirection( wxVERTICAL );
+    fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblPriority = new wxStaticText( tabPriority, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer61->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer2601;
+    bSizer2601 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabPriority, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer2601->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer2541;
+    bSizer2541 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer2561;
+    bSizer2561 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabPriority, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer2561->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer2541->Add( bSizer2561, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer2551;
+    bSizer2551 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabPriority, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer2551->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer2551->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabPriority, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer2551->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer2541->Add( bSizer2551, 1, wxEXPAND, 0 );
+    
+    
+    bSizer2601->Add( bSizer2541, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer61->Add( bSizer2601, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer61->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabPriority->SetSizer( fgSizer61 );
+    tabPriority->Layout();
+    fgSizer61->Fit( tabPriority );
+    nbkNotes->AddPage( tabPriority, wxT("Priority"), false );
+    tabLanguage = new wxPanel( nbkNotes, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer611;
+    fgSizer611 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer611->AddGrowableCol( 0 );
+    fgSizer611->SetFlexibleDirection( wxBOTH );
+    fgSizer611->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblLanguage = new wxStaticText( tabLanguage, wxID_ANY, wxT("Language:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLanguage->Wrap( -1 );
+    fgSizer611->Add( lblLanguage, 1, wxALL, 5 );
+    
+    cmbLanguage = new wxComboBox( tabLanguage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+    fgSizer611->Add( cmbLanguage, 1, wxALL, 5 );
+    
+    
+    tabLanguage->SetSizer( fgSizer611 );
+    tabLanguage->Layout();
+    fgSizer611->Fit( tabLanguage );
+    nbkNotes->AddPage( tabLanguage, wxT("Language"), false );
+    
+    bSizer251->Add( nbkNotes, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorNotesADT::~frmContactEditorNotesADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorNotesADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorTitlesADT::frmContactEditorTitlesADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkTitles = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkTitles, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblTitle = new wxStaticText( tabGeneral, wxID_ANY, wxT("Title:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblTitle->Wrap( -1 );
-       fgSizer6->Add( lblTitle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtTitle = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtTitle->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtTitle, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkTitles->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkTitles, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkTitles = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkTitles, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblTitle = new wxStaticText( tabGeneral, wxID_ANY, wxT("Title:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblTitle->Wrap( -1 );
+    fgSizer6->Add( lblTitle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtTitle = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtTitle->SetMaxLength( 0 );
+    fgSizer6->Add( txtTitle, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkTitles->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkTitles, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorTitlesADT::~frmContactEditorTitlesADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTitlesADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorRelatedADT::frmContactEditorRelatedADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkRelated = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkRelated, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 0 );
-       fgSizer6->SetFlexibleDirection( wxBOTH );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblRelation = new wxStaticText( tabGeneral, wxID_ANY, wxT("Relation Name:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblRelation->Wrap( -1 );
-       fgSizer6->Add( lblRelation, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtRelated = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtRelated->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtRelated, 0, wxALL|wxEXPAND, 5 );
-       
-       lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblType->Wrap( -1 );
-       fgSizer6->Add( lblType, 0, wxALL, 5 );
-       
-       cmbType = new wxComboBox( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
-       fgSizer6->Add( cmbType, 0, wxALL, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkRelated->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkRelated, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::ProcessData ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkRelated = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkRelated, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 0 );
+    fgSizer6->SetFlexibleDirection( wxBOTH );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblRelation = new wxStaticText( tabGeneral, wxID_ANY, wxT("Relation Name:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblRelation->Wrap( -1 );
+    fgSizer6->Add( lblRelation, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtRelated = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtRelated->SetMaxLength( 0 );
+    fgSizer6->Add( txtRelated, 0, wxALL|wxEXPAND, 5 );
+    
+    lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblType->Wrap( -1 );
+    fgSizer6->Add( lblType, 0, wxALL, 5 );
+    
+    cmbType = new wxComboBox( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+    fgSizer6->Add( cmbType, 0, wxALL, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkRelated->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkRelated, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::ProcessData ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorRelatedADT::~frmContactEditorRelatedADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::ProcessData ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::ProcessData ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorRelatedADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorSoundADT::frmContactEditorSoundADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkRelated = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkRelated, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxBOTH );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblSoundFile = new wxStaticText( tabGeneral, wxID_ANY, wxT("Sound File:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblSoundFile->Wrap( -1 );
-       fgSizer6->Add( lblSoundFile, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       fipSound = new wxFilePickerCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxT("Select a sound file"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE );
-       fgSizer6->Add( fipSound, 1, wxALL|wxEXPAND, 5 );
-       
-       lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblType->Wrap( -1 );
-       fgSizer6->Add( lblType, 0, wxALL, 5 );
-       
-       wxArrayString cmbTypeChoices;
-       cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeChoices, 0 );
-       cmbType->SetSelection( 0 );
-       fgSizer6->Add( cmbType, 0, wxALL, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkRelated->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkRelated, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::ProcessData ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkRelated = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkRelated, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxBOTH );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblSoundFile = new wxStaticText( tabGeneral, wxID_ANY, wxT("Sound File:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblSoundFile->Wrap( -1 );
+    fgSizer6->Add( lblSoundFile, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    fipSound = new wxFilePickerCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxT("Select a sound file"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE );
+    fgSizer6->Add( fipSound, 1, wxALL|wxEXPAND, 5 );
+    
+    lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblType->Wrap( -1 );
+    fgSizer6->Add( lblType, 0, wxALL, 5 );
+    
+    wxArrayString cmbTypeChoices;
+    cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeChoices, 0 );
+    cmbType->SetSelection( 0 );
+    fgSizer6->Add( cmbType, 0, wxALL, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkRelated->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkRelated, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::ProcessData ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorSoundADT::~frmContactEditorSoundADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::ProcessData ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::ProcessData ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorSoundADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorPictureADT::frmContactEditorPictureADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkRelated = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkRelated, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxBOTH );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblPictureFile = new wxStaticText( tabGeneral, wxID_ANY, wxT("Picture File:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPictureFile->Wrap( -1 );
-       fgSizer6->Add( lblPictureFile, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       fipPicture = new wxFilePickerCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxT("Select a sound file"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE );
-       fgSizer6->Add( fipPicture, 1, wxALL|wxEXPAND, 5 );
-       
-       lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblType->Wrap( -1 );
-       fgSizer6->Add( lblType, 0, wxALL, 5 );
-       
-       wxArrayString cmbTypeChoices;
-       cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeChoices, 0 );
-       cmbType->SetSelection( 0 );
-       fgSizer6->Add( cmbType, 0, wxALL, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkRelated->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkRelated, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::ProcessData ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkRelated = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkRelated, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxBOTH );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblPictureFile = new wxStaticText( tabGeneral, wxID_ANY, wxT("Picture File:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPictureFile->Wrap( -1 );
+    fgSizer6->Add( lblPictureFile, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    fipPicture = new wxFilePickerCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxT("Select a sound file"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE );
+    fgSizer6->Add( fipPicture, 1, wxALL|wxEXPAND, 5 );
+    
+    lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblType->Wrap( -1 );
+    fgSizer6->Add( lblType, 0, wxALL, 5 );
+    
+    wxArrayString cmbTypeChoices;
+    cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeChoices, 0 );
+    cmbType->SetSelection( 0 );
+    fgSizer6->Add( cmbType, 0, wxALL, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkRelated->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkRelated, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::ProcessData ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorPictureADT::~frmContactEditorPictureADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::ProcessData ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::ProcessData ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorPictureADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorWebsitesADT::frmContactEditorWebsitesADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblWebsite = new wxStaticText( tabGeneral, wxID_ANY, wxT("Website:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblWebsite->Wrap( -1 );
-       fgSizer6->Add( lblWebsite, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtWebsite = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtWebsite->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtWebsite, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkWebsite->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblWebsite = new wxStaticText( tabGeneral, wxID_ANY, wxT("Website:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblWebsite->Wrap( -1 );
+    fgSizer6->Add( lblWebsite, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtWebsite = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtWebsite->SetMaxLength( 0 );
+    fgSizer6->Add( txtWebsite, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkWebsite->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorWebsitesADT::~frmContactEditorWebsitesADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorWebsitesADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorGeopositionADT::frmContactEditorGeopositionADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblGeoposition = new wxStaticText( tabGeneral, wxID_ANY, wxT("Geoposition:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblGeoposition->Wrap( -1 );
-       fgSizer6->Add( lblGeoposition, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtGeoposition = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtGeoposition->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtGeoposition, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkWebsite->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblGeoposition = new wxStaticText( tabGeneral, wxID_ANY, wxT("Geoposition:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblGeoposition->Wrap( -1 );
+    fgSizer6->Add( lblGeoposition, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtGeoposition = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtGeoposition->SetMaxLength( 0 );
+    fgSizer6->Add( txtGeoposition, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkWebsite->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorGeopositionADT::~frmContactEditorGeopositionADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorGeopositionADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorCalAdrADT::frmContactEditorCalAdrADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblAddress = new wxStaticText( tabGeneral, wxID_ANY, wxT("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAddress->Wrap( -1 );
-       fgSizer6->Add( lblAddress, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtAddress = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtAddress->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtAddress, 0, wxALL|wxEXPAND, 5 );
-       
-       lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblType->Wrap( -1 );
-       fgSizer6->Add( lblType, 0, wxALL, 5 );
-       
-       wxArrayString cmbTypeChoices;
-       cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeChoices, 0 );
-       cmbType->SetSelection( 0 );
-       fgSizer6->Add( cmbType, 0, wxALL, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkWebsite->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblAddress = new wxStaticText( tabGeneral, wxID_ANY, wxT("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAddress->Wrap( -1 );
+    fgSizer6->Add( lblAddress, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtAddress = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtAddress->SetMaxLength( 0 );
+    fgSizer6->Add( txtAddress, 0, wxALL|wxEXPAND, 5 );
+    
+    lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblType->Wrap( -1 );
+    fgSizer6->Add( lblType, 0, wxALL, 5 );
+    
+    wxArrayString cmbTypeChoices;
+    cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeChoices, 0 );
+    cmbType->SetSelection( 0 );
+    fgSizer6->Add( cmbType, 0, wxALL, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkWebsite->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorCalAdrADT::~frmContactEditorCalAdrADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCalAdrADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorVendorADT::frmContactEditorVendorADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblVendorPEN = new wxStaticText( tabGeneral, wxID_ANY, wxT("Vendor PEN:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblVendorPEN->Wrap( -1 );
-       fgSizer6->Add( lblVendorPEN, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtPEN = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtPEN->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtPEN, 0, wxALL, 5 );
-       
-       lblElement = new wxStaticText( tabGeneral, wxID_ANY, wxT("Element:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblElement->Wrap( -1 );
-       fgSizer6->Add( lblElement, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtElement = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtElement->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtElement, 0, wxALL|wxEXPAND, 5 );
-       
-       lblValue = new wxStaticText( tabGeneral, wxID_ANY, wxT("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblValue->Wrap( -1 );
-       fgSizer6->Add( lblValue, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtValue = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtValue->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtValue, 0, wxALL|wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkWebsite->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorVendorADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorVendorADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblVendorPEN = new wxStaticText( tabGeneral, wxID_ANY, wxT("Vendor PEN:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblVendorPEN->Wrap( -1 );
+    fgSizer6->Add( lblVendorPEN, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtPEN = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtPEN->SetMaxLength( 0 );
+    fgSizer6->Add( txtPEN, 0, wxALL, 5 );
+    
+    lblElement = new wxStaticText( tabGeneral, wxID_ANY, wxT("Element:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblElement->Wrap( -1 );
+    fgSizer6->Add( lblElement, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtElement = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtElement->SetMaxLength( 0 );
+    fgSizer6->Add( txtElement, 0, wxALL|wxEXPAND, 5 );
+    
+    lblValue = new wxStaticText( tabGeneral, wxID_ANY, wxT("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblValue->Wrap( -1 );
+    fgSizer6->Add( lblValue, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtValue = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtValue->SetMaxLength( 0 );
+    fgSizer6->Add( txtValue, 0, wxALL|wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkWebsite->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorVendorADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorVendorADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorVendorADT::~frmContactEditorVendorADT()
 {
-       // Disconnect Events
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorVendorADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorVendorADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorVendorADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorVendorADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorXTokenADT::frmContactEditorXTokenADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblTokenName = new wxStaticText( tabGeneral, wxID_ANY, wxT("Token Name:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblTokenName->Wrap( -1 );
-       fgSizer6->Add( lblTokenName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtTokenName = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtTokenName->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtTokenName, 0, wxALL, 5 );
-       
-       lblXT = new wxStaticText( tabGeneral, wxID_ANY, wxT("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblXT->Wrap( -1 );
-       fgSizer6->Add( lblXT, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtValue = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtValue->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtValue, 0, wxALL|wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkWebsite->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorXTokenADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorXTokenADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblTokenName = new wxStaticText( tabGeneral, wxID_ANY, wxT("Token Name:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblTokenName->Wrap( -1 );
+    fgSizer6->Add( lblTokenName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtTokenName = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtTokenName->SetMaxLength( 0 );
+    fgSizer6->Add( txtTokenName, 0, wxALL, 5 );
+    
+    lblXT = new wxStaticText( tabGeneral, wxID_ANY, wxT("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblXT->Wrap( -1 );
+    fgSizer6->Add( lblXT, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtValue = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtValue->SetMaxLength( 0 );
+    fgSizer6->Add( txtValue, 0, wxALL|wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkWebsite->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorXTokenADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorXTokenADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorXTokenADT::~frmContactEditorXTokenADT()
 {
-       // Disconnect Events
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorXTokenADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorXTokenADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorXTokenADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorXTokenADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorKeyADT::frmContactEditorKeyADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblKeyType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Key Type:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblKeyType->Wrap( -1 );
-       fgSizer6->Add( lblKeyType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       wxArrayString cmbKeyMainTypeChoices;
-       cmbKeyMainType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbKeyMainTypeChoices, 0 );
-       cmbKeyMainType->SetSelection( 0 );
-       fgSizer6->Add( cmbKeyMainType, 0, wxALL, 5 );
-       
-       lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblType->Wrap( -1 );
-       fgSizer6->Add( lblType, 0, wxALL, 5 );
-       
-       wxArrayString cmbTypeChoices;
-       cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeChoices, 0 );
-       cmbType->SetSelection( 0 );
-       fgSizer6->Add( cmbType, 0, wxALL, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkWebsite->AddPage( tabGeneral, wxT("General"), true );
-       tabURL = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer61;
-       fgSizer61 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer61->AddGrowableCol( 1 );
-       fgSizer61->SetFlexibleDirection( wxHORIZONTAL );
-       fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblKeyFormat = new wxStaticText( tabURL, wxID_ANY, wxT("Key Format:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblKeyFormat->Wrap( -1 );
-       fgSizer61->Add( lblKeyFormat, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       cmbURL = new wxComboBox( tabURL, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
-       fgSizer61->Add( cmbURL, 0, wxALL, 5 );
-       
-       lblAddress = new wxStaticText( tabURL, wxID_ANY, wxT("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAddress->Wrap( -1 );
-       fgSizer61->Add( lblAddress, 0, wxALL, 5 );
-       
-       txtAddress = new wxTextCtrl( tabURL, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtAddress->SetMaxLength( 0 ); 
-       fgSizer61->Add( txtAddress, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       fgSizer61->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabURL->SetSizer( fgSizer61 );
-       tabURL->Layout();
-       fgSizer61->Fit( tabURL );
-       nbkWebsite->AddPage( tabURL, wxT("URL"), false );
-       tabKey = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer62;
-       fgSizer62 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer62->AddGrowableCol( 1 );
-       fgSizer62->AddGrowableRow( 1 );
-       fgSizer62->SetFlexibleDirection( wxBOTH );
-       fgSizer62->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblKeyFormatData = new wxStaticText( tabKey, wxID_ANY, wxT("Key Format:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblKeyFormatData->Wrap( -1 );
-       fgSizer62->Add( lblKeyFormatData, 0, wxALIGN_CENTER|wxALL, 5 );
-       
-       cmbKeyType = new wxComboBox( tabKey, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
-       fgSizer62->Add( cmbKeyType, 0, wxALL, 5 );
-       
-       lblKeyData = new wxStaticText( tabKey, wxID_ANY, wxT("Key Data:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblKeyData->Wrap( -1 );
-       fgSizer62->Add( lblKeyData, 0, wxALL, 5 );
-       
-       txtKeyData = new wxTextCtrl( tabKey, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
-       txtKeyData->SetMaxLength( 0 ); 
-       fgSizer62->Add( txtKeyData, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       tabKey->SetSizer( fgSizer62 );
-       tabKey->Layout();
-       fgSizer62->Fit( tabKey );
-       nbkWebsite->AddPage( tabKey, wxT("Key"), false );
-       
-       bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       cmbKeyMainType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ProcessKeyType ), NULL, this );
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::EnablePriority ), NULL, this );
-       cmbURL->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ConvertURLType ), NULL, this );
-       cmbKeyType->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ConvertKeyType ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkWebsite = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblKeyType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Key Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblKeyType->Wrap( -1 );
+    fgSizer6->Add( lblKeyType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    wxArrayString cmbKeyMainTypeChoices;
+    cmbKeyMainType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbKeyMainTypeChoices, 0 );
+    cmbKeyMainType->SetSelection( 0 );
+    fgSizer6->Add( cmbKeyMainType, 0, wxALL, 5 );
+    
+    lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblType->Wrap( -1 );
+    fgSizer6->Add( lblType, 0, wxALL, 5 );
+    
+    wxArrayString cmbTypeChoices;
+    cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeChoices, 0 );
+    cmbType->SetSelection( 0 );
+    fgSizer6->Add( cmbType, 0, wxALL, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkWebsite->AddPage( tabGeneral, wxT("General"), true );
+    tabURL = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer61;
+    fgSizer61 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer61->AddGrowableCol( 1 );
+    fgSizer61->SetFlexibleDirection( wxHORIZONTAL );
+    fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblKeyFormat = new wxStaticText( tabURL, wxID_ANY, wxT("Key Format:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblKeyFormat->Wrap( -1 );
+    fgSizer61->Add( lblKeyFormat, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    cmbURL = new wxComboBox( tabURL, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+    fgSizer61->Add( cmbURL, 0, wxALL, 5 );
+    
+    lblAddress = new wxStaticText( tabURL, wxID_ANY, wxT("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAddress->Wrap( -1 );
+    fgSizer61->Add( lblAddress, 0, wxALL, 5 );
+    
+    txtAddress = new wxTextCtrl( tabURL, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtAddress->SetMaxLength( 0 );
+    fgSizer61->Add( txtAddress, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    fgSizer61->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabURL->SetSizer( fgSizer61 );
+    tabURL->Layout();
+    fgSizer61->Fit( tabURL );
+    nbkWebsite->AddPage( tabURL, wxT("URL"), false );
+    tabKey = new wxPanel( nbkWebsite, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer62;
+    fgSizer62 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer62->AddGrowableCol( 1 );
+    fgSizer62->AddGrowableRow( 1 );
+    fgSizer62->SetFlexibleDirection( wxBOTH );
+    fgSizer62->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblKeyFormatData = new wxStaticText( tabKey, wxID_ANY, wxT("Key Format:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblKeyFormatData->Wrap( -1 );
+    fgSizer62->Add( lblKeyFormatData, 0, wxALIGN_CENTER|wxALL, 5 );
+    
+    cmbKeyType = new wxComboBox( tabKey, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+    fgSizer62->Add( cmbKeyType, 0, wxALL, 5 );
+    
+    lblKeyData = new wxStaticText( tabKey, wxID_ANY, wxT("Key Data:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblKeyData->Wrap( -1 );
+    fgSizer62->Add( lblKeyData, 0, wxALL, 5 );
+    
+    txtKeyData = new wxTextCtrl( tabKey, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+    txtKeyData->SetMaxLength( 0 );
+    fgSizer62->Add( txtKeyData, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    tabKey->SetSizer( fgSizer62 );
+    tabKey->Layout();
+    fgSizer62->Fit( tabKey );
+    nbkWebsite->AddPage( tabKey, wxT("Key"), false );
+    
+    bSizer251->Add( nbkWebsite, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    cmbKeyMainType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ProcessKeyType ), NULL, this );
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::EnablePriority ), NULL, this );
+    cmbURL->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ConvertURLType ), NULL, this );
+    cmbKeyType->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ConvertKeyType ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorKeyADT::~frmContactEditorKeyADT()
 {
-       // Disconnect Events
-       cmbKeyMainType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ProcessKeyType ), NULL, this );
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::EnablePriority ), NULL, this );
-       cmbURL->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ConvertURLType ), NULL, this );
-       cmbKeyType->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ConvertKeyType ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    cmbKeyMainType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ProcessKeyType ), NULL, this );
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::EnablePriority ), NULL, this );
+    cmbURL->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ConvertURLType ), NULL, this );
+    cmbKeyType->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( frmContactEditorKeyADT::ConvertKeyType ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorKeyADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorEmailADT::frmContactEditorEmailADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkEmail = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkEmail, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblEmailAddress = new wxStaticText( tabGeneral, wxID_ANY, wxT("E-mail Address:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblEmailAddress->Wrap( -1 );
-       fgSizer6->Add( lblEmailAddress, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtEmail = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtEmail->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtEmail, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkEmail->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkEmail, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::ProcessData ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkEmail = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkEmail, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblEmailAddress = new wxStaticText( tabGeneral, wxID_ANY, wxT("E-mail Address:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblEmailAddress->Wrap( -1 );
+    fgSizer6->Add( lblEmailAddress, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtEmail = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtEmail->SetMaxLength( 0 );
+    fgSizer6->Add( txtEmail, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkEmail->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkEmail, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::ProcessData ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorEmailADT::~frmContactEditorEmailADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::ProcessData ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::ProcessData ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorEmailADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorIMADT::frmContactEditorIMADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkIM = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkIM, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblIMType = new wxStaticText( tabGeneral, wxID_ANY, wxT("IM Type:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblIMType->Wrap( -1 );
-       fgSizer6->Add( lblIMType, 0, wxALL, 5 );
-       
-       cmbIMType = new wxComboBox( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN ); 
-       fgSizer6->Add( cmbIMType, 0, wxALL, 5 );
-       
-       lblUsername = new wxStaticText( tabGeneral, wxID_ANY, wxT("Username/E-mail address:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblUsername->Wrap( 0 );
-       fgSizer6->Add( lblUsername, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtUsername = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtUsername->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtUsername, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkIM->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkIM, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkIM = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkIM, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblIMType = new wxStaticText( tabGeneral, wxID_ANY, wxT("IM Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblIMType->Wrap( -1 );
+    fgSizer6->Add( lblIMType, 0, wxALL, 5 );
+    
+    cmbIMType = new wxComboBox( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN );
+    fgSizer6->Add( cmbIMType, 0, wxALL, 5 );
+    
+    lblUsername = new wxStaticText( tabGeneral, wxID_ANY, wxT("Username/E-mail address:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblUsername->Wrap( 0 );
+    fgSizer6->Add( lblUsername, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtUsername = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtUsername->SetMaxLength( 0 );
+    fgSizer6->Add( txtUsername, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkIM->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkIM, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorIMADT::~frmContactEditorIMADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorIMADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorCategoryADT::frmContactEditorCategoryADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkIM = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkIM, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblCategory = new wxStaticText( tabGeneral, wxID_ANY, wxT("Category Name:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblCategory->Wrap( 0 );
-       fgSizer6->Add( lblCategory, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtCategory = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtCategory->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtCategory, 0, wxALL|wxEXPAND, 5 );
-       
-       lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblType->Wrap( -1 );
-       fgSizer6->Add( lblType, 0, wxALL, 5 );
-       
-       wxArrayString cmbTypeChoices;
-       cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeChoices, 0 );
-       cmbType->SetSelection( 0 );
-       fgSizer6->Add( cmbType, 0, wxALL, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkIM->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkIM, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkIM = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkIM, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblCategory = new wxStaticText( tabGeneral, wxID_ANY, wxT("Category Name:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblCategory->Wrap( 0 );
+    fgSizer6->Add( lblCategory, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtCategory = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtCategory->SetMaxLength( 0 );
+    fgSizer6->Add( txtCategory, 0, wxALL|wxEXPAND, 5 );
+    
+    lblType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblType->Wrap( -1 );
+    fgSizer6->Add( lblType, 0, wxALL, 5 );
+    
+    wxArrayString cmbTypeChoices;
+    cmbType = new wxChoice( tabGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbTypeChoices, 0 );
+    cmbType->SetSelection( 0 );
+    fgSizer6->Add( cmbType, 0, wxALL, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkIM->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkIM, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorCategoryADT::~frmContactEditorCategoryADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorCategoryADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorTelephoneADT::frmContactEditorTelephoneADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkAddress = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblTelephone = new wxStaticText( tabGeneral, wxID_ANY, wxT("Telephone:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblTelephone->Wrap( -1 );
-       fgSizer6->Add( lblTelephone, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtTelephone = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtTelephone->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtTelephone, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 0, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       lblTelephoneType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblTelephoneType->Wrap( 0 );
-       fgSizer6->Add( lblTelephoneType, 0, wxALIGN_TOP|wxALL, 5 );
-       
-       wxGridSizer* gSizer5;
-       gSizer5 = new wxGridSizer( 2, 2, 0, 0 );
-       
-       chkVoice = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Voice"), wxDefaultPosition, wxDefaultSize, 0 );
-       gSizer5->Add( chkVoice, 0, wxALL, 2 );
-       
-       chkText = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Text"), wxDefaultPosition, wxDefaultSize, 0 );
-       gSizer5->Add( chkText, 0, wxALL, 2 );
-       
-       chkFax = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Fax"), wxDefaultPosition, wxDefaultSize, 0 );
-       gSizer5->Add( chkFax, 0, wxALL, 2 );
-       
-       chkMobile = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Mobile"), wxDefaultPosition, wxDefaultSize, 0 );
-       gSizer5->Add( chkMobile, 0, wxALL, 2 );
-       
-       chkVideo = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Video"), wxDefaultPosition, wxDefaultSize, 0 );
-       gSizer5->Add( chkVideo, 0, wxALL, 2 );
-       
-       chkTextphone = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Textphone"), wxDefaultPosition, wxDefaultSize, 0 );
-       gSizer5->Add( chkTextphone, 0, wxALL, 2 );
-       
-       chkPager = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Pager"), wxDefaultPosition, wxDefaultSize, 0 );
-       gSizer5->Add( chkPager, 0, wxALL, 2 );
-       
-       
-       fgSizer6->Add( gSizer5, 1, 0, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkAddress->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkAddress, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkAddress = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblTelephone = new wxStaticText( tabGeneral, wxID_ANY, wxT("Telephone:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblTelephone->Wrap( -1 );
+    fgSizer6->Add( lblTelephone, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtTelephone = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtTelephone->SetMaxLength( 0 );
+    fgSizer6->Add( txtTelephone, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 0, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    lblTelephoneType = new wxStaticText( tabGeneral, wxID_ANY, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblTelephoneType->Wrap( 0 );
+    fgSizer6->Add( lblTelephoneType, 0, wxALIGN_TOP|wxALL, 5 );
+    
+    wxGridSizer* gSizer5;
+    gSizer5 = new wxGridSizer( 2, 2, 0, 0 );
+    
+    chkVoice = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Voice"), wxDefaultPosition, wxDefaultSize, 0 );
+    gSizer5->Add( chkVoice, 0, wxALL, 2 );
+    
+    chkText = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Text"), wxDefaultPosition, wxDefaultSize, 0 );
+    gSizer5->Add( chkText, 0, wxALL, 2 );
+    
+    chkFax = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Fax"), wxDefaultPosition, wxDefaultSize, 0 );
+    gSizer5->Add( chkFax, 0, wxALL, 2 );
+    
+    chkMobile = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Mobile"), wxDefaultPosition, wxDefaultSize, 0 );
+    gSizer5->Add( chkMobile, 0, wxALL, 2 );
+    
+    chkVideo = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Video"), wxDefaultPosition, wxDefaultSize, 0 );
+    gSizer5->Add( chkVideo, 0, wxALL, 2 );
+    
+    chkTextphone = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Textphone"), wxDefaultPosition, wxDefaultSize, 0 );
+    gSizer5->Add( chkTextphone, 0, wxALL, 2 );
+    
+    chkPager = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Pager"), wxDefaultPosition, wxDefaultSize, 0 );
+    gSizer5->Add( chkPager, 0, wxALL, 2 );
+    
+    
+    fgSizer6->Add( gSizer5, 1, 0, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkAddress->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkAddress, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorTelephoneADT::~frmContactEditorTelephoneADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTelephoneADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorLanguagesADT::frmContactEditorLanguagesADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkLanguages = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkLanguages, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblLanguage = new wxStaticText( tabGeneral, wxID_ANY, wxT("Language:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLanguage->Wrap( -1 );
-       fgSizer6->Add( lblLanguage, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtLanguage = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtLanguage->SetMaxLength( 0 ); 
-       fgSizer6->Add( txtLanguage, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkLanguages->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkLanguages, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkLanguages = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkLanguages, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblLanguage = new wxStaticText( tabGeneral, wxID_ANY, wxT("Language:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLanguage->Wrap( -1 );
+    fgSizer6->Add( lblLanguage, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtLanguage = new wxTextCtrl( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtLanguage->SetMaxLength( 0 );
+    fgSizer6->Add( txtLanguage, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkLanguages->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkLanguages, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorLanguagesADT::~frmContactEditorLanguagesADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorLanguagesADT::CloseWindow ), NULL, this );
+    
 }
 
 frmContactEditorTimezonesADT::frmContactEditorTimezonesADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer251;
-       bSizer251 = new wxBoxSizer( wxVERTICAL );
-       
-       nbkTimezone = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabGeneral = new wxPanel( nbkTimezone, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer6;
-       fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer6->AddGrowableCol( 1 );
-       fgSizer6->SetFlexibleDirection( wxVERTICAL );
-       fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblTimezone = new wxStaticText( tabGeneral, wxID_ANY, wxT("Timezone:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblTimezone->Wrap( -1 );
-       fgSizer6->Add( lblTimezone, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       cmbTimezone = new wxComboBox( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
-       fgSizer6->Add( cmbTimezone, 0, wxALL, 5 );
-       
-       lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPriority->Wrap( -1 );
-       fgSizer6->Add( lblPriority, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer260;
-       bSizer260 = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer260->Add( chkUsePref, 0, wxALL, 5 );
-       
-       wxBoxSizer* bSizer254;
-       bSizer254 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* bSizer256;
-       bSizer256 = new wxBoxSizer( wxHORIZONTAL );
-       
-       sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
-       bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer255;
-       bSizer255 = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblHigh->Wrap( -1 );
-       bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
-       
-       
-       bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblLow->Wrap( -1 );
-       bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
-       
-       
-       bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
-       
-       
-       bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
-       
-       
-       fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       tabGeneral->SetSizer( fgSizer6 );
-       tabGeneral->Layout();
-       fgSizer6->Fit( tabGeneral );
-       nbkTimezone->AddPage( tabGeneral, wxT("General"), false );
-       
-       bSizer251->Add( nbkTimezone, 1, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer252;
-       bSizer252 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnAction, 0, wxALL, 5 );
-       
-       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer252->Add( btnClose, 0, wxALL, 5 );
-       
-       
-       bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer251 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::EnablePriority ), NULL, this );
-       btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::ProcessAction ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer251;
+    bSizer251 = new wxBoxSizer( wxVERTICAL );
+    
+    nbkTimezone = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabGeneral = new wxPanel( nbkTimezone, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer6;
+    fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer6->AddGrowableCol( 1 );
+    fgSizer6->SetFlexibleDirection( wxVERTICAL );
+    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblTimezone = new wxStaticText( tabGeneral, wxID_ANY, wxT("Timezone:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblTimezone->Wrap( -1 );
+    fgSizer6->Add( lblTimezone, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    cmbTimezone = new wxComboBox( tabGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+    fgSizer6->Add( cmbTimezone, 0, wxALL, 5 );
+    
+    lblPriority = new wxStaticText( tabGeneral, wxID_ANY, wxT("Priority:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPriority->Wrap( -1 );
+    fgSizer6->Add( lblPriority, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer260;
+    bSizer260 = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkUsePref = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Use"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer260->Add( chkUsePref, 0, wxALL, 5 );
+    
+    wxBoxSizer* bSizer254;
+    bSizer254 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* bSizer256;
+    bSizer256 = new wxBoxSizer( wxHORIZONTAL );
+    
+    sliPriority = new wxSlider( tabGeneral, wxID_ANY, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
+    bSizer256->Add( sliPriority, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    bSizer254->Add( bSizer256, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer255;
+    bSizer255 = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblHigh = new wxStaticText( tabGeneral, wxID_ANY, wxT("High"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblHigh->Wrap( -1 );
+    bSizer255->Add( lblHigh, 0, wxALIGN_LEFT|wxALL, 5 );
+    
+    
+    bSizer255->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    lblLow = new wxStaticText( tabGeneral, wxID_ANY, wxT("Low"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblLow->Wrap( -1 );
+    bSizer255->Add( lblLow, 0, wxALIGN_RIGHT|wxALL, 5 );
+    
+    
+    bSizer254->Add( bSizer255, 1, wxEXPAND, 0 );
+    
+    
+    bSizer260->Add( bSizer254, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( bSizer260, 1, wxEXPAND, 5 );
+    
+    
+    fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    tabGeneral->SetSizer( fgSizer6 );
+    tabGeneral->Layout();
+    fgSizer6->Fit( tabGeneral );
+    nbkTimezone->AddPage( tabGeneral, wxT("General"), false );
+    
+    bSizer251->Add( nbkTimezone, 1, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer252;
+    bSizer252 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAction = new wxButton( this, wxID_ANY, wxT("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnAction, 0, wxALL, 5 );
+    
+    btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer252->Add( btnClose, 0, wxALL, 5 );
+    
+    
+    bSizer251->Add( bSizer252, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer251 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    chkUsePref->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::EnablePriority ), NULL, this );
+    btnAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::ProcessAction ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::CloseWindow ), NULL, this );
 }
 
 frmContactEditorTimezonesADT::~frmContactEditorTimezonesADT()
 {
-       // Disconnect Events
-       chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::EnablePriority ), NULL, this );
-       btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::ProcessAction ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    chkUsePref->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::EnablePriority ), NULL, this );
+    btnAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::ProcessAction ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorTimezonesADT::CloseWindow ), NULL, this );
+    
 }
 
 XABSearchPanelADT::XABSearchPanelADT( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
 {
-       this->SetMinSize( wxSize( -1,40 ) );
-       this->SetMaxSize( wxSize( -1,40 ) );
-       
-       wxFlexGridSizer* fgSizer40;
-       fgSizer40 = new wxFlexGridSizer( 0, 3, 0, 0 );
-       fgSizer40->AddGrowableCol( 1 );
-       fgSizer40->SetFlexibleDirection( wxBOTH );
-       fgSizer40->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       wxArrayString choOptionChoices;
-       choOption = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, choOptionChoices, 0 );
-       choOption->SetSelection( 0 );
-       fgSizer40->Add( choOption, 0, wxALIGN_TOP|wxALL, 5 );
-       
-       szrSSet = new wxBoxSizer( wxHORIZONTAL );
-       
-       chkActive = new wxCheckBox( this, wxID_ANY, wxT("Enable"), wxDefaultPosition, wxDefaultSize, 0 );
-       szrSSet->Add( chkActive, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtSearch = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtSearch->SetMaxLength( 0 ); 
-       szrSSet->Add( txtSearch, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       
-       fgSizer40->Add( szrSSet, 1, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer376;
-       bSizer376 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAdd = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), wxBU_AUTODRAW );
-       btnAdd->SetMinSize( wxSize( 28,28 ) );
-       btnAdd->SetMaxSize( wxSize( 28,28 ) );
-       
-       bSizer376->Add( btnAdd, 0, wxALL, 5 );
-       
-       btnDelete = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), wxBU_AUTODRAW );
-       btnDelete->SetMinSize( wxSize( 28,28 ) );
-       btnDelete->SetMaxSize( wxSize( 28,28 ) );
-       
-       bSizer376->Add( btnDelete, 0, wxALL, 5 );
-       
-       
-       fgSizer40->Add( bSizer376, 0, 0, 5 );
-       
-       
-       this->SetSizer( fgSizer40 );
-       this->Layout();
-       
-       // Connect Events
-       choOption->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( XABSearchPanelADT::UpdateOptions ), NULL, this );
-       btnAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( XABSearchPanelADT::AddSearchWidget ), NULL, this );
-       btnDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( XABSearchPanelADT::RemoveSearchWidget ), NULL, this );
+    this->SetMinSize( wxSize( -1,40 ) );
+    this->SetMaxSize( wxSize( -1,40 ) );
+    
+    wxFlexGridSizer* fgSizer40;
+    fgSizer40 = new wxFlexGridSizer( 0, 3, 0, 0 );
+    fgSizer40->AddGrowableCol( 1 );
+    fgSizer40->SetFlexibleDirection( wxBOTH );
+    fgSizer40->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    wxArrayString choOptionChoices;
+    choOption = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, choOptionChoices, 0 );
+    choOption->SetSelection( 0 );
+    fgSizer40->Add( choOption, 0, wxALIGN_TOP|wxALL, 5 );
+    
+    szrSSet = new wxBoxSizer( wxHORIZONTAL );
+    
+    chkActive = new wxCheckBox( this, wxID_ANY, wxT("Enable"), wxDefaultPosition, wxDefaultSize, 0 );
+    szrSSet->Add( chkActive, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtSearch = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtSearch->SetMaxLength( 0 );
+    szrSSet->Add( txtSearch, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    
+    fgSizer40->Add( szrSSet, 1, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer376;
+    bSizer376 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAdd = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), wxBU_AUTODRAW );
+    btnAdd->SetMinSize( wxSize( 28,28 ) );
+    btnAdd->SetMaxSize( wxSize( 28,28 ) );
+    
+    bSizer376->Add( btnAdd, 0, wxALL, 5 );
+    
+    btnDelete = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), wxBU_AUTODRAW );
+    btnDelete->SetMinSize( wxSize( 28,28 ) );
+    btnDelete->SetMaxSize( wxSize( 28,28 ) );
+    
+    bSizer376->Add( btnDelete, 0, wxALL, 5 );
+    
+    
+    fgSizer40->Add( bSizer376, 0, 0, 5 );
+    
+    
+    this->SetSizer( fgSizer40 );
+    this->Layout();
+    
+    // Connect Events
+    choOption->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( XABSearchPanelADT::UpdateOptions ), NULL, this );
+    btnAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( XABSearchPanelADT::AddSearchWidget ), NULL, this );
+    btnDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( XABSearchPanelADT::RemoveSearchWidget ), NULL, this );
 }
 
 XABSearchPanelADT::~XABSearchPanelADT()
 {
-       // Disconnect Events
-       choOption->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( XABSearchPanelADT::UpdateOptions ), NULL, this );
-       btnAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( XABSearchPanelADT::AddSearchWidget ), NULL, this );
-       btnDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( XABSearchPanelADT::RemoveSearchWidget ), NULL, this );
-       
+    // Disconnect Events
+    choOption->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( XABSearchPanelADT::UpdateOptions ), NULL, this );
+    btnAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( XABSearchPanelADT::AddSearchWidget ), NULL, this );
+    btnDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( XABSearchPanelADT::RemoveSearchWidget ), NULL, this );
+    
 }
 
 frmSearchAccountsADT::frmSearchAccountsADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer376;
-       bSizer376 = new wxBoxSizer( wxVERTICAL );
-       
-       wxArrayString chlAccountsChoices;
-       chlAccounts = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, chlAccountsChoices, wxLB_ALWAYS_SB|wxLB_SORT );
-       bSizer376->Add( chlAccounts, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer377;
-       bSizer377 = new wxBoxSizer( wxHORIZONTAL );
-       
-       
-       bSizer377->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       btnSelect = new wxButton( this, wxID_ANY, wxT("Select"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer377->Add( btnSelect, 0, wxALL, 5 );
-       
-       btnCancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer377->Add( btnCancel, 0, wxALL, 5 );
-       
-       
-       bSizer377->Add( 0, 0, 1, wxEXPAND, 5 );
-       
-       
-       bSizer376->Add( bSizer377, 0, wxEXPAND, 5 );
-       
-       
-       this->SetSizer( bSizer376 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       btnSelect->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchAccountsADT::UpdateSelectedAccounts ), NULL, this );
-       btnCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchAccountsADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer376;
+    bSizer376 = new wxBoxSizer( wxVERTICAL );
+    
+    wxArrayString chlAccountsChoices;
+    chlAccounts = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, chlAccountsChoices, wxLB_ALWAYS_SB|wxLB_SORT );
+    bSizer376->Add( chlAccounts, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer377;
+    bSizer377 = new wxBoxSizer( wxHORIZONTAL );
+    
+    
+    bSizer377->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    btnSelect = new wxButton( this, wxID_ANY, wxT("Select"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer377->Add( btnSelect, 0, wxALL, 5 );
+    
+    btnCancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer377->Add( btnCancel, 0, wxALL, 5 );
+    
+    
+    bSizer377->Add( 0, 0, 1, wxEXPAND, 5 );
+    
+    
+    bSizer376->Add( bSizer377, 0, wxEXPAND, 5 );
+    
+    
+    this->SetSizer( bSizer376 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    btnSelect->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchAccountsADT::UpdateSelectedAccounts ), NULL, this );
+    btnCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchAccountsADT::CloseWindow ), NULL, this );
 }
 
 frmSearchAccountsADT::~frmSearchAccountsADT()
 {
-       // Disconnect Events
-       btnSelect->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchAccountsADT::UpdateSelectedAccounts ), NULL, this );
-       btnCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchAccountsADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    btnSelect->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchAccountsADT::UpdateSelectedAccounts ), NULL, this );
+    btnCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSearchAccountsADT::CloseWindow ), NULL, this );
+    
 }
 
 frmEditAccountADT::frmEditAccountADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer384;
-       bSizer384 = new wxBoxSizer( wxVERTICAL );
-       
-       wxBoxSizer* szrTabs;
-       szrTabs = new wxBoxSizer( wxVERTICAL );
-       
-       tabAccount = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabProperties = new wxPanel( tabAccount, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer43;
-       fgSizer43 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer43->AddGrowableCol( 1 );
-       fgSizer43->SetFlexibleDirection( wxBOTH );
-       fgSizer43->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
-       
-       lblAccName = new wxStaticText( tabProperties, wxID_ANY, wxT("Account Name:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAccName->Wrap( -1 );
-       fgSizer43->Add( lblAccName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtAccountName = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtAccountName->SetMaxLength( 0 ); 
-       fgSizer43->Add( txtAccountName, 1, wxALL|wxEXPAND, 5 );
-       
-       lblAccAdr = new wxStaticText( tabProperties, wxID_ANY, wxT("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAccAdr->Wrap( -1 );
-       fgSizer43->Add( lblAccAdr, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtAddress = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtAddress->SetMaxLength( 0 ); 
-       fgSizer43->Add( txtAddress, 0, wxALL|wxEXPAND, 5 );
-       
-       m_staticText193 = new wxStaticText( tabProperties, wxID_ANY, wxT("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
-       m_staticText193->Wrap( -1 );
-       fgSizer43->Add( m_staticText193, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtPort = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtPort->SetMaxLength( 5 ); 
-       fgSizer43->Add( txtPort, 0, wxALL, 5 );
-       
-       lblPort = new wxStaticText( tabProperties, wxID_ANY, wxT("Username:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPort->Wrap( -1 );
-       fgSizer43->Add( lblPort, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtUsername = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtUsername->SetMaxLength( 0 ); 
-       fgSizer43->Add( txtUsername, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPassword = new wxStaticText( tabProperties, wxID_ANY, wxT("Password:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPassword->Wrap( -1 );
-       fgSizer43->Add( lblPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtPassword = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtPassword->SetMaxLength( 0 ); 
-       fgSizer43->Add( txtPassword, 0, wxALL|wxEXPAND, 5 );
-       
-       lblPrefix = new wxStaticText( tabProperties, wxID_ANY, wxT("Prefix:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblPrefix->Wrap( -1 );
-       fgSizer43->Add( lblPrefix, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       wxBoxSizer* bSizer391;
-       bSizer391 = new wxBoxSizer( wxHORIZONTAL );
-       
-       txtPrefix = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtPrefix->SetMaxLength( 0 ); 
-       bSizer391->Add( txtPrefix, 1, wxALL|wxEXPAND, 5 );
-       
-       btnDetect = new wxButton( tabProperties, wxID_ANY, wxT("Detect"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
-       bSizer391->Add( btnDetect, 0, wxALIGN_CENTER_VERTICAL, 0 );
-       
-       
-       fgSizer43->Add( bSizer391, 1, wxEXPAND|wxRIGHT, 5 );
-       
-       txtSSL = new wxStaticText( tabProperties, wxID_ANY, wxT("SSL:"), wxDefaultPosition, wxDefaultSize, 0 );
-       txtSSL->Wrap( -1 );
-       fgSizer43->Add( txtSSL, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       chkSSL = new wxCheckBox( tabProperties, wxID_ANY, wxT("Use SSL"), wxDefaultPosition, wxDefaultSize, 0 );
-       fgSizer43->Add( chkSSL, 0, wxALL, 5 );
-       
-       
-       tabProperties->SetSizer( fgSizer43 );
-       tabProperties->Layout();
-       fgSizer43->Fit( tabProperties );
-       tabAccount->AddPage( tabProperties, wxT("General"), true );
-       tabRefresh = new wxPanel( tabAccount, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer431;
-       fgSizer431 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer431->AddGrowableCol( 1 );
-       fgSizer431->SetFlexibleDirection( wxBOTH );
-       fgSizer431->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
-       
-       lblRefresh = new wxStaticText( tabRefresh, wxID_ANY, wxT("Refresh Time:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblRefresh->Wrap( -1 );
-       fgSizer431->Add( lblRefresh, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       txtRefresh = new wxTextCtrl( tabRefresh, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-       txtRefresh->SetMaxLength( 5 ); 
-       fgSizer431->Add( txtRefresh, 1, wxALL, 5 );
-       
-       
-       tabRefresh->SetSizer( fgSizer431 );
-       tabRefresh->Layout();
-       fgSizer431->Fit( tabRefresh );
-       tabAccount->AddPage( tabRefresh, wxT("Refresh"), false );
-       
-       szrTabs->Add( tabAccount, 1, wxEXPAND | wxALL, 5 );
-       
-       
-       bSizer384->Add( szrTabs, 1, wxEXPAND, 0 );
-       
-       wxBoxSizer* szrButtons;
-       szrButtons = new wxBoxSizer( wxHORIZONTAL );
-       
-       
-       szrButtons->Add( 1, 0, 1, wxEXPAND, 0 );
-       
-       btnSave = new wxButton( this, wxID_ANY, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 );
-       btnSave->SetDefault(); 
-       szrButtons->Add( btnSave, 0, wxALIGN_RIGHT, 0 );
-       
-       
-       szrButtons->Add( 5, 0, 0, 0, 0 );
-       
-       btnCancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
-       szrButtons->Add( btnCancel, 0, wxALIGN_RIGHT, 0 );
-       
-       
-       szrButtons->Add( 5, 0, 0, wxEXPAND, 0 );
-       
-       
-       bSizer384->Add( szrButtons, 0, wxBOTTOM|wxEXPAND, 5 );
-       
-       
-       this->SetSizer( bSizer384 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       btnDetect->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::DetectAddressBook ), NULL, this );
-       btnSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::UpdateSettings ), NULL, this );
-       btnCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer384;
+    bSizer384 = new wxBoxSizer( wxVERTICAL );
+    
+    wxBoxSizer* szrTabs;
+    szrTabs = new wxBoxSizer( wxVERTICAL );
+    
+    tabAccount = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabProperties = new wxPanel( tabAccount, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer43;
+    fgSizer43 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer43->AddGrowableCol( 1 );
+    fgSizer43->SetFlexibleDirection( wxBOTH );
+    fgSizer43->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
+    
+    lblAccName = new wxStaticText( tabProperties, wxID_ANY, wxT("Account Name:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAccName->Wrap( -1 );
+    fgSizer43->Add( lblAccName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtAccountName = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtAccountName->SetMaxLength( 0 ); 
+    fgSizer43->Add( txtAccountName, 1, wxALL|wxEXPAND, 5 );
+    
+    lblAccAdr = new wxStaticText( tabProperties, wxID_ANY, wxT("Address:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAccAdr->Wrap( -1 );
+    fgSizer43->Add( lblAccAdr, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtAddress = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtAddress->SetMaxLength( 0 ); 
+    fgSizer43->Add( txtAddress, 0, wxALL|wxEXPAND, 5 );
+    
+    m_staticText193 = new wxStaticText( tabProperties, wxID_ANY, wxT("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
+    m_staticText193->Wrap( -1 );
+    fgSizer43->Add( m_staticText193, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtPort = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtPort->SetMaxLength( 5 ); 
+    fgSizer43->Add( txtPort, 0, wxALL, 5 );
+    
+    lblPort = new wxStaticText( tabProperties, wxID_ANY, wxT("Username:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPort->Wrap( -1 );
+    fgSizer43->Add( lblPort, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtUsername = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtUsername->SetMaxLength( 0 ); 
+    fgSizer43->Add( txtUsername, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPassword = new wxStaticText( tabProperties, wxID_ANY, wxT("Password:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPassword->Wrap( -1 );
+    fgSizer43->Add( lblPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtPassword = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtPassword->SetMaxLength( 0 ); 
+    fgSizer43->Add( txtPassword, 0, wxALL|wxEXPAND, 5 );
+    
+    lblPrefix = new wxStaticText( tabProperties, wxID_ANY, wxT("Prefix:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblPrefix->Wrap( -1 );
+    fgSizer43->Add( lblPrefix, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    wxBoxSizer* bSizer391;
+    bSizer391 = new wxBoxSizer( wxHORIZONTAL );
+    
+    txtPrefix = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtPrefix->SetMaxLength( 0 ); 
+    bSizer391->Add( txtPrefix, 1, wxALL|wxEXPAND, 5 );
+    
+    btnDetect = new wxButton( tabProperties, wxID_ANY, wxT("Detect"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+    bSizer391->Add( btnDetect, 0, wxALIGN_CENTER_VERTICAL, 0 );
+    
+    
+    fgSizer43->Add( bSizer391, 1, wxEXPAND|wxRIGHT, 5 );
+    
+    txtSSL = new wxStaticText( tabProperties, wxID_ANY, wxT("SSL:"), wxDefaultPosition, wxDefaultSize, 0 );
+    txtSSL->Wrap( -1 );
+    fgSizer43->Add( txtSSL, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    chkSSL = new wxCheckBox( tabProperties, wxID_ANY, wxT("Use SSL"), wxDefaultPosition, wxDefaultSize, 0 );
+    fgSizer43->Add( chkSSL, 0, wxALL, 5 );
+    
+    
+    tabProperties->SetSizer( fgSizer43 );
+    tabProperties->Layout();
+    fgSizer43->Fit( tabProperties );
+    tabAccount->AddPage( tabProperties, wxT("General"), true );
+    tabRefresh = new wxPanel( tabAccount, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer431;
+    fgSizer431 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer431->AddGrowableCol( 1 );
+    fgSizer431->SetFlexibleDirection( wxBOTH );
+    fgSizer431->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
+    
+    lblRefresh = new wxStaticText( tabRefresh, wxID_ANY, wxT("Refresh Time:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblRefresh->Wrap( -1 );
+    fgSizer431->Add( lblRefresh, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    txtRefresh = new wxTextCtrl( tabRefresh, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+    txtRefresh->SetMaxLength( 5 ); 
+    fgSizer431->Add( txtRefresh, 1, wxALL, 5 );
+    
+    
+    tabRefresh->SetSizer( fgSizer431 );
+    tabRefresh->Layout();
+    fgSizer431->Fit( tabRefresh );
+    tabAccount->AddPage( tabRefresh, wxT("Refresh"), false );
+    
+    szrTabs->Add( tabAccount, 1, wxEXPAND | wxALL, 5 );
+    
+    
+    bSizer384->Add( szrTabs, 1, wxEXPAND, 0 );
+    
+    wxBoxSizer* szrButtons;
+    szrButtons = new wxBoxSizer( wxHORIZONTAL );
+    
+    
+    szrButtons->Add( 1, 0, 1, wxEXPAND, 0 );
+    
+    btnSave = new wxButton( this, wxID_ANY, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 );
+    btnSave->SetDefault(); 
+    szrButtons->Add( btnSave, 0, wxALIGN_RIGHT, 0 );
+    
+    
+    szrButtons->Add( 5, 0, 0, 0, 0 );
+    
+    btnCancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+    szrButtons->Add( btnCancel, 0, wxALIGN_RIGHT, 0 );
+    
+    
+    szrButtons->Add( 5, 0, 0, wxEXPAND, 0 );
+    
+    
+    bSizer384->Add( szrButtons, 0, wxBOTTOM|wxEXPAND, 5 );
+    
+    
+    this->SetSizer( bSizer384 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    btnDetect->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::DetectAddressBook ), NULL, this );
+    btnSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::UpdateSettings ), NULL, this );
+    btnCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::CloseWindow ), NULL, this );
 }
 
 frmEditAccountADT::~frmEditAccountADT()
 {
-       // Disconnect Events
-       btnDetect->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::DetectAddressBook ), NULL, this );
-       btnSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::UpdateSettings ), NULL, this );
-       btnCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    btnDetect->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::DetectAddressBook ), NULL, this );
+    btnSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::UpdateSettings ), NULL, this );
+    btnCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmEditAccountADT::CloseWindow ), NULL, this );
+    
 }
 
 frmSSLCertificateADT::frmSSLCertificateADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer384;
-       bSizer384 = new wxBoxSizer( wxVERTICAL );
-       
-       m_notebook28 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-       tabSummary = new wxPanel( m_notebook28, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer386;
-       bSizer386 = new wxBoxSizer( wxVERTICAL );
-       
-       pnlTop = new wxPanel( tabSummary, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       pnlTop->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNHIGHLIGHT ) );
-       
-       wxBoxSizer* bSizer389;
-       bSizer389 = new wxBoxSizer( wxVERTICAL );
-       
-       lblCertName = new wxStaticText( pnlTop, wxID_ANY, wxT("Certificate Name"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblCertName->Wrap( -1 );
-       lblCertName->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
-       
-       bSizer389->Add( lblCertName, 0, wxALL, 5 );
-       
-       lblValidityStatus = new wxStaticText( pnlTop, wxID_ANY, wxT("Validity Status"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblValidityStatus->Wrap( -1 );
-       bSizer389->Add( lblValidityStatus, 0, wxALL, 5 );
-       
-       
-       pnlTop->SetSizer( bSizer389 );
-       pnlTop->Layout();
-       bSizer389->Fit( pnlTop );
-       bSizer386->Add( pnlTop, 0, wxEXPAND | wxALL, 5 );
-       
-       wxBoxSizer* bSizer392;
-       bSizer392 = new wxBoxSizer( wxVERTICAL );
-       
-       m_panel54 = new wxPanel( tabSummary, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxFlexGridSizer* fgSizer44;
-       fgSizer44 = new wxFlexGridSizer( 0, 2, 0, 0 );
-       fgSizer44->AddGrowableCol( 1 );
-       fgSizer44->SetFlexibleDirection( wxHORIZONTAL );
-       fgSizer44->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-       
-       lblIssuedTo = new wxStaticText( m_panel54, wxID_ANY, wxT("Issued To:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblIssuedTo->Wrap( -1 );
-       fgSizer44->Add( lblIssuedTo, 0, wxALL, 5 );
-       
-       lblIssuedToData = new wxStaticText( m_panel54, wxID_ANY, wxT("IssuedTo"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblIssuedToData->Wrap( -1 );
-       fgSizer44->Add( lblIssuedToData, 1, wxALL|wxEXPAND, 5 );
-       
-       lblValidFrom = new wxStaticText( m_panel54, wxID_ANY, wxT("Valid From:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblValidFrom->Wrap( -1 );
-       fgSizer44->Add( lblValidFrom, 0, wxALL, 5 );
-       
-       lblValidFromData = new wxStaticText( m_panel54, wxID_ANY, wxT("ValidDate"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblValidFromData->Wrap( -1 );
-       fgSizer44->Add( lblValidFromData, 1, wxALL|wxEXPAND, 5 );
-       
-       lblValidUntil = new wxStaticText( m_panel54, wxID_ANY, wxT("Valid Until:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblValidUntil->Wrap( -1 );
-       fgSizer44->Add( lblValidUntil, 0, wxALL, 5 );
-       
-       lblValidUntilData = new wxStaticText( m_panel54, wxID_ANY, wxT("ValidUntil"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblValidUntilData->Wrap( -1 );
-       fgSizer44->Add( lblValidUntilData, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       m_panel54->SetSizer( fgSizer44 );
-       m_panel54->Layout();
-       fgSizer44->Fit( m_panel54 );
-       bSizer392->Add( m_panel54, 1, wxEXPAND | wxALL, 5 );
-       
-       
-       bSizer386->Add( bSizer392, 1, wxEXPAND, 5 );
-       
-       
-       tabSummary->SetSizer( bSizer386 );
-       tabSummary->Layout();
-       bSizer386->Fit( tabSummary );
-       m_notebook28->AddPage( tabSummary, wxT("Summary"), false );
-       tabDetail = new wxPanel( m_notebook28, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer3891;
-       bSizer3891 = new wxBoxSizer( wxVERTICAL );
-       
-       lstValues = new wxListCtrl( tabDetail, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER );
-       bSizer3891->Add( lstValues, 1, wxALL|wxEXPAND, 5 );
-       
-       txtValueData = new wxTextCtrl( tabDetail, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_READONLY );
-       txtValueData->SetMaxLength( 0 ); 
-       txtValueData->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
-       
-       bSizer3891->Add( txtValueData, 1, wxALL|wxEXPAND, 5 );
-       
-       
-       tabDetail->SetSizer( bSizer3891 );
-       tabDetail->Layout();
-       bSizer3891->Fit( tabDetail );
-       m_notebook28->AddPage( tabDetail, wxT("Detail"), false );
-       tabHierarchy = new wxPanel( m_notebook28, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer390;
-       bSizer390 = new wxBoxSizer( wxVERTICAL );
-       
-       treHierarchy = new wxTreeCtrl( tabHierarchy, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER );
-       bSizer390->Add( treHierarchy, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
-       
-       m_panel57 = new wxPanel( tabHierarchy, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer393;
-       bSizer393 = new wxBoxSizer( wxVERTICAL );
-       
-       btnViewCert = new wxButton( m_panel57, wxID_ANY, wxT("View Certificate"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer393->Add( btnViewCert, 0, wxALIGN_RIGHT|wxALL, 0 );
-       
-       
-       m_panel57->SetSizer( bSizer393 );
-       m_panel57->Layout();
-       bSizer393->Fit( m_panel57 );
-       bSizer390->Add( m_panel57, 0, wxEXPAND | wxALL, 5 );
-       
-       
-       tabHierarchy->SetSizer( bSizer390 );
-       tabHierarchy->Layout();
-       bSizer390->Fit( tabHierarchy );
-       m_notebook28->AddPage( tabHierarchy, wxT("Hierarchy"), true );
-       
-       bSizer384->Add( m_notebook28, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
-       
-       pnlButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* bSizer385;
-       bSizer385 = new wxBoxSizer( wxVERTICAL );
-       
-       btnClose = new wxButton( pnlButtons, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
-       btnClose->SetDefault(); 
-       bSizer385->Add( btnClose, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       pnlButtons->SetSizer( bSizer385 );
-       pnlButtons->Layout();
-       bSizer385->Fit( pnlButtons );
-       bSizer384->Add( pnlButtons, 0, wxEXPAND | wxALL, 5 );
-       
-       
-       this->SetSizer( bSizer384 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       lstValues->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmSSLCertificateADT::LoadValueData ), NULL, this );
-       treHierarchy->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( frmSSLCertificateADT::CheckCertificate ), NULL, this );
-       btnViewCert->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSSLCertificateADT::ViewCertificate ), NULL, this );
-       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSSLCertificateADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer384;
+    bSizer384 = new wxBoxSizer( wxVERTICAL );
+    
+    m_notebook28 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+    tabSummary = new wxPanel( m_notebook28, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer386;
+    bSizer386 = new wxBoxSizer( wxVERTICAL );
+    
+    pnlTop = new wxPanel( tabSummary, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    pnlTop->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNHIGHLIGHT ) );
+    
+    wxBoxSizer* bSizer389;
+    bSizer389 = new wxBoxSizer( wxVERTICAL );
+    
+    lblCertName = new wxStaticText( pnlTop, wxID_ANY, wxT("Certificate Name"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblCertName->Wrap( -1 );
+    lblCertName->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+    
+    bSizer389->Add( lblCertName, 0, wxALL, 5 );
+    
+    lblValidityStatus = new wxStaticText( pnlTop, wxID_ANY, wxT("Validity Status"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblValidityStatus->Wrap( -1 );
+    bSizer389->Add( lblValidityStatus, 0, wxALL, 5 );
+    
+    
+    pnlTop->SetSizer( bSizer389 );
+    pnlTop->Layout();
+    bSizer389->Fit( pnlTop );
+    bSizer386->Add( pnlTop, 0, wxEXPAND | wxALL, 5 );
+    
+    wxBoxSizer* bSizer392;
+    bSizer392 = new wxBoxSizer( wxVERTICAL );
+    
+    m_panel54 = new wxPanel( tabSummary, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxFlexGridSizer* fgSizer44;
+    fgSizer44 = new wxFlexGridSizer( 0, 2, 0, 0 );
+    fgSizer44->AddGrowableCol( 1 );
+    fgSizer44->SetFlexibleDirection( wxHORIZONTAL );
+    fgSizer44->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+    
+    lblIssuedTo = new wxStaticText( m_panel54, wxID_ANY, wxT("Issued To:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblIssuedTo->Wrap( -1 );
+    fgSizer44->Add( lblIssuedTo, 0, wxALL, 5 );
+    
+    lblIssuedToData = new wxStaticText( m_panel54, wxID_ANY, wxT("IssuedTo"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblIssuedToData->Wrap( -1 );
+    fgSizer44->Add( lblIssuedToData, 1, wxALL|wxEXPAND, 5 );
+    
+    lblValidFrom = new wxStaticText( m_panel54, wxID_ANY, wxT("Valid From:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblValidFrom->Wrap( -1 );
+    fgSizer44->Add( lblValidFrom, 0, wxALL, 5 );
+    
+    lblValidFromData = new wxStaticText( m_panel54, wxID_ANY, wxT("ValidDate"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblValidFromData->Wrap( -1 );
+    fgSizer44->Add( lblValidFromData, 1, wxALL|wxEXPAND, 5 );
+    
+    lblValidUntil = new wxStaticText( m_panel54, wxID_ANY, wxT("Valid Until:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblValidUntil->Wrap( -1 );
+    fgSizer44->Add( lblValidUntil, 0, wxALL, 5 );
+    
+    lblValidUntilData = new wxStaticText( m_panel54, wxID_ANY, wxT("ValidUntil"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblValidUntilData->Wrap( -1 );
+    fgSizer44->Add( lblValidUntilData, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    m_panel54->SetSizer( fgSizer44 );
+    m_panel54->Layout();
+    fgSizer44->Fit( m_panel54 );
+    bSizer392->Add( m_panel54, 1, wxEXPAND | wxALL, 5 );
+    
+    
+    bSizer386->Add( bSizer392, 1, wxEXPAND, 5 );
+    
+    
+    tabSummary->SetSizer( bSizer386 );
+    tabSummary->Layout();
+    bSizer386->Fit( tabSummary );
+    m_notebook28->AddPage( tabSummary, wxT("Summary"), false );
+    tabDetail = new wxPanel( m_notebook28, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer3891;
+    bSizer3891 = new wxBoxSizer( wxVERTICAL );
+    
+    lstValues = new wxListCtrl( tabDetail, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER );
+    bSizer3891->Add( lstValues, 1, wxALL|wxEXPAND, 5 );
+    
+    txtValueData = new wxTextCtrl( tabDetail, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_READONLY );
+    txtValueData->SetMaxLength( 0 ); 
+    txtValueData->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+    
+    bSizer3891->Add( txtValueData, 1, wxALL|wxEXPAND, 5 );
+    
+    
+    tabDetail->SetSizer( bSizer3891 );
+    tabDetail->Layout();
+    bSizer3891->Fit( tabDetail );
+    m_notebook28->AddPage( tabDetail, wxT("Detail"), false );
+    tabHierarchy = new wxPanel( m_notebook28, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer390;
+    bSizer390 = new wxBoxSizer( wxVERTICAL );
+    
+    treHierarchy = new wxTreeCtrl( tabHierarchy, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER );
+    bSizer390->Add( treHierarchy, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+    
+    m_panel57 = new wxPanel( tabHierarchy, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer393;
+    bSizer393 = new wxBoxSizer( wxVERTICAL );
+    
+    btnViewCert = new wxButton( m_panel57, wxID_ANY, wxT("View Certificate"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer393->Add( btnViewCert, 0, wxALIGN_RIGHT|wxALL, 0 );
+    
+    
+    m_panel57->SetSizer( bSizer393 );
+    m_panel57->Layout();
+    bSizer393->Fit( m_panel57 );
+    bSizer390->Add( m_panel57, 0, wxEXPAND | wxALL, 5 );
+    
+    
+    tabHierarchy->SetSizer( bSizer390 );
+    tabHierarchy->Layout();
+    bSizer390->Fit( tabHierarchy );
+    m_notebook28->AddPage( tabHierarchy, wxT("Hierarchy"), true );
+    
+    bSizer384->Add( m_notebook28, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+    
+    pnlButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+    wxBoxSizer* bSizer385;
+    bSizer385 = new wxBoxSizer( wxVERTICAL );
+    
+    btnClose = new wxButton( pnlButtons, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+    btnClose->SetDefault(); 
+    bSizer385->Add( btnClose, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    pnlButtons->SetSizer( bSizer385 );
+    pnlButtons->Layout();
+    bSizer385->Fit( pnlButtons );
+    bSizer384->Add( pnlButtons, 0, wxEXPAND | wxALL, 5 );
+    
+    
+    this->SetSizer( bSizer384 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    lstValues->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmSSLCertificateADT::LoadValueData ), NULL, this );
+    treHierarchy->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( frmSSLCertificateADT::CheckCertificate ), NULL, this );
+    btnViewCert->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSSLCertificateADT::ViewCertificate ), NULL, this );
+    btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSSLCertificateADT::CloseWindow ), NULL, this );
 }
 
 frmSSLCertificateADT::~frmSSLCertificateADT()
 {
-       // Disconnect Events
-       lstValues->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmSSLCertificateADT::LoadValueData ), NULL, this );
-       treHierarchy->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( frmSSLCertificateADT::CheckCertificate ), NULL, this );
-       btnViewCert->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSSLCertificateADT::ViewCertificate ), NULL, this );
-       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSSLCertificateADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    lstValues->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmSSLCertificateADT::LoadValueData ), NULL, this );
+    treHierarchy->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( frmSSLCertificateADT::CheckCertificate ), NULL, this );
+    btnViewCert->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSSLCertificateADT::ViewCertificate ), NULL, this );
+    btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmSSLCertificateADT::CloseWindow ), NULL, this );
+    
 }
 
 frmInvalidSSLCertificateADT::frmInvalidSSLCertificateADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer387;
-       bSizer387 = new wxBoxSizer( wxVERTICAL );
-       
-       lblSSLText = new wxStaticText( this, wxID_ANY, wxT("Text"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblSSLText->Wrap( -1 );
-       bSizer387->Add( lblSSLText, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer388;
-       bSizer388 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnAccept = new wxButton( this, wxID_ANY, wxT("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer388->Add( btnAccept, 0, wxALL, 5 );
-       
-       btnReject = new wxButton( this, wxID_ANY, wxT("Reject"), wxDefaultPosition, wxDefaultSize, 0 );
-       btnReject->SetDefault(); 
-       bSizer388->Add( btnReject, 0, wxALL, 5 );
-       
-       btnViewCert = new wxButton( this, wxID_ANY, wxT("View Certificates..."), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer388->Add( btnViewCert, 0, wxALL, 5 );
-       
-       
-       bSizer387->Add( bSizer388, 0, wxALIGN_CENTER_HORIZONTAL, 0 );
-       
-       
-       this->SetSizer( bSizer387 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       btnAccept->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::Accept ), NULL, this );
-       btnReject->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::Reject ), NULL, this );
-       btnViewCert->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::ViewCertificates ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer387;
+    bSizer387 = new wxBoxSizer( wxVERTICAL );
+    
+    lblSSLText = new wxStaticText( this, wxID_ANY, wxT("Text"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblSSLText->Wrap( -1 );
+    bSizer387->Add( lblSSLText, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer388;
+    bSizer388 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnAccept = new wxButton( this, wxID_ANY, wxT("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer388->Add( btnAccept, 0, wxALL, 5 );
+    
+    btnReject = new wxButton( this, wxID_ANY, wxT("Reject"), wxDefaultPosition, wxDefaultSize, 0 );
+    btnReject->SetDefault(); 
+    bSizer388->Add( btnReject, 0, wxALL, 5 );
+    
+    btnViewCert = new wxButton( this, wxID_ANY, wxT("View Certificates..."), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer388->Add( btnViewCert, 0, wxALL, 5 );
+    
+    
+    bSizer387->Add( bSizer388, 0, wxALIGN_CENTER_HORIZONTAL, 0 );
+    
+    
+    this->SetSizer( bSizer387 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    btnAccept->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::Accept ), NULL, this );
+    btnReject->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::Reject ), NULL, this );
+    btnViewCert->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::ViewCertificates ), NULL, this );
 }
 
 frmInvalidSSLCertificateADT::~frmInvalidSSLCertificateADT()
 {
-       // Disconnect Events
-       btnAccept->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::Accept ), NULL, this );
-       btnReject->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::Reject ), NULL, this );
-       btnViewCert->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::ViewCertificates ), NULL, this );
-       
+    // Disconnect Events
+    btnAccept->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::Accept ), NULL, this );
+    btnReject->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::Reject ), NULL, this );
+    btnViewCert->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::ViewCertificates ), NULL, this );
+    
 }
 
 frmImportContactsADT::frmImportContactsADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer393;
-       bSizer393 = new wxBoxSizer( wxVERTICAL );
-       
-       lblImportText = new wxStaticText( this, wxID_ANY, wxT("Select the contacts you want to import and the account to import into. Click on Import to finish."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblImportText->Wrap( -1 );
-       bSizer393->Add( lblImportText, 0, wxALL|wxEXPAND, 5 );
-       
-       wxArrayString lstContactsChoices;
-       lstContacts = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, lstContactsChoices, wxLB_ALWAYS_SB|wxLB_SORT );
-       bSizer393->Add( lstContacts, 1, wxALL|wxEXPAND, 5 );
-       
-       szrAccount = new wxBoxSizer( wxHORIZONTAL );
-       
-       lblAccountText = new wxStaticText( this, wxID_ANY, wxT("Account:"), wxDefaultPosition, wxDefaultSize, 0 );
-       lblAccountText->Wrap( -1 );
-       szrAccount->Add( lblAccountText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       
-       bSizer393->Add( szrAccount, 0, wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer394;
-       bSizer394 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnImport = new wxButton( this, wxID_ANY, wxT("Import"), wxDefaultPosition, wxDefaultSize, 0 );
-       btnImport->SetDefault(); 
-       bSizer394->Add( btnImport, 0, wxALL, 5 );
-       
-       btnCancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer394->Add( btnCancel, 0, wxALL, 5 );
-       
-       
-       bSizer393->Add( bSizer394, 0, wxALIGN_RIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer393 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       btnImport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportContactsADT::ImportContacts ), NULL, this );
-       btnCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportContactsADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer393;
+    bSizer393 = new wxBoxSizer( wxVERTICAL );
+    
+    lblImportText = new wxStaticText( this, wxID_ANY, wxT("Select the contacts you want to import and the account to import into. Click on Import to finish."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblImportText->Wrap( -1 );
+    bSizer393->Add( lblImportText, 0, wxALL|wxEXPAND, 5 );
+    
+    wxArrayString lstContactsChoices;
+    lstContacts = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, lstContactsChoices, wxLB_ALWAYS_SB|wxLB_SORT );
+    bSizer393->Add( lstContacts, 1, wxALL|wxEXPAND, 5 );
+    
+    szrAccount = new wxBoxSizer( wxHORIZONTAL );
+    
+    lblAccountText = new wxStaticText( this, wxID_ANY, wxT("Account:"), wxDefaultPosition, wxDefaultSize, 0 );
+    lblAccountText->Wrap( -1 );
+    szrAccount->Add( lblAccountText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+    
+    
+    bSizer393->Add( szrAccount, 0, wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer394;
+    bSizer394 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnImport = new wxButton( this, wxID_ANY, wxT("Import"), wxDefaultPosition, wxDefaultSize, 0 );
+    btnImport->SetDefault(); 
+    bSizer394->Add( btnImport, 0, wxALL, 5 );
+    
+    btnCancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer394->Add( btnCancel, 0, wxALL, 5 );
+    
+    
+    bSizer393->Add( bSizer394, 0, wxALIGN_RIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer393 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    btnImport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportContactsADT::ImportContacts ), NULL, this );
+    btnCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportContactsADT::CloseWindow ), NULL, this );
 }
 
 frmImportContactsADT::~frmImportContactsADT()
 {
-       // Disconnect Events
-       btnImport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportContactsADT::ImportContacts ), NULL, this );
-       btnCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportContactsADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    btnImport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportContactsADT::ImportContacts ), NULL, this );
+    btnCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportContactsADT::CloseWindow ), NULL, this );
+    
 }
 
 frmImportResultsADT::frmImportResultsADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-       
-       wxBoxSizer* bSizer396;
-       bSizer396 = new wxBoxSizer( wxVERTICAL );
-       
-       lblText = new wxStaticText( this, wxID_ANY, wxT("x contacts imported. x contacts had errors and could not be imported."), wxDefaultPosition, wxDefaultSize, 0 );
-       lblText->Wrap( -1 );
-       bSizer396->Add( lblText, 0, wxALL, 5 );
-       
-       txtResults = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
-       txtResults->SetMaxLength( 0 ); 
-       bSizer396->Add( txtResults, 1, wxALL|wxEXPAND, 5 );
-       
-       wxBoxSizer* bSizer397;
-       bSizer397 = new wxBoxSizer( wxHORIZONTAL );
-       
-       btnCopyClipboard = new wxButton( this, wxID_ANY, wxT("Copy to Clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer397->Add( btnCopyClipboard, 0, 0, 5 );
-       
-       btnFinish = new wxButton( this, wxID_ANY, wxT("Finish"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer397->Add( btnFinish, 0, wxALIGN_RIGHT|wxBOTTOM|wxLEFT, 5 );
-       
-       
-       bSizer396->Add( bSizer397, 0, wxALIGN_RIGHT|wxRIGHT, 5 );
-       
-       
-       this->SetSizer( bSizer396 );
-       this->Layout();
-       
-       this->Centre( wxBOTH );
-       
-       // Connect Events
-       btnCopyClipboard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportResultsADT::CopyClipboard ), NULL, this );
-       btnFinish->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportResultsADT::CloseWindow ), NULL, this );
+    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+    
+    wxBoxSizer* bSizer396;
+    bSizer396 = new wxBoxSizer( wxVERTICAL );
+    
+    lblText = new wxStaticText( this, wxID_ANY, wxT("x contacts imported. x contacts had errors and could not be imported."), wxDefaultPosition, wxDefaultSize, 0 );
+    lblText->Wrap( -1 );
+    bSizer396->Add( lblText, 0, wxALL, 5 );
+    
+    txtResults = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
+    txtResults->SetMaxLength( 0 ); 
+    bSizer396->Add( txtResults, 1, wxALL|wxEXPAND, 5 );
+    
+    wxBoxSizer* bSizer397;
+    bSizer397 = new wxBoxSizer( wxHORIZONTAL );
+    
+    btnCopyClipboard = new wxButton( this, wxID_ANY, wxT("Copy to Clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer397->Add( btnCopyClipboard, 0, 0, 5 );
+    
+    btnFinish = new wxButton( this, wxID_ANY, wxT("Finish"), wxDefaultPosition, wxDefaultSize, 0 );
+    bSizer397->Add( btnFinish, 0, wxALIGN_RIGHT|wxBOTTOM|wxLEFT, 5 );
+    
+    
+    bSizer396->Add( bSizer397, 0, wxALIGN_RIGHT|wxRIGHT, 5 );
+    
+    
+    this->SetSizer( bSizer396 );
+    this->Layout();
+    
+    this->Centre( wxBOTH );
+    
+    // Connect Events
+    btnCopyClipboard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportResultsADT::CopyClipboard ), NULL, this );
+    btnFinish->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportResultsADT::CloseWindow ), NULL, this );
 }
 
 frmImportResultsADT::~frmImportResultsADT()
 {
-       // Disconnect Events
-       btnCopyClipboard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportResultsADT::CopyClipboard ), NULL, this );
-       btnFinish->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportResultsADT::CloseWindow ), NULL, this );
-       
+    // Disconnect Events
+    btnCopyClipboard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportResultsADT::CopyClipboard ), NULL, this );
+    btnFinish->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmImportResultsADT::CloseWindow ), NULL, this );
+    
 }
index 5de2092..7aa8b26 100644 (file)
 #define ID_MANAGE_NEWAB 1000
 #define ID_MANAGE_IMPORT 1001
 #define ID_MANAGE_EXPORT 1002
-#define ID_MANAGE_PREFERENCES 1003
-#define ID_MANAGE_EXIT 1004
-#define ID_CONTACT_EDIT 1005
-#define ID_CONTACT_DELETE 1006
-#define ID_SET_CONTACT_AS_MYSELF 1007
-#define ID_VIEW_FNLN 1008
-#define ID_VIEW_LNFN 1009
-#define ID_VIEW_NICK 1010
-#define ID_VIEW_ASC 1011
-#define ID_VIEW_DESC 1012
-#define ID_VIEW_STATUSBAR 1013
-#define ID_MANAGE_CUT 1014
-#define ID_MANAGE_COPY 1015
-#define ID_MANAGE_PASTE 1016
-#define ID_HELP_SHOW 1017
-#define ID_MANAGE_UPDATE 1018
-#define ID_HELP_ABOUT 1019
-#define ID_CONTACT_CLOSE 1020
-#define CONTACT_SAVE 1021
-#define CONTACT_SAVECLOSE 1022
-#define CONTACT_CLOSE 1023
+#define ID_CONTACT_EDIT 1003
+#define ID_CONTACT_DELETE 1004
+#define ID_VIEW_FNLN 1005
+#define ID_VIEW_LNFN 1006
+#define ID_VIEW_NICK 1007
+#define ID_VIEW_ASC 1008
+#define ID_VIEW_DESC 1009
+#define ID_VIEW_STATUSBAR 1010
+#define ID_MANAGE_CUT 1011
+#define ID_MANAGE_COPY 1012
+#define ID_MANAGE_PASTE 1013
+#define ID_HELP_SHOW 1014
+#define ID_MANAGE_UPDATE 1015
+#define ID_CONTACT_CLOSE 1016
+#define CONTACT_SAVE 1017
+#define CONTACT_SAVECLOSE 1018
+#define CONTACT_CLOSE 1019
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmMainADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmMainADT : public wxFrame 
+class frmMainADT : public wxFrame
 {
-       private:
-       
-       protected:
-               wxMenuBar* mnuMain;
-               wxMenu* mnuManage;
-               wxMenu* mnuContact;
-               wxMenuItem* setContactAsMyself;
-               wxMenuItem* m_separator5;
-               wxMenu* mnuView;
-               wxMenu* mnuShowContactsAs;
-               wxMenu* mnuViewSortBy;
-               wxMenu* mnuViewShow;
-               wxMenu* mnuEdit;
-               wxMenu* mnuWindow;
-               wxMenu* mnuHelp;
-               wxBoxSizer* szrMain;
-               wxStaticBitmap* bmpIcon;
-               wxComboCtrl* AccCtrl;
-               wxSplitterWindow* m_splitter13;
-               wxPanel* m_panel19;
-               wxFlexGridSizer* szrContactList;
-               wxFlexGridSizer* szrAccList;
-               wxListCtrl* lstContacts;
-               wxPanel* m_panel20;
-               wxHtmlWindow* htmContactData;
-               wxStatusBar* stbBottom;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void OpenNewABDialog( wxCommandEvent& event ) { event.Skip(); }
-               virtual void RefreshAddressBook( wxCommandEvent& event ) { event.Skip(); }
-               virtual void OpenImportDialog( wxCommandEvent& event ) { event.Skip(); }
-               virtual void OpenExportDialog( wxCommandEvent& event ) { event.Skip(); }
-               virtual void OpenPreferences( wxCommandEvent& event ) { event.Skip(); }
-               virtual void QuitApp( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ShowContactEditorNew( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ShowContactEditorEdit( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteContact( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SetContactAsSelf( wxCommandEvent& event ) { event.Skip(); }
-               virtual void OpenFindContactsWindow( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SortFNLN( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SortLNFN( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SortNickname( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SortDisplayAs( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SortAscending( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SortDescending( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ToggleStatusBar( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ShowActivityWindow( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CutAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CopyAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void PasteAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ShowHelp( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CheckUpdates( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ShowAboutWindow( wxCommandEvent& event ) { event.Skip(); }
-               virtual void OpenContactInfo( wxListEvent& event ) { event.Skip(); }
-               virtual void ShowContactInfo( wxListEvent& event ) { event.Skip(); }
-               virtual void ShowContactSubmenu( wxMouseEvent& event ) { event.Skip(); }
-               virtual void UpdateSBIconPlacement( wxSizeEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmMainADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Xestia Address Book"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE );
-               
-               ~frmMainADT();
-               
-               void m_splitter13OnIdle( wxIdleEvent& )
-               {
-                       m_splitter13->SetSashPosition( 184 );
-                       m_splitter13->Disconnect( wxEVT_IDLE, wxIdleEventHandler( frmMainADT::m_splitter13OnIdle ), NULL, this );
-               }
-       
+private:
+    
+protected:
+    wxMenuBar* mnuMain;
+    wxMenu* mnuManage;
+    wxMenuItem* mnuPrefSep;
+    wxMenuItem* mnuExitSep;
+    wxMenu* mnuContact;
+    wxMenu* mnuView;
+    wxMenu* mnuShowContactsAs;
+    wxMenu* mnuViewSortBy;
+    wxMenu* mnuViewShow;
+    wxMenu* mnuEdit;
+    wxMenu* mnuWindow;
+    wxMenu* mnuHelp;
+    wxMenuItem* mnuHelpAboutSep;
+    wxBoxSizer* szrMain;
+    wxStaticBitmap* bmpIcon;
+    wxComboCtrl* AccCtrl;
+    wxSplitterWindow* m_splitter13;
+    wxPanel* m_panel19;
+    wxFlexGridSizer* szrContactList;
+    wxFlexGridSizer* szrAccList;
+    wxListCtrl* lstContacts;
+    wxPanel* m_panel20;
+    wxHtmlWindow* htmContactData;
+    wxStatusBar* stbBottom;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void OpenNewABDialog( wxCommandEvent& event ) { event.Skip(); }
+    virtual void RefreshAddressBook( wxCommandEvent& event ) { event.Skip(); }
+    virtual void OpenImportDialog( wxCommandEvent& event ) { event.Skip(); }
+    virtual void OpenExportDialog( wxCommandEvent& event ) { event.Skip(); }
+    virtual void OpenPreferences( wxCommandEvent& event ) { event.Skip(); }
+    virtual void QuitApp( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ShowContactEditorNew( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ShowContactEditorEdit( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteContact( wxCommandEvent& event ) { event.Skip(); }
+    virtual void OpenFindContactsWindow( wxCommandEvent& event ) { event.Skip(); }
+    virtual void SortFNLN( wxCommandEvent& event ) { event.Skip(); }
+    virtual void SortLNFN( wxCommandEvent& event ) { event.Skip(); }
+    virtual void SortNickname( wxCommandEvent& event ) { event.Skip(); }
+    virtual void SortDisplayAs( wxCommandEvent& event ) { event.Skip(); }
+    virtual void SortAscending( wxCommandEvent& event ) { event.Skip(); }
+    virtual void SortDescending( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ToggleStatusBar( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ShowActivityWindow( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CutAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CopyAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void PasteAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ShowHelp( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CheckUpdates( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ShowAboutWindow( wxCommandEvent& event ) { event.Skip(); }
+    virtual void OpenContactInfo( wxListEvent& event ) { event.Skip(); }
+    virtual void ShowContactInfo( wxListEvent& event ) { event.Skip(); }
+    virtual void ShowContactSubmenu( wxMouseEvent& event ) { event.Skip(); }
+    virtual void UpdateSBIconPlacement( wxSizeEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmMainADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Xestia Address Book"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE );
+    
+    ~frmMainADT();
+    
+    void m_splitter13OnIdle( wxIdleEvent& )
+    {
+        m_splitter13->SetSashPosition( 184 );
+        m_splitter13->Disconnect( wxEVT_IDLE, wxIdleEventHandler( frmMainADT::m_splitter13OnIdle ), NULL, this );
+    }
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmUpdateADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmUpdateADT : public wxDialog 
+class frmUpdateADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxPanel* pnlUpdateData;
-               wxStaticText* lblRunningText;
-               wxStaticText* lblRunningVer;
-               wxStaticText* lblAvailableText;
-               wxStaticText* lblAvailableVer;
-               wxStaticText* lblBuildTypeText;
-               wxStaticText* lblBuildType;
-               wxStaticText* lblUpdateMessage;
-               wxStaticLine* statLine;
-               wxButton* btnVisitGelforn;
-               wxButton* btnVisitPREMIUM;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void VisitGelforn( wxCommandEvent& event ) { event.Skip(); }
-               virtual void VisitPREMIUM( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmUpdateADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Check For Updates"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 433,273 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmUpdateADT();
-       
+private:
+    
+protected:
+    wxPanel* pnlUpdateData;
+    wxStaticText* lblRunningText;
+    wxStaticText* lblRunningVer;
+    wxStaticText* lblAvailableText;
+    wxStaticText* lblAvailableVer;
+    wxStaticText* lblBuildTypeText;
+    wxStaticText* lblBuildType;
+    wxStaticText* lblUpdateMessage;
+    wxStaticLine* statLine;
+    wxButton* btnVisitGelforn;
+    wxButton* btnVisitPREMIUM;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void VisitGelforn( wxCommandEvent& event ) { event.Skip(); }
+    virtual void VisitPREMIUM( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmUpdateADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Check For Updates"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 433,273 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmUpdateADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmSearchADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmSearchADT : public wxFrame 
+class frmSearchADT : public wxFrame
 {
-       private:
-       
-       protected:
-               wxStatusBar* stbBottom;
-               wxSplitterWindow* m_splitter4;
-               wxPanel* m_panel60;
-               wxNotebook* nbkSearch;
-               wxScrolledWindow* tabSearch;
-               wxFlexGridSizer* szrSearch;
-               wxScrolledWindow* tabAdvanced;
-               wxButton* btnSelectAccounts;
-               wxButton* btnSearch;
-               wxButton* btnReset;
-               wxPanel* m_panel61;
-               wxListCtrl* lstResults;
-               wxMenuBar* m_menubar5;
-               wxMenu* mnuContact;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void CloseWindow( wxCloseEvent& event ) { event.Skip(); }
-               virtual void SelectAccounts( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SearchContacts( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ResetContacts( wxCommandEvent& event ) { event.Skip(); }
-               virtual void OpenContact( wxCommandEvent& event ) { event.Skip(); }
-               virtual void EditContact( wxCommandEvent& event ) { event.Skip(); }
-               virtual void RevealContact( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmSearchADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Search Contacts"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 517,450 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
-               
-               ~frmSearchADT();
-               
-               void m_splitter4OnIdle( wxIdleEvent& )
-               {
-                       m_splitter4->SetSashPosition( 178 );
-                       m_splitter4->Disconnect( wxEVT_IDLE, wxIdleEventHandler( frmSearchADT::m_splitter4OnIdle ), NULL, this );
-               }
-       
+private:
+    
+protected:
+    wxStatusBar* stbBottom;
+    wxSplitterWindow* m_splitter4;
+    wxPanel* m_panel60;
+    wxNotebook* nbkSearch;
+    wxScrolledWindow* tabSearch;
+    wxFlexGridSizer* szrSearch;
+    wxScrolledWindow* tabAdvanced;
+    wxButton* btnSelectAccounts;
+    wxButton* btnSearch;
+    wxButton* btnReset;
+    wxPanel* m_panel61;
+    wxListCtrl* lstResults;
+    wxMenuBar* m_menubar5;
+    wxMenu* mnuContact;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void CloseWindow( wxCloseEvent& event ) { event.Skip(); }
+    virtual void SelectAccounts( wxCommandEvent& event ) { event.Skip(); }
+    virtual void SearchContacts( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ResetContacts( wxCommandEvent& event ) { event.Skip(); }
+    virtual void OpenContact( wxCommandEvent& event ) { event.Skip(); }
+    virtual void EditContact( wxCommandEvent& event ) { event.Skip(); }
+    virtual void RevealContact( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmSearchADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Search Contacts"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 517,450 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+    
+    ~frmSearchADT();
+    
+    void m_splitter4OnIdle( wxIdleEvent& )
+    {
+        m_splitter4->SetSashPosition( 178 );
+        m_splitter4->Disconnect( wxEVT_IDLE, wxIdleEventHandler( frmSearchADT::m_splitter4OnIdle ), NULL, this );
+    }
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmPreferencesADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmPreferencesADT : public wxDialog 
+class frmPreferencesADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* NbtPreferences;
-               wxPanel* tabGeneral;
-               wxCheckBox* chkSaveWindowPosition;
-               wxCheckBox* chkHideLocal;
-               wxPanel* tabTheme;
-               wxListCtrl* lstThemes;
-               wxButton* btnThemeAdd;
-               wxButton* btnThemeModify;
-               wxButton* btnThemeDelete;
-               wxPanel* tabAccounts;
-               wxListCtrl* lstAccounts;
-               wxButton* btnAccountAdd;
-               wxButton* btnAccountModify;
-               wxButton* btnAccountDelete;
-               wxButton* btnSave;
-               wxButton* btnCancel;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void LoadPreferences( wxInitDialogEvent& event ) { event.Skip(); }
-               virtual void DisableABButtons( wxListEvent& event ) { event.Skip(); }
-               virtual void EnableABButtons( wxListEvent& event ) { event.Skip(); }
-               virtual void AddABAccount( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyABAccount( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteABAccount( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SavePreferences( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmPreferencesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Preferences"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 450,400 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmPreferencesADT();
-       
+private:
+    
+protected:
+    wxNotebook* NbtPreferences;
+    wxPanel* tabGeneral;
+    wxCheckBox* chkSaveWindowPosition;
+    wxCheckBox* chkHideLocal;
+    wxPanel* tabTheme;
+    wxListCtrl* lstThemes;
+    wxButton* btnThemeAdd;
+    wxButton* btnThemeModify;
+    wxButton* btnThemeDelete;
+    wxPanel* tabAccounts;
+    wxListCtrl* lstAccounts;
+    wxButton* btnAccountAdd;
+    wxButton* btnAccountModify;
+    wxButton* btnAccountDelete;
+    wxButton* btnSave;
+    wxButton* btnCancel;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void LoadPreferences( wxInitDialogEvent& event ) { event.Skip(); }
+    virtual void DisableABButtons( wxListEvent& event ) { event.Skip(); }
+    virtual void EnableABButtons( wxListEvent& event ) { event.Skip(); }
+    virtual void AddABAccount( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyABAccount( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteABAccount( wxCommandEvent& event ) { event.Skip(); }
+    virtual void SavePreferences( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmPreferencesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Preferences"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 450,400 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmPreferencesADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmAboutADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmAboutADT : public wxDialog 
+class frmAboutADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxStaticBitmap* bmpLogo;
-               wxStaticText* lblVersion;
-               wxStaticText* lblCompileTime;
-               wxStaticText* lblCopyright;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void CloseAboutWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmAboutADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("About Xestia Address Book"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,400 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmAboutADT();
-       
+private:
+    
+protected:
+    wxStaticBitmap* bmpLogo;
+    wxStaticText* lblVersion;
+    wxStaticText* lblCompileTime;
+    wxStaticText* lblCopyright;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void CloseAboutWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmAboutADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("About Xestia Address Book"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,400 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmAboutADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactADT : public wxFrame 
+class frmContactADT : public wxFrame
 {
-       private:
-       
-       protected:
-               wxHtmlWindow* htmContactData;
-               wxMenuBar* m_menubar2;
-               wxMenu* contact;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void CloseWindow( wxCloseEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 320,240 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
-               
-               ~frmContactADT();
-       
+private:
+    
+protected:
+    wxHtmlWindow* htmContactData;
+    wxMenuBar* m_menubar2;
+    wxMenu* contact;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void CloseWindow( wxCloseEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 320,240 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+    
+    ~frmContactADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmNewAccountADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmNewAccountADT : public wxDialog 
+class frmNewAccountADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxBoxSizer* szrNewAccount;
-               wxPanel* tabType;
-               wxStaticText* lblEnterText;
-               wxStaticText* lblType;
-               wxChoice* cmbServerType;
-               wxStaticText* lblServerAddress;
-               wxTextCtrl* txtServerAddress;
-               wxStaticText* lblServerPort;
-               wxTextCtrl* txtServerPort;
-               wxStaticText* lblUsername;
-               wxTextCtrl* txtUsername;
-               wxStaticText* lblPassword;
-               wxTextCtrl* txtPassword;
-               wxStaticText* lblSSL;
-               wxCheckBox* chkUseSSL;
-               wxPanel* tabConn;
-               wxStaticText* lblConnectionResult;
-               wxStaticText* lblServerConnected;
-               wxStaticText* lblServerConnResult;
-               wxStaticText* lblValidResponse;
-               wxStaticText* lblServerResponse;
-               wxStaticText* lblUseSSL;
-               wxStaticText* lblServerSSLResult;
-               wxStaticText* lblServerSSLCert;
-               wxStaticText* lblServerSSLValid;
-               wxStaticText* lblServerUsernamePassword;
-               wxStaticText* lblAbleToLoginResult;
-               wxStaticText* lblIsCalDAV;
-               wxStaticText* lblCardDAVSupportResult;
-               wxStaticLine* m_staticline3;
-               wxStaticText* lblConnectionResultText;
-               wxPanel* tabFinish;
-               wxStaticText* lblFinishText;
-               wxStaticText* lblAccountName;
-               wxTextCtrl* txtAccountName;
-               wxButton* btnPrevious;
-               wxButton* btnNext;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void UpdateRequirements( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CheckAccountName( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessPrevious( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessNext( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmNewAccountADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("New Account"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 425,330 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmNewAccountADT();
-       
+private:
+    
+protected:
+    wxBoxSizer* szrNewAccount;
+    wxPanel* tabType;
+    wxStaticText* lblEnterText;
+    wxStaticText* lblType;
+    wxChoice* cmbServerType;
+    wxStaticText* lblServerAddress;
+    wxTextCtrl* txtServerAddress;
+    wxStaticText* lblServerPort;
+    wxTextCtrl* txtServerPort;
+    wxStaticText* lblUsername;
+    wxTextCtrl* txtUsername;
+    wxStaticText* lblPassword;
+    wxTextCtrl* txtPassword;
+    wxStaticText* lblSSL;
+    wxCheckBox* chkUseSSL;
+    wxPanel* tabConn;
+    wxStaticText* lblConnectionResult;
+    wxStaticText* lblServerConnected;
+    wxStaticText* lblServerConnResult;
+    wxStaticText* lblValidResponse;
+    wxStaticText* lblServerResponse;
+    wxStaticText* lblUseSSL;
+    wxStaticText* lblServerSSLResult;
+    wxStaticText* lblServerSSLCert;
+    wxStaticText* lblServerSSLValid;
+    wxStaticText* lblServerUsernamePassword;
+    wxStaticText* lblAbleToLoginResult;
+    wxStaticText* lblIsCalDAV;
+    wxStaticText* lblCardDAVSupportResult;
+    wxStaticLine* m_staticline3;
+    wxStaticText* lblConnectionResultText;
+    wxPanel* tabFinish;
+    wxStaticText* lblFinishText;
+    wxStaticText* lblAccountName;
+    wxTextCtrl* txtAccountName;
+    wxButton* btnPrevious;
+    wxButton* btnNext;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void UpdateRequirements( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CheckAccountName( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessPrevious( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessNext( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmNewAccountADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("New Account"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 425,330 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmNewAccountADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorADT : public wxFrame 
+class frmContactEditorADT : public wxFrame
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkContact;
-               wxScrolledWindow* tabGeneral;
-               wxStaticText* lblTitle;
-               wxTextCtrl* txtTitle;
-               wxStaticText* lblForename;
-               wxTextCtrl* txtForename;
-               wxStaticText* lblSurname;
-               wxTextCtrl* txtSurname;
-               wxStaticText* lblOtherNames;
-               wxTextCtrl* txtOtherNames;
-               wxStaticText* lblSuffix;
-               wxTextCtrl* txtSuffix;
-               wxStaticText* lblDisplayAs;
-               wxComboBox* cmbDisplayAs;
-               wxStaticText* lblBirthday;
-               wxDatePickerCtrl* dapBirthday;
-               wxTextCtrl* txtBirthday;
-               wxStaticText* lblAnniversary;
-               wxDatePickerCtrl* dapAnniversary;
-               wxTextCtrl* txtAnniversary;
-               wxStaticText* lblGender;
-               wxChoice* cmbGender;
-               wxTextCtrl* txtGenderDescription;
-               wxStaticText* lblType;
-               wxChoice* cmbType;
-               wxStaticText* lblNicknames;
-               wxListCtrl* lboNicknames;
-               wxButton* btnAddGeneralNickname;
-               wxButton* btnModifyGeneralNickname;
-               wxButton* btnDeleteGeneralNickname;
-               wxStaticText* lblAddress;
-               wxListCtrl* lboAddresses;
-               wxButton* btnAddGeneralAddress;
-               wxButton* btnModifyGeneralAddress;
-               wxButton* btnDeleteGeneralAddress;
-               wxStaticText* lblEmail;
-               wxListCtrl* lboEmails;
-               wxButton* btnAddEmailAddress;
-               wxButton* btnModifyEmailAddress;
-               wxButton* btnDeleteEmailAddress;
-               wxStaticText* lblIM;
-               wxListCtrl* lboIM;
-               wxButton* btnAddIMAddress;
-               wxButton* btnModifyIMAddress;
-               wxButton* btnDeleteIMAddress;
-               wxStaticText* lblTelephone;
-               wxListCtrl* lboTelephone;
-               wxButton* btnAddTelephone;
-               wxButton* btnModifyTelephone;
-               wxButton* btnDeleteTelephone;
-               wxStaticText* lblLanguages;
-               wxListCtrl* lboLanguages;
-               wxButton* btnAddLanguage;
-               wxButton* btnModifyLanguage;
-               wxButton* btnDeleteLanguage;
-               wxStaticText* lblTimezone;
-               wxListCtrl* lboTimezones;
-               wxButton* btnAddTimezone;
-               wxButton* btnModifyTimezone;
-               wxButton* btnDeleteTimezone;
-               wxStaticText* lblGeopositioning;
-               wxListCtrl* lboGeoposition;
-               wxButton* btnAddGeneralGeoposition;
-               wxButton* btnModifyGeneralGeoposition;
-               wxButton* btnDeleteGeneralGeoposition;
-               wxStaticText* lblRelated;
-               wxListCtrl* lboRelated;
-               wxButton* btnAddRelated;
-               wxButton* btnModifyRelated;
-               wxButton* btnDeleteRelated;
-               wxStaticText* lblWebsites;
-               wxListCtrl* lboWebsites;
-               wxButton* btnAddWebsite;
-               wxButton* btnModifyWebsite;
-               wxButton* btnDeleteWebsite;
-               wxStaticText* lblTitles;
-               wxListCtrl* lboTitles;
-               wxButton* btnAddTitle;
-               wxButton* btnModifyTitle;
-               wxButton* btnDeleteTitle;
-               wxStaticText* lblRoles;
-               wxListCtrl* lboRoles;
-               wxButton* btnAddRole;
-               wxButton* btnModifyRole;
-               wxButton* btnDeleteRole;
-               wxStaticText* lblOrganisations;
-               wxListCtrl* lboOrganisations;
-               wxButton* btnAddOrganisations;
-               wxButton* btnModifyOrganisations;
-               wxButton* btnDeleteOrganisations;
-               wxStaticText* lblNotes;
-               wxListCtrl* lboNotes;
-               wxButton* btnAddNote;
-               wxButton* btnModifyNote;
-               wxButton* btnDeleteNote;
-               wxScrolledWindow* tabHome;
-               wxStaticText* lblHomeNickname;
-               wxListCtrl* lboHomeNicknames;
-               wxButton* btnAddHomeNickname;
-               wxButton* btnModifyHomeNickname;
-               wxButton* btnDeleteHomeNickname;
-               wxStaticText* lblHomeAddresses;
-               wxListCtrl* lboHomeAddresses;
-               wxButton* btnAddHomeAddress;
-               wxButton* btnModifyHomeAddress;
-               wxButton* btnDeleteHomeAddress;
-               wxStaticText* lblHomeEmail;
-               wxListCtrl* lboHomeEmails;
-               wxButton* btnAddHomeEmailAddress;
-               wxButton* btnModifyHomeEmailAddress;
-               wxButton* btnDeleteHomeEmailAddress;
-               wxStaticText* lblHomeIM;
-               wxListCtrl* lboHomeIM;
-               wxButton* btnAddHomeIMAddress;
-               wxButton* btnModifyHomeIMAddress;
-               wxButton* btnDeleteHomeIMAddress;
-               wxStaticText* lblHomeTelephone;
-               wxListCtrl* lboHomeTelephone;
-               wxButton* btnAddHomeTelephone;
-               wxButton* btnModifyHomeTelephone;
-               wxButton* btnDeleteHomeTelephone;
-               wxStaticText* lblHomeLanguages;
-               wxListCtrl* lboHomeLanguages;
-               wxButton* btnAddHomeLanguage;
-               wxButton* btnModifyHomeLanguage;
-               wxButton* btnDeleteHomeLanguage;
-               wxStaticText* lblHomeTimezone;
-               wxListCtrl* lboHomeTimezones;
-               wxButton* btnAddHomeTimezone;
-               wxButton* btnModifyHomeTimezone;
-               wxButton* btnDeleteHomeTimezone;
-               wxStaticText* lblHomeGeopositioning;
-               wxListCtrl* lboHomeGeoposition;
-               wxButton* btnAddHomeGeoposition;
-               wxButton* btnModifyHomeGeoposition;
-               wxButton* btnDeleteHomePosition;
-               wxStaticText* lblHomeWebsites;
-               wxListCtrl* lboHomeWebsites;
-               wxButton* btnAddHomeWebsite;
-               wxButton* btnHomeModifyWebsite;
-               wxButton* btnDeleteHomeWebsite;
-               wxStaticText* lblHomeTitles;
-               wxListCtrl* lboHomeTitles;
-               wxButton* btnAddHomeTitle;
-               wxButton* btnModifyHomeTitle;
-               wxButton* btnDeleteHomeTitle;
-               wxStaticText* lblHomeRoles;
-               wxListCtrl* lboHomeRoles;
-               wxButton* btnAddHomeRole;
-               wxButton* btnModifyHomeRole;
-               wxButton* btnDeleteHomeRole;
-               wxStaticText* lblHomeOrganisations;
-               wxListCtrl* lboHomeOrganisations;
-               wxButton* btnAddHomeOrganisations;
-               wxButton* btnModifyHomeOrganisations;
-               wxButton* btnDeleteHomeOrganisations;
-               wxStaticText* lblHomeNotes;
-               wxListCtrl* lboHomeNotes;
-               wxButton* btnAddHomeNote;
-               wxButton* btnModifyHomeNote;
-               wxButton* btnDeleteHomeNote;
-               wxScrolledWindow* tabBusiness;
-               wxStaticText* lblBusinessNickname;
-               wxListCtrl* lboBusinessNicknames;
-               wxButton* btnAddBusinessNickname;
-               wxButton* btnModifyBusinessNickname;
-               wxButton* btnDeleteBusinessNickname;
-               wxStaticText* lblBusinessAddress;
-               wxListCtrl* lboBusinessAddresses;
-               wxButton* btnAddBusinessAddress;
-               wxButton* btnModifyBusinessAddress;
-               wxButton* btnDeleteBusinessAddress;
-               wxStaticText* lblBusinessEmail;
-               wxListCtrl* lboBusinessEmail;
-               wxButton* btnAddBusinessEmailAddress;
-               wxButton* btnModifyBusinessEmailAddress;
-               wxButton* btnDeleteBusinessEmailAddress;
-               wxStaticText* lblBusinessIM;
-               wxListCtrl* lboBusinessIM;
-               wxButton* btnAddBusinessIMAddress;
-               wxButton* btnModifyBusinessIMAddress;
-               wxButton* btnDeleteBusinessIMAddress;
-               wxStaticText* lblBusinessTelephone;
-               wxListCtrl* lboBusinessTelephone;
-               wxButton* btnBusinessAddTelephone;
-               wxButton* btnBusinessModifyTelephone;
-               wxButton* btnBusinessDeleteTelephone;
-               wxStaticText* lblBusinessLanguage;
-               wxListCtrl* lboBusinessLanguages;
-               wxButton* btnBusinessAddLanguage;
-               wxButton* btnBusinessModifyLanguage;
-               wxButton* btnBusinessDeleteLanguage;
-               wxStaticText* lblBusinessTimezones;
-               wxListCtrl* lboBusinessTimezones;
-               wxButton* btnBusinessAddTimezone;
-               wxButton* btnBusinessModifyTimezone;
-               wxButton* btnDeleteBusinessTimezone;
-               wxStaticText* lblBusinessGeopositioning;
-               wxListCtrl* lboBusinessGeoposition;
-               wxButton* btnAddBusinessGeoposition;
-               wxButton* btnModifyBusinessGeoposition;
-               wxButton* btnDeleteBusinessGeoposition;
-               wxStaticText* lblBusinessWebsites;
-               wxListCtrl* lboBusinessWebsites;
-               wxButton* btnAddBusinessWebsite;
-               wxButton* btnModifyBusinessWebsite;
-               wxButton* btnDeleteBusinessWebsite;
-               wxStaticText* lblBusinessTitles;
-               wxListCtrl* lboBusinessTitles;
-               wxButton* btnAddBusinessTitle;
-               wxButton* btnModifyBusinessTitle;
-               wxButton* btnDeleteBusinessTitle;
-               wxStaticText* lblBusinessRoles;
-               wxListCtrl* lboBusinessRoles;
-               wxButton* btnAddBusinessRole;
-               wxButton* btnModifyBusinessRole;
-               wxButton* btnDeleteBusinessRole;
-               wxStaticText* lblBusinessOrganisations;
-               wxListCtrl* lboBusinessOrganisations;
-               wxButton* btnAddBusinessOrganisations;
-               wxButton* btnModifyBusinessOrganisations;
-               wxButton* btnDeleteBusinessOrganisations;
-               wxStaticText* lblBusinessNotes;
-               wxListCtrl* lboBusinessNotes;
-               wxButton* btnBusinessAddNote;
-               wxButton* btnBusinessModifyNote;
-               wxButton* btnBusinessDeleteNote;
-               wxScrolledWindow* tabCategories;
-               wxListCtrl* lboCategories;
-               wxButton* btnAddCategory;
-               wxButton* btnModifyCategory;
-               wxButton* btnDeleteCategory;
-               wxScrolledWindow* tabMembers;
-               wxListCtrl* lboGroups;
-               wxButton* btnAddGroups;
-               wxButton* btnModifyGroups;
-               wxButton* btnDeleteGroups;
-               wxScrolledWindow* tabPictures;
-               wxStaticBitmap* imgPicture;
-               wxListCtrl* lboPictures;
-               wxButton* btnAddPicture;
-               wxButton* btnModifyPicture;
-               wxButton* btnDeletePicture;
-               wxScrolledWindow* tabLogo;
-               wxStaticBitmap* imgLogo;
-               wxListCtrl* lboLogos;
-               wxButton* btnAddLogo;
-               wxButton* btnModifyLogo;
-               wxButton* btnDeleteLogo;
-               wxScrolledWindow* tabSounds;
-               wxListCtrl* lboSounds;
-               wxButton* btnAddSound;
-               wxButton* btnModifySound;
-               wxButton* btnDeleteSound;
-               wxStaticLine* m_staticline1;
-               wxBitmapButton* btnPlay;
-               wxBitmapButton* btnStop;
-               wxScrolledWindow* tabCalendaring;
-               wxStaticText* lblCalendarAddresses;
-               wxListCtrl* lboCalendarAddresses;
-               wxButton* btnAddCalendarAddress;
-               wxButton* btnModifyCalendarAddress;
-               wxButton* btnDeleteCalendarAddress;
-               wxStaticText* lblCalendarRequestAddresses;
-               wxListCtrl* lboCalendarRequestAddress;
-               wxButton* btnAddCalendarRequestAddress;
-               wxButton* btnModifyCalendarRequestAddress;
-               wxButton* btnDeleteCalendarRequestAddress;
-               wxStaticText* lblFreeBusyAddresses;
-               wxListCtrl* lboFreeBusyAddresses;
-               wxButton* btnAddFreeBusyAddress;
-               wxButton* btnModifyFreeBusyAddress;
-               wxButton* btnDeleteFreeBusyAddress;
-               wxScrolledWindow* tabSecurity;
-               wxListCtrl* lboKeys;
-               wxButton* btnAddKey;
-               wxButton* btnModifyKey;
-               wxButton* btnDeleteKey;
-               wxScrolledWindow* tabOther;
-               wxStaticText* lblVendorNamespace;
-               wxListCtrl* lboVendorNamespace;
-               wxButton* btnAddVendorNamespace;
-               wxButton* btnModifyVendorNamespace;
-               wxButton* btnDeleteVendorNamespace;
-               wxStaticText* lblXTokens;
-               wxListCtrl* lboXToken;
-               wxButton* btnAddXToken;
-               wxButton* btnModifyXToken;
-               wxButton* btnDeleteXToken;
-               wxMenuBar* m_menubar3;
-               wxMenu* mnuContact;
-               wxMenu* mnuEdit;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void CloseWindow( wxCloseEvent& event ) { event.Skip(); }
-               virtual void UpdateDisplayAs( wxCommandEvent& event ) { event.Skip(); }
-               virtual void UpdateName( wxCommandEvent& event ) { event.Skip(); }
-               virtual void UpdateMembersTab( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralNickname( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralNickname( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralNickname( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralEmail( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralEmail( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralEmail( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralIM( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralIM( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralIM( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralTelephone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralTelephone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralTelephone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralLanguages( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralLanguages( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralLanguage( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralTimezone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralTimezone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralTimezone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralGeoposition( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralGeoposition( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralGeoposition( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralRelated( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralRelated( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralRelated( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralWebsite( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralWebsite( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralWebsite( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralTitle( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralTitle( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralTitle( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralRole( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralRole( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralRole( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralOrganisation( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralOrganisation( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralOrganisation( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGeneralNote( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGeneralNote( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGeneralNote( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeNickname( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeNickname( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeNickname( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeEmail( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeEmail( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeEmail( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeIM( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeIM( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeIM( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeTelephone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeTelephone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeTelephone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeLanguage( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeLanguage( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeLanguage( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeTimezone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeTimezone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeTimezone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeGeoposition( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeGeoposition( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeGeoposition( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeWebsite( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeWebsite( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeWebsite( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeTitle( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeTitle( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeTitle( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeRole( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeRole( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeRole( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeOrganisation( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeOrganisation( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeOrganisation( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddHomeNote( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyHomeNote( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteHomeNote( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessNickname( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessNickname( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessNickname( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessEmail( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessEmail( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessEmail( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessIM( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessIM( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessIM( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessTelephone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessTelephone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessTelephone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessLanguage( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessLanguage( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessLanguage( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessTimezone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessTimezone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessTimezone( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessGeoposition( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessGeoposition( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessGeoposition( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessWebsite( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessWebsite( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessWebsite( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessTitle( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessTitle( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessTitle( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessRole( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessRole( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessRole( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessOrganisation( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessOrganisation( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessOrganisation( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddBusinessNote( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyBusinessNote( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteBusinessNote( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddCategory( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyCategory( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteCategory( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddGroup( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyGroup( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteGroup( wxCommandEvent& event ) { event.Skip(); }
-               virtual void LoadPicture( wxListEvent& event ) { event.Skip(); }
-               virtual void AddPicture( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyPicture( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeletePicture( wxCommandEvent& event ) { event.Skip(); }
-               virtual void LoadLogo( wxListEvent& event ) { event.Skip(); }
-               virtual void AddLogo( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyLogo( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteLogo( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddSound( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifySound( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteSound( wxCommandEvent& event ) { event.Skip(); }
-               virtual void PlaySound( wxCommandEvent& event ) { event.Skip(); }
-               virtual void StopSound( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddCalendarAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyCalendarAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteCalendarAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddCalendarRequest( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyCalendarRequest( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddFreeBusy( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyFreeBusy( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteFreeBusy( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddKey( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyKey( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteKey( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddVendorNamespace( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyVendorNamespace( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteVendorNamespace( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddXToken( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ModifyXToken( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DeleteXToken( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SaveContact( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SaveCloseContact( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseContact( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CutText( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CopyText( wxCommandEvent& event ) { event.Skip(); }
-               virtual void PasteText( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Contact Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 769,517 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
-               
-               ~frmContactEditorADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkContact;
+    wxScrolledWindow* tabGeneral;
+    wxStaticText* lblTitle;
+    wxTextCtrl* txtTitle;
+    wxStaticText* lblForename;
+    wxTextCtrl* txtForename;
+    wxStaticText* lblSurname;
+    wxTextCtrl* txtSurname;
+    wxStaticText* lblOtherNames;
+    wxTextCtrl* txtOtherNames;
+    wxStaticText* lblSuffix;
+    wxTextCtrl* txtSuffix;
+    wxStaticText* lblDisplayAs;
+    wxComboBox* cmbDisplayAs;
+    wxStaticText* lblBirthday;
+    wxDatePickerCtrl* dapBirthday;
+    wxTextCtrl* txtBirthday;
+    wxStaticText* lblAnniversary;
+    wxDatePickerCtrl* dapAnniversary;
+    wxTextCtrl* txtAnniversary;
+    wxStaticText* lblGender;
+    wxChoice* cmbGender;
+    wxTextCtrl* txtGenderDescription;
+    wxStaticText* lblType;
+    wxChoice* cmbType;
+    wxStaticText* lblNicknames;
+    wxListCtrl* lboNicknames;
+    wxButton* btnAddGeneralNickname;
+    wxButton* btnModifyGeneralNickname;
+    wxButton* btnDeleteGeneralNickname;
+    wxStaticText* lblAddress;
+    wxListCtrl* lboAddresses;
+    wxButton* btnAddGeneralAddress;
+    wxButton* btnModifyGeneralAddress;
+    wxButton* btnDeleteGeneralAddress;
+    wxStaticText* lblEmail;
+    wxListCtrl* lboEmails;
+    wxButton* btnAddEmailAddress;
+    wxButton* btnModifyEmailAddress;
+    wxButton* btnDeleteEmailAddress;
+    wxStaticText* lblIM;
+    wxListCtrl* lboIM;
+    wxButton* btnAddIMAddress;
+    wxButton* btnModifyIMAddress;
+    wxButton* btnDeleteIMAddress;
+    wxStaticText* lblTelephone;
+    wxListCtrl* lboTelephone;
+    wxButton* btnAddTelephone;
+    wxButton* btnModifyTelephone;
+    wxButton* btnDeleteTelephone;
+    wxStaticText* lblLanguages;
+    wxListCtrl* lboLanguages;
+    wxButton* btnAddLanguage;
+    wxButton* btnModifyLanguage;
+    wxButton* btnDeleteLanguage;
+    wxStaticText* lblTimezone;
+    wxListCtrl* lboTimezones;
+    wxButton* btnAddTimezone;
+    wxButton* btnModifyTimezone;
+    wxButton* btnDeleteTimezone;
+    wxStaticText* lblGeopositioning;
+    wxListCtrl* lboGeoposition;
+    wxButton* btnAddGeneralGeoposition;
+    wxButton* btnModifyGeneralGeoposition;
+    wxButton* btnDeleteGeneralGeoposition;
+    wxStaticText* lblRelated;
+    wxListCtrl* lboRelated;
+    wxButton* btnAddRelated;
+    wxButton* btnModifyRelated;
+    wxButton* btnDeleteRelated;
+    wxStaticText* lblWebsites;
+    wxListCtrl* lboWebsites;
+    wxButton* btnAddWebsite;
+    wxButton* btnModifyWebsite;
+    wxButton* btnDeleteWebsite;
+    wxStaticText* lblTitles;
+    wxListCtrl* lboTitles;
+    wxButton* btnAddTitle;
+    wxButton* btnModifyTitle;
+    wxButton* btnDeleteTitle;
+    wxStaticText* lblRoles;
+    wxListCtrl* lboRoles;
+    wxButton* btnAddRole;
+    wxButton* btnModifyRole;
+    wxButton* btnDeleteRole;
+    wxStaticText* lblOrganisations;
+    wxListCtrl* lboOrganisations;
+    wxButton* btnAddOrganisations;
+    wxButton* btnModifyOrganisations;
+    wxButton* btnDeleteOrganisations;
+    wxStaticText* lblNotes;
+    wxListCtrl* lboNotes;
+    wxButton* btnAddNote;
+    wxButton* btnModifyNote;
+    wxButton* btnDeleteNote;
+    wxScrolledWindow* tabHome;
+    wxStaticText* lblHomeNickname;
+    wxListCtrl* lboHomeNicknames;
+    wxButton* btnAddHomeNickname;
+    wxButton* btnModifyHomeNickname;
+    wxButton* btnDeleteHomeNickname;
+    wxStaticText* lblHomeAddresses;
+    wxListCtrl* lboHomeAddresses;
+    wxButton* btnAddHomeAddress;
+    wxButton* btnModifyHomeAddress;
+    wxButton* btnDeleteHomeAddress;
+    wxStaticText* lblHomeEmail;
+    wxListCtrl* lboHomeEmails;
+    wxButton* btnAddHomeEmailAddress;
+    wxButton* btnModifyHomeEmailAddress;
+    wxButton* btnDeleteHomeEmailAddress;
+    wxStaticText* lblHomeIM;
+    wxListCtrl* lboHomeIM;
+    wxButton* btnAddHomeIMAddress;
+    wxButton* btnModifyHomeIMAddress;
+    wxButton* btnDeleteHomeIMAddress;
+    wxStaticText* lblHomeTelephone;
+    wxListCtrl* lboHomeTelephone;
+    wxButton* btnAddHomeTelephone;
+    wxButton* btnModifyHomeTelephone;
+    wxButton* btnDeleteHomeTelephone;
+    wxStaticText* lblHomeLanguages;
+    wxListCtrl* lboHomeLanguages;
+    wxButton* btnAddHomeLanguage;
+    wxButton* btnModifyHomeLanguage;
+    wxButton* btnDeleteHomeLanguage;
+    wxStaticText* lblHomeTimezone;
+    wxListCtrl* lboHomeTimezones;
+    wxButton* btnAddHomeTimezone;
+    wxButton* btnModifyHomeTimezone;
+    wxButton* btnDeleteHomeTimezone;
+    wxStaticText* lblHomeGeopositioning;
+    wxListCtrl* lboHomeGeoposition;
+    wxButton* btnAddHomeGeoposition;
+    wxButton* btnModifyHomeGeoposition;
+    wxButton* btnDeleteHomePosition;
+    wxStaticText* lblHomeWebsites;
+    wxListCtrl* lboHomeWebsites;
+    wxButton* btnAddHomeWebsite;
+    wxButton* btnHomeModifyWebsite;
+    wxButton* btnDeleteHomeWebsite;
+    wxStaticText* lblHomeTitles;
+    wxListCtrl* lboHomeTitles;
+    wxButton* btnAddHomeTitle;
+    wxButton* btnModifyHomeTitle;
+    wxButton* btnDeleteHomeTitle;
+    wxStaticText* lblHomeRoles;
+    wxListCtrl* lboHomeRoles;
+    wxButton* btnAddHomeRole;
+    wxButton* btnModifyHomeRole;
+    wxButton* btnDeleteHomeRole;
+    wxStaticText* lblHomeOrganisations;
+    wxListCtrl* lboHomeOrganisations;
+    wxButton* btnAddHomeOrganisations;
+    wxButton* btnModifyHomeOrganisations;
+    wxButton* btnDeleteHomeOrganisations;
+    wxStaticText* lblHomeNotes;
+    wxListCtrl* lboHomeNotes;
+    wxButton* btnAddHomeNote;
+    wxButton* btnModifyHomeNote;
+    wxButton* btnDeleteHomeNote;
+    wxScrolledWindow* tabBusiness;
+    wxStaticText* lblBusinessNickname;
+    wxListCtrl* lboBusinessNicknames;
+    wxButton* btnAddBusinessNickname;
+    wxButton* btnModifyBusinessNickname;
+    wxButton* btnDeleteBusinessNickname;
+    wxStaticText* lblBusinessAddress;
+    wxListCtrl* lboBusinessAddresses;
+    wxButton* btnAddBusinessAddress;
+    wxButton* btnModifyBusinessAddress;
+    wxButton* btnDeleteBusinessAddress;
+    wxStaticText* lblBusinessEmail;
+    wxListCtrl* lboBusinessEmail;
+    wxButton* btnAddBusinessEmailAddress;
+    wxButton* btnModifyBusinessEmailAddress;
+    wxButton* btnDeleteBusinessEmailAddress;
+    wxStaticText* lblBusinessIM;
+    wxListCtrl* lboBusinessIM;
+    wxButton* btnAddBusinessIMAddress;
+    wxButton* btnModifyBusinessIMAddress;
+    wxButton* btnDeleteBusinessIMAddress;
+    wxStaticText* lblBusinessTelephone;
+    wxListCtrl* lboBusinessTelephone;
+    wxButton* btnBusinessAddTelephone;
+    wxButton* btnBusinessModifyTelephone;
+    wxButton* btnBusinessDeleteTelephone;
+    wxStaticText* lblBusinessLanguage;
+    wxListCtrl* lboBusinessLanguages;
+    wxButton* btnBusinessAddLanguage;
+    wxButton* btnBusinessModifyLanguage;
+    wxButton* btnBusinessDeleteLanguage;
+    wxStaticText* lblBusinessTimezones;
+    wxListCtrl* lboBusinessTimezones;
+    wxButton* btnBusinessAddTimezone;
+    wxButton* btnBusinessModifyTimezone;
+    wxButton* btnDeleteBusinessTimezone;
+    wxStaticText* lblBusinessGeopositioning;
+    wxListCtrl* lboBusinessGeoposition;
+    wxButton* btnAddBusinessGeoposition;
+    wxButton* btnModifyBusinessGeoposition;
+    wxButton* btnDeleteBusinessGeoposition;
+    wxStaticText* lblBusinessWebsites;
+    wxListCtrl* lboBusinessWebsites;
+    wxButton* btnAddBusinessWebsite;
+    wxButton* btnModifyBusinessWebsite;
+    wxButton* btnDeleteBusinessWebsite;
+    wxStaticText* lblBusinessTitles;
+    wxListCtrl* lboBusinessTitles;
+    wxButton* btnAddBusinessTitle;
+    wxButton* btnModifyBusinessTitle;
+    wxButton* btnDeleteBusinessTitle;
+    wxStaticText* lblBusinessRoles;
+    wxListCtrl* lboBusinessRoles;
+    wxButton* btnAddBusinessRole;
+    wxButton* btnModifyBusinessRole;
+    wxButton* btnDeleteBusinessRole;
+    wxStaticText* lblBusinessOrganisations;
+    wxListCtrl* lboBusinessOrganisations;
+    wxButton* btnAddBusinessOrganisations;
+    wxButton* btnModifyBusinessOrganisations;
+    wxButton* btnDeleteBusinessOrganisations;
+    wxStaticText* lblBusinessNotes;
+    wxListCtrl* lboBusinessNotes;
+    wxButton* btnBusinessAddNote;
+    wxButton* btnBusinessModifyNote;
+    wxButton* btnBusinessDeleteNote;
+    wxScrolledWindow* tabCategories;
+    wxListCtrl* lboCategories;
+    wxButton* btnAddCategory;
+    wxButton* btnModifyCategory;
+    wxButton* btnDeleteCategory;
+    wxScrolledWindow* tabMembers;
+    wxListCtrl* lboGroups;
+    wxButton* btnAddGroups;
+    wxButton* btnModifyGroups;
+    wxButton* btnDeleteGroups;
+    wxScrolledWindow* tabPictures;
+    wxStaticBitmap* imgPicture;
+    wxListCtrl* lboPictures;
+    wxButton* btnAddPicture;
+    wxButton* btnModifyPicture;
+    wxButton* btnDeletePicture;
+    wxScrolledWindow* tabLogo;
+    wxStaticBitmap* imgLogo;
+    wxListCtrl* lboLogos;
+    wxButton* btnAddLogo;
+    wxButton* btnModifyLogo;
+    wxButton* btnDeleteLogo;
+    wxScrolledWindow* tabSounds;
+    wxListCtrl* lboSounds;
+    wxButton* btnAddSound;
+    wxButton* btnModifySound;
+    wxButton* btnDeleteSound;
+    wxStaticLine* m_staticline1;
+    wxBitmapButton* btnPlay;
+    wxBitmapButton* btnStop;
+    wxScrolledWindow* tabCalendaring;
+    wxStaticText* lblCalendarAddresses;
+    wxListCtrl* lboCalendarAddresses;
+    wxButton* btnAddCalendarAddress;
+    wxButton* btnModifyCalendarAddress;
+    wxButton* btnDeleteCalendarAddress;
+    wxStaticText* lblCalendarRequestAddresses;
+    wxListCtrl* lboCalendarRequestAddress;
+    wxButton* btnAddCalendarRequestAddress;
+    wxButton* btnModifyCalendarRequestAddress;
+    wxButton* btnDeleteCalendarRequestAddress;
+    wxStaticText* lblFreeBusyAddresses;
+    wxListCtrl* lboFreeBusyAddresses;
+    wxButton* btnAddFreeBusyAddress;
+    wxButton* btnModifyFreeBusyAddress;
+    wxButton* btnDeleteFreeBusyAddress;
+    wxScrolledWindow* tabSecurity;
+    wxListCtrl* lboKeys;
+    wxButton* btnAddKey;
+    wxButton* btnModifyKey;
+    wxButton* btnDeleteKey;
+    wxScrolledWindow* tabOther;
+    wxStaticText* lblVendorNamespace;
+    wxListCtrl* lboVendorNamespace;
+    wxButton* btnAddVendorNamespace;
+    wxButton* btnModifyVendorNamespace;
+    wxButton* btnDeleteVendorNamespace;
+    wxStaticText* lblXTokens;
+    wxListCtrl* lboXToken;
+    wxButton* btnAddXToken;
+    wxButton* btnModifyXToken;
+    wxButton* btnDeleteXToken;
+    wxMenuBar* m_menubar3;
+    wxMenu* mnuContact;
+    wxMenu* mnuEdit;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void CloseWindow( wxCloseEvent& event ) { event.Skip(); }
+    virtual void UpdateDisplayAs( wxCommandEvent& event ) { event.Skip(); }
+    virtual void UpdateName( wxCommandEvent& event ) { event.Skip(); }
+    virtual void UpdateMembersTab( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralNickname( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralNickname( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralNickname( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralEmail( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralEmail( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralEmail( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralIM( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralIM( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralIM( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralTelephone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralTelephone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralTelephone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralLanguages( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralLanguages( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralLanguage( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralTimezone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralTimezone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralTimezone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralGeoposition( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralGeoposition( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralGeoposition( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralRelated( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralRelated( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralRelated( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralWebsite( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralWebsite( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralWebsite( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralTitle( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralTitle( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralTitle( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralRole( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralRole( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralRole( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralOrganisation( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralOrganisation( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralOrganisation( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGeneralNote( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGeneralNote( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGeneralNote( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeNickname( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeNickname( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeNickname( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeEmail( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeEmail( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeEmail( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeIM( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeIM( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeIM( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeTelephone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeTelephone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeTelephone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeLanguage( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeLanguage( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeLanguage( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeTimezone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeTimezone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeTimezone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeGeoposition( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeGeoposition( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeGeoposition( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeWebsite( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeWebsite( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeWebsite( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeTitle( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeTitle( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeTitle( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeRole( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeRole( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeRole( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeOrganisation( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeOrganisation( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeOrganisation( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddHomeNote( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyHomeNote( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteHomeNote( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessNickname( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessNickname( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessNickname( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessEmail( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessEmail( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessEmail( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessIM( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessIM( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessIM( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessTelephone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessTelephone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessTelephone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessLanguage( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessLanguage( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessLanguage( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessTimezone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessTimezone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessTimezone( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessGeoposition( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessGeoposition( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessGeoposition( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessWebsite( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessWebsite( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessWebsite( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessTitle( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessTitle( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessTitle( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessRole( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessRole( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessRole( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessOrganisation( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessOrganisation( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessOrganisation( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddBusinessNote( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyBusinessNote( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteBusinessNote( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddCategory( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyCategory( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteCategory( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddGroup( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyGroup( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteGroup( wxCommandEvent& event ) { event.Skip(); }
+    virtual void LoadPicture( wxListEvent& event ) { event.Skip(); }
+    virtual void AddPicture( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyPicture( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeletePicture( wxCommandEvent& event ) { event.Skip(); }
+    virtual void LoadLogo( wxListEvent& event ) { event.Skip(); }
+    virtual void AddLogo( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyLogo( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteLogo( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddSound( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifySound( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteSound( wxCommandEvent& event ) { event.Skip(); }
+    virtual void PlaySound( wxCommandEvent& event ) { event.Skip(); }
+    virtual void StopSound( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddCalendarAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyCalendarAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteCalendarAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddCalendarRequest( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyCalendarRequest( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddFreeBusy( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyFreeBusy( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteFreeBusy( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddKey( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyKey( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteKey( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddVendorNamespace( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyVendorNamespace( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteVendorNamespace( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddXToken( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ModifyXToken( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DeleteXToken( wxCommandEvent& event ) { event.Skip(); }
+    virtual void SaveContact( wxCommandEvent& event ) { event.Skip(); }
+    virtual void SaveCloseContact( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseContact( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CutText( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CopyText( wxCommandEvent& event ) { event.Skip(); }
+    virtual void PasteText( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Contact Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 769,517 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+    
+    ~frmContactEditorADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorAddressADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorAddressADT : public wxDialog 
+class frmContactEditorAddressADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkAddress;
-               wxPanel* tabGeneral;
-               wxStaticText* lblAddress;
-               wxTextCtrl* txtAddress;
-               wxStaticText* m_staticText61;
-               wxTextCtrl* txtTownCity;
-               wxStaticText* lblCountyState;
-               wxTextCtrl* txtCounty;
-               wxStaticText* lblPostCode;
-               wxTextCtrl* txtPostCode;
-               wxStaticText* lblCountry;
-               wxTextCtrl* txtCountry;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxPanel* tabLabel;
-               wxButton* btnCopyMailing;
-               wxTextCtrl* txtLabel;
-               wxPanel* tabOther;
-               wxStaticText* lblLanguage;
-               wxComboBox* cmbLanguage;
-               wxStaticText* lblGeography;
-               wxTextCtrl* txtGeo;
-               wxStaticText* lblTimezone;
-               wxTextCtrl* txtTimezone;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void InitAddressEditor( wxInitDialogEvent& event ) { event.Skip(); }
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CopyAddress( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorAddressADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Address Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 426,317 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorAddressADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkAddress;
+    wxPanel* tabGeneral;
+    wxStaticText* lblAddress;
+    wxTextCtrl* txtAddress;
+    wxStaticText* m_staticText61;
+    wxTextCtrl* txtTownCity;
+    wxStaticText* lblCountyState;
+    wxTextCtrl* txtCounty;
+    wxStaticText* lblPostCode;
+    wxTextCtrl* txtPostCode;
+    wxStaticText* lblCountry;
+    wxTextCtrl* txtCountry;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxPanel* tabLabel;
+    wxButton* btnCopyMailing;
+    wxTextCtrl* txtLabel;
+    wxPanel* tabOther;
+    wxStaticText* lblLanguage;
+    wxComboBox* cmbLanguage;
+    wxStaticText* lblGeography;
+    wxTextCtrl* txtGeo;
+    wxStaticText* lblTimezone;
+    wxTextCtrl* txtTimezone;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void InitAddressEditor( wxInitDialogEvent& event ) { event.Skip(); }
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CopyAddress( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorAddressADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Address Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 426,317 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorAddressADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmConflictResolutionADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmConflictResolutionADT : public wxDialog 
+class frmConflictResolutionADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxStaticText* lblText;
-               wxSplitterWindow* m_splitter3;
-               wxPanel* m_panel44;
-               wxHtmlWindow* htmClient;
-               wxPanel* m_panel45;
-               wxHtmlWindow* htmServer;
-               wxButton* btnKeepLocal;
-               wxButton* btnKeepServer;
-               wxButton* btnDecideLater;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void KeepLocalData( wxCommandEvent& event ) { event.Skip(); }
-               virtual void KeepServerData( wxCommandEvent& event ) { event.Skip(); }
-               virtual void DecideLater( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmConflictResolutionADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Conflict Resolution"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 536,417 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmConflictResolutionADT();
-               
-               void m_splitter3OnIdle( wxIdleEvent& )
-               {
-                       m_splitter3->SetSashPosition( 257 );
-                       m_splitter3->Disconnect( wxEVT_IDLE, wxIdleEventHandler( frmConflictResolutionADT::m_splitter3OnIdle ), NULL, this );
-               }
-       
+private:
+    
+protected:
+    wxStaticText* lblText;
+    wxSplitterWindow* m_splitter3;
+    wxPanel* m_panel44;
+    wxHtmlWindow* htmClient;
+    wxPanel* m_panel45;
+    wxHtmlWindow* htmServer;
+    wxButton* btnKeepLocal;
+    wxButton* btnKeepServer;
+    wxButton* btnDecideLater;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void KeepLocalData( wxCommandEvent& event ) { event.Skip(); }
+    virtual void KeepServerData( wxCommandEvent& event ) { event.Skip(); }
+    virtual void DecideLater( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmConflictResolutionADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Conflict Resolution"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 536,417 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmConflictResolutionADT();
+    
+    void m_splitter3OnIdle( wxIdleEvent& )
+    {
+        m_splitter3->SetSashPosition( 257 );
+        m_splitter3->Disconnect( wxEVT_IDLE, wxIdleEventHandler( frmConflictResolutionADT::m_splitter3OnIdle ), NULL, this );
+    }
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmActivityMgrADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmActivityMgrADT : public wxFrame 
+class frmActivityMgrADT : public wxFrame
 {
-       private:
-       
-       protected:
-               wxMenuBar* mnuMenuBar;
-               wxMenu* mnuWindow;
-               wxPanel* m_panel43;
-               wxStaticBitmap* bmpActivity;
-               wxPanel* m_panel46;
-               wxStaticText* lblDetails;
-               wxGauge* GauProgress;
-               wxPanel* m_panel44;
-               wxListCtrl* lstActivity;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void CloseWindow( wxCloseEvent& event ) { event.Skip(); }
-               virtual void StopTask( wxCommandEvent& event ) { event.Skip(); }
-               virtual void StopAllTasks( wxCommandEvent& event ) { event.Skip(); }
-               virtual void RetryTask( wxCommandEvent& event ) { event.Skip(); }
-               virtual void SleepMode( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmActivityMgrADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Activity Manager"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 400,300 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
-               
-               ~frmActivityMgrADT();
-       
+private:
+    
+protected:
+    wxMenuBar* mnuMenuBar;
+    wxMenu* mnuWindow;
+    wxPanel* m_panel43;
+    wxStaticBitmap* bmpActivity;
+    wxPanel* m_panel46;
+    wxStaticText* lblDetails;
+    wxGauge* GauProgress;
+    wxPanel* m_panel44;
+    wxListCtrl* lstActivity;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void CloseWindow( wxCloseEvent& event ) { event.Skip(); }
+    virtual void StopTask( wxCommandEvent& event ) { event.Skip(); }
+    virtual void StopAllTasks( wxCommandEvent& event ) { event.Skip(); }
+    virtual void RetryTask( wxCommandEvent& event ) { event.Skip(); }
+    virtual void SleepMode( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmActivityMgrADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Activity Manager"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 400,300 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+    
+    ~frmActivityMgrADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorNicknameADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorNicknameADT : public wxDialog 
+class frmContactEditorNicknameADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkAddress;
-               wxPanel* tabGeneral;
-               wxStaticText* lblNickname;
-               wxTextCtrl* txtNickname;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxPanel* tabOther;
-               wxStaticText* lblLanguage;
-               wxComboBox* cmbLanguage;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void InitAddressEditor( wxInitDialogEvent& event ) { event.Skip(); }
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorNicknameADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Nickname Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 386,231 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorNicknameADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkAddress;
+    wxPanel* tabGeneral;
+    wxStaticText* lblNickname;
+    wxTextCtrl* txtNickname;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxPanel* tabOther;
+    wxStaticText* lblLanguage;
+    wxComboBox* cmbLanguage;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void InitAddressEditor( wxInitDialogEvent& event ) { event.Skip(); }
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorNicknameADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Nickname Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 386,231 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorNicknameADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorGroupsADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorGroupsADT : public wxDialog 
+class frmContactEditorGroupsADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkGroup;
-               wxPanel* tabGeneral;
-               wxStaticText* lblContacts;
-               wxCheckListBox* chkContacts;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void FetchContacts( wxInitDialogEvent& event ) { event.Skip(); }
-               virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorGroupsADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Group Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 398,392 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorGroupsADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkGroup;
+    wxPanel* tabGeneral;
+    wxStaticText* lblContacts;
+    wxCheckListBox* chkContacts;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void FetchContacts( wxInitDialogEvent& event ) { event.Skip(); }
+    virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorGroupsADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Group Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 398,392 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorGroupsADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorRolesADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorRolesADT : public wxDialog 
+class frmContactEditorRolesADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkRole;
-               wxPanel* tabGeneral;
-               wxStaticText* lblRole;
-               wxTextCtrl* txtRole;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorRolesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Role Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorRolesADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkRole;
+    wxPanel* tabGeneral;
+    wxStaticText* lblRole;
+    wxTextCtrl* txtRole;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorRolesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Role Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorRolesADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorOrganisationsADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorOrganisationsADT : public wxDialog 
+class frmContactEditorOrganisationsADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkOrganisation;
-               wxPanel* tabGeneral;
-               wxStaticText* lblOrganisation;
-               wxTextCtrl* txtOrganisation;
-               wxStaticText* lblSortAs;
-               wxComboBox* cmbSortAs;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void UpdateSortAs( wxCommandEvent& event ) { event.Skip(); }
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorOrganisationsADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Organisation Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 349,224 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorOrganisationsADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkOrganisation;
+    wxPanel* tabGeneral;
+    wxStaticText* lblOrganisation;
+    wxTextCtrl* txtOrganisation;
+    wxStaticText* lblSortAs;
+    wxComboBox* cmbSortAs;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void UpdateSortAs( wxCommandEvent& event ) { event.Skip(); }
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorOrganisationsADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Organisation Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 349,224 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorOrganisationsADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorNotesADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorNotesADT : public wxDialog 
+class frmContactEditorNotesADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkNotes;
-               wxPanel* tabGeneral;
-               wxTextCtrl* txtNote;
-               wxPanel* tabPriority;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxPanel* tabLanguage;
-               wxStaticText* lblLanguage;
-               wxComboBox* cmbLanguage;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorNotesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Note Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorNotesADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkNotes;
+    wxPanel* tabGeneral;
+    wxTextCtrl* txtNote;
+    wxPanel* tabPriority;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxPanel* tabLanguage;
+    wxStaticText* lblLanguage;
+    wxComboBox* cmbLanguage;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorNotesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Note Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorNotesADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorTitlesADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorTitlesADT : public wxDialog 
+class frmContactEditorTitlesADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkTitles;
-               wxPanel* tabGeneral;
-               wxStaticText* lblTitle;
-               wxTextCtrl* txtTitle;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorTitlesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Title Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorTitlesADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkTitles;
+    wxPanel* tabGeneral;
+    wxStaticText* lblTitle;
+    wxTextCtrl* txtTitle;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorTitlesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Title Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorTitlesADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorRelatedADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorRelatedADT : public wxDialog 
+class frmContactEditorRelatedADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkRelated;
-               wxPanel* tabGeneral;
-               wxStaticText* lblRelation;
-               wxTextCtrl* txtRelated;
-               wxStaticText* lblType;
-               wxComboBox* cmbType;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorRelatedADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Related Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,226 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorRelatedADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkRelated;
+    wxPanel* tabGeneral;
+    wxStaticText* lblRelation;
+    wxTextCtrl* txtRelated;
+    wxStaticText* lblType;
+    wxComboBox* cmbType;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorRelatedADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Related Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,226 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorRelatedADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorSoundADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorSoundADT : public wxDialog 
+class frmContactEditorSoundADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkRelated;
-               wxPanel* tabGeneral;
-               wxStaticText* lblSoundFile;
-               wxFilePickerCtrl* fipSound;
-               wxStaticText* lblType;
-               wxChoice* cmbType;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorSoundADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Sound Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,226 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorSoundADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkRelated;
+    wxPanel* tabGeneral;
+    wxStaticText* lblSoundFile;
+    wxFilePickerCtrl* fipSound;
+    wxStaticText* lblType;
+    wxChoice* cmbType;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorSoundADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Sound Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,226 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorSoundADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorPictureADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorPictureADT : public wxDialog 
+class frmContactEditorPictureADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkRelated;
-               wxPanel* tabGeneral;
-               wxStaticText* lblPictureFile;
-               wxFilePickerCtrl* fipPicture;
-               wxStaticText* lblType;
-               wxChoice* cmbType;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorPictureADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Picture Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,226 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorPictureADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkRelated;
+    wxPanel* tabGeneral;
+    wxStaticText* lblPictureFile;
+    wxFilePickerCtrl* fipPicture;
+    wxStaticText* lblType;
+    wxChoice* cmbType;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorPictureADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Picture Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,226 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorPictureADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorWebsitesADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorWebsitesADT : public wxDialog 
+class frmContactEditorWebsitesADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkWebsite;
-               wxPanel* tabGeneral;
-               wxStaticText* lblWebsite;
-               wxTextCtrl* txtWebsite;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorWebsitesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Website Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorWebsitesADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkWebsite;
+    wxPanel* tabGeneral;
+    wxStaticText* lblWebsite;
+    wxTextCtrl* txtWebsite;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorWebsitesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Website Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorWebsitesADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorGeopositionADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorGeopositionADT : public wxDialog 
+class frmContactEditorGeopositionADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkWebsite;
-               wxPanel* tabGeneral;
-               wxStaticText* lblGeoposition;
-               wxTextCtrl* txtGeoposition;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorGeopositionADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Geoposition Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorGeopositionADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkWebsite;
+    wxPanel* tabGeneral;
+    wxStaticText* lblGeoposition;
+    wxTextCtrl* txtGeoposition;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorGeopositionADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Geoposition Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorGeopositionADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorCalAdrADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorCalAdrADT : public wxDialog 
+class frmContactEditorCalAdrADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkWebsite;
-               wxPanel* tabGeneral;
-               wxStaticText* lblAddress;
-               wxTextCtrl* txtAddress;
-               wxStaticText* lblType;
-               wxChoice* cmbType;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorCalAdrADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Calendar Address Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 448,270 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorCalAdrADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkWebsite;
+    wxPanel* tabGeneral;
+    wxStaticText* lblAddress;
+    wxTextCtrl* txtAddress;
+    wxStaticText* lblType;
+    wxChoice* cmbType;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorCalAdrADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Calendar Address Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 448,270 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorCalAdrADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorVendorADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorVendorADT : public wxDialog 
+class frmContactEditorVendorADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkWebsite;
-               wxPanel* tabGeneral;
-               wxStaticText* lblVendorPEN;
-               wxTextCtrl* txtPEN;
-               wxStaticText* lblElement;
-               wxTextCtrl* txtElement;
-               wxStaticText* lblValue;
-               wxTextCtrl* txtValue;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorVendorADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Vendor Namespace Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 448,270 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorVendorADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkWebsite;
+    wxPanel* tabGeneral;
+    wxStaticText* lblVendorPEN;
+    wxTextCtrl* txtPEN;
+    wxStaticText* lblElement;
+    wxTextCtrl* txtElement;
+    wxStaticText* lblValue;
+    wxTextCtrl* txtValue;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorVendorADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Vendor Namespace Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 448,270 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorVendorADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorXTokenADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorXTokenADT : public wxDialog 
+class frmContactEditorXTokenADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkWebsite;
-               wxPanel* tabGeneral;
-               wxStaticText* lblTokenName;
-               wxTextCtrl* txtTokenName;
-               wxStaticText* lblXT;
-               wxTextCtrl* txtValue;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorXTokenADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("X-Token Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 448,270 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorXTokenADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkWebsite;
+    wxPanel* tabGeneral;
+    wxStaticText* lblTokenName;
+    wxTextCtrl* txtTokenName;
+    wxStaticText* lblXT;
+    wxTextCtrl* txtValue;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorXTokenADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("X-Token Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 448,270 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorXTokenADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorKeyADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorKeyADT : public wxDialog 
+class frmContactEditorKeyADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkWebsite;
-               wxPanel* tabGeneral;
-               wxStaticText* lblKeyType;
-               wxChoice* cmbKeyMainType;
-               wxStaticText* lblType;
-               wxChoice* cmbType;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxPanel* tabURL;
-               wxStaticText* lblKeyFormat;
-               wxComboBox* cmbURL;
-               wxStaticText* lblAddress;
-               wxTextCtrl* txtAddress;
-               wxPanel* tabKey;
-               wxStaticText* lblKeyFormatData;
-               wxComboBox* cmbKeyType;
-               wxStaticText* lblKeyData;
-               wxTextCtrl* txtKeyData;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void ProcessKeyType( wxCommandEvent& event ) { event.Skip(); }
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ConvertURLType( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ConvertKeyType( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorKeyADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Key Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 448,270 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorKeyADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkWebsite;
+    wxPanel* tabGeneral;
+    wxStaticText* lblKeyType;
+    wxChoice* cmbKeyMainType;
+    wxStaticText* lblType;
+    wxChoice* cmbType;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxPanel* tabURL;
+    wxStaticText* lblKeyFormat;
+    wxComboBox* cmbURL;
+    wxStaticText* lblAddress;
+    wxTextCtrl* txtAddress;
+    wxPanel* tabKey;
+    wxStaticText* lblKeyFormatData;
+    wxComboBox* cmbKeyType;
+    wxStaticText* lblKeyData;
+    wxTextCtrl* txtKeyData;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void ProcessKeyType( wxCommandEvent& event ) { event.Skip(); }
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ConvertURLType( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ConvertKeyType( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorKeyADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Key Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 448,270 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorKeyADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorEmailADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorEmailADT : public wxDialog 
+class frmContactEditorEmailADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkEmail;
-               wxPanel* tabGeneral;
-               wxStaticText* lblEmailAddress;
-               wxTextCtrl* txtEmail;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorEmailADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Email Address Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 411,251 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorEmailADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkEmail;
+    wxPanel* tabGeneral;
+    wxStaticText* lblEmailAddress;
+    wxTextCtrl* txtEmail;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessData( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorEmailADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Email Address Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 411,251 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorEmailADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorIMADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorIMADT : public wxDialog 
+class frmContactEditorIMADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkIM;
-               wxPanel* tabGeneral;
-               wxStaticText* lblIMType;
-               wxComboBox* cmbIMType;
-               wxStaticText* lblUsername;
-               wxTextCtrl* txtUsername;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorIMADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Instant Messaging Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 424,224 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorIMADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkIM;
+    wxPanel* tabGeneral;
+    wxStaticText* lblIMType;
+    wxComboBox* cmbIMType;
+    wxStaticText* lblUsername;
+    wxTextCtrl* txtUsername;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorIMADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Instant Messaging Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 424,224 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorIMADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorCategoryADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorCategoryADT : public wxDialog 
+class frmContactEditorCategoryADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkIM;
-               wxPanel* tabGeneral;
-               wxStaticText* lblCategory;
-               wxTextCtrl* txtCategory;
-               wxStaticText* lblType;
-               wxChoice* cmbType;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorCategoryADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Category Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 424,224 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorCategoryADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkIM;
+    wxPanel* tabGeneral;
+    wxStaticText* lblCategory;
+    wxTextCtrl* txtCategory;
+    wxStaticText* lblType;
+    wxChoice* cmbType;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorCategoryADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Category Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 424,224 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorCategoryADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorTelephoneADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorTelephoneADT : public wxDialog 
+class frmContactEditorTelephoneADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkAddress;
-               wxPanel* tabGeneral;
-               wxStaticText* lblTelephone;
-               wxTextCtrl* txtTelephone;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxStaticText* lblTelephoneType;
-               wxCheckBox* chkVoice;
-               wxCheckBox* chkText;
-               wxCheckBox* chkFax;
-               wxCheckBox* chkMobile;
-               wxCheckBox* chkVideo;
-               wxCheckBox* chkTextphone;
-               wxCheckBox* chkPager;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorTelephoneADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Telephone Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 401,262 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorTelephoneADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkAddress;
+    wxPanel* tabGeneral;
+    wxStaticText* lblTelephone;
+    wxTextCtrl* txtTelephone;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxStaticText* lblTelephoneType;
+    wxCheckBox* chkVoice;
+    wxCheckBox* chkText;
+    wxCheckBox* chkFax;
+    wxCheckBox* chkMobile;
+    wxCheckBox* chkVideo;
+    wxCheckBox* chkTextphone;
+    wxCheckBox* chkPager;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorTelephoneADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Telephone Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 401,262 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorTelephoneADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorLanguagesADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorLanguagesADT : public wxDialog 
+class frmContactEditorLanguagesADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkLanguages;
-               wxPanel* tabGeneral;
-               wxStaticText* lblLanguage;
-               wxTextCtrl* txtLanguage;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorLanguagesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Language Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorLanguagesADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkLanguages;
+    wxPanel* tabGeneral;
+    wxStaticText* lblLanguage;
+    wxTextCtrl* txtLanguage;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorLanguagesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Language Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorLanguagesADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmContactEditorTimezonesADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmContactEditorTimezonesADT : public wxDialog 
+class frmContactEditorTimezonesADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* nbkTimezone;
-               wxPanel* tabGeneral;
-               wxStaticText* lblTimezone;
-               wxComboBox* cmbTimezone;
-               wxStaticText* lblPriority;
-               wxCheckBox* chkUsePref;
-               wxSlider* sliPriority;
-               wxStaticText* lblHigh;
-               wxStaticText* lblLow;
-               wxButton* btnAction;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmContactEditorTimezonesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Timezone Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmContactEditorTimezonesADT();
-       
+private:
+    
+protected:
+    wxNotebook* nbkTimezone;
+    wxPanel* tabGeneral;
+    wxStaticText* lblTimezone;
+    wxComboBox* cmbTimezone;
+    wxStaticText* lblPriority;
+    wxCheckBox* chkUsePref;
+    wxSlider* sliPriority;
+    wxStaticText* lblHigh;
+    wxStaticText* lblLow;
+    wxButton* btnAction;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void EnablePriority( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ProcessAction( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmContactEditorTimezonesADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Timezone Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,184 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmContactEditorTimezonesADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class XABSearchPanelADT
 ///////////////////////////////////////////////////////////////////////////////
-class XABSearchPanelADT : public wxPanel 
+class XABSearchPanelADT : public wxPanel
 {
-       private:
-       
-       protected:
-               wxChoice* choOption;
-               wxBoxSizer* szrSSet;
-               wxCheckBox* chkActive;
-               wxTextCtrl* txtSearch;
-               wxBitmapButton* btnAdd;
-               wxBitmapButton* btnDelete;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void UpdateOptions( wxCommandEvent& event ) { event.Skip(); }
-               virtual void AddSearchWidget( wxCommandEvent& event ) { event.Skip(); }
-               virtual void RemoveSearchWidget( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               XABSearchPanelADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 390,40 ), long style = wxTAB_TRAVERSAL ); 
-               ~XABSearchPanelADT();
-       
+private:
+    
+protected:
+    wxChoice* choOption;
+    wxBoxSizer* szrSSet;
+    wxCheckBox* chkActive;
+    wxTextCtrl* txtSearch;
+    wxBitmapButton* btnAdd;
+    wxBitmapButton* btnDelete;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void UpdateOptions( wxCommandEvent& event ) { event.Skip(); }
+    virtual void AddSearchWidget( wxCommandEvent& event ) { event.Skip(); }
+    virtual void RemoveSearchWidget( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    XABSearchPanelADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 390,40 ), long style = wxTAB_TRAVERSAL );
+    ~XABSearchPanelADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmSearchAccountsADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmSearchAccountsADT : public wxDialog 
+class frmSearchAccountsADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxCheckListBox* chlAccounts;
-               wxButton* btnSelect;
-               wxButton* btnCancel;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void UpdateSelectedAccounts( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmSearchAccountsADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Select Accounts"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 353,376 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmSearchAccountsADT();
-       
+private:
+    
+protected:
+    wxCheckListBox* chlAccounts;
+    wxButton* btnSelect;
+    wxButton* btnCancel;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void UpdateSelectedAccounts( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmSearchAccountsADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Select Accounts"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 353,376 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmSearchAccountsADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmEditAccountADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmEditAccountADT : public wxDialog 
+class frmEditAccountADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* tabAccount;
-               wxPanel* tabProperties;
-               wxStaticText* lblAccName;
-               wxTextCtrl* txtAccountName;
-               wxStaticText* lblAccAdr;
-               wxTextCtrl* txtAddress;
-               wxStaticText* m_staticText193;
-               wxTextCtrl* txtPort;
-               wxStaticText* lblPort;
-               wxTextCtrl* txtUsername;
-               wxStaticText* lblPassword;
-               wxTextCtrl* txtPassword;
-               wxStaticText* lblPrefix;
-               wxTextCtrl* txtPrefix;
-               wxButton* btnDetect;
-               wxStaticText* txtSSL;
-               wxCheckBox* chkSSL;
-               wxPanel* tabRefresh;
-               wxStaticText* lblRefresh;
-               wxTextCtrl* txtRefresh;
-               wxButton* btnSave;
-               wxButton* btnCancel;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void DetectAddressBook( wxCommandEvent& event ) { event.Skip(); }
-               virtual void UpdateSettings( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmEditAccountADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Edit Account"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 306,319 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmEditAccountADT();
-       
+private:
+    
+protected:
+    wxNotebook* tabAccount;
+    wxPanel* tabProperties;
+    wxStaticText* lblAccName;
+    wxTextCtrl* txtAccountName;
+    wxStaticText* lblAccAdr;
+    wxTextCtrl* txtAddress;
+    wxStaticText* m_staticText193;
+    wxTextCtrl* txtPort;
+    wxStaticText* lblPort;
+    wxTextCtrl* txtUsername;
+    wxStaticText* lblPassword;
+    wxTextCtrl* txtPassword;
+    wxStaticText* lblPrefix;
+    wxTextCtrl* txtPrefix;
+    wxButton* btnDetect;
+    wxStaticText* txtSSL;
+    wxCheckBox* chkSSL;
+    wxPanel* tabRefresh;
+    wxStaticText* lblRefresh;
+    wxTextCtrl* txtRefresh;
+    wxButton* btnSave;
+    wxButton* btnCancel;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void DetectAddressBook( wxCommandEvent& event ) { event.Skip(); }
+    virtual void UpdateSettings( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmEditAccountADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Edit Account"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 306,319 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmEditAccountADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class frmSSLCertificateADT
 ///////////////////////////////////////////////////////////////////////////////
-class frmSSLCertificateADT : public wxDialog 
+class frmSSLCertificateADT : public wxDialog
 {
-       private:
-       
-       protected:
-               wxNotebook* m_notebook28;
-               wxPanel* tabSummary;
-               wxPanel* pnlTop;
-               wxStaticText* lblCertName;
-               wxStaticText* lblValidityStatus;
-               wxPanel* m_panel54;
-               wxStaticText* lblIssuedTo;
-               wxStaticText* lblIssuedToData;
-               wxStaticText* lblValidFrom;
-               wxStaticText* lblValidFromData;
-               wxStaticText* lblValidUntil;
-               wxStaticText* lblValidUntilData;
-               wxPanel* tabDetail;
-               wxListCtrl* lstValues;
-               wxTextCtrl* txtValueData;
-               wxPanel* tabHierarchy;
-               wxTreeCtrl* treHierarchy;
-               wxPanel* m_panel57;
-               wxButton* btnViewCert;
-               wxPanel* pnlButtons;
-               wxButton* btnClose;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void LoadValueData( wxListEvent& event ) { event.Skip(); }
-               virtual void CheckCertificate( wxTreeEvent& event ) { event.Skip(); }
-               virtual void ViewCertificate( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmSSLCertificateADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("SSL Certificate Window"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 347,402 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmSSLCertificateADT();
-       
+private:
+    
+protected:
+    wxNotebook* m_notebook28;
+    wxPanel* tabSummary;
+    wxPanel* pnlTop;
+    wxStaticText* lblCertName;
+    wxStaticText* lblValidityStatus;
+    wxPanel* m_panel54;
+    wxStaticText* lblIssuedTo;
+    wxStaticText* lblIssuedToData;
+    wxStaticText* lblValidFrom;
+    wxStaticText* lblValidFromData;
+    wxStaticText* lblValidUntil;
+    wxStaticText* lblValidUntilData;
+    wxPanel* tabDetail;
+    wxListCtrl* lstValues;
+    wxTextCtrl* txtValueData;
+    wxPanel* tabHierarchy;
+    wxTreeCtrl* treHierarchy;
+    wxPanel* m_panel57;
+    wxButton* btnViewCert;
+    wxPanel* pnlButtons;
+    wxButton* btnClose;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void LoadValueData( wxListEvent& event ) { event.Skip(); }
+    virtual void CheckCertificate( wxTreeEvent& event ) { event.Skip(); }
+    virtual void ViewCertificate( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmSSLCertificateADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("SSL Certificate Window"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 347,402 ), long style = wxDEFAULT_DIALOG_STYLE );
+    ~frmSSLCertificateADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1864,25 +1860,25 @@ class frmSSLCertificateADT : public wxDialog
 ///////////////////////////////////////////////////////////////////////////////
 class frmInvalidSSLCertificateADT : public wxDialog 
 {
-       private:
-       
-       protected:
-               wxStaticText* lblSSLText;
-               wxButton* btnAccept;
-               wxButton* btnReject;
-               wxButton* btnViewCert;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void Accept( wxCommandEvent& event ) { event.Skip(); }
-               virtual void Reject( wxCommandEvent& event ) { event.Skip(); }
-               virtual void ViewCertificates( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmInvalidSSLCertificateADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Invalid SSL Certificate"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 445,239 ), long style = wxCAPTION ); 
-               ~frmInvalidSSLCertificateADT();
-       
+private:
+    
+protected:
+    wxStaticText* lblSSLText;
+    wxButton* btnAccept;
+    wxButton* btnReject;
+    wxButton* btnViewCert;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void Accept( wxCommandEvent& event ) { event.Skip(); }
+    virtual void Reject( wxCommandEvent& event ) { event.Skip(); }
+    virtual void ViewCertificates( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmInvalidSSLCertificateADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Invalid SSL Certificate"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 445,239 ), long style = wxCAPTION ); 
+    ~frmInvalidSSLCertificateADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1890,26 +1886,26 @@ class frmInvalidSSLCertificateADT : public wxDialog
 ///////////////////////////////////////////////////////////////////////////////
 class frmImportContactsADT : public wxDialog 
 {
-       private:
-       
-       protected:
-               wxStaticText* lblImportText;
-               wxCheckListBox* lstContacts;
-               wxBoxSizer* szrAccount;
-               wxStaticText* lblAccountText;
-               wxButton* btnImport;
-               wxButton* btnCancel;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void ImportContacts( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmImportContactsADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 362,403 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmImportContactsADT();
-       
+private:
+    
+protected:
+    wxStaticText* lblImportText;
+    wxCheckListBox* lstContacts;
+    wxBoxSizer* szrAccount;
+    wxStaticText* lblAccountText;
+    wxButton* btnImport;
+    wxButton* btnCancel;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void ImportContacts( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmImportContactsADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 362,403 ), long style = wxDEFAULT_DIALOG_STYLE ); 
+    ~frmImportContactsADT();
+    
 };
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1917,24 +1913,24 @@ class frmImportContactsADT : public wxDialog
 ///////////////////////////////////////////////////////////////////////////////
 class frmImportResultsADT : public wxDialog 
 {
-       private:
-       
-       protected:
-               wxStaticText* lblText;
-               wxTextCtrl* txtResults;
-               wxButton* btnCopyClipboard;
-               wxButton* btnFinish;
-               
-               // Virtual event handlers, overide them in your derived class
-               virtual void CopyClipboard( wxCommandEvent& event ) { event.Skip(); }
-               virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
-               
-       
-       public:
-               
-               frmImportResultsADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Import Results"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 489,299 ), long style = wxDEFAULT_DIALOG_STYLE ); 
-               ~frmImportResultsADT();
-       
+private:
+    
+protected:
+    wxStaticText* lblText;
+    wxTextCtrl* txtResults;
+    wxButton* btnCopyClipboard;
+    wxButton* btnFinish;
+    
+    // Virtual event handlers, overide them in your derived class
+    virtual void CopyClipboard( wxCommandEvent& event ) { event.Skip(); }
+    virtual void CloseWindow( wxCommandEvent& event ) { event.Skip(); }
+    
+    
+public:
+    
+    frmImportResultsADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Import Results"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 489,299 ), long style = wxDEFAULT_DIALOG_STYLE ); 
+    ~frmImportResultsADT();
+    
 };
 
 #endif //__APPXESTIAADDRBK_H__
index e23f9e7..8f3dc7c 100644 (file)
 #include <wx/ffile.h>
 
 void SetupDefaultAddressBook(){
-
-       // Check if the 'Default.local' directory exists.
-
-       wxString DefaultLocalDir;
-
+    
+    // Check if the 'Default.local' directory exists.
+    
+    wxString DefaultLocalDir;
+    
 #if defined(__HAIKU__)
     
     //preffilename = wxT("noo");
-
+    
 #elif defined(__WIN32__)
-
-       DefaultLocalDir.Clear();
-       DefaultLocalDir.Append(wxString::FromUTF8(getenv("APPDATA")));
-       DefaultLocalDir.Append(wxT("\\Xestia\\Address Book\\accounts\\"));
-       DefaultLocalDir.Append(wxT("Default.local"));
-
+    
+    DefaultLocalDir.Clear();
+    DefaultLocalDir.Append(wxString::FromUTF8(getenv("APPDATA")));
+    DefaultLocalDir.Append(wxT("\\Xestia\\Address Book\\accounts\\"));
+    DefaultLocalDir.Append(wxT("Default.local"));
+    
+#elif defined(__APPLE__)
+    
+    DefaultLocalDir.Clear();
+    DefaultLocalDir.Append(wxString::FromUTF8(getenv("HOME")));
+    DefaultLocalDir.Append(wxT("/Library/Preferences/Xestia/Address Book/accounts/"));
+    DefaultLocalDir.Append(wxT("Default.local"));
+    
 #else
-
-       DefaultLocalDir.Clear();
-       DefaultLocalDir.Append(wxString::FromUTF8(getenv("HOME")));
-       DefaultLocalDir.Append(wxT("/.xestiaab/accounts/"));
-       DefaultLocalDir.Append(wxT("Default.local"));
-
+    
+    DefaultLocalDir.Clear();
+    DefaultLocalDir.Append(wxString::FromUTF8(getenv("HOME")));
+    DefaultLocalDir.Append(wxT("/.xestiaab/accounts/"));
+    DefaultLocalDir.Append(wxT("Default.local"));
+    
 #endif
-
-       if (wxDirExists(DefaultLocalDir) == FALSE){
-       
-               if (wxMkdir(DefaultLocalDir, 0740) == TRUE){            
-                                       
-               }
-       
-       }
-
+    
+    if (wxDirExists(DefaultLocalDir) == FALSE){
+        
+        if (wxMkdir(DefaultLocalDir, 0740) == TRUE){
+            
+        }
+        
+    }
+    
 }
 
 void SetupDefaultSettings(){
-
-       // Setup default (non account) settings if they don't exist.
-       
-       wxString DefaultPrefDir;
-
+    
+    // Setup default (non account) settings if they don't exist.
+    
+    wxString DefaultPrefDir;
+    
 #if defined(__HAIKU__)
-
-       //preffilename = wxT("noo");
-
+    
+    //preffilename = wxT("noo");
+    
 #elif defined(__WIN32__)
-
-       DefaultPrefDir.Clear();
-       DefaultPrefDir.Append(wxString::FromUTF8(getenv("APPDATA")));
-       DefaultPrefDir.Append(wxT("\\Xestia\\Address Book\\preferences\\"));
-
+    
+    DefaultPrefDir.Clear();
+    DefaultPrefDir.Append(wxString::FromUTF8(getenv("APPDATA")));
+    DefaultPrefDir.Append(wxT("\\Xestia\\Address Book\\preferences\\"));
+    
+#elif defined(__APPLE__)
+    
+    DefaultPrefDir.Clear();
+    DefaultPrefDir.Append(wxString::FromUTF8(getenv("HOME")));
+    DefaultPrefDir.Append(wxT("/Library/Preferences/Xestia/Address Book/preferences"));
+    
 #else
-
-       DefaultPrefDir.Clear();
-       DefaultPrefDir.Append(wxString::FromUTF8(getenv("HOME")));
-       DefaultPrefDir.Append(wxT("/.xestiaab/preferences/"));
-
+    
+    DefaultPrefDir.Clear();
+    DefaultPrefDir.Append(wxString::FromUTF8(getenv("HOME")));
+    DefaultPrefDir.Append(wxT("/.xestiaab/preferences/"));
+    
 #endif
-       
-       // Create the accounts file if it doesn't exist.
-       
-       if (wxFileExists(DefaultPrefDir + wxT("accounts")) == FALSE){
-       
-               wxString AccountsFilename;
-               wxFFile AccountsFile;
-
-               AccountsFilename = DefaultPrefDir;
-               AccountsFilename.Append(wxT("accounts"));
-
+    
+    // Create the accounts file if it doesn't exist.
+    
+    if (wxFileExists(DefaultPrefDir + wxT("accounts")) == FALSE){
+        
+        wxString AccountsFilename;
+        wxFFile AccountsFile;
+        
+        AccountsFilename = DefaultPrefDir;
+        AccountsFilename.Append(wxT("accounts"));
+        
 #if wxABI_VERSION < 20900
-               AccountsFile.Open(AccountsFilename.c_str(), wxT("w"));
+        AccountsFile.Open(AccountsFilename.c_str(), wxT("w"));
 #else
-               AccountsFile.Open(AccountsFilename, wxT("w"));
-#endif 
-       
-               AccountsFile.Write(wxT(""));
-       
-       }
-       
-       // Create the preferences file if it doesn't exist.
-
-       if (wxFileExists(DefaultPrefDir + wxT("settings")) == FALSE){
-
-               wxString PrefsFilename;
-               wxFFile PrefsFile;
-
-               PrefsFilename = DefaultPrefDir;
-               PrefsFilename.Append(wxT("settings"));
-       
+        AccountsFile.Open(AccountsFilename, wxT("w"));
+#endif
+        
+        AccountsFile.Write(wxT(""));
+        
+    }
+    
+    // Create the preferences file if it doesn't exist.
+    
+    if (wxFileExists(DefaultPrefDir + wxT("settings")) == FALSE){
+        
+        wxString PrefsFilename;
+        wxFFile PrefsFile;
+        
+        PrefsFilename = DefaultPrefDir;
+        PrefsFilename.Append(wxT("settings"));
+        
 #if wxABI_VERSION < 20900
-               PrefsFile.Open(PrefsFilename.c_str(), wxT("w"));
+        PrefsFile.Open(PrefsFilename.c_str(), wxT("w"));
 #else
-               PrefsFile.Open(PrefsFilename, wxT("w"));
-#endif 
-       
-               PrefsFile.Write(wxT("HideLocalAddressBooks=false\nSaveWindowPosition=true\n"));
-       
-       }
-
+        PrefsFile.Open(PrefsFilename, wxT("w"));
+#endif
+        
+        PrefsFile.Write(wxT("HideLocalAddressBooks=false\nSaveWindowPosition=true\n"));
+        
+    }
+    
 }
 
 void SetupDirectories(){
-
-       // Create the directories if they don't exist.
-
-       wxString DefaultSettingsDir;
-
+    
+    // Create the directories if they don't exist.
+    
+    wxString DefaultSettingsDir;
+    
 #if defined(__HAIKU__)
-
-       //preffilename = wxT("noo");
-
+    
+    //preffilename = wxT("noo");
+    
 #elif defined(__WIN32__)
-
-       DefaultSettingsDir.Clear();
-       DefaultSettingsDir.Append(wxString::FromUTF8(getenv("APPDATA")));
-       DefaultSettingsDir.Append(wxT("\\Xestia\\"));
-
-       if (wxDirExists(DefaultSettingsDir) == FALSE){
-
-               // Create the directory.
-
-               if (wxMkdir(DefaultSettingsDir, 0740) == TRUE){         
-
-               }
-
-       }
-
-       // TODO: APPEND 'Address Book' to the directory.
-
-       DefaultSettingsDir.Append(wxT("\\Address Book\\"));
-
+    
+    DefaultSettingsDir.Clear();
+    DefaultSettingsDir.Append(wxString::FromUTF8(getenv("APPDATA")));
+    DefaultSettingsDir.Append(wxT("\\Xestia\\"));
+    
+    if (wxDirExists(DefaultSettingsDir) == FALSE){
+        
+        // Create the directory.
+        
+        if (wxMkdir(DefaultSettingsDir, 0740) == TRUE){
+            
+        }
+        
+    }
+    
+    // TODO: APPEND 'Address Book' to the directory.
+    
+    DefaultSettingsDir.Append(wxT("\\Address Book\\"));
+    
+#elif defined(__APPLE__)
+    
+    DefaultSettingsDir.Clear();
+    DefaultSettingsDir.Append(wxString::FromUTF8(getenv("HOME")));
+    DefaultSettingsDir.Append(wxT("/Library/Preferences/Xestia/"));
+    
+    if (wxDirExists(DefaultSettingsDir) == FALSE){
+        
+        // Create the directory.
+        
+        if (wxMkdir(DefaultSettingsDir, 0740) == TRUE){
+            
+        }
+        
+    }
+    
+    // TODO: APPEND 'Address Book' to the directory.
+    
+    DefaultSettingsDir.Append(wxT("/Address Book/"));
+    
 #else
-
-       DefaultSettingsDir.Clear();
-       DefaultSettingsDir.Append(wxString::FromUTF8(getenv("HOME")));
-       DefaultSettingsDir.Append(wxT("/.xestiaab/"));
-
+    
+    DefaultSettingsDir.Clear();
+    DefaultSettingsDir.Append(wxString::FromUTF8(getenv("HOME")));
+    DefaultSettingsDir.Append(wxT("/.xestiaab/"));
+    
 #endif
-
-       // Check if the directory exists.
-
-       if (wxDirExists(DefaultSettingsDir) == FALSE){
-       
-               // Create the directory.
-               
-               if (wxMkdir(DefaultSettingsDir, 0740) == TRUE){         
-                                       
-               }
-       
-       }
-
-       if (wxDirExists(DefaultSettingsDir + wxT("accounts")) == FALSE){
-       
-               if (wxMkdir(DefaultSettingsDir + wxT("accounts"), 0740) == TRUE){               
-                                       
-               }
-       
-       }
-       
-       if (wxDirExists(DefaultSettingsDir + wxT("preferences")) == FALSE){
-       
-               if (wxMkdir(DefaultSettingsDir + wxT("preferences"), 0740) == TRUE){            
-               
-               }
-       
-       }
-
+    
+    // Check if the directory exists.
+    
+    if (wxDirExists(DefaultSettingsDir) == FALSE){
+        
+        // Create the directory.
+        
+        if (wxMkdir(DefaultSettingsDir, 0740) == TRUE){                
+            
+        }
+        
+    }
+    
+    if (wxDirExists(DefaultSettingsDir + wxT("accounts")) == FALSE){
+        
+        if (wxMkdir(DefaultSettingsDir + wxT("accounts"), 0740) == TRUE){              
+            
+        }
+        
+    }
+    
+    if (wxDirExists(DefaultSettingsDir + wxT("preferences")) == FALSE){
+        
+        if (wxMkdir(DefaultSettingsDir + wxT("preferences"), 0740) == TRUE){           
+            
+        }
+        
+    }
+    
 }
\ No newline at end of file
index 0ced7ab..744fe92 100644 (file)
 
 wxString GetUserDir()
 {
-
-       wxString UserDir;
-
+    
+    wxString UserDir;
+    
 #if defined(__HAIKU__)
-
-       //preffilename = wxT("noo");
-
+    
+    //preffilename = wxT("noo");
+    
 #elif defined(__WIN32__)
-               
-       UserDir.Clear();
-       UserDir.Append(wxString::FromUTF8(getenv("APPDATA")));
-       UserDir.Append(wxT("\\Xestia\\Address Book\\"));
-
+    
+    UserDir.Clear();
+    UserDir.Append(wxString::FromUTF8(getenv("APPDATA")));
+    UserDir.Append(wxT("\\Xestia\\Address Book\\"));
+    
+#elif defined(__APPLE__)
+    
+    UserDir.Clear();
+    UserDir.Append(wxString::FromUTF8(getenv("HOME")));
+    UserDir.Append(wxT("/Library/Preferences/Xestia/Address Book/"));
+    
 #else
-
-       UserDir.Clear();
-       UserDir.Append(wxString::FromUTF8(getenv("HOME")));
-       UserDir.Append(wxT("/.xestiaab/"));
-
-#endif 
-
-       return UserDir;
-
+    
+    UserDir.Clear();
+    UserDir.Append(wxString::FromUTF8(getenv("HOME")));
+    UserDir.Append(wxT("/.xestiaab/"));
+    
+#endif
+    
+    return UserDir;
+    
 }
 
 wxString GetUserPrefDir()
 {
-
-       wxString UserPrefDir;
-
+    
+    wxString UserPrefDir;
+    
 #if defined(__HAIKU__)
-
-       //preffilename = wxT("noo");
-
+    
+    //preffilename = wxT("noo");
+    
 #elif defined(__WIN32__)
-       
-       UserPrefDir.Clear();
-       UserPrefDir.Append(wxString::FromUTF8(getenv("APPDATA")));
-       UserPrefDir.Append(wxT("\\Xestia\\Address Book\\preferences\\"));
-
+    
+    UserPrefDir.Clear();
+    UserPrefDir.Append(wxString::FromUTF8(getenv("APPDATA")));
+    UserPrefDir.Append(wxT("\\Xestia\\Address Book\\preferences\\"));
+    
+#elif defined(__APPLE__)
+    
+    UserPrefDir.Clear();
+    UserPrefDir.Append(wxString::FromUTF8(getenv("HOME")));
+    UserPrefDir.Append(wxT("/Library/Preferences/Xestia/Address Book/preferences/"));
+    
 #else
-
-       UserPrefDir.Clear();
-       UserPrefDir.Append(wxString::FromUTF8(getenv("HOME")));
-       UserPrefDir.Append(wxT("/.xestiaab/preferences/"));
-
-#endif 
-
-       return UserPrefDir;
-
+    
+    UserPrefDir.Clear();
+    UserPrefDir.Append(wxString::FromUTF8(getenv("HOME")));
+    UserPrefDir.Append(wxT("/.xestiaab/preferences/"));
+    
+#endif
+    
+    return UserPrefDir;
+    
 }
 
 wxString GetRecoveryDB()
 {
-
-       wxString RecoveryDBFile;
-
+    
+    wxString RecoveryDBFile;
+    
 #if defined(__HAIKU__)
-
-       //preffilename = wxT("noo");
-
+    
+    //preffilename = wxT("noo");
+    
 #elif defined(__WIN32__)
-
-       RecoveryDBFile.Clear();
-       RecoveryDBFile.Append(wxString::FromUTF8(getenv("APPDATA")));
-       RecoveryDBFile.Append(wxT("\\Xestia\\Address Book\\recovery.db"));
-
+    
+    RecoveryDBFile.Clear();
+    RecoveryDBFile.Append(wxString::FromUTF8(getenv("APPDATA")));
+    RecoveryDBFile.Append(wxT("\\Xestia\\Address Book\\recovery.db"));
+    
+#elif defined(__APPLE__)
+    
+    RecoveryDBFile.Clear();
+    RecoveryDBFile.Append(wxString::FromUTF8(getenv("HOME")));
+    RecoveryDBFile.Append(wxT("/Library/Preferences/Xestia/Address Book/recovery.db"));
+    
 #else
-
-       RecoveryDBFile.Clear();
-       RecoveryDBFile.Append(wxString::FromUTF8(getenv("HOME")));
-       RecoveryDBFile.Append(wxT("/.xestiaab/.recovery.db"));
-
-#endif 
-
-       return RecoveryDBFile;
-
+    
+    RecoveryDBFile.Clear();
+    RecoveryDBFile.Append(wxString::FromUTF8(getenv("HOME")));
+    RecoveryDBFile.Append(wxT("/.xestiaab/.recovery.db"));
+    
+#endif
+    
+    return RecoveryDBFile;
+    
 }
 
 wxString GetAccountDir(wxString AccName, bool ServerCert)
 {
-
-       wxString AccountDir;
-
+    
+    wxString AccountDir;
+    
 #if defined(__HAIKU__)
-
+    
 #elif defined(__WIN32__)
-
-       AccountDir.Clear();
-       AccountDir.Append(wxString::FromUTF8(getenv("APPDATA")));
-       AccountDir.Append(wxT("\\Xestia\\Address Book\\accounts\\"));
-       AccountDir.Append(AccName);
-       AccountDir.Append(wxT("\\"));
-       if (ServerCert == TRUE){
-               AccountDir.Append(wxT("server.crt"));
-       }
-
+    
+    AccountDir.Clear();
+    AccountDir.Append(wxString::FromUTF8(getenv("APPDATA")));
+    AccountDir.Append(wxT("\\Xestia\\Address Book\\accounts\\"));
+    AccountDir.Append(AccName);
+    AccountDir.Append(wxT("\\"));
+    if (ServerCert == TRUE){
+        AccountDir.Append(wxT("server.crt"));
+    }
+    
+#elif defined(__APPLE__)
+    
+    AccountDir.Clear();
+    AccountDir.Append(wxString::FromUTF8(getenv("HOME")));
+    AccountDir.Append(wxT("/Library/Preferences/Xestia/Address Book/accounts/"));
+    AccountDir.Append(AccName);
+    AccountDir.Append(wxT("/"));
+    if (ServerCert == TRUE){
+        AccountDir.Append(wxT("server.crt"));
+    }
+    
 #else
-
-       AccountDir.Clear();
-       AccountDir.Append(wxString::FromUTF8(getenv("HOME")));
-       AccountDir.Append(wxT("/.xestiaab/accounts/"));
-       AccountDir.Append(AccName);
-       AccountDir.Append(wxT("/"));
-       if (ServerCert == TRUE){
-               AccountDir.Append(wxT("server.crt"));
-       }
-
+    
+    AccountDir.Clear();
+    AccountDir.Append(wxString::FromUTF8(getenv("HOME")));
+    AccountDir.Append(wxT("/.xestiaab/accounts/"));
+    AccountDir.Append(AccName);
+    AccountDir.Append(wxT("/"));
+    if (ServerCert == TRUE){
+        AccountDir.Append(wxT("server.crt"));
+    }
+    
 #endif
-
-       return AccountDir;
-
+    
+    return AccountDir;
+    
 }
 
 wxString GetAccountsFile()
 {
-
-       wxString AccountsFile;
-
+    
+    wxString AccountsFile;
+    
 #if defined(__HAIKU__)
-
+    
 #elif defined(__WIN32__)
-
-       AccountsFile.Clear();
-       AccountsFile.Append(wxString::FromUTF8(getenv("APPDATA")));
-       AccountsFile.Append(wxT("\\Xestia\\Address Book\\preferences\\accounts"));
+    
+    AccountsFile.Clear();
+    AccountsFile.Append(wxString::FromUTF8(getenv("APPDATA")));
+    AccountsFile.Append(wxT("\\Xestia\\Address Book\\preferences\\accounts"));
+    
+#elif defined(__WIN32__)
+    
+    AccountsFile.Clear();
+    AccountsFile.Append(wxString::FromUTF8(getenv("HOME")));
+    AccountsFile.Append(wxT("/Library/Preferences/Xestia/Address Book/preferences/accounts"));
+    
 #else
-
-       AccountsFile.Clear();
-       AccountsFile.Append(wxString::FromUTF8(getenv("HOME")));
-       AccountsFile.Append(wxT("/.xestiaab/preferences/accounts"));
-
+    
+    AccountsFile.Clear();
+    AccountsFile.Append(wxString::FromUTF8(getenv("HOME")));
+    AccountsFile.Append(wxT("/.xestiaab/preferences/accounts"));
+    
 #endif
-
-       return AccountsFile;
-
+    
+    return AccountsFile;
+    
 }
 
 wxString GetSettingsFile()
 {
-
-       wxString SettingsFile;
-
+    
+    wxString SettingsFile;
+    
 #if defined(__HAIKU__)
-
+    
 #elif defined(__WIN32__)
-
-       SettingsFile.Clear();
-       SettingsFile.Append(wxString::FromUTF8(getenv("APPDATA")));
-       SettingsFile.Append(wxT("\\Xestia\\Address Book\\preferences\\settings"));
-
+    
+    SettingsFile.Clear();
+    SettingsFile.Append(wxString::FromUTF8(getenv("APPDATA")));
+    SettingsFile.Append(wxT("\\Xestia\\Address Book\\preferences\\settings"));
+    
+#elif defined(__APPLE__)
+    
+    SettingsFile.Clear();
+    SettingsFile.Append(wxString::FromUTF8(getenv("HOME")));
+    SettingsFile.Append(wxT("/Library/Preferences/Xestia/Address Book/preferences/settings"));
+    
 #else
-
-       SettingsFile.Clear();
-       SettingsFile.Append(wxString::FromUTF8(getenv("HOME")));
-       SettingsFile.Append(wxT("/.xestiaab/preferences/settings"));
-
+    
+    SettingsFile.Clear();
+    SettingsFile.Append(wxString::FromUTF8(getenv("HOME")));
+    SettingsFile.Append(wxT("/.xestiaab/preferences/settings"));
+    
 #endif
-
-       return SettingsFile;
-
+    
+    return SettingsFile;
+    
 }
\ No newline at end of file
index 12777b0..95e38e4 100644 (file)
-#include "etag.h" 
+#include "etag.h"
 #include "../common/dirs.h"
 
 ETagDB::~ETagDB(){
-
-       // Write out the database to file.
-       
-       ProcessLock->lock();
-       
-       if (NeedsWrite == TRUE){
-               
-               WriteETagDB();
-       
-       }
-       
-       ProcessLock->unlock();
-
+    
+    // Write out the database to file.
+    
+    ProcessLock->try_lock();
+    
+    if (NeedsWrite == TRUE){
+        
+        WriteETagDB();
+        
+    }
+    
+    ProcessLock->unlock();
+    
 }
 
 void ETagDB::SetupDB(wxString AccountDirInc){
-
-       AccountDir = AccountDirInc;
-       LoadETagDB();
-       //ProcessLock = ProcessLockInc;
-
+    
+    AccountDir = AccountDirInc;
+    LoadETagDB();
+    
 }
 
 void ETagDB::AddETag(wxString Filename, wxString ETag, wxString ETagOriginal){
-
-       // Lock or wait if it is already locked.
-       
-       ProcessLock->lock();
-               
-       // Process the ETag addition.
-       
-       FilenameETag.insert(std::make_pair(Filename, ETag));
-       FilenameETagOriginal.insert(std::make_pair(Filename, ETagOriginal));
-       
-       NeedsWrite = TRUE;
-       
-       // Unlock.
-       
-       ProcessLock->unlock();
-
+    
+    // Lock or wait if it is already locked.
+    
+    ProcessLock->lock();
+    
+    // Process the ETag addition.
+    
+    FilenameETag.insert(std::make_pair(Filename, ETag));
+    FilenameETagOriginal.insert(std::make_pair(Filename, ETagOriginal));
+    
+    NeedsWrite = TRUE;
+    
+    // Unlock.
+    
+    ProcessLock->unlock();
+    
 }
 
 void ETagDB::RemoveETag(wxString Filename){
-
-       // Lock or wait if it is already locked.
-       
-       ProcessLock->lock();
-       
-       // Remove the ETag.
-       
-       Filename.Trim();
-       
-       FilenameETag.erase(Filename);
-       FilenameETagOriginal.erase(Filename);
-       
-       NeedsWrite = TRUE;
-       
-       // Unlock.
-       
-       ProcessLock->unlock();
-
+    
+    // Lock or wait if it is already locked.
+    
+    ProcessLock->lock();
+    
+    // Remove the ETag.
+    
+    Filename.Trim();
+    
+    FilenameETag.erase(Filename);
+    FilenameETagOriginal.erase(Filename);
+    
+    NeedsWrite = TRUE;
+    
+    // Unlock.
+    
+    ProcessLock->unlock();
+    
 }
 
 void ETagDB::UpdateETag(wxString Filename, wxString ETag){
-
-       // Lock or wait if it is already locked.
-       
-       ProcessLock->lock();
-       
-       // Update the ETag.
-
-       FilenameETag.erase(Filename);
-       FilenameETag.insert(std::make_pair(Filename, ETag));    
-       
-       NeedsWrite = TRUE;
-       
-       // Unlock.
-       
-       ProcessLock->unlock();
-
+    
+    // Lock or wait if it is already locked.
+    
+    ProcessLock->lock();
+    
+    // Update the ETag.
+    
+    FilenameETag.erase(Filename);
+    FilenameETag.insert(std::make_pair(Filename, ETag));
+    
+    NeedsWrite = TRUE;
+    
+    // Unlock.
+    
+    ProcessLock->unlock();
+    
 }
 
 void ETagDB::UpdateETag(wxString Filename, wxString ETag, wxString ETagOriginal){
-
-       // Lock or wait if it is already locked.
-       
-       ProcessLock->lock();
-       
-       // Update the ETag.
-
-       FilenameETag.erase(Filename);
-       FilenameETagOriginal.erase(Filename);
-       FilenameETag.insert(std::make_pair(Filename, ETag));
-       FilenameETagOriginal.insert(std::make_pair(Filename, ETagOriginal));
-       
-       std::map<wxString,wxString>::iterator IterWxS;
-       IterWxS = FilenameETagOriginal.find(Filename);
-       NeedsWrite = TRUE;
-       
-       // Unlock.
-       
-       ProcessLock->unlock();
-
+    
+    // Lock or wait if it is already locked.
+    
+    ProcessLock->lock();
+    
+    // Update the ETag.
+    
+    FilenameETag.erase(Filename);
+    FilenameETagOriginal.erase(Filename);
+    FilenameETag.insert(std::make_pair(Filename, ETag));
+    FilenameETagOriginal.insert(std::make_pair(Filename, ETagOriginal));
+    
+    std::map<wxString,wxString>::iterator IterWxS;
+    IterWxS = FilenameETagOriginal.find(Filename);
+    NeedsWrite = TRUE;
+    
+    // Unlock.
+    
+    ProcessLock->unlock();
+    
 }
 
 std::map<wxString,wxString>* ETagDB::GetFilenamePointer(){
-
-       return &FilenameETag;
-
+    
+    return &FilenameETag;
+    
 }
 
 wxString ETagDB::GetETag(wxString Filename){
-
-       // Lock or wait if it is already locked.
-       
-       wxString ETagOut;
-       std::map<wxString,wxString>::iterator IterwxS;
-       
-       ProcessLock->lock();
-       
-       // Get the ETag.
-       
-       //IterwxS = FilenameETag.find(Filename);
-       
-       if (FilenameETag.find(Filename) != FilenameETag.end()){
-       
-               IterwxS = FilenameETag.find(Filename);
-       
-               ETagOut = IterwxS->second;
-       
-       }
-       
-       // Unlock.
-       
-       ProcessLock->unlock();
-       
-       return ETagOut;
-
+    
+    // Lock or wait if it is already locked.
+    
+    wxString ETagOut;
+    std::map<wxString,wxString>::iterator IterwxS;
+    
+    ProcessLock->lock();
+    
+    // Get the ETag.
+    
+    //IterwxS = FilenameETag.find(Filename);
+    
+    if (FilenameETag.find(Filename) != FilenameETag.end()){
+        
+        IterwxS = FilenameETag.find(Filename);
+        
+        ETagOut = IterwxS->second;
+        
+    }
+    
+    // Unlock.
+    
+    ProcessLock->unlock();
+    
+    return ETagOut;
+    
 }
 
 wxString ETagDB::GetETagOriginal(wxString Filename){
-
-       // Lock or wait if it is already locked.
-       
-       wxString ETagOrigOut;
-       std::map<wxString,wxString>::iterator IterwxS;
-       
-       ProcessLock->lock();
-       
-       // Get the ETag.
-       
-       //IterwxS = FilenameETag.find(Filename);
-       
-       if (FilenameETagOriginal.find(Filename) != FilenameETagOriginal.end()){
-       
-               IterwxS = FilenameETagOriginal.find(Filename);
-       
-               ETagOrigOut = IterwxS->second;
-       
-       }
-       
-       // Unlock.
-       
-       ProcessLock->unlock();
-       
-       return ETagOrigOut;
-
+    
+    // Lock or wait if it is already locked.
+    
+    wxString ETagOrigOut;
+    std::map<wxString,wxString>::iterator IterwxS;
+    
+    ProcessLock->lock();
+    
+    // Get the ETag.
+    
+    //IterwxS = FilenameETag.find(Filename);
+    
+    if (FilenameETagOriginal.find(Filename) != FilenameETagOriginal.end()){
+        
+        IterwxS = FilenameETagOriginal.find(Filename);
+        
+        ETagOrigOut = IterwxS->second;
+        
+    }
+    
+    // Unlock.
+    
+    ProcessLock->unlock();
+    
+    return ETagOrigOut;
+    
 }
-       
-bool ETagDB::WriteETagDB(){
-
-       // Lock or wait if it is already locked.
-       
-       ProcessLock->lock();
-       
-       // Write the ETag database.
-       
-       wxString AccountETagDB;
-       std::map<wxString,wxString>::iterator IterwxS;
-       int LineSeek = 0;
-       
-
 
+bool ETagDB::WriteETagDB(){
+    
+    // Lock or wait if it is already locked.
+    
+    ProcessLock->lock();
+    
+    // Write the ETag database.
+    
+    wxString AccountETagDB;
+    std::map<wxString,wxString>::iterator IterwxS;
+    int LineSeek = 0;
+    
+    
+    
 #if defined(__HAIKU__)
     
     //preffilename = wxT("noo");
-
+    
 #elif defined(__WIN32__)
-
-       AccountETagDB.Clear();
-       AccountETagDB = GetAccountDir(AccountDir, FALSE);
-       AccountETagDB.Append(wxT("\\etag.db"));
-
+    
+    AccountETagDB.Clear();
+    AccountETagDB = GetAccountDir(AccountDir, FALSE);
+    AccountETagDB.Append(wxT("\\etag.db"));
+    
 #else
-
-       AccountETagDB.Clear();
-       AccountETagDB = GetAccountDir(AccountDir, FALSE); 
-       AccountETagDB.Append(wxT("/etag.db"));
-
+    
+    // This entry applies to OSX as well.
+    
+    AccountETagDB.Clear();
+    AccountETagDB = GetAccountDir(AccountDir, FALSE);
+    AccountETagDB.Append(wxT("/etag.db"));
+    
 #endif
-
-       wxTextFile ETagDBFile;
-       wxString SettingLine;
-       
-       if (wxFileExists(AccountETagDB) == FALSE){
-
-               if (ETagDBFile.Create(AccountETagDB) == FALSE){
-                       ////ProcessLock.unlock();
-                       return FALSE;
-               }
-       
-       } else {
-       
-               if (ETagDBFile.Open(AccountETagDB) == FALSE){
-                       ////ProcessLock.unlock();
-                       return FALSE;
-               }
-       
-       }
-       
-       ETagDBFile.Clear();
-       
-       for (std::map<wxString,wxString>::iterator iter = FilenameETag.begin(); 
-        iter != FilenameETag.end(); ++iter){
-       
-               // Get Original ETag as well.
-               
-               IterwxS = FilenameETagOriginal.find(iter->first);
-               
-               if (iter->first.IsEmpty()){
-                       continue;
-               }
-               
-               SettingLine = iter->first + wxT("|") + iter->second + wxT("|") + IterwxS->second;
-               
-               ETagDBFile.InsertLine(SettingLine, LineSeek);
-               
-               LineSeek++;
-       
-       }
-       
-       ETagDBFile.Write();
-       
-       NeedsWrite = FALSE;
-       
-       // Unlock.
-       
-       ProcessLock->unlock();
-       
-       return TRUE;
-
+    
+    wxTextFile ETagDBFile;
+    wxString SettingLine;
+    
+    if (wxFileExists(AccountETagDB) == FALSE){
+        
+        if (ETagDBFile.Create(AccountETagDB) == FALSE){
+            ////ProcessLock.unlock();
+            return FALSE;
+        }
+        
+    } else {
+        
+        if (ETagDBFile.Open(AccountETagDB) == FALSE){
+            ////ProcessLock.unlock();
+            return FALSE;
+        }
+        
+    }
+    
+    ETagDBFile.Clear();
+    
+    for (std::map<wxString,wxString>::iterator iter = FilenameETag.begin();
+         iter != FilenameETag.end(); ++iter){
+        
+        // Get Original ETag as well.
+        
+        IterwxS = FilenameETagOriginal.find(iter->first);
+        
+        if (iter->first.IsEmpty()){
+            continue;
+        }
+        
+        SettingLine = iter->first + wxT("|") + iter->second + wxT("|") + IterwxS->second;
+        
+        ETagDBFile.InsertLine(SettingLine, LineSeek);
+        
+        LineSeek++;
+        
+    }
+    
+    ETagDBFile.Write();
+    
+    NeedsWrite = FALSE;
+    
+    // Unlock.
+    
+    ProcessLock->unlock();
+    
+    return TRUE;
+    
 }
 
 bool ETagDB::LoadETagDB(){
-
-       // Lock or wait if it is already locked.
-       
-       ProcessLock->lock();
-       
-       // Load the ETag database.
-       
-       wxString AccountETagDB;
-       wxString AccountDirPath;
-       
+    
+    // Lock or wait if it is already locked.
+    
+    ProcessLock->lock();
+    
+    // Load the ETag database.
+    
+    wxString AccountETagDB;
+    wxString AccountDirPath;
+    
 #if defined(__HAIKU__)
     
     //preffilename = wxT("noo");
-
+    
 #elif defined(__WIN32__)
-
-       AccountDirPath = GetAccountDir(AccountDir, FALSE);
-
-       AccountETagDB = AccountDirPath;
-       AccountETagDB.Append(wxT("\\etag.db"));
-
+    
+    AccountDirPath = GetAccountDir(AccountDir, FALSE);
+    
+    AccountETagDB = AccountDirPath;
+    AccountETagDB.Append(wxT("\\etag.db"));
+    
 #else
-
-       AccountDirPath = GetAccountDir(AccountDir, bool FALSE);
-       
-       AccountETagDB = AccountDirPath;
-       AccountETagDB.Append(wxT("/etag.db"));
-
+    
+    AccountDirPath = GetAccountDir(AccountDir, FALSE);
+    
+    AccountETagDB = AccountDirPath;
+    AccountETagDB.Append(wxT("/etag.db"));
+    
 #endif
-       
-       wxTextFile ETagDBFile;
-       
-       if (wxFileExists(AccountETagDB) == FALSE){
-       
-               if (ETagDBFile.Create(AccountETagDB) == FALSE){
-                       ////ProcessLock.unlock();
-                       //ProcessLock->unlock();
-                       return FALSE;           
-               }
-       
-       } else {
-       
-               if (ETagDBFile.Open(AccountETagDB, wxConvUTF8) == FALSE){
-                       ////ProcessLock.unlock();
-                       //ProcessLock->unlock();
-                       return FALSE;
-               }
-               
-       }
-       
-       wxString wxSFilename;
-       wxString wxSValue;
-       wxString ETagContactFilename;
-       
-       for (wxStringTokenizer ETagDBLine(ETagDBFile.GetFirstLine(), wxT("|"));
-               !ETagDBFile.Eof(); ETagDBLine.SetString(ETagDBFile.GetNextLine(), wxT("|"), wxTOKEN_DEFAULT) )
-       {
-       
-               // Split the file into three.
-               
-               wxSFilename = ETagDBLine.GetNextToken();
-               
-               // Get the ETag.
-               
-               wxSValue = ETagDBLine.GetNextToken();
-               FilenameETag.insert(std::make_pair(wxSFilename, wxSValue));
-               
-               // Get the original ETag.
-       
-               wxSValue = ETagDBLine.GetNextToken();
-               wxSValue.Trim();
-               FilenameETagOriginal.insert(std::make_pair(wxSFilename, wxSValue));
-                       
-       }
-       
-       // Unlock.
-       
-       ProcessLock->unlock();
-
-       return TRUE;
-
+    
+    wxTextFile ETagDBFile;
+    
+    if (wxFileExists(AccountETagDB) == FALSE){
+        
+        if (ETagDBFile.Create(AccountETagDB) == FALSE){
+            ////ProcessLock.unlock();
+            //ProcessLock->unlock();
+            return FALSE;
+        }
+        
+    } else {
+        
+        if (ETagDBFile.Open(AccountETagDB, wxConvUTF8) == FALSE){
+            ////ProcessLock.unlock();
+            //ProcessLock->unlock();
+            return FALSE;
+        }
+        
+    }
+    
+    wxString wxSFilename;
+    wxString wxSValue;
+    wxString ETagContactFilename;
+    
+    for (wxStringTokenizer ETagDBLine(ETagDBFile.GetFirstLine(), wxT("|"));
+         !ETagDBFile.Eof(); ETagDBLine.SetString(ETagDBFile.GetNextLine(), wxT("|"), wxTOKEN_DEFAULT) )
+    {
+        
+        // Split the file into three.
+        
+        wxSFilename = ETagDBLine.GetNextToken();
+        
+        // Get the ETag.
+        
+        wxSValue = ETagDBLine.GetNextToken();
+        FilenameETag.insert(std::make_pair(wxSFilename, wxSValue));
+        
+        // Get the original ETag.
+        
+        wxSValue = ETagDBLine.GetNextToken();
+        wxSValue.Trim();
+        FilenameETagOriginal.insert(std::make_pair(wxSFilename, wxSValue));
+        
+    }
+    
+    // Unlock.
+    
+    ProcessLock->unlock();
+    
+    return TRUE;
+    
 }
 
-void ETagDB::DeleteETagDB(){ 
-
-       // Lock or wait if it is already locked.
-       
-       ProcessLock->lock();
-       
-       wxString AccountETagDB;
-       
-       // Delete the ETagDB.
-       
+void ETagDB::DeleteETagDB(){
+    
+    // Lock or wait if it is already locked.
+    
+    ProcessLock->lock();
+    
+    wxString AccountETagDB;
+    
+    // Delete the ETagDB.
+    
 #if defined(__HAIKU__)
     
     //preffilename = wxT("noo");
-
+    
 #elif defined(__WIN32__)
-
-       AccountETagDB.Clear();
-       AccountETagDB = GetAccountDir(AccountDir, FALSE);
-       AccountETagDB.Append(wxT("\\etag.db"));
-
-       wxRemoveFile(AccountETagDB);
-
+    
+    AccountETagDB.Clear();
+    AccountETagDB = GetAccountDir(AccountDir, FALSE);
+    AccountETagDB.Append(wxT("\\etag.db"));
+    
+    wxRemoveFile(AccountETagDB);
+    
 #else
-
-       AccountETagDB.Clear();
-       AccountETagDB = GetAccountDir(AccountDir, FALSE);
-       AccountETagDB.Append(wxT("/etag.db"));
-       
-       wxRemoveFile(AccountETagDB);
-
+    
+    AccountETagDB.Clear();
+    AccountETagDB = GetAccountDir(AccountDir, FALSE);
+    AccountETagDB.Append(wxT("/etag.db"));
+    
+    wxRemoveFile(AccountETagDB);
+    
 #endif
-       
-       // Unlock.
-       
-       ProcessLock->unlock();
-
+    
+    // Unlock.
+    
+    ProcessLock->unlock();
+    
 }
 
 bool ETagDB::CheckETagExists(wxString Filename){
-
-       if (FilenameETag.find(Filename) == FilenameETag.end()){
-       
-               return FALSE;
-       
-       } else {
-       
-               return TRUE;
-       
-       }       
-
+    
+    if (FilenameETag.find(Filename) == FilenameETag.end()){
+        
+        return FALSE;
+        
+    } else {
+        
+        return TRUE;
+        
+    }  
+    
 }
 
 std::map<wxString,ETagData> ETagDB::GetETagData(){
-
-       // Lock the database.
-       
-       ProcessLock->lock();
-       
-       // Go through each of the ETags and process them accordingly.
-
-       std::map<wxString,ETagData> DataSet;
-       
-       for (std::map<wxString,wxString>::iterator iter = FilenameETag.begin(); 
-        iter != FilenameETag.end(); ++iter){
-       
-               std::map<wxString,wxString>::iterator origiter = FilenameETagOriginal.find(iter->first);
-       
-               ETagData etd;
-               
-               etd.ETagValue = iter->second;
-               etd.ETagOrigValue = origiter->second;
-               
-               DataSet.insert(std::make_pair(iter->first, etd));
-       
-       }
-       
-       // Unlock the database.
-
-       ProcessLock->unlock();
-       
-       return DataSet;
-
+    
+    // Lock the database.
+    
+    ProcessLock->lock();
+    
+    // Go through each of the ETags and process them accordingly.
+    
+    std::map<wxString,ETagData> DataSet;
+    
+    for (std::map<wxString,wxString>::iterator iter = FilenameETag.begin(); 
+         iter != FilenameETag.end(); ++iter){
+        
+        std::map<wxString,wxString>::iterator origiter = FilenameETagOriginal.find(iter->first);
+        
+        ETagData etd;
+        
+        etd.ETagValue = iter->second;
+        etd.ETagOrigValue = origiter->second;
+        
+        DataSet.insert(std::make_pair(iter->first, etd));
+        
+    }
+    
+    // Unlock the database.
+    
+    ProcessLock->unlock();
+    
+    return DataSet;
+    
 }
 
 bool ETagDB::GetWriteStatus(){
-
-       return NeedsWrite;
-
+    
+    return NeedsWrite;
+    
 }
\ No newline at end of file
index a75df52..b81af16 100644 (file)
 #define ETAG_H
 
 struct ETagData{
-
-       wxString ETagValue;
-       wxString ETagOrigValue;
-       int ETagStatus;
-
+    
+    wxString ETagValue;
+    wxString ETagOrigValue;
+    int ETagStatus;
+    
 };
 
 class ETagDB{
 public:
-       //ETagDB(wxString AccountDir);
-       ETagDB() {};
-       ~ETagDB();
-
-       // ETag functions.
-       
-       void AddETag(wxString Filename, wxString ETag, wxString ETagOriginal);
-       void RemoveETag(wxString Filename);
-       void UpdateETag(wxString Filename, wxString ETag);
-       void UpdateETag(wxString Filename, wxString ETag, wxString ETagOriginal);
-       std::map<wxString, wxString>* GetFilenamePointer();
-       wxString GetETag(wxString Filename);
-       wxString GetETagOriginal(wxString Filename);
-       bool CheckETagExists(wxString Filename);
-       //boost::mutex ProcessLock;
-       
-       // ETagDB functions.
-       
-       bool WriteETagDB();
-       bool LoadETagDB();
-       void DeleteETagDB();
-       void SetupDB(wxString AccountDirFilename);
-       
-       bool GetWriteStatus();
-       std::map<wxString, ETagData> GetETagData();
-       //void *ProcessLock = new std::mutex;
-
+    //ETagDB(wxString AccountDir);
+    ETagDB() {};
+    ~ETagDB();
+    
+    // ETag functions.
+    
+    void AddETag(wxString Filename, wxString ETag, wxString ETagOriginal);
+    void RemoveETag(wxString Filename);
+    void UpdateETag(wxString Filename, wxString ETag);
+    void UpdateETag(wxString Filename, wxString ETag, wxString ETagOriginal);
+    std::map<wxString, wxString>* GetFilenamePointer();
+    wxString GetETag(wxString Filename);
+    wxString GetETagOriginal(wxString Filename);
+    bool CheckETagExists(wxString Filename);
+    //boost::mutex ProcessLock;
+    
+    // ETagDB functions.
+    
+    bool WriteETagDB();
+    bool LoadETagDB();
+    void DeleteETagDB();
+    void SetupDB(wxString AccountDirFilename);
+    
+    bool GetWriteStatus();
+    std::map<wxString, ETagData> GetETagData();
+    //void *ProcessLock = new std::mutex;
+    
 private:
-       std::map<wxString, wxString> FilenameETag;
-       std::map<wxString, wxString> FilenameETagOriginal;
-       bool NeedsWrite = FALSE;
-       bool MarkedDeleted = FALSE;
-       wxString AccountDir;
-       std::mutex *ProcessLock = new std::mutex();     
+    std::map<wxString, wxString> FilenameETag;
+    std::map<wxString, wxString> FilenameETagOriginal;
+    bool NeedsWrite = FALSE;
+    bool MarkedDeleted = FALSE;
+    wxString AccountDir;
+    std::mutex *ProcessLock = new std::mutex();
 };
 
 /*
-class ETagDB2{
-public:
+ class ETagDB2{
+ public:
        ETagDB2() {} ;
        ~ETagDB2() {};
        
@@ -77,16 +77,15 @@ public:
        void DeleteETagDB();
        
        bool GetWriteStatus();
-private:
+ private:
        std::map<wxString, wxString> FilenameETag;
        std::map<wxString, wxString> FilenameETagOriginal;
        bool NeedsWrite = FALSE;
        bool MarkedDeleted = FALSE;
-       /*
        std::mutex ProcessLock;
        wxString AccountDir;
-};
-*/
+ };
+ */
 
 
 #endif
\ No newline at end of file
index 4dc720d..5db593c 100644 (file)
@@ -1,45 +1,83 @@
 #include <wx/wx.h>
 
 wxString GetMIME(wxString FilenameInc){
-
-       wxString MIMEResult;
-
-#ifdef __WIN32__
-
-#include <urlmon.h>
-
-       /*char *;
-       unsigned long Buffersize;
-       FindMimeFromData(NULL, NULL, , , NULL, FMFD_DEFAULT, , 0);*/
-
+    
+    wxString MIMEResult;
+    
+    // Check if file exists first before doing anything with it.
+    
+    if (!wxFileExists(FilenameInc)){
+        
+        // File doesn't exist so return.
+        
+        wxMessageBox(_("The file with the filename given doesn't exist."), _("Error opening picture/audio file"), wxICON_ERROR);
+        return wxEmptyString;
+        
+    }
+    
+#if defined(__WIN32__)
+    
+    // TODO: Sort out Win32.
+    
+#elif defined(__APPLE__)
+    
+#include <stdio.h>
+    
+    FILE *MIMEIn;
+    
+    char MIMEData[512];
+    
+    // Build Command Line.
+    
+    wxString FilenameIncEscaped = FilenameInc;
+    FilenameIncEscaped.Replace(wxT(" "), wxT("\\ "));
+    wxString FileCommandLine;
+    
+    FileCommandLine.Append("file -b --mime-type ");
+    FileCommandLine.Append(FilenameIncEscaped);
+    
+    if (!(MIMEIn = popen(FileCommandLine.mb_str(), "r"))){
+        
+        wxMessageBox(_("The file with the filename given doesn't exist."), _("Error opening picture/audio file"), wxICON_ERROR);
+        return wxEmptyString;
+        
+    }
+    
+    while(fgets(MIMEData, sizeof(MIMEData), MIMEIn) != NULL){
+        MIMEResult.Append(wxString::FromUTF8(MIMEData));
+    }
+    pclose(MIMEIn);
+    
+    MIMEResult.Trim();
+    
 #else
-
+    
 #include <magic.h>
-
-       const char *MIMEType;
-       magic_t MagicCookie = magic_open(MAGIC_MIME);
-       magic_setflags(MagicCookie, MAGIC_MIME_TYPE);
-
-       if (!MagicCookie){
-
-               wxMessageBox(_("An error occured with the support library for getting the picture/audio type."), _("Error opening picture/audio file"), wxICON_ERROR);
-               return;
-
-       }
-
-       if (magic_load(MagicCookie, NULL) != 0) {
-
-               wxMessageBox(_("An error occured whilst determining the picture/audio type."), _("Error opening picture/audio file"), wxICON_ERROR);
-               return;
-
-       }
-
-       MIMEType = magic_file(MagicCookie, FilenameInc.mb_str());
-       MIMEResult = wxString::FromUTF8(MIMEType);
-       magic_close(MagicCookie);
-
+    
+    const char *MIMEType;
+    magic_t MagicCookie = magic_open(MAGIC_MIME);
+    magic_setflags(MagicCookie, MAGIC_MIME_TYPE);
+    
+    if (!MagicCookie){
+        
+        wxMessageBox(_("An error occured with the support library for getting the picture/audio type."), _("Error opening picture/audio file"), wxICON_ERROR);
+        return wxEmptyString;
+        
+    }
+    
+    if (magic_load(MagicCookie, NULL) != 0) {
+        
+        wxMessageBox(_("An error occured whilst determining the picture/audio type."), _("Error opening picture/audio file"), wxICON_ERROR);
+        return wxEmptyString;
+        
+    }
+    
+    MIMEType = magic_file(MagicCookie, FilenameInc.mb_str());
+    MIMEResult = wxString::FromUTF8(MIMEType);
+    magic_close(MagicCookie);
+    
 #endif
-
-       return MIMEResult;
-
+    
+    return MIMEResult;
+    
 }
\ No newline at end of file
index 02bc920..d4ec0eb 100644 (file)
 #include "../common/dirs.h"
 
 void wxActTimer::Notify(){
-
-       frmMain *frmMainPtrProc = static_cast<frmMain*>(frmMainPtr);
-
-       wxCommandEvent shuffleevent(ACTMGR_SHUFFLE);
-
-       if (intActivityProgress == 0){
-
-               wxMemoryInputStream istream(misc_activity1_png, sizeof(misc_activity1_png));
-               wxImage misc_activity1_pngi(istream, wxBITMAP_TYPE_PNG);                
-               wxBitmap activityiconbmp(misc_activity1_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-                               
-               intActivityProgress++;
-       
-       } else if (intActivityProgress == 1){
-
-               wxMemoryInputStream istream(misc_activity2_png, sizeof(misc_activity2_png));
-               wxImage misc_activity2_pngi(istream, wxBITMAP_TYPE_PNG);
-               wxBitmap activityiconbmp(misc_activity2_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-
-               intActivityProgress++;
-       
-       } else if (intActivityProgress == 2){
-
-               wxMemoryInputStream istream(misc_activity3_png, sizeof(misc_activity3_png));
-               wxImage misc_activity3_pngi(istream, wxBITMAP_TYPE_PNG);
-               wxBitmap activityiconbmp(misc_activity3_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-
-               intActivityProgress++;
-       
-       } else if (intActivityProgress == 3){
-
-               wxMemoryInputStream istream(misc_activity4_png, sizeof(misc_activity4_png));
-               wxImage misc_activity4_pngi(istream, wxBITMAP_TYPE_PNG);
-               wxBitmap activityiconbmp(misc_activity4_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-
-               intActivityProgress++;
-       
-       } else if (intActivityProgress == 4){
-
-               wxMemoryInputStream istream(misc_activity5_png, sizeof(misc_activity5_png));
-               wxImage misc_activity5_pngi(istream, wxBITMAP_TYPE_PNG);
-               wxBitmap activityiconbmp(misc_activity5_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-
-               intActivityProgress++;
-       
-       } else if (intActivityProgress == 5){
-
-               wxMemoryInputStream istream(misc_activity6_png, sizeof(misc_activity6_png));
-               wxImage misc_activity6_pngi(istream, wxBITMAP_TYPE_PNG);
-               wxBitmap activityiconbmp(misc_activity6_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-
-               intActivityProgress++;
-       
-       } else if (intActivityProgress == 6){
-
-               wxMemoryInputStream istream(misc_activity7_png, sizeof(misc_activity7_png));
-               wxImage misc_activity7_pngi(istream, wxBITMAP_TYPE_PNG);
-               wxBitmap activityiconbmp(misc_activity7_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-
-               intActivityProgress++;
-       
-       } else if (intActivityProgress == 7){
-
-               wxMemoryInputStream istream(misc_activity8_png, sizeof(misc_activity8_png));
-               wxImage misc_activity8_pngi(istream, wxBITMAP_TYPE_PNG);
-               wxBitmap activityiconbmp(misc_activity8_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-
-               intActivityProgress++;
-       
-       } else if (intActivityProgress == 8){
-       
-               wxMemoryInputStream istream(misc_activity9_png, sizeof(misc_activity9_png));
-               wxImage misc_activity9_pngi(istream, wxBITMAP_TYPE_PNG);
-               wxBitmap activityiconbmp(misc_activity9_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-       
-               intActivityProgress++;
-       
-       } else if (intActivityProgress == 9){
-
-               wxMemoryInputStream istream(misc_activity10_png, sizeof(misc_activity10_png));
-               wxImage misc_activity10_pngi(istream, wxBITMAP_TYPE_PNG);
-               wxBitmap activityiconbmp(misc_activity10_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-       
-               intActivityProgress++;
-       
-       } else if (intActivityProgress == 10){
-       
-               wxMemoryInputStream istream(misc_activity11_png, sizeof(misc_activity11_png));
-               wxImage misc_activity11_pngi(istream, wxBITMAP_TYPE_PNG);
-               wxBitmap activityiconbmp(misc_activity11_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-       
-               intActivityProgress++;
-       
-       } else if (intActivityProgress == 11){
-       
-               wxMemoryInputStream istream(misc_activity12_png, sizeof(misc_activity12_png));
-               wxImage misc_activity12_pngi(istream, wxBITMAP_TYPE_PNG);
-               wxBitmap activityiconbmp(misc_activity12_pngi, -1);
-               bmpActivity->SetBitmap(activityiconbmp);
-       
-               intActivityProgress = 0;
-       
-       }
-       
-       wxPostEvent(frmMainPtrProc, shuffleevent);
-
+    
+    frmMain *frmMainPtrProc = static_cast<frmMain*>(frmMainPtr);
+    
+    wxCommandEvent shuffleevent(ACTMGR_SHUFFLE);
+    
+    if (intActivityProgress == 0){
+        
+        wxMemoryInputStream istream(misc_activity1_png, sizeof(misc_activity1_png));
+        wxImage misc_activity1_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity1_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress++;
+        
+    } else if (intActivityProgress == 1){
+        
+        wxMemoryInputStream istream(misc_activity2_png, sizeof(misc_activity2_png));
+        wxImage misc_activity2_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity2_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress++;
+        
+    } else if (intActivityProgress == 2){
+        
+        wxMemoryInputStream istream(misc_activity3_png, sizeof(misc_activity3_png));
+        wxImage misc_activity3_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity3_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress++;
+        
+    } else if (intActivityProgress == 3){
+        
+        wxMemoryInputStream istream(misc_activity4_png, sizeof(misc_activity4_png));
+        wxImage misc_activity4_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity4_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress++;
+        
+    } else if (intActivityProgress == 4){
+        
+        wxMemoryInputStream istream(misc_activity5_png, sizeof(misc_activity5_png));
+        wxImage misc_activity5_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity5_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress++;
+        
+    } else if (intActivityProgress == 5){
+        
+        wxMemoryInputStream istream(misc_activity6_png, sizeof(misc_activity6_png));
+        wxImage misc_activity6_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity6_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress++;
+        
+    } else if (intActivityProgress == 6){
+        
+        wxMemoryInputStream istream(misc_activity7_png, sizeof(misc_activity7_png));
+        wxImage misc_activity7_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity7_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress++;
+        
+    } else if (intActivityProgress == 7){
+        
+        wxMemoryInputStream istream(misc_activity8_png, sizeof(misc_activity8_png));
+        wxImage misc_activity8_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity8_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress++;
+        
+    } else if (intActivityProgress == 8){
+        
+        wxMemoryInputStream istream(misc_activity9_png, sizeof(misc_activity9_png));
+        wxImage misc_activity9_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity9_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress++;
+        
+    } else if (intActivityProgress == 9){
+        
+        wxMemoryInputStream istream(misc_activity10_png, sizeof(misc_activity10_png));
+        wxImage misc_activity10_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity10_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress++;
+        
+    } else if (intActivityProgress == 10){
+        
+        wxMemoryInputStream istream(misc_activity11_png, sizeof(misc_activity11_png));
+        wxImage misc_activity11_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity11_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress++;
+        
+    } else if (intActivityProgress == 11){
+        
+        wxMemoryInputStream istream(misc_activity12_png, sizeof(misc_activity12_png));
+        wxImage misc_activity12_pngi(istream, wxBITMAP_TYPE_PNG);
+        wxBitmap activityiconbmp(misc_activity12_pngi, -1);
+        bmpActivity->SetBitmap(activityiconbmp);
+        
+        intActivityProgress = 0;
+        
+    }
+    
+    wxPostEvent(frmMainPtrProc, shuffleevent);
+    
 }
 
 void wxActTimer::SetBitmap(wxStaticBitmap *bitmap)
 {
-
-       bmpActivity = bitmap;
-
+    
+    bmpActivity = bitmap;
+    
 }
 
 void wxActTimer::SetSleepBitmap(wxBitmap *SleepBitmap)
 {
-
-       SleepBitmapPtr = SleepBitmap;
-
+    
+    SleepBitmapPtr = SleepBitmap;
+    
 }
 
 void wxActTimer::StopAnimation()
 {
-
-       // Stop the icon animation.
-
-       frmMain *frmMainPtrProc = static_cast<frmMain*>(frmMainPtr);
-       
-       wxCommandEvent actstop(ACTMGR_STOP);
-       wxPostEvent(frmMainPtrProc, actstop);
-       //frmMainPtrProc->ActivityIconStop();
-
-       this->Stop();
-       bmpActivity->SetBitmap(*SleepBitmapPtr);
+    
+    // Stop the icon animation.
+    
+    frmMain *frmMainPtrProc = static_cast<frmMain*>(frmMainPtr);
+    
+    wxCommandEvent actstop(ACTMGR_STOP);
+    wxPostEvent(frmMainPtrProc, actstop);
+    //frmMainPtrProc->ActivityIconStop();
+    
+    this->Stop();
+    bmpActivity->SetBitmap(*SleepBitmapPtr);
 }
 
 void wxActTimer::StartAnimation()
 {
-
-       frmMain *frmMainPtrProc = static_cast<frmMain*>(frmMainPtr);
-       wxCommandEvent actstart(ACTMGR_START);
-       wxPostEvent(frmMainPtrProc, actstart);
-       //frmMainPtrProc->ActivityIconStart();
-       
-       this->ResetBitmap();
-       this->Start(50, FALSE);
+    
+    frmMain *frmMainPtrProc = static_cast<frmMain*>(frmMainPtr);
+    wxCommandEvent actstart(ACTMGR_START);
+    wxPostEvent(frmMainPtrProc, actstart);
+    //frmMainPtrProc->ActivityIconStart();
+    
+    this->ResetBitmap();
+    this->Start(50, FALSE);
 }
 
 void wxActTimer::ResetBitmap()
 {
-
-       intActivityProgress = 0;
-
+    
+    intActivityProgress = 0;
+    
 }
 
 void wxActTimer::SetupPointer(void *frmMainPtrIn)
 {
-
-       frmMainPtr = frmMainPtrIn;
-
+    
+    frmMainPtr = frmMainPtrIn;
+    
 }
 
 void wxActProcessTimer::Notify()
 {
-
-       // Pause the timer whilst processing to avoid problems.
-
-       this->Stop();
-
-       // Process Tasks.
-       
-       frmActivityMgr *ActMgrPtrProc = static_cast<frmActivityMgr*>(ActMgrPtr);
-       ActMgrPtrProc->ProcessTasks();
-
+    
+    // Pause the timer whilst processing to avoid problems.
+    
+    this->Stop();
+    
+    // Process Tasks.
+    
+    frmActivityMgr *ActMgrPtrProc = static_cast<frmActivityMgr*>(ActMgrPtr);
+    ActMgrPtrProc->ProcessTasks();
+    
 }
 
 void wxActProcessTimer::SetupPointers(void *ActMgr){
-
-       ActMgrPtr = ActMgr;
-
+    
+    ActMgrPtr = ActMgr;
+    
 }
 
 void wxActListProcTimer::Notify(){
-
-       // Setup Label and get task data (update SetupPointers subroutine).
-
-       this->Stop();
-       
-       for (std::map<int,int>::iterator iter = ActListPtr->begin(); 
-        iter != ActListPtr->end(); ++iter){
-        
-               // Check for any queued tasks and start one.
-               
-               if (iter->second > 4){
-                       continue;
-               }
-               
-               
-               // 0 = Queued.
-               // 1 = Processing.
-               // 2 = Failed.
-               // 3 = Stopped.
-               // 4 = Completed.
-               // 5 = Failed (UI Updated).
-               // 6 = Stopped (UI Updated).
-               // 7 = (Reserved) (UI Updated).
-               // 8 = Completed. (UI Updated). 
-               
-               std::map<int,long>::iterator LongIter = ActListUIPtr->find(iter->first);
-               std::map<int,wxString>::iterator DetailIter = ActListDetailPtr->find(iter->first);
-               
-               if (iter->second == 1){
-                               
-                       lstActivityPtr->SetItem(LongIter->second, 2, _("Processing..."));
-                       if (ActListDetailPtr->find(iter->first) != ActListDetailPtr->end()){
-                               lblDetailsPtr->SetLabel(_("Adding Contact '") + DetailIter->second + _("'..."));
-                       }
-                       //CardDAVIter->second.
-                       
-               } else if (iter->second == 2){
-               
-                       lstActivityPtr->SetItem(LongIter->second, 2, _("Failed"));
-                       iter->second = 5;
-               
-               } else if (iter->second == 3){
-
-                       lstActivityPtr->SetItem(LongIter->second, 2, _("Stopped"));
-                       iter->second = 6;
-               
-               } else if (iter->second == 4){
-
-                       lstActivityPtr->SetItem(LongIter->second, 2, _("Completed"));
-                       iter->second = 8;
-               
-               }
-               
-               // Insert a finish date.
-               
-               wxDateTime adt;
-               adt = adt.Now();
-               
-               ActListFinDTPtr->insert(std::make_pair(iter->first, adt));
-
-       }
-       
-       if (ClearupProcessed == TRUE){
-       
-               // Clear up processed items.
-               
-               // Delete the processed items.
-               
-               ClearupProcessed = FALSE;
-       
-       }
-       
-       if (*TasksActivePtr == FALSE){
-       
-               ActTimerPtr->StopAnimation();
-               lblDetailsPtr->SetLabel(_("No activity."));
-       
-       } else {
-       
-               this->Start();
-       
-       }
-
+    
+    // Setup Label and get task data (update SetupPointers subroutine).
+    
+    this->Stop();
+    
+    for (std::map<int,int>::iterator iter = ActListPtr->begin();
+         iter != ActListPtr->end(); ++iter){
+        
+        // Check for any queued tasks and start one.
+        
+        if (iter->second > 4){
+            continue;
+        }
+        
+        
+        // 0 = Queued.
+        // 1 = Processing.
+        // 2 = Failed.
+        // 3 = Stopped.
+        // 4 = Completed.
+        // 5 = Failed (UI Updated).
+        // 6 = Stopped (UI Updated).
+        // 7 = (Reserved) (UI Updated).
+        // 8 = Completed. (UI Updated).
+        
+        std::map<int,long>::iterator LongIter = ActListUIPtr->find(iter->first);
+        std::map<int,wxString>::iterator DetailIter = ActListDetailPtr->find(iter->first);
+        
+        if (iter->second == 1){
+            
+            lstActivityPtr->SetItem(LongIter->second, 2, _("Processing..."));
+            if (ActListDetailPtr->find(iter->first) != ActListDetailPtr->end()){
+                lblDetailsPtr->SetLabel(_("Adding Contact '") + DetailIter->second + _("'..."));
+            }
+            //CardDAVIter->second.
+            
+        } else if (iter->second == 2){
+            
+            lstActivityPtr->SetItem(LongIter->second, 2, _("Failed"));
+            iter->second = 5;
+            
+        } else if (iter->second == 3){
+            
+            lstActivityPtr->SetItem(LongIter->second, 2, _("Stopped"));
+            iter->second = 6;
+            
+        } else if (iter->second == 4){
+            
+            lstActivityPtr->SetItem(LongIter->second, 2, _("Completed"));
+            iter->second = 8;
+            
+        }
+        
+        // Insert a finish date.
+        
+        wxDateTime adt;
+        adt = adt.Now();
+        
+        ActListFinDTPtr->insert(std::make_pair(iter->first, adt));
+        
+    }
+    
+    if (ClearupProcessed == TRUE){
+        
+        // Clear up processed items.
+        
+        // Delete the processed items.
+        
+        ClearupProcessed = FALSE;
+        
+    }
+    
+    if (*TasksActivePtr == FALSE){
+        
+        ActTimerPtr->StopAnimation();
+        lblDetailsPtr->SetLabel(_("No activity."));
+        
+    } else {
+        
+        this->Start();
+        
+    }
+    
 }
 
-void wxActListProcTimer::SetupPointers(std::map<int,int> *ActList, std::map<int,long> *ActListUI, 
-                       std::map<int,wxString> *ActListDetail, bool *TasksActive,
-                       wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress,
-                       void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer,
-                       std::map<int,wxDateTime> *ActListFinDT){
-
-       ActListPtr = ActList;
-       ActListUIPtr = ActListUI;
-       ActListDetailPtr = ActListDetail;
-       TasksActivePtr = TasksActive;
-       lstActivityPtr = lstActivity;
-       lblDetailsPtr = lblDetails;
-       GauProgressPtr = GauProgress;
-       ActMgrPtr = ActMgr;
-       ActTimerPtr = ActTimer;
-       ActProcessTimerPtr = ActProcessTimer;
-       ActListFinDTPtr = ActListFinDT;
-
+void wxActListProcTimer::SetupPointers(std::map<int,int> *ActList, std::map<int,long> *ActListUI,
+                                       std::map<int,wxString> *ActListDetail, bool *TasksActive,
+                                       wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress,
+                                       void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer,
+                                       std::map<int,wxDateTime> *ActListFinDT){
+    
+    ActListPtr = ActList;
+    ActListUIPtr = ActListUI;
+    ActListDetailPtr = ActListDetail;
+    TasksActivePtr = TasksActive;
+    lstActivityPtr = lstActivity;
+    lblDetailsPtr = lblDetails;
+    GauProgressPtr = GauProgress;
+    ActMgrPtr = ActMgr;
+    ActTimerPtr = ActTimer;
+    ActProcessTimerPtr = ActProcessTimer;
+    ActListFinDTPtr = ActListFinDT;
+    
 }
 
 void wxActListProcTimer::EnableClearup(){
-
-       ClearupProcessed = TRUE;
-
+    
+    ClearupProcessed = TRUE;
+    
 }
 
 void wxETagProcessTimer::Notify(){
-
-       // Check each ETagDB and see if writing to file is required.
-       
-       //ETagDB* ETagDBPtr;
-       //ETagDB ETagDBCopy;
-       
-       std::map<wxString,ETagDB>::iterator ETagIter;
-       
-       for (ETagIter = ETagDBList.begin(); 
-        ETagIter != ETagDBList.end(); ++ETagIter){
-       
-               if (ETagIter->second.GetWriteStatus() == TRUE){
-               
-                       ETagIter->second.WriteETagDB();
-               
-               }
-        
-       }
-       
-
+    
+    // Check each ETagDB and see if writing to file is required.
+    
+    //ETagDB* ETagDBPtr;
+    //ETagDB ETagDBCopy;
+    
+    std::map<wxString,ETagDB>::iterator ETagIter;
+    
+    for (ETagIter = ETagDBList.begin();
+         ETagIter != ETagDBList.end(); ++ETagIter){
+        
+        if (ETagIter->second.GetWriteStatus() == TRUE){
+            
+            ETagIter->second.WriteETagDB();
+            
+        }
+        
+    }
+    
+    
 }
 
 void wxETagProcessTimer::ReloadAccounts(){
-
-       // Get the account preferences file and setup each database accordingly.
-       
-       ReloadLock.lock();
-       
-       // Stop the timer.
-
-       this->Stop();
-       ETagDBList.clear();
-       
-       wxString PrefFilename = GetUserPrefDir();       
-       
-       XABPreferences PrefData(PrefFilename);
-
-       wxString AccountName;
-       wxString AccountDir;
-       wxString AccountAddress;
-       wxString AccountUsername;
-       wxString AccountPassword;
-       wxString AccountPrefix;
-       wxString AccountType;
-
-       // Look for the account and get the friendly name for the account.
-       
-       for (int i = 0; i < PrefData.accounts.GetCount(); i++){
-       
-               AccountDir = PrefData.accounts.GetAccountDirectory(i);
-               AccountType = PrefData.accounts.GetAccountType(i);
-
-               if (AccountType == wxT("Local") || AccountType == wxT("local")){
-                       continue;
-               }
-
-               AccountDir.Trim();
-               AccountDir.Append(wxT(".carddav"));
-                       
-               ETagDB AccountDB;
-               AccountDB.SetupDB(AccountDir);
-                               
-               ETagDBList.insert(std::make_pair(AccountDir, AccountDB));
-               
-               AccountDir.clear();
-       
-       }
-       
-       //raise(SIGABRT);
-       
-       /*for (int i = 0; i < PrefData.accounts.GetCount(); i++){
-       
-               AccountDir = PrefData.accounts.GetAccountDirectory(i);
-               
-               AccountDir.Trim();
-               AccountDir.Append(wxT(".carddav"));
-       
-               //AccountPrefix = PrefData.accounts.GetAccountDirPrefix(i);
-
-               //ETagDB NewETagDB (AccountDir);
-               
-               ETagDB AccountDB;
-               AccountDB.SetupDB(AccountDir);
-               
-               //ETagDBList.insert(std::make_pair(AccountDir, Moo));
-               
-               //std::pair<wxString,ETagDB> Moo2;
-               
-               //ETagDB2 Meep;
-               
-               //ETagDBListv3.insert(std::make_pair(0,Meep));
-               
-               //ETagDBListv2.insert(std::make_pair(0, Moo));
-               
-               //ETagDBList.insert(Moo2);
-               
-               ETagDBList.insert(std::make_pair(AccountDir, AccountDB));
-               
-               //Moo55.insert(std::make_pair(wxT("Meep"), wxT("Meep")));
-               
-               //ETagDBList[AccountDir] = new ETagDB (AccountDir);
-       
-       }*/
-       
-       //ETagDB Test (AccountDir);
-       
-       //ETagDBList.insert(std::make_pair(AccountDir, Test));
-       
-       ReloadLock.unlock();
-       this->Start(15000);
-
+    
+    // Get the account preferences file and setup each database accordingly.
+    
+    ReloadLock.lock();
+    
+    // Stop the timer.
+    
+    this->Stop();
+    ETagDBList.clear();
+    
+    wxString PrefFilename = GetUserPrefDir();
+    
+    XABPreferences PrefData(PrefFilename);
+    
+    wxString AccountName;
+    wxString AccountDir;
+    wxString AccountAddress;
+    wxString AccountUsername;
+    wxString AccountPassword;
+    wxString AccountPrefix;
+    wxString AccountType;
+    
+    // Look for the account and get the friendly name for the account.
+    
+    for (int i = 0; i < PrefData.accounts.GetCount(); i++){
+        
+        AccountDir = PrefData.accounts.GetAccountDirectory(i);
+        AccountType = PrefData.accounts.GetAccountType(i);
+        
+        if (AccountDir.IsEmpty()){
+            continue;
+        }
+        
+        if (AccountType == wxT("Local") || AccountType == wxT("local")){
+            continue;
+        }
+        
+        AccountDir.Trim();
+        AccountDir.Append(wxT(".carddav"));
+        
+        ETagDB AccountDB;
+        AccountDB.SetupDB(AccountDir);
+        
+        ETagDBList.insert(std::make_pair(AccountDir, AccountDB));
+        
+        AccountDir.clear();
+        
+    }
+    
+    //raise(SIGABRT);
+    
+    /*for (int i = 0; i < PrefData.accounts.GetCount(); i++){
+     
+     AccountDir = PrefData.accounts.GetAccountDirectory(i);
+     
+     AccountDir.Trim();
+     AccountDir.Append(wxT(".carddav"));
+     
+     //AccountPrefix = PrefData.accounts.GetAccountDirPrefix(i);
+     
+     //ETagDB NewETagDB (AccountDir);
+     
+     ETagDB AccountDB;
+     AccountDB.SetupDB(AccountDir);
+     
+     //ETagDBList.insert(std::make_pair(AccountDir, Moo));
+     
+     //std::pair<wxString,ETagDB> Moo2;
+     
+     //ETagDB2 Meep;
+     
+     //ETagDBListv3.insert(std::make_pair(0,Meep));
+     
+     //ETagDBListv2.insert(std::make_pair(0, Moo));
+     
+     //ETagDBList.insert(Moo2);
+     
+     ETagDBList.insert(std::make_pair(AccountDir, AccountDB));
+     
+     //Moo55.insert(std::make_pair(wxT("Meep"), wxT("Meep")));
+     
+     //ETagDBList[AccountDir] = new ETagDB (AccountDir);
+     
+     }*/
+    
+    //ETagDB Test (AccountDir);
+    
+    //ETagDBList.insert(std::make_pair(AccountDir, Test));
+    
+    ReloadLock.unlock();
+    this->Start(15000);
+    
 }
 
 ETagDB* wxETagProcessTimer::GetPointer(wxString AccountName){
-
-       ETagDB *ETagDBPtr = NULL;
-
-       std::map<wxString,ETagDB>::iterator ETagIter;
-
-       ETagIter = ETagDBList.find(AccountName);
-
-       if (ETagIter != ETagDBList.end()){
-       
-               ETagDBPtr = &ETagIter->second;
-       
-       }
-
-       return ETagDBPtr;
-
+    
+    ETagDB *ETagDBPtr = NULL;
+    
+    std::map<wxString,ETagDB>::iterator ETagIter;
+    
+    ETagIter = ETagDBList.find(AccountName);
+    
+    if (ETagIter != ETagDBList.end()){
+        
+        ETagDBPtr = &ETagIter->second;
+        
+    }
+    
+    return ETagDBPtr;
+    
 }
 
 void wxContactFileMonitorTimer::Notify(){
-
-       if (Filename.IsEmpty()){
-       
-               return;
-       
-       }
-
-       wxFileName FileCheck(Filename);
-       wxDateTime CurrentDateTime;
-       
-       CurrentDateTime = FileCheck.GetModificationTime();
-
-       if (FileDateTime != CurrentDateTime){
-       
-               // The dates & times of the file are different.
-               // Send an event to notify the user of this change.
-               
-               wxCommandEvent dateevent(wxEVT_COMMAND_BUTTON_CLICKED);
-               wxPostEvent(frmCEPtr, dateevent);
-       
-       }
-
+    
+    if (Filename.IsEmpty()){
+        
+        return;
+        
+    }
+    
+    wxFileName FileCheck(Filename);
+    wxDateTime CurrentDateTime;
+    
+    CurrentDateTime = FileCheck.GetModificationTime();
+    
+    if (FileDateTime != CurrentDateTime){
+        
+        // The dates & times of the file are different.
+        // Send an event to notify the user of this change.
+        
+        wxCommandEvent dateevent(wxEVT_COMMAND_BUTTON_CLICKED);
+        wxPostEvent(frmCEPtr, dateevent);
+        
+    }
+    
 }
 
 void wxContactFileMonitorTimer::SetFilename(wxString FilenameInc){
-
-       Filename = FilenameInc;
-       
-       wxFileName FileCheck(Filename);
-       FileDateTime = FileCheck.GetModificationTime();
-
+    
+    Filename = FilenameInc;
+    
+    wxFileName FileCheck(Filename);
+    FileDateTime = FileCheck.GetModificationTime();
+    
 }
 
 void wxContactFileMonitorTimer::SetupPointers(frmContactEditor *frmCEPtrInc){
-
-       frmCEPtr = frmCEPtrInc;
-
+    
+    frmCEPtr = frmCEPtrInc;
+    
 }
 
 void wxContactFileMonitorTimer::UpdateTimestamp(){
-
-       wxFileName FileCheck(Filename);
-       FileDateTime = FileCheck.GetModificationTime();
-
+    
+    wxFileName FileCheck(Filename);
+    FileDateTime = FileCheck.GetModificationTime();
+    
 }
 
 void wxContactWindowMonitor::Notify(){
-
-       // Look through the list of windows and see if any have
-       // closed. IF they have closed then delete and free the
-       // memory (also delete from the map).
-       
-       /*for(std::map<wxString, void*>::iterator iter = ContactWindowListPtr->begin();
-       iter != ContactWindowListPtr->end(); iter++){
-       
-               frmContact *ContactPtr = (frmContact*)iter->second;
-               
-               // Check if open.
-               
-               if (
-               
-               // Delete the form.
-               
-               // Delete the data from the map.
-       
-       }*/
-
+    
+    // Look through the list of windows and see if any have
+    // closed. IF they have closed then delete and free the
+    // memory (also delete from the map).
+    
+    /*for(std::map<wxString, void*>::iterator iter = ContactWindowListPtr->begin();
+     iter != ContactWindowListPtr->end(); iter++){
+     
+     frmContact *ContactPtr = (frmContact*)iter->second;
+     
+     // Check if open.
+     
+     if (
+     
+     // Delete the form.
+     
+     // Delete the data from the map.
+     
+     }*/
+    
 }
 
 void wxContactWindowMonitor::SetupPointers(std::map<wxString, void*> *ContactWindowListPtrInc){
-
-       ContactWindowListPtr = ContactWindowListPtrInc;
-
+    
+    ContactWindowListPtr = ContactWindowListPtrInc;
+    
 }
 
 void wxAccountSyncTimer::Notify(){
-
-       frmActivityMgr *ActMgrPtrProc = static_cast<frmActivityMgr*>(frmActMgrPtr);
-
-       // Disable the timer. (Don't go updating unless needed).
-       
-       this->Stop();
-       
-       if (ActMgrPtrProc->GetTaskStatus(intTaskID) < 2){
-       
-               this->Start();
-               return;
-       
-       }
-       
-       // Add task to the activity manager.
-       
-       intTaskID = ActMgrPtrProc->AddTask(3, wxT(""), AccName, 
-                       wxT(""), wxT(""), wxT(""), wxT(""));
-       
-       // Go to sleep and wait for the task to be completed.
-       
-       // Enable the timer as we are now finished syncronising.
-       
-       this->Start();
-       
+    
+    frmActivityMgr *ActMgrPtrProc = static_cast<frmActivityMgr*>(frmActMgrPtr);
+    
+    // Disable the timer. (Don't go updating unless needed).
+    
+    this->Stop();
+    
+    if (ActMgrPtrProc->GetTaskStatus(intTaskID) < 2){
+        
+        this->Start();
+        return;
+        
+    }
+    
+    // Add task to the activity manager.
+    
+    intTaskID = ActMgrPtrProc->AddTask(3, wxT(""), AccName, 
+                                       wxT(""), wxT(""), wxT(""), wxT(""));
+    
+    // Go to sleep and wait for the task to be completed.
+    
+    // Enable the timer as we are now finished syncronising.
+    
+    this->Start();
+    
 }
 
 void wxAccountSyncTimer::SetupData(wxString AccNameInc,
-       wxString AccNameFullInc){
-
-       // Set the account name.
-               
-       AccName = AccNameInc;
-       AccNameFull = AccNameFullInc;
-
+                                   wxString AccNameFullInc){
+    
+    // Set the account name.
+    
+    AccName = AccNameInc;
+    AccNameFull = AccNameFullInc;
+    
 }
 
 void wxAccountSyncTimer::SetupPointers(void *frmMainPtrInc, 
-       void *frmActMgrPtrInc, ETagDB *ETagDBPtrInc){
-
-       // Set the pointers.
-       
-       frmMainPtr = frmMainPtrInc;
-       frmActMgrPtr = frmActMgrPtrInc;
-       ETagDBPtr = ETagDBPtrInc;
-
+                                       void *frmActMgrPtrInc, ETagDB *ETagDBPtrInc){
+    
+    // Set the pointers.
+    
+    frmMainPtr = frmMainPtrInc;
+    frmActMgrPtr = frmActMgrPtrInc;
+    ETagDBPtr = ETagDBPtrInc;
+    
 }
 
 void SleepFor(unsigned long longSleepNanoSecs){
-
+    
 #ifdef __WIN32__
-       ::Sleep((longSleepNanoSecs / 1000000));
+    ::Sleep((longSleepNanoSecs / 1000000));
 #elif __HAIKU__
-
+    
 #else
-
-       timespec n1, n2;
-
-       n1.tv_sec = 0;
-       n1.tv_nsec = longSleepNanoSecs;
-
-       nanosleep(&n1, &n2);
-
+    
+    timespec n1, n2;
+    
+    n1.tv_sec = 0;
+    n1.tv_nsec = longSleepNanoSecs;
+    
+    nanosleep(&n1, &n2);
+    
 #endif
-
+    
 }
\ No newline at end of file
index 1478948..f9c6902 100644 (file)
@@ -2,6 +2,7 @@
 #include <wx/timer.h>
 #include <wx/wx.h>
 #include <mutex>
+#include <atomic>
 #include "../frmActivityMgr.h"
 #include "../contacteditor/frmContactEditor.h"
 #include "etag.h"
@@ -14,12 +15,12 @@ struct frmContactEditor;
 
 class wxActTimer : public wxTimer
 {
-       private:
-               int intActivityProgress = 0;
-               wxStaticBitmap *bmpActivity;
-               wxBitmap *SleepBitmapPtr;
-               void *frmMainPtr;
-       public:
+private:
+    int intActivityProgress = 0;
+    wxStaticBitmap *bmpActivity;
+    wxBitmap *SleepBitmapPtr;
+    void *frmMainPtr;
+public:
     wxActTimer():wxTimer()
     {
     }
@@ -30,84 +31,84 @@ class wxActTimer : public wxTimer
     void StopAnimation();
     void SetSleepBitmap(wxBitmap *SleepBitmap);
     void SetupPointer(void *frmMainPtrIn);
-
+    
 };
 
 class wxActProcessTimer : public wxTimer
 {
-
-       private:
-               int intActivityProgress = 0;
-               wxStaticBitmap *bmpActivity;
-               void *ActMgrPtr;
-       public:
+    
+private:
+    int intActivityProgress = 0;
+    wxStaticBitmap *bmpActivity;
+    void *ActMgrPtr;
+public:
     wxActProcessTimer():wxTimer()
     {
     }
     void Notify();
     void SetupPointers(void *ActMgr);
-
+    
 };
 
 class wxActListProcTimer : public wxTimer
 {
-
-       private:
-               std::map<int,int> *ActListPtr;
-               std::map<int,long> *ActListUIPtr;
-               std::map<int,wxString> *ActListDetailPtr;
-               wxListCtrl *lstActivityPtr;
-               wxStaticText *lblDetailsPtr;
-               bool *TasksActivePtr;
-               wxGauge *GauProgressPtr;
-               void *ActMgrPtr;
-               int intActivityTotal = 0;
-               int intActivityCompleted = 0;
-               wxActTimer *ActTimerPtr;
-               wxActProcessTimer *ActProcessTimerPtr;
-               std::map<int,wxDateTime> *ActListFinDTPtr;
-               bool ClearupProcessed = FALSE;
-       public:
+    
+private:
+    std::map<int,int> *ActListPtr;
+    std::map<int,long> *ActListUIPtr;
+    std::map<int,wxString> *ActListDetailPtr;
+    wxListCtrl *lstActivityPtr;
+    wxStaticText *lblDetailsPtr;
+    bool *TasksActivePtr;
+    wxGauge *GauProgressPtr;
+    void *ActMgrPtr;
+    int intActivityTotal = 0;
+    int intActivityCompleted = 0;
+    wxActTimer *ActTimerPtr;
+    wxActProcessTimer *ActProcessTimerPtr;
+    std::map<int,wxDateTime> *ActListFinDTPtr;
+    bool ClearupProcessed = FALSE;
+public:
     wxActListProcTimer():wxTimer()
     {
     }
     void Notify();
-    void SetupPointers(std::map<int,int> *ActList, std::map<int,long> *ActListUI, 
-                       std::map<int,wxString> *ActListDetail, bool *TasksActive,
-                       wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress,
-                       void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer,
-                       std::map<int,wxDateTime> *ActListFinDT);
+    void SetupPointers(std::map<int,int> *ActList, std::map<int,long> *ActListUI,
+                       std::map<int,wxString> *ActListDetail, bool *TasksActive,
+                       wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress,
+                       void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer,
+                       std::map<int,wxDateTime> *ActListFinDT);
     void EnableClearup();
-
+    
 };
 
 class wxETagProcessTimer : public wxTimer
 {
-       private:
-               int intActivityProgress = 0;
-               std::map<wxString,ETagDB> ETagDBList;
-               //std::map<int,ETagDB2> ETagDBListv3;
-               std::mutex ReloadLock;
-       public:
+private:
+    int intActivityProgress = 0;
+    std::map<wxString,ETagDB> ETagDBList;
+    //std::map<int,ETagDB2> ETagDBListv3;
+    std::mutex ReloadLock;
+public:
     wxETagProcessTimer():wxTimer()
     {
-       ReloadAccounts();
+        ReloadAccounts();
     }
     void Notify();
     ETagDB* GetPointer(wxString Filename);
     void ReloadAccounts();
     //void SetupPointers(frmActivityMgr *ActMgr);
-
+    
 };
 
 class wxContactFileMonitorTimer : public wxTimer
 {
-       private:
-               bool FileStatus = FALSE;
-               wxString Filename;
-               frmContactEditor *frmCEPtr;
-               wxDateTime FileDateTime;
-       public:
+private:
+    bool FileStatus = FALSE;
+    wxString Filename;
+    frmContactEditor *frmCEPtr;
+    wxDateTime FileDateTime;
+public:
     wxContactFileMonitorTimer():wxTimer()
     {
     }
@@ -119,9 +120,9 @@ class wxContactFileMonitorTimer : public wxTimer
 
 class wxContactWindowMonitor : public wxTimer
 {
-       private:
-               std::map<wxString, void*> *ContactWindowListPtr;
-       public:
+private:
+    std::map<wxString, void*> *ContactWindowListPtr;
+public:
     wxContactWindowMonitor():wxTimer()
     {
     }
@@ -131,22 +132,22 @@ class wxContactWindowMonitor : public wxTimer
 
 class wxAccountSyncTimer : public wxTimer
 {
-       private:
-               wxString AccName;
-               wxString AccNameFull;
-               void *frmMainPtr;
-               void *frmActMgrPtr;
-               ETagDB *ETagDBPtr;
-               int intTaskID;
-       public:
+private:
+    wxString AccName;
+    wxString AccNameFull;
+    void *frmMainPtr;
+    void *frmActMgrPtr;
+    ETagDB *ETagDBPtr;
+    int intTaskID;
+public:
     wxAccountSyncTimer():wxTimer()
     {
     }
     void Notify();
     void SetupData(wxString AccNameInc, wxString AccNameFull);
     void SetupPointers(void *frmMainPtrInc, 
-       void *frmACtMgrPtr, ETagDB *ETagDBPtrInc);
-       
+                       void *frmACtMgrPtr, ETagDB *ETagDBPtrInc);
+    
 };
 
 void SleepFor(unsigned long longSleepNanoSecs);
index 104035e..4ff8d1d 100644 (file)
@@ -2,47 +2,51 @@
 
 wxString GenerateUUID()
 {
-
+    
 #if defined(__WIN32__)
-       UUID UUIDData;
-       UuidCreate(&UUIDData);
-       wchar_t* UUIDStr = 0;
-       UuidToString(&UUIDData, (RPC_WSTR*)&UUIDStr);
-       wxString Result(UUIDStr);
+    UUID UUIDData;
+    UuidCreate(&UUIDData);
+    wchar_t* UUIDStr = 0;
+    UuidToString(&UUIDData, (RPC_WSTR*)&UUIDStr);
+    wxString Result(UUIDStr);
 #elif defined(__HAIKU__)
-
+    
+#elif defined(__APPLE__)
+    
+    wxString Result;
+    
 #else
-
+    
 #include <ossp/uuid++.hh>
-
-       uuid_t *uuid;
-       uuid_create(&uuid);
-       char *strdata;
-       
-       //strdata = ;
-       
-       strdata = NULL;
-       
-       uuid_make(uuid, UUID_MAKE_V4);
-       uuid_export(uuid, UUID_FMT_STR, &strdata, NULL);
-       uuid_destroy(uuid);
-       
-       wxString Result = wxString::FromUTF8(strdata);
-
-       delete strdata;
-       strdata = NULL;
-       
+    
+    uuid_t *uuid;
+    uuid_create(&uuid);
+    char *strdata;
+    
+    //strdata = ;
+    
+    strdata = NULL;
+    
+    uuid_make(uuid, UUID_MAKE_V4);
+    uuid_export(uuid, UUID_FMT_STR, &strdata, NULL);
+    uuid_destroy(uuid);
+    
+    wxString Result = wxString::FromUTF8(strdata);
+    
+    delete strdata;
+    strdata = NULL;
+    
 #endif
-
-       return Result;
-
+    
+    return Result;
+    
 }
 
 bool CheckUUID(wxString UUIDInc)
 {
-
-       bool Result = FALSE;
-       
-       return Result;
-
+    
+    bool Result = FALSE;
+    
+    return Result;
+    
 }
\ No newline at end of file
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
index c352b82..b9ae291 100644 (file)
@@ -39,7 +39,7 @@
 #include "contacteditor/frmContactEditor.h"
 #include "import/import.h"
 #include "export/export.h"
-#include "widgets/XABAccountView2.h"
+#include "widgets/XABAccountView.h"
 
 #include "version.h"
 
@@ -70,362 +70,363 @@ DEFINE_EVENT_TYPE(GETSELECTEDLIST);
 DEFINE_EVENT_TYPE(SYNCACCOUNT);
 
 BEGIN_EVENT_TABLE(frmMain, wxFrame)
-  EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, frmMain::ConflictResolution)
-  EVT_COMMAND(wxID_ANY, CE_UPDATECONTACTLIST, frmMain::UpdateContactList)
-  EVT_COMMAND(wxID_ANY, CE_UPDATEACCOUNTLIST, frmMain::UpdateAccountList)
-  EVT_COMMAND(wxID_ANY, SE_UPDATECONTACTNOTIF, frmMain::UpdateSearchContactLists)
-  EVT_COMMAND(wxID_ANY, CE_OPENCONTACT, frmMain::OpenContactInfo)
-  EVT_COMMAND(wxID_ANY, CE_EDITCONTACT, frmMain::ShowContactEditorEdit)
-  EVT_COMMAND(wxID_ANY, CE_REVEALCONTACT, frmMain::RevealContact)
-  EVT_COMMAND(wxID_ANY, CE_REMOVESEARCH, frmMain::RemoveContactsWindowPointer)
-  EVT_COMMAND(wxID_ANY, SYNC_EMPTYSERVER, frmMain::EmptyServerDialog)
-  EVT_COMMAND(wxID_ANY, ACTMGR_START, frmMain::ActivityIconStart)
-  EVT_COMMAND(wxID_ANY, ACTMGR_SHUFFLE, frmMain::ActivityIconShuffle)
-  EVT_COMMAND(wxID_ANY, ACTMGR_STOP, frmMain::ActivityIconStop)
-  EVT_COMMAND(wxID_ANY, WINDOW_ADD, frmMain::WindowAdd)
-  EVT_COMMAND(wxID_ANY, WINDOW_EDIT, frmMain::WindowEdit)
-  EVT_COMMAND(wxID_ANY, WINDOW_CLOSE, frmMain::WindowDelete)
-  EVT_COMMAND(wxID_ANY, CONNSTAT_UPDATE, frmMain::UpdateConnectionStatus)
-  EVT_COMMAND(wxID_ANY, INVALIDSSLCERT, frmMain::InvalidSSLCertificate)
-  EVT_COMMAND(wxID_ANY, GETSELECTEDLIST, frmMain::GetSelectedList)
-  EVT_COMMAND(wxID_ANY, SYNCACCOUNT, frmMain::SyncAccount)
+EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, frmMain::ConflictResolution)
+EVT_COMMAND(wxID_ANY, CE_UPDATECONTACTLIST, frmMain::UpdateContactList)
+EVT_COMMAND(wxID_ANY, CE_UPDATEACCOUNTLIST, frmMain::UpdateAccountList)
+EVT_COMMAND(wxID_ANY, SE_UPDATECONTACTNOTIF, frmMain::UpdateSearchContactLists)
+EVT_COMMAND(wxID_ANY, CE_OPENCONTACT, frmMain::OpenContactInfo)
+EVT_COMMAND(wxID_ANY, CE_EDITCONTACT, frmMain::ShowContactEditorEdit)
+EVT_COMMAND(wxID_ANY, CE_REVEALCONTACT, frmMain::RevealContact)
+EVT_COMMAND(wxID_ANY, CE_REMOVESEARCH, frmMain::RemoveContactsWindowPointer)
+EVT_COMMAND(wxID_ANY, SYNC_EMPTYSERVER, frmMain::EmptyServerDialog)
+EVT_COMMAND(wxID_ANY, ACTMGR_START, frmMain::ActivityIconStart)
+EVT_COMMAND(wxID_ANY, ACTMGR_SHUFFLE, frmMain::ActivityIconShuffle)
+EVT_COMMAND(wxID_ANY, ACTMGR_STOP, frmMain::ActivityIconStop)
+EVT_COMMAND(wxID_ANY, WINDOW_ADD, frmMain::WindowAdd)
+EVT_COMMAND(wxID_ANY, WINDOW_EDIT, frmMain::WindowEdit)
+EVT_COMMAND(wxID_ANY, WINDOW_CLOSE, frmMain::WindowDelete)
+EVT_COMMAND(wxID_ANY, CONNSTAT_UPDATE, frmMain::UpdateConnectionStatus)
+EVT_COMMAND(wxID_ANY, INVALIDSSLCERT, frmMain::InvalidSSLCertificate)
+EVT_COMMAND(wxID_ANY, GETSELECTEDLIST, frmMain::GetSelectedList)
+EVT_COMMAND(wxID_ANY, SYNCACCOUNT, frmMain::SyncAccount)
 END_EVENT_TABLE()
 
 frmMain::frmMain( wxWindow* parent )
 :
 frmMainADT( parent )
 {
-
-       // Setup the account icons.
-
-       wxMemoryInputStream astream(icons_accinet_png, sizeof(icons_accinet_png));
-       wxMemoryInputStream bstream(icons_acclocal_png, sizeof(icons_acclocal_png));
-       wxMemoryInputStream cstream(icons_accgroup_png, sizeof(icons_accgroup_png));
-       wxMemoryInputStream dstream(icons_accnone_png, sizeof(icons_accnone_png));
-
-       wxImage icons_accinet_png(astream, wxBITMAP_TYPE_PNG);
-       wxBitmap AccInet(icons_accinet_png, -1);
-       wxIcon wxIAccInet;
-       wxIAccInet.CopyFromBitmap(AccInet);
-
-       wxImage icons_acclocal_png(bstream, wxBITMAP_TYPE_PNG);
-       wxBitmap AccNIcon(icons_acclocal_png, -1);
-       wxIcon wxIAccNIcon;
-       wxIAccNIcon.CopyFromBitmap(AccNIcon);
-
-       wxImage icons_accgroup_png(cstream, wxBITMAP_TYPE_PNG);
-       wxBitmap AccGrp(icons_accgroup_png, -1);
-       wxIcon wxIAccGrp;
-       wxIAccGrp.CopyFromBitmap(AccGrp);
-       
-       wxImage icons_accnone_png(dstream, wxBITMAP_TYPE_PNG);
-       wxBitmap AccNone(icons_accnone_png, -1);
-       wxIcon wxIAccNone;
-       wxIAccNone.CopyFromBitmap(AccNone);
-
-       AccountID = AccImgList->Add(wxIAccNIcon);
-       AccountNetID = AccImgList->Add(wxIAccInet);
-       AccountGrpID = AccImgList->Add(wxIAccGrp);
-       AccountNoneID = AccImgList->Add(wxIAccNone);
-
-       bmpIcon->SetIcon(AccImgList->GetIcon(AccountNoneID));
-
-       // Setup the status bar icons.
-       
-       // SSL icons.
-       
-       wxMemoryInputStream sslstream(icons_ssl_png, sizeof(icons_ssl_png));
-       wxMemoryInputStream sslwarningstream(icons_sslwarning_png, sizeof(icons_sslwarning_png));
-       wxMemoryInputStream nosslstream(icons_nossl_png, sizeof(icons_nossl_png));
-
-       wxImage icons_ssl_png(sslstream, wxBITMAP_TYPE_PNG);
-       imgSSL = new wxBitmap(icons_ssl_png, -1);
-
-       wxImage icons_sslwarning_png(sslwarningstream, wxBITMAP_TYPE_PNG);
-       imgSSLWarning = new wxBitmap(icons_sslwarning_png, -1);
-
-       wxImage icons_nossl_png(nosslstream, wxBITMAP_TYPE_PNG);
-       imgNoSSL = new wxBitmap(icons_nossl_png, -1);
-
-       // Activity Icon.
-
-       wxMemoryInputStream act1(icons_act1_png, sizeof(icons_act1_png));
-       wxMemoryInputStream act2(icons_act2_png, sizeof(icons_act2_png));
-       wxMemoryInputStream act3(icons_act3_png, sizeof(icons_act3_png));
-       wxMemoryInputStream act4(icons_act4_png, sizeof(icons_act4_png));
-       wxMemoryInputStream actsleep(icons_actsleep_png, sizeof(icons_actsleep_png));
-
-       wxImage icons_actsleep_png(actsleep, wxBITMAP_TYPE_PNG);
-       imgActIconSleep = new wxBitmap (icons_actsleep_png, -1);
-
-       wxImage icons_act1_png(act1, wxBITMAP_TYPE_PNG);
-       imgActIcon1 = new wxBitmap (icons_act1_png, -1);
-       wxIcon wxIAct1icon;
-       wxIAct1icon.CopyFromBitmap(*imgActIcon1);
-       
-       wxImage icons_act2_png(act2, wxBITMAP_TYPE_PNG);
-       imgActIcon2 = new wxBitmap (icons_act2_png, -1);
-       wxIcon wxIAct2icon;
-       wxIAct2icon.CopyFromBitmap(*imgActIcon2);
-       
-       wxImage icons_act3_png(act3, wxBITMAP_TYPE_PNG);
-       imgActIcon3 = new wxBitmap (icons_act3_png, -1);
-       wxIcon wxIAct3icon;
-       wxIAct3icon.CopyFromBitmap(*imgActIcon3);
-               
-       wxImage icons_act4_png(act4, wxBITMAP_TYPE_PNG);
-       imgActIcon4 = new wxBitmap (icons_act4_png, -1);
-       wxIcon wxIAct4icon;
-       wxIAct4icon.CopyFromBitmap(*imgActIcon4);
-
-       // Online/Offline icons.
-
-       wxMemoryInputStream onlinestream(icons_online_png, sizeof(icons_online_png));
-       wxMemoryInputStream offlinestream(icons_offline_png, sizeof(icons_offline_png));
-
-       wxImage icons_online_png(onlinestream, wxBITMAP_TYPE_PNG);
-       imgOnline = new wxBitmap(icons_online_png, -1);
-
-       wxImage icons_offline_png(offlinestream, wxBITMAP_TYPE_PNG);
-       imgOffline = new wxBitmap(icons_offline_png, -1);
-
-       // Setup the account view.
-       
-       AccCtrl->SetPopupControl(treAccounts);
-       AccCtrl->SetPopupMaxHeight(175);
-       AccCtrl->SetPopupMinWidth(250);
-       treAccounts->AssignImageList(AccImgList);
-       //bmpIcon->Hide();
-       wxRect AccTextCtrlSize = AccCtrl->GetTextRect();
-
-       /*wxStaticBitmap* BeepBoop = new wxStaticBitmap(AccCtrl, wxID_ANY, wxNullBitmap, wxPoint(AccTextCtrlSize.GetX() + 3, AccTextCtrlSize.GetY() + 2), wxDefaultSize, 0);
-
-       icons_accgroup_png.SetMask(new wxMask(icons_accgroup_png, wxSystemSettings::GetColour(wxSYS_COLOUR_BACKGROUND)));
-
-       BeepBoop->SetBackgroundColour(AccCtrl->GetBackgroundColour());
-       BeepBoop->SetBitmap(icons_accgroup_png);*/
-
-       //szrContactList->Insert(0, XABV2, 1, wxEXPAND | wxALL, 0);
-
-       /*AccControl->UseAltPopupWindow();
-       AccControl->SetPopupControl(treAccounts);
-       AccControl->SetPopupMaxHeight(175);
-
-       treAccounts->AssignImageList(AccImgList);
-       szrContactList->Insert(0, AccControl, 1, wxEXPAND|wxALL, 0);
-       szrAccList->Add(AccIcon, 0, wxLEFT|wxTOP|wxEXPAND, 3);
-
-       */
-
-       //szrContactList->Layout();
-       //szrContactList->RecalcSizes();
-
-       wxListItem ColumnData;
-       ColumnData.SetId(0);
-       ColumnData.SetText(wxT("Name0"));
-       ColumnData.SetWidth(320);
-       lstContacts->InsertColumn(0, ColumnData);
-       
-       //Connect(wxID_ANY, ContactConflictCmdEnv,
-       //      ContactConflictEventHandler(frmMain::ConflictResolution), NULL, this);
-
-       //Connect(wxID_ANY, MyFooCommandEvent,
-       //      MyFooEventHandler(frmMain::DoSomething), NULL, this);
-
-       //Bind(ContactConflictCmdEnv, ContactConflictEventHandler(frmMain::ConflictResolution), this, wxID_ANY);
-
-       treAccounts->Connect(wxEVT_LEFT_DCLICK, wxTreeEventHandler(frmMain::LoadContactList), NULL, this);
-       treAccounts->Connect(wxEVT_TREE_SEL_CHANGED, wxTreeEventHandler(frmMain::LoadContactList), NULL, this);
-
+    
+    // Setup the account icons.
+    
+    wxMemoryInputStream astream(icons_accinet_png, sizeof(icons_accinet_png));
+    wxMemoryInputStream bstream(icons_acclocal_png, sizeof(icons_acclocal_png));
+    wxMemoryInputStream cstream(icons_accgroup_png, sizeof(icons_accgroup_png));
+    wxMemoryInputStream dstream(icons_accnone_png, sizeof(icons_accnone_png));
+    
+    wxImage icons_accinet_png(astream, wxBITMAP_TYPE_PNG);
+    wxBitmap AccInet(icons_accinet_png, -1);
+    wxIcon wxIAccInet;
+    wxIAccInet.CopyFromBitmap(AccInet);
+    
+    wxImage icons_acclocal_png(bstream, wxBITMAP_TYPE_PNG);
+    wxBitmap AccNIcon(icons_acclocal_png, -1);
+    wxIcon wxIAccNIcon;
+    wxIAccNIcon.CopyFromBitmap(AccNIcon);
+    
+    wxImage icons_accgroup_png(cstream, wxBITMAP_TYPE_PNG);
+    wxBitmap AccGrp(icons_accgroup_png, -1);
+    wxIcon wxIAccGrp;
+    wxIAccGrp.CopyFromBitmap(AccGrp);
+    
+    wxImage icons_accnone_png(dstream, wxBITMAP_TYPE_PNG);
+    wxBitmap AccNone(icons_accnone_png, -1);
+    wxIcon wxIAccNone;
+    wxIAccNone.CopyFromBitmap(AccNone);
+    
+    AccountID = AccImgList->Add(wxIAccNIcon);
+    AccountNetID = AccImgList->Add(wxIAccInet);
+    AccountGrpID = AccImgList->Add(wxIAccGrp);
+    AccountNoneID = AccImgList->Add(wxIAccNone);
+    
+    bmpIcon->SetIcon(AccImgList->GetIcon(AccountNoneID));
+    
+    // Setup the status bar icons.
+    
+    // SSL icons.
+    
+    wxMemoryInputStream sslstream(icons_ssl_png, sizeof(icons_ssl_png));
+    wxMemoryInputStream sslwarningstream(icons_sslwarning_png, sizeof(icons_sslwarning_png));
+    wxMemoryInputStream nosslstream(icons_nossl_png, sizeof(icons_nossl_png));
+    
+    wxImage icons_ssl_png(sslstream, wxBITMAP_TYPE_PNG);
+    imgSSL = new wxBitmap(icons_ssl_png, -1);
+    
+    wxImage icons_sslwarning_png(sslwarningstream, wxBITMAP_TYPE_PNG);
+    imgSSLWarning = new wxBitmap(icons_sslwarning_png, -1);
+    
+    wxImage icons_nossl_png(nosslstream, wxBITMAP_TYPE_PNG);
+    imgNoSSL = new wxBitmap(icons_nossl_png, -1);
+    
+    // Activity Icon.
+    
+    wxMemoryInputStream act1(icons_act1_png, sizeof(icons_act1_png));
+    wxMemoryInputStream act2(icons_act2_png, sizeof(icons_act2_png));
+    wxMemoryInputStream act3(icons_act3_png, sizeof(icons_act3_png));
+    wxMemoryInputStream act4(icons_act4_png, sizeof(icons_act4_png));
+    wxMemoryInputStream actsleep(icons_actsleep_png, sizeof(icons_actsleep_png));
+    
+    wxImage icons_actsleep_png(actsleep, wxBITMAP_TYPE_PNG);
+    imgActIconSleep = new wxBitmap (icons_actsleep_png, -1);
+    
+    wxImage icons_act1_png(act1, wxBITMAP_TYPE_PNG);
+    imgActIcon1 = new wxBitmap (icons_act1_png, -1);
+    wxIcon wxIAct1icon;
+    wxIAct1icon.CopyFromBitmap(*imgActIcon1);
+    
+    wxImage icons_act2_png(act2, wxBITMAP_TYPE_PNG);
+    imgActIcon2 = new wxBitmap (icons_act2_png, -1);
+    wxIcon wxIAct2icon;
+    wxIAct2icon.CopyFromBitmap(*imgActIcon2);
+    
+    wxImage icons_act3_png(act3, wxBITMAP_TYPE_PNG);
+    imgActIcon3 = new wxBitmap (icons_act3_png, -1);
+    wxIcon wxIAct3icon;
+    wxIAct3icon.CopyFromBitmap(*imgActIcon3);
+    
+    wxImage icons_act4_png(act4, wxBITMAP_TYPE_PNG);
+    imgActIcon4 = new wxBitmap (icons_act4_png, -1);
+    wxIcon wxIAct4icon;
+    wxIAct4icon.CopyFromBitmap(*imgActIcon4);
+    
+    // Online/Offline icons.
+    
+    wxMemoryInputStream onlinestream(icons_online_png, sizeof(icons_online_png));
+    wxMemoryInputStream offlinestream(icons_offline_png, sizeof(icons_offline_png));
+    
+    wxImage icons_online_png(onlinestream, wxBITMAP_TYPE_PNG);
+    imgOnline = new wxBitmap(icons_online_png, -1);
+    
+    wxImage icons_offline_png(offlinestream, wxBITMAP_TYPE_PNG);
+    imgOffline = new wxBitmap(icons_offline_png, -1);
+    
+    // Setup the account view.
+    
+    AccCtrl->SetPopupControl(treAccounts);
+    AccCtrl->SetPopupMaxHeight(175);
+    AccCtrl->SetPopupMinWidth(250);
+    treAccounts->AssignImageList(AccImgList);
+    //bmpIcon->Hide();
+    wxRect AccTextCtrlSize = AccCtrl->GetTextRect();
+    
+    /*wxStaticBitmap* BeepBoop = new wxStaticBitmap(AccCtrl, wxID_ANY, wxNullBitmap, wxPoint(AccTextCtrlSize.GetX() + 3, AccTextCtrlSize.GetY() + 2), wxDefaultSize, 0);
+     
+     icons_accgroup_png.SetMask(new wxMask(icons_accgroup_png, wxSystemSettings::GetColour(wxSYS_COLOUR_BACKGROUND)));
+     
+     BeepBoop->SetBackgroundColour(AccCtrl->GetBackgroundColour());
+     BeepBoop->SetBitmap(icons_accgroup_png);*/
+    
+    //szrContactList->Insert(0, XABV2, 1, wxEXPAND | wxALL, 0);
+    
+    /*AccControl->UseAltPopupWindow();
+     AccControl->SetPopupControl(treAccounts);
+     AccControl->SetPopupMaxHeight(175);
+     
+     treAccounts->AssignImageList(AccImgList);
+     szrContactList->Insert(0, AccControl, 1, wxEXPAND|wxALL, 0);
+     szrAccList->Add(AccIcon, 0, wxLEFT|wxTOP|wxEXPAND, 3);
+     
+     */
+    
+    //szrContactList->Layout();
+    //szrContactList->RecalcSizes();
+    
+    wxListItem ColumnData;
+    ColumnData.SetId(0);
+    ColumnData.SetText(wxT("Name0"));
+    ColumnData.SetWidth(320);
+    lstContacts->InsertColumn(0, ColumnData);
+    
+    //Connect(wxID_ANY, ContactConflictCmdEnv,
+    // ContactConflictEventHandler(frmMain::ConflictResolution), NULL, this);
+    
+    //Connect(wxID_ANY, MyFooCommandEvent,
+    // MyFooEventHandler(frmMain::DoSomething), NULL, this);
+    
+    //Bind(ContactConflictCmdEnv, ContactConflictEventHandler(frmMain::ConflictResolution), this, wxID_ANY);
+    
+    treAccounts->Connect(wxEVT_LEFT_DCLICK, wxTreeEventHandler(frmMain::LoadContactList), NULL, this);
+    treAccounts->Connect(wxEVT_TREE_SEL_CHANGED, wxTreeEventHandler(frmMain::LoadContactList), NULL, this);
+    
 #if defined(__HAIKU__)
-
+    
 #elif defined(__WIN32__)
-
-       int stbBottomData [4] = { -1, 8, 8, 8 };
-
+    
+    int stbBottomData [4] = { -1, 8, 8, 8 };
+    
 #else
-
-       int stbBottomData [4] = { -1, 20, 20, 20 };
-       
+    
+    int stbBottomData [4] = { -1, 20, 20, 20 };
+    
 #endif
-
-       stbBottom->SetFieldsCount(4, stbBottomData);
-       stbBottom->SetMinHeight(16);
-       
-       wxRect rectOnline;
-       wxRect rectSSL;
-       wxRect rectActivity;
-       stbBottom->GetFieldRect(1, rectOnline);
-       stbBottom->GetFieldRect(2, rectSSL);
-       stbBottom->GetFieldRect(3, rectActivity);
-
-       SSLToolTip = new wxToolTip(wxT(""));
-       
-       imgConnStatus = new wxStaticBitmap(stbBottom, wxID_ANY, wxNullBitmap, wxPoint((rectOnline.GetX()),(rectOnline.GetY())), wxDefaultSize, 0 );
-       imgConnStatus->SetBitmap(*imgOnline);
-       imgConnStatus->Connect( wxEVT_LEFT_DCLICK, wxCommandEventHandler( frmMain::ToggleConnectionStatus ), NULL, this );
-       
-       imgSSLStatus = new wxStaticBitmap(stbBottom, wxID_ANY, wxNullBitmap, wxPoint((rectSSL.GetX()),(rectSSL.GetY())), wxDefaultSize, 0 );
-       imgSSLStatus->SetBitmap(*imgNoSSL);
-       imgSSLStatus->SetToolTip(SSLToolTip);
-       imgSSLStatus->Connect( wxEVT_LEFT_DCLICK, wxCommandEventHandler( frmMain::ShowSSLCertificates ), NULL, this );
-
-       imgActivityStatus = new wxStaticBitmap(stbBottom, wxID_ANY, wxNullBitmap, wxPoint((rectActivity.GetX()),(rectActivity.GetY())), wxDefaultSize, 0);
-       imgActivityStatus->SetBitmap(*imgActIconSleep);
-       imgActivityStatus->Connect( wxEVT_LEFT_DCLICK, wxCommandEventHandler( frmMain::ShowActivityWindow ), NULL, this );
-
-       // Setup the window menu.
-       
-       // By default should be:
-       
-       // Contact windows:
-       // (none)
-       // (horizontal line)
-       // Contact editor windows:
-       // (none)
-       // (horizontal line)
-       // Search windows:
-       // (none)
-       
-       mnuContactWindows = new wxMenuItem( mnuManage, wxID_ANY, wxString( _("Contact windows:") ), wxEmptyString, wxITEM_NORMAL );
-       mnuWindow->Append( mnuContactWindows );
-
-       mnuWindow->AppendSeparator();
-
-       mnuContactEditorWindows = new wxMenuItem( mnuManage, wxID_ANY, wxString( _("Contact editor windows:") ), wxEmptyString, wxITEM_NORMAL );
-       mnuWindow->Append( mnuContactEditorWindows );
-
-       mnuWindow->AppendSeparator();
-
-       mnuSearchWindows = new wxMenuItem( mnuManage, wxID_ANY, wxString( wxT("Search windows:") ), wxEmptyString, wxITEM_NORMAL );
-       mnuWindow->Append( mnuSearchWindows );
-       
+    
+    stbBottom->SetFieldsCount(4, stbBottomData);
+    stbBottom->SetMinHeight(16);
+    
+    wxRect rectOnline;
+    wxRect rectSSL;
+    wxRect rectActivity;
+    stbBottom->GetFieldRect(1, rectOnline);
+    stbBottom->GetFieldRect(2, rectSSL);
+    stbBottom->GetFieldRect(3, rectActivity);
+    
+    SSLToolTip = new wxToolTip(wxT(""));
+    
+    imgConnStatus = new wxStaticBitmap(stbBottom, wxID_ANY, wxNullBitmap, wxPoint((rectOnline.GetX()),(rectOnline.GetY())), wxDefaultSize, 0 );
+    imgConnStatus->SetBitmap(*imgOnline);
+    imgConnStatus->Connect( wxEVT_LEFT_DCLICK, wxCommandEventHandler( frmMain::ToggleConnectionStatus ), NULL, this );
+    
+    imgSSLStatus = new wxStaticBitmap(stbBottom, wxID_ANY, wxNullBitmap, wxPoint((rectSSL.GetX()),(rectSSL.GetY())), wxDefaultSize, 0 );
+    imgSSLStatus->SetBitmap(*imgNoSSL);
+    imgSSLStatus->SetToolTip(SSLToolTip);
+    imgSSLStatus->Connect( wxEVT_LEFT_DCLICK, wxCommandEventHandler( frmMain::ShowSSLCertificates ), NULL, this );
+    
+    imgActivityStatus = new wxStaticBitmap(stbBottom, wxID_ANY, wxNullBitmap, wxPoint((rectActivity.GetX()),(rectActivity.GetY())), wxDefaultSize, 0);
+    imgActivityStatus->SetBitmap(*imgActIconSleep);
+    imgActivityStatus->Connect( wxEVT_LEFT_DCLICK, wxCommandEventHandler( frmMain::ShowActivityWindow ), NULL, this );
+    
+    // Setup the window menu.
+    
+    // By default should be:
+    
+    // Contact windows:
+    // (none)
+    // (horizontal line)
+    // Contact editor windows:
+    // (none)
+    // (horizontal line)
+    // Search windows:
+    // (none)
+    
+    mnuContactWindows = new wxMenuItem( mnuManage, wxID_ANY, wxString( _("Contact windows:") ), wxEmptyString, wxITEM_NORMAL );
+    mnuWindow->Append( mnuContactWindows );
+    
+    mnuWindow->AppendSeparator();
+    
+    mnuContactEditorWindows = new wxMenuItem( mnuManage, wxID_ANY, wxString( _("Contact editor windows:") ), wxEmptyString, wxITEM_NORMAL );
+    mnuWindow->Append( mnuContactEditorWindows );
+    
+    mnuWindow->AppendSeparator();
+    
+    mnuSearchWindows = new wxMenuItem( mnuManage, wxID_ANY, wxString( wxT("Search windows:") ), wxEmptyString, wxITEM_NORMAL );
+    mnuWindow->Append( mnuSearchWindows );
+    
 #if defined(__WIN32__)
-       
-       wxFont fontstyle;
-       fontstyle.Bold();
-
-       mnuContactWindows->SetFont(fontstyle);
-       mnuContactEditorWindows->SetFont(fontstyle);
-       mnuSearchWindows->SetFont(fontstyle);
-
+    
+    wxFont fontstyle;
+    fontstyle.Bold();
+    
+    mnuContactWindows->SetFont(fontstyle);
+    mnuContactEditorWindows->SetFont(fontstyle);
+    mnuSearchWindows->SetFont(fontstyle);
+    
 #else
-
-       mnuContactWindows->Enable(FALSE);
-       mnuContactEditorWindows->Enable(FALSE);
-       mnuSearchWindows->Enable(FALSE);
-
+    
+    mnuContactWindows->Enable(FALSE);
+    mnuContactEditorWindows->Enable(FALSE);
+    mnuSearchWindows->Enable(FALSE);
+    
 #endif
-
-       // Hide unimplemented functions.
-       
-       mnuMain->Remove(3);
-       
+    
+    // Hide unimplemented functions.
+    
+    mnuMain->Remove(3);
+    
 }
 
 void frmMain::QuitApp( wxCommandEvent& event )
 {
-//-------------------------------------------------------------------
-// frmMain::QuitApp: Quits the application by simply closing this
-// window which causes the exit as frmMain is the main window.
-//
-// wxCommandEvent      Accepts a referenced event command.
-//-------------------------------------------------------------------
-
-       //Go through the windows and close each one (be it search
-       //or contact editor). Abort if user wants to cancel.
-
-       // Close the contact editor windows.
-       
-       // Close the contact windows.
-       
-       // Close the search windows.
-
-       // Write out the ETag databases.
-
-       // Save Preferences: Save the window position if that option is enabled.
+    //-------------------------------------------------------------------
+    // frmMain::QuitApp: Quits the application by simply closing this
+    // window which causes the exit as frmMain is the main window.
+    //
+    // wxCommandEvent  Accepts a referenced event command.
+    //-------------------------------------------------------------------
+    
+    //Go through the windows and close each one (be it search
+    //or contact editor). Abort if user wants to cancel.
+    
+    // Close the contact editor windows.
+    
+    // Close the contact windows.
+    
+    // Close the search windows.
+    
+    // Write out the ETag databases.
+    
+    // Save Preferences: Save the window position if that option is enabled.
+    
+    wxString SetFilename = GetUserPrefDir();
     
-       wxString SetFilename = GetUserPrefDir();
-
 #if defined(__HAIKU__)
     
-
-
+    
+    
 #elif defined(__WIN32__)
-
-       SetFilename.Append(wxT("settings"));
-
+    
+    SetFilename.Append(wxT("settings"));
+    
 #else
     
-       // *nix OSes
-
-       SetFilename.Append(wxT("settings"));
-
+    // *nix OSes
+    
+    SetFilename.Append(wxT("settings"));
+    
 #endif
-
-       wxFileConfig *cfgfile = new wxFileConfig("", "", SetFilename);
-        
-       bool SaveWindowPos = FALSE;
-       wxString SaveWindowInc;
-       cfgfile->Read(wxT("SaveWindowPosition"), &SaveWindowInc);
-       
-       if (SaveWindowInc == wxT("true")){
-       
-               SaveWindowPos = TRUE;
-       
-       }
-       
-       if (SaveWindowPos == TRUE){
-       
-               wxRect frmMainPos = this->GetRect();
-       
-               cfgfile->Write(wxT("WindowPositionX"), frmMainPos.GetX());
-               cfgfile->Write(wxT("WindowPositionY"), frmMainPos.GetY());
-               cfgfile->Write(wxT("WindowPositionHeight"), frmMainPos.GetHeight());
-               cfgfile->Write(wxT("WindowPositionWidth"), frmMainPos.GetWidth());
-
-       
-       }
-       
-       delete cfgfile;
-       cfgfile = NULL;
-       
-       //Everything closed... exit.
-    
-       std::exit(0);
+    
+    wxFileConfig *cfgfile = new wxFileConfig("", "", SetFilename);
+    
+    bool SaveWindowPos = FALSE;
+    wxString SaveWindowInc;
+    cfgfile->Read(wxT("SaveWindowPosition"), &SaveWindowInc);
+    
+    if (SaveWindowInc == wxT("true")){
+        
+        SaveWindowPos = TRUE;
+        
+    }
+    
+    if (SaveWindowPos == TRUE){
+        
+        wxRect frmMainPos = this->GetRect();
+        
+        cfgfile->Write(wxT("WindowPositionX"), frmMainPos.GetX());
+        cfgfile->Write(wxT("WindowPositionY"), frmMainPos.GetY());
+        cfgfile->Write(wxT("WindowPositionHeight"), frmMainPos.GetHeight());
+        cfgfile->Write(wxT("WindowPositionWidth"), frmMainPos.GetWidth());
+        
+        
+    }
+    
+    delete cfgfile;
+    cfgfile = NULL;
+    
+    //Everything closed... exit.
+    
+    std::exit(0);
     
 }
 
 void frmMain::QuitApp()
 {
-//-------------------------------------------------------------------
-// frmMain::QuitApp: Quits the application by simply closing this
-// window which causes the exit as frmMain is the main window.
-//
-// wxCommandEvent      Accepts a referenced event command.
-//-------------------------------------------------------------------
-
+    //-------------------------------------------------------------------
+    // frmMain::QuitApp: Quits the application by simply closing this
+    // window which causes the exit as frmMain is the main window.
+    //
+    // wxCommandEvent  Accepts a referenced event command.
+    //-------------------------------------------------------------------
+    
     Close(this);
+    
 }
 
 void frmMain::ShowActivityWindow( wxCommandEvent& event )
 {
-
+    
     frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
     frameActMgr->OpenWindow();
     frameActMgr->Show();
-
+    
 }
 
 void frmMain::ShowAboutWindow( wxCommandEvent& event )
 {
-//-------------------------------------------------------------------
-// frmMain::ShowAboutWindow: Shows the About window as a modal
-// dialog and then cleans up when finished.
-//
-// wxCommandEvent      Accepts a referenced event command.
-//-------------------------------------------------------------------
-  
+    //-------------------------------------------------------------------
+    // frmMain::ShowAboutWindow: Shows the About window as a modal
+    // dialog and then cleans up when finished.
+    //
+    // wxCommandEvent  Accepts a referenced event command.
+    //-------------------------------------------------------------------
+    
     frmAbout *frameAbout = new frmAbout ( this );
     frameAbout->SetupAboutWindow();
     frameAbout->ShowModal();
@@ -436,15 +437,15 @@ void frmMain::ShowAboutWindow( wxCommandEvent& event )
 
 void frmMain::OpenPreferences( wxCommandEvent& event)
 {
-//-------------------------------------------------------------------
-// frmMain::ShowAboutWindow: Opens the Preferences window as a modal
-// dialog and then cleans up when finished.
-//
-// wxCommandEvent      Accepts a referenced event command.
-//-------------------------------------------------------------------
-
+    //-------------------------------------------------------------------
+    // frmMain::ShowAboutWindow: Opens the Preferences window as a modal
+    // dialog and then cleans up when finished.
+    //
+    // wxCommandEvent  Accepts a referenced event command.
+    //-------------------------------------------------------------------
+    
     ReloadAccounts = FALSE;
-
+    
     frmPreferences *framePreferences = new frmPreferences ( this );
     framePreferences->SetupPointers(&ReloadAccounts);
     framePreferences->ShowModal();
@@ -452,27 +453,27 @@ void frmMain::OpenPreferences( wxCommandEvent& event)
     framePreferences = NULL;
     
     if (ReloadAccounts == TRUE){
-    
-       // Reload the accounts as a change has been made within
-       // the application.
-       
-       this->LoadPreferences();
-    
+        
+        // Reload the accounts as a change has been made within
+        // the application.
+        
+        this->LoadPreferences();
+        
     }
     
 }
 
 void frmMain::OpenNewABDialog( wxCommandEvent& event)
 {
-//-------------------------------------------------------------------
-// frmMain::ShowAboutWindow: Opens the Preferences window as a modal
-// dialog and then cleans up when finished.
-//
-// wxCommandEvent      Accepts a referenced event command.
-//-------------------------------------------------------------------
-
+    //-------------------------------------------------------------------
+    // frmMain::ShowAboutWindow: Opens the Preferences window as a modal
+    // dialog and then cleans up when finished.
+    //
+    // wxCommandEvent  Accepts a referenced event command.
+    //-------------------------------------------------------------------
+    
     ReloadAccounts = FALSE;
-
+    
     frmNewAccount *frameNewAccount = new frmNewAccount ( this );
     frameNewAccount->SetupPointers(&ReloadAccounts);
     frameNewAccount->ShowModal();
@@ -480,32 +481,32 @@ void frmMain::OpenNewABDialog( wxCommandEvent& event)
     frameNewAccount = NULL;
     
     if (ReloadAccounts == TRUE){
-    
-       // Reload the accounts as a change has been made within
-       // the application.
-       
-               this->LoadPreferences();
-    
+        
+        // Reload the accounts as a change has been made within
+        // the application.
+        
+        this->LoadPreferences();
+        
     }
     
 }
 
 void frmMain::LoadContactList( wxTreeEvent& event )
 {
-
+    
     // Clear all existing variables.
-
+    
     lstContacts->DeleteAllItems();
-
-       treAccounts->SetAccount();
-
+    
+    treAccounts->SetAccount();
+    
     wxTreeItemIdValue cookie;
     wxTreeItemId next = treAccounts->GetRootItem();
     wxString AccountName;
     wxString AccountDir, AccountType, AccountDirFinal, AccountTypeFinal;
     wxString AccountDirCmb;
     long selectedaccount = 0;
-
+    
     wxTreeItemId selectedChild = treAccounts->GetSelection();
     wxTreeItemId nextChild;
     
@@ -514,92 +515,92 @@ void frmMain::LoadContactList( wxTreeEvent& event )
     
     int SCImg = treAccounts->GetItemImage(selectedChild);
     int AccountIndex = 0;
-
+    
     bmpIcon->SetIcon(AccImgList->GetIcon(SCImg));
-
-       for (int i = 0; i < prefaccounts.GetCount(); i++){
-
-               if (ActiveItemIcon == 2){
-
-                       std::multimap<wxTreeItemId, int>::iterator AGTiter = AccountGroupTreeId.find(ActiveItemId);
-                       std::multimap<int, wxString>::iterator AGFiter = AccountGroupFilename.find(AGTiter->second);
-                       std::multimap<int, int>::iterator AGLiter = AccountGroupList.find(AGTiter->second);
-                       int ActiveAccountG = AGLiter->second;
-
-                       if (i == ActiveAccountG){
-
-                               AccountDir.Append(prefaccounts.GetAccountDirectory(i));
-                               AccountType.Append(prefaccounts.GetAccountType(i));
-
-                               AccountDir.Trim();
-                               AccountType.Trim();
-
-                               if (AccountType == wxT("CardDAV")){
-                                       AccountTypeFinal.Append(wxT("carddav"));
-                               }
-                               else if (AccountType == wxT("Local")){
-                                       imgSSLStatus->SetBitmap(*imgOffline);
-                                       SSLToolTip->SetTip(wxT("SSL status is not applicable for this account"));
-                                       AccountTypeFinal.Append(wxT("local"));
-                               }
-
-                               AccountIndex = i;
-                               break;
-
-                       }
-
-               }
-
-               if (!nextChild){
-                       nextChild = treAccounts->GetFirstChild(next, cookie);
-               }
-               else {
-                       nextChild = treAccounts->GetNextSibling(nextChild);
-               }
-
-               AccountName = treAccounts->GetItemText(nextChild);
-
-               if (nextChild == selectedChild){
-                       AccountDir.Append(prefaccounts.GetAccountDirectory(i));
-                       AccountType.Append(prefaccounts.GetAccountType(i));
-
-                       AccountDir.Trim();
-                       AccountType.Trim();
-
-                       if (AccountType == wxT("CardDAV")){
-                               AccountTypeFinal.Append(wxT("carddav"));
-                       }
-                       else if (AccountType == wxT("Local")){
-                               SSLToolTip->SetTip(wxT("SSL status is not applicable for this account"));
-                               AccountTypeFinal.Append(wxT("local"));
-                       }
-
-                       AccountIndex = i;
-
-               }
-
-       }
+    
+    for (int i = 0; i < prefaccounts.GetCount(); i++){
         
-       if (selectedaccount >= prefaccounts.GetCount()){
-
-               // The account selected isn't there so return.
-
-               RevealWait = FALSE;
-
-               return;
-
-       }
+        if (ActiveItemIcon == 2){
+            
+            std::multimap<wxTreeItemId, int>::iterator AGTiter = AccountGroupTreeId.find(ActiveItemId);
+            std::multimap<int, wxString>::iterator AGFiter = AccountGroupFilename.find(AGTiter->second);
+            std::multimap<int, int>::iterator AGLiter = AccountGroupList.find(AGTiter->second);
+            int ActiveAccountG = AGLiter->second;
+            
+            if (i == ActiveAccountG){
+                
+                AccountDir.Append(prefaccounts.GetAccountDirectory(i));
+                AccountType.Append(prefaccounts.GetAccountType(i));
+                
+                AccountDir.Trim();
+                AccountType.Trim();
+                
+                if (AccountType == wxT("CardDAV")){
+                    AccountTypeFinal.Append(wxT("carddav"));
+                }
+                else if (AccountType == wxT("Local")){
+                    imgSSLStatus->SetBitmap(*imgOffline);
+                    SSLToolTip->SetTip(wxT("SSL status is not applicable for this account"));
+                    AccountTypeFinal.Append(wxT("local"));
+                }
+                
+                AccountIndex = i;
+                break;
+                
+            }
+            
+        }
+        
+        if (!nextChild){
+            nextChild = treAccounts->GetFirstChild(next, cookie);
+        }
+        else {
+            nextChild = treAccounts->GetNextSibling(nextChild);
+        }
+        
+        AccountName = treAccounts->GetItemText(nextChild);
+        
+        if (nextChild == selectedChild){
+            AccountDir.Append(prefaccounts.GetAccountDirectory(i));
+            AccountType.Append(prefaccounts.GetAccountType(i));
+            
+            AccountDir.Trim();
+            AccountType.Trim();
+            
+            if (AccountType == wxT("CardDAV")){
+                AccountTypeFinal.Append(wxT("carddav"));
+            }
+            else if (AccountType == wxT("Local")){
+                SSLToolTip->SetTip(wxT("SSL status is not applicable for this account"));
+                AccountTypeFinal.Append(wxT("local"));
+            }
+            
+            AccountIndex = i;
+            
+        }
+        
+    }
+    
+    if (selectedaccount >= prefaccounts.GetCount()){
+        
+        // The account selected isn't there so return.
+        
+        RevealWait = FALSE;
+        
+        return;
+        
+    }
     
     // Open the directory and get the list of .vcf files
     // in that directory.
-
+    
     ActiveAccount = AccountDir + wxT(".") + AccountTypeFinal;
-       ActiveAccountType = AccountType;
-
+    ActiveAccountType = AccountType;
+    
     SetupSSLStatus(AccountIndex);
-
-       AccountDirFinal.Clear();
-       AccountDirFinal = GetAccountDir(AccountDir + wxT(".") + AccountTypeFinal, FALSE);
+    
+    AccountDirFinal.Clear();
+    AccountDirFinal = GetAccountDir(AccountDir + wxT(".") + AccountTypeFinal, FALSE);
     
     ContactsFileIndex.Clear();
     
@@ -618,298 +619,298 @@ void frmMain::LoadContactList( wxTreeEvent& event )
     
     wxDir vcardaccdir(AccountDirFinal);
     
-    // Get the wxTreeItemId and image icon and compare it to the list. 
-
+    // Get the wxTreeItemId and image icon and compare it to the list.
+    
     if (ActiveItemIcon == AccountGrpID){
-
-            // It's a group so load the file containing the group and 
-           // get the members of the group.
-           
-           vCard Group;
-           wxString UIDCode;
-           
-           std::multimap<wxTreeItemId, int>::iterator AGTiter = AccountGroupTreeId.find(ActiveItemId);
-           std::multimap<int, wxString>::iterator AGFiter = AccountGroupFilename.find(AGTiter->second);
-           //std::multimap<wxTreeItemId, int>::iterator AGFiter = AccountGroupTreeId.find(ActiveItemId);
-           
-           Group.LoadFile(AGFiter->second);
-           
-           ArrayvCardOutData vCardMember = Group.GetByPartial(wxT("MEMBER"));
-           
-           for (int i = 0; i < vCardMember.PropCount; i++){
-               
-               vCardMember.PropValues[i].Trim();
-               if (vCardMember.PropValues[i].Left(9) == wxT("urn:uuid:")){
-               
-                   wxString NewPropValue;
-                   NewPropValue = vCardMember.PropValues[i].Mid(9, wxString::npos);
-                   vCardMember.PropValues[i] = NewPropValue;
-               
-               }
-               
-               
+        
+        // It's a group so load the file containing the group and
+        // get the members of the group.
+        
+        vCard Group;
+        wxString UIDCode;
+        
+        std::multimap<wxTreeItemId, int>::iterator AGTiter = AccountGroupTreeId.find(ActiveItemId);
+        std::multimap<int, wxString>::iterator AGFiter = AccountGroupFilename.find(AGTiter->second);
+        //std::multimap<wxTreeItemId, int>::iterator AGFiter = AccountGroupTreeId.find(ActiveItemId);
+        
+        Group.LoadFile(AGFiter->second);
+        
+        ArrayvCardOutData vCardMember = Group.GetByPartial(wxT("MEMBER"));
+        
+        for (int i = 0; i < vCardMember.PropCount; i++){
+            
+            vCardMember.PropValues[i].Trim();
+            if (vCardMember.PropValues[i].Left(9) == wxT("urn:uuid:")){
+                
+                wxString NewPropValue;
+                NewPropValue = vCardMember.PropValues[i].Mid(9, wxString::npos);
+                vCardMember.PropValues[i] = NewPropValue;
+                
             }
-           
-           bool ProcFiles = vcardaccdir.GetFirst(&vCardFilename, wxEmptyString, wxDIR_FILES);
-           while(ProcFiles){
-    
-               if (vCardFilename.Right(4) == wxT(".vcf") || 
-                   vCardFilename.Right(4) == wxT(".VCF") || 
-                   vCardFilename.Right(5) == wxT(".vcard") || 
-                   vCardFilename.Right(5) == wxT(".VCARD")){
-       
-                       vCard Person;
-                       bool FoundMember = FALSE;
-               
-                       vCardFilenameFull.Append(AccountDirFinal);
-                       vCardFilenameFull.Append(wxT("/"));
-                       vCardFilenameFull.Append(vCardFilename);
-               
-                       Person.LoadFile(vCardFilenameFull);
-               
-                       UIDCode = Person.Get(wxT("UID"));
-               
-                       for (int i = 0; i < vCardMember.PropCount; i++){
-                       
-                               if (vCardMember.PropValues[i] == UIDCode){
-                               
-                                       FoundMember = TRUE;
-                               
-                               }
-                       
-                       }
-                       
-                       if (FoundMember == FALSE){
-
-                               vCardFilename.Clear();
-                               vCardFilenameFull.Clear();
-                               vCardDataString.Clear();
-                               ProcFiles = vcardaccdir.GetNext(&vCardFilename);
-                               continue;
-                       
-                       }
-               
-                       if (Person.MeetBaseSpecification()){
-       
-                           if (SortMode == 1){
-
-                               // Split the name into sections.
-                       
-                               vCardDataString = Person.Get(wxT("N"));
-
-                               vCardName NameData = Person.GetName();
-                   
-                               vCardDataString = NameData.Forename + wxT(" ") + NameData.Surname;
-                   
-                           } else if (SortMode == 2){
-                   
-                               // Split the name into sections.
-                   
-                               vCardName NameData = Person.GetName();    
-                   
-                               vCardDataString = NameData.Surname + wxT(", ") + NameData.Forename;
-                   
-                           } else if (SortMode == 3){
-                   
-                               // Check and make sure that the top most nickname is used.
-                   
-                               vCardDataString = Person.Get(wxT("NICKNAME"));
-                   
-                               if (vCardDataString.IsEmpty()){
-                       
-                                       vCardDataString = wxT("(no nickname)");
-                       
-                               }
-                   
-                           } else if (SortMode == 4){
-                   
-                               vCardDataString = Person.Get(wxT("FN"));
-                   
-                           }
-       
-                           if (AscendingMode == TRUE){
-                               vCardNamesAsc.insert(std::make_pair(vCardDataString, vCardFilenameFull));
-                           } else {
-                               vCardNamesDsc.insert(std::make_pair(vCardDataString, vCardFilenameFull));
-                           }
-               
-                       } else {
-       
-                       }
-       
-               }
-       
-               vCardFilename.Clear();
-               vCardFilenameFull.Clear();
-               vCardDataString.Clear();
-               ProcFiles = vcardaccdir.GetNext(&vCardFilename);
-           }
-    
+            
+            
+        }
+        
+        bool ProcFiles = vcardaccdir.GetFirst(&vCardFilename, wxEmptyString, wxDIR_FILES);
+        while(ProcFiles){
+            
+            if (vCardFilename.Right(4) == wxT(".vcf") ||
+                vCardFilename.Right(4) == wxT(".VCF") ||
+                vCardFilename.Right(5) == wxT(".vcard") ||
+                vCardFilename.Right(5) == wxT(".VCARD")){
+                
+                vCard Person;
+                bool FoundMember = FALSE;
+                
+                vCardFilenameFull.Append(AccountDirFinal);
+                vCardFilenameFull.Append(wxT("/"));
+                vCardFilenameFull.Append(vCardFilename);
+                
+                Person.LoadFile(vCardFilenameFull);
+                
+                UIDCode = Person.Get(wxT("UID"));
+                
+                for (int i = 0; i < vCardMember.PropCount; i++){
+                    
+                    if (vCardMember.PropValues[i] == UIDCode){
+                        
+                        FoundMember = TRUE;
+                        
+                    }
+                    
+                }
+                
+                if (FoundMember == FALSE){
+                    
+                    vCardFilename.Clear();
+                    vCardFilenameFull.Clear();
+                    vCardDataString.Clear();
+                    ProcFiles = vcardaccdir.GetNext(&vCardFilename);
+                    continue;
+                    
+                }
+                
+                if (Person.MeetBaseSpecification()){
+                    
+                    if (SortMode == 1){
+                        
+                        // Split the name into sections.
+                        
+                        vCardDataString = Person.Get(wxT("N"));
+                        
+                        vCardName NameData = Person.GetName();
+                        
+                        vCardDataString = NameData.Forename + wxT(" ") + NameData.Surname;
+                        
+                    } else if (SortMode == 2){
+                        
+                        // Split the name into sections.
+                        
+                        vCardName NameData = Person.GetName();
+                        
+                        vCardDataString = NameData.Surname + wxT(", ") + NameData.Forename;
+                        
+                    } else if (SortMode == 3){
+                        
+                        // Check and make sure that the top most nickname is used.
+                        
+                        vCardDataString = Person.Get(wxT("NICKNAME"));
+                        
+                        if (vCardDataString.IsEmpty()){
+                            
+                            vCardDataString = wxT("(no nickname)");
+                            
+                        }
+                        
+                    } else if (SortMode == 4){
+                        
+                        vCardDataString = Person.Get(wxT("FN"));
+                        
+                    }
+                    
+                    if (AscendingMode == TRUE){
+                        vCardNamesAsc.insert(std::make_pair(vCardDataString, vCardFilenameFull));
+                    } else {
+                        vCardNamesDsc.insert(std::make_pair(vCardDataString, vCardFilenameFull));
+                    }
+                    
+                } else {
+                    
+                }
+                
+            }
+            
+            vCardFilename.Clear();
+            vCardFilenameFull.Clear();
+            vCardDataString.Clear();
+            ProcFiles = vcardaccdir.GetNext(&vCardFilename);
+        }
+        
     } else {
-    
-           bool ProcFiles = vcardaccdir.GetFirst(&vCardFilename, wxEmptyString, wxDIR_FILES);
-           while(ProcFiles){
-    
-               if (vCardFilename.Right(4) == wxT(".vcf") || 
-                   vCardFilename.Right(4) == wxT(".VCF") || 
-                   vCardFilename.Right(5) == wxT(".vcard") || 
-                   vCardFilename.Right(5) == wxT(".VCARD")){
-       
-                       vCard Person;
-               
-                       vCardFilenameFull.Append(AccountDirFinal);
-                       vCardFilenameFull.Append(wxT("/"));
-                       vCardFilenameFull.Append(vCardFilename);
-               
-                       Person.LoadFile(vCardFilenameFull);
-               
-                       if (Person.MeetBaseSpecification()){
-       
-                           if (SortMode == 1){
-
-                               // Split the name into sections.
-                       
-                               vCardDataString = Person.Get(wxT("N"));
-
-                               vCardName NameData = Person.GetName();
-                   
-                               vCardDataString = NameData.Forename + wxT(" ") + NameData.Surname;
-                   
-                           } else if (SortMode == 2){
-                   
-                               // Split the name into sections.
-                   
-                               vCardName NameData = Person.GetName();    
-                   
-                               vCardDataString = NameData.Surname + wxT(", ") + NameData.Forename;
-                   
-                           } else if (SortMode == 3){
-                   
-                               // Check and make sure that the top most nickname is used.
-                   
-                               vCardDataString = Person.Get(wxT("NICKNAME"));
-                   
-                               if (vCardDataString.IsEmpty()){
-                       
-                                       vCardDataString = wxT("(no nickname)");
-                       
-                               }
-                   
-                           } else if (SortMode == 4){
-                   
-                               vCardDataString = Person.Get(wxT("FN"));
-                   
-                           }
-       
-                           if (AscendingMode == TRUE){
-                               vCardNamesAsc.insert(std::make_pair(vCardDataString, vCardFilenameFull));
-                           } else {
-                               vCardNamesDsc.insert(std::make_pair(vCardDataString, vCardFilenameFull));
-                           }
-               
-                       } else {
-                       
-                       }
-       
-               }
-       
-               vCardFilename.Clear();
-               vCardFilenameFull.Clear();
-               vCardDataString.Clear();
-               ProcFiles = vcardaccdir.GetNext(&vCardFilename);
-           }
-    
+        
+        bool ProcFiles = vcardaccdir.GetFirst(&vCardFilename, wxEmptyString, wxDIR_FILES);
+        while(ProcFiles){
+            
+            if (vCardFilename.Right(4) == wxT(".vcf") ||
+                vCardFilename.Right(4) == wxT(".VCF") ||
+                vCardFilename.Right(5) == wxT(".vcard") ||
+                vCardFilename.Right(5) == wxT(".VCARD")){
+                
+                vCard Person;
+                
+                vCardFilenameFull.Append(AccountDirFinal);
+                vCardFilenameFull.Append(wxT("/"));
+                vCardFilenameFull.Append(vCardFilename);
+                
+                Person.LoadFile(vCardFilenameFull);
+                
+                if (Person.MeetBaseSpecification()){
+                    
+                    if (SortMode == 1){
+                        
+                        // Split the name into sections.
+                        
+                        vCardDataString = Person.Get(wxT("N"));
+                        
+                        vCardName NameData = Person.GetName();
+                        
+                        vCardDataString = NameData.Forename + wxT(" ") + NameData.Surname;
+                        
+                    } else if (SortMode == 2){
+                        
+                        // Split the name into sections.
+                        
+                        vCardName NameData = Person.GetName();
+                        
+                        vCardDataString = NameData.Surname + wxT(", ") + NameData.Forename;
+                        
+                    } else if (SortMode == 3){
+                        
+                        // Check and make sure that the top most nickname is used.
+                        
+                        vCardDataString = Person.Get(wxT("NICKNAME"));
+                        
+                        if (vCardDataString.IsEmpty()){
+                            
+                            vCardDataString = wxT("(no nickname)");
+                            
+                        }
+                        
+                    } else if (SortMode == 4){
+                        
+                        vCardDataString = Person.Get(wxT("FN"));
+                        
+                    }
+                    
+                    if (AscendingMode == TRUE){
+                        vCardNamesAsc.insert(std::make_pair(vCardDataString, vCardFilenameFull));
+                    } else {
+                        vCardNamesDsc.insert(std::make_pair(vCardDataString, vCardFilenameFull));
+                    }
+                    
+                } else {
+                    
+                }
+                
+            }
+            
+            vCardFilename.Clear();
+            vCardFilenameFull.Clear();
+            vCardDataString.Clear();
+            ProcFiles = vcardaccdir.GetNext(&vCardFilename);
+        }
+        
     }
     
     // Sort the data.
-
+    
     // Insert the data into the control.
-
-       if (AscendingMode == TRUE){
-               for (std::map<wxString, wxString>::iterator iter = vCardNamesAsc.begin();
-                       iter != vCardNamesAsc.end(); ++iter){
-
-                       wxListItem ContactInfo;
-
-                       ContactInfo.SetId(0);
-                       ContactInfo.SetText(_("Mooo"));
-                       ContactInfo.SetData(ContactSeekPoint);
-                       ContactIndex = lstContacts->InsertItem(ContactInfo);
-
-                       lstContacts->SetItem(ContactIndex, 0, iter->first);
-                       ContactsFileIndex.Insert(iter->second, ContactSeekPoint);
-                       ContactSeekPoint++;
-
-               }
-
-       } else {
-
-               for (std::map<wxString, wxString>::iterator iter = vCardNamesDsc.begin();
-                       iter != vCardNamesDsc.end(); ++iter){
-
-                       wxListItem ContactInfo;
-
-                       ContactInfo.SetId(0);
-                       ContactInfo.SetText(_("Mooo"));
-                       ContactInfo.SetData(ContactSeekPoint);
-                       ContactIndex = lstContacts->InsertItem(ContactInfo);
-
-                       lstContacts->SetItem(ContactIndex, 0, iter->first);
-                       ContactsFileIndex.Insert(iter->second, ContactSeekPoint);
-                       ContactSeekPoint++;
-
-               }
-
-       }
-
+    
+    if (AscendingMode == TRUE){
+        for (std::map<wxString, wxString>::iterator iter = vCardNamesAsc.begin();
+             iter != vCardNamesAsc.end(); ++iter){
+            
+            wxListItem ContactInfo;
+            
+            ContactInfo.SetId(0);
+            ContactInfo.SetText(_("Mooo"));
+            ContactInfo.SetData(ContactSeekPoint);
+            ContactIndex = lstContacts->InsertItem(ContactInfo);
+            
+            lstContacts->SetItem(ContactIndex, 0, iter->first);
+            ContactsFileIndex.Insert(iter->second, ContactSeekPoint);
+            ContactSeekPoint++;
+            
+        }
+        
+    } else {
+        
+        for (std::map<wxString, wxString>::iterator iter = vCardNamesDsc.begin();
+             iter != vCardNamesDsc.end(); ++iter){
+            
+            wxListItem ContactInfo;
+            
+            ContactInfo.SetId(0);
+            ContactInfo.SetText(_("Mooo"));
+            ContactInfo.SetData(ContactSeekPoint);
+            ContactIndex = lstContacts->InsertItem(ContactInfo);
+            
+            lstContacts->SetItem(ContactIndex, 0, iter->first);
+            ContactsFileIndex.Insert(iter->second, ContactSeekPoint);
+            ContactSeekPoint++;
+            
+        }
+        
+    }
+    
 }
 
 void frmMain::ShowContactInfo( wxListEvent& event )
 {
-
+    
     long intSelected = -1;
     int intSelectedData = 0;
     long ContactSeekNum = -1;
     
-//    intSelected = lstContacts->GetSelection();
+    //    intSelected = lstContacts->GetSelection();
     
     // Check if several contacts have been selected.
     
     int ContactTotal = 0;
     
-       for (;;){
-
-               intSelected = lstContacts->GetNextItem(intSelected,
-                       wxLIST_NEXT_ALL,
-                       wxLIST_STATE_SELECTED);
-
-               if (intSelected == -1){
-
-                       break;
-
-               }
-
-               ContactTotal++;
-
-       }
+    for (;;){
+        
+        intSelected = lstContacts->GetNextItem(intSelected,
+                                               wxLIST_NEXT_ALL,
+                                               wxLIST_STATE_SELECTED);
+        
+        if (intSelected == -1){
+            
+            break;
+            
+        }
+        
+        ContactTotal++;
+        
+    }
     
     if (ContactTotal == 0){
-               htmContactData->SetPage(wxT(""));
-               return;
+        htmContactData->SetPage(wxT(""));
+        return;
     }
     
     if (ContactTotal > 1){
-    
-               htmContactData->SetPage(wxString::Format(wxT("%i contacts selected."), ContactTotal));
-               ActiveFilename.Clear();
-               return;
-    
+        
+        htmContactData->SetPage(wxString::Format(wxT("%i contacts selected."), ContactTotal));
+        ActiveFilename.Clear();
+        return;
+        
     }
     
-    intSelected = lstContacts->GetNextItem(intSelected, 
-       wxLIST_NEXT_ALL,
-       wxLIST_STATE_SELECTED);
-       
+    intSelected = lstContacts->GetNextItem(intSelected,
+                                           wxLIST_NEXT_ALL,
+                                           wxLIST_STATE_SELECTED);
+    
     ContactSeekNum = lstContacts->GetItemData(intSelected);
     
     wxFFile ContactFile;
@@ -928,143 +929,143 @@ void frmMain::ShowContactInfo( wxListEvent& event )
     wxString wxSProperty;
     wxString wxSPropertySeg1;
     wxString wxSPropertySeg2;
-       
+    
     // Check if we are using wxWidgets version 2.8 or less and
     // execute the required command accordingly.
-       
+    
 #if wxABI_VERSION < 20900
     ContactFile.Open(ContactsFileIndex[ContactSeekNum].c_str(), wxT("r"));
 #else
     ContactFile.Open(ContactsFileIndex[ContactSeekNum], wxT("r"));
-#endif 
-       
+#endif
+    
     if (ContactFile.IsOpened() == FALSE){
-       
-               return;
-       
+        
+        return;
+        
     }
-       
+    
     ContactFile.ReadAll(&wxSContactString, wxConvAuto());
-       
+    
     // Split the lines.
-       
+    
     std::map<int, wxString> ContactFileLines;
     std::map<int, wxString>::iterator striter;
-       
+    
     wxStringTokenizer wSTContactFileLines(wxSContactString, wxT("\r\n"));
-
+    
     int ContactLineSeek = 0;
-
+    
     while (wSTContactFileLines.HasMoreTokens() == TRUE){
-
-               ContactLine = wSTContactFileLines.GetNextToken();
-               ContactFileLines.insert(std::make_pair(ContactLineSeek, ContactLine));
-               ContactLineSeek++;              
-       
+        
+        ContactLine = wSTContactFileLines.GetNextToken();
+        ContactFileLines.insert(std::make_pair(ContactLineSeek, ContactLine));
+        ContactLineSeek++;
+        
     }
     
     if (ContactSeekNum < 0){
-               return;
+        return;
     }
     
-       for (std::map<int, wxString>::iterator iter = ContactFileLines.begin();
-               iter != ContactFileLines.end(); ++iter){
-
-               // Find the colon which splits the start bit from the data part.
-
-               ContactLine = iter->second;
-
-               while (ExtraLineSeek == TRUE){
-
-                       // Check if there is extra data on the next line 
-                       // (indicated by space or tab at the start) and add data.
-
-                       iter++;
-
-                       if (iter == ContactFileLines.end()){
-
-                               iter--;
-                               break;
-
-                       }
-
-                       wxSPropertyNextLine = iter->second;
-
-
-                       if (wxSPropertyNextLine.Mid(0, 1) == wxT(" ") || wxSPropertyNextLine.Mid(0, 1) == wxT("\t")){
-
-                               wxSPropertyNextLine.Remove(0, 1);
-                               //wxSPropertyNextLine.Trim(FALSE);
-                               //ContactLine.Trim();
-                               ContactLine.Append(wxSPropertyNextLine);
-
-                       } else {
-
-                               iter--;
-                               ExtraLineSeek = FALSE;
-
-                       }
-
-               }
-
-               ContactLineLen = ContactLine.Len();
-
-               // Make sure we are not in quotation mode.
-               // Make sure colon does not have \ or \\ before it.
-
-               for (int i = 0; i <= ContactLineLen; i++){
-
-                       if ((ContactLine.Mid(i, 1) == wxT(";") || ContactLine.Mid(i, 1) == wxT(":")) && PropertyFind == TRUE){
-
-                               PropertyFind = FALSE;
-
-                       } else if (PropertyFind == TRUE){
-
-                               wxSProperty.Append(ContactLine.Mid(i, 1));
-
-                       }
-
-                       if (ContactLine.Mid(i, 1) == wxT("\"")){
-
-                               if (QuoteMode == TRUE){
-
-                                       QuoteMode = FALSE;
-
-                               } else {
-
-                                       QuoteMode = TRUE;
-
-                               }
-
-                       }
-
-                       if (ContactLine.Mid(i, 1) == wxT(":") && ContactLine.Mid((i - 1), 1) != wxT("\\") && QuoteMode == FALSE){
-
-                               QuoteBreakPoint = i;
-                               break;
-
-                       }
-
-               }
-
-               // Split that line at the point into two variables (ignore the colon).
-
-               wxSPropertySeg1 = ContactLine.Mid(0, QuoteBreakPoint);
-               wxSPropertySeg2 = ContactLine.Mid((QuoteBreakPoint + 1));
-
-               // Insert both into the vCard data file.
-
-               Person.AddRaw(wxSPropertySeg1, wxSPropertySeg2);
-
-               QuoteMode = FALSE;
-               PropertyFind = TRUE;
-               ExtraLineSeek = TRUE;
-               ContactLineLen = 0;
-               QuoteBreakPoint = 0;
-               ContactLine.Clear();
-               wxSProperty.Clear();
-
-       }
+    for (std::map<int, wxString>::iterator iter = ContactFileLines.begin();
+         iter != ContactFileLines.end(); ++iter){
+        
+        // Find the colon which splits the start bit from the data part.
+        
+        ContactLine = iter->second;
+        
+        while (ExtraLineSeek == TRUE){
+            
+            // Check if there is extra data on the next line
+            // (indicated by space or tab at the start) and add data.
+            
+            iter++;
+            
+            if (iter == ContactFileLines.end()){
+                
+                iter--;
+                break;
+                
+            }
+            
+            wxSPropertyNextLine = iter->second;
+            
+            
+            if (wxSPropertyNextLine.Mid(0, 1) == wxT(" ") || wxSPropertyNextLine.Mid(0, 1) == wxT("\t")){
+                
+                wxSPropertyNextLine.Remove(0, 1);
+                //wxSPropertyNextLine.Trim(FALSE);
+                //ContactLine.Trim();
+                ContactLine.Append(wxSPropertyNextLine);
+                
+            } else {
+                
+                iter--;
+                ExtraLineSeek = FALSE;
+                
+            }
+            
+        }
+        
+        ContactLineLen = ContactLine.Len();
+        
+        // Make sure we are not in quotation mode.
+        // Make sure colon does not have \ or \\ before it.
+        
+        for (int i = 0; i <= ContactLineLen; i++){
+            
+            if ((ContactLine.Mid(i, 1) == wxT(";") || ContactLine.Mid(i, 1) == wxT(":")) && PropertyFind == TRUE){
+                
+                PropertyFind = FALSE;
+                
+            } else if (PropertyFind == TRUE){
+                
+                wxSProperty.Append(ContactLine.Mid(i, 1));
+                
+            }
+            
+            if (ContactLine.Mid(i, 1) == wxT("\"")){
+                
+                if (QuoteMode == TRUE){
+                    
+                    QuoteMode = FALSE;
+                    
+                } else {
+                    
+                    QuoteMode = TRUE;
+                    
+                }
+                
+            }
+            
+            if (ContactLine.Mid(i, 1) == wxT(":") && ContactLine.Mid((i - 1), 1) != wxT("\\") && QuoteMode == FALSE){
+                
+                QuoteBreakPoint = i;
+                break;
+                
+            }
+            
+        }
+        
+        // Split that line at the point into two variables (ignore the colon).
+        
+        wxSPropertySeg1 = ContactLine.Mid(0, QuoteBreakPoint);
+        wxSPropertySeg2 = ContactLine.Mid((QuoteBreakPoint + 1));
+        
+        // Insert both into the vCard data file.
+        
+        Person.AddRaw(wxSPropertySeg1, wxSPropertySeg2);
+        
+        QuoteMode = FALSE;
+        PropertyFind = TRUE;
+        ExtraLineSeek = TRUE;
+        ContactLineLen = 0;
+        QuoteBreakPoint = 0;
+        ContactLine.Clear();
+        wxSProperty.Clear();
+        
+    }
     
     OldSessionID = SessionID;
     SessionID = wxString::Format(wxT("%i"), rand() % 32768);
@@ -1075,36 +1076,36 @@ void frmMain::ShowContactInfo( wxListEvent& event )
 
 void frmMain::ShowContactEditorNew( wxCommandEvent& event )
 {
-
+    
     // Check if there is an account selected and if not
     // return immediately.
     
     if (ActiveAccount.IsEmpty()){
-    
-       return;
-    
+        
+        return;
+        
     }
-
+    
     // Add Pointer to SetupPointers for the ETagDB.
-
+    
     wxMemoryInputStream istream(bigimgs_contactpersonicon48_png, sizeof(bigimgs_contactpersonicon48_png));
     wxImage bigimgs_contactpersonicon48i(istream, wxBITMAP_TYPE_PNG);
-    wxBitmap contacticonbmp(bigimgs_contactpersonicon48i, -1);    
+    wxBitmap contacticonbmp(bigimgs_contactpersonicon48i, -1);
     wxIcon contacticon;
-    contacticon.CopyFromBitmap(contacticonbmp); 
-
+    contacticon.CopyFromBitmap(contacticonbmp);
+    
     frmContactEditor *ContactEditor = new frmContactEditor( this );
     
     WindowMenuItemID++;
-
+    
     ContactEditor->SetUID(WindowMenuItemID);
-
+    
     WindowData *WData = new WindowData;
-
+    
     WData->DataType = 1;
     WData->WindowPointer = (void*)ContactEditor;
     WData->WindowID = WindowMenuItemID;
-
+    
     wxCommandEvent addevent(WINDOW_ADD);
     addevent.SetClientData(WData);
     wxPostEvent(this, addevent);
@@ -1120,57 +1121,57 @@ void frmMain::ShowContactEditorNew( wxCommandEvent& event )
 
 void frmMain::ShowContactEditorEdit( wxCommandEvent& event )
 {
-
+    
     // Check if there is an account selected and if not
     // return immediately.
     
     int DataCheck = event.GetInt();
-        
-    if (ActiveAccount.IsEmpty() && DataCheck == 0){
-    
-       return;
     
+    if (ActiveAccount.IsEmpty() && DataCheck == 0){
+        
+        return;
+        
     }
     
     wxMemoryInputStream istream(bigimgs_contactpersonicon48_png, sizeof(bigimgs_contactpersonicon48_png));
     wxImage bigimgs_contactpersonicon48i(istream, wxBITMAP_TYPE_PNG);
     wxBitmap contacticonbmp(bigimgs_contactpersonicon48i, -1);
     wxIcon contacticon;
-    contacticon.CopyFromBitmap(contacticonbmp); 
-
+    contacticon.CopyFromBitmap(contacticonbmp);
+    
     // Check if a contact has been selected.
     
     long intSelected = -1;
     int intSelectedData = 0;
     long intContactSeekNum = -1;
     
-//    intSelected = lstContacts->GetSelection();
+    //    intSelected = lstContacts->GetSelection();
+    
+    intSelected = lstContacts->GetNextItem(intSelected,
+                                           wxLIST_NEXT_ALL,
+                                           wxLIST_STATE_SELECTED);
     
-    intSelected = lstContacts->GetNextItem(intSelected, 
-       wxLIST_NEXT_ALL,
-       wxLIST_STATE_SELECTED);
-       
     if (intSelected == -1){
-       return;
+        return;
     }
     
     intContactSeekNum = lstContacts->GetItemData(intSelected);
-
+    
     // Get the filename of the selected contact.
-
+    
     frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
     frmContactEditor *ContactEditor = new frmContactEditor( this );
     
     WindowMenuItemID++;
     
     ContactEditor->SetUID(WindowMenuItemID);
-
+    
     WindowData *WData = new WindowData;
-
+    
     WData->DataType = 1;
     WData->WindowPointer = (void*)ContactEditor;
     WData->WindowID = WindowMenuItemID;
-
+    
     wxCommandEvent addevent(WINDOW_ADD);
     addevent.SetClientData(WData);
     wxPostEvent(this, addevent);
@@ -1181,54 +1182,54 @@ void frmMain::ShowContactEditorEdit( wxCommandEvent& event )
     // Check if pointer is NULL (not from the search forms) or not.
     
     if (DataCheck == 0){
-      
-       ContactEditor->LoadContact(ContactsFileIndex[intContactSeekNum]);
-       ContactEditor->SetupContact(ActiveAccount);
-    
+        
+        ContactEditor->LoadContact(ContactsFileIndex[intContactSeekNum]);
+        ContactEditor->SetupContact(ActiveAccount);
+        
     } else {
         
-       UCNotif *uc = (UCNotif*)event.GetClientData();
-       
-       if (!uc){
-
-               ContactEditor->SetupContact(ActiveAccount);
-               ContactEditor->LoadContact(ContactsFileIndex[intContactSeekNum]);
-                       
-       } else {
-    
-               ContactEditor->SetupContact(uc->ContactAccount);
-               ContactEditor->LoadContact(uc->ContactFilename);
-               
-               delete uc;
-               uc = NULL;
-
-    
-       }
-    
-    }
+        UCNotif *uc = (UCNotif*)event.GetClientData();
         
+        if (!uc){
+            
+            ContactEditor->SetupContact(ActiveAccount);
+            ContactEditor->LoadContact(ContactsFileIndex[intContactSeekNum]);
+            
+        } else {
+            
+            ContactEditor->SetupContact(uc->ContactAccount);
+            ContactEditor->LoadContact(uc->ContactFilename);
+            
+            delete uc;
+            uc = NULL;
+            
+            
+        }
+        
+    }
+    
     ContactEditor->SetIcon(contacticon);
     ContactEditor->Show(true);
-
+    
 }
 
 void frmMain::RefreshAddressBook( wxCommandEvent& event ){
-
-       // TODO: Check Account Type.
-
-       if (!ActiveAccount.IsEmpty()){
-
-               frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
-               frameActMgr->AddTask(3, wxT(""), ActiveAccount,
-                       wxT(""), wxT(""), wxT(""), wxT(""));
-
-       }
-
+    
+    // TODO: Check Account Type.
+    
+    if (!ActiveAccount.IsEmpty()){
+        
+        frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
+        frameActMgr->AddTask(3, wxT(""), ActiveAccount,
+                             wxT(""), wxT(""), wxT(""), wxT(""));
+        
+    }
+    
 }
 
 void frmMain::OpenContactInfo( wxListEvent& event )
 {
-
+    
     wxStringTokenizer vcardfileline;
     std::string l;
     wxString lwxs;
@@ -1240,38 +1241,38 @@ void frmMain::OpenContactInfo( wxListEvent& event )
     int intSelectedData = 0;
     long intContactSeekNum = -1;
     
-    intSelected = lstContacts->GetNextItem(intSelected, 
-       wxLIST_NEXT_ALL,
-       wxLIST_STATE_SELECTED);
-       
+    intSelected = lstContacts->GetNextItem(intSelected,
+                                           wxLIST_NEXT_ALL,
+                                           wxLIST_STATE_SELECTED);
+    
     intContactSeekNum = lstContacts->GetItemData(intSelected);
     
     if (intContactSeekNum == -1){
-       return;
+        return;
     }
     
     Person.LoadFile(ContactsFileIndex[intContactSeekNum]);
-
+    
     wxMemoryInputStream istream(bigimgs_contactpersonicon48_png, sizeof(bigimgs_contactpersonicon48_png));
     wxImage bigimgs_contactpersonicon48i(istream, wxBITMAP_TYPE_PNG);
-    wxBitmap contacticonbmp(bigimgs_contactpersonicon48i, -1);    
+    wxBitmap contacticonbmp(bigimgs_contactpersonicon48i, -1);
     wxIcon contacticon;
     contacticon.CopyFromBitmap(contacticonbmp);
-
+    
     frmContact *Contact = new frmContact( this );
     
     // Add to window list.
-
+    
     WindowMenuItemID++;
-
+    
     Contact->SetUID(WindowMenuItemID);
-
+    
     WindowData *WData = new WindowData;
-
+    
     WData->DataType = 0;
     WData->WindowPointer = (void*)Contact;
     WData->WindowID = WindowMenuItemID;
-
+    
     wxCommandEvent addevent(WINDOW_ADD);
     addevent.SetClientData(WData);
     wxPostEvent(this, addevent);
@@ -1281,7 +1282,7 @@ void frmMain::OpenContactInfo( wxListEvent& event )
     
     Contact->SetIcon(contacticon);
     Contact->Show(true);
-
+    
 }
 
 void frmMain::OpenContactInfo( wxCommandEvent& event )
@@ -1295,34 +1296,34 @@ void frmMain::OpenContactInfo( wxCommandEvent& event )
     wxString setname, setvalue;
     vCard Person;
     wxString nextchar;
-    //std::fstream vcardfile;    
-
+    //std::fstream vcardfile;
+    
     long intSelected = -1;
     int intSelectedData = 0;
     long intContactSeekNum = -1;
     
     Person.LoadFile(uc->ContactFilename);
-
+    
     wxMemoryInputStream istream(bigimgs_contactpersonicon48_png, sizeof(bigimgs_contactpersonicon48_png));
     wxImage bigimgs_contactpersonicon48i(istream, wxBITMAP_TYPE_PNG);
-    wxBitmap contacticonbmp(bigimgs_contactpersonicon48i, -1);    
+    wxBitmap contacticonbmp(bigimgs_contactpersonicon48i, -1);
     wxIcon contacticon;
     contacticon.CopyFromBitmap(contacticonbmp);
-
+    
     frmContact *Contact = new frmContact( this );
     
     // Add to window list.
-
+    
     WindowMenuItemID++;
-
+    
     Contact->SetUID(WindowMenuItemID);
-
+    
     WindowData *WData = new WindowData;
-
+    
     WData->DataType = 0;
     WData->WindowPointer = (void*)Contact;
     WData->WindowID = WindowMenuItemID;
-
+    
     wxCommandEvent addevent(WINDOW_ADD);
     addevent.SetClientData(WData);
     wxPostEvent(this, addevent);
@@ -1348,43 +1349,43 @@ void frmMain::LoadPreferences(){
     wxString preffilename = GetUserPrefDir();
     
     XABPreferences preferences(preffilename);
-
+    
     // Setup the main window position (if needed).
     
     bool SaveWindowPos = preferences.GetBoolData(wxT("SaveWindowPosition"));
     bool HideLocalABs = preferences.GetBoolData(wxT("HideLocalAddressBooks"));
     
     if (SaveWindowPos == TRUE){
-        
-               this->SetSize(preferences.GetMainWindowData());
-    
+        
+        this->SetSize(preferences.GetMainWindowData());
+        
     }
     
     treAccounts->DeleteAllItems();
     
-    wxTreeItemId RootNode = treAccounts->AddRoot(wxT("Root Item"));
-
+    wxTreeItemId RootNode = treAccounts->AddRoot(wxT("Root Item"), AccountNoneID);
+    
     // Stop all account timers and remove the accounts.
-       
-       for (std::map<wxString, wxAccountSyncTimer*>::iterator iter = AccountSyncTimers.begin();
-               iter != AccountSyncTimers.end(); iter++){
-
-               wxAccountSyncTimer *AccTmrPtr = iter->second;
-               AccTmrPtr->Stop();
-
-               delete AccTmrPtr;
-               AccTmrPtr = NULL;
-
-       }
-
-       AccountSyncTimers.clear();
-
-    /*    
-    for (int i = (preferences.accounts.GetCount() - 1); i > 0; --i){
-       treAccounts->AppendItem(RootNode, preferences.accounts.GetAccountName(i));
+    
+    for (std::map<wxString, wxAccountSyncTimer*>::iterator iter = AccountSyncTimers.begin();
+         iter != AccountSyncTimers.end(); iter++){
+        
+        wxAccountSyncTimer *AccTmrPtr = iter->second;
+        AccTmrPtr->Stop();
+        
+        delete AccTmrPtr;
+        AccTmrPtr = NULL;
+        
     }
-    */
-
+    
+    AccountSyncTimers.clear();
+    
+    /*
+     for (int i = (preferences.accounts.GetCount() - 1); i > 0; --i){
+     treAccounts->AppendItem(RootNode, preferences.accounts.GetAccountName(i));
+     }
+     */
+    
     wxString AccDir;
     wxString AccDirFull;
     wxString AccDirFullSfx;
@@ -1397,1437 +1398,1415 @@ void frmMain::LoadPreferences(){
     wxTreeItemId AccountTreeId;
     wxTreeItemId GroupTreeId;
     int intGroupID = 0;
-
-    for (int i = 0; i < preferences.accounts.GetCount(); i++){
     
-       if ((preferences.accounts.GetAccountType(i) == wxT("Local") || 
-               preferences.accounts.GetAccountType(i) == wxT("local")) && HideLocalABs == TRUE){
-               
-               continue;
-               
-       }
-    
-       AccDir = preferences.accounts.GetAccountDirectory(i);
-       AccDirFull = preferences.accounts.GetAccountDirectory(i);
-       AccDirFull.Trim();
-       AccDirFull.Append(wxT("."));
-       AccDirFullSfx.Append(preferences.accounts.GetAccountType(i));
-       AccDirFullSfx.LowerCase();
-       AccDirFullSfx.Trim();
-       AccDirFull.Append(AccDirFullSfx);
-       AccName = preferences.accounts.GetAccountName(i);
-       AccName.Trim();
-       AccountAccDirList.insert(std::make_pair(i, AccDirFull));
-       
-       if (preferences.accounts.GetAccountType(i) == wxT("CardDAV") ||
-       preferences.accounts.GetAccountType(i) == wxT("carddav")){
-       
-               // Add a new timer using the existing account details.
-       
-               wxAccountSyncTimer *ActTmrPtr = new wxAccountSyncTimer;
-       
-               ActTmrPtr->SetupData(AccDirFull, AccName);
-               ActTmrPtr->SetupPointers(this, ActMgrPtr, ETagProcTimer.GetPointer(AccDirFull));
-               ActTmrPtr->Start(preferences.accounts.GetAccountRefresh(i) * 1000);
-               ActTmrPtr->SetOwner(this);
-               ActTmrPtr->Notify();
-       
-               // Add the timer to the list of timers.
-       
-               AccountSyncTimers.insert(std::make_pair(AccDirFull, ActTmrPtr));
-       
-               AccountTreeId = treAccounts->AppendItem(RootNode, preferences.accounts.GetAccountName(i), AccountNetID, -1);
-       
-       } else {
-                       
-               AccountTreeId = treAccounts->AppendItem(RootNode, preferences.accounts.GetAccountName(i), AccountID, -1);
-       
-       }
-       
-       // Go through the account directory and find contact files with
-       // 'KIND:group' set and add them to the list of groups for the account.
-       
-       AccDirFinal = GetAccountDir(AccDirFull, FALSE);
-       
-       wxDir vcardaccdir(AccDirFinal);
-    
-       wxString vCardFilename;
-       wxString vCardDataString;
-       wxString vCardFilenameFull;
-       //bool ProcFiles = FALSE;
-       
-       bool ProcFiles = vcardaccdir.GetFirst(&vCardFilename, wxEmptyString, wxDIR_FILES);
-       while(ProcFiles){
-
-       if (vCardFilename.Right(4) == wxT(".vcf") || 
-           vCardFilename.Right(4) == wxT(".VCF") || 
-           vCardFilename.Right(5) == wxT(".vcard") || 
-           vCardFilename.Right(5) == wxT(".VCARD")){
-
-               vCard Person;
-       
-               vCardFilenameFull.Append(AccDirFinal);
-               vCardFilenameFull.Append(wxT("/"));
-               vCardFilenameFull.Append(vCardFilename);
-       
-               Person.LoadFile(vCardFilenameFull);
-       
-               if (Person.MeetBaseSpecification()){
-
-                   vCardDataString = Person.Get(wxT("KIND"));
-
-                   if (vCardDataString == wxT("group")){
-                   
-                       // The vCard kind is a group. Add to the account's group list.
-                       
-                               GroupTreeId = treAccounts->AppendItem(AccountTreeId, Person.Get(wxT("FN")), AccountGrpID, -1);
-                               treAccounts->SetItemHasChildren(AccountTreeId, TRUE);
-                               AccountGroupList.insert(std::make_pair(intGroupID, i));
-                               AccountGroupFilename.insert(std::make_pair(intGroupID, vCardFilenameFull));
-                               AccountGroupTreeId.insert(std::make_pair(GroupTreeId, intGroupID));
-                   
-                   }
-
-                   /*if (SortMode == 1){
-
-                       // Split the name into sections.
-
-                       vCardName NameData = Person.GetName();
-           
-                       vCardDataString = NameData.Forename + wxT(" ") + NameData.Surname;
-           
-                   } else if (SortMode == 2){
-           
-                       // Split the name into sections.
-           
-                       vCardName NameData = Person.GetName();    
-           
-                       vCardDataString = NameData.Surname + wxT(", ") + NameData.Forename;
-           
-                   } else if (SortMode == 3){
-           
-                       // Check and make sure that the top most nickname is used.
-           
-                       vCardDataString = Person.Get(wxT("NICKNAME"));
-           
-                       if (vCardDataString.IsEmpty()){
-               
-                               vCardDataString = wxT("(no nickname)");
-               
-                       }
-           
-                   } else if (SortMode == 4){
-           
-                       vCardDataString = Person.Get(wxT("FN"));
-           
-                   }
-
-                   if (AscendingMode == TRUE){
-                       vCardNamesAsc.insert(std::make_pair(vCardDataString, vCardFilenameFull));
-                   } else {
-                       vCardNamesDsc.insert(std::make_pair(vCardDataString, vCardFilenameFull));
-                   }*/
-                   
-                   intGroupID++;
-       
-               } else {
-       
-               }
-
-       }
-
-           vCardFilename.Clear();
-           vCardFilenameFull.Clear();
-           vCardDataString.Clear();
-           ProcFiles = vcardaccdir.GetNext(&vCardFilename);
-           
-       }
-       
-       // Clearup for next account.
-       
-       AccDir.clear();
-       AccDirFull.clear();
-       AccDirFullSfx.clear();
-       AccDirFinal.clear();
-       AccName.clear();
-       
+    for (int i = 0; i < preferences.accounts.GetCount(); i++){
+        
+        if ((preferences.accounts.GetAccountType(i) == wxT("Local") ||
+             preferences.accounts.GetAccountType(i) == wxT("local")) && HideLocalABs == TRUE){
+            
+            continue;
+            
+        }
+        
+        if (preferences.accounts.GetAccountDirectory(i).IsEmpty()){
+            
+            continue;
+            
+        }
+        
+        AccDir = preferences.accounts.GetAccountDirectory(i);
+        AccDirFull = preferences.accounts.GetAccountDirectory(i);
+        AccDirFull.Trim();
+        AccDirFull.Append(wxT("."));
+        AccDirFullSfx.Append(preferences.accounts.GetAccountType(i));
+        AccDirFullSfx.LowerCase();
+        AccDirFullSfx.Trim();
+        AccDirFull.Append(AccDirFullSfx);
+        AccName = preferences.accounts.GetAccountName(i);
+        AccName.Trim();
+        AccountAccDirList.insert(std::make_pair(i, AccDirFull));
+        
+        if (preferences.accounts.GetAccountType(i) == wxT("CardDAV") ||
+            preferences.accounts.GetAccountType(i) == wxT("carddav")){
+            
+            // Check if the directory exists before doing anything.
+            
+            
+            
+            // Add a new timer using the existing account details.
+            
+            wxAccountSyncTimer *ActTmrPtr = new wxAccountSyncTimer;
+            
+            ActTmrPtr->SetupData(AccDirFull, AccName);
+            ActTmrPtr->SetupPointers(this, ActMgrPtr, ETagProcTimer.GetPointer(AccDirFull));
+            ActTmrPtr->Start(preferences.accounts.GetAccountRefresh(i) * 1000);
+            ActTmrPtr->SetOwner(this);
+            ActTmrPtr->Notify();
+            
+            // Add the timer to the list of timers.
+            
+            AccountSyncTimers.insert(std::make_pair(AccDirFull, ActTmrPtr));
+            
+            AccountTreeId = treAccounts->AppendItem(RootNode, preferences.accounts.GetAccountName(i), AccountNetID, -1);
+            
+        } else {
+            
+            AccountTreeId = treAccounts->AppendItem(RootNode, preferences.accounts.GetAccountName(i), AccountID, -1);
+            
+        }
+        
+        // Go through the account directory and find contact files with
+        // 'KIND:group' set and add them to the list of groups for the account.
+        
+        AccDirFinal = GetAccountDir(AccDirFull, FALSE);
+        
+        wxDir vcardaccdir(AccDirFinal);
+        
+        wxString vCardFilename;
+        wxString vCardDataString;
+        wxString vCardFilenameFull;
+        //bool ProcFiles = FALSE;
+        
+        bool ProcFiles = vcardaccdir.GetFirst(&vCardFilename, wxEmptyString, wxDIR_FILES);
+        while(ProcFiles){
+            
+            if (vCardFilename.Right(4) == wxT(".vcf") ||
+                vCardFilename.Right(4) == wxT(".VCF") ||
+                vCardFilename.Right(5) == wxT(".vcard") ||
+                vCardFilename.Right(5) == wxT(".VCARD")){
+                
+                vCard Person;
+                
+                vCardFilenameFull.Append(AccDirFinal);
+                vCardFilenameFull.Append(wxT("/"));
+                vCardFilenameFull.Append(vCardFilename);
+                
+                Person.LoadFile(vCardFilenameFull);
+                
+                if (Person.MeetBaseSpecification()){
+                    
+                    vCardDataString = Person.Get(wxT("KIND"));
+                    
+                    if (vCardDataString == wxT("group")){
+                        
+                        // The vCard kind is a group. Add to the account's group list.
+                        
+                        GroupTreeId = treAccounts->AppendItem(AccountTreeId, Person.Get(wxT("FN")), AccountGrpID, -1);
+                        treAccounts->SetItemHasChildren(AccountTreeId, TRUE);
+                        AccountGroupList.insert(std::make_pair(intGroupID, i));
+                        AccountGroupFilename.insert(std::make_pair(intGroupID, vCardFilenameFull));
+                        AccountGroupTreeId.insert(std::make_pair(GroupTreeId, intGroupID));
+                        
+                    }
+                    
+                    intGroupID++;
+                    
+                } else {
+                    
+                }
+                
+            }
+            
+            vCardFilename.Clear();
+            vCardFilenameFull.Clear();
+            vCardDataString.Clear();
+            ProcFiles = vcardaccdir.GetNext(&vCardFilename);
+            
+        }
+        
+        // Clearup for next account.
+        
+        AccDir.clear();
+        AccDirFull.clear();
+        AccDirFullSfx.clear();
+        AccDirFinal.clear();
+        AccName.clear();
+        
     }
     
     // Load the account settings as they are needed for connecting
     // to the servers.
     
     prefaccounts = preferences.accounts;
-
+    
 }
 
 void frmMain::ConflictResolution(wxCommandEvent& event){
-
-       frmConflictResolution *frameCR = new frmConflictResolution ( this );
-       vCardConflictObj *vCardConfObj = (vCardConflictObj*)event.GetClientData();
-       vCard *ClientDataPtr = vCardConfObj->vCardLocalData;
-       vCard *ServerDataPtr = vCardConfObj->vCardServerData;
-       //vCard *ServerDataPtr = vCardConfObj->vCardServerData;
-       //wxString Moo = ClientDataPtr->WriteString();
-       //vCard *ServerDataPtr = vCardConfObj->vCardServerData;
-       frameCR->LoadData(ClientDataPtr, ServerDataPtr, &MemoryFileList);
-       //frameCR->LoadData(vCardConfObj->vCardLocalData, vCardConfObj->vCardServerData, &MemoryFileList);
-       frameCR->ShowModal();
-       
-       int FinalConflictResult = frameCR->GetResult();
-       
-       wxCommandEvent event2(ACTMGR_RESUMEPROC);
-       event2.SetClientData(vCardConfObj->QRNotifData);
-       event2.SetInt(FinalConflictResult);
-       
-       delete frameCR;
-       frameCR = NULL;
-
-       frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);  
-       wxPostEvent(frameActMgr, event2);
-       
+    
+    frmConflictResolution *frameCR = new frmConflictResolution ( this );
+    vCardConflictObj *vCardConfObj = (vCardConflictObj*)event.GetClientData();
+    vCard *ClientDataPtr = vCardConfObj->vCardLocalData;
+    vCard *ServerDataPtr = vCardConfObj->vCardServerData;
+    //vCard *ServerDataPtr = vCardConfObj->vCardServerData;
+    //wxString Moo = ClientDataPtr->WriteString();
+    //vCard *ServerDataPtr = vCardConfObj->vCardServerData;
+    frameCR->LoadData(ClientDataPtr, ServerDataPtr, &MemoryFileList);
+    //frameCR->LoadData(vCardConfObj->vCardLocalData, vCardConfObj->vCardServerData, &MemoryFileList);
+    frameCR->ShowModal();
+    
+    int FinalConflictResult = frameCR->GetResult();
+    
+    wxCommandEvent event2(ACTMGR_RESUMEPROC);
+    event2.SetClientData(vCardConfObj->QRNotifData);
+    event2.SetInt(FinalConflictResult);
+    
+    delete frameCR;
+    frameCR = NULL;
+    
+    frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
+    wxPostEvent(frameActMgr, event2);
+    
 }
 
 void frmMain::UpdateContactList(wxCommandEvent& event){
-
-       UCNotif *ucd = (UCNotif*)event.GetClientData();
-
-       // Check if the active account is being displayed in the
-       // main window. If not, skip and delete the data.
-       
-       long longSelected = -1;
-       int intSelectedData = 0;
-       
-       if (ActiveAccount == ucd->ContactAccount){
-       
-               // Look at the list of contacts and if it matches the
-               // filename then update the name.
-               
-               for (;;){
-
-                       longSelected = lstContacts->GetNextItem(longSelected, 
-                               wxLIST_NEXT_ALL,
-                               wxLIST_STATE_DONTCARE);
-                       
-                       if (longSelected == -1){
-                       
-                               break;
-                       
-                       }
-                               
-                       intSelectedData = lstContacts->GetItemData(longSelected);
-                       
-                       if (ucd->ContactFilename == ContactsFileIndex[intSelectedData]){
-                       
-                               // Work out which sorting mode we are in.
-
-                               if (SortMode == 1){
-
-                                       // First Name, Last Name.
-
-                                       lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Forename + wxT(" ") + ucd->ContactNameArray.Surname);
-
-                               } else if (SortMode == 2){
-
-                                       // Last Name, First Name.
-
-                                       lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Surname + wxT(", ") + ucd->ContactNameArray.Forename);
-
-                               } else if (SortMode == 3){
-
-                                       // Nickname.
-
-                                       lstContacts->SetItem(longSelected, 0, ucd->ContactNickname);
-
-                               } else if (SortMode == 4){
-                                       
-                                       // Display As.
-
-                                       lstContacts->SetItem(longSelected, 0, ucd->ContactName);
-
-                               }
-
-                       
-                       }
-       
-                       // If the filename is the one loaded into the 
-                       // browser control, then update this too.
-               
-                       if (ActiveFilename == ContactsFileIndex[intSelectedData]){
-                       
-                               wxListEvent nullevent;
-                               ShowContactInfo(nullevent);
-                       
-                       }
-               
-               }
-       
-       }
-       
-       for (std::map<int, void*>::iterator WindowIter = WindowListPointers.begin();
-               WindowIter != WindowListPointers.end(); WindowIter++){
-                               
-               if (WindowListType[WindowIter->first] != 0){
-               
-                       continue;
-               
-               }
-               
-               frmContact *frmContactPtr = static_cast<frmContact*>(WindowIter->second);
-               
-               if (frmContactPtr->GetFilename() == ucd->ContactFilename){
-               
-                       vCard UpdatedPerson;
-                       UpdatedPerson.LoadFile(ucd->ContactFilename);
-                       frmContactPtr->SetupContactData(&UpdatedPerson);
-               
-               }
-               
-       }
-
-       // Send message to search window controller subroutine and 
-       // pass that notification onto the search windows.
-       
-       // Setup the new pointer to use the existing UCNotif without
-       // deleting it.
-       
-       UCNotif *ucd2 = ucd;
-       
-       wxCommandEvent sup(SE_UPDATECONTACTNOTIF);
-       sup.SetClientData(ucd2);
-       wxPostEvent(this, sup);
-
-       // Clear up the unused pointer.
-       
-       ucd = NULL;
-
+    
+    UCNotif *ucd = (UCNotif*)event.GetClientData();
+    
+    // Check if the active account is being displayed in the
+    // main window. If not, skip and delete the data.
+    
+    long longSelected = -1;
+    int intSelectedData = 0;
+    
+    if (ActiveAccount == ucd->ContactAccount){
+        
+        // Look at the list of contacts and if it matches the
+        // filename then update the name.
+        
+        for (;;){
+            
+            longSelected = lstContacts->GetNextItem(longSelected,
+                                                    wxLIST_NEXT_ALL,
+                                                    wxLIST_STATE_DONTCARE);
+            
+            if (longSelected == -1){
+                
+                break;
+                
+            }
+            
+            intSelectedData = lstContacts->GetItemData(longSelected);
+            
+            if (ucd->ContactFilename == ContactsFileIndex[intSelectedData]){
+                
+                // Work out which sorting mode we are in.
+                
+                if (SortMode == 1){
+                    
+                    // First Name, Last Name.
+                    
+                    lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Forename + wxT(" ") + ucd->ContactNameArray.Surname);
+                    
+                } else if (SortMode == 2){
+                    
+                    // Last Name, First Name.
+                    
+                    lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Surname + wxT(", ") + ucd->ContactNameArray.Forename);
+                    
+                } else if (SortMode == 3){
+                    
+                    // Nickname.
+                    
+                    lstContacts->SetItem(longSelected, 0, ucd->ContactNickname);
+                    
+                } else if (SortMode == 4){
+                    
+                    // Display As.
+                    
+                    lstContacts->SetItem(longSelected, 0, ucd->ContactName);
+                    
+                }
+                
+                
+            }
+            
+            // If the filename is the one loaded into the
+            // browser control, then update this too.
+            
+            if (ActiveFilename == ContactsFileIndex[intSelectedData]){
+                
+                wxListEvent nullevent;
+                ShowContactInfo(nullevent);
+                
+            }
+            
+        }
+        
+    }
+    
+    for (std::map<int, void*>::iterator WindowIter = WindowListPointers.begin();
+         WindowIter != WindowListPointers.end(); WindowIter++){
+        
+        if (WindowListType[WindowIter->first] != 0){
+            
+            continue;
+            
+        }
+        
+        frmContact *frmContactPtr = static_cast<frmContact*>(WindowIter->second);
+        
+        if (frmContactPtr->GetFilename() == ucd->ContactFilename){
+            
+            vCard UpdatedPerson;
+            UpdatedPerson.LoadFile(ucd->ContactFilename);
+            frmContactPtr->SetupContactData(&UpdatedPerson);
+            
+        }
+        
+    }
+    
+    // Send message to search window controller subroutine and
+    // pass that notification onto the search windows.
+    
+    // Setup the new pointer to use the existing UCNotif without
+    // deleting it.
+    
+    UCNotif *ucd2 = ucd;
+    
+    wxCommandEvent sup(SE_UPDATECONTACTNOTIF);
+    sup.SetClientData(ucd2);
+    wxPostEvent(this, sup);
+    
+    // Clear up the unused pointer.
+    
+    ucd = NULL;
+    
 }
 
 void frmMain::UpdateAccountList(wxCommandEvent& event){
-
+    
 }
 
 void frmMain::SetupPointers(void *ActMgrPtrInc){
-
-       ActMgrPtr = ActMgrPtrInc;
-
+    
+    ActMgrPtr = ActMgrPtrInc;
+    
 }
 
 void frmMain::SetupForm(){
-
-       frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
-       frameActMgr->SetupPointers(&ETagProcTimer, this);
-       
-       // Setup the contact information icons for later.
-       
-       wxFileSystem::AddHandler(new wxMemoryFSHandler);
-       wxImage ciicon_png;
-       //wxBitmap ciicon;
-       
-       wxMemoryInputStream ciptostream(icons_cipto_png, sizeof(icons_cipto_png));
-       ciicon_png.LoadFile(ciptostream, wxBITMAP_TYPE_PNG);
-       wxMemoryFSHandler::AddFile(wxT("cipto.png"), ciicon_png, wxBITMAP_TYPE_PNG);
-       
-       wxMemoryInputStream cilogstream(icons_cilog_png, sizeof(icons_cilog_png));
-       ciicon_png.LoadFile(cilogstream, wxBITMAP_TYPE_PNG);
-       wxMemoryFSHandler::AddFile(wxT("cilog.png"), ciicon_png, wxBITMAP_TYPE_PNG);
-       
-       wxMemoryInputStream cisndstream(icons_cisnd_png, sizeof(icons_cisnd_png));
-       ciicon_png.LoadFile(cisndstream, wxBITMAP_TYPE_PNG);
-       wxMemoryFSHandler::AddFile(wxT("cisnd.png"), ciicon_png, wxBITMAP_TYPE_PNG);
-       
-       wxMemoryInputStream cikeystream(icons_cikey_png, sizeof(icons_cikey_png));
-       ciicon_png.LoadFile(cikeystream, wxBITMAP_TYPE_PNG);
-       wxMemoryFSHandler::AddFile(wxT("cikey.png"), ciicon_png, wxBITMAP_TYPE_PNG);
-       
-       wxMemoryInputStream civenstream(icons_civen_png, sizeof(icons_civen_png));
-       ciicon_png.LoadFile(civenstream, wxBITMAP_TYPE_PNG);
-       wxMemoryFSHandler::AddFile(wxT("civen.png"), ciicon_png, wxBITMAP_TYPE_PNG);
-       
-       wxMemoryInputStream ciextstream(icons_ciext_png, sizeof(icons_ciext_png));
-       ciicon_png.LoadFile(ciextstream, wxBITMAP_TYPE_PNG);
-       wxMemoryFSHandler::AddFile(wxT("ciext.png"), ciicon_png, wxBITMAP_TYPE_PNG);
-
-       LoadPreferences();
-
+    
+    frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
+    frameActMgr->SetupPointers(&ETagProcTimer, this);
+    
+    // Setup the contact information icons for later.
+    
+    wxFileSystem::AddHandler(new wxMemoryFSHandler);
+    wxImage ciicon_png;
+    //wxBitmap ciicon;
+    
+    wxMemoryInputStream ciptostream(icons_cipto_png, sizeof(icons_cipto_png));
+    ciicon_png.LoadFile(ciptostream, wxBITMAP_TYPE_PNG);
+    wxMemoryFSHandler::AddFile(wxT("cipto.png"), ciicon_png, wxBITMAP_TYPE_PNG);
+    
+    wxMemoryInputStream cilogstream(icons_cilog_png, sizeof(icons_cilog_png));
+    ciicon_png.LoadFile(cilogstream, wxBITMAP_TYPE_PNG);
+    wxMemoryFSHandler::AddFile(wxT("cilog.png"), ciicon_png, wxBITMAP_TYPE_PNG);
+    
+    wxMemoryInputStream cisndstream(icons_cisnd_png, sizeof(icons_cisnd_png));
+    ciicon_png.LoadFile(cisndstream, wxBITMAP_TYPE_PNG);
+    wxMemoryFSHandler::AddFile(wxT("cisnd.png"), ciicon_png, wxBITMAP_TYPE_PNG);
+    
+    wxMemoryInputStream cikeystream(icons_cikey_png, sizeof(icons_cikey_png));
+    ciicon_png.LoadFile(cikeystream, wxBITMAP_TYPE_PNG);
+    wxMemoryFSHandler::AddFile(wxT("cikey.png"), ciicon_png, wxBITMAP_TYPE_PNG);
+    
+    wxMemoryInputStream civenstream(icons_civen_png, sizeof(icons_civen_png));
+    ciicon_png.LoadFile(civenstream, wxBITMAP_TYPE_PNG);
+    wxMemoryFSHandler::AddFile(wxT("civen.png"), ciicon_png, wxBITMAP_TYPE_PNG);
+    
+    wxMemoryInputStream ciextstream(icons_ciext_png, sizeof(icons_ciext_png));
+    ciicon_png.LoadFile(ciextstream, wxBITMAP_TYPE_PNG);
+    wxMemoryFSHandler::AddFile(wxT("ciext.png"), ciicon_png, wxBITMAP_TYPE_PNG);
+    
+    LoadPreferences();
+    
 }
 
 void frmMain::UpdateSearchContactLists(wxCommandEvent& event){
-
-       // Go through each of the search windows and 
-       // send the required notification to update the
-       // contact information.
-       
-       // Get the event notification data.
-       
-       UCNotif *ucd = (UCNotif*)event.GetClientData();
-       
-       // Process each search window giving the new details.
-               
-       for (std::map<void*,wxString>::iterator switer = SearchWindowList.begin(); 
-       switer != SearchWindowList.end(); switer++){
-       
-               // Duplicate the event notification data.
-               
-               UCNotif *ucd2 = new UCNotif;
-               
-               ucd2->ContactAccount = ucd->ContactAccount;
-               ucd2->ContactFilename = ucd->ContactFilename;
-               ucd2->ContactName = ucd->ContactName;
-               ucd2->ContactNickname = ucd->ContactNickname;
-               ucd2->ContactNameArray = ucd->ContactNameArray;
-               
-               // Pass the data to the search window for processing.
-       
-               frmSearch *frameSCH = static_cast<frmSearch*>(switer->first);
-               wxCommandEvent schupdate(SE_UPDATERESULT);
-               schupdate.SetClientData(ucd2);
-               wxPostEvent(frameSCH, schupdate);
-               
-               // Clear up the pointer prior to variable deletion.
-               
-               frameSCH = NULL;
-       
-       }
-       
-       delete ucd;
-       ucd = NULL;
-
+    
+    // Go through each of the search windows and
+    // send the required notification to update the
+    // contact information.
+    
+    // Get the event notification data.
+    
+    UCNotif *ucd = (UCNotif*)event.GetClientData();
+    
+    // Process each search window giving the new details.
+    
+    for (std::map<void*,wxString>::iterator switer = SearchWindowList.begin();
+         switer != SearchWindowList.end(); switer++){
+        
+        // Duplicate the event notification data.
+        
+        UCNotif *ucd2 = new UCNotif;
+        
+        ucd2->ContactAccount = ucd->ContactAccount;
+        ucd2->ContactFilename = ucd->ContactFilename;
+        ucd2->ContactName = ucd->ContactName;
+        ucd2->ContactNickname = ucd->ContactNickname;
+        ucd2->ContactNameArray = ucd->ContactNameArray;
+        
+        // Pass the data to the search window for processing.
+        
+        frmSearch *frameSCH = static_cast<frmSearch*>(switer->first);
+        wxCommandEvent schupdate(SE_UPDATERESULT);
+        schupdate.SetClientData(ucd2);
+        wxPostEvent(frameSCH, schupdate);
+        
+        // Clear up the pointer prior to variable deletion.
+        
+        frameSCH = NULL;
+        
+    }
+    
+    delete ucd;
+    ucd = NULL;
+    
 }
 
 void frmMain::OpenFindContactsWindow(wxCommandEvent& event){
-
-       WindowMenuItemID++;
-
-       frmSearch *frameSCH = new frmSearch ( this );
-       frameSCH->SetUID(WindowMenuItemID);
-       frameSCH->Show(true);
-       
-       WindowData *WData = new WindowData;
-
-       WData->DataType = 2;
-       WData->WindowPointer = (void*)frameSCH;
-       WData->WindowID = WindowMenuItemID;
-
-       wxCommandEvent addevent(WINDOW_ADD);
-       addevent.SetClientData(WData);
-       wxPostEvent(this, addevent);
-       
-       // Add pointer to the list of open search windows.
-       
-       SearchWindowList.insert(std::make_pair(frameSCH, wxT("Search")));
-       
-       WData = NULL;
-
+    
+    WindowMenuItemID++;
+    
+    frmSearch *frameSCH = new frmSearch ( this );
+    frameSCH->SetUID(WindowMenuItemID);
+    frameSCH->Show(true);
+    
+    WindowData *WData = new WindowData;
+    
+    WData->DataType = 2;
+    WData->WindowPointer = (void*)frameSCH;
+    WData->WindowID = WindowMenuItemID;
+    
+    wxCommandEvent addevent(WINDOW_ADD);
+    addevent.SetClientData(WData);
+    wxPostEvent(this, addevent);
+    
+    // Add pointer to the list of open search windows.
+    
+    SearchWindowList.insert(std::make_pair(frameSCH, wxT("Search")));
+    
+    WData = NULL;
+    
 }
 
 void frmMain::RemoveContactsWindowPointer(wxCommandEvent& event){
-
-       //frmSearch *frameSCH = static_cast<frmSearch*>(ActMgrPtr);
-       void *frameSCH = (void*)event.GetClientData();
-
-       SearchWindowList.erase(frameSCH);
-       
-       frameSCH = NULL;
-
+    
+    //frmSearch *frameSCH = static_cast<frmSearch*>(ActMgrPtr);
+    void *frameSCH = (void*)event.GetClientData();
+    
+    SearchWindowList.erase(frameSCH);
+    
+    frameSCH = NULL;
+    
 }
 
 void frmMain::RemoveContactEditorWindowPointer(wxCommandEvent& event){
-
-       void *frameSCH = (void*)event.GetClientData();
-
-       SearchWindowList.erase(frameSCH);
-       
-       frameSCH = NULL;
-
+    
+    void *frameSCH = (void*)event.GetClientData();
+    
+    SearchWindowList.erase(frameSCH);
+    
+    frameSCH = NULL;
+    
 }
 
 void frmMain::UpdateWindowList(wxCommandEvent& event){
-
-       // Update the Window List.
-       
-       // Delete the existing items in the window menu.
-
-       // Get the list of contacts.
-       
-       // Insert a separator.
-       
-       // Get the list of search windows.
-
+    
+    // Update the Window List.
+    
+    // Delete the existing items in the window menu.
+    
+    // Get the list of contacts.
+    
+    // Insert a separator.
+    
+    // Get the list of search windows.
+    
 }
 
 void frmMain::RevealContact(wxCommandEvent& event){
-
-       UCNotif *uc = (UCNotif*)event.GetClientData();
-       
-       // Switch the account to the one passed.
-
-       wxTreeItemIdValue cookie;
-       wxTreeItemId next = treAccounts->GetRootItem();
-       wxTreeItemId nextChild;
-       
-       for (int i = 0; i < prefaccounts.GetCount(); i++){
-      
-               if (!nextChild){
-                   nextChild = treAccounts->GetFirstChild(next, cookie);
-               } else {
-                   nextChild = treAccounts->GetNextSibling(nextChild);
-               }
-       
-               //AccountName = treAccounts->GetItemText(nextChild);            
-       
-               if (uc->ContactAccount == AccountAccDirList[i]){
-
-                       //AccControl->();               
-                       treAccounts->SelectItem(nextChild, TRUE);
-                       AccCtrl->SetText(treAccounts->GetItemText(nextChild));
-               
-               }
-       
-       }
-       
-       // Switch the contact to the one passed.
-
-       long longSelected = -1;
-       int intSelectedData = 0;
-
-       for (;;){
-       
-               longSelected = lstContacts->GetNextItem(longSelected, 
-                       wxLIST_NEXT_ALL,
-                       wxLIST_STATE_DONTCARE);
-                       
-               if (longSelected == -1){
-                       
-                       break;
-                       
-               }
-                               
-               intSelectedData = lstContacts->GetItemData(longSelected);
-               
-               // Compare the filename with the one received.
-               // If they match then select it.
-       
-               if (ContactsFileIndex[intSelectedData] == uc->ContactFilename){
-               
-                       // Select.
-               
-                       lstContacts->SetItemState(longSelected, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
-                       lstContacts->EnsureVisible(longSelected);
-               
-                       break;
-               
-               }
-
-       }
-
+    
+    UCNotif *uc = (UCNotif*)event.GetClientData();
+    
+    // Switch the account to the one passed.
+    
+    wxTreeItemIdValue cookie;
+    wxTreeItemId next = treAccounts->GetRootItem();
+    wxTreeItemId nextChild;
+    
+    for (int i = 0; i < prefaccounts.GetCount(); i++){
+        
+        if (!nextChild){
+            nextChild = treAccounts->GetFirstChild(next, cookie);
+        } else {
+            nextChild = treAccounts->GetNextSibling(nextChild);
+        }
+        
+        //AccountName = treAccounts->GetItemText(nextChild);
+        
+        if (uc->ContactAccount == AccountAccDirList[i]){
+            
+            //AccControl->();
+            treAccounts->SelectItem(nextChild, TRUE);
+            AccCtrl->SetText(treAccounts->GetItemText(nextChild));
+            
+        }
+        
+    }
+    
+    // Switch the contact to the one passed.
+    
+    long longSelected = -1;
+    int intSelectedData = 0;
+    
+    for (;;){
+        
+        longSelected = lstContacts->GetNextItem(longSelected,
+                                                wxLIST_NEXT_ALL,
+                                                wxLIST_STATE_DONTCARE);
+        
+        if (longSelected == -1){
+            
+            break;
+            
+        }
+        
+        intSelectedData = lstContacts->GetItemData(longSelected);
+        
+        // Compare the filename with the one received.
+        // If they match then select it.
+        
+        if (ContactsFileIndex[intSelectedData] == uc->ContactFilename){
+            
+            // Select.
+            
+            lstContacts->SetItemState(longSelected, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
+            lstContacts->EnsureVisible(longSelected);
+            
+            break;
+            
+        }
+        
+    }
+    
 }
 
 void frmMain::DeleteContact(wxCommandEvent& event){
-
-       // Check if a contact is selected.
-
-       long intSelected = -1;
-       int intSelectedData = 0;
-       long intContactSeekNum = -1;
-       wxString wxSContactName;
-       
-       intSelected = lstContacts->GetNextItem(intSelected, 
-       wxLIST_NEXT_ALL,
-       wxLIST_STATE_SELECTED); 
-
-       if (intSelected == -1){
-               return;
-       }
-
-       frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
-
-       // Get the item data of the contact.
-
-       intContactSeekNum = lstContacts->GetItemData(intSelected);
-
-       // Get the name of the contact.
-       
-       wxSContactName = lstContacts->GetItemText(intSelected);
-
-       // Display a message confirming if the contact should
-       // be deleted.
-       
-       int QuestionResponse;
-
-       QuestionResponse = wxMessageBox(_("Are you sure you want to delete this contact?"), _("Delete contact"), wxYES_NO, this);
-
-       if (QuestionResponse == wxNO){
-
-               // Exit the subroutine
-
-               return;
-
-       }
-       
-       // Delete the contact.
-
-       if (!wxRemoveFile(ContactsFileIndex[intContactSeekNum])){
-       
-               wxMessageBox(_("Unable to delete the contact."), _("Cannot delete contact"), wxOK, this);
-               return;
-       
-       }
-
-       // Remove the contact from the list.
-
-       lstContacts->DeleteItem(intSelected);
-       
-       // Update the search windows, removing the deleted
-       // contact.
-       
-       UCNotif *ucd = new UCNotif;
-               
-       ucd->ContactAccount = ActiveAccount;
-       ucd->ContactFilename = ContactsFileIndex[intContactSeekNum];
-       
-       for (std::map<void*,wxString>::iterator switer = SearchWindowList.begin(); 
-       switer != SearchWindowList.end(); switer++){
-       
-               // Duplicate the event notification data.
-       
-               UCNotif *ucd2 = new UCNotif;
-
-               ucd2->ContactAccount = ucd->ContactAccount;
-               ucd2->ContactFilename = ucd->ContactFilename;
-               
-               // Pass the data to the search window for processing.
-       
-               frmSearch *frameSCH = static_cast<frmSearch*>(switer->first);
-               wxCommandEvent schdelete(SE_DELETERESULT);
-               schdelete.SetClientData(ucd2);
-               wxPostEvent(frameSCH, schdelete);
-               
-               // Clear up the pointer prior to variable deletion.
-               
-               frameSCH = NULL;
-               ucd2 = NULL;
-       
-       }
-       
-       // Clear the wxHTMLWindow.
-       
-       wxString EmptyPage = wxT("");
-       
-       htmContactData->SetPage(EmptyPage);
-       
-       wxStringTokenizer wSTFilename(ContactsFileIndex[intContactSeekNum], wxT("/"));
-       
-       wxString wxSplitFilename;
-       wxString wxSDataURL;
     
-       while(wSTFilename.HasMoreTokens()){
+    // Check if a contact is selected.
     
-               wxSplitFilename = wSTFilename.GetNextToken();
+    long intSelected = -1;
+    int intSelectedData = 0;
+    long intContactSeekNum = -1;
+    wxString wxSContactName;
+    
+    intSelected = lstContacts->GetNextItem(intSelected,
+                                           wxLIST_NEXT_ALL,
+                                           wxLIST_STATE_SELECTED);
+    
+    if (intSelected == -1){
+        return;
+    }
+    
+    frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
+    
+    // Get the item data of the contact.
+    
+    intContactSeekNum = lstContacts->GetItemData(intSelected);
+    
+    // Get the name of the contact.
+    
+    wxSContactName = lstContacts->GetItemText(intSelected);
+    
+    // Display a message confirming if the contact should
+    // be deleted.
+    
+    int QuestionResponse;
+    
+    QuestionResponse = wxMessageBox(_("Are you sure you want to delete this contact?"), _("Delete contact"), wxYES_NO, this);
+    
+    if (QuestionResponse == wxNO){
+        
+        // Exit the subroutine
+        
+        return;
+        
+    }
+    
+    // Delete the contact.
+    
+    if (!wxRemoveFile(ContactsFileIndex[intContactSeekNum])){
+        
+        wxMessageBox(_("Unable to delete the contact."), _("Cannot delete contact"), wxOK, this);
+        return;
+        
+    }
+    
+    // Remove the contact from the list.
+    
+    lstContacts->DeleteItem(intSelected);
+    
+    // Update the search windows, removing the deleted
+    // contact.
+    
+    UCNotif *ucd = new UCNotif;
+    
+    ucd->ContactAccount = ActiveAccount;
+    ucd->ContactFilename = ContactsFileIndex[intContactSeekNum];
+    
+    for (std::map<void*,wxString>::iterator switer = SearchWindowList.begin();
+         switer != SearchWindowList.end(); switer++){
+        
+        // Duplicate the event notification data.
+        
+        UCNotif *ucd2 = new UCNotif;
+        
+        ucd2->ContactAccount = ucd->ContactAccount;
+        ucd2->ContactFilename = ucd->ContactFilename;
+        
+        // Pass the data to the search window for processing.
+        
+        frmSearch *frameSCH = static_cast<frmSearch*>(switer->first);
+        wxCommandEvent schdelete(SE_DELETERESULT);
+        schdelete.SetClientData(ucd2);
+        wxPostEvent(frameSCH, schdelete);
+        
+        // Clear up the pointer prior to variable deletion.
+        
+        frameSCH = NULL;
+        ucd2 = NULL;
+        
+    }
+    
+    // Clear the wxHTMLWindow.
+    
+    wxString EmptyPage = wxT("");
+    
+    htmContactData->SetPage(EmptyPage);
+    
+    wxStringTokenizer wSTFilename(ContactsFileIndex[intContactSeekNum], wxT("/"));
+    
+    wxString wxSplitFilename;
+    wxString wxSDataURL;
+    
+    while(wSTFilename.HasMoreTokens()){
+        
+        wxSplitFilename = wSTFilename.GetNextToken();
+        
+    }
+    
+    if (ActiveAccountType == wxT("CardDAV") || ActiveAccountType == wxT("carddav")){
+        
+        // Update the ETagDB and mark it as deleted.
+        
+        ETagDB *ETagDBPtr = ETagProcTimer.GetPointer(ActiveAccount);
+        
+        ETagDBPtr->UpdateETag(wxSplitFilename, wxT("DELETED"));
+        
+        // Get the Data URL.
+        
+        wxTreeItemIdValue cookie;
+        wxTreeItemId next = treAccounts->GetRootItem();
+        
+        wxTreeItemId selectedChild = treAccounts->GetSelection();
+        wxTreeItemId nextChild;
+        
+        for (int i = 0; i < prefaccounts.GetCount(); i++){
+            
+            if (!nextChild){
+                nextChild = treAccounts->GetFirstChild(next, cookie);
+            }
+            else {
+                nextChild = treAccounts->GetNextSibling(nextChild);
+            }
+            
+            if (nextChild == selectedChild){
+                wxSDataURL = prefaccounts.GetAccountDirPrefix(i) + wxT("/") + wxSplitFilename;
+                
+            }
+            
+        }
+        
+        // Add task to the activity monitor to delete the contact.
+        
+        frameActMgr->AddTask(2, wxSContactName, ActiveAccount, wxSDataURL, wxSplitFilename, ContactsFileIndex[intContactSeekNum], wxT(""));
+        
+    }
+    
+    // Clear the variable. Don't delete as it will mess things up.
+    
+    ContactsFileIndex[intContactSeekNum] = wxT("");
+    
+    delete ucd;
+    ucd = NULL;
     
-       }
-
-       if (ActiveAccountType == wxT("CardDAV") || ActiveAccountType == wxT("carddav")){
-
-               // Update the ETagDB and mark it as deleted.
-
-               ETagDB *ETagDBPtr = ETagProcTimer.GetPointer(ActiveAccount);
-
-               ETagDBPtr->UpdateETag(wxSplitFilename, wxT("DELETED"));
-
-               // Get the Data URL.
-
-               wxTreeItemIdValue cookie;
-               wxTreeItemId next = treAccounts->GetRootItem();
-
-               wxTreeItemId selectedChild = treAccounts->GetSelection();
-               wxTreeItemId nextChild;
-
-               for (int i = 0; i < prefaccounts.GetCount(); i++){
-
-                       if (!nextChild){
-                               nextChild = treAccounts->GetFirstChild(next, cookie);
-                       }
-                       else {
-                               nextChild = treAccounts->GetNextSibling(nextChild);
-                       }
-
-                       if (nextChild == selectedChild){
-                               wxSDataURL = prefaccounts.GetAccountDirPrefix(i) + wxT("/") + wxSplitFilename;
-
-                       }
-
-               }
-
-               // Add task to the activity monitor to delete the contact.
-
-               frameActMgr->AddTask(2, wxSContactName, ActiveAccount, wxSDataURL, wxSplitFilename, ContactsFileIndex[intContactSeekNum], wxT(""));
-
-       }
-       
-       // Clear the variable. Don't delete as it will mess things up.
-       
-       ContactsFileIndex[intContactSeekNum] = wxT("");
-       
-       delete ucd;
-       ucd = NULL;
-
 }
 
 void frmMain::EmptyServerDialog(wxCommandEvent& event){
-
-       QRNotif *qrn = (QRNotif *)event.GetClientData();                
-
-       int QResponse = wxMessageBox(_("The list of contacts on the server is empty. Upload all locally stored contacts for this account now?"), _("No contacts on server"), wxYES_NO, this);
-
-       wxCommandEvent event2(ACTMGR_RESUMEPROC);
-       event2.SetInt(*qrn->QResponse);
-       event2.SetClientData(qrn->PausePtr);
-
-       frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
-
-       wxPostEvent(frameActMgr, event2);
-
+    
+    QRNotif *qrn = (QRNotif *)event.GetClientData();
+    
+    int QResponse = wxMessageBox(_("The list of contacts on the server is empty. Upload all locally stored contacts for this account now?"), _("No contacts on server"), wxYES_NO, this);
+    
+    wxCommandEvent event2(ACTMGR_RESUMEPROC);
+    event2.SetInt(*qrn->QResponse);
+    event2.SetClientData(qrn->PausePtr);
+    
+    frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
+    
+    wxPostEvent(frameActMgr, event2);
+    
 }
 
 void frmMain::DeleteContactSync(wxString &Account, wxString &Filename){
-
-       // Remove the contact from the window after syncronising.
-
-       // Check which account is currently active in the window.
-       // If it is different from the one passed to this subroutine then
-       // exit from the subroutine.
-       
-       if (Account != ActiveAccount){
-               return;
-       }
-       
-       long longSelected = -1;
-       int intSelectedData = 0;
-
-       for (;;){
-       
-               longSelected = lstContacts->GetNextItem(longSelected, 
-                       wxLIST_NEXT_ALL,
-                       wxLIST_STATE_DONTCARE);
-                       
-               if (longSelected == -1){
-                       
-                       break;
-                       
-               }
-                               
-               intSelectedData = lstContacts->GetItemData(longSelected);
-               
-               // Compare the filename with the one received.
-               // If they match then select it.
-       
-               if (ContactsFileIndex[intSelectedData] == Filename){
-               
-                       // Remove the contact from the window.
-               
-                       lstContacts->DeleteItem(intSelectedData);
-               
-                       // Check if contact is the selected contact in the HTML window and
-                       // if it is then clear the window.
-               
-                       if (ActiveFilename == Filename){
-                       
-                               wxString EmptyPage = wxT("");
-                               htmContactData->SetPage(EmptyPage);
-                       
-                       }
-               
-                       break;
-               
-               }
-
-       }       
-
+    
+    // Remove the contact from the window after syncronising.
+    
+    // Check which account is currently active in the window.
+    // If it is different from the one passed to this subroutine then
+    // exit from the subroutine.
+    
+    if (Account != ActiveAccount){
+        return;
+    }
+    
+    long longSelected = -1;
+    int intSelectedData = 0;
+    
+    for (;;){
+        
+        longSelected = lstContacts->GetNextItem(longSelected,
+                                                wxLIST_NEXT_ALL,
+                                                wxLIST_STATE_DONTCARE);
+        
+        if (longSelected == -1){
+            
+            break;
+            
+        }
+        
+        intSelectedData = lstContacts->GetItemData(longSelected);
+        
+        // Compare the filename with the one received.
+        // If they match then select it.
+        
+        if (ContactsFileIndex[intSelectedData] == Filename){
+            
+            // Remove the contact from the window.
+            
+            lstContacts->DeleteItem(intSelectedData);
+            
+            // Check if contact is the selected contact in the HTML window and
+            // if it is then clear the window.
+            
+            if (ActiveFilename == Filename){
+                
+                wxString EmptyPage = wxT("");
+                htmContactData->SetPage(EmptyPage);
+                
+            }
+            
+            break;
+            
+        }
+        
+    }
+    
 }
 
 
 
 void frmMain::SortFNLN( wxCommandEvent& event ) {
-
-       wxTreeEvent NullEvent;
-       SortMode = 1;
-       LoadContactList(NullEvent);
-
+    
+    wxTreeEvent NullEvent;
+    SortMode = 1;
+    LoadContactList(NullEvent);
+    
 }
 
 void frmMain::SortLNFN( wxCommandEvent& event ) {
-
-       wxTreeEvent NullEvent;
-       SortMode = 2;
-       LoadContactList(NullEvent);
-
+    
+    wxTreeEvent NullEvent;
+    SortMode = 2;
+    LoadContactList(NullEvent);
+    
 }
 
 void frmMain::SortNickname( wxCommandEvent& event ) {
-
-       wxTreeEvent NullEvent;
-       SortMode = 3;
-       LoadContactList(NullEvent);
-
+    
+    wxTreeEvent NullEvent;
+    SortMode = 3;
+    LoadContactList(NullEvent);
+    
 }
 
 void frmMain::SortDisplayAs( wxCommandEvent& event ) {
-
-       wxTreeEvent NullEvent;
-       SortMode = 4;
-       LoadContactList(NullEvent);
-
+    
+    wxTreeEvent NullEvent;
+    SortMode = 4;
+    LoadContactList(NullEvent);
+    
 }
 
 void frmMain::SortAscending( wxCommandEvent& event ) {
-
-       wxTreeEvent NullEvent;
-       AscendingMode = TRUE;
-       LoadContactList(NullEvent);
-
+    
+    wxTreeEvent NullEvent;
+    AscendingMode = TRUE;
+    LoadContactList(NullEvent);
+    
 }
 
 void frmMain::SortDescending( wxCommandEvent& event ) {
-
-       wxTreeEvent NullEvent;
-       AscendingMode = FALSE;
-       LoadContactList(NullEvent);
-
-} 
+    
+    wxTreeEvent NullEvent;
+    AscendingMode = FALSE;
+    LoadContactList(NullEvent);
+    
+}
 
 void frmMain::ToggleStatusBar( wxCommandEvent& event ) {
-
-       if (stbBottom->IsShown() == TRUE){
-       
-               stbBottom->Hide();
-       
-       } else {
-       
-               stbBottom->Show();
-       
-       }
-
-       this->Layout();
-
+    
+    if (stbBottom->IsShown() == TRUE){
+        
+        stbBottom->Hide();
+        
+    } else {
+        
+        stbBottom->Show();
+        
+    }
+    
+    this->Layout();
+    
 }
 
 void frmMain::ActivityIconStart( wxCommandEvent& event ){
-
-       // Display the activity icon.
-
-       imgActivityStatus->SetBitmap(*imgActIcon1);
-       ActivityIconStatus = 0;
-
+    
+    // Display the activity icon.
+    
+    imgActivityStatus->SetBitmap(*imgActIcon1);
+    ActivityIconStatus = 0;
+    
 }
 
 void frmMain::ActivityIconShuffle( wxCommandEvent& event ){
-
-       switch (ActivityIconStatus){
-       
-               case 0:
-                       imgActivityStatus->SetBitmap(*imgActIcon1);
-                       ActivityIconStatus = 1;
-                       break;
-               case 1:
-                       imgActivityStatus->SetBitmap(*imgActIcon2);
-                       ActivityIconStatus = 2;
-                       break;
-               case 2:
-                       imgActivityStatus->SetBitmap(*imgActIcon3);
-                       ActivityIconStatus = 3;
-                       break;
-               case 3:
-                       imgActivityStatus->SetBitmap(*imgActIcon4);
-                       ActivityIconStatus = 0;
-                       break;
-               default:
-                       ActivityIconStatus = 0;
-       
-       }
-
+    
+    switch (ActivityIconStatus){
+            
+        case 0:
+            imgActivityStatus->SetBitmap(*imgActIcon1);
+            ActivityIconStatus = 1;
+            break;
+        case 1:
+            imgActivityStatus->SetBitmap(*imgActIcon2);
+            ActivityIconStatus = 2;
+            break;
+        case 2:
+            imgActivityStatus->SetBitmap(*imgActIcon3);
+            ActivityIconStatus = 3;
+            break;
+        case 3:
+            imgActivityStatus->SetBitmap(*imgActIcon4);
+            ActivityIconStatus = 0;
+            break;
+        default:
+            ActivityIconStatus = 0;
+            
+    }
+    
 }
 
 void frmMain::ActivityIconStop( wxCommandEvent& event ){
-
-       // Display the sleep icon.
-
-       imgActivityStatus->SetBitmap(*imgActIconSleep);
-
+    
+    // Display the sleep icon.
+    
+    imgActivityStatus->SetBitmap(*imgActIconSleep);
+    
 }
 
 void frmMain::UpdateSBIconPlacement( wxSizeEvent& event ){
-
-       if (imgConnStatus == 0 || imgSSLStatus == 0 || imgActivityStatus == 0){
-       
-               return;
-       
-       }
-
-       wxRect rectOnline;
-       wxRect rectSSL;
-       wxRect rectActivity;
-       stbBottom->GetFieldRect(1, rectOnline);
-       stbBottom->GetFieldRect(2, rectSSL);
-       stbBottom->GetFieldRect(3, rectActivity);
-
-       imgConnStatus->Move(rectOnline.GetX(),rectOnline.GetY());
-       imgSSLStatus->Move(rectSSL.GetX(),rectSSL.GetY());
-       imgActivityStatus->Move(rectActivity.GetX(),rectActivity.GetY());
-
+    
+    if (imgConnStatus == 0 || imgSSLStatus == 0 || imgActivityStatus == 0){
+        
+        return;
+        
+    }
+    
+    wxRect rectOnline;
+    wxRect rectSSL;
+    wxRect rectActivity;
+    stbBottom->GetFieldRect(1, rectOnline);
+    stbBottom->GetFieldRect(2, rectSSL);
+    stbBottom->GetFieldRect(3, rectActivity);
+    
+    imgConnStatus->Move(rectOnline.GetX(),rectOnline.GetY());
+    imgSSLStatus->Move(rectSSL.GetX(),rectSSL.GetY());
+    imgActivityStatus->Move(rectActivity.GetX(),rectActivity.GetY());
+    
 }
 
 XABViewMode frmMain::GetViewMode(){
-
-       XABViewMode xvm;
-       
-       xvm.SortMode = SortMode;
-       xvm.AscendingMode = AscendingMode;
-       
-       return xvm;
-       
+    
+    XABViewMode xvm;
+    
+    xvm.SortMode = SortMode;
+    xvm.AscendingMode = AscendingMode;
+    
+    return xvm;
+    
 }
 
 void frmMain::WindowAdd( wxCommandEvent &event ){
+    
+    WindowData *WData = (WindowData*)event.GetClientData();
+    
+    size_t pos;
+    
+    if (WData->DataType == 0){
+        
+        // Contact Window
+        
+        int intID = mnuContactWindows->GetId();
+        
+        mnuWindow->FindChildItem(intID, &pos);
+        wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, wxT("Contact Window #") + wxString::Format(wxT("%i"), WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
+        mnuNewItem->SetId(WData->WindowID);
+        WindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
+        WindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
+        WindowListType.insert(std::make_pair(WData->WindowID, 0));
+        mnuWindow->Insert((pos + 1), mnuNewItem);
+        this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowContactWindow));
+        
+    } else if (WData->DataType == 1){
+        
+        // Contact Editor Window
+        
+        int intID = mnuContactEditorWindows->GetId();
+        
+        mnuWindow->FindChildItem(intID, &pos);
+        wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, wxT("Contact Editor Window #") + wxString::Format(wxT("%i"), WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
+        mnuNewItem->SetId(WData->WindowID);
+        WindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
+        WindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
+        WindowListType.insert(std::make_pair(WData->WindowID, 1));
+        mnuWindow->Insert((pos + 1), mnuNewItem);
+        this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowContactEditorWindow));
+        
+    } else if (WData->DataType == 2){
+        
+        // Search Window
+        
+        int intID = mnuSearchWindows->GetId();
+        
+        mnuWindow->FindChildItem(intID, &pos);
+        wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, wxT("Search Window #") + wxString::Format(wxT("%i"), WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
+        mnuNewItem->SetId(WData->WindowID);
+        WindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
+        WindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
+        WindowListType.insert(std::make_pair(WData->WindowID, 2));
+        mnuWindow->Insert((pos + 1), mnuNewItem);
+        this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowSearchWindow));
+        
+    }
+    
+    delete WData;
+    WData = NULL;
+    
+}
 
-       WindowData *WData = (WindowData*)event.GetClientData();
-
-       size_t pos;
-       
-       if (WData->DataType == 0){
-       
-               // Contact Window
-
-               int intID = mnuContactWindows->GetId();
-
-               mnuWindow->FindChildItem(intID, &pos);
-               wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, wxT("Contact Window #") + wxString::Format(wxT("%i"), WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
-               mnuNewItem->SetId(WData->WindowID);
-               WindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
-               WindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
-               WindowListType.insert(std::make_pair(WData->WindowID, 0));
-               mnuWindow->Insert((pos + 1), mnuNewItem);
-               this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowContactWindow));
-       
-       } else if (WData->DataType == 1){
-       
-               // Contact Editor Window
-
-               int intID = mnuContactEditorWindows->GetId();
-
-               mnuWindow->FindChildItem(intID, &pos);
-               wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, wxT("Contact Editor Window #") + wxString::Format(wxT("%i"), WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
-               mnuNewItem->SetId(WData->WindowID);
-               WindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
-               WindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
-               WindowListType.insert(std::make_pair(WData->WindowID, 1));
-               mnuWindow->Insert((pos + 1), mnuNewItem);
-               this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowContactEditorWindow));
-       
-       } else if (WData->DataType == 2){
-               
-               // Search Window
-       
-               int intID = mnuSearchWindows->GetId();
-               
-               mnuWindow->FindChildItem(intID, &pos);
-               wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, wxT("Search Window #") + wxString::Format(wxT("%i"), WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
-               mnuNewItem->SetId(WData->WindowID);
-               WindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
-               WindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
-               WindowListType.insert(std::make_pair(WData->WindowID, 2));
-               mnuWindow->Insert((pos + 1), mnuNewItem);
-               this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowSearchWindow));
-       
-       }
-       
-       delete WData;
-       WData = NULL;
-
-}
-
-void frmMain::WindowEdit( wxCommandEvent &event ){
-
-       WindowData *WData = (WindowData*)event.GetClientData();
-
-       if (WData->DataType == 0){
-       
-               // Contact Window
-
-               int intID = mnuContactWindows->GetId();
-
-               // Get the window title and use that.
-
-               frmContact *frmContactPtr = static_cast<frmContact*>(WData->WindowPointer);
-
-               wxString WindowTitle = frmContactPtr->GetTitle();
-
-               std::map<int, wxMenuItem*>::iterator MenuIter = WindowListPointersMenu.find(WData->WindowID);
-               
-               MenuIter->second->SetItemLabel(WindowTitle);
-
-               //mnuWindow->FindChildItem(intID, &pos);
-               //wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, WindowTitle, WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
-               //mnuNewItem->SetId(WData->WindowID);
-               //ContactWindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
-               //ContactWindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
-               //mnuWindow->Insert((pos + 1), mnuNewItem);
-               //this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowContactWindow));
-       
-       } else if (WData->DataType == 1){
-       
-               // Contact Editor Window
-
-               int intID = mnuContactEditorWindows->GetId();
-
-               // Get the window title and use that.
-
-               frmContactEditor *frmCEPtr = static_cast<frmContactEditor*>(WData->WindowPointer);
-
-               wxString WindowTitle = frmCEPtr->GetTitle();
-
-               std::map<int, wxMenuItem*>::iterator MenuIter = WindowListPointersMenu.find(WData->WindowID);
-               
-               if (WindowTitle.IsEmpty()){
-
-                       MenuIter->second->SetItemLabel(_("Unnamed Contact"));
-
-               } else {
-
-                       MenuIter->second->SetItemLabel(WindowTitle);
-
-               }
-
-               //mnuWindow->FindChildItem(intID, &pos);
-               //wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, WindowTitle, WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
-               //mnuNewItem->SetId(WData->WindowID);
-               //ContactEditorWindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
-               //ContactEditorWindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
-               //mnuWindow->Insert((pos + 1), mnuNewItem);
-               //this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowContactEditorWindow));
-       
-       }
-
-       delete WData;
-       WData = NULL;
-       
+void frmMain::WindowEdit( wxCommandEvent &event ){
+    
+    WindowData *WData = (WindowData*)event.GetClientData();
+    
+    if (WData->DataType == 0){
+        
+        // Contact Window
+        
+        int intID = mnuContactWindows->GetId();
+        
+        // Get the window title and use that.
+        
+        frmContact *frmContactPtr = static_cast<frmContact*>(WData->WindowPointer);
+        
+        wxString WindowTitle = frmContactPtr->GetTitle();
+        
+        std::map<int, wxMenuItem*>::iterator MenuIter = WindowListPointersMenu.find(WData->WindowID);
+        
+        MenuIter->second->SetItemLabel(WindowTitle);
+        
+        //mnuWindow->FindChildItem(intID, &pos);
+        //wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, WindowTitle, WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
+        //mnuNewItem->SetId(WData->WindowID);
+        //ContactWindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
+        //ContactWindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
+        //mnuWindow->Insert((pos + 1), mnuNewItem);
+        //this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowContactWindow));
+        
+    } else if (WData->DataType == 1){
+        
+        // Contact Editor Window
+        
+        int intID = mnuContactEditorWindows->GetId();
+        
+        // Get the window title and use that.
+        
+        frmContactEditor *frmCEPtr = static_cast<frmContactEditor*>(WData->WindowPointer);
+        
+        wxString WindowTitle = frmCEPtr->GetTitle();
+        
+        std::map<int, wxMenuItem*>::iterator MenuIter = WindowListPointersMenu.find(WData->WindowID);
+        
+        if (WindowTitle.IsEmpty()){
+            
+            MenuIter->second->SetItemLabel(_("Unnamed Contact"));
+            
+        } else {
+            
+            MenuIter->second->SetItemLabel(WindowTitle);
+            
+        }
+        
+        //mnuWindow->FindChildItem(intID, &pos);
+        //wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, WindowTitle, WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
+        //mnuNewItem->SetId(WData->WindowID);
+        //ContactEditorWindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
+        //ContactEditorWindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
+        //mnuWindow->Insert((pos + 1), mnuNewItem);
+        //this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowContactEditorWindow));
+        
+    }
+    
+    delete WData;
+    WData = NULL;
+    
 }
 
 void frmMain::WindowDelete( wxCommandEvent &event ){
-
-       WindowData *WData = (WindowData*)event.GetClientData();
-       
-       std::map<int, wxMenuItem*>::iterator MenuIter = WindowListPointersMenu.find(WData->WindowID);
-
-       mnuWindow->Remove(MenuIter->second);
-
-       delete MenuIter->second;
-       MenuIter->second = NULL;
-       
-       WindowListPointersMenu.erase(WData->WindowID);
-       WindowListPointers.erase(WData->WindowID);
-       WindowListType.erase(WData->WindowID);
-
-       delete WData;
-       WData = NULL;
-
+    
+    WindowData *WData = (WindowData*)event.GetClientData();
+    
+    std::map<int, wxMenuItem*>::iterator MenuIter = WindowListPointersMenu.find(WData->WindowID);
+    
+    mnuWindow->Remove(MenuIter->second);
+    
+    delete MenuIter->second;
+    MenuIter->second = NULL;
+    
+    WindowListPointersMenu.erase(WData->WindowID);
+    WindowListPointers.erase(WData->WindowID);
+    WindowListType.erase(WData->WindowID);
+    
+    delete WData;
+    WData = NULL;
+    
 }
 
 void frmMain::ShowContactWindow( wxCommandEvent &event ){
-
-       std::map<int, void*>::iterator WindowIter = WindowListPointers.find(event.GetId());
-
-       frmContact *frmContactPtr = static_cast<frmContact*>(WindowIter->second);
-       
-       frmContactPtr->Show();
-       frmContactPtr->Raise();
-
+    
+    std::map<int, void*>::iterator WindowIter = WindowListPointers.find(event.GetId());
+    
+    frmContact *frmContactPtr = static_cast<frmContact*>(WindowIter->second);
+    
+    frmContactPtr->Show();
+    frmContactPtr->Raise();
+    
 }
 
 void frmMain::ShowContactEditorWindow( wxCommandEvent &event ){
-
-       std::map<int, void*>::iterator WindowIter = WindowListPointers.find(event.GetId());
-
-       frmContactEditor *frmCEPtr = static_cast<frmContactEditor*>(WindowIter->second);
-       
-       frmCEPtr->Show();
-       frmCEPtr->Raise();
-
+    
+    std::map<int, void*>::iterator WindowIter = WindowListPointers.find(event.GetId());
+    
+    frmContactEditor *frmCEPtr = static_cast<frmContactEditor*>(WindowIter->second);
+    
+    frmCEPtr->Show();
+    frmCEPtr->Raise();
+    
 }
 
 void frmMain::ShowSearchWindow( wxCommandEvent &event ){
-
-       // Look through the Search Window List Pointers, grab the
-       // window point and show the window.
-
-       std::map<int, void*>::iterator WindowIter = WindowListPointers.find(event.GetId());
-
-       frmSearch *frmSearchPtr = static_cast<frmSearch*>(WindowIter->second);
-       
-       frmSearchPtr->Show();
-       frmSearchPtr->Raise();
-
+    
+    // Look through the Search Window List Pointers, grab the
+    // window point and show the window.
+    
+    std::map<int, void*>::iterator WindowIter = WindowListPointers.find(event.GetId());
+    
+    frmSearch *frmSearchPtr = static_cast<frmSearch*>(WindowIter->second);
+    
+    frmSearchPtr->Show();
+    frmSearchPtr->Raise();
+    
 }
 
 void frmMain::ToggleConnectionStatus( wxCommandEvent &event ){
-
-       frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
-       wxCommandEvent toggconn(ACTMGR_TOGGLECONN);
-       wxPostEvent(frameActMgr, toggconn);
-
+    
+    frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
+    wxCommandEvent toggconn(ACTMGR_TOGGLECONN);
+    wxPostEvent(frameActMgr, toggconn);
+    
 }
 
 void frmMain::ShowSSLCertificates( wxCommandEvent &event ){
-
-       // Check the account type before continuing.
-       
-       wxString SeekAccount;
-       wxString AccTypeLower;
-       wxString AccType;
-       std::map<int, SSLCertCollection>::iterator SSLColIter;
-       
-       for (int i = 0; i < prefaccounts.GetCount(); i++){
-
-               SeekAccount.Append(prefaccounts.GetAccountDirectory(i));
-               AccType.Append(prefaccounts.GetAccountType(i));
-               AccTypeLower = AccType.MakeLower();
-               SeekAccount.Append(wxT("."));
-               SeekAccount.Append(AccTypeLower);
-                               
-               if (SeekAccount == ActiveAccount){
-               
-                       if (AccTypeLower == wxT("local")){
-                       
-                               return;
-                       
-                       }
-                       
-                       SSLColIter = AccountSSLData.find(i);
-
-                       SSLCertCollection SSLCertInfo = SSLColIter->second;
-                       
-                       frmSSLCertificate *frameSSLCert = new frmSSLCertificate ( this );
-                       frameSSLCert->StartCertFrom(0);
-                       frameSSLCert->SetupCerts(SSLCertInfo);
-                       frameSSLCert->ShowModal();
-               
-                       delete frameSSLCert;
-                       frameSSLCert = NULL;
-               
-               }
-               
-               SeekAccount.Clear();
-               AccTypeLower.Clear();
-               AccType.clear();
-               
-       }
-
+    
+    // Check the account type before continuing.
+    
+    wxString SeekAccount;
+    wxString AccTypeLower;
+    wxString AccType;
+    bool AccountSSL;
+    std::map<int, SSLCertCollection>::iterator SSLColIter;
+    
+    for (int i = 0; i < prefaccounts.GetCount(); i++){
+        
+        SeekAccount.Append(prefaccounts.GetAccountDirectory(i));
+        AccType.Append(prefaccounts.GetAccountType(i));
+        AccountSSL = prefaccounts.GetAccountSSL(i);
+        AccTypeLower = AccType.MakeLower();
+        SeekAccount.Append(wxT("."));
+        SeekAccount.Append(AccTypeLower);
+        
+        if (SeekAccount == ActiveAccount){
+            
+            if (AccTypeLower == wxT("local")){
+                
+                return;
+                
+            }
+            
+            if (AccountSSL == false){
+                
+                return;
+                
+            }
+            
+            SSLColIter = AccountSSLData.find(i);
+            
+            SSLCertCollection SSLCertInfo = SSLColIter->second;
+            
+            frmSSLCertificate *frameSSLCert = new frmSSLCertificate ( this );
+            frameSSLCert->StartCertFrom(0);
+            frameSSLCert->SetupCerts(SSLCertInfo);
+            frameSSLCert->ShowModal();
+            
+            delete frameSSLCert;
+            frameSSLCert = NULL;
+            
+        }
+        
+        SeekAccount.Clear();
+        AccTypeLower.Clear();
+        AccType.clear();
+        
+    }
+    
 }
 
 void frmMain::ShowSSLInfo( wxCommandEvent &event ){
-
-       // Check the account type before continuing.
-
+    
+    // Check the account type before continuing.
+    
 }
 
 void frmMain::HideSSLInfo( wxCommandEvent &event ){
-
-       // Check the account type before continuing.
-
+    
+    // Check the account type before continuing.
+    
 }
 
 void frmMain::UpdateConnectionStatus( wxCommandEvent &event ){
-
-       if (event.GetInt() == 0){
-       
-               imgConnStatus->SetBitmap(*imgOnline);
-       
-       } else {
-
-               imgConnStatus->SetBitmap(*imgOffline);
-       
-       }       
-
+    
+    if (event.GetInt() == 0){
+        
+        imgConnStatus->SetBitmap(*imgOnline);
+        
+    } else {
+        
+        imgConnStatus->SetBitmap(*imgOffline);
+        
+    }  
+    
 }
 
 void frmMain::SetupSSLStatus( int AccountID ){
-
-       // Check if account ID given is
-       // the active account and if not, do nothing.
-       
-       wxString AccType;
-       wxString AccTypeLower;
-       
-       AccType = prefaccounts.GetAccountType(AccountID);
-       AccTypeLower = AccType.MakeLower();
-       
-       wxString AccountIDName = prefaccounts.GetAccountDirectory(AccountID) + wxT(".") +
+    
+    // Check if account ID given is
+    // the active account and if not, do nothing.
+    
+    wxString AccType;
+    wxString AccTypeLower;
+    
+    AccType = prefaccounts.GetAccountType(AccountID);
+    AccTypeLower = AccType.MakeLower();
+    
+    wxString AccountIDName = prefaccounts.GetAccountDirectory(AccountID) + wxT(".") +
                                AccTypeLower;
-
-       if (AccountIDName != ActiveAccount){
-       
-               return;
-       
-       }
-
-       // Check if the account has SSL enabled.
-       
-       bool SSLInUse = prefaccounts.GetAccountSSL(AccountID);
-       
-       if (SSLInUse == FALSE){
-       
-               SSLToolTip->SetTip(wxT("SSL is not enabled for this account"));
-               imgSSLStatus->SetBitmap(*imgNoSSL);
-       
-       } else {
-       
-               // Get the SSL Collection Data.
-
-               std::map<int,int>::iterator SSLResultIter = AccountSSLResult.find(AccountID);
-
-               if (SSLResultIter->second == 1){
-               
-                       imgSSLStatus->SetBitmap(*imgSSLWarning);
-                       SSLToolTip->SetTip(wxT("Invalid certificate(s) received for '") + 
-                               prefaccounts.GetAccountName(AccountID) +
-                               wxT("' (Connection denied by user)\n\nDouble click for more information."));
-                       
-               
-               } else if (SSLResultIter->second == 0){
-               
-                       imgSSLStatus->SetBitmap(*imgSSL);
-                       SSLToolTip->SetTip(wxT("Account '") + 
-                               prefaccounts.GetAccountName(AccountID) +
-                               wxT("' secured using SSL\n\nDouble click for more information."));
-               
-               }
-       
-       }
-
+    
+    if (AccountIDName != ActiveAccount){
+        
+        return;
+        
+    }
+    
+    // Check if the account has SSL enabled.
+    
+    bool SSLInUse = prefaccounts.GetAccountSSL(AccountID);
+    
+    if (SSLInUse == FALSE){
+        
+        SSLToolTip->SetTip(wxT("SSL is not enabled for this account"));
+        imgSSLStatus->SetBitmap(*imgNoSSL);
+        
+    } else {
+        
+        // Get the SSL Collection Data.
+        
+        std::map<int,int>::iterator SSLResultIter = AccountSSLResult.find(AccountID);
+        
+        if (SSLResultIter->second == 1){
+            
+            imgSSLStatus->SetBitmap(*imgSSLWarning);
+            SSLToolTip->SetTip(wxT("Invalid certificate(s) received for '") + 
+                               prefaccounts.GetAccountName(AccountID) +
+                               wxT("' (Connection denied by user)\n\nDouble click for more information."));
+            
+            
+        } else if (SSLResultIter->second == 0){
+            
+            imgSSLStatus->SetBitmap(*imgSSL);
+            SSLToolTip->SetTip(wxT("Account '") + 
+                               prefaccounts.GetAccountName(AccountID) +
+                               wxT("' secured using SSL\n\nDouble click for more information."));
+            
+        }
+        
+    }
+    
 }
 
 void frmMain::InvalidSSLCertificate( wxCommandEvent &event ){
-
-       frmInvalidSSLCertificate *frameISC = new frmInvalidSSLCertificate ( this );
-       SSLInvalidCertNotifObj *SSLICNObj = (SSLInvalidCertNotifObj*)event.GetClientData();
-       SSLCertCollection SSLCCData = SSLICNObj->CertCollection;
-       wxString AccountName = SSLICNObj->AccountName;
-       frameISC->LoadData(SSLCCData, AccountName);
-       frameISC->ShowModal();
-       
-       int FinalConflictResult = frameISC->GetResult();
-       
-       wxCommandEvent event2(ACTMGR_RESUMEPROC);
-       event2.SetClientData(SSLICNObj->QRNotifData);
-       event2.SetInt(FinalConflictResult);
-       
-       delete frameISC;
-       frameISC = NULL;
-
-       frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);  
-       wxPostEvent(frameActMgr, event2);
+    
+    frmInvalidSSLCertificate *frameISC = new frmInvalidSSLCertificate ( this );
+    SSLInvalidCertNotifObj *SSLICNObj = (SSLInvalidCertNotifObj*)event.GetClientData();
+    SSLCertCollection SSLCCData = SSLICNObj->CertCollection;
+    wxString AccountName = SSLICNObj->AccountName;
+    frameISC->LoadData(SSLCCData, AccountName);
+    frameISC->ShowModal();
+    
+    int FinalConflictResult = frameISC->GetResult();
+    
+    wxCommandEvent event2(ACTMGR_RESUMEPROC);
+    event2.SetClientData(SSLICNObj->QRNotifData);
+    event2.SetInt(FinalConflictResult);
+    
+    delete frameISC;
+    frameISC = NULL;
+    
+    frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);     
+    wxPostEvent(frameActMgr, event2);
 }
 
 void frmMain::PauseAllTimers(){
-
-       for (std::map<wxString, wxAccountSyncTimer*>::iterator ASTiter = AccountSyncTimers.begin(); 
-       ASTiter != AccountSyncTimers.end(); ASTiter++){
-       
-               ASTiter->second->Stop();
-       
-       }
-
+    
+    for (std::map<wxString, wxAccountSyncTimer*>::iterator ASTiter = AccountSyncTimers.begin(); 
+         ASTiter != AccountSyncTimers.end(); ASTiter++){
+        
+        ASTiter->second->Stop();
+        
+    }
+    
 }
 
 void frmMain::ResumeAllTimers(){
-
-       for (std::map<wxString, wxAccountSyncTimer*>::iterator ASTiter = AccountSyncTimers.begin(); 
-       ASTiter != AccountSyncTimers.end(); ASTiter++){
-       
-               ASTiter->second->Start();
-       
-       }
-
+    
+    for (std::map<wxString, wxAccountSyncTimer*>::iterator ASTiter = AccountSyncTimers.begin(); 
+         ASTiter != AccountSyncTimers.end(); ASTiter++){
+        
+        ASTiter->second->Start();
+        
+    }
+    
 }
 
 void frmMain::UpdateSSLAccountStatus(int AccountID, int SSLStatus, SSLCertCollection SSLCertInc){
-
-       // Delete existing data.
-
-       AccountSSLData.erase(AccountID);
-       AccountSSLResult.erase(AccountID);
-
-       // Insert new data.
-       
-       AccountSSLData.insert(std::make_pair(AccountID, SSLCertInc));
-       AccountSSLResult.insert(std::make_pair(AccountID, SSLStatus));
-
+    
+    // Delete existing data.
+    
+    AccountSSLData.erase(AccountID);
+    AccountSSLResult.erase(AccountID);
+    
+    // Insert new data.
+    
+    AccountSSLData.insert(std::make_pair(AccountID, SSLCertInc));
+    AccountSSLResult.insert(std::make_pair(AccountID, SSLStatus));
+    
 }
 
 void frmMain::CheckUpdates( wxCommandEvent& event ){
-
-       frmUpdate *frameUpdate = new frmUpdate ( this );
-       frameUpdate->FetchData();
-       frameUpdate->ShowModal();
-
+    
+    frmUpdate *frameUpdate = new frmUpdate ( this );
+    frameUpdate->FetchData();
+    frameUpdate->ShowModal();
+    
 }
 
 void frmMain::OpenImportDialog( wxCommandEvent& event ){
-       
-       // Run the import contacts system.
-
-       ImportRun(this);
-
+    
+    // Run the import contacts system.
+    
+    ImportRun(this);
+    
 }
 
 void frmMain::OpenExportDialog( wxCommandEvent& event ){
-
-       // Check if an account and at least one contact is selected
-       // before continuing.
-       
-       wxArrayString ArrData;
-       
-       if (ActiveAccount.IsEmpty()){
-    
-               return;
-    
-       }
-       
-       int ContactSelected = 0;
-       int ContactsCollected = 0;
-       long longSelected = -1;
-       
-       for (;;){
-               
-               longSelected = lstContacts->GetNextItem(longSelected, 
-                       wxLIST_NEXT_ALL,
-                       wxLIST_STATE_SELECTED);
-                       
-               if (longSelected == -1){
-               
-                       break;
-                       
-               }
-               
-               int FileID = lstContacts->GetItemData(longSelected);
-               
-               ArrData.Insert(ContactsFileIndex[FileID],
-                       ContactsCollected, 1);
-       
-               ContactSelected++;
-               
-       }
-
-       if (ContactSelected == 0){
-       
-               return;
-       
-       }
-       
-       // Run the export contacts system.
-
-       ExportRun(this, &ArrData);
-
+    
+    // Check if an account and at least one contact is selected
+    // before continuing.
+    
+    wxArrayString ArrData;
+    
+    if (ActiveAccount.IsEmpty()){
+        
+        return;
+        
+    }
+    
+    int ContactSelected = 0;
+    int ContactsCollected = 0;
+    long longSelected = -1;
+    
+    for (;;){
+        
+        longSelected = lstContacts->GetNextItem(longSelected, 
+                                                wxLIST_NEXT_ALL,
+                                                wxLIST_STATE_SELECTED);
+        
+        if (longSelected == -1){
+            
+            break;
+            
+        }
+        
+        int FileID = lstContacts->GetItemData(longSelected);
+        
+        ArrData.Insert(ContactsFileIndex[FileID],
+                       ContactsCollected, 1);
+        
+        ContactSelected++;
+        
+    }
+    
+    if (ContactSelected == 0){
+        
+        return;
+        
+    }
+    
+    // Run the export contacts system.
+    
+    ExportRun(this, &ArrData);
+    
 }
 
 void frmMain::GetListControl(wxListCtrl *lstContactsPtr, 
-       wxArrayString *ContactsFileIndexPtr){
-
-       lstContactsPtr = lstContacts;
-       ContactsFileIndexPtr = &ContactsFileIndex;
-       
+                             wxArrayString *ContactsFileIndexPtr){
+    
+    lstContactsPtr = lstContacts;
+    ContactsFileIndexPtr = &ContactsFileIndex;
+    
 }
 
 void frmMain::GetSelectedList( wxCommandEvent& event ){
-
-       // Get the array of contact filenames. 
-
-       wxArrayString *ArrData = (wxArrayString*)event.GetClientData();
-       
-       // Process them into an array of files. 
-
-       long longSelected = -1;
-       int ContactsCollected = 0;
-       wxString ContactFilename;
-
-       for (;;){
-               
-               longSelected = lstContacts->GetNextItem(longSelected, 
-                       wxLIST_NEXT_ALL,
-                       wxLIST_STATE_SELECTED);
-               
-               if (longSelected == -1){
-               
-                       break;
-                       
-               }
-
-               // Get the file information and add to the list.
-               
-               int FileID = lstContacts->GetItemData(longSelected);
-               
-               ArrData->Insert(ContactsFileIndex[FileID],
-                       ContactsCollected, 1);
-               
-               ContactsCollected++;
-               ContactFilename.Clear();        
-               
-       }
-       
-       event.SetInt(1);
-
+    
+    // Get the array of contact filenames. 
+    
+    wxArrayString *ArrData = (wxArrayString*)event.GetClientData();
+    
+    // Process them into an array of files.    
+    
+    long longSelected = -1;
+    int ContactsCollected = 0;
+    wxString ContactFilename;
+    
+    for (;;){
+        
+        longSelected = lstContacts->GetNextItem(longSelected, 
+                                                wxLIST_NEXT_ALL,
+                                                wxLIST_STATE_SELECTED);
+        
+        if (longSelected == -1){
+            
+            break;
+            
+        }
+        
+        // Get the file information and add to the list.
+        
+        int FileID = lstContacts->GetItemData(longSelected);
+        
+        ArrData->Insert(ContactsFileIndex[FileID],
+                        ContactsCollected, 1);
+        
+        ContactsCollected++;
+        ContactFilename.Clear();       
+        
+    }
+    
+    event.SetInt(1);
+    
 }
 
 void frmMain::SyncAccount( wxCommandEvent& event ){
-
-       wxString *AccNameInc = (wxString*)event.GetClientData();
-
-       frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
-       frameActMgr->AddTask(3, wxT(""), *AccNameInc, 
-            wxT(""), wxT(""), wxT(""), wxT(""));
-
+    
+    wxString *AccNameInc = (wxString*)event.GetClientData();
+    
+    frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
+    frameActMgr->AddTask(3, wxT(""), *AccNameInc, 
+                         wxT(""), wxT(""), wxT(""), wxT(""));
+    
 }
 
 void frmMain::ShowHelp( wxCommandEvent& event ){
-
-       // Based on the operating system, work out where 
-       // the documentation should be.
-
-//#ifdef __APPLE__
-
+    
+    // Based on the operating system, work out where 
+    // the documentation should be.
+    
+    //#ifdef __APPLE__
+    
 #if defined(__HAIKU__)
-
+    
 #elif defined(__WIN32__)
-
-
-
+    
+    
+    
 #else
-
-       if (wxFileExists("/usr/share/doc/xestiaab/index.html")){
-       
-               wxLaunchDefaultBrowser(wxT("file:///usr/share/doc/xestiaab/index.html"));
-               return;
-
+    
+    if (wxFileExists("/usr/share/doc/xestiaab/index.html")){
+        
+        wxLaunchDefaultBrowser(wxT("file:///usr/share/doc/xestiaab/index.html"));
+        return;
+        
 #if XSDAB_RELEASE == 0
-
-       } else if (wxFileExists("/usr/local/share/doc/xestiaab/index.html")){
-       
-               wxLaunchDefaultBrowser(wxT("file:///usr/local/share/doc/xestiaab/index.html"));
-               return;
-
+        
+    } else if (wxFileExists("/usr/local/share/doc/xestiaab/index.html")){
+        
+        wxLaunchDefaultBrowser(wxT("file:///usr/local/share/doc/xestiaab/index.html"));
+        return;
+        
 #endif 
-
-       }
-       
+        
+    }
+    
 #endif
-       
+    
 #if XSDAB_RELEASE == 0
-
-       wxMessageBox(_("The help documentation is not available.\n\nYou can view the documentation that came with your source package."), _("Help documentation missing!"));
-
+    
+    wxMessageBox(_("The help documentation is not available.\n\nYou can view the documentation that came with your source package."), _("Help documentation missing!"));
+    
 #else
-
-       wxMessageBox(_("The help documentation is not available in the usual locations on the system. Please visit http://documentation.xestia.co.uk/xestiaab/ for documentation"), _("Help documentation missing!"));
-       
+    
+    wxMessageBox(_("The help documentation is not available in the usual locations on the system. Please visit http://documentation.xestia.co.uk/xestiaab/ for documentation"), _("Help documentation missing!"));
+    
 #endif
-
+    
 }
\ No newline at end of file
index 30c6fa2..1681134 100644 (file)
@@ -11,480 +11,485 @@ frmNewAccount::frmNewAccount( wxWindow* parent )
 :
 frmNewAccountADT( parent )
 {
-       btnPrevious->Disable();
+    btnPrevious->Disable();
 }
 
 void frmNewAccount::CheckAccountName( wxCommandEvent& event )
 {
-
-       wxString CheckAccName = txtAccountName->GetValue();
-
-       if (txtAccountName->IsEmpty() && PageSeek == 2 || CheckAccName.Len() < 4){
-       
-               btnNext->Disable();
-       
-       } else {
-       
-               btnNext->Enable();
-       
-       }
-       
+    
+    wxString CheckAccName = txtAccountName->GetValue();
+    
+    if ((txtAccountName->IsEmpty() && PageSeek == 2) || CheckAccName.Len() < 4){
+        
+        btnNext->Disable();
+        
+    } else {
+        
+        btnNext->Enable();
+        
+    }
+    
 }
 
 void frmNewAccount::ProcessPrevious( wxCommandEvent& event )
 {
-       PageSeek--;
-       
-       if (PageSeek == 0){
-       
-               // Currently at the Connection test screen.
-               
-               //tbkAccount->ChangeSelection(0);
-               tabConn->Hide();
-               tabFinish->Hide();
-               tabType->Show();
-               szrNewAccount->RecalcSizes();
-               
-               btnPrevious->Disable();
-               btnNext->Enable();
-       
-       } else if (PageSeek == 1){
-       
-               if (cmbServerType->GetCurrentSelection() == 0){
-               
-                       tabConn->Hide();
-                       tabFinish->Hide();
-                       tabType->Show();
-                       PageSeek = 0;
-                       btnPrevious->Disable();
-                       btnNext->Enable();
-                       btnNext->SetLabel(_("Next >"));                 
-                       return;
-               
-               }
-       
-               // Currently at the Finish screen.
-               
-               tabType->Hide();
-               tabConn->Show();
-               tabFinish->Hide();
-               szrNewAccount->RecalcSizes();
-               
-               btnNext->SetLabel(_("Next >"));
-               btnNext->Enable();
-       
-       }       
-       
+    PageSeek--;
+    
+    if (PageSeek == 0){
+        
+        // Currently at the Connection test screen.
+        
+        //tbkAccount->ChangeSelection(0);
+        tabConn->Hide();
+        tabFinish->Hide();
+        tabType->Show();
+        szrNewAccount->RecalcSizes();
+        
+        btnPrevious->Disable();
+        btnNext->Enable();
+        
+    } else if (PageSeek == 1){
+        
+        if (cmbServerType->GetCurrentSelection() == 0){
+            
+            tabConn->Hide();
+            tabFinish->Hide();
+            tabType->Show();
+            PageSeek = 0;
+            btnPrevious->Disable();
+            btnNext->Enable();
+            btnNext->SetLabel(_("Next >"));
+            return;
+            
+        }
+        
+        // Currently at the Finish screen.
+        
+        tabType->Hide();
+        tabConn->Show();
+        tabFinish->Hide();
+        szrNewAccount->RecalcSizes();
+        
+        btnNext->SetLabel(_("Next >"));
+        btnNext->Enable();
+        
+    }
+    
 }
 
 void frmNewAccount::ProcessNext( wxCommandEvent& event )
 {
-       PageSeek++;
-       
-       if (PageSeek == 1){
-       
-               if (cmbServerType->GetCurrentSelection() == 0){
-               
-                       tabType->Hide();
-                       tabConn->Hide();
-                       tabFinish->Show();
-                       PageSeek = 2;
-                       btnPrevious->Enable();
-                       szrNewAccount->RecalcSizes();
-                       btnNext->Disable();
-                       btnNext->SetLabel(_("Finish"));
-                       return;
-               
-               }
-       
-               btnNext->Disable();
-       
-               bool ServerResult = FALSE;
-               bool ServerAction = FALSE;
-               bool UseSSL = TRUE;
-               wxString ServerMessage;
-       
-               // Connection test screen.
-               
-               tabType->Hide();
-               tabConn->Show();
-               tabFinish->Hide();
-               szrNewAccount->RecalcSizes();
-               btnPrevious->Enable();
-               
-               // Reset screen.
-
-               lblServerConnResult->SetLabel(wxT(""));
-               lblServerResponse->SetLabel(wxT(""));
-               lblServerSSLResult->SetLabel(wxT(""));
-               lblServerSSLValid->SetLabel(wxT(""));
-               lblAbleToLoginResult->SetLabel(wxT(""));
-               lblCardDAVSupportResult->SetLabel(wxT(""));
-
-               // Spawn a thread and check if server supports CardDAV.
-               
-               CardDAV CardDAVConn;
-               
-               lblServerConnResult->SetLabel(_("Testing..."));
-               
-               UseSSL = chkUseSSL->GetValue();
-               
-               CardDAVConn.SetupConnection(txtServerAddress->GetValue(), 
-                       wxAtoi(txtServerPort->GetValue()), 
-                       txtUsername->GetValue(), 
-                       txtPassword->GetValue(),
-                       UseSSL);
-               CardDAVConn.SetupResultBools(&ServerResult, &ServerAction);
-               
-               std::thread ConnTest(&CardDAV::Connect, &CardDAVConn);
-               
-               ConnTest.join();
-               
-               if (ServerResult == FALSE){
-               
-                       lblServerConnResult->SetLabel(_("Failed"));
-                       wxMessageBox(CardDAVConn.GetErrorMessage());
-                       return;
-               
-               } else {
-               
-                       lblServerConnResult->SetLabel(_("Connected"));
-               
-               }
-               
-               if (CardDAVConn.HasValidResponse() == TRUE){
-               
-                       lblServerResponse->SetLabel(_("Yes"));
-               
-               } else {
-               
-                       lblServerResponse->SetLabel(_("No"));
-               
-               }               
-               
-               if (CardDAVConn.CanDoSSL() == TRUE){
-               
-                       lblCardDAVSupportResult->SetLabel(_("Used"));
-               
-               } else {
-               
-                       lblServerSSLResult->SetLabel(_("Not Used"));
-                       lblServerSSLValid->SetLabel(_("Not Applicable"));
-               
-               }               
-               
-               if (CardDAVConn.SSLVerify() == TRUE && CardDAVConn.CanDoSSL() == TRUE){
-
-                       lblCardDAVSupportResult->SetLabel(_("Verified"));
-               
-               } else if (CardDAVConn.SSLVerify() == FALSE && CardDAVConn.CanDoSSL() == TRUE) {
-               
-                       lblServerSSLResult->SetLabel(_("Unable to verify"));
-               
-               }
-               
-               if (CardDAVConn.CanDoCardDAV() == TRUE){
-               
-                       lblCardDAVSupportResult->SetLabel(_("Supported"));
-               
-               } else {
-               
-                       lblCardDAVSupportResult->SetLabel(_("Unsupported"));            
-               
-               }
-               
-               if (CardDAVConn.AbleToLogin() == TRUE){
-               
-                       lblAbleToLoginResult->SetLabel(_("Yes"));
-               
-               } else {
-               
-                       lblAbleToLoginResult->SetLabel(_("No"));
-               
-               }
-               
-               // Get the address to process CardDAV requests.
-               
-               ServerPrefix = CardDAVConn.GetDefaultAddressBookURL();
-               
-               wxMessageBox(ServerPrefix);
-
-               if (ServerResult == TRUE && CardDAVConn.HasValidResponse() == TRUE &&
-               //CardDAVConn.CanDoSSL() == TRUE && CardDAVConn.SSLVerify() == TRUE &&
-               CardDAVConn.CanDoCardDAV() == TRUE && CardDAVConn.AbleToLogin() == TRUE){
-               
-                       btnNext->Enable();
-                       
-                       lblConnectionResultText->SetLabel(_("Click on Next to set the account name."));
-               
-               } else {
-               
-                       lblConnectionResultText->SetLabel(_("A problem has occured whilst connecting to the CardDAV server.\nPlease review the above information and change the server details if needed.\nIf there are still problems, please speak to your system administrator(s)."));
-               
-               }
-       
-       } else if (PageSeek == 2){
-       
-               // Finish screen.
-               
-               tabType->Hide();
-               tabConn->Hide();
-               tabFinish->Show();
-               szrNewAccount->RecalcSizes();
-               
-               btnNext->Disable();
-               btnNext->SetLabel(_("Finish"));
-               if (txtAccountName->IsEmpty() && PageSeek == 2){
-                       btnNext->Disable();
-               } else {
-                       btnNext->Enable();
-               }
-       
-       } else if (PageSeek == 3){
-       
-               // Finished.
-               
-               wxString XestiaABPrefDirectory;
-               wxString AccountSettingsFile;
-               //wxFile ASFile;
-               wxString RandomNumberSuffix = wxString::Format(wxT("%i"), rand() % 32767);
-               bool DirectoryCreated = FALSE;
-
-#if defined(__HAIKU__)
+    PageSeek++;
     
-               //preffilename = wxT("noo");
-
+    if (PageSeek == 1){
+        
+        if (cmbServerType->GetCurrentSelection() == 0){
+            
+            tabType->Hide();
+            tabConn->Hide();
+            tabFinish->Show();
+            PageSeek = 2;
+            btnPrevious->Enable();
+            szrNewAccount->RecalcSizes();
+            btnNext->Disable();
+            btnNext->SetLabel(_("Finish"));
+            return;
+            
+        }
+        
+        btnNext->Disable();
+        
+        bool ServerResult = FALSE;
+        bool ServerAction = FALSE;
+        bool UseSSL = TRUE;
+        wxString ServerMessage;
+        
+        // Connection test screen.
+        
+        tabType->Hide();
+        tabConn->Show();
+        tabFinish->Hide();
+        szrNewAccount->RecalcSizes();
+        btnPrevious->Enable();
+        
+        // Reset screen.
+        
+        lblServerConnResult->SetLabel(wxT(""));
+        lblServerResponse->SetLabel(wxT(""));
+        lblServerSSLResult->SetLabel(wxT(""));
+        lblServerSSLValid->SetLabel(wxT(""));
+        lblAbleToLoginResult->SetLabel(wxT(""));
+        lblCardDAVSupportResult->SetLabel(wxT(""));
+        
+        // Spawn a thread and check if server supports CardDAV.
+        
+        CardDAV CardDAVConn;
+        
+        lblServerConnResult->SetLabel(_("Testing..."));
+        
+        UseSSL = chkUseSSL->GetValue();
+        
+        CardDAVConn.SetupConnection(txtServerAddress->GetValue(),
+                                    wxAtoi(txtServerPort->GetValue()),
+                                    txtUsername->GetValue(),
+                                    txtPassword->GetValue(),
+                                    UseSSL);
+        CardDAVConn.SetupResultBools(&ServerResult, &ServerAction);
+        
+        std::thread ConnTest(&CardDAV::Connect, &CardDAVConn);
+        
+        ConnTest.join();
+        
+        if (ServerResult == FALSE){
+            
+            lblServerConnResult->SetLabel(_("Failed"));
+            wxMessageBox(CardDAVConn.GetErrorMessage());
+            return;
+            
+        } else {
+            
+            lblServerConnResult->SetLabel(_("Connected"));
+            
+        }
+        
+        if (CardDAVConn.HasValidResponse() == TRUE){
+            
+            lblServerResponse->SetLabel(_("Yes"));
+            
+        } else {
+            
+            lblServerResponse->SetLabel(_("No"));
+            
+        }
+        
+        if (CardDAVConn.CanDoSSL() == TRUE){
+            
+            lblCardDAVSupportResult->SetLabel(_("Used"));
+            
+        } else {
+            
+            lblServerSSLResult->SetLabel(_("Not Used"));
+            lblServerSSLValid->SetLabel(_("Not Applicable"));
+            
+        }
+        
+        if (CardDAVConn.SSLVerify() == TRUE && CardDAVConn.CanDoSSL() == TRUE){
+            
+            lblCardDAVSupportResult->SetLabel(_("Verified"));
+            
+        } else if (CardDAVConn.SSLVerify() == FALSE && CardDAVConn.CanDoSSL() == TRUE) {
+            
+            lblServerSSLResult->SetLabel(_("Unable to verify"));
+            
+        }
+        
+        if (CardDAVConn.CanDoCardDAV() == TRUE){
+            
+            lblCardDAVSupportResult->SetLabel(_("Supported"));
+            
+        } else {
+            
+            lblCardDAVSupportResult->SetLabel(_("Unsupported"));
+            
+        }
+        
+        if (CardDAVConn.AbleToLogin() == TRUE){
+            
+            lblAbleToLoginResult->SetLabel(_("Yes"));
+            
+        } else {
+            
+            lblAbleToLoginResult->SetLabel(_("No"));
+            
+        }
+        
+        // Get the address to process CardDAV requests.
+        
+        ServerPrefix = CardDAVConn.GetDefaultAddressBookURL();
+        
+        wxMessageBox(ServerPrefix);
+        
+        if (ServerResult == TRUE && CardDAVConn.HasValidResponse() == TRUE &&
+            //CardDAVConn.CanDoSSL() == TRUE && CardDAVConn.SSLVerify() == TRUE &&
+            CardDAVConn.CanDoCardDAV() == TRUE && CardDAVConn.AbleToLogin() == TRUE){
+            
+            btnNext->Enable();
+            
+            lblConnectionResultText->SetLabel(_("Click on Next to set the account name."));
+            
+        } else {
+            
+            lblConnectionResultText->SetLabel(_("A problem has occured whilst connecting to the CardDAV server.\nPlease review the above information and change the server details if needed.\nIf there are still problems, please speak to your system administrator(s)."));
+            
+        }
+        
+    } else if (PageSeek == 2){
+        
+        // Finish screen.
+        
+        tabType->Hide();
+        tabConn->Hide();
+        tabFinish->Show();
+        szrNewAccount->RecalcSizes();
+        
+        btnNext->Disable();
+        btnNext->SetLabel(_("Finish"));
+        if (txtAccountName->IsEmpty() && PageSeek == 2){
+            btnNext->Disable();
+        } else {
+            btnNext->Enable();
+        }
+        
+    } else if (PageSeek == 3){
+        
+        // Finished.
+        
+        wxString XestiaABPrefDirectory;
+        wxString AccountSettingsFile;
+        //wxFile ASFile;
+        wxString RandomNumberSuffix = wxString::Format(wxT("%i"), rand() % 32767);
+        bool DirectoryCreated = FALSE;
+        
+#if defined(__HAIKU__)
+        
+        //preffilename = wxT("noo");
+        
 #elif defined(__WIN32__)
-
-               XestiaABPrefDirectory = GetUserPrefDir();
-
-               AccountSettingsFile = XestiaABPrefDirectory + wxT("accounts");
-
-               // Open the file for writing.
-
-               wxFileConfig *cfgfile = new wxFileConfig("", "", AccountSettingsFile);
-
-               // Check if account name already exists and return an error message
-               // if this is the case.
-
-               wxString AccountName;
-               long itemindex = 0;
-               bool ContinueAcc;       
-               ContinueAcc = cfgfile->GetFirstGroup(AccountName, itemindex);
-
-               while (ContinueAcc){
-
-                       if (txtAccountName->GetValue() == AccountName){
-
-                               wxMessageBox(_("The selected account name is already used, please use another account name."), _("Account name already used"), wxICON_ERROR);
-                               return;
-
-                       }
-
-                       cfgfile->SetPath(wxT("/"));
-                       ContinueAcc = cfgfile->GetNextGroup(AccountName, itemindex);
-
-               }
-
-               cfgfile->SetPath(txtAccountName->GetValue());
-               cfgfile->Write(wxT("address"), txtServerAddress->GetValue());
-               cfgfile->Write(wxT("port"), txtServerPort->GetValue());
-               cfgfile->Write(wxT("username"), txtUsername->GetValue());
-               cfgfile->Write(wxT("password"), txtPassword->GetValue());
-               cfgfile->Write(wxT("prefix"), ServerPrefix);
-
-               if (chkUseSSL->GetValue() == TRUE){
-
-                       cfgfile->Write(wxT("ssl"), wxT("true"));
-
-               } else {
-
-                       cfgfile->Write(wxT("ssl"), wxT("false"));
-
-               }
-
-               cfgfile->Write(wxT("refresh"), wxT("1800"));
-
-               if (cmbServerType->GetCurrentSelection() == 1){
-
-                       cfgfile->Write(wxT("type"), wxT("CardDAV"));
-
-                       while(DirectoryCreated == FALSE){
-
-                               wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
-                               wxString XestiaABUserDirectory = GetUserDir();
-
-                               if (wxMkdir(XestiaABUserDirectory + wxT("\\accounts\\") + DirectoryName + wxT(".carddav"), 0740) == TRUE){
-
-                                       DirectoryCreated = TRUE;
-                                       cfgfile->Write(wxT("accountdir"), DirectoryName);
-
-                               } else {
-
-
-
-                               }
-
-                       }
-
-               } else if (cmbServerType->GetCurrentSelection() == 0){
-
-                       // Create the account directory.
-
-                       cfgfile->Write(wxT("type"), wxT("Local"));
-
-                       while(DirectoryCreated == FALSE){
-
-                               wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
-                               wxString XestiaABUserDirectory = GetUserDir();
-
-                               if (wxMkdir(XestiaABUserDirectory + wxT("\\accounts\\") + DirectoryName + wxT(".local"), 0740) == TRUE){
-
-                                       DirectoryCreated = TRUE;
-                                       cfgfile->Write(wxT("accountdir"), DirectoryName);
-
-                               }
-
-                       }
-
-               }
-
-               delete cfgfile;
-               cfgfile = NULL;
-
-               ReloadAccountConfig = TRUE;             
-
+        
+        XestiaABPrefDirectory = GetUserDir();
+        
+        AccountSettingsFile = XestiaABPrefDirectory + wxT("accounts");
+        
+        // Open the file for writing.
+        
+        wxFileConfig *cfgfile = new wxFileConfig("", "", AccountSettingsFile);
+        
+        // Check if account name already exists and return an error message
+        // if this is the case.
+        
+        wxString AccountName;
+        long itemindex = 0;
+        bool ContinueAcc;
+        ContinueAcc = cfgfile->GetFirstGroup(AccountName, itemindex);
+        
+        while (ContinueAcc){
+            
+            if (txtAccountName->GetValue() == AccountName){
+                
+                wxMessageBox(_("The selected account name is already used, please use another account name."), _("Account name already used"), wxICON_ERROR);
+                return;
+                
+            }
+            
+            cfgfile->SetPath(wxT("/"));
+            ContinueAcc = cfgfile->GetNextGroup(AccountName, itemindex);
+            
+        }
+        
+        if (cmbServerType->GetCurrentSelection() == 1){
+            
+            // Create the account directory.
+            
+            wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
+            
+            if (wxMkdir(XestiaABPrefDirectory + wxT("/accounts/") + DirectoryName + wxT(".carddav"), 0740) == TRUE){
+                
+                DirectoryCreated = TRUE;
+                
+            }
+            
+            if (DirectoryCreated == TRUE){
+                
+                WriteAccountDetails(cfgfile, wxT("CardDAV"), DirectoryName);
+                
+            } else {
+                
+                wxMessageBox(_("An error occured whilst creating the account directory."), _("Cannot create account directory"));
+                return;
+                
+            }
+            
+        } else if (cmbServerType->GetCurrentSelection() == 0){
+            
+            // Create the account directory.
+            
+            wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
+            
+            if (wxMkdir(XestiaABPrefDirectory + wxT("/accounts/") + DirectoryName + wxT(".local"), 0740) == TRUE){
+                
+                DirectoryCreated = TRUE;
+                
+            }
+            
+            if (DirectoryCreated == TRUE){
+                
+                WriteAccountDetails(cfgfile, wxT("Local"), DirectoryName);
+                
+            } else {
+                
+                wxMessageBox(_("An error occured whilst creating the account directory."), _("Cannot create account directory"));
+                return;
+                
+            }
+            
+        }
+        
+        delete cfgfile;
+        cfgfile = NULL;
+        
+        ReloadAccountConfig = TRUE;
+        
 #else
-
-               XestiaABUserDirectory = GetUserPrefDir();
-
-               AccountSettingsFile = XestiaABUserDirectory + wxT("accounts");
-               
-               // Open the file for writing.
-               
-               wxFileConfig *cfgfile = new wxFileConfig("", "", AccountSettingsFile);
-               
-               // Check if account name already exists and return an error message
-               // if this is the case.
-               
-               wxString AccountName;
-               long itemindex = 0;
-               bool ContinueAcc;       
-               ContinueAcc = cfgfile->GetFirstGroup(AccountName, itemindex);
-
-               while (ContinueAcc){
-               
-                       if (txtAccountName->GetValue() == AccountName){
-                       
-                               wxMessageBox(_("The selected account name is already used, please use another account name."), _("Account name already used"), wxICON_ERROR);
-                               return;
-                       
-                       }
-               
-                       cfgfile->SetPath(wxT("/"));
-                       ContinueAcc = cfgfile->GetNextGroup(AccountName, itemindex);
-               
-               }
-               
-               cfgfile->SetPath(txtAccountName->GetValue());
-               cfgfile->Write(wxT("address"), txtServerAddress->GetValue());
-               cfgfile->Write(wxT("port"), txtServerPort->GetValue());
-               cfgfile->Write(wxT("username"), txtUsername->GetValue());
-               cfgfile->Write(wxT("password"), txtPassword->GetValue());
-               cfgfile->Write(wxT("prefix"), ServerPrefix);
-               
-               if (chkUseSSL->GetValue() == TRUE){
-               
-                       cfgfile->Write(wxT("ssl"), wxT("true"));
-               
-               } else {
-               
-                       cfgfile->Write(wxT("ssl"), wxT("false"));
-               
-               }
-
-               cfgfile->Write(wxT("refresh"), wxT("1800"));
-
-               if (cmbServerType->GetCurrentSelection() == 1){
-               
-                       while(DirectoryCreated == FALSE){
-
-                               wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
-       
-                               if (wxMkdir(XestiaABUserDirectory + wxT("/accounts/") + DirectoryName + wxT(".carddav"), 0740) == TRUE){
-               
-                                       DirectoryCreated = TRUE;
-                                       cfgfile->Write(wxT("accountdir"), DirectoryName);
-               
-                               }
-                       
-                       }
-               
-               } else if (cmbServerType->GetCurrentSelection() == 0){
-               
-                       // Create the account directory.
-                       
-                       while(DirectoryCreated == FALSE){
-                       
-                               wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
-                       
-                               if (wxMkdir(XestiaABUserDirectory + wxT("/accounts/") + DirectoryName + wxT(".carddav"), 0740) == TRUE){
-                               
-                                       DirectoryCreated = TRUE;
-                                       cfgfile->Write(wxT("accountdir"), DirectoryName);
-                               
-                               }
-                       
-                       }
-                       
-               }
-
-               delete cfgfile;
-               cfgfile = NULL;
-               
-               ReloadAccountConfig = TRUE;
-
+        
+        XestiaABPrefDirectory = GetUserDir();
+        
+        AccountSettingsFile = GetUserPrefDir() + wxT("accounts");
+        
+        // Open the file for writing.
+        
+        wxFileConfig *cfgfile = new wxFileConfig("", "", AccountSettingsFile);
+        
+        // Check if account name already exists and return an error message
+        // if this is the case.
+        
+        wxString AccountName;
+        long itemindex = 0;
+        bool ContinueAcc;
+        ContinueAcc = cfgfile->GetFirstGroup(AccountName, itemindex);
+        
+        while (ContinueAcc){
+            
+            if (txtAccountName->GetValue() == AccountName){
+                
+                wxMessageBox(_("The selected account name is already used, please use another account name."), _("Account name already used"), wxICON_ERROR);
+                return;
+                
+            }
+            
+            cfgfile->SetPath(wxT("/"));
+            ContinueAcc = cfgfile->GetNextGroup(AccountName, itemindex);
+            
+        }
+        
+        if (cmbServerType->GetCurrentSelection() == 1){
+            
+            // Create the account directory.
+            
+            wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
+            
+            if (wxMkdir(XestiaABPrefDirectory + wxT("/accounts/") + DirectoryName + wxT(".carddav"), 0740) == TRUE){
+                
+                DirectoryCreated = TRUE;
+                
+            }
+            
+            if (DirectoryCreated == TRUE){
+                
+                WriteAccountDetails(cfgfile, wxT("CardDAV"), DirectoryName);
+                
+            } else {
+                
+                wxMessageBox(_("An error occured whilst creating the account directory."), _("Cannot create account directory"));
+                return;
+                
+            }
+            
+        } else if (cmbServerType->GetCurrentSelection() == 0){
+            
+            // Create the account directory.
+            
+            wxString DirectoryName = txtAccountName->GetValue().Mid(0, 30) + RandomNumberSuffix;
+            
+            if (wxMkdir(XestiaABPrefDirectory + wxT("/accounts/") + DirectoryName + wxT(".local"), 0740) == TRUE){
+                
+                DirectoryCreated = TRUE;
+                
+            }
+            
+            if (DirectoryCreated == TRUE){
+                
+                WriteAccountDetails(cfgfile, wxT("Local"), DirectoryName);
+                
+            } else {
+                
+                wxMessageBox(_("An error occured whilst creating the account directory."), _("Cannot create account directory"));
+                return;
+                
+            }
+            
+        }
+        
+        delete cfgfile;
+        cfgfile = NULL;
+        
+        ReloadAccountConfig = TRUE;
+        
 #endif
+        
+        this->Close();
+        
+    }
+    
+}
 
-               this->Close();
-       
-       }
-
+void frmNewAccount::WriteAccountDetails(wxFileConfig *cfgfilein, wxString AccountType, wxString DirectoryName){
+    
+    cfgfilein->SetPath(txtAccountName->GetValue());
+    cfgfilein->Write(wxT("address"), txtServerAddress->GetValue());
+    cfgfilein->Write(wxT("port"), txtServerPort->GetValue());
+    cfgfilein->Write(wxT("username"), txtUsername->GetValue());
+    cfgfilein->Write(wxT("password"), txtPassword->GetValue());
+    cfgfilein->Write(wxT("prefix"), ServerPrefix);
+    cfgfilein->Write(wxT("accountdir"), DirectoryName);
+    
+    if (chkUseSSL->GetValue() == TRUE){
+        
+        cfgfilein->Write(wxT("ssl"), wxT("true"));
+        
+    } else {
+        
+        cfgfilein->Write(wxT("ssl"), wxT("false"));
+        
+    }
+    
+    cfgfilein->Write(wxT("refresh"), wxT("1800"));
+    cfgfilein->Write(wxT("type"), AccountType);
+    
 }
 
 void frmNewAccount::CloseWindow( wxCommandEvent& event )
 {
-       ReloadAccountConfig = FALSE;
-       this->Close();
+    ReloadAccountConfig = FALSE;
+    this->Close();
 }
 
 void frmNewAccount::UpdateRequirements( wxCommandEvent& event )
 {
-
-       // Update the options.
-       
-       if (cmbServerType->GetCurrentSelection() == 1){
-
-               txtServerAddress->Enable();
-               txtServerPort->Enable();
-               txtUsername->Enable();
-               txtPassword->Enable();
-               chkUseSSL->Enable();
-       
-       } else if (cmbServerType->GetCurrentSelection() == 0){
-       
-               txtServerAddress->Disable();
-               txtServerPort->Disable();
-               txtUsername->Disable();
-               txtPassword->Disable();
-               chkUseSSL->Disable();
-       
-       }
-
+    
+    // Update the options.
+    
+    if (cmbServerType->GetCurrentSelection() == 1){
+        
+        txtServerAddress->Enable();
+        txtServerPort->Enable();
+        txtUsername->Enable();
+        txtPassword->Enable();
+        chkUseSSL->Enable();
+        
+    } else if (cmbServerType->GetCurrentSelection() == 0){
+        
+        txtServerAddress->Disable();
+        txtServerPort->Disable();
+        txtUsername->Disable();
+        txtPassword->Disable();
+        chkUseSSL->Disable();
+        
+    }
+    
 }
 
 void frmNewAccount::SetupPointers(bool *ReloadAccountInc){
-
-       ReloadAccountConfig = ReloadAccountInc;
-
+    
+    ReloadAccountConfig = ReloadAccountInc;
+    
 }
\ No newline at end of file
index a94ee7c..18f7412 100644 (file)
@@ -2,9 +2,9 @@
 #define __frmNewAccount__
 
 /**
-@file
-Subclass of frmNewAccountADT, which is generated by wxFormBuilder.
-*/
+ @file
+ Subclass of frmNewAccountADT, which is generated by wxFormBuilder.
+ */
 
 #include "AppXestiaAddrBk.h"
 
@@ -13,22 +13,23 @@ Subclass of frmNewAccountADT, which is generated by wxFormBuilder.
 /** Implementing frmNewAccountADT */
 class frmNewAccount : public frmNewAccountADT
 {
-       protected:
-               // Handlers for frmNewAccountADT events.
-               void CheckAccountName( wxCommandEvent& event );         
-               void ProcessPrevious( wxCommandEvent& event );
-               void ProcessNext( wxCommandEvent& event );
-               void CloseWindow( wxCommandEvent& event );
-               void UpdateRequirements( wxCommandEvent& event );
-       public:
-               /** Constructor */
-               frmNewAccount( wxWindow* parent );
-               void SetupPointers(bool *ReloadAccountInc);
-       //// end generated class members
-       private:
-               int PageSeek = 0;
-               wxString ServerPrefix;
-               bool ReloadAccountConfig = FALSE;
+protected:
+    // Handlers for frmNewAccountADT events.
+    void CheckAccountName( wxCommandEvent& event );
+    void ProcessPrevious( wxCommandEvent& event );
+    void ProcessNext( wxCommandEvent& event );
+    void CloseWindow( wxCommandEvent& event );
+    void UpdateRequirements( wxCommandEvent& event );
+    void WriteAccountDetails( wxFileConfig *cfgfilein, wxString AccountType, wxString DirectoryName );
+public:
+    /** Constructor */
+    frmNewAccount( wxWindow* parent );
+    void SetupPointers(bool *ReloadAccountInc);
+    //// end generated class members
+private:
+    int PageSeek = 0;
+    wxString ServerPrefix;
+    bool ReloadAccountConfig = FALSE;
 };
 
 #endif // __frmNewAccount__
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