Index: /tags/contactcenter/1.20/setup/phpgw_es-es.lang
===================================================================
--- /tags/contactcenter/1.20/setup/phpgw_es-es.lang	(revision 203)
+++ /tags/contactcenter/1.20/setup/phpgw_es-es.lang	(revision 203)
@@ -0,0 +1,167 @@
+Add Participants	contactcenter	es-es	Agregar Participantes
+Add Relation	contactcenter	es-es	Agregue la Relación
+Address 1	contactcenter	es-es	Dirección 1
+Address 2	contactcenter	es-es	Dirección 2
+Addresses	contactcenter	es-es	Direcciones
+Address Other	contactcenter	es-es	Otra Dirección
+Alias	common	es-es	Apodo
+Alternative	contactcenter	es-es	Alternativa
+An error has occurred while the exportation.	contactcenter	es-es	Um error ocurrió durante la exportación
+Attributes	contactcenter	es-es	Cualidades
+Available	contactcenter	es-es	Disponible
+Birthdate	contactcenter	es-es	Nacimiento
+Browse	common	es-es	Buscar
+Cards View	contactcenter	es-es	Ver Tarjetas
+Cards Visualization Preferences	contactcenter	es-es	Preferencias de Vizualización de Tarjetas
+Catalogues	contactcenter	es-es	Catálogos
+Cellphone	contactcenter	es-es	Teléfono móvil
+Choose City	contactcenter	es-es	Elegir Ciudad
+Choose Country	contactcenter	es-es	Elegir País
+Choose 'E-mail' or 'Telephone'	contactcenter	es-es	Elija el ' E-mail ' o el ' teléfono '
+Choose Email Type...	contactcenter	es-es	Elija el tipo de e-mail
+Choose Prefix...	contactcenter	es-es	Elegir Prefijo
+Choose Sex ...	contactcenter	es-es	Elegir Sexo
+Choose State	contactcenter	es-es	Elegir Estado
+Choose Suffix...	contactcenter	es-es	Elegir Caracteristica
+Choose Telephone Type...	contactcenter	es-es	Elija el tipo del Teléfono...
+Choose Type of Address	contactcenter	es-es	Elegir Tipo de Dirección
+Choose Type of Connection	contactcenter	es-es	Elegir tipo de Conexión
+City	contactcenter	es-es	Ciudad
+Close	contactcenter	es-es	Cerrar
+Comercial	contactcenter	es-es	Comercial
+Complement	contactcenter	es-es	Complemento
+Confirm Removal of this Contact?	contactcenter	es-es	¿Confirma la eliminación de este Contacto?
+Confirm Removal of this Group?	contactcenter	es-es	¿Confirma la eliminación de este Contacto?
+Connection Name	contactcenter	es-es	Nombre de la Conexión
+Connections	contactcenter	es-es	Conexiones
+Connection Value	contactcenter	es-es	Valor de la Conexión
+Connector Setup	contactcenter	es-es	Configuración de la Conexión
+contactcenter	common	es-es	Catálogo de Direcciones
+Contact Center	common	es-es	Catálogo de Direcciones
+Contact [Full]	contactcenter	es-es	Contacto [Completo]
+Contact Group List	common	es-es	Lista de Grupos de Contactos
+Contacting Server...	contactcenter	es-es	Conectando al Servidor
+Contact [Quick Add]	contactcenter	es-es	Contacto [Añadir rápidamente]
+Contacts	common	es-es	Contactos
+Couldn't contact server or server response is invalid. Contact Admin.	contactcenter	es-es	No fue posible establecer conexión con el servidor. Entre en el Administrador del sistema
+Country	contactcenter	es-es	País
+Data to be serialized is of unknown type!	contactcenter	es-es	Información a ser serializada es de tipo desconocida
+Day	contactcenter	es-es	Día
+Default	contactcenter	pt-br	Estándar
+Default Person Email Type	contactcenter	es-es	Tipo standar de teléfono de la persona
+Default Person Telephone Type	contactcenter	es-es	Tipo standar de teléfono de la persona
+Display Connector Client-Server Status Information?	contactcenter	es-es	Exhibir Informaciones del Status de la Conexión Cliente-Servidor
+Edit Contact	contactcenter	es-es	Editar Contacto
+Edit Group	contactcenter	es-es	Editar Grupo
+E-mails and Telephones	contactcenter	es-es	E-mails y Teléfonos
+Empty	contactcenter	es-es	Vacío
+Entry added with success!	contactcenter	es-es	¡Contacto añadido con suceso!
+Export as Expresso (default) CSV.	contactcenter	es-es	Exportar como Expresso (standar) CSV
+Export as Mozilla Thunderbird CSV.	contactcenter	es-es	Exportar como Mozilla Thunderbird CSV.
+Export as Outlook 2000 (English) CSV.	contactcenter	es-es	Exportar como Outlook 2000 (Inglés) CSV.
+Export as Outlook 2000 (Portuguese) CSV.	contactcenter	es-es	Exportar com Outlook 2000 (Portugués) CSV
+Export as Outlook Expresso (English) CSV.	contactcenter	es-es	Exportar como Outlook Express (Inglés) CSV.
+Export as Outlook Express (Portuguese) CSV.	contactcenter	es-es	Exportar como Outook Express (Portugués) CSV.
+Export Contacts	contactcenter	es-es	Exportar Contactos
+Expresso (default)	contactcenter	es-es	Expresso (standar)
+Family Names	common	es-es	Apellido
+Fax	contactcenter	es-es	Fax
+Female	contactcenter	es-es	Femenino
+field is empty	contactcenter	es-es	Campo esta vacío
+Found %1 Entries	common	es-es	Encontrado %1 Resultado(s)
+Full Add	contactcenter	es-es	Agregue Completo
+Full Name	contactcenter	es-es	Nombre Completo
+Given Names	common	es-es	Nombre
+Go	common	es-es	Ir
+GPG Finger Print	contactcenter	es-es	Firma GPG
+Group Add	common	es-es	Añadir Grupo
+Home	contactcenter	es-es	Casa
+Import	contactcenter	es-es	Importar
+Import Contacts	contactcenter	es-es	Importar Contactos
+Import/Export	contactcenter	es-es	Importar/Exportar
+Import/Export	contactcenter	es-es	Importar/Exportar
+Import / Export Personal Contacts	contactcenter	es-es	Importar/Exportar Contactos Personales
+Importing contacts...	contactcenter	es-es	Importando Contactos...
+Insert a New Group	common	es-es	Incluir um Nuevo Grupo
+insert	common	es-es	Incluir
+Invalid Date	common	es-es	Fecha inválida
+Is Default?	contactcenter	es-es	¿Es Estándar?
+Is My	contactcenter	es-es	Es mío
+Main	contactcenter	es-es	Principal
+Male	contactcenter	es-es	Masculino
+Month	contactcenter	es-es	Mes
+Mozilla Thunderbird	contactcenter	es-es	Mozilla Thunderbird
+New City	contactcenter	es-es	Nueva Ciudad
+New...	contactcenter	es-es	Nuevo...
+New...	contactcenter	es-es	Nuevo...
+New	contactcenter	es-es	Nuevo
+New Email	contactcenter	pt-br	Nuevo Email
+New from same Company	contactcenter	es-es	Nuevo de la misma empresa
+New from the same Type	contactcenter	es-es	Nuevo del mismo tipo
+New State	contactcenter	es-es	Nuevo Estado
+New Telephone	contactcenter	es-es	Nuevo Teléfono
+No Cards	contactcenter	es-es	Ninguno
+No Cities found for this State.	contactcenter	es-es	Ninguna Ciudad encontrada para este Estado
+No City	contactcenter	es-es	Ninguna Ciudad
+No Entries Found!	contactcenter	es-es	¡Ningún resultado encontrado!
+No Room for Cards! Increase your browser area	contactcenter	es-es	¡Área muy pequeña para ser vista a modo de tarjetas! Aumente el área (ventana) de su navegador
+No Room for Cards! Increase your browser area.	contactcenter	es-es	Sin Espacio para las Tarjetas! Aumente el área de su navegador
+No State	contactcenter	es-es	Ningún Estado
+No States found for this Country.	contactcenter	es-es	Ningún Estado encontrado para este País
+Operation Timed Out.	contactcenter	es-es	Tiempo de la operación agotada
+Option	contactcenter	es-es	Opción
+Outlook 2000	contactcenter	es-es	Outlook 2000
+Outlook Express	contactcenter	es-es	Outlook Express
+Pager	contactcenter	es-es	Paginador
+Participants	common	es-es	Participantes
+People	contactcenter	es-es	Privado
+Personal Contacts	common	es-es	Contactos Personales
+Personal Data	contactcenter	es-es	Datos Personales
+Phone	contactcenter	es-es	Teléfono
+PO Box	contactcenter	es-es	Caja Postal
+Postal Code	contactcenter	es-es	Casilla de Correo
+Prefix	contactcenter	es-es	Prefijo
+Problems on adding your Contact. The email "%1" already exists in: %2	common	es-es	No fue posible añadir. El e-mail "%1" ya existe en los siguentes contactos: %2
+Processing Information...	contactcenter	es-es	Procesando Informaciones..
+Quick Add	common	es-es	Añadir Rápidamente
+Relations	contactcenter	es-es	Relaciones
+Remove	common	es-es	Remover
+Remove Contact	contactcenter	es-es	Remover Contacto
+Removed Entry!	common	es-es	¡Contacto removido com suceso (ID = %1)!
+Removed Entry ID %1!	common	es-es	¡Contacto removido com suceso (ID = %1)!
+Remove Group	contactcenter	es-es	Remover grupo
+Remove Selected Relations	contactcenter	es-es	Quite Las Relaciones Seleccionadas
+Reset	common	es-es	Limpiar
+Results	contactcenter	es-es	Resultados
+Search for Catalog Entries	contactcenter	es-es	Buscar Resultados en el Catálogo
+Search for...	common	es-es	Buscar por...
+Sector	contactcenter	es-es	Sector
+Select a valid CSV file to import your contacts	contactcenter	es-es	Seleccione um archivo CSV valido para importar sus contactos
+Select E-Mail	contactcenter	es-es	Seleccione el E-mail
+Select Photo	contactcenter	es-es	Seleccionar Foto
+Select the file that contains the contacts to be imported:	contactcenter	es-es	Seleccione el archivo que contiene los contactos a ser importados
+Select the file type	contactcenter	es-es	Seleccione el tipo del archivo
+Select the format type that you want to export your contacts	contactcenter	es-es	Seleccione el tipo de formato que le gustaria utilizar para exportar sus contactos
+Select the telephone	contactcenter	es-es	Seleccione el teléfono
+Send Mail	common	es-es	Enviar e-mail
+Server Contacted. Waiting for response...	contactcenter	es-es	Servidor contactado. Esperando respuesta...
+Sex	contactcenter	es-es	Sexo
+Showing found entries	common	es-es	Mostrando items encontrados
+State	contactcenter	es-es	Estado
+Suffix	contactcenter	es-es	Caracteristica
+Table View	contactcenter	es-es	Mostrar Matriz
+Telephone	contactcenter	es-es	Teléfono
+The Expresso supports the contacts importation in the CSV file format.	contactcenter	es-es	El Expresso soporta la importación de contactos en archivos de formato CVS 
+The importation has failed. Verify the file format.	contactcenter	es-es	La importación há fallado. Verifique el formato del archivo
+The importation has finished.	contactcenter	es-es	La importación ha acabado.
+Type new city here	contactcenter	es-es	Teclee el nombre aquí
+Type new state here	contactcenter	es-es	Teclee el nombre aquí
+Type of Address	contactcenter	es-es	Tipo de Dirección
+Type of Connection	contactcenter	es-es	Tipo de Conexión
+Unavailable or empty Catalog	contactcenter	es-es	Catálogo vacío o no disponible
+Updated Successfully!	contactcenter	es-es	¡Actualizado con Suceso!
+Users List	contactcenter	es-es	Lista de Usuarios
+Value	contactcenter	es-es	Valor
+Views	contactcenter	es-es	Vistas
+Work	contactcenter	pt-br	Trabajo
+Year	contactcenter	es-es	Año
Index: /tags/contactcenter/1.20/setup/cities_pt-br.inc.php
===================================================================
--- /tags/contactcenter/1.20/setup/cities_pt-br.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/setup/cities_pt-br.inc.php	(revision 2)
@@ -0,0 +1,9788 @@
+<?php
+/***************************************************************************\
+* eGroupWare - Contacts Center                                              *
+* http://www.egroupware.org                                                 *
+* Written by:                                                               *
+*  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+*  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+*  - Nilton Emilio Buhrer Neto <nilton.neto@gmail.com>                      *
+*  sponsored by Thyamad - http://www.thyamad.com                            *
+* ------------------------------------------------------------------------- *
+*  This program is free software; you can redistribute it and/or modify it  *
+*  under the terms of the GNU General Public License as published by the    *
+*  Free Software Foundation; either version 2 of the License, or (at your   *
+*  option) any later version.                                               *
+\***************************************************************************/
+
+/* Brazilian Cities Data*/
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (1, 1, 'BR', NULL, NULL, 'Curitiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (2, 2, 'BR', NULL, NULL, 'Salvador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (6, 3, 'BR', NULL, NULL, 'Brasília')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (9, 1, 'BR', NULL, NULL, 'Paranaguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15, 1, 'BR', NULL, NULL, 'Maringá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16, 1, 'BR', NULL, NULL, 'Londrina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (20, 1, 'BR', NULL, NULL, 'Toledo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (22, 1, 'BR', NULL, NULL, 'Pinhais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (23, 1, 'BR', NULL, NULL, 'Colombo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (25, 1, 'BR', NULL, NULL, 'Sengés')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (27, 4, 'BR', NULL, NULL, 'São Paulo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (28, 1, 'BR', NULL, NULL, 'Paranavaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (32, 12, 'BR', NULL, NULL, 'Florianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (33, 1, 'BR', NULL, NULL, 'Castro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (34, 1, 'BR', NULL, NULL, 'Campo Mourão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (37, 14, 'BR', NULL, NULL, 'Dourados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (38, 4, 'BR', NULL, NULL, 'Jacupiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (39, 1, 'BR', NULL, NULL, 'Foz do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (40, 15, 'BR', NULL, NULL, 'Porto Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (42, 1, 'BR', NULL, NULL, 'Medianeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (44, 4, 'BR', NULL, NULL, 'Botucatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (45, 12, 'BR', NULL, NULL, 'Joinville')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (46, 1, 'BR', NULL, NULL, 'Pato Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (48, 1, 'BR', NULL, NULL, 'Almirante Tamandaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (50, 18, 'BR', NULL, NULL, 'Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (51, 19, 'BR', NULL, NULL, 'Fortaleza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (26, 10, 'BR', NULL, NULL, 'Porto Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14, 6, 'BR', NULL, NULL, 'Rio de Janeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (24, 1, 'BR', NULL, NULL, 'Apucarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13, 1, 'BR', NULL, NULL, 'Cascavel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (36, 12, 'BR', NULL, NULL, 'São José')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (49, 1, 'BR', NULL, NULL, 'Dois Vizinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (54, 1, 'BR', NULL, NULL, 'Ponta Grossa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (55, 1, 'BR', NULL, NULL, 'Candói')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (56, 1, 'BR', NULL, NULL, 'Guarapuava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (57, 1, 'BR', NULL, NULL, 'São Miguel do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (58, 1, 'BR', NULL, NULL, 'Francisco Beltrão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (60, 1, 'BR', NULL, NULL, 'Goioerê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (62, 1, 'BR', NULL, NULL, 'Laranjeiras do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (63, 1, 'BR', NULL, NULL, 'Loanda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (64, 1, 'BR', NULL, NULL, 'Palotina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (65, 1, 'BR', NULL, NULL, 'Palmeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (66, 1, 'BR', NULL, NULL, 'Pérola')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (68, 1, 'BR', NULL, NULL, 'Umuarama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (69, 1, 'BR', NULL, NULL, 'Jandaia do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (70, 1, 'BR', NULL, NULL, 'Mandaguari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (71, 1, 'BR', NULL, NULL, 'Telêmaco Borba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (73, 1, 'BR', NULL, NULL, 'Ivaiporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (74, 1, 'BR', NULL, NULL, 'Wenceslau Braz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (75, 1, 'BR', NULL, NULL, 'Altônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (77, 1, 'BR', NULL, NULL, 'Ortigueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (78, 1, 'BR', NULL, NULL, 'Arapoti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (79, 1, 'BR', NULL, NULL, 'Santa Helena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11, 4, 'BR', NULL, NULL, 'Itu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (61, 1, 'BR', NULL, NULL, 'Ibaiti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (43, 1, 'BR', NULL, NULL, 'Cianorte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (52, NULL, 'PY', NULL, NULL, 'Assumção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (53, NULL, 'PY', NULL, NULL, 'Ciudad del Este')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (7, 3, 'BR', NULL, NULL, 'Taguatinga Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17, 7, 'PT', NULL, NULL, 'Vila Nova de Gaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18, 8, 'ES', NULL, NULL, 'Alcalá la Real')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (21, 9, 'IT', NULL, NULL, 'Torino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (35, 13, 'AO', NULL, NULL, 'Luanda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (41, 16, 'DE', NULL, NULL, 'Nürtingen')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (67, 1, 'BR', NULL, NULL, 'Santo Antonio da Platina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (76, 20, 'BR', NULL, NULL, 'Manaus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10, 1, 'BR', NULL, NULL, 'Cornelio Procopio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12, 1, 'BR', NULL, NULL, 'Rolandia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (29, 11, 'BR', NULL, NULL, 'Goiania')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (30, 1, 'BR', NULL, NULL, 'Brasilia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (59, 1, 'BR', NULL, NULL, 'Guaraniacu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10020, 1, 'BR', NULL, NULL, '4º Centenário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10021, 1, 'BR', NULL, NULL, 'Abapã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10022, 1, 'BR', NULL, NULL, 'Abatiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10023, 1, 'BR', NULL, NULL, 'Acampamento das Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10024, 1, 'BR', NULL, NULL, 'Adhemar de Barros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10025, 1, 'BR', NULL, NULL, 'Adrianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10026, 1, 'BR', NULL, NULL, 'Agostinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10027, 1, 'BR', NULL, NULL, 'Agudos do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10028, 1, 'BR', NULL, NULL, 'Alecrim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10029, 1, 'BR', NULL, NULL, 'Alexandra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10030, 1, 'BR', NULL, NULL, 'Altamira do Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10031, 1, 'BR', NULL, NULL, 'Altaneira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10032, 1, 'BR', NULL, NULL, 'Alto Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10033, 1, 'BR', NULL, NULL, 'Alto Alegre do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10034, 1, 'BR', NULL, NULL, 'Alto Amparo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10035, 1, 'BR', NULL, NULL, 'Alto Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10036, 1, 'BR', NULL, NULL, 'Alto Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10037, 1, 'BR', NULL, NULL, 'Alto Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10038, 1, 'BR', NULL, NULL, 'Alto Piquiri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10039, 1, 'BR', NULL, NULL, 'Alto Porã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10040, 1, 'BR', NULL, NULL, 'Alto Sabiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10041, 1, 'BR', NULL, NULL, 'Alto Santa Fé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10042, 1, 'BR', NULL, NULL, 'Alto São João')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10043, 1, 'BR', NULL, NULL, 'Alto do Amparo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10044, 1, 'BR', NULL, NULL, 'Alvorada do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10045, 1, 'BR', NULL, NULL, 'Alvorada do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10046, 1, 'BR', NULL, NULL, 'Amaporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10047, 1, 'BR', NULL, NULL, 'Amorinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10048, 1, 'BR', NULL, NULL, 'Ampére')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10049, 1, 'BR', NULL, NULL, 'Anahy')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10050, 1, 'BR', NULL, NULL, 'Andirá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10051, 1, 'BR', NULL, NULL, 'Andorinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10052, 1, 'BR', NULL, NULL, 'Angai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10053, 1, 'BR', NULL, NULL, 'Antas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10054, 1, 'BR', NULL, NULL, 'Antonina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10055, 1, 'BR', NULL, NULL, 'Antônio Brandão de Oliveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10056, 1, 'BR', NULL, NULL, 'Antônio Olinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10057, 1, 'BR', NULL, NULL, 'Anunciação')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10058, 1, 'BR', NULL, NULL, 'Aparecida do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10059, 1, 'BR', NULL, NULL, 'Apiaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10060, 1, 'BR', NULL, NULL, 'Aquidaban')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10061, 1, 'BR', NULL, NULL, 'Aranha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10062, 1, 'BR', NULL, NULL, 'Arapongas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10063, 1, 'BR', NULL, NULL, 'Arapuan')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10064, 1, 'BR', NULL, NULL, 'Arapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10065, 1, 'BR', NULL, NULL, 'Ararapira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10066, 1, 'BR', NULL, NULL, 'Araruna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10067, 1, 'BR', NULL, NULL, 'Araucária')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10068, 1, 'BR', NULL, NULL, 'Areia Branca dos Assis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10069, 1, 'BR', NULL, NULL, 'Areias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10070, 1, 'BR', NULL, NULL, 'Aricanduva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10071, 1, 'BR', NULL, NULL, 'Ariranha do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10072, 1, 'BR', NULL, NULL, 'Aroeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10073, 1, 'BR', NULL, NULL, 'Arquimedes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10074, 1, 'BR', NULL, NULL, 'Assaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10075, 1, 'BR', NULL, NULL, 'Assis Chateaubriand')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10076, 1, 'BR', NULL, NULL, 'Astorga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10077, 1, 'BR', NULL, NULL, 'Atalaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10078, 1, 'BR', NULL, NULL, 'Aurora do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10079, 1, 'BR', NULL, NULL, 'Açungui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10080, 1, 'BR', NULL, NULL, 'Bairro Cachoeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10081, 1, 'BR', NULL, NULL, 'Bairro Limoeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10082, 1, 'BR', NULL, NULL, 'Bairro do Felisberto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10083, 1, 'BR', NULL, NULL, 'Balsa Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10084, 1, 'BR', NULL, NULL, 'Bananas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10085, 1, 'BR', NULL, NULL, 'Bandeirantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10086, 1, 'BR', NULL, NULL, 'Bandeirantes d''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10087, 1, 'BR', NULL, NULL, 'Banhado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10088, 1, 'BR', NULL, NULL, 'Barbosa Ferraz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10089, 1, 'BR', NULL, NULL, 'Barra Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10090, 1, 'BR', NULL, NULL, 'Barra Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10091, 1, 'BR', NULL, NULL, 'Barra Santa Salete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10092, 1, 'BR', NULL, NULL, 'Barra do Jacaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10093, 1, 'BR', NULL, NULL, 'Barracão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10094, 1, 'BR', NULL, NULL, 'Barras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10095, 1, 'BR', NULL, NULL, 'Barreiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10096, 1, 'BR', NULL, NULL, 'Barreiro das Frutas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10097, 1, 'BR', NULL, NULL, 'Barreiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10098, 1, 'BR', NULL, NULL, 'Barrinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10099, 1, 'BR', NULL, NULL, 'Barro Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10100, 1, 'BR', NULL, NULL, 'Barão de Lucena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10101, 1, 'BR', NULL, NULL, 'Bateias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10102, 1, 'BR', NULL, NULL, 'Baulândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10103, 1, 'BR', NULL, NULL, 'Bela Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10104, 1, 'BR', NULL, NULL, 'Bela Vista do Caroba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10105, 1, 'BR', NULL, NULL, 'Bela Vista do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10106, 1, 'BR', NULL, NULL, 'Bela Vista do Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10107, 1, 'BR', NULL, NULL, 'Bela Vista do Piquiri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10108, 1, 'BR', NULL, NULL, 'Bela Vista do Tapiracui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10109, 1, 'BR', NULL, NULL, 'Bentópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10110, 1, 'BR', NULL, NULL, 'Bernardelli')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10111, 1, 'BR', NULL, NULL, 'Betaras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10112, 1, 'BR', NULL, NULL, 'Biscaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10113, 1, 'BR', NULL, NULL, 'Bituruna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10114, 1, 'BR', NULL, NULL, 'Boa Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10115, 1, 'BR', NULL, NULL, 'Boa Esperança do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10116, 1, 'BR', NULL, NULL, 'Boa Ventura de São Roque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10117, 1, 'BR', NULL, NULL, 'Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10118, 1, 'BR', NULL, NULL, 'Boa Vista da Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10119, 1, 'BR', NULL, NULL, 'Bocaina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10120, 1, 'BR', NULL, NULL, 'Bocaiúva do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10121, 1, 'BR', NULL, NULL, 'Bom Jardim do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10122, 1, 'BR', NULL, NULL, 'Bom Jesus do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10123, 1, 'BR', NULL, NULL, 'Bom Progresso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10124, 1, 'BR', NULL, NULL, 'Bom Retiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10125, 1, 'BR', NULL, NULL, 'Bom Sucesso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10126, 1, 'BR', NULL, NULL, 'Bom Sucesso do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10127, 1, 'BR', NULL, NULL, 'Borda do Campo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10128, 1, 'BR', NULL, NULL, 'Borman')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10129, 1, 'BR', NULL, NULL, 'Borrazópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10130, 1, 'BR', NULL, NULL, 'Botuquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10131, 1, 'BR', NULL, NULL, 'Bourbonia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10132, 1, 'BR', NULL, NULL, 'Braganey')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10133, 1, 'BR', NULL, NULL, 'Bragantina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10134, 1, 'BR', NULL, NULL, 'Brasilândia do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10135, 1, 'BR', NULL, NULL, 'Bugre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10136, 1, 'BR', NULL, NULL, 'Bulcão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10137, 1, 'BR', NULL, NULL, 'Cabrito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10138, 1, 'BR', NULL, NULL, 'Cacatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10139, 1, 'BR', NULL, NULL, 'Cachoeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10140, 1, 'BR', NULL, NULL, 'Cachoeira de Cima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10141, 1, 'BR', NULL, NULL, 'Cachoeira de São José')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10142, 1, 'BR', NULL, NULL, 'Cachoeira do Espírito Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10143, 1, 'BR', NULL, NULL, 'Cachoeirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10144, 1, 'BR', NULL, NULL, 'Cadeadinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10145, 1, 'BR', NULL, NULL, 'Caetano Mendes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10146, 1, 'BR', NULL, NULL, 'Cafeara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10147, 1, 'BR', NULL, NULL, 'Cafeeiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10148, 1, 'BR', NULL, NULL, 'Cafelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10149, 1, 'BR', NULL, NULL, 'Cafezal do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10150, 1, 'BR', NULL, NULL, 'Caitá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10151, 1, 'BR', NULL, NULL, 'Caiva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10152, 1, 'BR', NULL, NULL, 'Califórnia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10153, 1, 'BR', NULL, NULL, 'Calógeras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10154, 1, 'BR', NULL, NULL, 'Cambará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10155, 1, 'BR', NULL, NULL, 'Cambiju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10156, 1, 'BR', NULL, NULL, 'Cambira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10157, 1, 'BR', NULL, NULL, 'Cambé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10158, 1, 'BR', NULL, NULL, 'Campestrinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10159, 1, 'BR', NULL, NULL, 'Campina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10160, 1, 'BR', NULL, NULL, 'Campina Grande do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10161, 1, 'BR', NULL, NULL, 'Campina da Lagoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10162, 1, 'BR', NULL, NULL, 'Campina do Miranguava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10163, 1, 'BR', NULL, NULL, 'Campina do Simão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10164, 1, 'BR', NULL, NULL, 'Campina dos Furtados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10165, 1, 'BR', NULL, NULL, 'Campinas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10166, 1, 'BR', NULL, NULL, 'Campo Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10167, 1, 'BR', NULL, NULL, 'Campo Largo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10168, 1, 'BR', NULL, NULL, 'Campo Largo da Roseira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10169, 1, 'BR', NULL, NULL, 'Campo Magro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10170, 1, 'BR', NULL, NULL, 'Campo do Bugre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10171, 1, 'BR', NULL, NULL, 'Campo do Meio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10172, 1, 'BR', NULL, NULL, 'Campo do Tenente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10173, 1, 'BR', NULL, NULL, 'Candeia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10174, 1, 'BR', NULL, NULL, 'Canela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10175, 1, 'BR', NULL, NULL, 'Cantagalo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10176, 1, 'BR', NULL, NULL, 'Canzianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10177, 1, 'BR', NULL, NULL, 'Capanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10178, 1, 'BR', NULL, NULL, 'Capitão Leônidas Marques')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10179, 1, 'BR', NULL, NULL, 'Capivara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10180, 1, 'BR', NULL, NULL, 'Capoeirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10181, 1, 'BR', NULL, NULL, 'Capão Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10182, 1, 'BR', NULL, NULL, 'Capão Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10183, 1, 'BR', NULL, NULL, 'Capão Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10184, 1, 'BR', NULL, NULL, 'Capão Rico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10185, 1, 'BR', NULL, NULL, 'Capão da Lagoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10186, 1, 'BR', NULL, NULL, 'Cara Pintado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10187, 1, 'BR', NULL, NULL, 'Carajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10188, 1, 'BR', NULL, NULL, 'Carambeí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10189, 1, 'BR', NULL, NULL, 'Caramuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10190, 1, 'BR', NULL, NULL, 'Caratuva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10191, 1, 'BR', NULL, NULL, 'Carazinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10192, 1, 'BR', NULL, NULL, 'Carbonera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10193, 1, 'BR', NULL, NULL, 'Carlópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10194, 1, 'BR', NULL, NULL, 'Cará-Cará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10195, 1, 'BR', NULL, NULL, 'Casa Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10196, 1, 'BR', NULL, NULL, 'Cascatinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10197, 1, 'BR', NULL, NULL, 'Catanduvas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10198, 1, 'BR', NULL, NULL, 'Catanduvas do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10199, 1, 'BR', NULL, NULL, 'Catarinenses')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10200, 1, 'BR', NULL, NULL, 'Caxambu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10201, 1, 'BR', NULL, NULL, 'Centenário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10202, 1, 'BR', NULL, NULL, 'Centenário do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10203, 1, 'BR', NULL, NULL, 'Central Lupion')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10204, 1, 'BR', NULL, NULL, 'Centralito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10205, 1, 'BR', NULL, NULL, 'Centro Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10206, 1, 'BR', NULL, NULL, 'Cerne')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10207, 1, 'BR', NULL, NULL, 'Cerrado Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10208, 1, 'BR', NULL, NULL, 'Cerro Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10209, 1, 'BR', NULL, NULL, 'Cerro Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10210, 1, 'BR', NULL, NULL, 'Chopinzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10211, 1, 'BR', NULL, NULL, 'Cidade Gaúcha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10212, 1, 'BR', NULL, NULL, 'Cintra Pimentel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10213, 1, 'BR', NULL, NULL, 'Clevelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10214, 1, 'BR', NULL, NULL, 'Coitinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10215, 1, 'BR', NULL, NULL, 'Colorado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10216, 1, 'BR', NULL, NULL, 'Colônia Acioli')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10217, 1, 'BR', NULL, NULL, 'Colônia Castelhanos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10218, 1, 'BR', NULL, NULL, 'Colônia Castrolânda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10219, 1, 'BR', NULL, NULL, 'Colônia Centenário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10220, 1, 'BR', NULL, NULL, 'Colônia Cristina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10221, 1, 'BR', NULL, NULL, 'Colônia Dom Carlos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10222, 1, 'BR', NULL, NULL, 'Colônia Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10223, 1, 'BR', NULL, NULL, 'Colônia General Carneiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10224, 1, 'BR', NULL, NULL, 'Colônia Iapó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10225, 1, 'BR', NULL, NULL, 'Colônia Melissa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10226, 1, 'BR', NULL, NULL, 'Colônia Murici')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10227, 1, 'BR', NULL, NULL, 'Colônia Padre Paulo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10228, 1, 'BR', NULL, NULL, 'Colônia Pereira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10229, 1, 'BR', NULL, NULL, 'Colônia Santos Andrade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10230, 1, 'BR', NULL, NULL, 'Colônia Sapucaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10231, 1, 'BR', NULL, NULL, 'Colônia Saúde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10232, 1, 'BR', NULL, NULL, 'Colônia São José')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10233, 1, 'BR', NULL, NULL, 'Colônia Tapera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10234, 1, 'BR', NULL, NULL, 'Comur')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10235, 1, 'BR', NULL, NULL, 'Conceição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10236, 1, 'BR', NULL, NULL, 'Conchas Velhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10237, 1, 'BR', NULL, NULL, 'Conciolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10238, 1, 'BR', NULL, NULL, 'Congonhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10239, 1, 'BR', NULL, NULL, 'Congonhinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10240, 1, 'BR', NULL, NULL, 'Conselheiro Mairinck')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10241, 1, 'BR', NULL, NULL, 'Conselheiro Zacarias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10242, 1, 'BR', NULL, NULL, 'Contenda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10243, 1, 'BR', NULL, NULL, 'Copacabana do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10244, 1, 'BR', NULL, NULL, 'Corbélia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10245, 1, 'BR', NULL, NULL, 'Cornélio Procópio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10246, 1, 'BR', NULL, NULL, 'Coronel Domingos Soares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10247, 1, 'BR', NULL, NULL, 'Coronel Firmino Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10248, 1, 'BR', NULL, NULL, 'Coronel Vivida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10249, 1, 'BR', NULL, NULL, 'Correia de Freitas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10250, 1, 'BR', NULL, NULL, 'Corumbataí do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10251, 1, 'BR', NULL, NULL, 'Corvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10252, 1, 'BR', NULL, NULL, 'Costeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10253, 1, 'BR', NULL, NULL, 'Covó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10254, 1, 'BR', NULL, NULL, 'Coxilha Rica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10255, 1, 'BR', NULL, NULL, 'Cristo Rei')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10256, 1, 'BR', NULL, NULL, 'Cruz Machado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10257, 1, 'BR', NULL, NULL, 'Cruzeiro do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10258, 1, 'BR', NULL, NULL, 'Cruzeiro do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10259, 1, 'BR', NULL, NULL, 'Cruzeiro do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10260, 1, 'BR', NULL, NULL, 'Cruzeiro do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10261, 1, 'BR', NULL, NULL, 'Cruzmaltina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10262, 1, 'BR', NULL, NULL, 'Cunhaporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10263, 1, 'BR', NULL, NULL, 'Curiúva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10264, 1, 'BR', NULL, NULL, 'Curucaca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10265, 1, 'BR', NULL, NULL, 'Cândido de Abreu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10266, 1, 'BR', NULL, NULL, 'Céu Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10267, 1, 'BR', NULL, NULL, 'Deputado José Afonso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10268, 1, 'BR', NULL, NULL, 'Despique')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10269, 1, 'BR', NULL, NULL, 'Dez de Maio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10270, 1, 'BR', NULL, NULL, 'Diamante d''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10271, 1, 'BR', NULL, NULL, 'Diamante do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10272, 1, 'BR', NULL, NULL, 'Diamante do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10273, 1, 'BR', NULL, NULL, 'Doce Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10274, 1, 'BR', NULL, NULL, 'Dois Irmãos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10275, 1, 'BR', NULL, NULL, 'Dois Marcos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10276, 1, 'BR', NULL, NULL, 'Dom Rodrigo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10277, 1, 'BR', NULL, NULL, 'Dorizon')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10278, 1, 'BR', NULL, NULL, 'Douradina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10279, 1, 'BR', NULL, NULL, 'Doutor Antônio Paranhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10280, 1, 'BR', NULL, NULL, 'Doutor Camargo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10281, 1, 'BR', NULL, NULL, 'Doutor Ernesto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10282, 1, 'BR', NULL, NULL, 'Doutor Oliveira Castro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10283, 1, 'BR', NULL, NULL, 'Doutor Ulysses')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10284, 1, 'BR', NULL, NULL, 'Eduardo Xavier da Silva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10285, 1, 'BR', NULL, NULL, 'Emboguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10286, 1, 'BR', NULL, NULL, 'Emboque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10287, 1, 'BR', NULL, NULL, 'Encantado d''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10288, 1, 'BR', NULL, NULL, 'Encruzilhada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10289, 1, 'BR', NULL, NULL, 'Engenheiro Beltrão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10290, 1, 'BR', NULL, NULL, 'Entre Rios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10291, 1, 'BR', NULL, NULL, 'Entre Rios do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10292, 1, 'BR', NULL, NULL, 'Enéas Marques')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10293, 1, 'BR', NULL, NULL, 'Esperança Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10294, 1, 'BR', NULL, NULL, 'Esperança do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10295, 1, 'BR', NULL, NULL, 'Espigão Alto do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10296, 1, 'BR', NULL, NULL, 'Espírito Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10297, 1, 'BR', NULL, NULL, 'Estação General Lúcio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10298, 1, 'BR', NULL, NULL, 'Estação Roça Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10299, 1, 'BR', NULL, NULL, 'Europa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10300, 1, 'BR', NULL, NULL, 'Euzébio de Oliveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10301, 1, 'BR', NULL, NULL, 'Faisqueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10302, 1, 'BR', NULL, NULL, 'Farol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10303, 1, 'BR', NULL, NULL, 'Faxina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10304, 1, 'BR', NULL, NULL, 'Faxinal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10305, 1, 'BR', NULL, NULL, 'Faxinal Santa Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10306, 1, 'BR', NULL, NULL, 'Faxinal do Céu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10307, 1, 'BR', NULL, NULL, 'Faxinal dos Elias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10308, 1, 'BR', NULL, NULL, 'Fazenda Jangada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10309, 1, 'BR', NULL, NULL, 'Fazenda Rio Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10310, 1, 'BR', NULL, NULL, 'Fazenda Salmo 23')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10311, 1, 'BR', NULL, NULL, 'Fazenda do Brigadeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10312, 1, 'BR', NULL, NULL, 'Fazenda dos Barbosas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10313, 1, 'BR', NULL, NULL, 'Fazendinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10314, 1, 'BR', NULL, NULL, 'Felpudo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10315, 1, 'BR', NULL, NULL, 'Fernandes Pinheiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10316, 1, 'BR', NULL, NULL, 'Fernão Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10317, 1, 'BR', NULL, NULL, 'Ferraria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10318, 1, 'BR', NULL, NULL, 'Ferreiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10319, 1, 'BR', NULL, NULL, 'Figueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10320, 1, 'BR', NULL, NULL, 'Figueira do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10321, 1, 'BR', NULL, NULL, 'Fiusas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10322, 1, 'BR', NULL, NULL, 'Flor da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10323, 1, 'BR', NULL, NULL, 'Flor da Serra do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10324, 1, 'BR', NULL, NULL, 'Floraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10325, 1, 'BR', NULL, NULL, 'Floresta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10326, 1, 'BR', NULL, NULL, 'Florestópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10327, 1, 'BR', NULL, NULL, 'Floriano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10328, 1, 'BR', NULL, NULL, 'Florópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10329, 1, 'BR', NULL, NULL, 'Fluviópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10330, 1, 'BR', NULL, NULL, 'Flórida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10331, 1, 'BR', NULL, NULL, 'Formigone')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10332, 1, 'BR', NULL, NULL, 'Formosa do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10333, 1, 'BR', NULL, NULL, 'Foz do Jordão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10334, 1, 'BR', NULL, NULL, 'Francisco Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10335, 1, 'BR', NULL, NULL, 'Francisco Frederico Teixeira Guimarães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10336, 1, 'BR', NULL, NULL, 'Frei Timóteo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10337, 1, 'BR', NULL, NULL, 'Fueros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10338, 1, 'BR', NULL, NULL, 'Fundão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10339, 1, 'BR', NULL, NULL, 'Fênix')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10340, 1, 'BR', NULL, NULL, 'Gamadinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10341, 1, 'BR', NULL, NULL, 'Gamela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10342, 1, 'BR', NULL, NULL, 'Gavião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10343, 1, 'BR', NULL, NULL, 'Gaúcha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10344, 1, 'BR', NULL, NULL, 'General Carneiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10345, 1, 'BR', NULL, NULL, 'General Osório')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10346, 1, 'BR', NULL, NULL, 'Geremia Lunardelli')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10347, 1, 'BR', NULL, NULL, 'Godoy Moreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10348, 1, 'BR', NULL, NULL, 'Goioxim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10349, 1, 'BR', NULL, NULL, 'Gonçalves Júnior')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10350, 1, 'BR', NULL, NULL, 'Graciosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10351, 1, 'BR', NULL, NULL, 'Grandes Rios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10352, 1, 'BR', NULL, NULL, 'Guaiporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10353, 1, 'BR', NULL, NULL, 'Guairaçá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10354, 1, 'BR', NULL, NULL, 'Guajuvira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10355, 1, 'BR', NULL, NULL, 'Guamiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10356, 1, 'BR', NULL, NULL, 'Guamirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10357, 1, 'BR', NULL, NULL, 'Guapirama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10358, 1, 'BR', NULL, NULL, 'Guaporema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10359, 1, 'BR', NULL, NULL, 'Guaporé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10360, 1, 'BR', NULL, NULL, 'Guaraci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10361, 1, 'BR', NULL, NULL, 'Guaragi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10362, 1, 'BR', NULL, NULL, 'Guaraituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10363, 1, 'BR', NULL, NULL, 'Guarani')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10364, 1, 'BR', NULL, NULL, 'Guaraniaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10365, 1, 'BR', NULL, NULL, 'Guarapuavinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10366, 1, 'BR', NULL, NULL, 'Guaraqueçaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10367, 1, 'BR', NULL, NULL, 'Guararema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10368, 1, 'BR', NULL, NULL, 'Guaratuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10369, 1, 'BR', NULL, NULL, 'Guaravera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10370, 1, 'BR', NULL, NULL, 'Guaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10371, 1, 'BR', NULL, NULL, 'Guaraúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10372, 1, 'BR', NULL, NULL, 'Guardamoria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10373, 1, 'BR', NULL, NULL, 'Guará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10374, 1, 'BR', NULL, NULL, 'Guaíra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10375, 1, 'BR', NULL, NULL, 'Góis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10376, 1, 'BR', NULL, NULL, 'Harmonia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10377, 1, 'BR', NULL, NULL, 'Herculândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10378, 1, 'BR', NULL, NULL, 'Herval Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10379, 1, 'BR', NULL, NULL, 'Herveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10380, 1, 'BR', NULL, NULL, 'Hidrelétrica Itaipu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10381, 1, 'BR', NULL, NULL, 'Honório Serpa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10382, 1, 'BR', NULL, NULL, 'Iarama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10383, 1, 'BR', NULL, NULL, 'Ibema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10384, 1, 'BR', NULL, NULL, 'Ibiaci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10385, 1, 'BR', NULL, NULL, 'Ibiporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10386, 1, 'BR', NULL, NULL, 'Icaraíma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10387, 1, 'BR', NULL, NULL, 'Icatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10388, 1, 'BR', NULL, NULL, 'Igrejinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10389, 1, 'BR', NULL, NULL, 'Iguaraçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10390, 1, 'BR', NULL, NULL, 'Iguatemi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10391, 1, 'BR', NULL, NULL, 'Iguatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10392, 1, 'BR', NULL, NULL, 'Iguiporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10393, 1, 'BR', NULL, NULL, 'Ilha do Mel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10394, 1, 'BR', NULL, NULL, 'Ilha dos Valadares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10395, 1, 'BR', NULL, NULL, 'Imbauzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10396, 1, 'BR', NULL, NULL, 'Imbaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10397, 1, 'BR', NULL, NULL, 'Imbituva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10398, 1, 'BR', NULL, NULL, 'Inajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10399, 1, 'BR', NULL, NULL, 'Independência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10400, 1, 'BR', NULL, NULL, 'Indianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10401, 1, 'BR', NULL, NULL, 'Inspetor Carvalho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10402, 1, 'BR', NULL, NULL, 'Invernada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10403, 1, 'BR', NULL, NULL, 'Invernadinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10404, 1, 'BR', NULL, NULL, 'Inácio Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10405, 1, 'BR', NULL, NULL, 'Iolópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10406, 1, 'BR', NULL, NULL, 'Ipiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10407, 1, 'BR', NULL, NULL, 'Iporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10408, 1, 'BR', NULL, NULL, 'Iracema do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10409, 1, 'BR', NULL, NULL, 'Irapuan')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10410, 1, 'BR', NULL, NULL, 'Irati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10411, 1, 'BR', NULL, NULL, 'Irerê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10412, 1, 'BR', NULL, NULL, 'Iretama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10413, 1, 'BR', NULL, NULL, 'Itaguajé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10414, 1, 'BR', NULL, NULL, 'Itaiacoca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10415, 1, 'BR', NULL, NULL, 'Itaipulândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10416, 1, 'BR', NULL, NULL, 'Itambaracá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10417, 1, 'BR', NULL, NULL, 'Itambezinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10418, 1, 'BR', NULL, NULL, 'Itambé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10419, 1, 'BR', NULL, NULL, 'Itapanhacanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10420, 1, 'BR', NULL, NULL, 'Itapara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10421, 1, 'BR', NULL, NULL, 'Itapejara d''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10422, 1, 'BR', NULL, NULL, 'Itaperuçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10423, 1, 'BR', NULL, NULL, 'Itaqui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10424, 1, 'BR', NULL, NULL, 'Itaúna do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10425, 1, 'BR', NULL, NULL, 'Itinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10426, 1, 'BR', NULL, NULL, 'Ivailândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10427, 1, 'BR', NULL, NULL, 'Ivaitinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10428, 1, 'BR', NULL, NULL, 'Ivatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10429, 1, 'BR', NULL, NULL, 'Ivaté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10430, 1, 'BR', NULL, NULL, 'Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10431, 1, 'BR', NULL, NULL, 'Içara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10432, 1, 'BR', NULL, NULL, 'Jaborandi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10433, 1, 'BR', NULL, NULL, 'Jaboti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10434, 1, 'BR', NULL, NULL, 'Jaboticabal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10435, 1, 'BR', NULL, NULL, 'Jaburu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10436, 1, 'BR', NULL, NULL, 'Jacarezinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10437, 1, 'BR', NULL, NULL, 'Jacaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10438, 1, 'BR', NULL, NULL, 'Jaciaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10439, 1, 'BR', NULL, NULL, 'Jacutinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10440, 1, 'BR', NULL, NULL, 'Jaguapitã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10441, 1, 'BR', NULL, NULL, 'Jaguariaíva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10442, 1, 'BR', NULL, NULL, 'Jangada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10443, 1, 'BR', NULL, NULL, 'Jangada do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10444, 1, 'BR', NULL, NULL, 'Janiópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10445, 1, 'BR', NULL, NULL, 'Japira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10446, 1, 'BR', NULL, NULL, 'Japurá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10447, 1, 'BR', NULL, NULL, 'Jaracatiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10448, 1, 'BR', NULL, NULL, 'Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10449, 1, 'BR', NULL, NULL, 'Jardim Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10450, 1, 'BR', NULL, NULL, 'Jardim Olinda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10451, 1, 'BR', NULL, NULL, 'Jardim Paredão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10452, 1, 'BR', NULL, NULL, 'Jardinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10453, 1, 'BR', NULL, NULL, 'Jataizinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10454, 1, 'BR', NULL, NULL, 'Javacaé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10455, 1, 'BR', NULL, NULL, 'Jesuítas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10456, 1, 'BR', NULL, NULL, 'Joaquim Távora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10457, 1, 'BR', NULL, NULL, 'Jordão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10458, 1, 'BR', NULL, NULL, 'Jordãozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10459, 1, 'BR', NULL, NULL, 'José Lacerda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10460, 1, 'BR', NULL, NULL, 'Joá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10461, 1, 'BR', NULL, NULL, 'Juciara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10462, 1, 'BR', NULL, NULL, 'Jundiaí do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10463, 1, 'BR', NULL, NULL, 'Juranda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10464, 1, 'BR', NULL, NULL, 'Jussara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10465, 1, 'BR', NULL, NULL, 'Juvinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10466, 1, 'BR', NULL, NULL, 'Kaloré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10467, 1, 'BR', NULL, NULL, 'Lagoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10468, 1, 'BR', NULL, NULL, 'Lagoa Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10469, 1, 'BR', NULL, NULL, 'Lagoa Dourada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10470, 1, 'BR', NULL, NULL, 'Lagoa Seca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10471, 1, 'BR', NULL, NULL, 'Lagoa Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10472, 1, 'BR', NULL, NULL, 'Lagoa dos Ribas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10473, 1, 'BR', NULL, NULL, 'Lagoinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10474, 1, 'BR', NULL, NULL, 'Lajeado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10475, 1, 'BR', NULL, NULL, 'Lajeado Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10476, 1, 'BR', NULL, NULL, 'Lajeado Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10477, 1, 'BR', NULL, NULL, 'Lambari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10478, 1, 'BR', NULL, NULL, 'Lapa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10479, 1, 'BR', NULL, NULL, 'Laranja Azeda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10480, 1, 'BR', NULL, NULL, 'Laranjal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10481, 1, 'BR', NULL, NULL, 'Lavra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10482, 1, 'BR', NULL, NULL, 'Lavrinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10483, 1, 'BR', NULL, NULL, 'Lerroville')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10484, 1, 'BR', NULL, NULL, 'Leópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10485, 1, 'BR', NULL, NULL, 'Lidianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10486, 1, 'BR', NULL, NULL, 'Lindoeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10487, 1, 'BR', NULL, NULL, 'Linha Giacomini')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10488, 1, 'BR', NULL, NULL, 'Lobato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10489, 1, 'BR', NULL, NULL, 'Lopei')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10490, 1, 'BR', NULL, NULL, 'Lovat')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10491, 1, 'BR', NULL, NULL, 'Luar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10492, 1, 'BR', NULL, NULL, 'Luiziana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10493, 1, 'BR', NULL, NULL, 'Lunardelli')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10494, 1, 'BR', NULL, NULL, 'Lupionópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10495, 1, 'BR', NULL, NULL, 'Macaco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10496, 1, 'BR', NULL, NULL, 'Macucos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10497, 1, 'BR', NULL, NULL, 'Mairá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10498, 1, 'BR', NULL, NULL, 'Maitá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10499, 1, 'BR', NULL, NULL, 'Mallet')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10500, 1, 'BR', NULL, NULL, 'Malu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10501, 1, 'BR', NULL, NULL, 'Mamborê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10502, 1, 'BR', NULL, NULL, 'Mandaguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10503, 1, 'BR', NULL, NULL, 'Mandaçaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10504, 1, 'BR', NULL, NULL, 'Mandiocaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10505, 1, 'BR', NULL, NULL, 'Mandirituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10506, 1, 'BR', NULL, NULL, 'Manfrinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10507, 1, 'BR', NULL, NULL, 'Mangueirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10508, 1, 'BR', NULL, NULL, 'Manoel Ribas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10509, 1, 'BR', NULL, NULL, 'Marabá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10510, 1, 'BR', NULL, NULL, 'Maracanã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10511, 1, 'BR', NULL, NULL, 'Marajó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10512, 1, 'BR', NULL, NULL, 'Maravilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10513, 1, 'BR', NULL, NULL, 'Marcelino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10514, 1, 'BR', NULL, NULL, 'Marcionópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10515, 1, 'BR', NULL, NULL, 'Marechal Cândido Rondon')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10516, 1, 'BR', NULL, NULL, 'Margarida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10517, 1, 'BR', NULL, NULL, 'Maria Helena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10518, 1, 'BR', NULL, NULL, 'Maria Luiza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10519, 1, 'BR', NULL, NULL, 'Marialva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10520, 1, 'BR', NULL, NULL, 'Mariental')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10521, 1, 'BR', NULL, NULL, 'Marilena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10522, 1, 'BR', NULL, NULL, 'Marilu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10523, 1, 'BR', NULL, NULL, 'Mariluz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10524, 1, 'BR', NULL, NULL, 'Marilândia do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10525, 1, 'BR', NULL, NULL, 'Marimbondo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10526, 1, 'BR', NULL, NULL, 'Maripá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10527, 1, 'BR', NULL, NULL, 'Maristela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10528, 1, 'BR', NULL, NULL, 'Mariza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10529, 1, 'BR', NULL, NULL, 'Mariópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10530, 1, 'BR', NULL, NULL, 'Marmeleiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10531, 1, 'BR', NULL, NULL, 'Marmelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10532, 1, 'BR', NULL, NULL, 'Marquinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10533, 1, 'BR', NULL, NULL, 'Marquês de Abrantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10534, 1, 'BR', NULL, NULL, 'Marrecas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10535, 1, 'BR', NULL, NULL, 'Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10536, 1, 'BR', NULL, NULL, 'Marumbi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10537, 1, 'BR', NULL, NULL, 'Matelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10538, 1, 'BR', NULL, NULL, 'Matinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10539, 1, 'BR', NULL, NULL, 'Mato Queimado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10540, 1, 'BR', NULL, NULL, 'Mato Rico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10541, 1, 'BR', NULL, NULL, 'Mauá da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10542, 1, 'BR', NULL, NULL, 'Meia-Lua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10543, 1, 'BR', NULL, NULL, 'Memória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10544, 1, 'BR', NULL, NULL, 'Mendeslândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10545, 1, 'BR', NULL, NULL, 'Mercedes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10546, 1, 'BR', NULL, NULL, 'Mirador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10547, 1, 'BR', NULL, NULL, 'Miranda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10548, 1, 'BR', NULL, NULL, 'Mirante do Piquiri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10549, 1, 'BR', NULL, NULL, 'Miraselva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10550, 1, 'BR', NULL, NULL, 'Missal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10551, 1, 'BR', NULL, NULL, 'Monjolinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10552, 1, 'BR', NULL, NULL, 'Monte Real')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10553, 1, 'BR', NULL, NULL, 'Moreira Sales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10554, 1, 'BR', NULL, NULL, 'Morretes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10555, 1, 'BR', NULL, NULL, 'Morro Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10556, 1, 'BR', NULL, NULL, 'Morro Inglês')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10557, 1, 'BR', NULL, NULL, 'Munhoz de Melo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10558, 1, 'BR', NULL, NULL, 'Natingui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10559, 1, 'BR', NULL, NULL, 'Nilza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10560, 1, 'BR', NULL, NULL, 'Nordestina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10561, 1, 'BR', NULL, NULL, 'Nossa Senhora Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10562, 1, 'BR', NULL, NULL, 'Nossa Senhora da Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10563, 1, 'BR', NULL, NULL, 'Nossa Senhora da Candelária')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10564, 1, 'BR', NULL, NULL, 'Nossa Senhora das Graças')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10565, 1, 'BR', NULL, NULL, 'Nossa Senhora de Lourdes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10566, 1, 'BR', NULL, NULL, 'Nossa Senhora do Carmo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10567, 1, 'BR', NULL, NULL, 'Nova Aliança do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10568, 1, 'BR', NULL, NULL, 'Nova Altamira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10569, 1, 'BR', NULL, NULL, 'Nova Amoreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10570, 1, 'BR', NULL, NULL, 'Nova América da Colina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10571, 1, 'BR', NULL, NULL, 'Nova Aurora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10572, 1, 'BR', NULL, NULL, 'Nova Bilac')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10573, 1, 'BR', NULL, NULL, 'Nova Brasília')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10574, 1, 'BR', NULL, NULL, 'Nova Brasília do Itararé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10575, 1, 'BR', NULL, NULL, 'Nova Cantu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10576, 1, 'BR', NULL, NULL, 'Nova Concórdia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10577, 1, 'BR', NULL, NULL, 'Nova Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10578, 1, 'BR', NULL, NULL, 'Nova Esperança do Sudoeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10579, 1, 'BR', NULL, NULL, 'Nova Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10580, 1, 'BR', NULL, NULL, 'Nova Laranjeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10581, 1, 'BR', NULL, NULL, 'Nova Londrina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10582, 1, 'BR', NULL, NULL, 'Nova Lourdes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10583, 1, 'BR', NULL, NULL, 'Nova Olímpia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10584, 1, 'BR', NULL, NULL, 'Nova Prata do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10585, 1, 'BR', NULL, NULL, 'Nova Riqueza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10586, 1, 'BR', NULL, NULL, 'Nova Santa Bárbara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10587, 1, 'BR', NULL, NULL, 'Nova Santa Rosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10588, 1, 'BR', NULL, NULL, 'Nova Tebas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10589, 1, 'BR', NULL, NULL, 'Nova Tirol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10590, 1, 'BR', NULL, NULL, 'Nova Videira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10591, 1, 'BR', NULL, NULL, 'Novo Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10592, 1, 'BR', NULL, NULL, 'Novo Itacolomi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10593, 1, 'BR', NULL, NULL, 'Novo Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10594, 1, 'BR', NULL, NULL, 'Novo Sarandi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10595, 1, 'BR', NULL, NULL, 'Novo Sobradinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10596, 1, 'BR', NULL, NULL, 'Novo Três Passos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10597, 1, 'BR', NULL, NULL, 'Olaria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10598, 1, 'BR', NULL, NULL, 'Olho Agudo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10599, 1, 'BR', NULL, NULL, 'Olho d''Água')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10600, 1, 'BR', NULL, NULL, 'Oroité')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10601, 1, 'BR', NULL, NULL, 'Ourilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10602, 1, 'BR', NULL, NULL, 'Ourizona')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10603, 1, 'BR', NULL, NULL, 'Ouro Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10604, 1, 'BR', NULL, NULL, 'Ouro Verde do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10605, 1, 'BR', NULL, NULL, 'Ouro Verde do Piquiri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10606, 1, 'BR', NULL, NULL, 'Padre Ponciano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10607, 1, 'BR', NULL, NULL, 'Paiol Queimado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10608, 1, 'BR', NULL, NULL, 'Paiol de Baixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10609, 1, 'BR', NULL, NULL, 'Paiquerê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10610, 1, 'BR', NULL, NULL, 'Paiçandu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10611, 1, 'BR', NULL, NULL, 'Palmas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10612, 1, 'BR', NULL, NULL, 'Palmeirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10613, 1, 'BR', NULL, NULL, 'Palmira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10614, 1, 'BR', NULL, NULL, 'Palmital')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10615, 1, 'BR', NULL, NULL, 'Palmital de São Silvestre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10616, 1, 'BR', NULL, NULL, 'Palmitópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10617, 1, 'BR', NULL, NULL, 'Panema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10618, 1, 'BR', NULL, NULL, 'Pangaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10619, 1, 'BR', NULL, NULL, 'Papagaios Novos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10620, 1, 'BR', NULL, NULL, 'Paranacity')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10621, 1, 'BR', NULL, NULL, 'Paranagi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10622, 1, 'BR', NULL, NULL, 'Paranapoema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10623, 1, 'BR', NULL, NULL, 'Paraná d''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10624, 1, 'BR', NULL, NULL, 'Paraíso do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10625, 1, 'BR', NULL, NULL, 'Passa Una')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10626, 1, 'BR', NULL, NULL, 'Passo Fundo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10627, 1, 'BR', NULL, NULL, 'Passo Liso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10628, 1, 'BR', NULL, NULL, 'Passo da Ilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10629, 1, 'BR', NULL, NULL, 'Passo dos Pupos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10630, 1, 'BR', NULL, NULL, 'Pato Bragado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10631, 1, 'BR', NULL, NULL, 'Patos Velhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10632, 1, 'BR', NULL, NULL, 'Pau d''Alho do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10633, 1, 'BR', NULL, NULL, 'Paula Freitas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10634, 1, 'BR', NULL, NULL, 'Paulistânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10635, 1, 'BR', NULL, NULL, 'Paulo Frontin')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10636, 1, 'BR', NULL, NULL, 'Peabiru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10637, 1, 'BR', NULL, NULL, 'Pedra Branca do Araraquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10638, 1, 'BR', NULL, NULL, 'Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10639, 1, 'BR', NULL, NULL, 'Pedro Lustosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10640, 1, 'BR', NULL, NULL, 'Pelado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10641, 1, 'BR', NULL, NULL, 'Perobal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10642, 1, 'BR', NULL, NULL, 'Piassuguera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10643, 1, 'BR', NULL, NULL, 'Pinaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10644, 1, 'BR', NULL, NULL, 'Pinhal de São Bento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10645, 1, 'BR', NULL, NULL, 'Pinhalzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10646, 1, 'BR', NULL, NULL, 'Pinhalão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10647, 1, 'BR', NULL, NULL, 'Pinheiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10648, 1, 'BR', NULL, NULL, 'Pinhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10649, 1, 'BR', NULL, NULL, 'Piquirivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10650, 1, 'BR', NULL, NULL, 'Piracema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10651, 1, 'BR', NULL, NULL, 'Pirapó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10652, 1, 'BR', NULL, NULL, 'Piraquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10653, 1, 'BR', NULL, NULL, 'Piraí do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10654, 1, 'BR', NULL, NULL, 'Piriquitos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10655, 1, 'BR', NULL, NULL, 'Pitanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10656, 1, 'BR', NULL, NULL, 'Pitangueiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10657, 1, 'BR', NULL, NULL, 'Pitangui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10658, 1, 'BR', NULL, NULL, 'Piên')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10659, 1, 'BR', NULL, NULL, 'Planaltina do Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10660, 1, 'BR', NULL, NULL, 'Planalto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10661, 1, 'BR', NULL, NULL, 'Pocinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10662, 1, 'BR', NULL, NULL, 'Poema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10663, 1, 'BR', NULL, NULL, 'Ponta do Pasto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10664, 1, 'BR', NULL, NULL, 'Pontal do Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10665, 1, 'BR', NULL, NULL, 'Porecatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10666, 1, 'BR', NULL, NULL, 'Porteira Preta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10667, 1, 'BR', NULL, NULL, 'Porto Amazonas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10668, 1, 'BR', NULL, NULL, 'Porto Barreiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10669, 1, 'BR', NULL, NULL, 'Porto Belo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10670, 1, 'BR', NULL, NULL, 'Porto Brasílio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10671, 1, 'BR', NULL, NULL, 'Porto Camargo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10672, 1, 'BR', NULL, NULL, 'Porto Meira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10673, 1, 'BR', NULL, NULL, 'Porto Mendes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10674, 1, 'BR', NULL, NULL, 'Porto Rico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10675, 1, 'BR', NULL, NULL, 'Porto San Juan')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10676, 1, 'BR', NULL, NULL, 'Porto Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10677, 1, 'BR', NULL, NULL, 'Porto São Carlos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10678, 1, 'BR', NULL, NULL, 'Porto São José')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10679, 1, 'BR', NULL, NULL, 'Porto Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10680, 1, 'BR', NULL, NULL, 'Porto de Cima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10681, 1, 'BR', NULL, NULL, 'Portão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10682, 1, 'BR', NULL, NULL, 'Prado Ferreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10683, 1, 'BR', NULL, NULL, 'Pranchita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10684, 1, 'BR', NULL, NULL, 'Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10685, 1, 'BR', NULL, NULL, 'Prata Um')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10686, 1, 'BR', NULL, NULL, 'Presidente Castelo Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10687, 1, 'BR', NULL, NULL, 'Presidente Kennedy')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10688, 1, 'BR', NULL, NULL, 'Primeiro de Maio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10689, 1, 'BR', NULL, NULL, 'Progresso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10690, 1, 'BR', NULL, NULL, 'Prudentópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10691, 1, 'BR', NULL, NULL, 'Pulinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10692, 1, 'BR', NULL, NULL, 'Pérola Independente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10693, 1, 'BR', NULL, NULL, 'Pérola d''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10694, 1, 'BR', NULL, NULL, 'Quatiguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10695, 1, 'BR', NULL, NULL, 'Quatro Barras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10696, 1, 'BR', NULL, NULL, 'Quatro Pontes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10697, 1, 'BR', NULL, NULL, 'Quebra Freio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10698, 1, 'BR', NULL, NULL, 'Quedas do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10699, 1, 'BR', NULL, NULL, 'Queimados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10700, 1, 'BR', NULL, NULL, 'Querência do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10701, 1, 'BR', NULL, NULL, 'Quinta do Sol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10702, 1, 'BR', NULL, NULL, 'Quinzópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10703, 1, 'BR', NULL, NULL, 'Quitandinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10704, 1, 'BR', NULL, NULL, 'Ramilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10705, 1, 'BR', NULL, NULL, 'Rancho Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10706, 1, 'BR', NULL, NULL, 'Rancho Alegre d''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10707, 1, 'BR', NULL, NULL, 'Realeza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10708, 1, 'BR', NULL, NULL, 'Rebouças')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10709, 1, 'BR', NULL, NULL, 'Região dos Valos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10710, 1, 'BR', NULL, NULL, 'Reianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10711, 1, 'BR', NULL, NULL, 'Renascença')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10712, 1, 'BR', NULL, NULL, 'Reserva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10713, 1, 'BR', NULL, NULL, 'Reserva do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10714, 1, 'BR', NULL, NULL, 'Retiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10715, 1, 'BR', NULL, NULL, 'Retiro Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10716, 1, 'BR', NULL, NULL, 'Ribeirão Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10717, 1, 'BR', NULL, NULL, 'Ribeirão Claro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10718, 1, 'BR', NULL, NULL, 'Ribeirão do Pinhal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10719, 1, 'BR', NULL, NULL, 'Ribeirão do Pinheiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10720, 1, 'BR', NULL, NULL, 'Rio Abaixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10721, 1, 'BR', NULL, NULL, 'Rio Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10722, 1, 'BR', NULL, NULL, 'Rio Bom')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10723, 1, 'BR', NULL, NULL, 'Rio Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10724, 1, 'BR', NULL, NULL, 'Rio Bonito do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10725, 1, 'BR', NULL, NULL, 'Rio Branco do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10726, 1, 'BR', NULL, NULL, 'Rio Branco do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10727, 1, 'BR', NULL, NULL, 'Rio Claro do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10728, 1, 'BR', NULL, NULL, 'Rio Negro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10729, 1, 'BR', NULL, NULL, 'Rio Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10730, 1, 'BR', NULL, NULL, 'Rio Pinheiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10731, 1, 'BR', NULL, NULL, 'Rio Quatorze')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10732, 1, 'BR', NULL, NULL, 'Rio Saltinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10733, 1, 'BR', NULL, NULL, 'Rio Saudade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10734, 1, 'BR', NULL, NULL, 'Rio Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10735, 1, 'BR', NULL, NULL, 'Rio da Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10736, 1, 'BR', NULL, NULL, 'Rio das Antas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10737, 1, 'BR', NULL, NULL, 'Rio das Mortes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10738, 1, 'BR', NULL, NULL, 'Rio das Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10739, 1, 'BR', NULL, NULL, 'Rio das Pombas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10740, 1, 'BR', NULL, NULL, 'Rio do Mato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10741, 1, 'BR', NULL, NULL, 'Rio do Salto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10742, 1, 'BR', NULL, NULL, 'Roberto Silveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10743, 1, 'BR', NULL, NULL, 'Rolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10744, 1, 'BR', NULL, NULL, 'Romeópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10745, 1, 'BR', NULL, NULL, 'Roncador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10746, 1, 'BR', NULL, NULL, 'Rondinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10747, 1, 'BR', NULL, NULL, 'Rondon')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10748, 1, 'BR', NULL, NULL, 'Rosário do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10749, 1, 'BR', NULL, NULL, 'Roça Velha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10750, 1, 'BR', NULL, NULL, 'Sabáudia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10751, 1, 'BR', NULL, NULL, 'Sagrada Família')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10752, 1, 'BR', NULL, NULL, 'Salgado Filho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10753, 1, 'BR', NULL, NULL, 'Salles de Oliveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10754, 1, 'BR', NULL, NULL, 'Saltinho do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10755, 1, 'BR', NULL, NULL, 'Salto Portão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10756, 1, 'BR', NULL, NULL, 'Salto do Itararé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10757, 1, 'BR', NULL, NULL, 'Salto do Lontra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10758, 1, 'BR', NULL, NULL, 'Samambaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10759, 1, 'BR', NULL, NULL, 'Santa Amélia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10760, 1, 'BR', NULL, NULL, 'Santa Cecília do Pavão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10761, 1, 'BR', NULL, NULL, 'Santa Clara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10762, 1, 'BR', NULL, NULL, 'Santa Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10763, 1, 'BR', NULL, NULL, 'Santa Cruz de Monte Castelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10764, 1, 'BR', NULL, NULL, 'Santa Eliza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10765, 1, 'BR', NULL, NULL, 'Santa Esmeralda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10766, 1, 'BR', NULL, NULL, 'Santa Fé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10767, 1, 'BR', NULL, NULL, 'Santa Fé do Pirapó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10768, 1, 'BR', NULL, NULL, 'Santa Inês')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10769, 1, 'BR', NULL, NULL, 'Santa Isabel do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10770, 1, 'BR', NULL, NULL, 'Santa Izabel do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10771, 1, 'BR', NULL, NULL, 'Santa Lurdes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10772, 1, 'BR', NULL, NULL, 'Santa Luzia da Alvorada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10773, 1, 'BR', NULL, NULL, 'Santa Lúcia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10774, 1, 'BR', NULL, NULL, 'Santa Margarida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10775, 1, 'BR', NULL, NULL, 'Santa Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10776, 1, 'BR', NULL, NULL, 'Santa Maria do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10777, 1, 'BR', NULL, NULL, 'Santa Maria do Rio do Peixe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10778, 1, 'BR', NULL, NULL, 'Santa Mariana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10779, 1, 'BR', NULL, NULL, 'Santa Mônica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10780, 1, 'BR', NULL, NULL, 'Santa Quitéria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10781, 1, 'BR', NULL, NULL, 'Santa Rita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10782, 1, 'BR', NULL, NULL, 'Santa Rita do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10783, 1, 'BR', NULL, NULL, 'Santa Rosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10784, 1, 'BR', NULL, NULL, 'Santa Tereza do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10785, 1, 'BR', NULL, NULL, 'Santa Terezinha de Itaipu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10786, 1, 'BR', NULL, NULL, 'Santa Zélia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10787, 1, 'BR', NULL, NULL, 'Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10788, 1, 'BR', NULL, NULL, 'Santana do Itararé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10789, 1, 'BR', NULL, NULL, 'Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10790, 1, 'BR', NULL, NULL, 'Santo Antônio da Platina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10791, 1, 'BR', NULL, NULL, 'Santo Antônio do Caiuá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10792, 1, 'BR', NULL, NULL, 'Santo Antônio do Iratim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10793, 1, 'BR', NULL, NULL, 'Santo Antônio do Palmital')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10794, 1, 'BR', NULL, NULL, 'Santo Antônio do Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10795, 1, 'BR', NULL, NULL, 'Santo Antônio do Sudoeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10796, 1, 'BR', NULL, NULL, 'Santo Inácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10797, 1, 'BR', NULL, NULL, 'Santo Rei')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10798, 1, 'BR', NULL, NULL, 'Sapopema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10799, 1, 'BR', NULL, NULL, 'Sapé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10800, 1, 'BR', NULL, NULL, 'Sarandi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10801, 1, 'BR', NULL, NULL, 'Saudade do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10802, 1, 'BR', NULL, NULL, 'Sede Alvorada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10803, 1, 'BR', NULL, NULL, 'Sede Chaparral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10804, 1, 'BR', NULL, NULL, 'Sede Nova Sant''Ana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10805, 1, 'BR', NULL, NULL, 'Sede Progresso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10806, 1, 'BR', NULL, NULL, 'Selva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10807, 1, 'BR', NULL, NULL, 'Senhor Bom Jesus dos Gramados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10808, 1, 'BR', NULL, NULL, 'Serra Negra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10809, 1, 'BR', NULL, NULL, 'Serra dos Dourados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10810, 1, 'BR', NULL, NULL, 'Serranópolis do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10811, 1, 'BR', NULL, NULL, 'Serraria Klas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10812, 1, 'BR', NULL, NULL, 'Serrinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10813, 1, 'BR', NULL, NULL, 'Sertaneja')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10814, 1, 'BR', NULL, NULL, 'Sertanópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10815, 1, 'BR', NULL, NULL, 'Sertãozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10816, 1, 'BR', NULL, NULL, 'Sete Saltos de Cima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10817, 1, 'BR', NULL, NULL, 'Silvolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10818, 1, 'BR', NULL, NULL, 'Siqueira Belo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10819, 1, 'BR', NULL, NULL, 'Siqueira Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10820, 1, 'BR', NULL, NULL, 'Socavão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10821, 1, 'BR', NULL, NULL, 'Socorro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10822, 1, 'BR', NULL, NULL, 'Sulina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10823, 1, 'BR', NULL, NULL, 'Sumaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10824, 1, 'BR', NULL, NULL, 'Sussui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10825, 1, 'BR', NULL, NULL, 'Sutis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10826, 1, 'BR', NULL, NULL, 'São Bento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10827, 1, 'BR', NULL, NULL, 'São Braz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10828, 1, 'BR', NULL, NULL, 'São Camilo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10829, 1, 'BR', NULL, NULL, 'São Carlos do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10830, 1, 'BR', NULL, NULL, 'São Cirilo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10831, 1, 'BR', NULL, NULL, 'São Clemente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10832, 1, 'BR', NULL, NULL, 'São Cristovão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10833, 1, 'BR', NULL, NULL, 'São Domingos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10834, 1, 'BR', NULL, NULL, 'São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10835, 1, 'BR', NULL, NULL, 'São Francisco de Imbaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10836, 1, 'BR', NULL, NULL, 'São Francisco de Sales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10837, 1, 'BR', NULL, NULL, 'São Gabriel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10838, 1, 'BR', NULL, NULL, 'São Gotardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10839, 1, 'BR', NULL, NULL, 'São Jerônimo da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10840, 1, 'BR', NULL, NULL, 'São Joaquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10841, 1, 'BR', NULL, NULL, 'São Joaquim do Pontal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10842, 1, 'BR', NULL, NULL, 'São Jorge D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10843, 1, 'BR', NULL, NULL, 'São Jorge do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10844, 1, 'BR', NULL, NULL, 'São Jorge do Patrocínio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10845, 1, 'BR', NULL, NULL, 'São José da Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10846, 1, 'BR', NULL, NULL, 'São José das Palmeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10847, 1, 'BR', NULL, NULL, 'São José do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10848, 1, 'BR', NULL, NULL, 'São José do Itavo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10849, 1, 'BR', NULL, NULL, 'São José do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10850, 1, 'BR', NULL, NULL, 'São José dos Pinhais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10851, 1, 'BR', NULL, NULL, 'São João')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10852, 1, 'BR', NULL, NULL, 'São João d''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10853, 1, 'BR', NULL, NULL, 'São João da Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10854, 1, 'BR', NULL, NULL, 'São João do Caiuá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10855, 1, 'BR', NULL, NULL, 'São João do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10856, 1, 'BR', NULL, NULL, 'São João do Pinhal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10857, 1, 'BR', NULL, NULL, 'São João do Triunfo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10858, 1, 'BR', NULL, NULL, 'São Judas Tadeu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10859, 1, 'BR', NULL, NULL, 'São Leonardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10860, 1, 'BR', NULL, NULL, 'São Lourenço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10861, 1, 'BR', NULL, NULL, 'São Luiz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10862, 1, 'BR', NULL, NULL, 'São Luiz do Purunã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10863, 1, 'BR', NULL, NULL, 'São Manoel do Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10864, 1, 'BR', NULL, NULL, 'São Marcos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10865, 1, 'BR', NULL, NULL, 'São Martinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10866, 1, 'BR', NULL, NULL, 'São Mateus do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10867, 1, 'BR', NULL, NULL, 'São Miguel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10868, 1, 'BR', NULL, NULL, 'São Miguel do Cambui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10869, 1, 'BR', NULL, NULL, 'São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10870, 1, 'BR', NULL, NULL, 'São Pedro Lopei')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10871, 1, 'BR', NULL, NULL, 'São Pedro do Florido')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10872, 1, 'BR', NULL, NULL, 'São Pedro do Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10873, 1, 'BR', NULL, NULL, 'São Pedro do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10874, 1, 'BR', NULL, NULL, 'São Pedro do Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10875, 1, 'BR', NULL, NULL, 'São Pio X')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10876, 1, 'BR', NULL, NULL, 'São Roque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10877, 1, 'BR', NULL, NULL, 'São Roque do Chopim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10878, 1, 'BR', NULL, NULL, 'São Roque do Pinhal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10879, 1, 'BR', NULL, NULL, 'São Salvador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10880, 1, 'BR', NULL, NULL, 'São Sebastião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10881, 1, 'BR', NULL, NULL, 'São Sebastião da Amoreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10882, 1, 'BR', NULL, NULL, 'São Silvestre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10883, 1, 'BR', NULL, NULL, 'São Tomé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10884, 1, 'BR', NULL, NULL, 'São Valentim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10885, 1, 'BR', NULL, NULL, 'São Vicente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10886, 1, 'BR', NULL, NULL, 'Taipa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10887, 1, 'BR', NULL, NULL, 'Tamarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10888, 1, 'BR', NULL, NULL, 'Tambarutaca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10889, 1, 'BR', NULL, NULL, 'Tamboara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10890, 1, 'BR', NULL, NULL, 'Tanque Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10891, 1, 'BR', NULL, NULL, 'Tapejara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10892, 1, 'BR', NULL, NULL, 'Tapira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10893, 1, 'BR', NULL, NULL, 'Tapui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10894, 1, 'BR', NULL, NULL, 'Taquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10895, 1, 'BR', NULL, NULL, 'Taquari dos Polacos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10896, 1, 'BR', NULL, NULL, 'Taquari dos Russos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10897, 1, 'BR', NULL, NULL, 'Taquaruna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10898, 1, 'BR', NULL, NULL, 'Teixeira Soares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10899, 1, 'BR', NULL, NULL, 'Teolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10900, 1, 'BR', NULL, NULL, 'Tereza Breda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10901, 1, 'BR', NULL, NULL, 'Tereza Cristina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10902, 1, 'BR', NULL, NULL, 'Terra Boa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10903, 1, 'BR', NULL, NULL, 'Terra Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10904, 1, 'BR', NULL, NULL, 'Terra Rica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10905, 1, 'BR', NULL, NULL, 'Terra Roxa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10906, 1, 'BR', NULL, NULL, 'Tibagi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10907, 1, 'BR', NULL, NULL, 'Tijucas do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10908, 1, 'BR', NULL, NULL, 'Tijuco Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10909, 1, 'BR', NULL, NULL, 'Timbu Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10910, 1, 'BR', NULL, NULL, 'Tindiquera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10911, 1, 'BR', NULL, NULL, 'Tiradentes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10912, 1, 'BR', NULL, NULL, 'Tomaz Coelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10913, 1, 'BR', NULL, NULL, 'Tomazina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10914, 1, 'BR', NULL, NULL, 'Trindade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10915, 1, 'BR', NULL, NULL, 'Triolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10916, 1, 'BR', NULL, NULL, 'Triângulo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10917, 1, 'BR', NULL, NULL, 'Tronco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10918, 1, 'BR', NULL, NULL, 'Três Barras do Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10919, 1, 'BR', NULL, NULL, 'Três Bicos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10920, 1, 'BR', NULL, NULL, 'Três Bocas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10921, 1, 'BR', NULL, NULL, 'Três Capões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10922, 1, 'BR', NULL, NULL, 'Três Córregos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10923, 1, 'BR', NULL, NULL, 'Três Lagoas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10924, 1, 'BR', NULL, NULL, 'Três Pinheiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10925, 1, 'BR', NULL, NULL, 'Três Placas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10926, 1, 'BR', NULL, NULL, 'Tunas do Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10927, 1, 'BR', NULL, NULL, 'Tuneiras do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10928, 1, 'BR', NULL, NULL, 'Tupinambá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10929, 1, 'BR', NULL, NULL, 'Tupãssi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10930, 1, 'BR', NULL, NULL, 'Turvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10931, 1, 'BR', NULL, NULL, 'Ubaldino Taques')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10932, 1, 'BR', NULL, NULL, 'Ubauna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10933, 1, 'BR', NULL, NULL, 'Ubiratã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10934, 1, 'BR', NULL, NULL, 'Uniflor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10935, 1, 'BR', NULL, NULL, 'União')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10936, 1, 'BR', NULL, NULL, 'União da Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10937, 1, 'BR', NULL, NULL, 'União do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10938, 1, 'BR', NULL, NULL, 'Uraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10939, 1, 'BR', NULL, NULL, 'Usina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10940, 1, 'BR', NULL, NULL, 'Uvaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10941, 1, 'BR', NULL, NULL, 'Valentins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10942, 1, 'BR', NULL, NULL, 'Valério')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10943, 1, 'BR', NULL, NULL, 'Vargeado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10944, 1, 'BR', NULL, NULL, 'Vassoural')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10945, 1, 'BR', NULL, NULL, 'Ventania')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10946, 1, 'BR', NULL, NULL, 'Vera Cruz do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10947, 1, 'BR', NULL, NULL, 'Vera Guarani')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10948, 1, 'BR', NULL, NULL, 'Verê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10949, 1, 'BR', NULL, NULL, 'Vida Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10950, 1, 'BR', NULL, NULL, 'Vidigal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10951, 1, 'BR', NULL, NULL, 'Vila Diniz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10952, 1, 'BR', NULL, NULL, 'Vila Flórida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10953, 1, 'BR', NULL, NULL, 'Vila Gandhi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10954, 1, 'BR', NULL, NULL, 'Vila Guay')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10955, 1, 'BR', NULL, NULL, 'Vila Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10956, 1, 'BR', NULL, NULL, 'Vila Nova de Florença')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10957, 1, 'BR', NULL, NULL, 'Vila Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10958, 1, 'BR', NULL, NULL, 'Vila Reis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10959, 1, 'BR', NULL, NULL, 'Vila Rica do Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10960, 1, 'BR', NULL, NULL, 'Vila Roberto Brzezinski')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10961, 1, 'BR', NULL, NULL, 'Vila Silva Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10962, 1, 'BR', NULL, NULL, 'Vila Velha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10963, 1, 'BR', NULL, NULL, 'Vila dos Roldos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10964, 1, 'BR', NULL, NULL, 'Virmond')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10965, 1, 'BR', NULL, NULL, 'Vista Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10966, 1, 'BR', NULL, NULL, 'Vista Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10967, 1, 'BR', NULL, NULL, 'Vitorino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10968, 1, 'BR', NULL, NULL, 'Warta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10969, 1, 'BR', NULL, NULL, 'Xambrê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10970, 1, 'BR', NULL, NULL, 'Xaxim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10971, 1, 'BR', NULL, NULL, 'Yolanda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10972, 1, 'BR', NULL, NULL, 'km 30')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10973, 1, 'BR', NULL, NULL, 'Água Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10974, 1, 'BR', NULL, NULL, 'Água Boa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10975, 1, 'BR', NULL, NULL, 'Água Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10976, 1, 'BR', NULL, NULL, 'Água Mineral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10977, 1, 'BR', NULL, NULL, 'Água Vermelha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10978, 1, 'BR', NULL, NULL, 'Ângulo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10979, 2, 'BR', NULL, NULL, 'Abadia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10980, 2, 'BR', NULL, NULL, 'Abaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10981, 2, 'BR', NULL, NULL, 'Abaíra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10982, 2, 'BR', NULL, NULL, 'Abelhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10983, 2, 'BR', NULL, NULL, 'Abrantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10984, 2, 'BR', NULL, NULL, 'Abóbora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10985, 2, 'BR', NULL, NULL, 'Acajutiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10986, 2, 'BR', NULL, NULL, 'Acupe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10987, 2, 'BR', NULL, NULL, 'Adustina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10988, 2, 'BR', NULL, NULL, 'Afligidos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10989, 2, 'BR', NULL, NULL, 'Afrânio Peixoto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10990, 2, 'BR', NULL, NULL, 'Aiquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10991, 2, 'BR', NULL, NULL, 'Alagoinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10992, 2, 'BR', NULL, NULL, 'Alcobaça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10993, 2, 'BR', NULL, NULL, 'Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10994, 2, 'BR', NULL, NULL, 'Algodão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10995, 2, 'BR', NULL, NULL, 'Algodões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10996, 2, 'BR', NULL, NULL, 'Almadina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10997, 2, 'BR', NULL, NULL, 'Alto Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10998, 2, 'BR', NULL, NULL, 'Amado Bahia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (10999, 2, 'BR', NULL, NULL, 'Amaniú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11000, 2, 'BR', NULL, NULL, 'Amargosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11001, 2, 'BR', NULL, NULL, 'Amélia Rodrigues')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11002, 2, 'BR', NULL, NULL, 'América Dourada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11003, 2, 'BR', NULL, NULL, 'Américo Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11004, 2, 'BR', NULL, NULL, 'Anagé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11005, 2, 'BR', NULL, NULL, 'Andaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11006, 2, 'BR', NULL, NULL, 'Andorinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11007, 2, 'BR', NULL, NULL, 'Angical')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11008, 2, 'BR', NULL, NULL, 'Angico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11009, 2, 'BR', NULL, NULL, 'Anguera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11010, 2, 'BR', NULL, NULL, 'Antas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11011, 2, 'BR', NULL, NULL, 'Antônio Cardoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11012, 2, 'BR', NULL, NULL, 'Antônio Gonçalves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11013, 2, 'BR', NULL, NULL, 'Aporá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11014, 2, 'BR', NULL, NULL, 'Apuarema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11015, 2, 'BR', NULL, NULL, 'Aracatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11016, 2, 'BR', NULL, NULL, 'Araci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11017, 2, 'BR', NULL, NULL, 'Aramari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11018, 2, 'BR', NULL, NULL, 'Arapiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11019, 2, 'BR', NULL, NULL, 'Arataca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11020, 2, 'BR', NULL, NULL, 'Aratuípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11021, 2, 'BR', NULL, NULL, 'Araçás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11022, 2, 'BR', NULL, NULL, 'Areias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11023, 2, 'BR', NULL, NULL, 'Arembepe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11024, 2, 'BR', NULL, NULL, 'Argoim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11025, 2, 'BR', NULL, NULL, 'Argolo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11026, 2, 'BR', NULL, NULL, 'Aribice')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11027, 2, 'BR', NULL, NULL, 'Aritaguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11028, 2, 'BR', NULL, NULL, 'Arraial D''Ajuda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11029, 2, 'BR', NULL, NULL, 'Aurelino Leal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11030, 2, 'BR', NULL, NULL, 'Açu da Torre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11031, 2, 'BR', NULL, NULL, 'Açudina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11032, 2, 'BR', NULL, NULL, 'Baianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11033, 2, 'BR', NULL, NULL, 'Baixa Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11034, 2, 'BR', NULL, NULL, 'Baixa do Palmeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11035, 2, 'BR', NULL, NULL, 'Baixinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11036, 2, 'BR', NULL, NULL, 'Baixão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11037, 2, 'BR', NULL, NULL, 'Baluarte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11038, 2, 'BR', NULL, NULL, 'Banco Central')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11039, 2, 'BR', NULL, NULL, 'Banco da Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11040, 2, 'BR', NULL, NULL, 'Bandeira do Almada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11041, 2, 'BR', NULL, NULL, 'Bandeira do Colônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11042, 2, 'BR', NULL, NULL, 'Bandiaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11043, 2, 'BR', NULL, NULL, 'Banzaê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11044, 2, 'BR', NULL, NULL, 'Baraúnas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11045, 2, 'BR', NULL, NULL, 'Barcelos do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11046, 2, 'BR', NULL, NULL, 'Barra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11047, 2, 'BR', NULL, NULL, 'Barra da Estiva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11048, 2, 'BR', NULL, NULL, 'Barra do Choça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11049, 2, 'BR', NULL, NULL, 'Barra do Jacuípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11050, 2, 'BR', NULL, NULL, 'Barra do Mendes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11051, 2, 'BR', NULL, NULL, 'Barra do Pojuca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11052, 2, 'BR', NULL, NULL, 'Barra do Rocha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11053, 2, 'BR', NULL, NULL, 'Barra do Tarrachil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11054, 2, 'BR', NULL, NULL, 'Barracas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11055, 2, 'BR', NULL, NULL, 'Barreiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11056, 2, 'BR', NULL, NULL, 'Barro Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11057, 2, 'BR', NULL, NULL, 'Barro Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11058, 2, 'BR', NULL, NULL, 'Barrocas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11059, 2, 'BR', NULL, NULL, 'Bastião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11060, 2, 'BR', NULL, NULL, 'Bate Pé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11061, 2, 'BR', NULL, NULL, 'Batinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11062, 2, 'BR', NULL, NULL, 'Bela Flor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11063, 2, 'BR', NULL, NULL, 'Belmonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11064, 2, 'BR', NULL, NULL, 'Belo Campo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11065, 2, 'BR', NULL, NULL, 'Belém da Cachoeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11066, 2, 'BR', NULL, NULL, 'Bem-Bom')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11067, 2, 'BR', NULL, NULL, 'Bendegó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11068, 2, 'BR', NULL, NULL, 'Bento Simões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11069, 2, 'BR', NULL, NULL, 'Biritinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11070, 2, 'BR', NULL, NULL, 'Boa Espera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11071, 2, 'BR', NULL, NULL, 'Boa Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11072, 2, 'BR', NULL, NULL, 'Boa União')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11073, 2, 'BR', NULL, NULL, 'Boa Vista do Lagamar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11074, 2, 'BR', NULL, NULL, 'Boa Vista do Tupim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11075, 2, 'BR', NULL, NULL, 'Boaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11076, 2, 'BR', NULL, NULL, 'Boca do Córrego')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11077, 2, 'BR', NULL, NULL, 'Bom Jesus da Lapa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11078, 2, 'BR', NULL, NULL, 'Bom Jesus da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11079, 2, 'BR', NULL, NULL, 'Bom Sossego')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11080, 2, 'BR', NULL, NULL, 'Bonfim da Feira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11081, 2, 'BR', NULL, NULL, 'Boninal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11082, 2, 'BR', NULL, NULL, 'Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11083, 2, 'BR', NULL, NULL, 'Boquira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11084, 2, 'BR', NULL, NULL, 'Botuporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11085, 2, 'BR', NULL, NULL, 'Botuquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11086, 2, 'BR', NULL, NULL, 'Brejinho das Ametistas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11087, 2, 'BR', NULL, NULL, 'Brejo Luíza de Brito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11088, 2, 'BR', NULL, NULL, 'Brejo Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11089, 2, 'BR', NULL, NULL, 'Brejo da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11090, 2, 'BR', NULL, NULL, 'Brejolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11091, 2, 'BR', NULL, NULL, 'Brejões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11092, 2, 'BR', NULL, NULL, 'Brotas de Macaúbas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11093, 2, 'BR', NULL, NULL, 'Brumado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11094, 2, 'BR', NULL, NULL, 'Bucuituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11095, 2, 'BR', NULL, NULL, 'Buerarema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11096, 2, 'BR', NULL, NULL, 'Buracica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11097, 2, 'BR', NULL, NULL, 'Buranhém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11098, 2, 'BR', NULL, NULL, 'Buril')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11099, 2, 'BR', NULL, NULL, 'Buris de Abrantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11100, 2, 'BR', NULL, NULL, 'Buritirama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11101, 2, 'BR', NULL, NULL, 'Caatiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11102, 2, 'BR', NULL, NULL, 'Cabaceiras do Paraguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11103, 2, 'BR', NULL, NULL, 'Cabrália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11104, 2, 'BR', NULL, NULL, 'Cacha Pregos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11105, 2, 'BR', NULL, NULL, 'Cachoeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11106, 2, 'BR', NULL, NULL, 'Cachoeira do Mato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11107, 2, 'BR', NULL, NULL, 'Caculé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11108, 2, 'BR', NULL, NULL, 'Caetanos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11109, 2, 'BR', NULL, NULL, 'Caetité')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11110, 2, 'BR', NULL, NULL, 'Caeté-Açu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11111, 2, 'BR', NULL, NULL, 'Cafarnaum')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11112, 2, 'BR', NULL, NULL, 'Caimbé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11113, 2, 'BR', NULL, NULL, 'Cairu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11114, 2, 'BR', NULL, NULL, 'Caiubi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11115, 2, 'BR', NULL, NULL, 'Caiçara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11116, 2, 'BR', NULL, NULL, 'Cajuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11117, 2, 'BR', NULL, NULL, 'Caldas do Jorro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11118, 2, 'BR', NULL, NULL, 'Caldeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11119, 2, 'BR', NULL, NULL, 'Caldeirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11120, 2, 'BR', NULL, NULL, 'Caldeirão Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11121, 2, 'BR', NULL, NULL, 'Camacan')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11122, 2, 'BR', NULL, NULL, 'Camamu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11123, 2, 'BR', NULL, NULL, 'Camassandi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11124, 2, 'BR', NULL, NULL, 'Camaçari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11125, 2, 'BR', NULL, NULL, 'Camirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11126, 2, 'BR', NULL, NULL, 'Campinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11127, 2, 'BR', NULL, NULL, 'Campo Alegre de Lourdes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11128, 2, 'BR', NULL, NULL, 'Campo Formoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11129, 2, 'BR', NULL, NULL, 'Camurugi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11130, 2, 'BR', NULL, NULL, 'Canabravinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11131, 2, 'BR', NULL, NULL, 'Canarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11132, 2, 'BR', NULL, NULL, 'Canatiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11133, 2, 'BR', NULL, NULL, 'Canavieiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11134, 2, 'BR', NULL, NULL, 'Canché')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11135, 2, 'BR', NULL, NULL, 'Candeal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11136, 2, 'BR', NULL, NULL, 'Candeias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11137, 2, 'BR', NULL, NULL, 'Candiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11138, 2, 'BR', NULL, NULL, 'Canoão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11139, 2, 'BR', NULL, NULL, 'Cansanção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11140, 2, 'BR', NULL, NULL, 'Canto do Sol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11141, 2, 'BR', NULL, NULL, 'Canudos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11142, 2, 'BR', NULL, NULL, 'Canápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11143, 2, 'BR', NULL, NULL, 'Capela do Alto Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11144, 2, 'BR', NULL, NULL, 'Capim Grosso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11145, 2, 'BR', NULL, NULL, 'Capão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11146, 2, 'BR', NULL, NULL, 'Caraguataí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11147, 2, 'BR', NULL, NULL, 'Caraibuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11148, 2, 'BR', NULL, NULL, 'Caraiva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11149, 2, 'BR', NULL, NULL, 'Caravelas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11150, 2, 'BR', NULL, NULL, 'Caraíbas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11151, 2, 'BR', NULL, NULL, 'Caraípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11152, 2, 'BR', NULL, NULL, 'Cardeal da Silva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11153, 2, 'BR', NULL, NULL, 'Carinhanha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11154, 2, 'BR', NULL, NULL, 'Caripare')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11155, 2, 'BR', NULL, NULL, 'Carnaíba do Sertão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11156, 2, 'BR', NULL, NULL, 'Carrapichel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11157, 2, 'BR', NULL, NULL, 'Casa Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11158, 2, 'BR', NULL, NULL, 'Castelo Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11159, 2, 'BR', NULL, NULL, 'Castro Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11160, 2, 'BR', NULL, NULL, 'Catinga do Moura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11161, 2, 'BR', NULL, NULL, 'Catingal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11162, 2, 'BR', NULL, NULL, 'Catolezinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11163, 2, 'BR', NULL, NULL, 'Catolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11164, 2, 'BR', NULL, NULL, 'Catolés')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11165, 2, 'BR', NULL, NULL, 'Catu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11166, 2, 'BR', NULL, NULL, 'Catu de Abrantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11167, 2, 'BR', NULL, NULL, 'Caturama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11168, 2, 'BR', NULL, NULL, 'Cavunge')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11169, 2, 'BR', NULL, NULL, 'Caém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11170, 2, 'BR', NULL, NULL, 'Central')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11171, 2, 'BR', NULL, NULL, 'Ceraima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11172, 2, 'BR', NULL, NULL, 'Chorrochó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11173, 2, 'BR', NULL, NULL, 'Cinco Rios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11174, 2, 'BR', NULL, NULL, 'Cipó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11175, 2, 'BR', NULL, NULL, 'Coaraci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11176, 2, 'BR', NULL, NULL, 'Cocos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11177, 2, 'BR', NULL, NULL, 'Colônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11178, 2, 'BR', NULL, NULL, 'Comércio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11179, 2, 'BR', NULL, NULL, 'Conceição da Feira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11180, 2, 'BR', NULL, NULL, 'Conceição do Almeida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11181, 2, 'BR', NULL, NULL, 'Conceição do Coité')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11182, 2, 'BR', NULL, NULL, 'Conceição do Jacuípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11183, 2, 'BR', NULL, NULL, 'Conde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11184, 2, 'BR', NULL, NULL, 'Condeúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11185, 2, 'BR', NULL, NULL, 'Contendas do Sincorá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11186, 2, 'BR', NULL, NULL, 'Copixaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11187, 2, 'BR', NULL, NULL, 'Coqueiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11188, 2, 'BR', NULL, NULL, 'Coquinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11189, 2, 'BR', NULL, NULL, 'Coração de Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11190, 2, 'BR', NULL, NULL, 'Cordeiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11191, 2, 'BR', NULL, NULL, 'Coribe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11192, 2, 'BR', NULL, NULL, 'Coronel João Sá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11193, 2, 'BR', NULL, NULL, 'Correntina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11194, 2, 'BR', NULL, NULL, 'Corta Mão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11195, 2, 'BR', NULL, NULL, 'Cotegipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11196, 2, 'BR', NULL, NULL, 'Coutos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11197, 2, 'BR', NULL, NULL, 'Cravolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11198, 2, 'BR', NULL, NULL, 'Cristalândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11199, 2, 'BR', NULL, NULL, 'Cristópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11200, 2, 'BR', NULL, NULL, 'Crisópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11201, 2, 'BR', NULL, NULL, 'Crussaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11202, 2, 'BR', NULL, NULL, 'Cruz das Almas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11203, 2, 'BR', NULL, NULL, 'Cumuruxatiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11204, 2, 'BR', NULL, NULL, 'Cunhangi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11205, 2, 'BR', NULL, NULL, 'Curaçá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11206, 2, 'BR', NULL, NULL, 'Curral Falso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11207, 2, 'BR', NULL, NULL, 'Cândido Sales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11208, 2, 'BR', NULL, NULL, 'Cícero Dantas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11209, 2, 'BR', NULL, NULL, 'Delfino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11210, 2, 'BR', NULL, NULL, 'Descoberto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11211, 2, 'BR', NULL, NULL, 'Dias Coelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11212, 2, 'BR', NULL, NULL, 'Dias D''Ávila')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11213, 2, 'BR', NULL, NULL, 'Diógenes Sampaio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11214, 2, 'BR', NULL, NULL, 'Dom Basílio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11215, 2, 'BR', NULL, NULL, 'Dom Macedo Costa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11216, 2, 'BR', NULL, NULL, 'Dona Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11217, 2, 'BR', NULL, NULL, 'Duas Barras do Morro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11218, 2, 'BR', NULL, NULL, 'Dário Meira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11219, 2, 'BR', NULL, NULL, 'Elísio Medrado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11220, 2, 'BR', NULL, NULL, 'Encruzilhada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11221, 2, 'BR', NULL, NULL, 'Engenheiro França')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11222, 2, 'BR', NULL, NULL, 'Engenheiro Pontes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11223, 2, 'BR', NULL, NULL, 'Entre Rios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11224, 2, 'BR', NULL, NULL, 'Esplanada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11225, 2, 'BR', NULL, NULL, 'Euclides da Cunha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11226, 2, 'BR', NULL, NULL, 'Eunápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11227, 2, 'BR', NULL, NULL, 'Feira da Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11228, 2, 'BR', NULL, NULL, 'Feira de Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11229, 2, 'BR', NULL, NULL, 'Ferradas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11230, 2, 'BR', NULL, NULL, 'Filadélfia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11231, 2, 'BR', NULL, NULL, 'Filanésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11232, 2, 'BR', NULL, NULL, 'Firmino Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11233, 2, 'BR', NULL, NULL, 'Floresta Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11234, 2, 'BR', NULL, NULL, 'Formosa do Rio Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11235, 2, 'BR', NULL, NULL, 'França')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11236, 2, 'BR', NULL, NULL, 'Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11237, 2, 'BR', NULL, NULL, 'Gabiarra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11238, 2, 'BR', NULL, NULL, 'Galeão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11239, 2, 'BR', NULL, NULL, 'Gamboa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11240, 2, 'BR', NULL, NULL, 'Gameleira da Lapa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11241, 2, 'BR', NULL, NULL, 'Gameleira do Assuruá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11242, 2, 'BR', NULL, NULL, 'Gandu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11243, 2, 'BR', NULL, NULL, 'Gavião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11244, 2, 'BR', NULL, NULL, 'Gentio do Ouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11245, 2, 'BR', NULL, NULL, 'Geolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11246, 2, 'BR', NULL, NULL, 'Glória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11247, 2, 'BR', NULL, NULL, 'Gongogi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11248, 2, 'BR', NULL, NULL, 'Governador João Durval Carneiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11249, 2, 'BR', NULL, NULL, 'Governador Lomanto Júnior')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11250, 2, 'BR', NULL, NULL, 'Governador Mangabeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11251, 2, 'BR', NULL, NULL, 'Guagirus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11252, 2, 'BR', NULL, NULL, 'Guajeru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11253, 2, 'BR', NULL, NULL, 'Guanambi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11254, 2, 'BR', NULL, NULL, 'Guapira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11255, 2, 'BR', NULL, NULL, 'Guarajuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11256, 2, 'BR', NULL, NULL, 'Guaratinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11257, 2, 'BR', NULL, NULL, 'Guaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11258, 2, 'BR', NULL, NULL, 'Guerém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11259, 2, 'BR', NULL, NULL, 'Guiné')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11260, 2, 'BR', NULL, NULL, 'Guirapa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11261, 2, 'BR', NULL, NULL, 'Gurupá Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11262, 2, 'BR', NULL, NULL, 'Heliópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11263, 2, 'BR', NULL, NULL, 'Helvecia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11264, 2, 'BR', NULL, NULL, 'Hidrolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11265, 2, 'BR', NULL, NULL, 'Humildes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11266, 2, 'BR', NULL, NULL, 'Iaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11267, 2, 'BR', NULL, NULL, 'Ibatui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11268, 2, 'BR', NULL, NULL, 'Ibiajara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11269, 2, 'BR', NULL, NULL, 'Ibiapora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11270, 2, 'BR', NULL, NULL, 'Ibiassucê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11271, 2, 'BR', NULL, NULL, 'Ibiaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11272, 2, 'BR', NULL, NULL, 'Ibicaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11273, 2, 'BR', NULL, NULL, 'Ibicoara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11274, 2, 'BR', NULL, NULL, 'Ibicuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11275, 2, 'BR', NULL, NULL, 'Ibipeba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11276, 2, 'BR', NULL, NULL, 'Ibipetum')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11277, 2, 'BR', NULL, NULL, 'Ibipitanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11278, 2, 'BR', NULL, NULL, 'Ibiquera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11279, 2, 'BR', NULL, NULL, 'Ibiraba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11280, 2, 'BR', NULL, NULL, 'Ibirajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11281, 2, 'BR', NULL, NULL, 'Ibiranhém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11282, 2, 'BR', NULL, NULL, 'Ibirapitanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11283, 2, 'BR', NULL, NULL, 'Ibirapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11284, 2, 'BR', NULL, NULL, 'Ibirataia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11285, 2, 'BR', NULL, NULL, 'Ibitiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11286, 2, 'BR', NULL, NULL, 'Ibitiguira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11287, 2, 'BR', NULL, NULL, 'Ibitira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11288, 2, 'BR', NULL, NULL, 'Ibititá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11289, 2, 'BR', NULL, NULL, 'Ibitunane')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11290, 2, 'BR', NULL, NULL, 'Ibitupa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11291, 2, 'BR', NULL, NULL, 'Ibotirama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11292, 2, 'BR', NULL, NULL, 'Ibó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11293, 2, 'BR', NULL, NULL, 'Ichu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11294, 2, 'BR', NULL, NULL, 'Icó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11295, 2, 'BR', NULL, NULL, 'Igaporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11296, 2, 'BR', NULL, NULL, 'Igarité')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11297, 2, 'BR', NULL, NULL, 'Igará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11298, 2, 'BR', NULL, NULL, 'Igatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11299, 2, 'BR', NULL, NULL, 'Igrapiúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11300, 2, 'BR', NULL, NULL, 'Iguaibi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11301, 2, 'BR', NULL, NULL, 'Iguatemi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11302, 2, 'BR', NULL, NULL, 'Iguaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11303, 2, 'BR', NULL, NULL, 'Iguira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11304, 2, 'BR', NULL, NULL, 'Iguitu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11305, 2, 'BR', NULL, NULL, 'Iguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11306, 2, 'BR', NULL, NULL, 'Ilha de Bom Jesus dos Passos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11307, 2, 'BR', NULL, NULL, 'Ilha de Maré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11308, 2, 'BR', NULL, NULL, 'Ilha dos Frades')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11309, 2, 'BR', NULL, NULL, 'Ilhéus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11310, 2, 'BR', NULL, NULL, 'Indaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11311, 2, 'BR', NULL, NULL, 'Inema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11312, 2, 'BR', NULL, NULL, 'Inhambupe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11313, 2, 'BR', NULL, NULL, 'Inhata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11314, 2, 'BR', NULL, NULL, 'Inhaúmas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11315, 2, 'BR', NULL, NULL, 'Inhobim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11316, 2, 'BR', NULL, NULL, 'Inúbia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11317, 2, 'BR', NULL, NULL, 'Ipecaetá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11318, 2, 'BR', NULL, NULL, 'Ipiaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11319, 2, 'BR', NULL, NULL, 'Ipirá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11320, 2, 'BR', NULL, NULL, 'Ipiúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11321, 2, 'BR', NULL, NULL, 'Ipucaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11322, 2, 'BR', NULL, NULL, 'Ipupiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11323, 2, 'BR', NULL, NULL, 'Irajuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11324, 2, 'BR', NULL, NULL, 'Iramaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11325, 2, 'BR', NULL, NULL, 'Iraporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11326, 2, 'BR', NULL, NULL, 'Iraquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11327, 2, 'BR', NULL, NULL, 'Irará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11328, 2, 'BR', NULL, NULL, 'Irecê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11329, 2, 'BR', NULL, NULL, 'Irundiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11330, 2, 'BR', NULL, NULL, 'Ita-Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11331, 2, 'BR', NULL, NULL, 'Itabatã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11332, 2, 'BR', NULL, NULL, 'Itabela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11333, 2, 'BR', NULL, NULL, 'Itaberaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11334, 2, 'BR', NULL, NULL, 'Itabuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11335, 2, 'BR', NULL, NULL, 'Itacaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11336, 2, 'BR', NULL, NULL, 'Itacava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11337, 2, 'BR', NULL, NULL, 'Itachama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11338, 2, 'BR', NULL, NULL, 'Itacimirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11339, 2, 'BR', NULL, NULL, 'Itaeté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11340, 2, 'BR', NULL, NULL, 'Itagi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11341, 2, 'BR', NULL, NULL, 'Itagibá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11342, 2, 'BR', NULL, NULL, 'Itagimirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11343, 2, 'BR', NULL, NULL, 'Itaguaçu da Bahia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11344, 2, 'BR', NULL, NULL, 'Itaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11345, 2, 'BR', NULL, NULL, 'Itaibó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11346, 2, 'BR', NULL, NULL, 'Itaipu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11347, 2, 'BR', NULL, NULL, 'Itajaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11348, 2, 'BR', NULL, NULL, 'Itaju do Colônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11349, 2, 'BR', NULL, NULL, 'Itajubaquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11350, 2, 'BR', NULL, NULL, 'Itajuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11351, 2, 'BR', NULL, NULL, 'Itajuípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11352, 2, 'BR', NULL, NULL, 'Itamaraju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11353, 2, 'BR', NULL, NULL, 'Itamari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11354, 2, 'BR', NULL, NULL, 'Itambé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11355, 2, 'BR', NULL, NULL, 'Itamira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11356, 2, 'BR', NULL, NULL, 'Itamotinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11357, 2, 'BR', NULL, NULL, 'Itanagra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11358, 2, 'BR', NULL, NULL, 'Itanagé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11359, 2, 'BR', NULL, NULL, 'Itanhi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11360, 2, 'BR', NULL, NULL, 'Itanhém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11361, 2, 'BR', NULL, NULL, 'Itaparica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11362, 2, 'BR', NULL, NULL, 'Itapebi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11363, 2, 'BR', NULL, NULL, 'Itapeipu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11364, 2, 'BR', NULL, NULL, 'Itapetinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11365, 2, 'BR', NULL, NULL, 'Itapicuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11366, 2, 'BR', NULL, NULL, 'Itapirema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11367, 2, 'BR', NULL, NULL, 'Itapitanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11368, 2, 'BR', NULL, NULL, 'Itapora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11369, 2, 'BR', NULL, NULL, 'Itapura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11370, 2, 'BR', NULL, NULL, 'Itapé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11371, 2, 'BR', NULL, NULL, 'Itaquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11372, 2, 'BR', NULL, NULL, 'Itaquaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11373, 2, 'BR', NULL, NULL, 'Itarantim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11374, 2, 'BR', NULL, NULL, 'Itati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11375, 2, 'BR', NULL, NULL, 'Itatim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11376, 2, 'BR', NULL, NULL, 'Itatingui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11377, 2, 'BR', NULL, NULL, 'Itaítu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11378, 2, 'BR', NULL, NULL, 'Itiruçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11379, 2, 'BR', NULL, NULL, 'Itiúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11380, 2, 'BR', NULL, NULL, 'Itororó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11381, 2, 'BR', NULL, NULL, 'Ituaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11382, 2, 'BR', NULL, NULL, 'Ituberá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11383, 2, 'BR', NULL, NULL, 'Itupeva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11384, 2, 'BR', NULL, NULL, 'Iuiu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11385, 2, 'BR', NULL, NULL, 'Jaborandi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11386, 2, 'BR', NULL, NULL, 'Jacaraci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11387, 2, 'BR', NULL, NULL, 'Jacobina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11388, 2, 'BR', NULL, NULL, 'Jacu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11389, 2, 'BR', NULL, NULL, 'Jacuruna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11390, 2, 'BR', NULL, NULL, 'Jacuípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11391, 2, 'BR', NULL, NULL, 'Jaguaquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11392, 2, 'BR', NULL, NULL, 'Jaguara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11393, 2, 'BR', NULL, NULL, 'Jaguarari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11394, 2, 'BR', NULL, NULL, 'Jaguaripe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11395, 2, 'BR', NULL, NULL, 'Jandaíra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11396, 2, 'BR', NULL, NULL, 'Japomirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11397, 2, 'BR', NULL, NULL, 'Japu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11398, 2, 'BR', NULL, NULL, 'Jauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11399, 2, 'BR', NULL, NULL, 'Jaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11400, 2, 'BR', NULL, NULL, 'Jequiriçá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11401, 2, 'BR', NULL, NULL, 'Jequié')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11402, 2, 'BR', NULL, NULL, 'Jeremoabo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11403, 2, 'BR', NULL, NULL, 'Jiribatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11404, 2, 'BR', NULL, NULL, 'Jitaúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11405, 2, 'BR', NULL, NULL, 'José Gonçalves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11406, 2, 'BR', NULL, NULL, 'João Amaro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11407, 2, 'BR', NULL, NULL, 'João Correia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11408, 2, 'BR', NULL, NULL, 'João Dourado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11409, 2, 'BR', NULL, NULL, 'Juacema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11410, 2, 'BR', NULL, NULL, 'Juazeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11411, 2, 'BR', NULL, NULL, 'Jucuruçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11412, 2, 'BR', NULL, NULL, 'Juerana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11413, 2, 'BR', NULL, NULL, 'Junco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11414, 2, 'BR', NULL, NULL, 'Jupaguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11415, 2, 'BR', NULL, NULL, 'Juraci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11416, 2, 'BR', NULL, NULL, 'Juremal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11417, 2, 'BR', NULL, NULL, 'Jussara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11418, 2, 'BR', NULL, NULL, 'Jussari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11419, 2, 'BR', NULL, NULL, 'Jussiape')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11420, 2, 'BR', NULL, NULL, 'Km Sete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11421, 2, 'BR', NULL, NULL, 'Lafaiete Coutinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11422, 2, 'BR', NULL, NULL, 'Lagoa Clara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11423, 2, 'BR', NULL, NULL, 'Lagoa Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11424, 2, 'BR', NULL, NULL, 'Lagoa José Luís')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11425, 2, 'BR', NULL, NULL, 'Lagoa Preta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11426, 2, 'BR', NULL, NULL, 'Lagoa Real')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11427, 2, 'BR', NULL, NULL, 'Lagoa de Melquíades')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11428, 2, 'BR', NULL, NULL, 'Lagoa do Boi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11429, 2, 'BR', NULL, NULL, 'Laje')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11430, 2, 'BR', NULL, NULL, 'Laje do Banco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11431, 2, 'BR', NULL, NULL, 'Lajedinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11432, 2, 'BR', NULL, NULL, 'Lajedo Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11433, 2, 'BR', NULL, NULL, 'Lajedo do Tabocal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11434, 2, 'BR', NULL, NULL, 'Lajedão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11435, 2, 'BR', NULL, NULL, 'Lamarão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11436, 2, 'BR', NULL, NULL, 'Lamarão do Passe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11437, 2, 'BR', NULL, NULL, 'Lapão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11438, 2, 'BR', NULL, NULL, 'Largo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11439, 2, 'BR', NULL, NULL, 'Lauro de Freitas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11440, 2, 'BR', NULL, NULL, 'Lençóis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11441, 2, 'BR', NULL, NULL, 'Licínio de Almeida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11442, 2, 'BR', NULL, NULL, 'Limoeiro do Bom Viver')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11443, 2, 'BR', NULL, NULL, 'Livramento de Nossa Senhora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11444, 2, 'BR', NULL, NULL, 'Lucaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11445, 2, 'BR', NULL, NULL, 'Lustosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11446, 2, 'BR', NULL, NULL, 'Luís Eduardo Magalhães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11447, 2, 'BR', NULL, NULL, 'Luís Viana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11448, 2, 'BR', NULL, NULL, 'Macajuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11449, 2, 'BR', NULL, NULL, 'Macarani')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11450, 2, 'BR', NULL, NULL, 'Macaúbas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11451, 2, 'BR', NULL, NULL, 'Macururé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11452, 2, 'BR', NULL, NULL, 'Madre de Deus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11453, 2, 'BR', NULL, NULL, 'Maetinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11454, 2, 'BR', NULL, NULL, 'Maiquinique')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11455, 2, 'BR', NULL, NULL, 'Mairi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11456, 2, 'BR', NULL, NULL, 'Malhada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11457, 2, 'BR', NULL, NULL, 'Malhada de Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11458, 2, 'BR', NULL, NULL, 'Mandiroba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11459, 2, 'BR', NULL, NULL, 'Mangue Seco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11460, 2, 'BR', NULL, NULL, 'Maniaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11461, 2, 'BR', NULL, NULL, 'Manoel Vitorino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11462, 2, 'BR', NULL, NULL, 'Mansidão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11463, 2, 'BR', NULL, NULL, 'Mantiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11464, 2, 'BR', NULL, NULL, 'Mar Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11465, 2, 'BR', NULL, NULL, 'Maracás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11466, 2, 'BR', NULL, NULL, 'Maragogipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11467, 2, 'BR', NULL, NULL, 'Maragogipinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11468, 2, 'BR', NULL, NULL, 'Maraú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11469, 2, 'BR', NULL, NULL, 'Marcionílio Souza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11470, 2, 'BR', NULL, NULL, 'Marcolino Moura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11471, 2, 'BR', NULL, NULL, 'Maria Quitéria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11472, 2, 'BR', NULL, NULL, 'Maricoabo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11473, 2, 'BR', NULL, NULL, 'Mariquita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11474, 2, 'BR', NULL, NULL, 'Mascote')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11475, 2, 'BR', NULL, NULL, 'Massacara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11476, 2, 'BR', NULL, NULL, 'Massaroca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11477, 2, 'BR', NULL, NULL, 'Mata da Aliança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11478, 2, 'BR', NULL, NULL, 'Mata de São João')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11479, 2, 'BR', NULL, NULL, 'Mataripe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11480, 2, 'BR', NULL, NULL, 'Matina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11481, 2, 'BR', NULL, NULL, 'Matinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11482, 2, 'BR', NULL, NULL, 'Medeiros Neto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11483, 2, 'BR', NULL, NULL, 'Miguel Calmon')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11484, 2, 'BR', NULL, NULL, 'Milagres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11485, 2, 'BR', NULL, NULL, 'Minas do Espírito Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11486, 2, 'BR', NULL, NULL, 'Minas do Mimoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11487, 2, 'BR', NULL, NULL, 'Mirandela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11488, 2, 'BR', NULL, NULL, 'Miranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11489, 2, 'BR', NULL, NULL, 'Mirangaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11490, 2, 'BR', NULL, NULL, 'Mirante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11491, 2, 'BR', NULL, NULL, 'Mocambo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11492, 2, 'BR', NULL, NULL, 'Mogiquiçaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11493, 2, 'BR', NULL, NULL, 'Monte Cruzeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11494, 2, 'BR', NULL, NULL, 'Monte Gordo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11495, 2, 'BR', NULL, NULL, 'Monte Recôncavo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11496, 2, 'BR', NULL, NULL, 'Monte Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11497, 2, 'BR', NULL, NULL, 'Morpará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11498, 2, 'BR', NULL, NULL, 'Morrinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11499, 2, 'BR', NULL, NULL, 'Morro das Flores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11500, 2, 'BR', NULL, NULL, 'Morro de São Paulo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11501, 2, 'BR', NULL, NULL, 'Morro do Chapéu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11502, 2, 'BR', NULL, NULL, 'Mortugaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11503, 2, 'BR', NULL, NULL, 'Mucugê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11504, 2, 'BR', NULL, NULL, 'Mucuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11505, 2, 'BR', NULL, NULL, 'Mulungu do Morro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11506, 2, 'BR', NULL, NULL, 'Mundo Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11507, 2, 'BR', NULL, NULL, 'Muniz Ferreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11508, 2, 'BR', NULL, NULL, 'Muquém de São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11509, 2, 'BR', NULL, NULL, 'Muritiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11510, 2, 'BR', NULL, NULL, 'Mutas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11511, 2, 'BR', NULL, NULL, 'Mutuípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11512, 2, 'BR', NULL, NULL, 'Nagé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11513, 2, 'BR', NULL, NULL, 'Narandiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11514, 2, 'BR', NULL, NULL, 'Nazaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11515, 2, 'BR', NULL, NULL, 'Nilo Peçanha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11516, 2, 'BR', NULL, NULL, 'Nordestina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11517, 2, 'BR', NULL, NULL, 'Nova Alegria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11518, 2, 'BR', NULL, NULL, 'Nova Brasília')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11519, 2, 'BR', NULL, NULL, 'Nova Canaã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11520, 2, 'BR', NULL, NULL, 'Nova Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11521, 2, 'BR', NULL, NULL, 'Nova Ibiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11522, 2, 'BR', NULL, NULL, 'Nova Itaipê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11523, 2, 'BR', NULL, NULL, 'Nova Itarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11524, 2, 'BR', NULL, NULL, 'Nova Lídice')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11525, 2, 'BR', NULL, NULL, 'Nova Redenção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11526, 2, 'BR', NULL, NULL, 'Nova Soure')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11527, 2, 'BR', NULL, NULL, 'Nova Viçosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11528, 2, 'BR', NULL, NULL, 'Novo Acre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11529, 2, 'BR', NULL, NULL, 'Novo Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11530, 2, 'BR', NULL, NULL, 'Novo Triunfo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11531, 2, 'BR', NULL, NULL, 'Nuguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11532, 2, 'BR', NULL, NULL, 'Núcleo Residencial Pilar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11533, 2, 'BR', NULL, NULL, 'Olhos D''Água do Seco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11534, 2, 'BR', NULL, NULL, 'Olhos D''Água do Serafim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11535, 2, 'BR', NULL, NULL, 'Olindina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11536, 2, 'BR', NULL, NULL, 'Oliveira dos Brejinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11537, 2, 'BR', NULL, NULL, 'Olivença')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11538, 2, 'BR', NULL, NULL, 'Onha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11539, 2, 'BR', NULL, NULL, 'Oriente Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11540, 2, 'BR', NULL, NULL, 'Ouricana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11541, 2, 'BR', NULL, NULL, 'Ouricuri do Ouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11542, 2, 'BR', NULL, NULL, 'Ouriçangas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11543, 2, 'BR', NULL, NULL, 'Ourolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11544, 2, 'BR', NULL, NULL, 'Outeiro Redondo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11545, 2, 'BR', NULL, NULL, 'Paiol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11546, 2, 'BR', NULL, NULL, 'Pajeú do Vento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11547, 2, 'BR', NULL, NULL, 'Palame')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11548, 2, 'BR', NULL, NULL, 'Palmas de Monte Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11549, 2, 'BR', NULL, NULL, 'Palmeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11550, 2, 'BR', NULL, NULL, 'Parafuso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11551, 2, 'BR', NULL, NULL, 'Paramirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11552, 2, 'BR', NULL, NULL, 'Parateca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11553, 2, 'BR', NULL, NULL, 'Paratinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11554, 2, 'BR', NULL, NULL, 'Paripiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11555, 2, 'BR', NULL, NULL, 'Patamuté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11556, 2, 'BR', NULL, NULL, 'Pataíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11557, 2, 'BR', NULL, NULL, 'Pau Brasil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11558, 2, 'BR', NULL, NULL, 'Pau a Pique')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11559, 2, 'BR', NULL, NULL, 'Paulo Afonso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11560, 2, 'BR', NULL, NULL, 'Pedra Alta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11561, 2, 'BR', NULL, NULL, 'Pedras Altas do Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11562, 2, 'BR', NULL, NULL, 'Pedro Alexandre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11563, 2, 'BR', NULL, NULL, 'Pedrão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11564, 2, 'BR', NULL, NULL, 'Peixe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11565, 2, 'BR', NULL, NULL, 'Petim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11566, 2, 'BR', NULL, NULL, 'Piabanha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11567, 2, 'BR', NULL, NULL, 'Piatã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11568, 2, 'BR', NULL, NULL, 'Pilão Arcado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11569, 2, 'BR', NULL, NULL, 'Pilões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11570, 2, 'BR', NULL, NULL, 'Pimenteira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11571, 2, 'BR', NULL, NULL, 'Pindaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11572, 2, 'BR', NULL, NULL, 'Pindobaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11573, 2, 'BR', NULL, NULL, 'Pinhões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11574, 2, 'BR', NULL, NULL, 'Pintadas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11575, 2, 'BR', NULL, NULL, 'Piragi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11576, 2, 'BR', NULL, NULL, 'Pirajuia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11577, 2, 'BR', NULL, NULL, 'Pirajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11578, 2, 'BR', NULL, NULL, 'Piraí do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11579, 2, 'BR', NULL, NULL, 'Piri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11580, 2, 'BR', NULL, NULL, 'Piripá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11581, 2, 'BR', NULL, NULL, 'Piritiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11582, 2, 'BR', NULL, NULL, 'Pituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11583, 2, 'BR', NULL, NULL, 'Piçarrão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11584, 2, 'BR', NULL, NULL, 'Planaltino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11585, 2, 'BR', NULL, NULL, 'Planalto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11586, 2, 'BR', NULL, NULL, 'Pojuca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11587, 2, 'BR', NULL, NULL, 'Polo Petroquímico de Camaçari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11588, 2, 'BR', NULL, NULL, 'Ponta da Areia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11589, 2, 'BR', NULL, NULL, 'Ponto Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11590, 2, 'BR', NULL, NULL, 'Porto Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11591, 2, 'BR', NULL, NULL, 'Porto Seguro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11592, 2, 'BR', NULL, NULL, 'Posto da Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11593, 2, 'BR', NULL, NULL, 'Potiraguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11594, 2, 'BR', NULL, NULL, 'Poxim do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11595, 2, 'BR', NULL, NULL, 'Poço Central')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11596, 2, 'BR', NULL, NULL, 'Poço de Fora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11597, 2, 'BR', NULL, NULL, 'Poços')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11598, 2, 'BR', NULL, NULL, 'Poções')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11599, 2, 'BR', NULL, NULL, 'Prado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11600, 2, 'BR', NULL, NULL, 'Presidente Dutra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11601, 2, 'BR', NULL, NULL, 'Presidente Jânio Quadros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11602, 2, 'BR', NULL, NULL, 'Presidente Tancredo Neves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11603, 2, 'BR', NULL, NULL, 'Prevenido')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11604, 2, 'BR', NULL, NULL, 'Pé de Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11605, 2, 'BR', NULL, NULL, 'Quaraçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11606, 2, 'BR', NULL, NULL, 'Queimadas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11607, 2, 'BR', NULL, NULL, 'Quijingue')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11608, 2, 'BR', NULL, NULL, 'Quixabeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11609, 2, 'BR', NULL, NULL, 'Quixabá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11610, 2, 'BR', NULL, NULL, 'Rafael Jambeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11611, 2, 'BR', NULL, NULL, 'Recife')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11612, 2, 'BR', NULL, NULL, 'Remanso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11613, 2, 'BR', NULL, NULL, 'Remédios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11614, 2, 'BR', NULL, NULL, 'Retirolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11615, 2, 'BR', NULL, NULL, 'Riacho Seco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11616, 2, 'BR', NULL, NULL, 'Riacho da Guia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11617, 2, 'BR', NULL, NULL, 'Riacho de Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11618, 2, 'BR', NULL, NULL, 'Riachão das Neves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11619, 2, 'BR', NULL, NULL, 'Riachão do Jacuípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11620, 2, 'BR', NULL, NULL, 'Riachão do Utinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11621, 2, 'BR', NULL, NULL, 'Ribeira do Amparo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11622, 2, 'BR', NULL, NULL, 'Ribeira do Pombal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11623, 2, 'BR', NULL, NULL, 'Ribeirão do Largo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11624, 2, 'BR', NULL, NULL, 'Ribeirão do Salto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11625, 2, 'BR', NULL, NULL, 'Rio Fundo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11626, 2, 'BR', NULL, NULL, 'Rio Real')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11627, 2, 'BR', NULL, NULL, 'Rio da Dona')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11628, 2, 'BR', NULL, NULL, 'Rio de Contas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11629, 2, 'BR', NULL, NULL, 'Rio do Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11630, 2, 'BR', NULL, NULL, 'Rio do Braço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11631, 2, 'BR', NULL, NULL, 'Rio do Meio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11632, 2, 'BR', NULL, NULL, 'Rio do Pires')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11633, 2, 'BR', NULL, NULL, 'Rodelas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11634, 2, 'BR', NULL, NULL, 'Ruy Barbosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11635, 2, 'BR', NULL, NULL, 'Saldanha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11636, 2, 'BR', NULL, NULL, 'Salgadália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11637, 2, 'BR', NULL, NULL, 'Salinas da Margarida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11638, 2, 'BR', NULL, NULL, 'Salobrinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11639, 2, 'BR', NULL, NULL, 'Salobro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11640, 2, 'BR', NULL, NULL, 'Sambaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11641, 2, 'BR', NULL, NULL, 'Santa Brígida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11642, 2, 'BR', NULL, NULL, 'Santa Bárbara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11643, 2, 'BR', NULL, NULL, 'Santa Cruz Cabrália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11644, 2, 'BR', NULL, NULL, 'Santa Cruz da Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11645, 2, 'BR', NULL, NULL, 'Santa Inês')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11646, 2, 'BR', NULL, NULL, 'Santa Luzia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11647, 2, 'BR', NULL, NULL, 'Santa Maria da Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11648, 2, 'BR', NULL, NULL, 'Santa Rita de Cássia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11649, 2, 'BR', NULL, NULL, 'Santa Terezinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11650, 2, 'BR', NULL, NULL, 'Santaluz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11651, 2, 'BR', NULL, NULL, 'Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11652, 2, 'BR', NULL, NULL, 'Santana do Sobrado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11653, 2, 'BR', NULL, NULL, 'Santanópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11654, 2, 'BR', NULL, NULL, 'Santiago do Iguapé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11655, 2, 'BR', NULL, NULL, 'Santo Amaro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11656, 2, 'BR', NULL, NULL, 'Santo Antônio de Barcelona')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11657, 2, 'BR', NULL, NULL, 'Santo Antônio de Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11658, 2, 'BR', NULL, NULL, 'Santo Estevão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11659, 2, 'BR', NULL, NULL, 'Santo Inácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11660, 2, 'BR', NULL, NULL, 'Sapeaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11661, 2, 'BR', NULL, NULL, 'Saubara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11662, 2, 'BR', NULL, NULL, 'Saudável')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11663, 2, 'BR', NULL, NULL, 'Saúde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11664, 2, 'BR', NULL, NULL, 'Seabra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11665, 2, 'BR', NULL, NULL, 'Sebastião Laranjeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11666, 2, 'BR', NULL, NULL, 'Senhor do Bonfim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11667, 2, 'BR', NULL, NULL, 'Sento Sé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11668, 2, 'BR', NULL, NULL, 'Sergi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11669, 2, 'BR', NULL, NULL, 'Serra Dourada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11670, 2, 'BR', NULL, NULL, 'Serra Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11671, 2, 'BR', NULL, NULL, 'Serra Preta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11672, 2, 'BR', NULL, NULL, 'Serra da Canabrava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11673, 2, 'BR', NULL, NULL, 'Serra do Ramalho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11674, 2, 'BR', NULL, NULL, 'Serrinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11675, 2, 'BR', NULL, NULL, 'Serrolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11676, 2, 'BR', NULL, NULL, 'Simões Filho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11677, 2, 'BR', NULL, NULL, 'Soares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11678, 2, 'BR', NULL, NULL, 'Sobradinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11679, 2, 'BR', NULL, NULL, 'Souto Soares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11680, 2, 'BR', NULL, NULL, 'Subaúma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11681, 2, 'BR', NULL, NULL, 'Sussuarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11682, 2, 'BR', NULL, NULL, 'Sátiro Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11683, 2, 'BR', NULL, NULL, 'São Desidério')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11684, 2, 'BR', NULL, NULL, 'São Domingos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11685, 2, 'BR', NULL, NULL, 'São Felipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11686, 2, 'BR', NULL, NULL, 'São Francisco do Conde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11687, 2, 'BR', NULL, NULL, 'São Félix')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11688, 2, 'BR', NULL, NULL, 'São Félix do Coribe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11689, 2, 'BR', NULL, NULL, 'São Gabriel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11690, 2, 'BR', NULL, NULL, 'São Gonçalo dos Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11691, 2, 'BR', NULL, NULL, 'São José da Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11692, 2, 'BR', NULL, NULL, 'São José do Colônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11693, 2, 'BR', NULL, NULL, 'São José do Jacuípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11694, 2, 'BR', NULL, NULL, 'São José do Prado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11695, 2, 'BR', NULL, NULL, 'São José do Rio Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11696, 2, 'BR', NULL, NULL, 'São João da Fortaleza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11697, 2, 'BR', NULL, NULL, 'São João da Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11698, 2, 'BR', NULL, NULL, 'São Miguel das Matas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11699, 2, 'BR', NULL, NULL, 'São Paulinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11700, 2, 'BR', NULL, NULL, 'São Roque do Paraguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11701, 2, 'BR', NULL, NULL, 'São Sebastião do Passe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11702, 2, 'BR', NULL, NULL, 'São Timóteo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11703, 2, 'BR', NULL, NULL, 'Sítio Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11704, 2, 'BR', NULL, NULL, 'Sítio Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11705, 2, 'BR', NULL, NULL, 'Sítio da Baraúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11706, 2, 'BR', NULL, NULL, 'Sítio do Mato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11707, 2, 'BR', NULL, NULL, 'Sítio do Meio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11708, 2, 'BR', NULL, NULL, 'Sítio do Quinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11709, 2, 'BR', NULL, NULL, 'Tabocas do Brejo Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11710, 2, 'BR', NULL, NULL, 'Taboleiro do Castro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11711, 2, 'BR', NULL, NULL, 'Taboquinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11712, 2, 'BR', NULL, NULL, 'Taguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11713, 2, 'BR', NULL, NULL, 'Tamburil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11714, 2, 'BR', NULL, NULL, 'Tanhaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11715, 2, 'BR', NULL, NULL, 'Tanque Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11716, 2, 'BR', NULL, NULL, 'Tanquinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11717, 2, 'BR', NULL, NULL, 'Tanquinho do Poço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11718, 2, 'BR', NULL, NULL, 'Taperoá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11719, 2, 'BR', NULL, NULL, 'Tapirama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11720, 2, 'BR', NULL, NULL, 'Tapiramutá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11721, 2, 'BR', NULL, NULL, 'Tapiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11722, 2, 'BR', NULL, NULL, 'Tapiraípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11723, 2, 'BR', NULL, NULL, 'Tapúia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11724, 2, 'BR', NULL, NULL, 'Taquarendi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11725, 2, 'BR', NULL, NULL, 'Taquarinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11726, 2, 'BR', NULL, NULL, 'Tartaruga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11727, 2, 'BR', NULL, NULL, 'Tauapé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11728, 2, 'BR', NULL, NULL, 'Teixeira de Freitas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11729, 2, 'BR', NULL, NULL, 'Teodoro Sampaio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11730, 2, 'BR', NULL, NULL, 'Teofilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11731, 2, 'BR', NULL, NULL, 'Teolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11732, 2, 'BR', NULL, NULL, 'Terra Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11733, 2, 'BR', NULL, NULL, 'Tijuaçú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11734, 2, 'BR', NULL, NULL, 'Tiquaruçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11735, 2, 'BR', NULL, NULL, 'Trancoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11736, 2, 'BR', NULL, NULL, 'Tremedal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11737, 2, 'BR', NULL, NULL, 'Triunfo do Sincorá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11738, 2, 'BR', NULL, NULL, 'Tucano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11739, 2, 'BR', NULL, NULL, 'Uauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11740, 2, 'BR', NULL, NULL, 'Ubaitaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11741, 2, 'BR', NULL, NULL, 'Ubatã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11742, 2, 'BR', NULL, NULL, 'Ubaíra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11743, 2, 'BR', NULL, NULL, 'Ubiracaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11744, 2, 'BR', NULL, NULL, 'Ubiraitá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11745, 2, 'BR', NULL, NULL, 'Uibaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11746, 2, 'BR', NULL, NULL, 'Umburanas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11747, 2, 'BR', NULL, NULL, 'Umbuzeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11748, 2, 'BR', NULL, NULL, 'Una')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11749, 2, 'BR', NULL, NULL, 'Urandi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11750, 2, 'BR', NULL, NULL, 'Uruçuca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11751, 2, 'BR', NULL, NULL, 'Utinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11752, 2, 'BR', NULL, NULL, 'Vale Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11753, 2, 'BR', NULL, NULL, 'Valente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11754, 2, 'BR', NULL, NULL, 'Valença')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11755, 2, 'BR', NULL, NULL, 'Varzedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11756, 2, 'BR', NULL, NULL, 'Velha Boipeba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11757, 2, 'BR', NULL, NULL, 'Ventura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11758, 2, 'BR', NULL, NULL, 'Vera Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11759, 2, 'BR', NULL, NULL, 'Vereda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11760, 2, 'BR', NULL, NULL, 'Vila do Café')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11761, 2, 'BR', NULL, NULL, 'Vitória da Conquista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11762, 2, 'BR', NULL, NULL, 'Volta Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11763, 2, 'BR', NULL, NULL, 'Várzea Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11764, 2, 'BR', NULL, NULL, 'Várzea da Roça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11765, 2, 'BR', NULL, NULL, 'Várzea do Caldas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11766, 2, 'BR', NULL, NULL, 'Várzea do Cerco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11767, 2, 'BR', NULL, NULL, 'Várzea do Poço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11768, 2, 'BR', NULL, NULL, 'Várzeas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11769, 2, 'BR', NULL, NULL, 'Wagner')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11770, 2, 'BR', NULL, NULL, 'Wanderley')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11771, 2, 'BR', NULL, NULL, 'Wenceslau Guimarães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11772, 2, 'BR', NULL, NULL, 'Xique-Xique')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11773, 2, 'BR', NULL, NULL, 'Água Doce')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11774, 2, 'BR', NULL, NULL, 'Água Fria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11775, 2, 'BR', NULL, NULL, 'Águas do Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11776, 2, 'BR', NULL, NULL, 'Érico Cardoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11777, 3, 'BR', NULL, NULL, 'Brazlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11778, 3, 'BR', NULL, NULL, 'Candangolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11779, 3, 'BR', NULL, NULL, 'Ceilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11780, 3, 'BR', NULL, NULL, 'Cruzeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11781, 3, 'BR', NULL, NULL, 'Gama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11782, 3, 'BR', NULL, NULL, 'Guará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11783, 3, 'BR', NULL, NULL, 'Lago Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11784, 3, 'BR', NULL, NULL, 'Lago Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11785, 3, 'BR', NULL, NULL, 'Núcleo Bandeirante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11786, 3, 'BR', NULL, NULL, 'Paranoá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11787, 3, 'BR', NULL, NULL, 'Planaltina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11788, 3, 'BR', NULL, NULL, 'Recanto das Emas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11789, 3, 'BR', NULL, NULL, 'Riacho Fundo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11790, 3, 'BR', NULL, NULL, 'Samambaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11791, 3, 'BR', NULL, NULL, 'Santa Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11792, 3, 'BR', NULL, NULL, 'Sobradinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11793, 3, 'BR', NULL, NULL, 'São Sebastião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11794, 3, 'BR', NULL, NULL, 'Taguatinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11795, 4, 'BR', NULL, NULL, 'Adamantina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11796, 4, 'BR', NULL, NULL, 'Adolfo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11797, 4, 'BR', NULL, NULL, 'Agisse')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11798, 4, 'BR', NULL, NULL, 'Aguaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11799, 4, 'BR', NULL, NULL, 'Agudos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11800, 4, 'BR', NULL, NULL, 'Agulha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11801, 4, 'BR', NULL, NULL, 'Ajapi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11802, 4, 'BR', NULL, NULL, 'Alambari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11803, 4, 'BR', NULL, NULL, 'Alberto Moreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11804, 4, 'BR', NULL, NULL, 'Aldeia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11805, 4, 'BR', NULL, NULL, 'Aldeia de Carapicuíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11806, 4, 'BR', NULL, NULL, 'Alfredo Guedes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11807, 4, 'BR', NULL, NULL, 'Alfredo Marcondes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11808, 4, 'BR', NULL, NULL, 'Altair')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11809, 4, 'BR', NULL, NULL, 'Altinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11810, 4, 'BR', NULL, NULL, 'Alto Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11811, 4, 'BR', NULL, NULL, 'Alto Porã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11812, 4, 'BR', NULL, NULL, 'Alumínio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11813, 4, 'BR', NULL, NULL, 'Alvinlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11814, 4, 'BR', NULL, NULL, 'Amadeu Amaral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11815, 4, 'BR', NULL, NULL, 'Amandaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11816, 4, 'BR', NULL, NULL, 'Ameliópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11817, 4, 'BR', NULL, NULL, 'Americana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11818, 4, 'BR', NULL, NULL, 'Amparo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11819, 4, 'BR', NULL, NULL, 'Américo Brasiliense')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11820, 4, 'BR', NULL, NULL, 'Américo de Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11821, 4, 'BR', NULL, NULL, 'Ana Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11822, 4, 'BR', NULL, NULL, 'Analândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11823, 4, 'BR', NULL, NULL, 'Andes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11824, 4, 'BR', NULL, NULL, 'Andradina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11825, 4, 'BR', NULL, NULL, 'Angatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11826, 4, 'BR', NULL, NULL, 'Anhembi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11827, 4, 'BR', NULL, NULL, 'Anhumas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11828, 4, 'BR', NULL, NULL, 'Anápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11829, 4, 'BR', NULL, NULL, 'Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11830, 4, 'BR', NULL, NULL, 'Aparecida D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11831, 4, 'BR', NULL, NULL, 'Aparecida de Monte Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11832, 4, 'BR', NULL, NULL, 'Aparecida de São Manuel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11833, 4, 'BR', NULL, NULL, 'Aparecida do Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11834, 4, 'BR', NULL, NULL, 'Apiaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11835, 4, 'BR', NULL, NULL, 'Apiaí-Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11836, 4, 'BR', NULL, NULL, 'Arabela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11837, 4, 'BR', NULL, NULL, 'Aracaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11838, 4, 'BR', NULL, NULL, 'Aramina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11839, 4, 'BR', NULL, NULL, 'Arandu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11840, 4, 'BR', NULL, NULL, 'Arapeí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11841, 4, 'BR', NULL, NULL, 'Araraquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11842, 4, 'BR', NULL, NULL, 'Araras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11843, 4, 'BR', NULL, NULL, 'Araxás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11844, 4, 'BR', NULL, NULL, 'Araçariguama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11845, 4, 'BR', NULL, NULL, 'Araçatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11846, 4, 'BR', NULL, NULL, 'Araçaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11847, 4, 'BR', NULL, NULL, 'Araçoiaba da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11848, 4, 'BR', NULL, NULL, 'Arcadas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11849, 4, 'BR', NULL, NULL, 'Arco-Íris')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11850, 4, 'BR', NULL, NULL, 'Arealva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11851, 4, 'BR', NULL, NULL, 'Areias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11852, 4, 'BR', NULL, NULL, 'Areiópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11853, 4, 'BR', NULL, NULL, 'Ariranha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11854, 4, 'BR', NULL, NULL, 'Ariri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11855, 4, 'BR', NULL, NULL, 'Artemis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11856, 4, 'BR', NULL, NULL, 'Artur Nogueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11857, 4, 'BR', NULL, NULL, 'Arujá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11858, 4, 'BR', NULL, NULL, 'Aspásia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11859, 4, 'BR', NULL, NULL, 'Assis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11860, 4, 'BR', NULL, NULL, 'Assistência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11861, 4, 'BR', NULL, NULL, 'Atibaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11862, 4, 'BR', NULL, NULL, 'Atlântida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11863, 4, 'BR', NULL, NULL, 'Auriflama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11864, 4, 'BR', NULL, NULL, 'Avanhandava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11865, 4, 'BR', NULL, NULL, 'Avaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11866, 4, 'BR', NULL, NULL, 'Avaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11867, 4, 'BR', NULL, NULL, 'Avencas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11868, 4, 'BR', NULL, NULL, 'Bacaetava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11869, 4, 'BR', NULL, NULL, 'Bacuriti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11870, 4, 'BR', NULL, NULL, 'Bady Bassitt')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11871, 4, 'BR', NULL, NULL, 'Baguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11872, 4, 'BR', NULL, NULL, 'Bairro Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11873, 4, 'BR', NULL, NULL, 'Balbinos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11874, 4, 'BR', NULL, NULL, 'Bananal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11875, 4, 'BR', NULL, NULL, 'Bandeirantes D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11876, 4, 'BR', NULL, NULL, 'Barbosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11877, 4, 'BR', NULL, NULL, 'Bariri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11878, 4, 'BR', NULL, NULL, 'Barra Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11879, 4, 'BR', NULL, NULL, 'Barra Dourada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11880, 4, 'BR', NULL, NULL, 'Barra do Chapéu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11881, 4, 'BR', NULL, NULL, 'Barra do Turvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11882, 4, 'BR', NULL, NULL, 'Barretos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11883, 4, 'BR', NULL, NULL, 'Barrinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11884, 4, 'BR', NULL, NULL, 'Barrânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11885, 4, 'BR', NULL, NULL, 'Barueri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11886, 4, 'BR', NULL, NULL, 'Barão Ataliba Nogueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11887, 4, 'BR', NULL, NULL, 'Barão de Antonina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11888, 4, 'BR', NULL, NULL, 'Barão de Geraldo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11889, 4, 'BR', NULL, NULL, 'Bastos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11890, 4, 'BR', NULL, NULL, 'Batatais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11891, 4, 'BR', NULL, NULL, 'Batatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11892, 4, 'BR', NULL, NULL, 'Batista Botelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11893, 4, 'BR', NULL, NULL, 'Bauru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11894, 4, 'BR', NULL, NULL, 'Bebedouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11895, 4, 'BR', NULL, NULL, 'Bela Floresta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11896, 4, 'BR', NULL, NULL, 'Bela Vista São-Carlense')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11897, 4, 'BR', NULL, NULL, 'Bento de Abreu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11898, 4, 'BR', NULL, NULL, 'Bernardino de Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11899, 4, 'BR', NULL, NULL, 'Bertioga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11900, 4, 'BR', NULL, NULL, 'Bilac')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11901, 4, 'BR', NULL, NULL, 'Birigüi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11902, 4, 'BR', NULL, NULL, 'Biritiba-Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11903, 4, 'BR', NULL, NULL, 'Biritiba-Ussu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11904, 4, 'BR', NULL, NULL, 'Boa Esperança do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11905, 4, 'BR', NULL, NULL, 'Boa Vista Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11906, 4, 'BR', NULL, NULL, 'Boa Vista dos Andradas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11907, 4, 'BR', NULL, NULL, 'Bocaina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11908, 4, 'BR', NULL, NULL, 'Bofete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11909, 4, 'BR', NULL, NULL, 'Boituva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11910, 4, 'BR', NULL, NULL, 'Bom Fim do Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11911, 4, 'BR', NULL, NULL, 'Bom Jesus dos Perdões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11912, 4, 'BR', NULL, NULL, 'Bom Retiro da Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11913, 4, 'BR', NULL, NULL, 'Bom Sucesso de Itararé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11914, 4, 'BR', NULL, NULL, 'Bonfim Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11915, 4, 'BR', NULL, NULL, 'Boracéia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11916, 4, 'BR', NULL, NULL, 'Borborema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11917, 4, 'BR', NULL, NULL, 'Borebi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11918, 4, 'BR', NULL, NULL, 'Borá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11919, 4, 'BR', NULL, NULL, 'Botafogo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11920, 4, 'BR', NULL, NULL, 'Botelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11921, 4, 'BR', NULL, NULL, 'Botujuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11922, 4, 'BR', NULL, NULL, 'Bragança Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11923, 4, 'BR', NULL, NULL, 'Brasitânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11924, 4, 'BR', NULL, NULL, 'Braço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11925, 4, 'BR', NULL, NULL, 'Braúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11926, 4, 'BR', NULL, NULL, 'Brejo Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11927, 4, 'BR', NULL, NULL, 'Brodowski')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11928, 4, 'BR', NULL, NULL, 'Brotas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11929, 4, 'BR', NULL, NULL, 'Brás Cubas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11930, 4, 'BR', NULL, NULL, 'Bueno de Andrada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11931, 4, 'BR', NULL, NULL, 'Buri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11932, 4, 'BR', NULL, NULL, 'Buritama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11933, 4, 'BR', NULL, NULL, 'Buritizal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11934, 4, 'BR', NULL, NULL, 'Bálsamo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11935, 4, 'BR', NULL, NULL, 'Cabreúva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11936, 4, 'BR', NULL, NULL, 'Cabrália Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11937, 4, 'BR', NULL, NULL, 'Cachoeira Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11938, 4, 'BR', NULL, NULL, 'Cachoeira de Emas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11939, 4, 'BR', NULL, NULL, 'Caconde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11940, 4, 'BR', NULL, NULL, 'Cafelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11941, 4, 'BR', NULL, NULL, 'Cafesópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11942, 4, 'BR', NULL, NULL, 'Caiabu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11943, 4, 'BR', NULL, NULL, 'Caibura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11944, 4, 'BR', NULL, NULL, 'Caieiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11945, 4, 'BR', NULL, NULL, 'Caiuá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11946, 4, 'BR', NULL, NULL, 'Cajamar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11947, 4, 'BR', NULL, NULL, 'Cajati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11948, 4, 'BR', NULL, NULL, 'Cajobi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11949, 4, 'BR', NULL, NULL, 'Cajuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11950, 4, 'BR', NULL, NULL, 'Cambaquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11951, 4, 'BR', NULL, NULL, 'Cambaratiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11952, 4, 'BR', NULL, NULL, 'Campestrinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11953, 4, 'BR', NULL, NULL, 'Campina de Fora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11954, 4, 'BR', NULL, NULL, 'Campina do Monte Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11955, 4, 'BR', NULL, NULL, 'Campinal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11956, 4, 'BR', NULL, NULL, 'Campinas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11957, 4, 'BR', NULL, NULL, 'Campo Limpo Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11958, 4, 'BR', NULL, NULL, 'Campos Novos Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11959, 4, 'BR', NULL, NULL, 'Campos de Cunha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11960, 4, 'BR', NULL, NULL, 'Campos do Jordão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11961, 4, 'BR', NULL, NULL, 'Cananéia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11962, 4, 'BR', NULL, NULL, 'Canas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11963, 4, 'BR', NULL, NULL, 'Candia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11964, 4, 'BR', NULL, NULL, 'Canguera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11965, 4, 'BR', NULL, NULL, 'Canitar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11966, 4, 'BR', NULL, NULL, 'Capela do Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11967, 4, 'BR', NULL, NULL, 'Capivari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11968, 4, 'BR', NULL, NULL, 'Capivari da Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11969, 4, 'BR', NULL, NULL, 'Caporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11970, 4, 'BR', NULL, NULL, 'Capuava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11971, 4, 'BR', NULL, NULL, 'Capão Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11972, 4, 'BR', NULL, NULL, 'Caraguatatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11973, 4, 'BR', NULL, NULL, 'Carapicuíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11974, 4, 'BR', NULL, NULL, 'Cardeal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11975, 4, 'BR', NULL, NULL, 'Cardoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11976, 4, 'BR', NULL, NULL, 'Caruara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11977, 4, 'BR', NULL, NULL, 'Casa Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11978, 4, 'BR', NULL, NULL, 'Castilho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11979, 4, 'BR', NULL, NULL, 'Catanduva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11980, 4, 'BR', NULL, NULL, 'Catiguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11981, 4, 'BR', NULL, NULL, 'Catucaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11982, 4, 'BR', NULL, NULL, 'Caucaia do Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11983, 4, 'BR', NULL, NULL, 'Caçapava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11984, 4, 'BR', NULL, NULL, 'Cedral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11985, 4, 'BR', NULL, NULL, 'Cerqueira César')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11986, 4, 'BR', NULL, NULL, 'Cerquilho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11987, 4, 'BR', NULL, NULL, 'Cesário Lange')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11988, 4, 'BR', NULL, NULL, 'Cezar de Souza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11989, 4, 'BR', NULL, NULL, 'Charqueada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11990, 4, 'BR', NULL, NULL, 'Chavantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11991, 4, 'BR', NULL, NULL, 'Cipó-Guaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11992, 4, 'BR', NULL, NULL, 'Clarinia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11993, 4, 'BR', NULL, NULL, 'Clementina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11994, 4, 'BR', NULL, NULL, 'Cocaes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11995, 4, 'BR', NULL, NULL, 'Colina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11996, 4, 'BR', NULL, NULL, 'Colômbia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11997, 4, 'BR', NULL, NULL, 'Conceição de Monte Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11998, 4, 'BR', NULL, NULL, 'Conchal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (11999, 4, 'BR', NULL, NULL, 'Conchas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12000, 4, 'BR', NULL, NULL, 'Cordeirópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12001, 4, 'BR', NULL, NULL, 'Coroados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12002, 4, 'BR', NULL, NULL, 'Coronel Goulart')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12003, 4, 'BR', NULL, NULL, 'Coronel Macedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12004, 4, 'BR', NULL, NULL, 'Corredeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12005, 4, 'BR', NULL, NULL, 'Corumbataí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12006, 4, 'BR', NULL, NULL, 'Cosmorama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12007, 4, 'BR', NULL, NULL, 'Cosmópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12008, 4, 'BR', NULL, NULL, 'Costa Machado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12009, 4, 'BR', NULL, NULL, 'Cotia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12010, 4, 'BR', NULL, NULL, 'Cravinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12011, 4, 'BR', NULL, NULL, 'Cristais Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12012, 4, 'BR', NULL, NULL, 'Cruz das Posses')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12013, 4, 'BR', NULL, NULL, 'Cruzeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12014, 4, 'BR', NULL, NULL, 'Cruzália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12015, 4, 'BR', NULL, NULL, 'Cubatão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12016, 4, 'BR', NULL, NULL, 'Cuiabá Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12017, 4, 'BR', NULL, NULL, 'Cunha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12018, 4, 'BR', NULL, NULL, 'Curupá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12019, 4, 'BR', NULL, NULL, 'Cássia dos Coqueiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12020, 4, 'BR', NULL, NULL, 'Cândido Mota')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12021, 4, 'BR', NULL, NULL, 'Cândido Rodrigues')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12022, 4, 'BR', NULL, NULL, 'Córrego Rico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12023, 4, 'BR', NULL, NULL, 'Dalas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12024, 4, 'BR', NULL, NULL, 'Descalvado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12025, 4, 'BR', NULL, NULL, 'Diadema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12026, 4, 'BR', NULL, NULL, 'Dirce Reis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12027, 4, 'BR', NULL, NULL, 'Dirceu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12028, 4, 'BR', NULL, NULL, 'Divinolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12029, 4, 'BR', NULL, NULL, 'Dobrada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12030, 4, 'BR', NULL, NULL, 'Dois Córregos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12031, 4, 'BR', NULL, NULL, 'Dolcinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12032, 4, 'BR', NULL, NULL, 'Domélia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12033, 4, 'BR', NULL, NULL, 'Dourado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12034, 4, 'BR', NULL, NULL, 'Dracena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12035, 4, 'BR', NULL, NULL, 'Duartina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12036, 4, 'BR', NULL, NULL, 'Dumont')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12037, 4, 'BR', NULL, NULL, 'Duplo Céu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12038, 4, 'BR', NULL, NULL, 'Echaporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12039, 4, 'BR', NULL, NULL, 'Eldorado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12040, 4, 'BR', NULL, NULL, 'Eleutério')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12041, 4, 'BR', NULL, NULL, 'Elias Fausto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12042, 4, 'BR', NULL, NULL, 'Elisiário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12043, 4, 'BR', NULL, NULL, 'Embaúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12044, 4, 'BR', NULL, NULL, 'Embu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12045, 4, 'BR', NULL, NULL, 'Embu-Guaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12046, 4, 'BR', NULL, NULL, 'Emilianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12047, 4, 'BR', NULL, NULL, 'Eneida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12048, 4, 'BR', NULL, NULL, 'Engenheiro Balduíno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12049, 4, 'BR', NULL, NULL, 'Engenheiro Coelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12050, 4, 'BR', NULL, NULL, 'Engenheiro Maia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12051, 4, 'BR', NULL, NULL, 'Engenheiro Schmidt')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12052, 4, 'BR', NULL, NULL, 'Esmeralda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12053, 4, 'BR', NULL, NULL, 'Esperança D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12054, 4, 'BR', NULL, NULL, 'Espigão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12055, 4, 'BR', NULL, NULL, 'Espírito Santo do Pinhal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12056, 4, 'BR', NULL, NULL, 'Espírito Santo do Turvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12057, 4, 'BR', NULL, NULL, 'Estiva Gerbi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12058, 4, 'BR', NULL, NULL, 'Estrela D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12059, 4, 'BR', NULL, NULL, 'Estrela do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12060, 4, 'BR', NULL, NULL, 'Euclides da Cunha Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12061, 4, 'BR', NULL, NULL, 'Eugênio de Melo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12062, 4, 'BR', NULL, NULL, 'Fartura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12063, 4, 'BR', NULL, NULL, 'Fazenda Velha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12064, 4, 'BR', NULL, NULL, 'Fernando Prestes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12065, 4, 'BR', NULL, NULL, 'Fernandópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12066, 4, 'BR', NULL, NULL, 'Fernão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12067, 4, 'BR', NULL, NULL, 'Ferraz de Vasconcelos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12068, 4, 'BR', NULL, NULL, 'Flora Rica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12069, 4, 'BR', NULL, NULL, 'Floreal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12070, 4, 'BR', NULL, NULL, 'Floresta do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12071, 4, 'BR', NULL, NULL, 'Florínia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12072, 4, 'BR', NULL, NULL, 'Flórida Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12073, 4, 'BR', NULL, NULL, 'Franca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12074, 4, 'BR', NULL, NULL, 'Francisco Morato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12075, 4, 'BR', NULL, NULL, 'Franco da Rocha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12076, 4, 'BR', NULL, NULL, 'Frutal do Campo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12077, 4, 'BR', NULL, NULL, 'Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12078, 4, 'BR', NULL, NULL, 'Fátima Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12079, 4, 'BR', NULL, NULL, 'Gabriel Monteiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12080, 4, 'BR', NULL, NULL, 'Gardênia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12081, 4, 'BR', NULL, NULL, 'Garça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12082, 4, 'BR', NULL, NULL, 'Gastão Vidigal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12083, 4, 'BR', NULL, NULL, 'Gavião Peixoto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12084, 4, 'BR', NULL, NULL, 'General Salgado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12085, 4, 'BR', NULL, NULL, 'Getulina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12086, 4, 'BR', NULL, NULL, 'Glicério')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12087, 4, 'BR', NULL, NULL, 'Gramadinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12088, 4, 'BR', NULL, NULL, 'Guachos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12089, 4, 'BR', NULL, NULL, 'Guaianas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12090, 4, 'BR', NULL, NULL, 'Guaimbê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12091, 4, 'BR', NULL, NULL, 'Guaiçara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12092, 4, 'BR', NULL, NULL, 'Guamium')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12093, 4, 'BR', NULL, NULL, 'Guapiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12094, 4, 'BR', NULL, NULL, 'Guapiaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12095, 4, 'BR', NULL, NULL, 'Guapiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12096, 4, 'BR', NULL, NULL, 'Guaraci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12097, 4, 'BR', NULL, NULL, 'Guaraciaba D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12098, 4, 'BR', NULL, NULL, 'Guarani D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12099, 4, 'BR', NULL, NULL, 'Guarantã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12100, 4, 'BR', NULL, NULL, 'Guarapiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12101, 4, 'BR', NULL, NULL, 'Guarapuá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12102, 4, 'BR', NULL, NULL, 'Guararapes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12103, 4, 'BR', NULL, NULL, 'Guararema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12104, 4, 'BR', NULL, NULL, 'Guaratinguetá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12105, 4, 'BR', NULL, NULL, 'Guaraçaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12106, 4, 'BR', NULL, NULL, 'Guareí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12107, 4, 'BR', NULL, NULL, 'Guariba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12108, 4, 'BR', NULL, NULL, 'Guariroba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12109, 4, 'BR', NULL, NULL, 'Guarizinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12110, 4, 'BR', NULL, NULL, 'Guarujá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12111, 4, 'BR', NULL, NULL, 'Guarulhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12112, 4, 'BR', NULL, NULL, 'Guará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12113, 4, 'BR', NULL, NULL, 'Guatapará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12114, 4, 'BR', NULL, NULL, 'Guaíra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12115, 4, 'BR', NULL, NULL, 'Guzolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12116, 4, 'BR', NULL, NULL, 'Gália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12117, 4, 'BR', NULL, NULL, 'Herculândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12118, 4, 'BR', NULL, NULL, 'Holambra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12119, 4, 'BR', NULL, NULL, 'Holambra II')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12120, 4, 'BR', NULL, NULL, 'Hortolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12121, 4, 'BR', NULL, NULL, 'Iacanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12122, 4, 'BR', NULL, NULL, 'Iacri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12123, 4, 'BR', NULL, NULL, 'Iaras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12124, 4, 'BR', NULL, NULL, 'Ibaté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12125, 4, 'BR', NULL, NULL, 'Ibiporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12126, 4, 'BR', NULL, NULL, 'Ibirarema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12127, 4, 'BR', NULL, NULL, 'Ibirá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12128, 4, 'BR', NULL, NULL, 'Ibitinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12129, 4, 'BR', NULL, NULL, 'Ibitiruna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12130, 4, 'BR', NULL, NULL, 'Ibitiúva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12131, 4, 'BR', NULL, NULL, 'Ibitu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12132, 4, 'BR', NULL, NULL, 'Ibiúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12133, 4, 'BR', NULL, NULL, 'Icém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12134, 4, 'BR', NULL, NULL, 'Ida Iolanda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12135, 4, 'BR', NULL, NULL, 'Iepê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12136, 4, 'BR', NULL, NULL, 'Igarapava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12137, 4, 'BR', NULL, NULL, 'Igaratá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12138, 4, 'BR', NULL, NULL, 'Igaraçu do Tietê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12139, 4, 'BR', NULL, NULL, 'Igaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12140, 4, 'BR', NULL, NULL, 'Igaçaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12141, 4, 'BR', NULL, NULL, 'Iguape')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12142, 4, 'BR', NULL, NULL, 'Ilha Comprida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12143, 4, 'BR', NULL, NULL, 'Ilha Diana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12144, 4, 'BR', NULL, NULL, 'Ilha Solteira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12145, 4, 'BR', NULL, NULL, 'Ilhabela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12146, 4, 'BR', NULL, NULL, 'Indaiatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12147, 4, 'BR', NULL, NULL, 'Indaiá do Aguapeí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12148, 4, 'BR', NULL, NULL, 'Indiana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12149, 4, 'BR', NULL, NULL, 'Indiaporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12150, 4, 'BR', NULL, NULL, 'Ingás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12151, 4, 'BR', NULL, NULL, 'Inúbia Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12152, 4, 'BR', NULL, NULL, 'Ipaussu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12153, 4, 'BR', NULL, NULL, 'Iperó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12154, 4, 'BR', NULL, NULL, 'Ipeúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12155, 4, 'BR', NULL, NULL, 'Ipiguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12156, 4, 'BR', NULL, NULL, 'Iporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12157, 4, 'BR', NULL, NULL, 'Ipuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12158, 4, 'BR', NULL, NULL, 'Iracemápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12159, 4, 'BR', NULL, NULL, 'Irapuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12160, 4, 'BR', NULL, NULL, 'Irapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12161, 4, 'BR', NULL, NULL, 'Irapé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12162, 4, 'BR', NULL, NULL, 'Itaberá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12163, 4, 'BR', NULL, NULL, 'Itaboa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12164, 4, 'BR', NULL, NULL, 'Itaiuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12165, 4, 'BR', NULL, NULL, 'Itajobi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12166, 4, 'BR', NULL, NULL, 'Itaju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12167, 4, 'BR', NULL, NULL, 'Itanhaém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12168, 4, 'BR', NULL, NULL, 'Itapecerica da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12169, 4, 'BR', NULL, NULL, 'Itapetininga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12170, 4, 'BR', NULL, NULL, 'Itapeuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12171, 4, 'BR', NULL, NULL, 'Itapeva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12172, 4, 'BR', NULL, NULL, 'Itapevi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12173, 4, 'BR', NULL, NULL, 'Itapira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12174, 4, 'BR', NULL, NULL, 'Itapirapuã Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12175, 4, 'BR', NULL, NULL, 'Itaporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12176, 4, 'BR', NULL, NULL, 'Itapura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12177, 4, 'BR', NULL, NULL, 'Itapuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12178, 4, 'BR', NULL, NULL, 'Itaquaquecetuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12179, 4, 'BR', NULL, NULL, 'Itaqueri da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12180, 4, 'BR', NULL, NULL, 'Itararé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12181, 4, 'BR', NULL, NULL, 'Itariri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12182, 4, 'BR', NULL, NULL, 'Itatiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12183, 4, 'BR', NULL, NULL, 'Itatinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12184, 4, 'BR', NULL, NULL, 'Itaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12185, 4, 'BR', NULL, NULL, 'Itaóca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12186, 4, 'BR', NULL, NULL, 'Itirapina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12187, 4, 'BR', NULL, NULL, 'Itirapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12188, 4, 'BR', NULL, NULL, 'Itobi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12189, 4, 'BR', NULL, NULL, 'Itororó do Paranapanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12190, 4, 'BR', NULL, NULL, 'Itupeva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12191, 4, 'BR', NULL, NULL, 'Ituverava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12192, 4, 'BR', NULL, NULL, 'Itápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12193, 4, 'BR', NULL, NULL, 'Iubatinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12194, 4, 'BR', NULL, NULL, 'Jaborandi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12195, 4, 'BR', NULL, NULL, 'Jaboticabal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12196, 4, 'BR', NULL, NULL, 'Jacareí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12197, 4, 'BR', NULL, NULL, 'Jacaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12198, 4, 'BR', NULL, NULL, 'Jaci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12199, 4, 'BR', NULL, NULL, 'Jaciporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12200, 4, 'BR', NULL, NULL, 'Jacuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12201, 4, 'BR', NULL, NULL, 'Jafa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12202, 4, 'BR', NULL, NULL, 'Jaguariúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12203, 4, 'BR', NULL, NULL, 'Jales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12204, 4, 'BR', NULL, NULL, 'Jamaica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12205, 4, 'BR', NULL, NULL, 'Jambeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12206, 4, 'BR', NULL, NULL, 'Jandira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12207, 4, 'BR', NULL, NULL, 'Jardim Belval')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12208, 4, 'BR', NULL, NULL, 'Jardim Presidente Dutra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12209, 4, 'BR', NULL, NULL, 'Jardim Santa Luzia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12210, 4, 'BR', NULL, NULL, 'Jardim Silveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12211, 4, 'BR', NULL, NULL, 'Jardinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12212, 4, 'BR', NULL, NULL, 'Jarinu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12213, 4, 'BR', NULL, NULL, 'Jatobá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12214, 4, 'BR', NULL, NULL, 'Jaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12215, 4, 'BR', NULL, NULL, 'Jeriquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12216, 4, 'BR', NULL, NULL, 'Joanópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12217, 4, 'BR', NULL, NULL, 'Joaquim Egídio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12218, 4, 'BR', NULL, NULL, 'Jordanésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12219, 4, 'BR', NULL, NULL, 'José Bonifácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12220, 4, 'BR', NULL, NULL, 'João Ramalho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12221, 4, 'BR', NULL, NULL, 'Juliânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12222, 4, 'BR', NULL, NULL, 'Jumirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12223, 4, 'BR', NULL, NULL, 'Jundiapeba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12224, 4, 'BR', NULL, NULL, 'Jundiaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12225, 4, 'BR', NULL, NULL, 'Junqueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12226, 4, 'BR', NULL, NULL, 'Junqueirópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12227, 4, 'BR', NULL, NULL, 'Juquiratiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12228, 4, 'BR', NULL, NULL, 'Juquitiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12229, 4, 'BR', NULL, NULL, 'Juquiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12230, 4, 'BR', NULL, NULL, 'Juritis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12231, 4, 'BR', NULL, NULL, 'Jurucê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12232, 4, 'BR', NULL, NULL, 'Jurupeba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12233, 4, 'BR', NULL, NULL, 'Jurupema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12234, 4, 'BR', NULL, NULL, 'Júlio Mesquita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12235, 4, 'BR', NULL, NULL, 'Lagoa Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12236, 4, 'BR', NULL, NULL, 'Lagoa Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12237, 4, 'BR', NULL, NULL, 'Lagoinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12238, 4, 'BR', NULL, NULL, 'Laranjal Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12239, 4, 'BR', NULL, NULL, 'Laras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12240, 4, 'BR', NULL, NULL, 'Lauro Penteado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12241, 4, 'BR', NULL, NULL, 'Lavrinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12242, 4, 'BR', NULL, NULL, 'Lavínia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12243, 4, 'BR', NULL, NULL, 'Leme')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12244, 4, 'BR', NULL, NULL, 'Lençóis Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12245, 4, 'BR', NULL, NULL, 'Limeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12246, 4, 'BR', NULL, NULL, 'Lindóia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12247, 4, 'BR', NULL, NULL, 'Lins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12248, 4, 'BR', NULL, NULL, 'Lobo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12249, 4, 'BR', NULL, NULL, 'Lorena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12250, 4, 'BR', NULL, NULL, 'Lourdes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12251, 4, 'BR', NULL, NULL, 'Louveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12252, 4, 'BR', NULL, NULL, 'Lucianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12253, 4, 'BR', NULL, NULL, 'Lucélia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12254, 4, 'BR', NULL, NULL, 'Luiziânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12255, 4, 'BR', NULL, NULL, 'Lupércio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12256, 4, 'BR', NULL, NULL, 'Lusitânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12257, 4, 'BR', NULL, NULL, 'Lutécia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12258, 4, 'BR', NULL, NULL, 'Luís Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12259, 4, 'BR', NULL, NULL, 'Lácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12260, 4, 'BR', NULL, NULL, 'Macatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12261, 4, 'BR', NULL, NULL, 'Macaubal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12262, 4, 'BR', NULL, NULL, 'Macedônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12263, 4, 'BR', NULL, NULL, 'Macucos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12264, 4, 'BR', NULL, NULL, 'Mailasqui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12265, 4, 'BR', NULL, NULL, 'Mairinque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12266, 4, 'BR', NULL, NULL, 'Mairiporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12267, 4, 'BR', NULL, NULL, 'Major Prado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12268, 4, 'BR', NULL, NULL, 'Manduri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12269, 4, 'BR', NULL, NULL, 'Mangaratu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12270, 4, 'BR', NULL, NULL, 'Marabá Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12271, 4, 'BR', NULL, NULL, 'Maracaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12272, 4, 'BR', NULL, NULL, 'Marapoama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12273, 4, 'BR', NULL, NULL, 'Marcondésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12274, 4, 'BR', NULL, NULL, 'Maresias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12275, 4, 'BR', NULL, NULL, 'Marinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12276, 4, 'BR', NULL, NULL, 'Maristela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12277, 4, 'BR', NULL, NULL, 'Mariápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12278, 4, 'BR', NULL, NULL, 'Martim Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12279, 4, 'BR', NULL, NULL, 'Martinho Prado Júnior')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12280, 4, 'BR', NULL, NULL, 'Martinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12281, 4, 'BR', NULL, NULL, 'Marília')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12282, 4, 'BR', NULL, NULL, 'Matão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12283, 4, 'BR', NULL, NULL, 'Mauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12284, 4, 'BR', NULL, NULL, 'Mendonça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12285, 4, 'BR', NULL, NULL, 'Meridiano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12286, 4, 'BR', NULL, NULL, 'Mesópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12287, 4, 'BR', NULL, NULL, 'Miguelópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12288, 4, 'BR', NULL, NULL, 'Mineiros do Tietê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12289, 4, 'BR', NULL, NULL, 'Mira Estrela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12290, 4, 'BR', NULL, NULL, 'Miracatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12291, 4, 'BR', NULL, NULL, 'Miraluz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12292, 4, 'BR', NULL, NULL, 'Mirandópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12293, 4, 'BR', NULL, NULL, 'Mirante do Paranapanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12294, 4, 'BR', NULL, NULL, 'Mirassol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12295, 4, 'BR', NULL, NULL, 'Mirassolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12296, 4, 'BR', NULL, NULL, 'Mococa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12297, 4, 'BR', NULL, NULL, 'Mogi Guaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12298, 4, 'BR', NULL, NULL, 'Mogi Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12299, 4, 'BR', NULL, NULL, 'Mogi das Cruzes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12300, 4, 'BR', NULL, NULL, 'Mombuca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12301, 4, 'BR', NULL, NULL, 'Mongaguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12302, 4, 'BR', NULL, NULL, 'Montalvão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12303, 4, 'BR', NULL, NULL, 'Monte Alegre do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12304, 4, 'BR', NULL, NULL, 'Monte Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12305, 4, 'BR', NULL, NULL, 'Monte Aprazível')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12306, 4, 'BR', NULL, NULL, 'Monte Azul Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12307, 4, 'BR', NULL, NULL, 'Monte Cabrão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12308, 4, 'BR', NULL, NULL, 'Monte Castelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12309, 4, 'BR', NULL, NULL, 'Monte Mor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12310, 4, 'BR', NULL, NULL, 'Monte Verde Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12311, 4, 'BR', NULL, NULL, 'Monteiro Lobato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12312, 4, 'BR', NULL, NULL, 'Monções')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12313, 4, 'BR', NULL, NULL, 'Moreira César')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12314, 4, 'BR', NULL, NULL, 'Morro Agudo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12315, 4, 'BR', NULL, NULL, 'Morro do Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12316, 4, 'BR', NULL, NULL, 'Morungaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12317, 4, 'BR', NULL, NULL, 'Mostardas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12318, 4, 'BR', NULL, NULL, 'Motuca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12319, 4, 'BR', NULL, NULL, 'Mourão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12320, 4, 'BR', NULL, NULL, 'Murutinga do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12321, 4, 'BR', NULL, NULL, 'Mágda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12322, 4, 'BR', NULL, NULL, 'Nantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12323, 4, 'BR', NULL, NULL, 'Narandiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12324, 4, 'BR', NULL, NULL, 'Natividade da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12325, 4, 'BR', NULL, NULL, 'Nazaré Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12326, 4, 'BR', NULL, NULL, 'Neves Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12327, 4, 'BR', NULL, NULL, 'Nhandeara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12328, 4, 'BR', NULL, NULL, 'Nipoã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12329, 4, 'BR', NULL, NULL, 'Nogueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12330, 4, 'BR', NULL, NULL, 'Nossa Senhora do Remédio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12331, 4, 'BR', NULL, NULL, 'Nova Alexandria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12332, 4, 'BR', NULL, NULL, 'Nova Aliança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12333, 4, 'BR', NULL, NULL, 'Nova América')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12334, 4, 'BR', NULL, NULL, 'Nova Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12335, 4, 'BR', NULL, NULL, 'Nova Campina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12336, 4, 'BR', NULL, NULL, 'Nova Canaã Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12337, 4, 'BR', NULL, NULL, 'Nova Castilho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12338, 4, 'BR', NULL, NULL, 'Nova Europa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12339, 4, 'BR', NULL, NULL, 'Nova Granada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12340, 4, 'BR', NULL, NULL, 'Nova Guataporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12341, 4, 'BR', NULL, NULL, 'Nova Independência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12342, 4, 'BR', NULL, NULL, 'Nova Itapirema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12343, 4, 'BR', NULL, NULL, 'Nova Luzitânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12344, 4, 'BR', NULL, NULL, 'Nova Odessa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12345, 4, 'BR', NULL, NULL, 'Nova Pátria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12346, 4, 'BR', NULL, NULL, 'Nova Veneza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12347, 4, 'BR', NULL, NULL, 'Novais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12348, 4, 'BR', NULL, NULL, 'Novo Cravinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12349, 4, 'BR', NULL, NULL, 'Novo Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12350, 4, 'BR', NULL, NULL, 'Nuporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12351, 4, 'BR', NULL, NULL, 'Ocauçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12352, 4, 'BR', NULL, NULL, 'Oliveira Barros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12353, 4, 'BR', NULL, NULL, 'Olímpia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12354, 4, 'BR', NULL, NULL, 'Onda Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12355, 4, 'BR', NULL, NULL, 'Onda Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12356, 4, 'BR', NULL, NULL, 'Oriente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12357, 4, 'BR', NULL, NULL, 'Orindiúva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12358, 4, 'BR', NULL, NULL, 'Orlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12359, 4, 'BR', NULL, NULL, 'Osasco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12360, 4, 'BR', NULL, NULL, 'Oscar Bressane')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12361, 4, 'BR', NULL, NULL, 'Osvaldo Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12362, 4, 'BR', NULL, NULL, 'Ourinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12363, 4, 'BR', NULL, NULL, 'Ouro Fino Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12364, 4, 'BR', NULL, NULL, 'Ouro Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12365, 4, 'BR', NULL, NULL, 'Ouroeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12366, 4, 'BR', NULL, NULL, 'Oásis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12367, 4, 'BR', NULL, NULL, 'Pacaembu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12368, 4, 'BR', NULL, NULL, 'Padre Nóbrega')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12369, 4, 'BR', NULL, NULL, 'Palestina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12370, 4, 'BR', NULL, NULL, 'Palmares Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12371, 4, 'BR', NULL, NULL, 'Palmeira D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12372, 4, 'BR', NULL, NULL, 'Palmeiras de São Paulo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12373, 4, 'BR', NULL, NULL, 'Palmital')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12374, 4, 'BR', NULL, NULL, 'Panorama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12375, 4, 'BR', NULL, NULL, 'Paraguaçu Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12376, 4, 'BR', NULL, NULL, 'Paraibuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12377, 4, 'BR', NULL, NULL, 'Paraisolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12378, 4, 'BR', NULL, NULL, 'Paranabi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12379, 4, 'BR', NULL, NULL, 'Paranapanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12380, 4, 'BR', NULL, NULL, 'Paranapiacaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12381, 4, 'BR', NULL, NULL, 'Paranapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12382, 4, 'BR', NULL, NULL, 'Parapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12383, 4, 'BR', NULL, NULL, 'Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12384, 4, 'BR', NULL, NULL, 'Pardinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12385, 4, 'BR', NULL, NULL, 'Pariquera-Açu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12386, 4, 'BR', NULL, NULL, 'Parisi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12387, 4, 'BR', NULL, NULL, 'Parnaso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12388, 4, 'BR', NULL, NULL, 'Parque Meia Lua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12389, 4, 'BR', NULL, NULL, 'Paruru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12390, 4, 'BR', NULL, NULL, 'Patrocínio Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12391, 4, 'BR', NULL, NULL, 'Paulicéia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12392, 4, 'BR', NULL, NULL, 'Paulistânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12393, 4, 'BR', NULL, NULL, 'Paulo de Faria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12394, 4, 'BR', NULL, NULL, 'Paulínia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12395, 4, 'BR', NULL, NULL, 'Paulópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12396, 4, 'BR', NULL, NULL, 'Pederneiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12397, 4, 'BR', NULL, NULL, 'Pedra Bela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12398, 4, 'BR', NULL, NULL, 'Pedra Branca de Itararé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12399, 4, 'BR', NULL, NULL, 'Pedranópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12400, 4, 'BR', NULL, NULL, 'Pedregulho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12401, 4, 'BR', NULL, NULL, 'Pedreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12402, 4, 'BR', NULL, NULL, 'Pedrinhas Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12403, 4, 'BR', NULL, NULL, 'Pedro Barros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12404, 4, 'BR', NULL, NULL, 'Pedro de Toledo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12405, 4, 'BR', NULL, NULL, 'Penápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12406, 4, 'BR', NULL, NULL, 'Pereira Barreto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12407, 4, 'BR', NULL, NULL, 'Pereiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12408, 4, 'BR', NULL, NULL, 'Peruíbe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12409, 4, 'BR', NULL, NULL, 'Piacatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12410, 4, 'BR', NULL, NULL, 'Picinguaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12411, 4, 'BR', NULL, NULL, 'Piedade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12412, 4, 'BR', NULL, NULL, 'Pilar do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12413, 4, 'BR', NULL, NULL, 'Pindamonhangaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12414, 4, 'BR', NULL, NULL, 'Pindorama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12415, 4, 'BR', NULL, NULL, 'Pinhalzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12416, 4, 'BR', NULL, NULL, 'Pinheiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12417, 4, 'BR', NULL, NULL, 'Pioneiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12418, 4, 'BR', NULL, NULL, 'Piquerobi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12419, 4, 'BR', NULL, NULL, 'Piquete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12420, 4, 'BR', NULL, NULL, 'Piracaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12421, 4, 'BR', NULL, NULL, 'Piracicaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12422, 4, 'BR', NULL, NULL, 'Piraju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12423, 4, 'BR', NULL, NULL, 'Pirajuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12424, 4, 'BR', NULL, NULL, 'Pirambóia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12425, 4, 'BR', NULL, NULL, 'Pirangi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12426, 4, 'BR', NULL, NULL, 'Pirapitingui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12427, 4, 'BR', NULL, NULL, 'Pirapora do Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12428, 4, 'BR', NULL, NULL, 'Pirapozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12429, 4, 'BR', NULL, NULL, 'Pirassununga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12430, 4, 'BR', NULL, NULL, 'Piratininga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12431, 4, 'BR', NULL, NULL, 'Pitangueiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12432, 4, 'BR', NULL, NULL, 'Planalto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12433, 4, 'BR', NULL, NULL, 'Planalto do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12434, 4, 'BR', NULL, NULL, 'Platina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12435, 4, 'BR', NULL, NULL, 'Poloni')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12436, 4, 'BR', NULL, NULL, 'Polvilho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12437, 4, 'BR', NULL, NULL, 'Pompéia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12438, 4, 'BR', NULL, NULL, 'Pongaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12439, 4, 'BR', NULL, NULL, 'Pontal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12440, 4, 'BR', NULL, NULL, 'Pontalinda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12441, 4, 'BR', NULL, NULL, 'Pontes Gestal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12442, 4, 'BR', NULL, NULL, 'Populina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12443, 4, 'BR', NULL, NULL, 'Porangaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12444, 4, 'BR', NULL, NULL, 'Porto Feliz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12445, 4, 'BR', NULL, NULL, 'Porto Ferreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12446, 4, 'BR', NULL, NULL, 'Porto Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12447, 4, 'BR', NULL, NULL, 'Potim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12448, 4, 'BR', NULL, NULL, 'Potirendaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12449, 4, 'BR', NULL, NULL, 'Potunduva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12450, 4, 'BR', NULL, NULL, 'Poá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12451, 4, 'BR', NULL, NULL, 'Pracinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12452, 4, 'BR', NULL, NULL, 'Pradínia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12453, 4, 'BR', NULL, NULL, 'Pradópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12454, 4, 'BR', NULL, NULL, 'Praia Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12455, 4, 'BR', NULL, NULL, 'Pratânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12456, 4, 'BR', NULL, NULL, 'Presidente Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12457, 4, 'BR', NULL, NULL, 'Presidente Bernardes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12458, 4, 'BR', NULL, NULL, 'Presidente Epitácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12459, 4, 'BR', NULL, NULL, 'Presidente Prudente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12460, 4, 'BR', NULL, NULL, 'Presidente Venceslau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12461, 4, 'BR', NULL, NULL, 'Primavera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12462, 4, 'BR', NULL, NULL, 'Promissão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12463, 4, 'BR', NULL, NULL, 'Prudêncio e Moraes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12464, 4, 'BR', NULL, NULL, 'Quadra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12465, 4, 'BR', NULL, NULL, 'Quatá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12466, 4, 'BR', NULL, NULL, 'Queiroz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12467, 4, 'BR', NULL, NULL, 'Queluz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12468, 4, 'BR', NULL, NULL, 'Quintana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12469, 4, 'BR', NULL, NULL, 'Quiririm')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12470, 4, 'BR', NULL, NULL, 'Rafard')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12471, 4, 'BR', NULL, NULL, 'Rancharia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12472, 4, 'BR', NULL, NULL, 'Rechan')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12473, 4, 'BR', NULL, NULL, 'Redenção da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12474, 4, 'BR', NULL, NULL, 'Regente Feijó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12475, 4, 'BR', NULL, NULL, 'Reginópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12476, 4, 'BR', NULL, NULL, 'Registro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12477, 4, 'BR', NULL, NULL, 'Restinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12478, 4, 'BR', NULL, NULL, 'Riacho Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12479, 4, 'BR', NULL, NULL, 'Ribeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12480, 4, 'BR', NULL, NULL, 'Ribeiro do Vale')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12481, 4, 'BR', NULL, NULL, 'Ribeiro dos Santos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12482, 4, 'BR', NULL, NULL, 'Ribeirão Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12483, 4, 'BR', NULL, NULL, 'Ribeirão Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12484, 4, 'BR', NULL, NULL, 'Ribeirão Corrente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12485, 4, 'BR', NULL, NULL, 'Ribeirão Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12486, 4, 'BR', NULL, NULL, 'Ribeirão Pires')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12487, 4, 'BR', NULL, NULL, 'Ribeirão Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12488, 4, 'BR', NULL, NULL, 'Ribeirão do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12489, 4, 'BR', NULL, NULL, 'Ribeirão dos Índios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12490, 4, 'BR', NULL, NULL, 'Rifaina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12491, 4, 'BR', NULL, NULL, 'Rincão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12492, 4, 'BR', NULL, NULL, 'Rinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12493, 4, 'BR', NULL, NULL, 'Rio Claro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12494, 4, 'BR', NULL, NULL, 'Rio Grande da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12495, 4, 'BR', NULL, NULL, 'Rio das Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12496, 4, 'BR', NULL, NULL, 'Riolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12497, 4, 'BR', NULL, NULL, 'Riversul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12498, 4, 'BR', NULL, NULL, 'Roberto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12499, 4, 'BR', NULL, NULL, 'Rosana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12500, 4, 'BR', NULL, NULL, 'Roseira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12501, 4, 'BR', NULL, NULL, 'Rosália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12502, 4, 'BR', NULL, NULL, 'Rubinéia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12503, 4, 'BR', NULL, NULL, 'Rubiácea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12504, 4, 'BR', NULL, NULL, 'Rubião Júnior')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12505, 4, 'BR', NULL, NULL, 'Ruilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12506, 4, 'BR', NULL, NULL, 'Sabaúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12507, 4, 'BR', NULL, NULL, 'Sabino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12508, 4, 'BR', NULL, NULL, 'Sagres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12509, 4, 'BR', NULL, NULL, 'Sales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12510, 4, 'BR', NULL, NULL, 'Sales Oliveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12511, 4, 'BR', NULL, NULL, 'Salesópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12512, 4, 'BR', NULL, NULL, 'Salmourão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12513, 4, 'BR', NULL, NULL, 'Saltinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12514, 4, 'BR', NULL, NULL, 'Salto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12515, 4, 'BR', NULL, NULL, 'Salto Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12516, 4, 'BR', NULL, NULL, 'Salto de Pirapora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12517, 4, 'BR', NULL, NULL, 'Salto do Avanhandava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12518, 4, 'BR', NULL, NULL, 'Sandovalina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12519, 4, 'BR', NULL, NULL, 'Santa Adélia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12520, 4, 'BR', NULL, NULL, 'Santa Albertina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12521, 4, 'BR', NULL, NULL, 'Santa América')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12522, 4, 'BR', NULL, NULL, 'Santa Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12523, 4, 'BR', NULL, NULL, 'Santa Bárbara D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12524, 4, 'BR', NULL, NULL, 'Santa Clara D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12525, 4, 'BR', NULL, NULL, 'Santa Cruz da Conceição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12526, 4, 'BR', NULL, NULL, 'Santa Cruz da Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12527, 4, 'BR', NULL, NULL, 'Santa Cruz da Estrela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12528, 4, 'BR', NULL, NULL, 'Santa Cruz das Palmeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12529, 4, 'BR', NULL, NULL, 'Santa Cruz do Rio Pardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12530, 4, 'BR', NULL, NULL, 'Santa Cruz dos Lopes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12531, 4, 'BR', NULL, NULL, 'Santa Ernestina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12532, 4, 'BR', NULL, NULL, 'Santa Eudóxia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12533, 4, 'BR', NULL, NULL, 'Santa Fé do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12534, 4, 'BR', NULL, NULL, 'Santa Gertrudes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12535, 4, 'BR', NULL, NULL, 'Santa Isabel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12536, 4, 'BR', NULL, NULL, 'Santa Isabel do Marinheiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12537, 4, 'BR', NULL, NULL, 'Santa Lúcia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12538, 4, 'BR', NULL, NULL, 'Santa Margarida Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12539, 4, 'BR', NULL, NULL, 'Santa Maria da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12540, 4, 'BR', NULL, NULL, 'Santa Maria do Gurupá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12541, 4, 'BR', NULL, NULL, 'Santa Mercedes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12542, 4, 'BR', NULL, NULL, 'Santa Rita D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12543, 4, 'BR', NULL, NULL, 'Santa Rita do Passa Quatro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12544, 4, 'BR', NULL, NULL, 'Santa Rita do Ribeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12545, 4, 'BR', NULL, NULL, 'Santa Rosa de Viterbo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12546, 4, 'BR', NULL, NULL, 'Santa Salete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12547, 4, 'BR', NULL, NULL, 'Santa Teresinha de Piracicaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12548, 4, 'BR', NULL, NULL, 'Santana da Ponte Pensa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12549, 4, 'BR', NULL, NULL, 'Santana de Parnaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12550, 4, 'BR', NULL, NULL, 'Santelmo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12551, 4, 'BR', NULL, NULL, 'Santo Anastácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12552, 4, 'BR', NULL, NULL, 'Santo André')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12553, 4, 'BR', NULL, NULL, 'Santo Antônio Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12554, 4, 'BR', NULL, NULL, 'Santo Antônio da Alegria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12555, 4, 'BR', NULL, NULL, 'Santo Antônio da Estiva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12556, 4, 'BR', NULL, NULL, 'Santo Antônio de Posse')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12557, 4, 'BR', NULL, NULL, 'Santo Antônio do Aracanguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12558, 4, 'BR', NULL, NULL, 'Santo Antônio do Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12559, 4, 'BR', NULL, NULL, 'Santo Antônio do Paranapanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12560, 4, 'BR', NULL, NULL, 'Santo Antônio do Pinhal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12561, 4, 'BR', NULL, NULL, 'Santo Expedito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12562, 4, 'BR', NULL, NULL, 'Santos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12563, 4, 'BR', NULL, NULL, 'Santópolis do Aguapeí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12564, 4, 'BR', NULL, NULL, 'Sapezal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12565, 4, 'BR', NULL, NULL, 'Sarapuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12566, 4, 'BR', NULL, NULL, 'Sarutaiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12567, 4, 'BR', NULL, NULL, 'Sebastianópolis do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12568, 4, 'BR', NULL, NULL, 'Serra Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12569, 4, 'BR', NULL, NULL, 'Serra Negra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12570, 4, 'BR', NULL, NULL, 'Serrana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12571, 4, 'BR', NULL, NULL, 'Sertãozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12572, 4, 'BR', NULL, NULL, 'Sete Barras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12573, 4, 'BR', NULL, NULL, 'Severínia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12574, 4, 'BR', NULL, NULL, 'Silveiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12575, 4, 'BR', NULL, NULL, 'Silvânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12576, 4, 'BR', NULL, NULL, 'Simonsen')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12577, 4, 'BR', NULL, NULL, 'Simões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12578, 4, 'BR', NULL, NULL, 'Socorro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12579, 4, 'BR', NULL, NULL, 'Sodrélia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12580, 4, 'BR', NULL, NULL, 'Solemar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12581, 4, 'BR', NULL, NULL, 'Sorocaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12582, 4, 'BR', NULL, NULL, 'Sousas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12583, 4, 'BR', NULL, NULL, 'Sud Mennucci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12584, 4, 'BR', NULL, NULL, 'Suinana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12585, 4, 'BR', NULL, NULL, 'Sumaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12586, 4, 'BR', NULL, NULL, 'Sussui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12587, 4, 'BR', NULL, NULL, 'Suzano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12588, 4, 'BR', NULL, NULL, 'Suzanápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12589, 4, 'BR', NULL, NULL, 'São Benedito da Cachoeirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12590, 4, 'BR', NULL, NULL, 'São Benedito das Areias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12591, 4, 'BR', NULL, NULL, 'São Bento do Sapucaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12592, 4, 'BR', NULL, NULL, 'São Bernardo do Campo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12593, 4, 'BR', NULL, NULL, 'São Berto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12594, 4, 'BR', NULL, NULL, 'São Caetano do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12595, 4, 'BR', NULL, NULL, 'São Carlos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12596, 4, 'BR', NULL, NULL, 'São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12597, 4, 'BR', NULL, NULL, 'São Francisco Xavier')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12598, 4, 'BR', NULL, NULL, 'São Francisco da Praia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12599, 4, 'BR', NULL, NULL, 'São Joaquim da Barra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12600, 4, 'BR', NULL, NULL, 'São José da Bela Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12601, 4, 'BR', NULL, NULL, 'São José das Laranjeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12602, 4, 'BR', NULL, NULL, 'São José do Barreiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12603, 4, 'BR', NULL, NULL, 'São José do Rio Pardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12604, 4, 'BR', NULL, NULL, 'São José do Rio Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12605, 4, 'BR', NULL, NULL, 'São José dos Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12606, 4, 'BR', NULL, NULL, 'São João Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12607, 4, 'BR', NULL, NULL, 'São João da Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12608, 4, 'BR', NULL, NULL, 'São João das Duas Pontes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12609, 4, 'BR', NULL, NULL, 'São João de Iracema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12610, 4, 'BR', NULL, NULL, 'São João de Itaguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12611, 4, 'BR', NULL, NULL, 'São João do Marinheiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12612, 4, 'BR', NULL, NULL, 'São João do Pau d''Alho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12613, 4, 'BR', NULL, NULL, 'São Lourenço da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12614, 4, 'BR', NULL, NULL, 'São Lourenço do Turvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12615, 4, 'BR', NULL, NULL, 'São Luiz do Guaricanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12616, 4, 'BR', NULL, NULL, 'São Luiz do Paraitinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12617, 4, 'BR', NULL, NULL, 'São Manuel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12618, 4, 'BR', NULL, NULL, 'São Martinho D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12619, 4, 'BR', NULL, NULL, 'São Miguel Arcanjo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12620, 4, 'BR', NULL, NULL, 'São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12621, 4, 'BR', NULL, NULL, 'São Pedro do Turvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12622, 4, 'BR', NULL, NULL, 'São Roque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12623, 4, 'BR', NULL, NULL, 'São Roque da Fartura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12624, 4, 'BR', NULL, NULL, 'São Sebastião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12625, 4, 'BR', NULL, NULL, 'São Sebastião da Grama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12626, 4, 'BR', NULL, NULL, 'São Sebastião da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12627, 4, 'BR', NULL, NULL, 'São Silvestre de Jacareí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12628, 4, 'BR', NULL, NULL, 'São Simão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12629, 4, 'BR', NULL, NULL, 'São Vicente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12630, 4, 'BR', NULL, NULL, 'Tabajara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12631, 4, 'BR', NULL, NULL, 'Tabapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12632, 4, 'BR', NULL, NULL, 'Tabatinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12633, 4, 'BR', NULL, NULL, 'Taboão da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12634, 4, 'BR', NULL, NULL, 'Taciba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12635, 4, 'BR', NULL, NULL, 'Taguaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12636, 4, 'BR', NULL, NULL, 'Taiacupeba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12637, 4, 'BR', NULL, NULL, 'Taiaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12638, 4, 'BR', NULL, NULL, 'Taiúva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12639, 4, 'BR', NULL, NULL, 'Talhado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12640, 4, 'BR', NULL, NULL, 'Tambaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12641, 4, 'BR', NULL, NULL, 'Tanabi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12642, 4, 'BR', NULL, NULL, 'Tapinas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12643, 4, 'BR', NULL, NULL, 'Tapiratiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12644, 4, 'BR', NULL, NULL, 'Tapiraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12645, 4, 'BR', NULL, NULL, 'Taquaral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12646, 4, 'BR', NULL, NULL, 'Taquaritinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12647, 4, 'BR', NULL, NULL, 'Taquarituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12648, 4, 'BR', NULL, NULL, 'Taquarivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12649, 4, 'BR', NULL, NULL, 'Tarabai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12650, 4, 'BR', NULL, NULL, 'Tarumã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12651, 4, 'BR', NULL, NULL, 'Tatuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12652, 4, 'BR', NULL, NULL, 'Taubaté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12653, 4, 'BR', NULL, NULL, 'Tecainda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12654, 4, 'BR', NULL, NULL, 'Tejupá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12655, 4, 'BR', NULL, NULL, 'Teodoro Sampaio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12656, 4, 'BR', NULL, NULL, 'Termas de Ibirá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12657, 4, 'BR', NULL, NULL, 'Terra Nova D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12658, 4, 'BR', NULL, NULL, 'Terra Roxa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12659, 4, 'BR', NULL, NULL, 'Tibiriçá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12660, 4, 'BR', NULL, NULL, 'Tibiriçá do Paranapanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12661, 4, 'BR', NULL, NULL, 'Tietê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12662, 4, 'BR', NULL, NULL, 'Timburi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12663, 4, 'BR', NULL, NULL, 'Torre de Pedra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12664, 4, 'BR', NULL, NULL, 'Torrinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12665, 4, 'BR', NULL, NULL, 'Trabiju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12666, 4, 'BR', NULL, NULL, 'Tremembé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12667, 4, 'BR', NULL, NULL, 'Três Alianças')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12668, 4, 'BR', NULL, NULL, 'Três Fronteiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12669, 4, 'BR', NULL, NULL, 'Três Pontes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12670, 4, 'BR', NULL, NULL, 'Três Vendas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12671, 4, 'BR', NULL, NULL, 'Tuiuti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12672, 4, 'BR', NULL, NULL, 'Tujuguaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12673, 4, 'BR', NULL, NULL, 'Tupi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12674, 4, 'BR', NULL, NULL, 'Tupi Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12675, 4, 'BR', NULL, NULL, 'Tupã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12676, 4, 'BR', NULL, NULL, 'Turiba do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12677, 4, 'BR', NULL, NULL, 'Turiúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12678, 4, 'BR', NULL, NULL, 'Turmalina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12679, 4, 'BR', NULL, NULL, 'Turvínia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12680, 4, 'BR', NULL, NULL, 'Ubarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12681, 4, 'BR', NULL, NULL, 'Ubatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12682, 4, 'BR', NULL, NULL, 'Ubirajara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12683, 4, 'BR', NULL, NULL, 'Uchoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12684, 4, 'BR', NULL, NULL, 'Universo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12685, 4, 'BR', NULL, NULL, 'União Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12686, 4, 'BR', NULL, NULL, 'Uru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12687, 4, 'BR', NULL, NULL, 'Urupês')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12688, 4, 'BR', NULL, NULL, 'Ururai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12689, 4, 'BR', NULL, NULL, 'Urânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12690, 4, 'BR', NULL, NULL, 'Utinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12691, 4, 'BR', NULL, NULL, 'Vale Formoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12692, 4, 'BR', NULL, NULL, 'Valentim Gentil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12693, 4, 'BR', NULL, NULL, 'Valinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12694, 4, 'BR', NULL, NULL, 'Valparaíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12695, 4, 'BR', NULL, NULL, 'Vanglória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12696, 4, 'BR', NULL, NULL, 'Vargem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12697, 4, 'BR', NULL, NULL, 'Vargem Grande Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12698, 4, 'BR', NULL, NULL, 'Vargem Grande do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12699, 4, 'BR', NULL, NULL, 'Varpa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12700, 4, 'BR', NULL, NULL, 'Venda Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12701, 4, 'BR', NULL, NULL, 'Vera Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12702, 4, 'BR', NULL, NULL, 'Vicente de Carvalho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12703, 4, 'BR', NULL, NULL, 'Vicentinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12704, 4, 'BR', NULL, NULL, 'Vila Dirce')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12705, 4, 'BR', NULL, NULL, 'Vila Nery')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12706, 4, 'BR', NULL, NULL, 'Vila Xavier')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12707, 4, 'BR', NULL, NULL, 'Vinhedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12708, 4, 'BR', NULL, NULL, 'Viradouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12709, 4, 'BR', NULL, NULL, 'Vista Alegre do Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12710, 4, 'BR', NULL, NULL, 'Vitoriana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12711, 4, 'BR', NULL, NULL, 'Vitória Brasil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12712, 4, 'BR', NULL, NULL, 'Votorantim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12713, 4, 'BR', NULL, NULL, 'Votuporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12714, 4, 'BR', NULL, NULL, 'Várzea Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12715, 4, 'BR', NULL, NULL, 'Zacarias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12716, 4, 'BR', NULL, NULL, 'Água Vermelha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12717, 4, 'BR', NULL, NULL, 'Águas da Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12718, 4, 'BR', NULL, NULL, 'Águas de Lindóia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12719, 4, 'BR', NULL, NULL, 'Águas de Santa Bárbara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12720, 4, 'BR', NULL, NULL, 'Águas de São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12721, 4, 'BR', NULL, NULL, 'Álvares Florence')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12722, 4, 'BR', NULL, NULL, 'Álvares Machado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12723, 4, 'BR', NULL, NULL, 'Álvaro de Carvalho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12724, 4, 'BR', NULL, NULL, 'Óleo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12725, 6, 'BR', NULL, NULL, 'Abarracamento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12726, 6, 'BR', NULL, NULL, 'Afonso Arinos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12727, 6, 'BR', NULL, NULL, 'Agulhas Negras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12728, 6, 'BR', NULL, NULL, 'Amparo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12729, 6, 'BR', NULL, NULL, 'Andrade Pinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12730, 6, 'BR', NULL, NULL, 'Angra dos Reis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12731, 6, 'BR', NULL, NULL, 'Anta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12732, 6, 'BR', NULL, NULL, 'Aperibé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12733, 6, 'BR', NULL, NULL, 'Araruama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12734, 6, 'BR', NULL, NULL, 'Areal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12735, 6, 'BR', NULL, NULL, 'Armação dos Búzios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12736, 6, 'BR', NULL, NULL, 'Arraial do Cabo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12737, 6, 'BR', NULL, NULL, 'Arrozal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12738, 6, 'BR', NULL, NULL, 'Avelar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12739, 6, 'BR', NULL, NULL, 'Bacaxá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12740, 6, 'BR', NULL, NULL, 'Baltazar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12741, 6, 'BR', NULL, NULL, 'Banquete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12742, 6, 'BR', NULL, NULL, 'Barcelos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12743, 6, 'BR', NULL, NULL, 'Barra Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12744, 6, 'BR', NULL, NULL, 'Barra Mansa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12745, 6, 'BR', NULL, NULL, 'Barra Seca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12746, 6, 'BR', NULL, NULL, 'Barra de Macaé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12747, 6, 'BR', NULL, NULL, 'Barra de São João')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12748, 6, 'BR', NULL, NULL, 'Barra do Piraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12749, 6, 'BR', NULL, NULL, 'Barão de Juparana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12750, 6, 'BR', NULL, NULL, 'Batatal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12751, 6, 'BR', NULL, NULL, 'Belford Roxo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12752, 6, 'BR', NULL, NULL, 'Bemposta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12753, 6, 'BR', NULL, NULL, 'Boa Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12754, 6, 'BR', NULL, NULL, 'Boa Sorte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12755, 6, 'BR', NULL, NULL, 'Boa Ventura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12756, 6, 'BR', NULL, NULL, 'Bom Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12757, 6, 'BR', NULL, NULL, 'Bom Jesus do Itabapoana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12758, 6, 'BR', NULL, NULL, 'Bom Jesus do Querendo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12759, 6, 'BR', NULL, NULL, 'Cabo Frio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12760, 6, 'BR', NULL, NULL, 'Cabuçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12761, 6, 'BR', NULL, NULL, 'Cachoeiras de Macacu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12762, 6, 'BR', NULL, NULL, 'Cachoeiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12763, 6, 'BR', NULL, NULL, 'Calheiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12764, 6, 'BR', NULL, NULL, 'Cambiasca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12765, 6, 'BR', NULL, NULL, 'Cambuci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12766, 6, 'BR', NULL, NULL, 'Campo do Coelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12767, 6, 'BR', NULL, NULL, 'Campos Elíseos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12768, 6, 'BR', NULL, NULL, 'Campos dos Goytacazes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12769, 6, 'BR', NULL, NULL, 'Cantagalo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12770, 6, 'BR', NULL, NULL, 'Carabuçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12771, 6, 'BR', NULL, NULL, 'Carapebus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12772, 6, 'BR', NULL, NULL, 'Cardoso Moreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12773, 6, 'BR', NULL, NULL, 'Carmo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12774, 6, 'BR', NULL, NULL, 'Cascatinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12775, 6, 'BR', NULL, NULL, 'Casimiro de Abreu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12776, 6, 'BR', NULL, NULL, 'Cava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12777, 6, 'BR', NULL, NULL, 'Coelho da Rocha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12778, 6, 'BR', NULL, NULL, 'Colônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12779, 6, 'BR', NULL, NULL, 'Comendador Levy Gasparian')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12780, 6, 'BR', NULL, NULL, 'Comendador Venâncio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12781, 6, 'BR', NULL, NULL, 'Conceição de Jacareí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12782, 6, 'BR', NULL, NULL, 'Conceição de Macabu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12783, 6, 'BR', NULL, NULL, 'Conrado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12784, 6, 'BR', NULL, NULL, 'Conselheiro Paulino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12785, 6, 'BR', NULL, NULL, 'Conservatória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12786, 6, 'BR', NULL, NULL, 'Cordeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12787, 6, 'BR', NULL, NULL, 'Coroa Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12788, 6, 'BR', NULL, NULL, 'Correas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12789, 6, 'BR', NULL, NULL, 'Correntezas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12790, 6, 'BR', NULL, NULL, 'Cunhambebe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12791, 6, 'BR', NULL, NULL, 'Córrego da Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12792, 6, 'BR', NULL, NULL, 'Córrego do Ouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12793, 6, 'BR', NULL, NULL, 'Dores de Macabu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12794, 6, 'BR', NULL, NULL, 'Dorândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12795, 6, 'BR', NULL, NULL, 'Doutor Elias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12796, 6, 'BR', NULL, NULL, 'Doutor Loreti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12797, 6, 'BR', NULL, NULL, 'Duas Barras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12798, 6, 'BR', NULL, NULL, 'Duque de Caxias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12799, 6, 'BR', NULL, NULL, 'Engenheiro Passos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12800, 6, 'BR', NULL, NULL, 'Engenheiro Paulo de Frontin')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12801, 6, 'BR', NULL, NULL, 'Engenheiro Pedreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12802, 6, 'BR', NULL, NULL, 'Estrada Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12803, 6, 'BR', NULL, NULL, 'Euclidelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12804, 6, 'BR', NULL, NULL, 'Falcão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12805, 6, 'BR', NULL, NULL, 'Floriano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12806, 6, 'BR', NULL, NULL, 'Fumaça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12807, 6, 'BR', NULL, NULL, 'Funil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12808, 6, 'BR', NULL, NULL, 'Gaviões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12809, 6, 'BR', NULL, NULL, 'Getulândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12810, 6, 'BR', NULL, NULL, 'Glicério')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12811, 6, 'BR', NULL, NULL, 'Goitacazes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12812, 6, 'BR', NULL, NULL, 'Governador Portela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12813, 6, 'BR', NULL, NULL, 'Guapimirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12814, 6, 'BR', NULL, NULL, 'Guia de Pacobaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12815, 6, 'BR', NULL, NULL, 'Ibitiguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12816, 6, 'BR', NULL, NULL, 'Ibitioca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12817, 6, 'BR', NULL, NULL, 'Ibituporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12818, 6, 'BR', NULL, NULL, 'Iguaba Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12819, 6, 'BR', NULL, NULL, 'Ilha Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12820, 6, 'BR', NULL, NULL, 'Imbariê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12821, 6, 'BR', NULL, NULL, 'Inconfidência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12822, 6, 'BR', NULL, NULL, 'Inhomirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12823, 6, 'BR', NULL, NULL, 'Inoã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12824, 6, 'BR', NULL, NULL, 'Ipiabás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12825, 6, 'BR', NULL, NULL, 'Ipiiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12826, 6, 'BR', NULL, NULL, 'Ipituna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12827, 6, 'BR', NULL, NULL, 'Ipuca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12828, 6, 'BR', NULL, NULL, 'Itabapoana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12829, 6, 'BR', NULL, NULL, 'Itaboraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12830, 6, 'BR', NULL, NULL, 'Itacurussá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12831, 6, 'BR', NULL, NULL, 'Itaguaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12832, 6, 'BR', NULL, NULL, 'Itaipava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12833, 6, 'BR', NULL, NULL, 'Itaipu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12834, 6, 'BR', NULL, NULL, 'Itajara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12835, 6, 'BR', NULL, NULL, 'Italva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12836, 6, 'BR', NULL, NULL, 'Itambi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12837, 6, 'BR', NULL, NULL, 'Itaocara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12838, 6, 'BR', NULL, NULL, 'Itaperuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12839, 6, 'BR', NULL, NULL, 'Itatiaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12840, 6, 'BR', NULL, NULL, 'Jaguarembé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12841, 6, 'BR', NULL, NULL, 'Jamapará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12842, 6, 'BR', NULL, NULL, 'Japeri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12843, 6, 'BR', NULL, NULL, 'Japuíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12844, 6, 'BR', NULL, NULL, 'Laje do Muriaé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12845, 6, 'BR', NULL, NULL, 'Laranjais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12846, 6, 'BR', NULL, NULL, 'Lumiar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12847, 6, 'BR', NULL, NULL, 'Lídice')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12848, 6, 'BR', NULL, NULL, 'Macabuzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12849, 6, 'BR', NULL, NULL, 'Macaé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12850, 6, 'BR', NULL, NULL, 'Macuco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12851, 6, 'BR', NULL, NULL, 'Magé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12852, 6, 'BR', NULL, NULL, 'Mambucaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12853, 6, 'BR', NULL, NULL, 'Mangaratiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12854, 6, 'BR', NULL, NULL, 'Maniva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12855, 6, 'BR', NULL, NULL, 'Manoel Ribeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12856, 6, 'BR', NULL, NULL, 'Manuel Duarte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12857, 6, 'BR', NULL, NULL, 'Marangatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12858, 6, 'BR', NULL, NULL, 'Maricá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12859, 6, 'BR', NULL, NULL, 'Mendes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12860, 6, 'BR', NULL, NULL, 'Mesquita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12861, 6, 'BR', NULL, NULL, 'Miguel Pereira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12862, 6, 'BR', NULL, NULL, 'Miracema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12863, 6, 'BR', NULL, NULL, 'Monjolo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12864, 6, 'BR', NULL, NULL, 'Monnerat')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12865, 6, 'BR', NULL, NULL, 'Monte Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12866, 6, 'BR', NULL, NULL, 'Monte Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12867, 6, 'BR', NULL, NULL, 'Monumento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12868, 6, 'BR', NULL, NULL, 'Morangaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12869, 6, 'BR', NULL, NULL, 'Morro Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12870, 6, 'BR', NULL, NULL, 'Morro do Côco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12871, 6, 'BR', NULL, NULL, 'Mussurepe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12872, 6, 'BR', NULL, NULL, 'Natividade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12873, 6, 'BR', NULL, NULL, 'Neves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12874, 6, 'BR', NULL, NULL, 'Nhunguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12875, 6, 'BR', NULL, NULL, 'Nilópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12876, 6, 'BR', NULL, NULL, 'Niterói')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12877, 6, 'BR', NULL, NULL, 'Nossa Senhora da Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12878, 6, 'BR', NULL, NULL, 'Nossa Senhora da Penha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12879, 6, 'BR', NULL, NULL, 'Nossa Senhora do Amparo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12880, 6, 'BR', NULL, NULL, 'Nova Friburgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12881, 6, 'BR', NULL, NULL, 'Nova Iguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12882, 6, 'BR', NULL, NULL, 'Olinda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12883, 6, 'BR', NULL, NULL, 'Ourânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12884, 6, 'BR', NULL, NULL, 'Papucaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12885, 6, 'BR', NULL, NULL, 'Paquequer Pequeno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12886, 6, 'BR', NULL, NULL, 'Paracambi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12887, 6, 'BR', NULL, NULL, 'Paraoquena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12888, 6, 'BR', NULL, NULL, 'Parapeúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12889, 6, 'BR', NULL, NULL, 'Parati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12890, 6, 'BR', NULL, NULL, 'Parati Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12891, 6, 'BR', NULL, NULL, 'Paraíba do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12892, 6, 'BR', NULL, NULL, 'Paraíso do Tobias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12893, 6, 'BR', NULL, NULL, 'Passa Três')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12894, 6, 'BR', NULL, NULL, 'Paty do Alferes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12895, 6, 'BR', NULL, NULL, 'Pedra Selada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12896, 6, 'BR', NULL, NULL, 'Pedro do Rio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12897, 6, 'BR', NULL, NULL, 'Penedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12898, 6, 'BR', NULL, NULL, 'Pentagna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12899, 6, 'BR', NULL, NULL, 'Petrópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12900, 6, 'BR', NULL, NULL, 'Piabetá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12901, 6, 'BR', NULL, NULL, 'Pinheiral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12902, 6, 'BR', NULL, NULL, 'Pipeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12903, 6, 'BR', NULL, NULL, 'Pirangaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12904, 6, 'BR', NULL, NULL, 'Pirapetinga de Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12905, 6, 'BR', NULL, NULL, 'Piraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12906, 6, 'BR', NULL, NULL, 'Pião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12907, 6, 'BR', NULL, NULL, 'Porciúncula')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12908, 6, 'BR', NULL, NULL, 'Portela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12909, 6, 'BR', NULL, NULL, 'Porto Real')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12910, 6, 'BR', NULL, NULL, 'Porto Velho do Cunha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12911, 6, 'BR', NULL, NULL, 'Porto das Caixas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12912, 6, 'BR', NULL, NULL, 'Posse')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12913, 6, 'BR', NULL, NULL, 'Pureza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12914, 6, 'BR', NULL, NULL, 'Purilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12915, 6, 'BR', NULL, NULL, 'Quartéis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12916, 6, 'BR', NULL, NULL, 'Quatis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12917, 6, 'BR', NULL, NULL, 'Queimados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12918, 6, 'BR', NULL, NULL, 'Quissamã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12919, 6, 'BR', NULL, NULL, 'Raposo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12920, 6, 'BR', NULL, NULL, 'Renascença')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12921, 6, 'BR', NULL, NULL, 'Resende')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12922, 6, 'BR', NULL, NULL, 'Retiro do Muriaé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12923, 6, 'BR', NULL, NULL, 'Rialto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12924, 6, 'BR', NULL, NULL, 'Ribeirão de São Joaquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12925, 6, 'BR', NULL, NULL, 'Rio Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12926, 6, 'BR', NULL, NULL, 'Rio Claro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12927, 6, 'BR', NULL, NULL, 'Rio das Flores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12928, 6, 'BR', NULL, NULL, 'Rio das Ostras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12929, 6, 'BR', NULL, NULL, 'Riograndina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12930, 6, 'BR', NULL, NULL, 'Rosal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12931, 6, 'BR', NULL, NULL, 'Sacra Família do Tinguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12932, 6, 'BR', NULL, NULL, 'Salutaris')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12933, 6, 'BR', NULL, NULL, 'Sambaetiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12934, 6, 'BR', NULL, NULL, 'Sampaio Correia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12935, 6, 'BR', NULL, NULL, 'Sana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12936, 6, 'BR', NULL, NULL, 'Santa Clara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12937, 6, 'BR', NULL, NULL, 'Santa Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12938, 6, 'BR', NULL, NULL, 'Santa Cruz da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12939, 6, 'BR', NULL, NULL, 'Santa Isabel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12940, 6, 'BR', NULL, NULL, 'Santa Isabel do Rio Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12941, 6, 'BR', NULL, NULL, 'Santa Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12942, 6, 'BR', NULL, NULL, 'Santa Maria Madalena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12943, 6, 'BR', NULL, NULL, 'Santa Rita da Floresta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12944, 6, 'BR', NULL, NULL, 'Santanésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12945, 6, 'BR', NULL, NULL, 'Santo Aleixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12946, 6, 'BR', NULL, NULL, 'Santo Amaro de Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12947, 6, 'BR', NULL, NULL, 'Santo Antônio de Pádua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12948, 6, 'BR', NULL, NULL, 'Santo Antônio do Imbé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12949, 6, 'BR', NULL, NULL, 'Santo Eduardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12950, 6, 'BR', NULL, NULL, 'Sapucaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12951, 6, 'BR', NULL, NULL, 'Saquarema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12952, 6, 'BR', NULL, NULL, 'Saracuruna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12953, 6, 'BR', NULL, NULL, 'Sebastião de Lacerda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12954, 6, 'BR', NULL, NULL, 'Seropédica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12955, 6, 'BR', NULL, NULL, 'Serrinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12956, 6, 'BR', NULL, NULL, 'Sete Pontes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12957, 6, 'BR', NULL, NULL, 'Silva Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12958, 6, 'BR', NULL, NULL, 'Sodrelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12959, 6, 'BR', NULL, NULL, 'Sossego')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12960, 6, 'BR', NULL, NULL, 'Subaio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12961, 6, 'BR', NULL, NULL, 'Sumidouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12962, 6, 'BR', NULL, NULL, 'Suruí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12963, 6, 'BR', NULL, NULL, 'São Fidélis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12964, 6, 'BR', NULL, NULL, 'São Francisco de Itabapoana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12965, 6, 'BR', NULL, NULL, 'São Gonçalo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12966, 6, 'BR', NULL, NULL, 'São Joaquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12967, 6, 'BR', NULL, NULL, 'São José de Ubá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12968, 6, 'BR', NULL, NULL, 'São José do Ribeirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12969, 6, 'BR', NULL, NULL, 'São José do Turvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12970, 6, 'BR', NULL, NULL, 'São José do Vale do Rio Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12971, 6, 'BR', NULL, NULL, 'São João Marcos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12972, 6, 'BR', NULL, NULL, 'São João da Barra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12973, 6, 'BR', NULL, NULL, 'São João de Meriti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12974, 6, 'BR', NULL, NULL, 'São João do Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12975, 6, 'BR', NULL, NULL, 'São Mateus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12976, 6, 'BR', NULL, NULL, 'São Pedro da Aldeia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12977, 6, 'BR', NULL, NULL, 'São Pedro da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12978, 6, 'BR', NULL, NULL, 'São Sebastião de Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12979, 6, 'BR', NULL, NULL, 'São Sebastião do Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12980, 6, 'BR', NULL, NULL, 'São Sebastião do Paraíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12981, 6, 'BR', NULL, NULL, 'São Sebastião dos Ferreiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12982, 6, 'BR', NULL, NULL, 'São Vicente de Paula')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12983, 6, 'BR', NULL, NULL, 'Taboas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12984, 6, 'BR', NULL, NULL, 'Tamoios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12985, 6, 'BR', NULL, NULL, 'Tanguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12986, 6, 'BR', NULL, NULL, 'Tapera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12987, 6, 'BR', NULL, NULL, 'Tarituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12988, 6, 'BR', NULL, NULL, 'Teresópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12989, 6, 'BR', NULL, NULL, 'Tocos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12990, 6, 'BR', NULL, NULL, 'Trajano de Morais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12991, 6, 'BR', NULL, NULL, 'Travessão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12992, 6, 'BR', NULL, NULL, 'Triunfo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12993, 6, 'BR', NULL, NULL, 'Três Irmãos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12994, 6, 'BR', NULL, NULL, 'Três Rios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12995, 6, 'BR', NULL, NULL, 'Valença')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12996, 6, 'BR', NULL, NULL, 'Valão do Barro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12997, 6, 'BR', NULL, NULL, 'Vargem Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12998, 6, 'BR', NULL, NULL, 'Varre-Sai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (12999, 6, 'BR', NULL, NULL, 'Vassouras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13000, 6, 'BR', NULL, NULL, 'Venda das Flores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13001, 6, 'BR', NULL, NULL, 'Venda das Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13002, 6, 'BR', NULL, NULL, 'Vila Muriqui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13003, 6, 'BR', NULL, NULL, 'Vila Nova de Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13004, 6, 'BR', NULL, NULL, 'Vila da Grama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13005, 6, 'BR', NULL, NULL, 'Visconde de Imbé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13006, 6, 'BR', NULL, NULL, 'Volta Redonda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13007, 6, 'BR', NULL, NULL, 'Werneck')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13008, 6, 'BR', NULL, NULL, 'Xerém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13009, 10, 'BR', NULL, NULL, 'Aceguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13010, 10, 'BR', NULL, NULL, 'Afonso Rodrigues')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13011, 10, 'BR', NULL, NULL, 'Agudo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13012, 10, 'BR', NULL, NULL, 'Ajuricaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13013, 10, 'BR', NULL, NULL, 'Albardão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13014, 10, 'BR', NULL, NULL, 'Alecrim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13015, 10, 'BR', NULL, NULL, 'Alegrete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13016, 10, 'BR', NULL, NULL, 'Alegria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13017, 10, 'BR', NULL, NULL, 'Alfredo Brenner')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13018, 10, 'BR', NULL, NULL, 'Almirante Tamandaré do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13019, 10, 'BR', NULL, NULL, 'Alpestre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13020, 10, 'BR', NULL, NULL, 'Alto Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13021, 10, 'BR', NULL, NULL, 'Alto Feliz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13022, 10, 'BR', NULL, NULL, 'Alto Paredão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13023, 10, 'BR', NULL, NULL, 'Alto Recreio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13024, 10, 'BR', NULL, NULL, 'Alto Uruguai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13025, 10, 'BR', NULL, NULL, 'Alto da União')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13026, 10, 'BR', NULL, NULL, 'Alvorada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13027, 10, 'BR', NULL, NULL, 'Amaral Ferrador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13028, 10, 'BR', NULL, NULL, 'Ametista do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13029, 10, 'BR', NULL, NULL, 'André da Rocha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13030, 10, 'BR', NULL, NULL, 'Anta Gorda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13031, 10, 'BR', NULL, NULL, 'Antônio Kerpel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13032, 10, 'BR', NULL, NULL, 'Antônio Prado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13033, 10, 'BR', NULL, NULL, 'Arambaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13034, 10, 'BR', NULL, NULL, 'Araricá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13035, 10, 'BR', NULL, NULL, 'Aratiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13036, 10, 'BR', NULL, NULL, 'Arco Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13037, 10, 'BR', NULL, NULL, 'Arco-Íris')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13038, 10, 'BR', NULL, NULL, 'Arroio Canoas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13039, 10, 'BR', NULL, NULL, 'Arroio Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13040, 10, 'BR', NULL, NULL, 'Arroio do Meio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13041, 10, 'BR', NULL, NULL, 'Arroio do Padre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13042, 10, 'BR', NULL, NULL, 'Arroio do Sal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13043, 10, 'BR', NULL, NULL, 'Arroio do Só')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13044, 10, 'BR', NULL, NULL, 'Arroio do Tigre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13045, 10, 'BR', NULL, NULL, 'Arroio dos Ratos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13046, 10, 'BR', NULL, NULL, 'Arvorezinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13047, 10, 'BR', NULL, NULL, 'Atafona')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13048, 10, 'BR', NULL, NULL, 'Atiaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13049, 10, 'BR', NULL, NULL, 'Augusto Pestana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13050, 10, 'BR', NULL, NULL, 'Avelino Paranhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13051, 10, 'BR', NULL, NULL, 'Azevedo Sodré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13052, 10, 'BR', NULL, NULL, 'Bacupari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13053, 10, 'BR', NULL, NULL, 'Bagé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13054, 10, 'BR', NULL, NULL, 'Baliza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13055, 10, 'BR', NULL, NULL, 'Balneário Pinhal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13056, 10, 'BR', NULL, NULL, 'Banhado do Colégio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13057, 10, 'BR', NULL, NULL, 'Barra Funda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13058, 10, 'BR', NULL, NULL, 'Barra do Guarita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13059, 10, 'BR', NULL, NULL, 'Barra do Ouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13060, 10, 'BR', NULL, NULL, 'Barra do Quaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13061, 10, 'BR', NULL, NULL, 'Barra do Ribeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13062, 10, 'BR', NULL, NULL, 'Barra do Rio Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13063, 10, 'BR', NULL, NULL, 'Barracão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13064, 10, 'BR', NULL, NULL, 'Barreirinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13065, 10, 'BR', NULL, NULL, 'Barreiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13066, 10, 'BR', NULL, NULL, 'Barro Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13067, 10, 'BR', NULL, NULL, 'Barro Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13068, 10, 'BR', NULL, NULL, 'Barros Cassal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13069, 10, 'BR', NULL, NULL, 'Barão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13070, 10, 'BR', NULL, NULL, 'Barão de Cotegipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13071, 10, 'BR', NULL, NULL, 'Barão do Triunfo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13072, 10, 'BR', NULL, NULL, 'Basílio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13073, 10, 'BR', NULL, NULL, 'Bela Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13074, 10, 'BR', NULL, NULL, 'Beluno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13075, 10, 'BR', NULL, NULL, 'Benjamin Constant do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13076, 10, 'BR', NULL, NULL, 'Bento Gonçalves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13077, 10, 'BR', NULL, NULL, 'Bexiga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13078, 10, 'BR', NULL, NULL, 'Boa Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13079, 10, 'BR', NULL, NULL, 'Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13080, 10, 'BR', NULL, NULL, 'Boa Vista das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13081, 10, 'BR', NULL, NULL, 'Boa Vista do Buricá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13082, 10, 'BR', NULL, NULL, 'Boa Vista do Cadeado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13083, 10, 'BR', NULL, NULL, 'Boa Vista do Incra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13084, 10, 'BR', NULL, NULL, 'Boa Vista do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13085, 10, 'BR', NULL, NULL, 'Boca do Monte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13086, 10, 'BR', NULL, NULL, 'Boi Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13087, 10, 'BR', NULL, NULL, 'Bojuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13088, 10, 'BR', NULL, NULL, 'Bom Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13089, 10, 'BR', NULL, NULL, 'Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13090, 10, 'BR', NULL, NULL, 'Bom Princípio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13091, 10, 'BR', NULL, NULL, 'Bom Progresso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13092, 10, 'BR', NULL, NULL, 'Bom Retiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13093, 10, 'BR', NULL, NULL, 'Bom Retiro do Guaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13094, 10, 'BR', NULL, NULL, 'Bom Retiro do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13095, 10, 'BR', NULL, NULL, 'Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13096, 10, 'BR', NULL, NULL, 'Boqueirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13097, 10, 'BR', NULL, NULL, 'Boqueirão do Leão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13098, 10, 'BR', NULL, NULL, 'Bororé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13099, 10, 'BR', NULL, NULL, 'Bossoroca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13100, 10, 'BR', NULL, NULL, 'Botucaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13101, 10, 'BR', NULL, NULL, 'Bozano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13102, 10, 'BR', NULL, NULL, 'Braga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13103, 10, 'BR', NULL, NULL, 'Brochier')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13104, 10, 'BR', NULL, NULL, 'Buriti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13105, 10, 'BR', NULL, NULL, 'Butiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13106, 10, 'BR', NULL, NULL, 'Butiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13107, 10, 'BR', NULL, NULL, 'Cacequi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13108, 10, 'BR', NULL, NULL, 'Cachoeira do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13109, 10, 'BR', NULL, NULL, 'Cachoeirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13110, 10, 'BR', NULL, NULL, 'Cacique Doble')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13111, 10, 'BR', NULL, NULL, 'Cadorna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13112, 10, 'BR', NULL, NULL, 'Caibaté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13113, 10, 'BR', NULL, NULL, 'Caiçara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13114, 10, 'BR', NULL, NULL, 'Camaquã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13115, 10, 'BR', NULL, NULL, 'Camargo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13116, 10, 'BR', NULL, NULL, 'Cambará do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13117, 10, 'BR', NULL, NULL, 'Camobi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13118, 10, 'BR', NULL, NULL, 'Campestre Baixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13119, 10, 'BR', NULL, NULL, 'Campestre da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13120, 10, 'BR', NULL, NULL, 'Campina Redonda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13121, 10, 'BR', NULL, NULL, 'Campina das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13122, 10, 'BR', NULL, NULL, 'Campinas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13123, 10, 'BR', NULL, NULL, 'Campinas do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13124, 10, 'BR', NULL, NULL, 'Campo Bom')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13125, 10, 'BR', NULL, NULL, 'Campo Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13126, 10, 'BR', NULL, NULL, 'Campo Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13127, 10, 'BR', NULL, NULL, 'Campo Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13128, 10, 'BR', NULL, NULL, 'Campo Seco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13129, 10, 'BR', NULL, NULL, 'Campo Vicente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13130, 10, 'BR', NULL, NULL, 'Campo do Meio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13131, 10, 'BR', NULL, NULL, 'Campos Borges')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13132, 10, 'BR', NULL, NULL, 'Candelária')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13133, 10, 'BR', NULL, NULL, 'Candiota')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13134, 10, 'BR', NULL, NULL, 'Canela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13135, 10, 'BR', NULL, NULL, 'Canguçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13136, 10, 'BR', NULL, NULL, 'Canhembora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13137, 10, 'BR', NULL, NULL, 'Canoas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13138, 10, 'BR', NULL, NULL, 'Canudos do Vale')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13139, 10, 'BR', NULL, NULL, 'Capané')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13140, 10, 'BR', NULL, NULL, 'Capela Velha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13141, 10, 'BR', NULL, NULL, 'Capela de Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13142, 10, 'BR', NULL, NULL, 'Capinzal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13143, 10, 'BR', NULL, NULL, 'Capitão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13144, 10, 'BR', NULL, NULL, 'Capivari do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13145, 10, 'BR', NULL, NULL, 'Capivarita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13146, 10, 'BR', NULL, NULL, 'Capo-Erê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13147, 10, 'BR', NULL, NULL, 'Capoeira Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13148, 10, 'BR', NULL, NULL, 'Capão Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13149, 10, 'BR', NULL, NULL, 'Capão Bonito do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13150, 10, 'BR', NULL, NULL, 'Capão Comprido')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13151, 10, 'BR', NULL, NULL, 'Capão da Canoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13152, 10, 'BR', NULL, NULL, 'Capão da Porteira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13153, 10, 'BR', NULL, NULL, 'Capão do Cedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13154, 10, 'BR', NULL, NULL, 'Capão do Cipó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13155, 10, 'BR', NULL, NULL, 'Capão do Leão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13156, 10, 'BR', NULL, NULL, 'Carajá Seival')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13157, 10, 'BR', NULL, NULL, 'Carazinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13158, 10, 'BR', NULL, NULL, 'Caraá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13159, 10, 'BR', NULL, NULL, 'Carlos Barbosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13160, 10, 'BR', NULL, NULL, 'Carlos Gomes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13161, 10, 'BR', NULL, NULL, 'Carovi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13162, 10, 'BR', NULL, NULL, 'Casca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13163, 10, 'BR', NULL, NULL, 'Cascata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13164, 10, 'BR', NULL, NULL, 'Caseiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13165, 10, 'BR', NULL, NULL, 'Castelinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13166, 10, 'BR', NULL, NULL, 'Catuípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13167, 10, 'BR', NULL, NULL, 'Cavajureta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13168, 10, 'BR', NULL, NULL, 'Caverá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13169, 10, 'BR', NULL, NULL, 'Caxias do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13170, 10, 'BR', NULL, NULL, 'Cazuza Ferreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13171, 10, 'BR', NULL, NULL, 'Caçapava do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13172, 10, 'BR', NULL, NULL, 'Cedro Marcado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13173, 10, 'BR', NULL, NULL, 'Centenário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13174, 10, 'BR', NULL, NULL, 'Centro Linha Brasil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13175, 10, 'BR', NULL, NULL, 'Cerrito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13176, 10, 'BR', NULL, NULL, 'Cerrito Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13177, 10, 'BR', NULL, NULL, 'Cerrito do Ouro ou Vila do Cerrito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13178, 10, 'BR', NULL, NULL, 'Cerro Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13179, 10, 'BR', NULL, NULL, 'Cerro Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13180, 10, 'BR', NULL, NULL, 'Cerro Claro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13181, 10, 'BR', NULL, NULL, 'Cerro Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13182, 10, 'BR', NULL, NULL, 'Cerro Grande do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13183, 10, 'BR', NULL, NULL, 'Cerro Largo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13184, 10, 'BR', NULL, NULL, 'Cerro do Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13185, 10, 'BR', NULL, NULL, 'Cerro do Roque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13186, 10, 'BR', NULL, NULL, 'Chapada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13187, 10, 'BR', NULL, NULL, 'Charqueadas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13188, 10, 'BR', NULL, NULL, 'Charrua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13189, 10, 'BR', NULL, NULL, 'Chiapetta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13190, 10, 'BR', NULL, NULL, 'Chicolomã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13191, 10, 'BR', NULL, NULL, 'Chimarrão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13192, 10, 'BR', NULL, NULL, 'Chorão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13193, 10, 'BR', NULL, NULL, 'Chuvisca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13194, 10, 'BR', NULL, NULL, 'Chuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13195, 10, 'BR', NULL, NULL, 'Cidreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13196, 10, 'BR', NULL, NULL, 'Cinqüentenário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13197, 10, 'BR', NULL, NULL, 'Ciríaco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13198, 10, 'BR', NULL, NULL, 'Clara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13199, 10, 'BR', NULL, NULL, 'Clemente Argolo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13200, 10, 'BR', NULL, NULL, 'Coimbra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13201, 10, 'BR', NULL, NULL, 'Colinas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13202, 10, 'BR', NULL, NULL, 'Coloninha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13203, 10, 'BR', NULL, NULL, 'Colorado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13204, 10, 'BR', NULL, NULL, 'Colônia Medeiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13205, 10, 'BR', NULL, NULL, 'Colônia Municipal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13206, 10, 'BR', NULL, NULL, 'Colônia Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13207, 10, 'BR', NULL, NULL, 'Colônia São João')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13208, 10, 'BR', NULL, NULL, 'Colônia Z-3')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13209, 10, 'BR', NULL, NULL, 'Colônia das Almas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13210, 10, 'BR', NULL, NULL, 'Comandai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13211, 10, 'BR', NULL, NULL, 'Condor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13212, 10, 'BR', NULL, NULL, 'Consolata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13213, 10, 'BR', NULL, NULL, 'Constantina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13214, 10, 'BR', NULL, NULL, 'Coqueiro Baixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13215, 10, 'BR', NULL, NULL, 'Coqueiros do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13216, 10, 'BR', NULL, NULL, 'Cordilheira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13217, 10, 'BR', NULL, NULL, 'Coroados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13218, 10, 'BR', NULL, NULL, 'Coronel Barros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13219, 10, 'BR', NULL, NULL, 'Coronel Bicaco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13220, 10, 'BR', NULL, NULL, 'Coronel Finzito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13221, 10, 'BR', NULL, NULL, 'Coronel Pilar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13222, 10, 'BR', NULL, NULL, 'Coronel Teixeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13223, 10, 'BR', NULL, NULL, 'Cortado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13224, 10, 'BR', NULL, NULL, 'Costa da Cadeia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13225, 10, 'BR', NULL, NULL, 'Costão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13226, 10, 'BR', NULL, NULL, 'Cotiporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13227, 10, 'BR', NULL, NULL, 'Coxilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13228, 10, 'BR', NULL, NULL, 'Coxilha Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13229, 10, 'BR', NULL, NULL, 'Cr-1')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13230, 10, 'BR', NULL, NULL, 'Crissiumal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13231, 10, 'BR', NULL, NULL, 'Cristal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13232, 10, 'BR', NULL, NULL, 'Cristal do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13233, 10, 'BR', NULL, NULL, 'Criúva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13234, 10, 'BR', NULL, NULL, 'Cruz Alta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13235, 10, 'BR', NULL, NULL, 'Cruzaltense')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13236, 10, 'BR', NULL, NULL, 'Cruzeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13237, 10, 'BR', NULL, NULL, 'Cruzeiro do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13238, 10, 'BR', NULL, NULL, 'Curral Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13239, 10, 'BR', NULL, NULL, 'Curumim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13240, 10, 'BR', NULL, NULL, 'Cândido Freire')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13241, 10, 'BR', NULL, NULL, 'Cândido Godói')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13242, 10, 'BR', NULL, NULL, 'Daltro Filho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13243, 10, 'BR', NULL, NULL, 'David Canabarro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13244, 10, 'BR', NULL, NULL, 'Delfina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13245, 10, 'BR', NULL, NULL, 'Deodoro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13246, 10, 'BR', NULL, NULL, 'Depósito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13247, 10, 'BR', NULL, NULL, 'Derrubadas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13248, 10, 'BR', NULL, NULL, 'Dezesseis de Novembro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13249, 10, 'BR', NULL, NULL, 'Dilermando de Aguiar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13250, 10, 'BR', NULL, NULL, 'Divino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13251, 10, 'BR', NULL, NULL, 'Dois Irmãos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13252, 10, 'BR', NULL, NULL, 'Dois Irmãos das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13253, 10, 'BR', NULL, NULL, 'Dois Lajeados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13254, 10, 'BR', NULL, NULL, 'Dom Feliciano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13255, 10, 'BR', NULL, NULL, 'Dom Pedrito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13256, 10, 'BR', NULL, NULL, 'Dom Pedro de Alcântara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13257, 10, 'BR', NULL, NULL, 'Dona Francisca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13258, 10, 'BR', NULL, NULL, 'Dona Otília')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13259, 10, 'BR', NULL, NULL, 'Dourado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13260, 10, 'BR', NULL, NULL, 'Doutor Edgardo Pereira Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13261, 10, 'BR', NULL, NULL, 'Doutor Maurício Cardoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13262, 10, 'BR', NULL, NULL, 'Doutor Ricardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13263, 10, 'BR', NULL, NULL, 'Dário Lassance')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13264, 10, 'BR', NULL, NULL, 'Eldorado do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13265, 10, 'BR', NULL, NULL, 'Eletra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13266, 10, 'BR', NULL, NULL, 'Encantado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13267, 10, 'BR', NULL, NULL, 'Encruzilhada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13268, 10, 'BR', NULL, NULL, 'Encruzilhada do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13269, 10, 'BR', NULL, NULL, 'Engenho Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13270, 10, 'BR', NULL, NULL, 'Entre Rios do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13271, 10, 'BR', NULL, NULL, 'Entre-Ijuís')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13272, 10, 'BR', NULL, NULL, 'Entrepelado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13273, 10, 'BR', NULL, NULL, 'Erebango')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13274, 10, 'BR', NULL, NULL, 'Erechim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13275, 10, 'BR', NULL, NULL, 'Ernestina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13276, 10, 'BR', NULL, NULL, 'Ernesto Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13277, 10, 'BR', NULL, NULL, 'Erval Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13278, 10, 'BR', NULL, NULL, 'Erval Seco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13279, 10, 'BR', NULL, NULL, 'Erveiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13280, 10, 'BR', NULL, NULL, 'Esmeralda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13281, 10, 'BR', NULL, NULL, 'Esperança do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13282, 10, 'BR', NULL, NULL, 'Espigão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13283, 10, 'BR', NULL, NULL, 'Espigão Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13284, 10, 'BR', NULL, NULL, 'Espinilho Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13285, 10, 'BR', NULL, NULL, 'Espumoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13286, 10, 'BR', NULL, NULL, 'Espírito Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13287, 10, 'BR', NULL, NULL, 'Esquina Araújo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13288, 10, 'BR', NULL, NULL, 'Esquina Bom Sucesso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13289, 10, 'BR', NULL, NULL, 'Esquina Gaúcha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13290, 10, 'BR', NULL, NULL, 'Esquina Ipiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13291, 10, 'BR', NULL, NULL, 'Esquina Piratini')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13292, 10, 'BR', NULL, NULL, 'Estação')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13293, 10, 'BR', NULL, NULL, 'Esteio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13294, 10, 'BR', NULL, NULL, 'Esteira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13295, 10, 'BR', NULL, NULL, 'Estreito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13296, 10, 'BR', NULL, NULL, 'Estrela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13297, 10, 'BR', NULL, NULL, 'Estrela Velha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13298, 10, 'BR', NULL, NULL, 'Estância Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13299, 10, 'BR', NULL, NULL, 'Estância Velha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13300, 10, 'BR', NULL, NULL, 'Eugênio de Castro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13301, 10, 'BR', NULL, NULL, 'Evangelista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13302, 10, 'BR', NULL, NULL, 'Fagundes Varela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13303, 10, 'BR', NULL, NULL, 'Faria Lemos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13304, 10, 'BR', NULL, NULL, 'Farinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13305, 10, 'BR', NULL, NULL, 'Farrapos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13306, 10, 'BR', NULL, NULL, 'Farroupilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13307, 10, 'BR', NULL, NULL, 'Faxinal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13308, 10, 'BR', NULL, NULL, 'Faxinal do Soturno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13309, 10, 'BR', NULL, NULL, 'Faxinalzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13310, 10, 'BR', NULL, NULL, 'Fazenda Fialho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13311, 10, 'BR', NULL, NULL, 'Fazenda Souza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13312, 10, 'BR', NULL, NULL, 'Fazenda Vilanova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13313, 10, 'BR', NULL, NULL, 'Feliz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13314, 10, 'BR', NULL, NULL, 'Ferreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13315, 10, 'BR', NULL, NULL, 'Flores da Cunha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13316, 10, 'BR', NULL, NULL, 'Floresta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13317, 10, 'BR', NULL, NULL, 'Floriano Peixoto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13318, 10, 'BR', NULL, NULL, 'Flórida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13319, 10, 'BR', NULL, NULL, 'Fontoura Xavier')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13320, 10, 'BR', NULL, NULL, 'Formigueiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13321, 10, 'BR', NULL, NULL, 'Formosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13322, 10, 'BR', NULL, NULL, 'Forninho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13323, 10, 'BR', NULL, NULL, 'Forquetinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13324, 10, 'BR', NULL, NULL, 'Fortaleza dos Valos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13325, 10, 'BR', NULL, NULL, 'Frederico Westphalen')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13326, 10, 'BR', NULL, NULL, 'Frei Sebastião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13327, 10, 'BR', NULL, NULL, 'Freire')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13328, 10, 'BR', NULL, NULL, 'Fão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13329, 10, 'BR', NULL, NULL, 'Garibaldi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13330, 10, 'BR', NULL, NULL, 'Garibaldina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13331, 10, 'BR', NULL, NULL, 'Garruchos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13332, 10, 'BR', NULL, NULL, 'Gaurama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13333, 10, 'BR', NULL, NULL, 'General Câmara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13334, 10, 'BR', NULL, NULL, 'Gentil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13335, 10, 'BR', NULL, NULL, 'Getúlio Vargas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13336, 10, 'BR', NULL, NULL, 'Giruá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13337, 10, 'BR', NULL, NULL, 'Glorinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13338, 10, 'BR', NULL, NULL, 'Glória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13339, 10, 'BR', NULL, NULL, 'Goio-En')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13340, 10, 'BR', NULL, NULL, 'Gramado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13341, 10, 'BR', NULL, NULL, 'Gramado São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13342, 10, 'BR', NULL, NULL, 'Gramado Xavier')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13343, 10, 'BR', NULL, NULL, 'Gramado dos Loureiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13344, 10, 'BR', NULL, NULL, 'Gravataí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13345, 10, 'BR', NULL, NULL, 'Guabiju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13346, 10, 'BR', NULL, NULL, 'Guajuviras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13347, 10, 'BR', NULL, NULL, 'Guaporé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13348, 10, 'BR', NULL, NULL, 'Guarani das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13349, 10, 'BR', NULL, NULL, 'Guassupi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13350, 10, 'BR', NULL, NULL, 'Guaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13351, 10, 'BR', NULL, NULL, 'Harmonia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13352, 10, 'BR', NULL, NULL, 'Herval')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13353, 10, 'BR', NULL, NULL, 'Herveiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13354, 10, 'BR', NULL, NULL, 'Hidráulica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13355, 10, 'BR', NULL, NULL, 'Horizontina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13356, 10, 'BR', NULL, NULL, 'Hulha Negra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13357, 10, 'BR', NULL, NULL, 'Humaitá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13358, 10, 'BR', NULL, NULL, 'Ibarama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13359, 10, 'BR', NULL, NULL, 'Ibaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13360, 10, 'BR', NULL, NULL, 'Ibiaçá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13361, 10, 'BR', NULL, NULL, 'Ibiraiaras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13362, 10, 'BR', NULL, NULL, 'Ibirapuitã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13363, 10, 'BR', NULL, NULL, 'Ibirubá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13364, 10, 'BR', NULL, NULL, 'Igrejinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13365, 10, 'BR', NULL, NULL, 'Ijucapirama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13366, 10, 'BR', NULL, NULL, 'Ijuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13367, 10, 'BR', NULL, NULL, 'Ilha dos Marinheiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13368, 10, 'BR', NULL, NULL, 'Ilópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13369, 10, 'BR', NULL, NULL, 'Imbé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13370, 10, 'BR', NULL, NULL, 'Imigrante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13371, 10, 'BR', NULL, NULL, 'Independência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13372, 10, 'BR', NULL, NULL, 'Inhacorá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13373, 10, 'BR', NULL, NULL, 'Ipiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13374, 10, 'BR', NULL, NULL, 'Ipiranga do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13375, 10, 'BR', NULL, NULL, 'Ipuaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13376, 10, 'BR', NULL, NULL, 'Ipê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13377, 10, 'BR', NULL, NULL, 'Iraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13378, 10, 'BR', NULL, NULL, 'Iruí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13379, 10, 'BR', NULL, NULL, 'Itaara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13380, 10, 'BR', NULL, NULL, 'Itacolomi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13381, 10, 'BR', NULL, NULL, 'Itacurubi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13382, 10, 'BR', NULL, NULL, 'Itaimbezinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13383, 10, 'BR', NULL, NULL, 'Itapucá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13384, 10, 'BR', NULL, NULL, 'Itapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13385, 10, 'BR', NULL, NULL, 'Itaqui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13386, 10, 'BR', NULL, NULL, 'Itati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13387, 10, 'BR', NULL, NULL, 'Itatiba do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13388, 10, 'BR', NULL, NULL, 'Itaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13389, 10, 'BR', NULL, NULL, 'Itaúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13390, 10, 'BR', NULL, NULL, 'Ituim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13391, 10, 'BR', NULL, NULL, 'Itão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13392, 10, 'BR', NULL, NULL, 'Ivaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13393, 10, 'BR', NULL, NULL, 'Ivorá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13394, 10, 'BR', NULL, NULL, 'Ivoti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13395, 10, 'BR', NULL, NULL, 'Jaboticaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13396, 10, 'BR', NULL, NULL, 'Jacuizinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13397, 10, 'BR', NULL, NULL, 'Jacutinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13398, 10, 'BR', NULL, NULL, 'Jaguarete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13399, 10, 'BR', NULL, NULL, 'Jaguari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13400, 10, 'BR', NULL, NULL, 'Jaguarão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13401, 10, 'BR', NULL, NULL, 'Jansen')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13402, 10, 'BR', NULL, NULL, 'Jaquirana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13403, 10, 'BR', NULL, NULL, 'Jari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13404, 10, 'BR', NULL, NULL, 'Jazidas ou Capela São Vicente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13405, 10, 'BR', NULL, NULL, 'José Otávio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13406, 10, 'BR', NULL, NULL, 'João Arregui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13407, 10, 'BR', NULL, NULL, 'João Rodrigues')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13408, 10, 'BR', NULL, NULL, 'Joça Tavares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13409, 10, 'BR', NULL, NULL, 'Juá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13410, 10, 'BR', NULL, NULL, 'Jóia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13411, 10, 'BR', NULL, NULL, 'Júlio de Castilhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13412, 10, 'BR', NULL, NULL, 'Lagoa Bonita do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13413, 10, 'BR', NULL, NULL, 'Lagoa Vermelha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13414, 10, 'BR', NULL, NULL, 'Lagoa dos Três Cantos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13415, 10, 'BR', NULL, NULL, 'Lagoão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13416, 10, 'BR', NULL, NULL, 'Lajeado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13417, 10, 'BR', NULL, NULL, 'Lajeado Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13418, 10, 'BR', NULL, NULL, 'Lajeado Cerne')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13419, 10, 'BR', NULL, NULL, 'Lajeado Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13420, 10, 'BR', NULL, NULL, 'Lajeado do Bugre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13421, 10, 'BR', NULL, NULL, 'Lara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13422, 10, 'BR', NULL, NULL, 'Laranjeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13423, 10, 'BR', NULL, NULL, 'Lava-Pés')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13424, 10, 'BR', NULL, NULL, 'Lavras do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13425, 10, 'BR', NULL, NULL, 'Leonel Rocha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13426, 10, 'BR', NULL, NULL, 'Liberato Salzano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13427, 10, 'BR', NULL, NULL, 'Lindolfo Collor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13428, 10, 'BR', NULL, NULL, 'Linha Comprida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13429, 10, 'BR', NULL, NULL, 'Linha Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13430, 10, 'BR', NULL, NULL, 'Linha Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13431, 10, 'BR', NULL, NULL, 'Loreto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13432, 10, 'BR', NULL, NULL, 'Machadinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13433, 10, 'BR', NULL, NULL, 'Magistério')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13434, 10, 'BR', NULL, NULL, 'Mampituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13435, 10, 'BR', NULL, NULL, 'Manchinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13436, 10, 'BR', NULL, NULL, 'Mangueiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13437, 10, 'BR', NULL, NULL, 'Manoel Viana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13438, 10, 'BR', NULL, NULL, 'Maquiné')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13439, 10, 'BR', NULL, NULL, 'Maratá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13440, 10, 'BR', NULL, NULL, 'Marau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13441, 10, 'BR', NULL, NULL, 'Marcelino Ramos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13442, 10, 'BR', NULL, NULL, 'Marcorama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13443, 10, 'BR', NULL, NULL, 'Mariana Pimentel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13444, 10, 'BR', NULL, NULL, 'Mariano Moro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13445, 10, 'BR', NULL, NULL, 'Mariante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13446, 10, 'BR', NULL, NULL, 'Mariápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13447, 10, 'BR', NULL, NULL, 'Marques de Souza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13448, 10, 'BR', NULL, NULL, 'Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13449, 10, 'BR', NULL, NULL, 'Matarazzo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13450, 10, 'BR', NULL, NULL, 'Mato Castelhano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13451, 10, 'BR', NULL, NULL, 'Mato Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13452, 10, 'BR', NULL, NULL, 'Mato Leitão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13453, 10, 'BR', NULL, NULL, 'Mato Perso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13454, 10, 'BR', NULL, NULL, 'Mato Queimado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13455, 10, 'BR', NULL, NULL, 'Mauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13456, 10, 'BR', NULL, NULL, 'Maximiliano de Almeida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13457, 10, 'BR', NULL, NULL, 'Maçambará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13458, 10, 'BR', NULL, NULL, 'Minas do Leão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13459, 10, 'BR', NULL, NULL, 'Miraguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13460, 10, 'BR', NULL, NULL, 'Miraguaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13461, 10, 'BR', NULL, NULL, 'Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13462, 10, 'BR', NULL, NULL, 'Montauri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13463, 10, 'BR', NULL, NULL, 'Monte Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13464, 10, 'BR', NULL, NULL, 'Monte Alegre dos Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13465, 10, 'BR', NULL, NULL, 'Monte Alverne')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13466, 10, 'BR', NULL, NULL, 'Monte Belo do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13467, 10, 'BR', NULL, NULL, 'Monte Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13468, 10, 'BR', NULL, NULL, 'Montenegro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13469, 10, 'BR', NULL, NULL, 'Mormaço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13470, 10, 'BR', NULL, NULL, 'Morrinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13471, 10, 'BR', NULL, NULL, 'Morrinhos do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13472, 10, 'BR', NULL, NULL, 'Morro Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13473, 10, 'BR', NULL, NULL, 'Morro Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13474, 10, 'BR', NULL, NULL, 'Morro Redondo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13475, 10, 'BR', NULL, NULL, 'Morro Reuter')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13476, 10, 'BR', NULL, NULL, 'Morungava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13477, 10, 'BR', NULL, NULL, 'Mostardas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13478, 10, 'BR', NULL, NULL, 'Muitos Capões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13479, 10, 'BR', NULL, NULL, 'Muliterno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13480, 10, 'BR', NULL, NULL, 'Muçum')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13481, 10, 'BR', NULL, NULL, 'Nazaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13482, 10, 'BR', NULL, NULL, 'Nicolau Vergueiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13483, 10, 'BR', NULL, NULL, 'Nonoai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13484, 10, 'BR', NULL, NULL, 'Nossa Senhora Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13485, 10, 'BR', NULL, NULL, 'Nossa Senhora da Conceição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13486, 10, 'BR', NULL, NULL, 'Nova Alvorada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13487, 10, 'BR', NULL, NULL, 'Nova Araçá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13488, 10, 'BR', NULL, NULL, 'Nova Bassano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13489, 10, 'BR', NULL, NULL, 'Nova Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13490, 10, 'BR', NULL, NULL, 'Nova Bréscia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13491, 10, 'BR', NULL, NULL, 'Nova Candelária')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13492, 10, 'BR', NULL, NULL, 'Nova Esperança do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13493, 10, 'BR', NULL, NULL, 'Nova Hartz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13494, 10, 'BR', NULL, NULL, 'Nova Milano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13495, 10, 'BR', NULL, NULL, 'Nova Palma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13496, 10, 'BR', NULL, NULL, 'Nova Petrópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13497, 10, 'BR', NULL, NULL, 'Nova Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13498, 10, 'BR', NULL, NULL, 'Nova Pádua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13499, 10, 'BR', NULL, NULL, 'Nova Ramada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13500, 10, 'BR', NULL, NULL, 'Nova Roma do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13501, 10, 'BR', NULL, NULL, 'Nova Santa Rita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13502, 10, 'BR', NULL, NULL, 'Nova Sardenha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13503, 10, 'BR', NULL, NULL, 'Novo Barreiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13504, 10, 'BR', NULL, NULL, 'Novo Cabrais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13505, 10, 'BR', NULL, NULL, 'Novo Hamburgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13506, 10, 'BR', NULL, NULL, 'Novo Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13507, 10, 'BR', NULL, NULL, 'Novo Machado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13508, 10, 'BR', NULL, NULL, 'Novo Planalto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13509, 10, 'BR', NULL, NULL, 'Novo Tiradentes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13510, 10, 'BR', NULL, NULL, 'Novo Xingu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13511, 10, 'BR', NULL, NULL, 'Não-Me-Toque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13512, 10, 'BR', NULL, NULL, 'Oralina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13513, 10, 'BR', NULL, NULL, 'Osvaldo Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13514, 10, 'BR', NULL, NULL, 'Osvaldo Kroeff')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13515, 10, 'BR', NULL, NULL, 'Osório')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13516, 10, 'BR', NULL, NULL, 'Otávio Rocha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13517, 10, 'BR', NULL, NULL, 'Pacheca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13518, 10, 'BR', NULL, NULL, 'Padilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13519, 10, 'BR', NULL, NULL, 'Padre Gonzales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13520, 10, 'BR', NULL, NULL, 'Paim Filho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13521, 10, 'BR', NULL, NULL, 'Palmares do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13522, 10, 'BR', NULL, NULL, 'Palmas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13523, 10, 'BR', NULL, NULL, 'Palmeira das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13524, 10, 'BR', NULL, NULL, 'Palmitinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13525, 10, 'BR', NULL, NULL, 'Pampeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13526, 10, 'BR', NULL, NULL, 'Panambi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13527, 10, 'BR', NULL, NULL, 'Paraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13528, 10, 'BR', NULL, NULL, 'Paraíso do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13529, 10, 'BR', NULL, NULL, 'Pareci Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13530, 10, 'BR', NULL, NULL, 'Parobé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13531, 10, 'BR', NULL, NULL, 'Passa Sete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13532, 10, 'BR', NULL, NULL, 'Passinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13533, 10, 'BR', NULL, NULL, 'Passo Burmann')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13534, 10, 'BR', NULL, NULL, 'Passo Fundo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13535, 10, 'BR', NULL, NULL, 'Passo Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13536, 10, 'BR', NULL, NULL, 'Passo Raso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13537, 10, 'BR', NULL, NULL, 'Passo da Areia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13538, 10, 'BR', NULL, NULL, 'Passo da Caveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13539, 10, 'BR', NULL, NULL, 'Passo das Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13540, 10, 'BR', NULL, NULL, 'Passo do Adão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13541, 10, 'BR', NULL, NULL, 'Passo do Sabão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13542, 10, 'BR', NULL, NULL, 'Passo do Sobrado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13543, 10, 'BR', NULL, NULL, 'Passo do Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13544, 10, 'BR', NULL, NULL, 'Paulo Bento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13545, 10, 'BR', NULL, NULL, 'Paverama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13546, 10, 'BR', NULL, NULL, 'Pavão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13547, 10, 'BR', NULL, NULL, 'Pedras Altas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13548, 10, 'BR', NULL, NULL, 'Pedreiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13549, 10, 'BR', NULL, NULL, 'Pedro Garcia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13550, 10, 'BR', NULL, NULL, 'Pedro Osório')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13551, 10, 'BR', NULL, NULL, 'Pedro Paiva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13552, 10, 'BR', NULL, NULL, 'Pejuçara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13553, 10, 'BR', NULL, NULL, 'Pelotas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13554, 10, 'BR', NULL, NULL, 'Picada Café')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13555, 10, 'BR', NULL, NULL, 'Pinhal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13556, 10, 'BR', NULL, NULL, 'Pinhal Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13557, 10, 'BR', NULL, NULL, 'Pinhal Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13558, 10, 'BR', NULL, NULL, 'Pinhal da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13559, 10, 'BR', NULL, NULL, 'Pinhalzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13560, 10, 'BR', NULL, NULL, 'Pinheirinho do Vale')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13561, 10, 'BR', NULL, NULL, 'Pinheiro Machado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13562, 10, 'BR', NULL, NULL, 'Pinheiro Marcado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13563, 10, 'BR', NULL, NULL, 'Pinto Bandeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13564, 10, 'BR', NULL, NULL, 'Pirapó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13565, 10, 'BR', NULL, NULL, 'Piratini')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13566, 10, 'BR', NULL, NULL, 'Piraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13567, 10, 'BR', NULL, NULL, 'Pitanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13568, 10, 'BR', NULL, NULL, 'Planalto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13569, 10, 'BR', NULL, NULL, 'Plano Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13570, 10, 'BR', NULL, NULL, 'Polígono do Erval')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13571, 10, 'BR', NULL, NULL, 'Ponte Preta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13572, 10, 'BR', NULL, NULL, 'Pontão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13573, 10, 'BR', NULL, NULL, 'Porto Batista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13574, 10, 'BR', NULL, NULL, 'Porto Lucena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13575, 10, 'BR', NULL, NULL, 'Porto Mauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13576, 10, 'BR', NULL, NULL, 'Porto Vera Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13577, 10, 'BR', NULL, NULL, 'Porto Xavier')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13578, 10, 'BR', NULL, NULL, 'Portão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13579, 10, 'BR', NULL, NULL, 'Pouso Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13580, 10, 'BR', NULL, NULL, 'Povo Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13581, 10, 'BR', NULL, NULL, 'Povoado Tozzo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13582, 10, 'BR', NULL, NULL, 'Poço das Antas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13583, 10, 'BR', NULL, NULL, 'Pranchada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13584, 10, 'BR', NULL, NULL, 'Pratos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13585, 10, 'BR', NULL, NULL, 'Presidente Lucena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13586, 10, 'BR', NULL, NULL, 'Progresso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13587, 10, 'BR', NULL, NULL, 'Protásio Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13588, 10, 'BR', NULL, NULL, 'Pulador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13589, 10, 'BR', NULL, NULL, 'Putinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13590, 10, 'BR', NULL, NULL, 'Pântano Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13591, 10, 'BR', NULL, NULL, 'Pólo Petroquímico de Triunfo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13592, 10, 'BR', NULL, NULL, 'Quaraim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13593, 10, 'BR', NULL, NULL, 'Quaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13594, 10, 'BR', NULL, NULL, 'Quatro Irmãos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13595, 10, 'BR', NULL, NULL, 'Quevedos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13596, 10, 'BR', NULL, NULL, 'Quilombo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13597, 10, 'BR', NULL, NULL, 'Quinta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13598, 10, 'BR', NULL, NULL, 'Quintão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13599, 10, 'BR', NULL, NULL, 'Quinze de Novembro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13600, 10, 'BR', NULL, NULL, 'Quitéria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13601, 10, 'BR', NULL, NULL, 'Rancho Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13602, 10, 'BR', NULL, NULL, 'Redentora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13603, 10, 'BR', NULL, NULL, 'Refugiado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13604, 10, 'BR', NULL, NULL, 'Relvado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13605, 10, 'BR', NULL, NULL, 'Restinga Seca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13606, 10, 'BR', NULL, NULL, 'Rincão Del Rei')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13607, 10, 'BR', NULL, NULL, 'Rincão Doce')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13608, 10, 'BR', NULL, NULL, 'Rincão Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13609, 10, 'BR', NULL, NULL, 'Rincão de São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13610, 10, 'BR', NULL, NULL, 'Rincão do Cristóvão Pereira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13611, 10, 'BR', NULL, NULL, 'Rincão do Meio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13612, 10, 'BR', NULL, NULL, 'Rincão do Segredo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13613, 10, 'BR', NULL, NULL, 'Rincão dos Kroeff')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13614, 10, 'BR', NULL, NULL, 'Rincão dos Mendes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13615, 10, 'BR', NULL, NULL, 'Rio Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13616, 10, 'BR', NULL, NULL, 'Rio Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13617, 10, 'BR', NULL, NULL, 'Rio Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13618, 10, 'BR', NULL, NULL, 'Rio Pardinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13619, 10, 'BR', NULL, NULL, 'Rio Pardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13620, 10, 'BR', NULL, NULL, 'Rio Telha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13621, 10, 'BR', NULL, NULL, 'Rio Tigre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13622, 10, 'BR', NULL, NULL, 'Rio Toldo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13623, 10, 'BR', NULL, NULL, 'Rio da Ilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13624, 10, 'BR', NULL, NULL, 'Rio dos Índios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13625, 10, 'BR', NULL, NULL, 'Riozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13626, 10, 'BR', NULL, NULL, 'Roca Sales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13627, 10, 'BR', NULL, NULL, 'Rodeio Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13628, 10, 'BR', NULL, NULL, 'Rolador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13629, 10, 'BR', NULL, NULL, 'Rolante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13630, 10, 'BR', NULL, NULL, 'Rolantinho da Figueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13631, 10, 'BR', NULL, NULL, 'Ronda Alta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13632, 10, 'BR', NULL, NULL, 'Rondinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13633, 10, 'BR', NULL, NULL, 'Roque Gonzales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13634, 10, 'BR', NULL, NULL, 'Rosário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13635, 10, 'BR', NULL, NULL, 'Rosário do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13636, 10, 'BR', NULL, NULL, 'Sagrada Família')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13637, 10, 'BR', NULL, NULL, 'Saicã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13638, 10, 'BR', NULL, NULL, 'Saldanha Marinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13639, 10, 'BR', NULL, NULL, 'Saltinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13640, 10, 'BR', NULL, NULL, 'Salto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13641, 10, 'BR', NULL, NULL, 'Salto do Jacuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13642, 10, 'BR', NULL, NULL, 'Salvador das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13643, 10, 'BR', NULL, NULL, 'Salvador do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13644, 10, 'BR', NULL, NULL, 'Sananduva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13645, 10, 'BR', NULL, NULL, 'Sant''auta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13646, 10, 'BR', NULL, NULL, 'Santa Bárbara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13647, 10, 'BR', NULL, NULL, 'Santa Bárbara do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13648, 10, 'BR', NULL, NULL, 'Santa Catarina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13649, 10, 'BR', NULL, NULL, 'Santa Cecília do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13650, 10, 'BR', NULL, NULL, 'Santa Clara do Ingaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13651, 10, 'BR', NULL, NULL, 'Santa Clara do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13652, 10, 'BR', NULL, NULL, 'Santa Cristina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13653, 10, 'BR', NULL, NULL, 'Santa Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13654, 10, 'BR', NULL, NULL, 'Santa Cruz da Concórdia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13655, 10, 'BR', NULL, NULL, 'Santa Cruz do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13656, 10, 'BR', NULL, NULL, 'Santa Flora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13657, 10, 'BR', NULL, NULL, 'Santa Inês')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13658, 10, 'BR', NULL, NULL, 'Santa Izabel do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13659, 10, 'BR', NULL, NULL, 'Santa Luzia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13660, 10, 'BR', NULL, NULL, 'Santa Luíza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13661, 10, 'BR', NULL, NULL, 'Santa Lúcia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13662, 10, 'BR', NULL, NULL, 'Santa Lúcia do Piaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13663, 10, 'BR', NULL, NULL, 'Santa Margarida do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13664, 10, 'BR', NULL, NULL, 'Santa Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13665, 10, 'BR', NULL, NULL, 'Santa Maria do Herval')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13666, 10, 'BR', NULL, NULL, 'Santa Rita do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13667, 10, 'BR', NULL, NULL, 'Santa Rosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13668, 10, 'BR', NULL, NULL, 'Santa Silvana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13669, 10, 'BR', NULL, NULL, 'Santa Teresinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13670, 10, 'BR', NULL, NULL, 'Santa Tereza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13671, 10, 'BR', NULL, NULL, 'Santa Vitória do Palmar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13672, 10, 'BR', NULL, NULL, 'Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13673, 10, 'BR', NULL, NULL, 'Santana da Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13674, 10, 'BR', NULL, NULL, 'Santana do Livramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13675, 10, 'BR', NULL, NULL, 'Santiago')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13676, 10, 'BR', NULL, NULL, 'Santo Amaro do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13677, 10, 'BR', NULL, NULL, 'Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13678, 10, 'BR', NULL, NULL, 'Santo Antônio da Patrulha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13679, 10, 'BR', NULL, NULL, 'Santo Antônio das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13680, 10, 'BR', NULL, NULL, 'Santo Antônio de Castro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13681, 10, 'BR', NULL, NULL, 'Santo Antônio do Bom Retiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13682, 10, 'BR', NULL, NULL, 'Santo Antônio do Palma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13683, 10, 'BR', NULL, NULL, 'Santo Antônio do Planalto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13684, 10, 'BR', NULL, NULL, 'Santo Augusto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13685, 10, 'BR', NULL, NULL, 'Santo Cristo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13686, 10, 'BR', NULL, NULL, 'Santo Expedito do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13687, 10, 'BR', NULL, NULL, 'Santo Inácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13688, 10, 'BR', NULL, NULL, 'Santo Ângelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13689, 10, 'BR', NULL, NULL, 'Sapiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13690, 10, 'BR', NULL, NULL, 'Sapucaia do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13691, 10, 'BR', NULL, NULL, 'Sarandi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13692, 10, 'BR', NULL, NULL, 'Scharlau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13693, 10, 'BR', NULL, NULL, 'Seberi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13694, 10, 'BR', NULL, NULL, 'Sede Aurora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13695, 10, 'BR', NULL, NULL, 'Sede Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13696, 10, 'BR', NULL, NULL, 'Segredo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13697, 10, 'BR', NULL, NULL, 'Seival')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13698, 10, 'BR', NULL, NULL, 'Selbach')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13699, 10, 'BR', NULL, NULL, 'Senador Salgado Filho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13700, 10, 'BR', NULL, NULL, 'Sentinela do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13701, 10, 'BR', NULL, NULL, 'Serafim Schmidt')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13702, 10, 'BR', NULL, NULL, 'Serafina Corrêa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13703, 10, 'BR', NULL, NULL, 'Serra dos Gregórios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13704, 10, 'BR', NULL, NULL, 'Serrinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13705, 10, 'BR', NULL, NULL, 'Sertão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13706, 10, 'BR', NULL, NULL, 'Sertão Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13707, 10, 'BR', NULL, NULL, 'Sertãozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13708, 10, 'BR', NULL, NULL, 'Sete Lagoas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13709, 10, 'BR', NULL, NULL, 'Sete de Setembro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13710, 10, 'BR', NULL, NULL, 'Severiano de Almeida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13711, 10, 'BR', NULL, NULL, 'Silva Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13712, 10, 'BR', NULL, NULL, 'Silveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13713, 10, 'BR', NULL, NULL, 'Silveira Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13714, 10, 'BR', NULL, NULL, 'Sinimbu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13715, 10, 'BR', NULL, NULL, 'Sobradinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13716, 10, 'BR', NULL, NULL, 'Soledade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13717, 10, 'BR', NULL, NULL, 'Souza Ramos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13718, 10, 'BR', NULL, NULL, 'Suspiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13719, 10, 'BR', NULL, NULL, 'São Bento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13720, 10, 'BR', NULL, NULL, 'São Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13721, 10, 'BR', NULL, NULL, 'São Borja')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13722, 10, 'BR', NULL, NULL, 'São Carlos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13723, 10, 'BR', NULL, NULL, 'São Domingos do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13724, 10, 'BR', NULL, NULL, 'São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13725, 10, 'BR', NULL, NULL, 'São Francisco de Assis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13726, 10, 'BR', NULL, NULL, 'São Francisco de Paula')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13727, 10, 'BR', NULL, NULL, 'São Gabriel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13728, 10, 'BR', NULL, NULL, 'São Jerônimo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13729, 10, 'BR', NULL, NULL, 'São Jorge')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13730, 10, 'BR', NULL, NULL, 'São José da Glória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13731, 10, 'BR', NULL, NULL, 'São José das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13732, 10, 'BR', NULL, NULL, 'São José de Castro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13733, 10, 'BR', NULL, NULL, 'São José do Centro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13734, 10, 'BR', NULL, NULL, 'São José do Herval')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13735, 10, 'BR', NULL, NULL, 'São José do Hortêncio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13736, 10, 'BR', NULL, NULL, 'São José do Inhacorá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13737, 10, 'BR', NULL, NULL, 'São José do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13738, 10, 'BR', NULL, NULL, 'São José do Ouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13739, 10, 'BR', NULL, NULL, 'São José do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13740, 10, 'BR', NULL, NULL, 'São José dos Ausentes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13741, 10, 'BR', NULL, NULL, 'São João')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13742, 10, 'BR', NULL, NULL, 'São João Batista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13743, 10, 'BR', NULL, NULL, 'São João Bosco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13744, 10, 'BR', NULL, NULL, 'São João da Urtiga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13745, 10, 'BR', NULL, NULL, 'São João do Polesine')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13746, 10, 'BR', NULL, NULL, 'São Leopoldo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13747, 10, 'BR', NULL, NULL, 'São Lourenço das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13748, 10, 'BR', NULL, NULL, 'São Lourenço do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13749, 10, 'BR', NULL, NULL, 'São Luiz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13750, 10, 'BR', NULL, NULL, 'São Luiz Gonzaga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13751, 10, 'BR', NULL, NULL, 'São Luís Rei')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13752, 10, 'BR', NULL, NULL, 'São Manuel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13753, 10, 'BR', NULL, NULL, 'São Marcos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13754, 10, 'BR', NULL, NULL, 'São Martinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13755, 10, 'BR', NULL, NULL, 'São Martinho da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13756, 10, 'BR', NULL, NULL, 'São Miguel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13757, 10, 'BR', NULL, NULL, 'São Miguel das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13758, 10, 'BR', NULL, NULL, 'São Nicolau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13759, 10, 'BR', NULL, NULL, 'São Paulo das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13760, 10, 'BR', NULL, NULL, 'São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13761, 10, 'BR', NULL, NULL, 'São Pedro da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13762, 10, 'BR', NULL, NULL, 'São Pedro das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13763, 10, 'BR', NULL, NULL, 'São Pedro do Butiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13764, 10, 'BR', NULL, NULL, 'São Pedro do Iraxim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13765, 10, 'BR', NULL, NULL, 'São Pedro do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13766, 10, 'BR', NULL, NULL, 'São Roque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13767, 10, 'BR', NULL, NULL, 'São Sebastião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13768, 10, 'BR', NULL, NULL, 'São Sebastião do Caí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13769, 10, 'BR', NULL, NULL, 'São Sepé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13770, 10, 'BR', NULL, NULL, 'São Simão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13771, 10, 'BR', NULL, NULL, 'São Valentim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13772, 10, 'BR', NULL, NULL, 'São Valentim do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13773, 10, 'BR', NULL, NULL, 'São Valério do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13774, 10, 'BR', NULL, NULL, 'São Vendelino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13775, 10, 'BR', NULL, NULL, 'São Vicente do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13776, 10, 'BR', NULL, NULL, 'Sério')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13777, 10, 'BR', NULL, NULL, 'Sírio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13778, 10, 'BR', NULL, NULL, 'Sítio Gabriel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13779, 10, 'BR', NULL, NULL, 'Tabajara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13780, 10, 'BR', NULL, NULL, 'Tabaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13781, 10, 'BR', NULL, NULL, 'Taim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13782, 10, 'BR', NULL, NULL, 'Tainhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13783, 10, 'BR', NULL, NULL, 'Tamanduá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13784, 10, 'BR', NULL, NULL, 'Tanque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13785, 10, 'BR', NULL, NULL, 'Tapejara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13786, 10, 'BR', NULL, NULL, 'Tapera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13787, 10, 'BR', NULL, NULL, 'Tapes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13788, 10, 'BR', NULL, NULL, 'Taquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13789, 10, 'BR', NULL, NULL, 'Taquari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13790, 10, 'BR', NULL, NULL, 'Taquarichim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13791, 10, 'BR', NULL, NULL, 'Taquaruçu do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13792, 10, 'BR', NULL, NULL, 'Tavares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13793, 10, 'BR', NULL, NULL, 'Tenente Portela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13794, 10, 'BR', NULL, NULL, 'Terra de Areia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13795, 10, 'BR', NULL, NULL, 'Tesouras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13796, 10, 'BR', NULL, NULL, 'Teutônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13797, 10, 'BR', NULL, NULL, 'Tiaraju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13798, 10, 'BR', NULL, NULL, 'Timbaúva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13799, 10, 'BR', NULL, NULL, 'Tio Hugo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13800, 10, 'BR', NULL, NULL, 'Tiradentes do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13801, 10, 'BR', NULL, NULL, 'Toropi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13802, 10, 'BR', NULL, NULL, 'Toroquá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13803, 10, 'BR', NULL, NULL, 'Torquato Severo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13804, 10, 'BR', NULL, NULL, 'Torres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13805, 10, 'BR', NULL, NULL, 'Torrinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13806, 10, 'BR', NULL, NULL, 'Touro Passo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13807, 10, 'BR', NULL, NULL, 'Tramandaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13808, 10, 'BR', NULL, NULL, 'Travesseiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13809, 10, 'BR', NULL, NULL, 'Trentin')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13810, 10, 'BR', NULL, NULL, 'Trindade do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13811, 10, 'BR', NULL, NULL, 'Triunfo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13812, 10, 'BR', NULL, NULL, 'Tronqueiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13813, 10, 'BR', NULL, NULL, 'Três Arroios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13814, 10, 'BR', NULL, NULL, 'Três Barras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13815, 10, 'BR', NULL, NULL, 'Três Cachoeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13816, 10, 'BR', NULL, NULL, 'Três Coroas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13817, 10, 'BR', NULL, NULL, 'Três Forquilhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13818, 10, 'BR', NULL, NULL, 'Três Palmeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13819, 10, 'BR', NULL, NULL, 'Três Passos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13820, 10, 'BR', NULL, NULL, 'Três Vendas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13821, 10, 'BR', NULL, NULL, 'Três de Maio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13822, 10, 'BR', NULL, NULL, 'Tucunduva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13823, 10, 'BR', NULL, NULL, 'Tuiuti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13824, 10, 'BR', NULL, NULL, 'Tunas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13825, 10, 'BR', NULL, NULL, 'Tupanci do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13826, 10, 'BR', NULL, NULL, 'Tupanciretã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13827, 10, 'BR', NULL, NULL, 'Tupancy ou Vila Block')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13828, 10, 'BR', NULL, NULL, 'Tupandi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13829, 10, 'BR', NULL, NULL, 'Tupantuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13830, 10, 'BR', NULL, NULL, 'Tuparendi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13831, 10, 'BR', NULL, NULL, 'Tupi Silveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13832, 10, 'BR', NULL, NULL, 'Tupinambá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13833, 10, 'BR', NULL, NULL, 'Turuçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13834, 10, 'BR', NULL, NULL, 'Turvinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13835, 10, 'BR', NULL, NULL, 'Túnel Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13836, 10, 'BR', NULL, NULL, 'Ubiretama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13837, 10, 'BR', NULL, NULL, 'Umbu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13838, 10, 'BR', NULL, NULL, 'Unistalda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13839, 10, 'BR', NULL, NULL, 'União da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13840, 10, 'BR', NULL, NULL, 'Uruguaiana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13841, 10, 'BR', NULL, NULL, 'Vacacai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13842, 10, 'BR', NULL, NULL, 'Vacaria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13843, 10, 'BR', NULL, NULL, 'Valdástico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13844, 10, 'BR', NULL, NULL, 'Vale Real')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13845, 10, 'BR', NULL, NULL, 'Vale Veneto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13846, 10, 'BR', NULL, NULL, 'Vale Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13847, 10, 'BR', NULL, NULL, 'Vale do Rio Cai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13848, 10, 'BR', NULL, NULL, 'Vale do Sol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13849, 10, 'BR', NULL, NULL, 'Vanini')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13850, 10, 'BR', NULL, NULL, 'Venâncio Aires')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13851, 10, 'BR', NULL, NULL, 'Vera Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13852, 10, 'BR', NULL, NULL, 'Veranópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13853, 10, 'BR', NULL, NULL, 'Vertentes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13854, 10, 'BR', NULL, NULL, 'Vespasiano Correa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13855, 10, 'BR', NULL, NULL, 'Viadutos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13856, 10, 'BR', NULL, NULL, 'Viamão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13857, 10, 'BR', NULL, NULL, 'Vicente Dutra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13858, 10, 'BR', NULL, NULL, 'Victor Graeff')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13859, 10, 'BR', NULL, NULL, 'Vila Bender')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13860, 10, 'BR', NULL, NULL, 'Vila Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13861, 10, 'BR', NULL, NULL, 'Vila Flores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13862, 10, 'BR', NULL, NULL, 'Vila Langaro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13863, 10, 'BR', NULL, NULL, 'Vila Laranjeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13864, 10, 'BR', NULL, NULL, 'Vila Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13865, 10, 'BR', NULL, NULL, 'Vila Nova do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13866, 10, 'BR', NULL, NULL, 'Vila Oliva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13867, 10, 'BR', NULL, NULL, 'Vila Rica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13868, 10, 'BR', NULL, NULL, 'Vila Seca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13869, 10, 'BR', NULL, NULL, 'Vila Turvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13870, 10, 'BR', NULL, NULL, 'Vista Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13871, 10, 'BR', NULL, NULL, 'Vista Alegre do Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13872, 10, 'BR', NULL, NULL, 'Vista Gaúcha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13873, 10, 'BR', NULL, NULL, 'Vitória das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13874, 10, 'BR', NULL, NULL, 'Volta Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13875, 10, 'BR', NULL, NULL, 'Volta Fechada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13876, 10, 'BR', NULL, NULL, 'Volta Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13877, 10, 'BR', NULL, NULL, 'Westfália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13878, 10, 'BR', NULL, NULL, 'Xadrez')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13879, 10, 'BR', NULL, NULL, 'Xangri-Lá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13880, 10, 'BR', NULL, NULL, 'Água Santa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13881, 10, 'BR', NULL, NULL, 'Águas Claras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13882, 10, 'BR', NULL, NULL, 'Árvore Só')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13883, 10, 'BR', NULL, NULL, 'Áurea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13884, 11, 'BR', NULL, NULL, 'Abadia de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13885, 11, 'BR', NULL, NULL, 'Abadiânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13886, 11, 'BR', NULL, NULL, 'Acreúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13887, 11, 'BR', NULL, NULL, 'Adelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13888, 11, 'BR', NULL, NULL, 'Alexânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13889, 11, 'BR', NULL, NULL, 'Aloândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13890, 11, 'BR', NULL, NULL, 'Alto Alvorada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13891, 11, 'BR', NULL, NULL, 'Alto Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13892, 11, 'BR', NULL, NULL, 'Alto Paraíso de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13893, 11, 'BR', NULL, NULL, 'Alvorada do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13894, 11, 'BR', NULL, NULL, 'Amaralina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13895, 11, 'BR', NULL, NULL, 'Americano do Brasil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13896, 11, 'BR', NULL, NULL, 'Amorinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13897, 11, 'BR', NULL, NULL, 'Anhangüera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13898, 11, 'BR', NULL, NULL, 'Anicuns')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13899, 11, 'BR', NULL, NULL, 'Anápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13900, 11, 'BR', NULL, NULL, 'Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13901, 11, 'BR', NULL, NULL, 'Aparecida de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13902, 11, 'BR', NULL, NULL, 'Aparecida de Goiânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13903, 11, 'BR', NULL, NULL, 'Aparecida do Rio Claro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13904, 11, 'BR', NULL, NULL, 'Aparecida do Rio Doce')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13905, 11, 'BR', NULL, NULL, 'Aporé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13906, 11, 'BR', NULL, NULL, 'Aragarças')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13907, 11, 'BR', NULL, NULL, 'Aragoiânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13908, 11, 'BR', NULL, NULL, 'Araguapaz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13909, 11, 'BR', NULL, NULL, 'Araçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13910, 11, 'BR', NULL, NULL, 'Arenópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13911, 11, 'BR', NULL, NULL, 'Aruanã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13912, 11, 'BR', NULL, NULL, 'Aurilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13913, 11, 'BR', NULL, NULL, 'Auriverde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13914, 11, 'BR', NULL, NULL, 'Avelinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13915, 11, 'BR', NULL, NULL, 'Bacilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13916, 11, 'BR', NULL, NULL, 'Baliza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13917, 11, 'BR', NULL, NULL, 'Bandeirantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13918, 11, 'BR', NULL, NULL, 'Barbosilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13919, 11, 'BR', NULL, NULL, 'Barro Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13920, 11, 'BR', NULL, NULL, 'Bela Vista de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13921, 11, 'BR', NULL, NULL, 'Bezerra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13922, 11, 'BR', NULL, NULL, 'Bom Jardim de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13923, 11, 'BR', NULL, NULL, 'Bom Jesus de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13924, 11, 'BR', NULL, NULL, 'Bonfinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13925, 11, 'BR', NULL, NULL, 'Bonópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13926, 11, 'BR', NULL, NULL, 'Brazabrantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13927, 11, 'BR', NULL, NULL, 'Britânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13928, 11, 'BR', NULL, NULL, 'Buenolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13929, 11, 'BR', NULL, NULL, 'Buriti Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13930, 11, 'BR', NULL, NULL, 'Buriti de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13931, 11, 'BR', NULL, NULL, 'Buritinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13932, 11, 'BR', NULL, NULL, 'Cabeceiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13933, 11, 'BR', NULL, NULL, 'Cachoeira Alta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13934, 11, 'BR', NULL, NULL, 'Cachoeira Dourada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13935, 11, 'BR', NULL, NULL, 'Cachoeira de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13936, 11, 'BR', NULL, NULL, 'Caiapônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13937, 11, 'BR', NULL, NULL, 'Caiçara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13938, 11, 'BR', NULL, NULL, 'Calcilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13939, 11, 'BR', NULL, NULL, 'Caldas Novas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13940, 11, 'BR', NULL, NULL, 'Caldazinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13941, 11, 'BR', NULL, NULL, 'Calixto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13942, 11, 'BR', NULL, NULL, 'Campestre de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13943, 11, 'BR', NULL, NULL, 'Campinaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13944, 11, 'BR', NULL, NULL, 'Campinorte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13945, 11, 'BR', NULL, NULL, 'Campo Alegre de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13946, 11, 'BR', NULL, NULL, 'Campo Limpo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13947, 11, 'BR', NULL, NULL, 'Campo Limpo de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13948, 11, 'BR', NULL, NULL, 'Campo Lindo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13949, 11, 'BR', NULL, NULL, 'Campolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13950, 11, 'BR', NULL, NULL, 'Campos Belos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13951, 11, 'BR', NULL, NULL, 'Campos Verdes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13952, 11, 'BR', NULL, NULL, 'Cana Brava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13953, 11, 'BR', NULL, NULL, 'Canadá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13954, 11, 'BR', NULL, NULL, 'Capelinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13955, 11, 'BR', NULL, NULL, 'Caraíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13956, 11, 'BR', NULL, NULL, 'Carmo do Rio Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13957, 11, 'BR', NULL, NULL, 'Castelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13958, 11, 'BR', NULL, NULL, 'Castrinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13959, 11, 'BR', NULL, NULL, 'Catalão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13960, 11, 'BR', NULL, NULL, 'Caturaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13961, 11, 'BR', NULL, NULL, 'Cavalcante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13962, 11, 'BR', NULL, NULL, 'Cavalheiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13963, 11, 'BR', NULL, NULL, 'Caçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13964, 11, 'BR', NULL, NULL, 'Cebrasa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13965, 11, 'BR', NULL, NULL, 'Ceres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13966, 11, 'BR', NULL, NULL, 'Cezarina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13967, 11, 'BR', NULL, NULL, 'Chapadão do Céu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13968, 11, 'BR', NULL, NULL, 'Choupana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13969, 11, 'BR', NULL, NULL, 'Cibele')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13970, 11, 'BR', NULL, NULL, 'Cidade Ocidental')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13971, 11, 'BR', NULL, NULL, 'Cirilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13972, 11, 'BR', NULL, NULL, 'Cocalzinho de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13973, 11, 'BR', NULL, NULL, 'Colinas do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13974, 11, 'BR', NULL, NULL, 'Corumbaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13975, 11, 'BR', NULL, NULL, 'Corumbá de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13976, 11, 'BR', NULL, NULL, 'Cristalina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13977, 11, 'BR', NULL, NULL, 'Cristianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13978, 11, 'BR', NULL, NULL, 'Crixás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13979, 11, 'BR', NULL, NULL, 'Cromínia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13980, 11, 'BR', NULL, NULL, 'Cruzeiro do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13981, 11, 'BR', NULL, NULL, 'Cumari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13982, 11, 'BR', NULL, NULL, 'Córrego Rico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13983, 11, 'BR', NULL, NULL, 'Córrego do Ouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13984, 11, 'BR', NULL, NULL, 'Damianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13985, 11, 'BR', NULL, NULL, 'Damolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13986, 11, 'BR', NULL, NULL, 'Davidópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13987, 11, 'BR', NULL, NULL, 'Davinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13988, 11, 'BR', NULL, NULL, 'Diolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13989, 11, 'BR', NULL, NULL, 'Diorama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13990, 11, 'BR', NULL, NULL, 'Divinópolis de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13991, 11, 'BR', NULL, NULL, 'Domiciano Ribeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13992, 11, 'BR', NULL, NULL, 'Doverlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13993, 11, 'BR', NULL, NULL, 'Edealina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13994, 11, 'BR', NULL, NULL, 'Edilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13995, 11, 'BR', NULL, NULL, 'Edéia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13996, 11, 'BR', NULL, NULL, 'Estrela do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13997, 11, 'BR', NULL, NULL, 'Faina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13998, 11, 'BR', NULL, NULL, 'Fazenda Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (13999, 11, 'BR', NULL, NULL, 'Firminópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14000, 11, 'BR', NULL, NULL, 'Flores de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14001, 11, 'BR', NULL, NULL, 'Formosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14002, 11, 'BR', NULL, NULL, 'Formoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14003, 11, 'BR', NULL, NULL, 'Forte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14004, 11, 'BR', NULL, NULL, 'Gameleira de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14005, 11, 'BR', NULL, NULL, 'Geriaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14006, 11, 'BR', NULL, NULL, 'Girassol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14007, 11, 'BR', NULL, NULL, 'Goialândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14008, 11, 'BR', NULL, NULL, 'Goiandira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14009, 11, 'BR', NULL, NULL, 'Goianira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14010, 11, 'BR', NULL, NULL, 'Goianápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14011, 11, 'BR', NULL, NULL, 'Goianésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14012, 11, 'BR', NULL, NULL, 'Goiatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14013, 11, 'BR', NULL, NULL, 'Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14014, 11, 'BR', NULL, NULL, 'Goiânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14015, 11, 'BR', NULL, NULL, 'Gouvelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14016, 11, 'BR', NULL, NULL, 'Guapó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14017, 11, 'BR', NULL, NULL, 'Guarani de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14018, 11, 'BR', NULL, NULL, 'Guaraíta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14019, 11, 'BR', NULL, NULL, 'Guarinos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14020, 11, 'BR', NULL, NULL, 'Heitoraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14021, 11, 'BR', NULL, NULL, 'Hidrolina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14022, 11, 'BR', NULL, NULL, 'Hidrolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14023, 11, 'BR', NULL, NULL, 'Iaciara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14024, 11, 'BR', NULL, NULL, 'Inaciolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14025, 11, 'BR', NULL, NULL, 'Indiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14026, 11, 'BR', NULL, NULL, 'Inhumas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14027, 11, 'BR', NULL, NULL, 'Interlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14028, 11, 'BR', NULL, NULL, 'Ipameri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14029, 11, 'BR', NULL, NULL, 'Ipiranga de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14030, 11, 'BR', NULL, NULL, 'Iporá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14031, 11, 'BR', NULL, NULL, 'Israelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14032, 11, 'BR', NULL, NULL, 'Itaberaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14033, 11, 'BR', NULL, NULL, 'Itaguari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14034, 11, 'BR', NULL, NULL, 'Itaguaru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14035, 11, 'BR', NULL, NULL, 'Itaguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14036, 11, 'BR', NULL, NULL, 'Itajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14037, 11, 'BR', NULL, NULL, 'Itapaci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14038, 11, 'BR', NULL, NULL, 'Itapirapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14039, 11, 'BR', NULL, NULL, 'Itapuranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14040, 11, 'BR', NULL, NULL, 'Itarumã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14041, 11, 'BR', NULL, NULL, 'Itauçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14042, 11, 'BR', NULL, NULL, 'Itumbiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14043, 11, 'BR', NULL, NULL, 'Ivolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14044, 11, 'BR', NULL, NULL, 'JK')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14045, 11, 'BR', NULL, NULL, 'Jacilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14046, 11, 'BR', NULL, NULL, 'Jandaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14047, 11, 'BR', NULL, NULL, 'Jaraguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14048, 11, 'BR', NULL, NULL, 'Jardim ABC de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14049, 11, 'BR', NULL, NULL, 'Jataí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14050, 11, 'BR', NULL, NULL, 'Jaupaci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14051, 11, 'BR', NULL, NULL, 'Jeroaquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14052, 11, 'BR', NULL, NULL, 'Jesúpolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14053, 11, 'BR', NULL, NULL, 'Joanápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14054, 11, 'BR', NULL, NULL, 'Joviânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14055, 11, 'BR', NULL, NULL, 'Juscelino Kubitschek')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14056, 11, 'BR', NULL, NULL, 'Juscelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14057, 11, 'BR', NULL, NULL, 'Jussara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14058, 11, 'BR', NULL, NULL, 'Lagoa Santa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14059, 11, 'BR', NULL, NULL, 'Lagoa do Bauzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14060, 11, 'BR', NULL, NULL, 'Lagolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14061, 11, 'BR', NULL, NULL, 'Leopoldo de Bulhões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14062, 11, 'BR', NULL, NULL, 'Lucilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14063, 11, 'BR', NULL, NULL, 'Luziânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14064, 11, 'BR', NULL, NULL, 'Mairipotaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14065, 11, 'BR', NULL, NULL, 'Mambaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14066, 11, 'BR', NULL, NULL, 'Mara Rosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14067, 11, 'BR', NULL, NULL, 'Marcianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14068, 11, 'BR', NULL, NULL, 'Marzagão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14069, 11, 'BR', NULL, NULL, 'Matrinchã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14070, 11, 'BR', NULL, NULL, 'Maurilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14071, 11, 'BR', NULL, NULL, 'Meia Ponte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14072, 11, 'BR', NULL, NULL, 'Messianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14073, 11, 'BR', NULL, NULL, 'Mimoso de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14074, 11, 'BR', NULL, NULL, 'Minaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14075, 11, 'BR', NULL, NULL, 'Mineiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14076, 11, 'BR', NULL, NULL, 'Moiporá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14077, 11, 'BR', NULL, NULL, 'Monte Alegre de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14078, 11, 'BR', NULL, NULL, 'Montes Claros de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14079, 11, 'BR', NULL, NULL, 'Montividiu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14080, 11, 'BR', NULL, NULL, 'Montividiu do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14081, 11, 'BR', NULL, NULL, 'Morrinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14082, 11, 'BR', NULL, NULL, 'Morro Agudo de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14083, 11, 'BR', NULL, NULL, 'Mossâmedes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14084, 11, 'BR', NULL, NULL, 'Mozarlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14085, 11, 'BR', NULL, NULL, 'Mundo Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14086, 11, 'BR', NULL, NULL, 'Mutunópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14087, 11, 'BR', NULL, NULL, 'Natinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14088, 11, 'BR', NULL, NULL, 'Nazário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14089, 11, 'BR', NULL, NULL, 'Nerópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14090, 11, 'BR', NULL, NULL, 'Niquelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14091, 11, 'BR', NULL, NULL, 'Nova América')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14092, 11, 'BR', NULL, NULL, 'Nova Aurora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14093, 11, 'BR', NULL, NULL, 'Nova Crixás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14094, 11, 'BR', NULL, NULL, 'Nova Glória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14095, 11, 'BR', NULL, NULL, 'Nova Iguaçu de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14096, 11, 'BR', NULL, NULL, 'Nova Roma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14097, 11, 'BR', NULL, NULL, 'Nova Veneza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14098, 11, 'BR', NULL, NULL, 'Novo Brasil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14099, 11, 'BR', NULL, NULL, 'Novo Gama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14100, 11, 'BR', NULL, NULL, 'Novo Planalto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14101, 11, 'BR', NULL, NULL, 'Olaria do Angico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14102, 11, 'BR', NULL, NULL, 'Olhos D''Água')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14103, 11, 'BR', NULL, NULL, 'Orizona')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14104, 11, 'BR', NULL, NULL, 'Ouro Verde de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14105, 11, 'BR', NULL, NULL, 'Ouroana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14106, 11, 'BR', NULL, NULL, 'Ouvidor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14107, 11, 'BR', NULL, NULL, 'Padre Bernardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14108, 11, 'BR', NULL, NULL, 'Palestina de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14109, 11, 'BR', NULL, NULL, 'Palmeiras de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14110, 11, 'BR', NULL, NULL, 'Palmelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14111, 11, 'BR', NULL, NULL, 'Palminópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14112, 11, 'BR', NULL, NULL, 'Panamá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14113, 11, 'BR', NULL, NULL, 'Paranaiguara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14114, 11, 'BR', NULL, NULL, 'Paraúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14115, 11, 'BR', NULL, NULL, 'Pau-Terra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14116, 11, 'BR', NULL, NULL, 'Pedra Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14117, 11, 'BR', NULL, NULL, 'Perolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14118, 11, 'BR', NULL, NULL, 'Petrolina de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14119, 11, 'BR', NULL, NULL, 'Pilar de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14120, 11, 'BR', NULL, NULL, 'Piloândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14121, 11, 'BR', NULL, NULL, 'Piracanjuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14122, 11, 'BR', NULL, NULL, 'Piranhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14123, 11, 'BR', NULL, NULL, 'Pirenópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14124, 11, 'BR', NULL, NULL, 'Pires Belo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14125, 11, 'BR', NULL, NULL, 'Pires do Rio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14126, 11, 'BR', NULL, NULL, 'Planalmira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14127, 11, 'BR', NULL, NULL, 'Planaltina de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14128, 11, 'BR', NULL, NULL, 'Pontalina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14129, 11, 'BR', NULL, NULL, 'Porangatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14130, 11, 'BR', NULL, NULL, 'Porteirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14131, 11, 'BR', NULL, NULL, 'Portelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14132, 11, 'BR', NULL, NULL, 'Posse')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14133, 11, 'BR', NULL, NULL, 'Posse D''Abadia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14134, 11, 'BR', NULL, NULL, 'Professor Jamil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14135, 11, 'BR', NULL, NULL, 'Quirinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14136, 11, 'BR', NULL, NULL, 'Registro do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14137, 11, 'BR', NULL, NULL, 'Rialma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14138, 11, 'BR', NULL, NULL, 'Rianápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14139, 11, 'BR', NULL, NULL, 'Rio Quente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14140, 11, 'BR', NULL, NULL, 'Rio Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14141, 11, 'BR', NULL, NULL, 'Riverlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14142, 11, 'BR', NULL, NULL, 'Rosalândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14143, 11, 'BR', NULL, NULL, 'Rubiataba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14144, 11, 'BR', NULL, NULL, 'Sanclerlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14145, 11, 'BR', NULL, NULL, 'Santa Bárbara de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14146, 11, 'BR', NULL, NULL, 'Santa Cruz das Lajes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14147, 11, 'BR', NULL, NULL, 'Santa Cruz de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14148, 11, 'BR', NULL, NULL, 'Santa Fé de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14149, 11, 'BR', NULL, NULL, 'Santa Helena de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14150, 11, 'BR', NULL, NULL, 'Santa Isabel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14151, 11, 'BR', NULL, NULL, 'Santa Rita do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14152, 11, 'BR', NULL, NULL, 'Santa Rita do Novo Destino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14153, 11, 'BR', NULL, NULL, 'Santa Rosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14154, 11, 'BR', NULL, NULL, 'Santa Rosa de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14155, 11, 'BR', NULL, NULL, 'Santa Tereza de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14156, 11, 'BR', NULL, NULL, 'Santa Terezinha de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14157, 11, 'BR', NULL, NULL, 'Santo Antônio da Barra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14158, 11, 'BR', NULL, NULL, 'Santo Antônio de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14159, 11, 'BR', NULL, NULL, 'Santo Antônio do Descoberto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14160, 11, 'BR', NULL, NULL, 'Santo Antônio do Rio Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14161, 11, 'BR', NULL, NULL, 'Sarandi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14162, 11, 'BR', NULL, NULL, 'Senador Canedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14163, 11, 'BR', NULL, NULL, 'Serra Dourada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14164, 11, 'BR', NULL, NULL, 'Serranópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14165, 11, 'BR', NULL, NULL, 'Silvânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14166, 11, 'BR', NULL, NULL, 'Simolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14167, 11, 'BR', NULL, NULL, 'Sousânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14168, 11, 'BR', NULL, NULL, 'São Domingos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14169, 11, 'BR', NULL, NULL, 'São Francisco de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14170, 11, 'BR', NULL, NULL, 'São Gabriel de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14171, 11, 'BR', NULL, NULL, 'São Jorge')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14172, 11, 'BR', NULL, NULL, 'São João')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14173, 11, 'BR', NULL, NULL, 'São João D''Aliança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14174, 11, 'BR', NULL, NULL, 'São João da Paraúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14175, 11, 'BR', NULL, NULL, 'São Luiz do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14176, 11, 'BR', NULL, NULL, 'São Luiz do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14177, 11, 'BR', NULL, NULL, 'São Luís de Montes Belos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14178, 11, 'BR', NULL, NULL, 'São Miguel do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14179, 11, 'BR', NULL, NULL, 'São Miguel do Passa Quatro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14180, 11, 'BR', NULL, NULL, 'São Patrício')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14181, 11, 'BR', NULL, NULL, 'São Sebastião do Rio Claro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14182, 11, 'BR', NULL, NULL, 'São Simão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14183, 11, 'BR', NULL, NULL, 'São Vicente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14184, 11, 'BR', NULL, NULL, 'Sítio D''Abadia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14185, 11, 'BR', NULL, NULL, 'Taquaral de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14186, 11, 'BR', NULL, NULL, 'Taveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14187, 11, 'BR', NULL, NULL, 'Teresina de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14188, 11, 'BR', NULL, NULL, 'Terezópolis de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14189, 11, 'BR', NULL, NULL, 'Trindade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14190, 11, 'BR', NULL, NULL, 'Trombas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14191, 11, 'BR', NULL, NULL, 'Três Ranchos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14192, 11, 'BR', NULL, NULL, 'Tupiracaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14193, 11, 'BR', NULL, NULL, 'Turvelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14194, 11, 'BR', NULL, NULL, 'Turvânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14195, 11, 'BR', NULL, NULL, 'Uirapuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14196, 11, 'BR', NULL, NULL, 'Uruana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14197, 11, 'BR', NULL, NULL, 'Uruaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14198, 11, 'BR', NULL, NULL, 'Uruita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14199, 11, 'BR', NULL, NULL, 'Urutaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14200, 11, 'BR', NULL, NULL, 'Uvá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14201, 11, 'BR', NULL, NULL, 'Valdelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14202, 11, 'BR', NULL, NULL, 'Valparaíso de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14203, 11, 'BR', NULL, NULL, 'Varjão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14204, 11, 'BR', NULL, NULL, 'Vianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14205, 11, 'BR', NULL, NULL, 'Vicentinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14206, 11, 'BR', NULL, NULL, 'Vila Boa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14207, 11, 'BR', NULL, NULL, 'Vila Propício')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14208, 11, 'BR', NULL, NULL, 'Vila Sertaneja')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14209, 11, 'BR', NULL, NULL, 'Água Fria de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14210, 11, 'BR', NULL, NULL, 'Água Limpa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14211, 11, 'BR', NULL, NULL, 'Águas Lindas de Goiás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14212, 12, 'BR', NULL, NULL, 'Abdon Batista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14213, 12, 'BR', NULL, NULL, 'Abelardo Luz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14214, 12, 'BR', NULL, NULL, 'Agrolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14215, 12, 'BR', NULL, NULL, 'Agronômica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14216, 12, 'BR', NULL, NULL, 'Aguti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14217, 12, 'BR', NULL, NULL, 'Aiurê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14218, 12, 'BR', NULL, NULL, 'Alfredo Wagner')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14219, 12, 'BR', NULL, NULL, 'Alto Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14220, 12, 'BR', NULL, NULL, 'Alto Bela Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14221, 12, 'BR', NULL, NULL, 'Alto da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14222, 12, 'BR', NULL, NULL, 'Anchieta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14223, 12, 'BR', NULL, NULL, 'Angelina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14224, 12, 'BR', NULL, NULL, 'Anita Garibaldi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14225, 12, 'BR', NULL, NULL, 'Anitápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14226, 12, 'BR', NULL, NULL, 'Anta Gorda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14227, 12, 'BR', NULL, NULL, 'Antônio Carlos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14228, 12, 'BR', NULL, NULL, 'Apiúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14229, 12, 'BR', NULL, NULL, 'Arabutã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14230, 12, 'BR', NULL, NULL, 'Araquari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14231, 12, 'BR', NULL, NULL, 'Araranguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14232, 12, 'BR', NULL, NULL, 'Armazém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14233, 12, 'BR', NULL, NULL, 'Arnópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14234, 12, 'BR', NULL, NULL, 'Arroio Trinta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14235, 12, 'BR', NULL, NULL, 'Arvoredo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14236, 12, 'BR', NULL, NULL, 'Ascurra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14237, 12, 'BR', NULL, NULL, 'Atalanta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14238, 12, 'BR', NULL, NULL, 'Aterrado Torto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14239, 12, 'BR', NULL, NULL, 'Aurora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14240, 12, 'BR', NULL, NULL, 'Azambuja')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14241, 12, 'BR', NULL, NULL, 'Baia Alta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14242, 12, 'BR', NULL, NULL, 'Balneário Arroio do Silva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14243, 12, 'BR', NULL, NULL, 'Balneário Barra do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14244, 12, 'BR', NULL, NULL, 'Balneário Camboriú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14245, 12, 'BR', NULL, NULL, 'Balneário Gaivota')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14246, 12, 'BR', NULL, NULL, 'Balneário Morro dos Conventos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14247, 12, 'BR', NULL, NULL, 'Balneário Piçarras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14248, 12, 'BR', NULL, NULL, 'Bandeirante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14249, 12, 'BR', NULL, NULL, 'Barra Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14250, 12, 'BR', NULL, NULL, 'Barra Clara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14251, 12, 'BR', NULL, NULL, 'Barra Fria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14252, 12, 'BR', NULL, NULL, 'Barra Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14253, 12, 'BR', NULL, NULL, 'Barra Velha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14254, 12, 'BR', NULL, NULL, 'Barra da Lagoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14255, 12, 'BR', NULL, NULL, 'Barra da Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14256, 12, 'BR', NULL, NULL, 'Barreiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14257, 12, 'BR', NULL, NULL, 'Barro Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14258, 12, 'BR', NULL, NULL, 'Bateias de Baixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14259, 12, 'BR', NULL, NULL, 'Bela Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14260, 12, 'BR', NULL, NULL, 'Bela Vista do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14261, 12, 'BR', NULL, NULL, 'Bela Vista do Toldo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14262, 12, 'BR', NULL, NULL, 'Belmonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14263, 12, 'BR', NULL, NULL, 'Benedito Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14264, 12, 'BR', NULL, NULL, 'Biguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14265, 12, 'BR', NULL, NULL, 'Blumenau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14266, 12, 'BR', NULL, NULL, 'Bocaína do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14267, 12, 'BR', NULL, NULL, 'Boiteuxburgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14268, 12, 'BR', NULL, NULL, 'Bom Jardim da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14269, 12, 'BR', NULL, NULL, 'Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14270, 12, 'BR', NULL, NULL, 'Bom Jesus do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14271, 12, 'BR', NULL, NULL, 'Bom Retiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14272, 12, 'BR', NULL, NULL, 'Bom Sucesso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14273, 12, 'BR', NULL, NULL, 'Bombinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14274, 12, 'BR', NULL, NULL, 'Botuverá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14275, 12, 'BR', NULL, NULL, 'Braço do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14276, 12, 'BR', NULL, NULL, 'Braço do Trombudo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14277, 12, 'BR', NULL, NULL, 'Brunópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14278, 12, 'BR', NULL, NULL, 'Brusque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14279, 12, 'BR', NULL, NULL, 'Cachoeira de Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14280, 12, 'BR', NULL, NULL, 'Cachoeira do Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14281, 12, 'BR', NULL, NULL, 'Caibi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14282, 12, 'BR', NULL, NULL, 'Calmon')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14283, 12, 'BR', NULL, NULL, 'Camboriú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14284, 12, 'BR', NULL, NULL, 'Cambuinzal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14285, 12, 'BR', NULL, NULL, 'Campeche')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14286, 12, 'BR', NULL, NULL, 'Campinas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14287, 12, 'BR', NULL, NULL, 'Campo Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14288, 12, 'BR', NULL, NULL, 'Campo Belo do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14289, 12, 'BR', NULL, NULL, 'Campo Erê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14290, 12, 'BR', NULL, NULL, 'Campos Novos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14291, 12, 'BR', NULL, NULL, 'Canasvieiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14292, 12, 'BR', NULL, NULL, 'Canelinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14293, 12, 'BR', NULL, NULL, 'Canoas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14294, 12, 'BR', NULL, NULL, 'Canoinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14295, 12, 'BR', NULL, NULL, 'Capinzal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14296, 12, 'BR', NULL, NULL, 'Capivari de Baixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14297, 12, 'BR', NULL, NULL, 'Capão Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14298, 12, 'BR', NULL, NULL, 'Caraíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14299, 12, 'BR', NULL, NULL, 'Catanduvas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14300, 12, 'BR', NULL, NULL, 'Catuíra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14301, 12, 'BR', NULL, NULL, 'Caxambu do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14302, 12, 'BR', NULL, NULL, 'Caçador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14303, 12, 'BR', NULL, NULL, 'Cedro Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14304, 12, 'BR', NULL, NULL, 'Celso Ramos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14305, 12, 'BR', NULL, NULL, 'Cerro Negro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14306, 12, 'BR', NULL, NULL, 'Chapadão do Lageado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14307, 12, 'BR', NULL, NULL, 'Chapecó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14308, 12, 'BR', NULL, NULL, 'Claraíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14309, 12, 'BR', NULL, NULL, 'Cocal do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14310, 12, 'BR', NULL, NULL, 'Colônia Santa Tereza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14311, 12, 'BR', NULL, NULL, 'Concórdia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14312, 12, 'BR', NULL, NULL, 'Cordilheira Alta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14313, 12, 'BR', NULL, NULL, 'Coronel Freitas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14314, 12, 'BR', NULL, NULL, 'Coronel Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14315, 12, 'BR', NULL, NULL, 'Correia Pinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14316, 12, 'BR', NULL, NULL, 'Corupá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14317, 12, 'BR', NULL, NULL, 'Criciúma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14318, 12, 'BR', NULL, NULL, 'Cunha Porã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14319, 12, 'BR', NULL, NULL, 'Cunhataí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14320, 12, 'BR', NULL, NULL, 'Curitibanos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14321, 12, 'BR', NULL, NULL, 'Dal Pai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14322, 12, 'BR', NULL, NULL, 'Dalbérgia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14323, 12, 'BR', NULL, NULL, 'Descanso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14324, 12, 'BR', NULL, NULL, 'Dionísio Cerqueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14325, 12, 'BR', NULL, NULL, 'Dona Emma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14326, 12, 'BR', NULL, NULL, 'Doutor Pedrinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14327, 12, 'BR', NULL, NULL, 'Engenho Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14328, 12, 'BR', NULL, NULL, 'Enseada de Brito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14329, 12, 'BR', NULL, NULL, 'Entre Rios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14330, 12, 'BR', NULL, NULL, 'Ermo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14331, 12, 'BR', NULL, NULL, 'Erval Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14332, 12, 'BR', NULL, NULL, 'Espinilho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14333, 12, 'BR', NULL, NULL, 'Estação Cocal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14334, 12, 'BR', NULL, NULL, 'Faxinal dos Guedes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14335, 12, 'BR', NULL, NULL, 'Fazenda Zandavalli')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14336, 12, 'BR', NULL, NULL, 'Felipe Schmidt')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14337, 12, 'BR', NULL, NULL, 'Figueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14338, 12, 'BR', NULL, NULL, 'Flor do Sertão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14339, 12, 'BR', NULL, NULL, 'Formosa do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14340, 12, 'BR', NULL, NULL, 'Forquilhinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14341, 12, 'BR', NULL, NULL, 'Fragosos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14342, 12, 'BR', NULL, NULL, 'Fraiburgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14343, 12, 'BR', NULL, NULL, 'Frederico Wastner')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14344, 12, 'BR', NULL, NULL, 'Frei Rogério')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14345, 12, 'BR', NULL, NULL, 'Galvão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14346, 12, 'BR', NULL, NULL, 'Garcia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14347, 12, 'BR', NULL, NULL, 'Garopaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14348, 12, 'BR', NULL, NULL, 'Garuva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14349, 12, 'BR', NULL, NULL, 'Gaspar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14350, 12, 'BR', NULL, NULL, 'Goio-En')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14351, 12, 'BR', NULL, NULL, 'Governador Celso Ramos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14352, 12, 'BR', NULL, NULL, 'Gravatal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14353, 12, 'BR', NULL, NULL, 'Grápia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14354, 12, 'BR', NULL, NULL, 'Grão Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14355, 12, 'BR', NULL, NULL, 'Guabiruba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14356, 12, 'BR', NULL, NULL, 'Guaporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14357, 12, 'BR', NULL, NULL, 'Guaraciaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14358, 12, 'BR', NULL, NULL, 'Guaramirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14359, 12, 'BR', NULL, NULL, 'Guarujá do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14360, 12, 'BR', NULL, NULL, 'Guatambú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14361, 12, 'BR', NULL, NULL, 'Guatá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14362, 12, 'BR', NULL, NULL, 'Herciliópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14363, 12, 'BR', NULL, NULL, 'Hercílio Luz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14364, 12, 'BR', NULL, NULL, 'Herval D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14365, 12, 'BR', NULL, NULL, 'Ibiam')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14366, 12, 'BR', NULL, NULL, 'Ibicaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14367, 12, 'BR', NULL, NULL, 'Ibicuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14368, 12, 'BR', NULL, NULL, 'Ibirama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14369, 12, 'BR', NULL, NULL, 'Idamar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14370, 12, 'BR', NULL, NULL, 'Ilhota')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14371, 12, 'BR', NULL, NULL, 'Imaruí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14372, 12, 'BR', NULL, NULL, 'Imbituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14373, 12, 'BR', NULL, NULL, 'Imbuia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14374, 12, 'BR', NULL, NULL, 'Indaial')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14375, 12, 'BR', NULL, NULL, 'Ingleses do Rio Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14376, 12, 'BR', NULL, NULL, 'Invernada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14377, 12, 'BR', NULL, NULL, 'Iomerê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14378, 12, 'BR', NULL, NULL, 'Ipira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14379, 12, 'BR', NULL, NULL, 'Ipoméia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14380, 12, 'BR', NULL, NULL, 'Iporã do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14381, 12, 'BR', NULL, NULL, 'Ipuaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14382, 12, 'BR', NULL, NULL, 'Ipumirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14383, 12, 'BR', NULL, NULL, 'Iraceminha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14384, 12, 'BR', NULL, NULL, 'Irakitan')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14385, 12, 'BR', NULL, NULL, 'Irani')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14386, 12, 'BR', NULL, NULL, 'Iraputã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14387, 12, 'BR', NULL, NULL, 'Irati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14388, 12, 'BR', NULL, NULL, 'Irineópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14389, 12, 'BR', NULL, NULL, 'Itaió')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14390, 12, 'BR', NULL, NULL, 'Itaiópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14391, 12, 'BR', NULL, NULL, 'Itajaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14392, 12, 'BR', NULL, NULL, 'Itajubá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14393, 12, 'BR', NULL, NULL, 'Itapema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14394, 12, 'BR', NULL, NULL, 'Itapiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14395, 12, 'BR', NULL, NULL, 'Itapocu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14396, 12, 'BR', NULL, NULL, 'Itapoá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14397, 12, 'BR', NULL, NULL, 'Itoupava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14398, 12, 'BR', NULL, NULL, 'Ituporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14399, 12, 'BR', NULL, NULL, 'Itá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14400, 12, 'BR', NULL, NULL, 'Içara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14401, 12, 'BR', NULL, NULL, 'Jaborá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14402, 12, 'BR', NULL, NULL, 'Jacinto Machado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14403, 12, 'BR', NULL, NULL, 'Jaguaruna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14404, 12, 'BR', NULL, NULL, 'Jaraguá do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14405, 12, 'BR', NULL, NULL, 'Jardinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14406, 12, 'BR', NULL, NULL, 'Joaçaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14407, 12, 'BR', NULL, NULL, 'Jorge Lacerda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14408, 12, 'BR', NULL, NULL, 'José Boiteux')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14409, 12, 'BR', NULL, NULL, 'Jupiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14410, 12, 'BR', NULL, NULL, 'Lacerdópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14411, 12, 'BR', NULL, NULL, 'Lages')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14412, 12, 'BR', NULL, NULL, 'Lagoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14413, 12, 'BR', NULL, NULL, 'Lagoa da Estiva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14414, 12, 'BR', NULL, NULL, 'Laguna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14415, 12, 'BR', NULL, NULL, 'Lajeado Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14416, 12, 'BR', NULL, NULL, 'Laurentino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14417, 12, 'BR', NULL, NULL, 'Lauro Müller')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14418, 12, 'BR', NULL, NULL, 'Lebon Régis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14419, 12, 'BR', NULL, NULL, 'Leoberto Leal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14420, 12, 'BR', NULL, NULL, 'Leão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14421, 12, 'BR', NULL, NULL, 'Lindóia do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14422, 12, 'BR', NULL, NULL, 'Linha das Palmeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14423, 12, 'BR', NULL, NULL, 'Lontras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14424, 12, 'BR', NULL, NULL, 'Lourdes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14425, 12, 'BR', NULL, NULL, 'Luiz Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14426, 12, 'BR', NULL, NULL, 'Luzerna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14427, 12, 'BR', NULL, NULL, 'Machados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14428, 12, 'BR', NULL, NULL, 'Macieira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14429, 12, 'BR', NULL, NULL, 'Mafra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14430, 12, 'BR', NULL, NULL, 'Major Gercino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14431, 12, 'BR', NULL, NULL, 'Major Vieira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14432, 12, 'BR', NULL, NULL, 'Maracajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14433, 12, 'BR', NULL, NULL, 'Marari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14434, 12, 'BR', NULL, NULL, 'Maratá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14435, 12, 'BR', NULL, NULL, 'Maravilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14436, 12, 'BR', NULL, NULL, 'Marcílio Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14437, 12, 'BR', NULL, NULL, 'Marechal Bormann')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14438, 12, 'BR', NULL, NULL, 'Marema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14439, 12, 'BR', NULL, NULL, 'Mariflor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14440, 12, 'BR', NULL, NULL, 'Marombas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14441, 12, 'BR', NULL, NULL, 'Marombas Bossardi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14442, 12, 'BR', NULL, NULL, 'Massaranduba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14443, 12, 'BR', NULL, NULL, 'Matos Costa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14444, 12, 'BR', NULL, NULL, 'Meleiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14445, 12, 'BR', NULL, NULL, 'Mirador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14446, 12, 'BR', NULL, NULL, 'Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14447, 12, 'BR', NULL, NULL, 'Mirim Doce')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14448, 12, 'BR', NULL, NULL, 'Modelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14449, 12, 'BR', NULL, NULL, 'Mondaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14450, 12, 'BR', NULL, NULL, 'Monte Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14451, 12, 'BR', NULL, NULL, 'Monte Carlo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14452, 12, 'BR', NULL, NULL, 'Monte Castelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14453, 12, 'BR', NULL, NULL, 'Morro Chato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14454, 12, 'BR', NULL, NULL, 'Morro Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14455, 12, 'BR', NULL, NULL, 'Morro da Fumaça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14456, 12, 'BR', NULL, NULL, 'Navegantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14457, 12, 'BR', NULL, NULL, 'Nossa Senhora de Caravaggio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14458, 12, 'BR', NULL, NULL, 'Nova Cultura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14459, 12, 'BR', NULL, NULL, 'Nova Erechim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14460, 12, 'BR', NULL, NULL, 'Nova Guarita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14461, 12, 'BR', NULL, NULL, 'Nova Itaberaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14462, 12, 'BR', NULL, NULL, 'Nova Petrópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14463, 12, 'BR', NULL, NULL, 'Nova Teutônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14464, 12, 'BR', NULL, NULL, 'Nova Trento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14465, 12, 'BR', NULL, NULL, 'Nova Veneza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14466, 12, 'BR', NULL, NULL, 'Novo Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14467, 12, 'BR', NULL, NULL, 'Orleans')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14468, 12, 'BR', NULL, NULL, 'Otacílio Costa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14469, 12, 'BR', NULL, NULL, 'Ouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14470, 12, 'BR', NULL, NULL, 'Ouro Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14471, 12, 'BR', NULL, NULL, 'Paial')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14472, 12, 'BR', NULL, NULL, 'Painel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14473, 12, 'BR', NULL, NULL, 'Palhoça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14474, 12, 'BR', NULL, NULL, 'Palma Sola')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14475, 12, 'BR', NULL, NULL, 'Palmitos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14476, 12, 'BR', NULL, NULL, 'Papanduva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14477, 12, 'BR', NULL, NULL, 'Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14478, 12, 'BR', NULL, NULL, 'Passo Manso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14479, 12, 'BR', NULL, NULL, 'Passo de Torres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14480, 12, 'BR', NULL, NULL, 'Passos Maia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14481, 12, 'BR', NULL, NULL, 'Paula Pereira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14482, 12, 'BR', NULL, NULL, 'Paulo Lopes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14483, 12, 'BR', NULL, NULL, 'Pedras Grandes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14484, 12, 'BR', NULL, NULL, 'Penha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14485, 12, 'BR', NULL, NULL, 'Pericó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14486, 12, 'BR', NULL, NULL, 'Peritiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14487, 12, 'BR', NULL, NULL, 'Pescaria Brava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14488, 12, 'BR', NULL, NULL, 'Petrolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14489, 12, 'BR', NULL, NULL, 'Pindotiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14490, 12, 'BR', NULL, NULL, 'Pinhalzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14491, 12, 'BR', NULL, NULL, 'Pinheiral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14492, 12, 'BR', NULL, NULL, 'Pinheiro Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14493, 12, 'BR', NULL, NULL, 'Pinheiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14494, 12, 'BR', NULL, NULL, 'Pirabeiraba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14495, 12, 'BR', NULL, NULL, 'Piratuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14496, 12, 'BR', NULL, NULL, 'Planalto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14497, 12, 'BR', NULL, NULL, 'Planalto Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14498, 12, 'BR', NULL, NULL, 'Pomerode')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14499, 12, 'BR', NULL, NULL, 'Ponte Alta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14500, 12, 'BR', NULL, NULL, 'Ponte Alta do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14501, 12, 'BR', NULL, NULL, 'Ponte Serrada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14502, 12, 'BR', NULL, NULL, 'Porto Belo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14503, 12, 'BR', NULL, NULL, 'Porto União')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14504, 12, 'BR', NULL, NULL, 'Pouso Redondo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14505, 12, 'BR', NULL, NULL, 'Poço Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14506, 12, 'BR', NULL, NULL, 'Praia Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14507, 12, 'BR', NULL, NULL, 'Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14508, 12, 'BR', NULL, NULL, 'Presidente Castelo Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14509, 12, 'BR', NULL, NULL, 'Presidente Getúlio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14510, 12, 'BR', NULL, NULL, 'Presidente Juscelino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14511, 12, 'BR', NULL, NULL, 'Presidente Kennedy')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14512, 12, 'BR', NULL, NULL, 'Presidente Nereu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14513, 12, 'BR', NULL, NULL, 'Princesa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14514, 12, 'BR', NULL, NULL, 'Pântano do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14515, 12, 'BR', NULL, NULL, 'Quarta Linha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14516, 12, 'BR', NULL, NULL, 'Quilombo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14517, 12, 'BR', NULL, NULL, 'Quilômetro Doze')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14518, 12, 'BR', NULL, NULL, 'Rancho Queimado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14519, 12, 'BR', NULL, NULL, 'Ratones')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14520, 12, 'BR', NULL, NULL, 'Residência Fuck')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14521, 12, 'BR', NULL, NULL, 'Ribeirão Pequeno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14522, 12, 'BR', NULL, NULL, 'Ribeirão da Ilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14523, 12, 'BR', NULL, NULL, 'Rio Antinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14524, 12, 'BR', NULL, NULL, 'Rio Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14525, 12, 'BR', NULL, NULL, 'Rio D''Una')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14526, 12, 'BR', NULL, NULL, 'Rio Fortuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14527, 12, 'BR', NULL, NULL, 'Rio Maina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14528, 12, 'BR', NULL, NULL, 'Rio Negrinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14529, 12, 'BR', NULL, NULL, 'Rio Preto do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14530, 12, 'BR', NULL, NULL, 'Rio Rufino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14531, 12, 'BR', NULL, NULL, 'Rio da Anta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14532, 12, 'BR', NULL, NULL, 'Rio da Luz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14533, 12, 'BR', NULL, NULL, 'Rio das Antas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14534, 12, 'BR', NULL, NULL, 'Rio das Furnas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14535, 12, 'BR', NULL, NULL, 'Rio do Campo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14536, 12, 'BR', NULL, NULL, 'Rio do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14537, 12, 'BR', NULL, NULL, 'Rio do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14538, 12, 'BR', NULL, NULL, 'Rio dos Bugres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14539, 12, 'BR', NULL, NULL, 'Rio dos Cedros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14540, 12, 'BR', NULL, NULL, 'Riqueza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14541, 12, 'BR', NULL, NULL, 'Rodeio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14542, 12, 'BR', NULL, NULL, 'Romelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14543, 12, 'BR', NULL, NULL, 'Sai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14544, 12, 'BR', NULL, NULL, 'Salete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14545, 12, 'BR', NULL, NULL, 'Saltinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14546, 12, 'BR', NULL, NULL, 'Salto Veloso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14547, 12, 'BR', NULL, NULL, 'Sanga da Toca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14548, 12, 'BR', NULL, NULL, 'Sangão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14549, 12, 'BR', NULL, NULL, 'Santa Cecília')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14550, 12, 'BR', NULL, NULL, 'Santa Cruz do Timbó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14551, 12, 'BR', NULL, NULL, 'Santa Izabel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14552, 12, 'BR', NULL, NULL, 'Santa Lúcia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14553, 12, 'BR', NULL, NULL, 'Santa Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14554, 12, 'BR', NULL, NULL, 'Santa Rosa de Lima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14555, 12, 'BR', NULL, NULL, 'Santa Rosa do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14556, 12, 'BR', NULL, NULL, 'Santa Terezinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14557, 12, 'BR', NULL, NULL, 'Santa Terezinha do Progresso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14558, 12, 'BR', NULL, NULL, 'Santa Terezinha do Salto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14559, 12, 'BR', NULL, NULL, 'Santiago do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14560, 12, 'BR', NULL, NULL, 'Santo Amaro da Imperatriz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14561, 12, 'BR', NULL, NULL, 'Santo Antônio de Lisboa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14562, 12, 'BR', NULL, NULL, 'Sapiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14563, 12, 'BR', NULL, NULL, 'Saudades')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14564, 12, 'BR', NULL, NULL, 'Schroeder')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14565, 12, 'BR', NULL, NULL, 'Seara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14566, 12, 'BR', NULL, NULL, 'Sede Oldemburg')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14567, 12, 'BR', NULL, NULL, 'Serra Alta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14568, 12, 'BR', NULL, NULL, 'Siderópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14569, 12, 'BR', NULL, NULL, 'Sombrio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14570, 12, 'BR', NULL, NULL, 'Sorocaba do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14571, 12, 'BR', NULL, NULL, 'Sul Brasil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14572, 12, 'BR', NULL, NULL, 'São Bento Baixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14573, 12, 'BR', NULL, NULL, 'São Bento do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14574, 12, 'BR', NULL, NULL, 'São Bernardino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14575, 12, 'BR', NULL, NULL, 'São Bonifácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14576, 12, 'BR', NULL, NULL, 'São Carlos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14577, 12, 'BR', NULL, NULL, 'São Cristóvão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14578, 12, 'BR', NULL, NULL, 'São Cristóvão do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14579, 12, 'BR', NULL, NULL, 'São Defende')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14580, 12, 'BR', NULL, NULL, 'São Domingos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14581, 12, 'BR', NULL, NULL, 'São Francisco do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14582, 12, 'BR', NULL, NULL, 'São Gabriel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14583, 12, 'BR', NULL, NULL, 'São Joaquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14584, 12, 'BR', NULL, NULL, 'São José do Cedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14585, 12, 'BR', NULL, NULL, 'São José do Cerrito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14586, 12, 'BR', NULL, NULL, 'São José do Laranjal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14587, 12, 'BR', NULL, NULL, 'São João Batista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14588, 12, 'BR', NULL, NULL, 'São João do Itaperiú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14589, 12, 'BR', NULL, NULL, 'São João do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14590, 12, 'BR', NULL, NULL, 'São João do Rio Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14591, 12, 'BR', NULL, NULL, 'São João do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14592, 12, 'BR', NULL, NULL, 'São Leonardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14593, 12, 'BR', NULL, NULL, 'São Lourenço do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14594, 12, 'BR', NULL, NULL, 'São Ludgero')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14595, 12, 'BR', NULL, NULL, 'São Martinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14596, 12, 'BR', NULL, NULL, 'São Miguel da Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14597, 12, 'BR', NULL, NULL, 'São Miguel da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14598, 12, 'BR', NULL, NULL, 'São Miguel do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14599, 12, 'BR', NULL, NULL, 'São Pedro Tobias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14600, 12, 'BR', NULL, NULL, 'São Pedro de Alcântara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14601, 12, 'BR', NULL, NULL, 'São Roque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14602, 12, 'BR', NULL, NULL, 'São Sebastião do Arvoredo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14603, 12, 'BR', NULL, NULL, 'São Sebastião do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14604, 12, 'BR', NULL, NULL, 'Taió')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14605, 12, 'BR', NULL, NULL, 'Tangará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14606, 12, 'BR', NULL, NULL, 'Taquara Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14607, 12, 'BR', NULL, NULL, 'Taquaras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14608, 12, 'BR', NULL, NULL, 'Tigipió')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14609, 12, 'BR', NULL, NULL, 'Tigrinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14610, 12, 'BR', NULL, NULL, 'Tijucas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14611, 12, 'BR', NULL, NULL, 'Timbé do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14612, 12, 'BR', NULL, NULL, 'Timbó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14613, 12, 'BR', NULL, NULL, 'Timbó Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14614, 12, 'BR', NULL, NULL, 'Treviso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14615, 12, 'BR', NULL, NULL, 'Treze Tílias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14616, 12, 'BR', NULL, NULL, 'Treze de Maio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14617, 12, 'BR', NULL, NULL, 'Trombudo Central')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14618, 12, 'BR', NULL, NULL, 'Três Barras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14619, 12, 'BR', NULL, NULL, 'Tubarão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14620, 12, 'BR', NULL, NULL, 'Tunápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14621, 12, 'BR', NULL, NULL, 'Tupitinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14622, 12, 'BR', NULL, NULL, 'Turvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14623, 12, 'BR', NULL, NULL, 'União do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14624, 12, 'BR', NULL, NULL, 'Urubici')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14625, 12, 'BR', NULL, NULL, 'Uruguai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14626, 12, 'BR', NULL, NULL, 'Urupema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14627, 12, 'BR', NULL, NULL, 'Urussanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14628, 12, 'BR', NULL, NULL, 'Vargem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14629, 12, 'BR', NULL, NULL, 'Vargem Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14630, 12, 'BR', NULL, NULL, 'Vargem do Cedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14631, 12, 'BR', NULL, NULL, 'Vargeão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14632, 12, 'BR', NULL, NULL, 'Vidal Ramos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14633, 12, 'BR', NULL, NULL, 'Videira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14634, 12, 'BR', NULL, NULL, 'Vila Conceição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14635, 12, 'BR', NULL, NULL, 'Vila Milani')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14636, 12, 'BR', NULL, NULL, 'Vila Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14637, 12, 'BR', NULL, NULL, 'Vila de Volta Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14638, 12, 'BR', NULL, NULL, 'Vítor Meireles')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14639, 12, 'BR', NULL, NULL, 'Witmarsum')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14640, 12, 'BR', NULL, NULL, 'Xanxerê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14641, 12, 'BR', NULL, NULL, 'Xavantina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14642, 12, 'BR', NULL, NULL, 'Xaxim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14643, 12, 'BR', NULL, NULL, 'Zortéa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14644, 12, 'BR', NULL, NULL, 'Água Doce')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14645, 12, 'BR', NULL, NULL, 'Águas Brancas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14646, 12, 'BR', NULL, NULL, 'Águas Claras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14647, 12, 'BR', NULL, NULL, 'Águas Frias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14648, 12, 'BR', NULL, NULL, 'Águas Mornas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14649, 12, 'BR', NULL, NULL, 'Águas de Chapecó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14650, 12, 'BR', NULL, NULL, 'Índios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14651, 14, 'BR', NULL, NULL, 'Albuquerque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14652, 14, 'BR', NULL, NULL, 'Alcinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14653, 14, 'BR', NULL, NULL, 'Alto Sucuriú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14654, 14, 'BR', NULL, NULL, 'Amambaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14655, 14, 'BR', NULL, NULL, 'Amandina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14656, 14, 'BR', NULL, NULL, 'Amolar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14657, 14, 'BR', NULL, NULL, 'Anastácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14658, 14, 'BR', NULL, NULL, 'Anaurilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14659, 14, 'BR', NULL, NULL, 'Angélica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14660, 14, 'BR', NULL, NULL, 'Anhandui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14661, 14, 'BR', NULL, NULL, 'Antônio João')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14662, 14, 'BR', NULL, NULL, 'Aparecida do Taboado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14663, 14, 'BR', NULL, NULL, 'Aquidauana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14664, 14, 'BR', NULL, NULL, 'Aral Moreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14665, 14, 'BR', NULL, NULL, 'Arapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14666, 14, 'BR', NULL, NULL, 'Areado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14667, 14, 'BR', NULL, NULL, 'Baianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14668, 14, 'BR', NULL, NULL, 'Bandeirantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14669, 14, 'BR', NULL, NULL, 'Bataguassu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14670, 14, 'BR', NULL, NULL, 'Bataiporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14671, 14, 'BR', NULL, NULL, 'Baús')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14672, 14, 'BR', NULL, NULL, 'Bela Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14673, 14, 'BR', NULL, NULL, 'Bocajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14674, 14, 'BR', NULL, NULL, 'Bodoquena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14675, 14, 'BR', NULL, NULL, 'Bom Fim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14676, 14, 'BR', NULL, NULL, 'Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14677, 14, 'BR', NULL, NULL, 'Boqueirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14678, 14, 'BR', NULL, NULL, 'Brasilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14679, 14, 'BR', NULL, NULL, 'Bálsamo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14680, 14, 'BR', NULL, NULL, 'Caarapó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14681, 14, 'BR', NULL, NULL, 'Cabeceira do Apá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14682, 14, 'BR', NULL, NULL, 'Cachoeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14683, 14, 'BR', NULL, NULL, 'Camapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14684, 14, 'BR', NULL, NULL, 'Camisão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14685, 14, 'BR', NULL, NULL, 'Campestre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14686, 14, 'BR', NULL, NULL, 'Campo Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14687, 14, 'BR', NULL, NULL, 'Capão Seco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14688, 14, 'BR', NULL, NULL, 'Caracol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14689, 14, 'BR', NULL, NULL, 'Carumbé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14690, 14, 'BR', NULL, NULL, 'Cassilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14691, 14, 'BR', NULL, NULL, 'Chapadão do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14692, 14, 'BR', NULL, NULL, 'Cipolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14693, 14, 'BR', NULL, NULL, 'Coimbra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14694, 14, 'BR', NULL, NULL, 'Congonhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14695, 14, 'BR', NULL, NULL, 'Corguinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14696, 14, 'BR', NULL, NULL, 'Coronel Sapucaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14697, 14, 'BR', NULL, NULL, 'Corumbá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14698, 14, 'BR', NULL, NULL, 'Costa Rica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14699, 14, 'BR', NULL, NULL, 'Coxim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14700, 14, 'BR', NULL, NULL, 'Cristalina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14701, 14, 'BR', NULL, NULL, 'Cruzaltina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14702, 14, 'BR', NULL, NULL, 'Culturama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14703, 14, 'BR', NULL, NULL, 'Cupins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14704, 14, 'BR', NULL, NULL, 'Debrasa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14705, 14, 'BR', NULL, NULL, 'Deodápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14706, 14, 'BR', NULL, NULL, 'Dois Irmãos do Buriti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14707, 14, 'BR', NULL, NULL, 'Douradina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14708, 14, 'BR', NULL, NULL, 'Eldorado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14709, 14, 'BR', NULL, NULL, 'Figueirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14710, 14, 'BR', NULL, NULL, 'Fátima do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14711, 14, 'BR', NULL, NULL, 'Garcias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14712, 14, 'BR', NULL, NULL, 'Glória de Dourados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14713, 14, 'BR', NULL, NULL, 'Guadalupe do Alto Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14714, 14, 'BR', NULL, NULL, 'Guaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14715, 14, 'BR', NULL, NULL, 'Guaçulândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14716, 14, 'BR', NULL, NULL, 'Guia Lopes da Laguna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14717, 14, 'BR', NULL, NULL, 'Iguatemi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14718, 14, 'BR', NULL, NULL, 'Ilha Comprida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14719, 14, 'BR', NULL, NULL, 'Ilha Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14720, 14, 'BR', NULL, NULL, 'Indaiá Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14721, 14, 'BR', NULL, NULL, 'Indaiá do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14722, 14, 'BR', NULL, NULL, 'Indápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14723, 14, 'BR', NULL, NULL, 'Inocência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14724, 14, 'BR', NULL, NULL, 'Ipezal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14725, 14, 'BR', NULL, NULL, 'Itahum')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14726, 14, 'BR', NULL, NULL, 'Itaporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14727, 14, 'BR', NULL, NULL, 'Itaquiraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14728, 14, 'BR', NULL, NULL, 'Ivinhema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14729, 14, 'BR', NULL, NULL, 'Jabuti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14730, 14, 'BR', NULL, NULL, 'Jacareí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14731, 14, 'BR', NULL, NULL, 'Japorã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14732, 14, 'BR', NULL, NULL, 'Jaraguari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14733, 14, 'BR', NULL, NULL, 'Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14734, 14, 'BR', NULL, NULL, 'Jateí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14735, 14, 'BR', NULL, NULL, 'Jauru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14736, 14, 'BR', NULL, NULL, 'Juscelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14737, 14, 'BR', NULL, NULL, 'Jutí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14738, 14, 'BR', NULL, NULL, 'Ladário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14739, 14, 'BR', NULL, NULL, 'Lagoa Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14740, 14, 'BR', NULL, NULL, 'Laguna Carapã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14741, 14, 'BR', NULL, NULL, 'Maracaju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14742, 14, 'BR', NULL, NULL, 'Miranda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14743, 14, 'BR', NULL, NULL, 'Montese')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14744, 14, 'BR', NULL, NULL, 'Morangas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14745, 14, 'BR', NULL, NULL, 'Morraria do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14746, 14, 'BR', NULL, NULL, 'Morumbi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14747, 14, 'BR', NULL, NULL, 'Mundo Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14748, 14, 'BR', NULL, NULL, 'Naviraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14749, 14, 'BR', NULL, NULL, 'Nhecolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14750, 14, 'BR', NULL, NULL, 'Nioaque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14751, 14, 'BR', NULL, NULL, 'Nossa Senhora de Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14752, 14, 'BR', NULL, NULL, 'Nova Alvorada do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14753, 14, 'BR', NULL, NULL, 'Nova América')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14754, 14, 'BR', NULL, NULL, 'Nova Andradina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14755, 14, 'BR', NULL, NULL, 'Nova Casa Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14756, 14, 'BR', NULL, NULL, 'Nova Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14757, 14, 'BR', NULL, NULL, 'Nova Jales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14758, 14, 'BR', NULL, NULL, 'Novo Horizonte do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14759, 14, 'BR', NULL, NULL, 'Oriente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14760, 14, 'BR', NULL, NULL, 'Paiaguás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14761, 14, 'BR', NULL, NULL, 'Palmeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14762, 14, 'BR', NULL, NULL, 'Panambi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14763, 14, 'BR', NULL, NULL, 'Paranaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14764, 14, 'BR', NULL, NULL, 'Paranhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14765, 14, 'BR', NULL, NULL, 'Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14766, 14, 'BR', NULL, NULL, 'Pedro Gomes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14767, 14, 'BR', NULL, NULL, 'Picadinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14768, 14, 'BR', NULL, NULL, 'Pirapora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14769, 14, 'BR', NULL, NULL, 'Piraputanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14770, 14, 'BR', NULL, NULL, 'Ponta Porã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14771, 14, 'BR', NULL, NULL, 'Ponte Vermelha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14772, 14, 'BR', NULL, NULL, 'Pontinha do Cocho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14773, 14, 'BR', NULL, NULL, 'Porto Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14774, 14, 'BR', NULL, NULL, 'Porto Murtinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14775, 14, 'BR', NULL, NULL, 'Porto Vilma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14776, 14, 'BR', NULL, NULL, 'Porto XV de Novembro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14777, 14, 'BR', NULL, NULL, 'Presidente Castelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14778, 14, 'BR', NULL, NULL, 'Prudêncio Thomaz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14779, 14, 'BR', NULL, NULL, 'Quebra Côco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14780, 14, 'BR', NULL, NULL, 'Quebracho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14781, 14, 'BR', NULL, NULL, 'Ribas do Rio Pardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14782, 14, 'BR', NULL, NULL, 'Rio Brilhante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14783, 14, 'BR', NULL, NULL, 'Rio Negro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14784, 14, 'BR', NULL, NULL, 'Rio Verde de Mato Grosso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14785, 14, 'BR', NULL, NULL, 'Rochedinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14786, 14, 'BR', NULL, NULL, 'Rochedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14787, 14, 'BR', NULL, NULL, 'Sanga Puitã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14788, 14, 'BR', NULL, NULL, 'Santa Rita do Pardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14789, 14, 'BR', NULL, NULL, 'Santa Terezinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14790, 14, 'BR', NULL, NULL, 'Selvíria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14791, 14, 'BR', NULL, NULL, 'Sete Quedas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14792, 14, 'BR', NULL, NULL, 'Sidrolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14793, 14, 'BR', NULL, NULL, 'Sonora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14794, 14, 'BR', NULL, NULL, 'São Gabriel do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14795, 14, 'BR', NULL, NULL, 'São José do Sucuriú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14796, 14, 'BR', NULL, NULL, 'São João do Apore')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14797, 14, 'BR', NULL, NULL, 'São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14798, 14, 'BR', NULL, NULL, 'São Romão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14799, 14, 'BR', NULL, NULL, 'Tacuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14800, 14, 'BR', NULL, NULL, 'Tamandaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14801, 14, 'BR', NULL, NULL, 'Taquari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14802, 14, 'BR', NULL, NULL, 'Taquarussu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14803, 14, 'BR', NULL, NULL, 'Taunay')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14804, 14, 'BR', NULL, NULL, 'Terenos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14805, 14, 'BR', NULL, NULL, 'Três Lagoas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14806, 14, 'BR', NULL, NULL, 'Velhacaria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14807, 14, 'BR', NULL, NULL, 'Vicentina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14808, 14, 'BR', NULL, NULL, 'Vila Formosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14809, 14, 'BR', NULL, NULL, 'Vila Marques')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14810, 14, 'BR', NULL, NULL, 'Vila Rica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14811, 14, 'BR', NULL, NULL, 'Vila União')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14812, 14, 'BR', NULL, NULL, 'Vila Vargas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14813, 14, 'BR', NULL, NULL, 'Vista Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14814, 14, 'BR', NULL, NULL, 'Água Boa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14815, 14, 'BR', NULL, NULL, 'Água Clara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14816, 14, 'BR', NULL, NULL, 'Árvore Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14817, 15, 'BR', NULL, NULL, 'Abunã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14818, 15, 'BR', NULL, NULL, 'Alta Floresta do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14819, 15, 'BR', NULL, NULL, 'Alto Alegre dos Parecis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14820, 15, 'BR', NULL, NULL, 'Alto Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14821, 15, 'BR', NULL, NULL, 'Alvorada D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14822, 15, 'BR', NULL, NULL, 'Ariquemes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14823, 15, 'BR', NULL, NULL, 'Buritis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14824, 15, 'BR', NULL, NULL, 'Cabixi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14825, 15, 'BR', NULL, NULL, 'Cacaulândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14826, 15, 'BR', NULL, NULL, 'Cacoal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14827, 15, 'BR', NULL, NULL, 'Calama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14828, 15, 'BR', NULL, NULL, 'Campo Novo de Rondônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14829, 15, 'BR', NULL, NULL, 'Candeias do Jamari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14830, 15, 'BR', NULL, NULL, 'Castanheiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14831, 15, 'BR', NULL, NULL, 'Cerejeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14832, 15, 'BR', NULL, NULL, 'Chupinguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14833, 15, 'BR', NULL, NULL, 'Colorado do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14834, 15, 'BR', NULL, NULL, 'Corumbiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14835, 15, 'BR', NULL, NULL, 'Costa Marques')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14836, 15, 'BR', NULL, NULL, 'Cujubim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14837, 15, 'BR', NULL, NULL, 'Espigão D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14838, 15, 'BR', NULL, NULL, 'Governador Jorge Teixeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14839, 15, 'BR', NULL, NULL, 'Guajará-Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14840, 15, 'BR', NULL, NULL, 'Itapuã do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14841, 15, 'BR', NULL, NULL, 'Jaci Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14842, 15, 'BR', NULL, NULL, 'Jaru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14843, 15, 'BR', NULL, NULL, 'Ji-Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14844, 15, 'BR', NULL, NULL, 'Machadinho D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14845, 15, 'BR', NULL, NULL, 'Marco Rondon')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14846, 15, 'BR', NULL, NULL, 'Ministro Andreazza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14847, 15, 'BR', NULL, NULL, 'Mirante da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14848, 15, 'BR', NULL, NULL, 'Monte Negro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14849, 15, 'BR', NULL, NULL, 'Nova Brasilândia D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14850, 15, 'BR', NULL, NULL, 'Nova Mamoré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14851, 15, 'BR', NULL, NULL, 'Nova União')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14852, 15, 'BR', NULL, NULL, 'Nova Vida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14853, 15, 'BR', NULL, NULL, 'Novo Horizonte do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14854, 15, 'BR', NULL, NULL, 'Ouro Preto do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14855, 15, 'BR', NULL, NULL, 'Parecis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14856, 15, 'BR', NULL, NULL, 'Pedras Negras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14857, 15, 'BR', NULL, NULL, 'Pimenta Bueno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14858, 15, 'BR', NULL, NULL, 'Pimenteiras do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14859, 15, 'BR', NULL, NULL, 'Presidente Médici')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14860, 15, 'BR', NULL, NULL, 'Primavera de Rondônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14861, 15, 'BR', NULL, NULL, 'Príncipe da Beira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14862, 15, 'BR', NULL, NULL, 'Rio Crespo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14863, 15, 'BR', NULL, NULL, 'Riozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14864, 15, 'BR', NULL, NULL, 'Rolim de Moura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14865, 15, 'BR', NULL, NULL, 'Santa Luzia D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14866, 15, 'BR', NULL, NULL, 'Seringueiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14867, 15, 'BR', NULL, NULL, 'São Felipe D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14868, 15, 'BR', NULL, NULL, 'São Francisco do Guaporé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14869, 15, 'BR', NULL, NULL, 'São Miguel do Guaporé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14870, 15, 'BR', NULL, NULL, 'Tabajara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14871, 15, 'BR', NULL, NULL, 'Teixeirópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14872, 15, 'BR', NULL, NULL, 'Theobroma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14873, 15, 'BR', NULL, NULL, 'Urupá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14874, 15, 'BR', NULL, NULL, 'Vale do Anari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14875, 15, 'BR', NULL, NULL, 'Vale do Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14876, 15, 'BR', NULL, NULL, 'Vila Extrema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14877, 15, 'BR', NULL, NULL, 'Vilhena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14878, 15, 'BR', NULL, NULL, 'Vista Alegre do Abunã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14879, 18, 'BR', NULL, NULL, 'Acioli')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14880, 18, 'BR', NULL, NULL, 'Afonso Cláudio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14881, 18, 'BR', NULL, NULL, 'Aghá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14882, 18, 'BR', NULL, NULL, 'Airituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14883, 18, 'BR', NULL, NULL, 'Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14884, 18, 'BR', NULL, NULL, 'Alfredo Chaves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14885, 18, 'BR', NULL, NULL, 'Alto Caldeirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14886, 18, 'BR', NULL, NULL, 'Alto Calçado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14887, 18, 'BR', NULL, NULL, 'Alto Castelinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14888, 18, 'BR', NULL, NULL, 'Alto Mutum Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14889, 18, 'BR', NULL, NULL, 'Alto Rio Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14890, 18, 'BR', NULL, NULL, 'Alto Santa Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14891, 18, 'BR', NULL, NULL, 'Anchieta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14892, 18, 'BR', NULL, NULL, 'Anutiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14893, 18, 'BR', NULL, NULL, 'Apiacá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14894, 18, 'BR', NULL, NULL, 'Aracruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14895, 18, 'BR', NULL, NULL, 'Aracui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14896, 18, 'BR', NULL, NULL, 'Aracê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14897, 18, 'BR', NULL, NULL, 'Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14898, 18, 'BR', NULL, NULL, 'Araraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14899, 18, 'BR', NULL, NULL, 'Araçatiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14900, 18, 'BR', NULL, NULL, 'Argolas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14901, 18, 'BR', NULL, NULL, 'Atílio Vivácqua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14902, 18, 'BR', NULL, NULL, 'Baixo Guandu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14903, 18, 'BR', NULL, NULL, 'Barra Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14904, 18, 'BR', NULL, NULL, 'Barra Seca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14905, 18, 'BR', NULL, NULL, 'Barra de Novo Brasil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14906, 18, 'BR', NULL, NULL, 'Barra de São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14907, 18, 'BR', NULL, NULL, 'Barra do Itapemirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14908, 18, 'BR', NULL, NULL, 'Barra do Riacho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14909, 18, 'BR', NULL, NULL, 'Barra do Sahy')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14910, 18, 'BR', NULL, NULL, 'Baunilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14911, 18, 'BR', NULL, NULL, 'Baía Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14912, 18, 'BR', NULL, NULL, 'Bebedouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14913, 18, 'BR', NULL, NULL, 'Boa Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14914, 18, 'BR', NULL, NULL, 'Boapaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14915, 18, 'BR', NULL, NULL, 'Bom Jesus do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14916, 18, 'BR', NULL, NULL, 'Bonsucesso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14917, 18, 'BR', NULL, NULL, 'Braço do Rio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14918, 18, 'BR', NULL, NULL, 'Brejetuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14919, 18, 'BR', NULL, NULL, 'Burarama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14920, 18, 'BR', NULL, NULL, 'Cachoeirinha de Itaúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14921, 18, 'BR', NULL, NULL, 'Cachoeiro de Itapemirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14922, 18, 'BR', NULL, NULL, 'Café')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14923, 18, 'BR', NULL, NULL, 'Calogi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14924, 18, 'BR', NULL, NULL, 'Carapina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14925, 18, 'BR', NULL, NULL, 'Cariacica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14926, 18, 'BR', NULL, NULL, 'Castelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14927, 18, 'BR', NULL, NULL, 'Celina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14928, 18, 'BR', NULL, NULL, 'Colatina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14929, 18, 'BR', NULL, NULL, 'Conceição da Barra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14930, 18, 'BR', NULL, NULL, 'Conceição do Castelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14931, 18, 'BR', NULL, NULL, 'Conceição do Muqui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14932, 18, 'BR', NULL, NULL, 'Conduru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14933, 18, 'BR', NULL, NULL, 'Cotaxé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14934, 18, 'BR', NULL, NULL, 'Cristal do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14935, 18, 'BR', NULL, NULL, 'Crubixá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14936, 18, 'BR', NULL, NULL, 'Câmara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14937, 18, 'BR', NULL, NULL, 'Córrego dos Monos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14938, 18, 'BR', NULL, NULL, 'Desengano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14939, 18, 'BR', NULL, NULL, 'Divino Espírito Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14940, 18, 'BR', NULL, NULL, 'Divino de São Lourenço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14941, 18, 'BR', NULL, NULL, 'Djalma Coutinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14942, 18, 'BR', NULL, NULL, 'Domingos Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14943, 18, 'BR', NULL, NULL, 'Dona América')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14944, 18, 'BR', NULL, NULL, 'Dores do Rio Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14945, 18, 'BR', NULL, NULL, 'Duas Barras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14946, 18, 'BR', NULL, NULL, 'Ecoporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14947, 18, 'BR', NULL, NULL, 'Estrela do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14948, 18, 'BR', NULL, NULL, 'Fartura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14949, 18, 'BR', NULL, NULL, 'Fazenda Guandu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14950, 18, 'BR', NULL, NULL, 'Fundão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14951, 18, 'BR', NULL, NULL, 'Garrafão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14952, 18, 'BR', NULL, NULL, 'Gironda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14953, 18, 'BR', NULL, NULL, 'Goiabeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14954, 18, 'BR', NULL, NULL, 'Governador Lacerda de Aguiar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14955, 18, 'BR', NULL, NULL, 'Governador Lindenberg')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14956, 18, 'BR', NULL, NULL, 'Graça Aranha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14957, 18, 'BR', NULL, NULL, 'Gruta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14958, 18, 'BR', NULL, NULL, 'Guarapari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14959, 18, 'BR', NULL, NULL, 'Guararema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14960, 18, 'BR', NULL, NULL, 'Guaçuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14961, 18, 'BR', NULL, NULL, 'Ibatiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14962, 18, 'BR', NULL, NULL, 'Ibes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14963, 18, 'BR', NULL, NULL, 'Ibicaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14964, 18, 'BR', NULL, NULL, 'Ibiraçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14965, 18, 'BR', NULL, NULL, 'Ibitirama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14966, 18, 'BR', NULL, NULL, 'Ibitiruí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14967, 18, 'BR', NULL, NULL, 'Ibituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14968, 18, 'BR', NULL, NULL, 'Iconha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14969, 18, 'BR', NULL, NULL, 'Imburana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14970, 18, 'BR', NULL, NULL, 'Iriritiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14971, 18, 'BR', NULL, NULL, 'Irundi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14972, 18, 'BR', NULL, NULL, 'Irupi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14973, 18, 'BR', NULL, NULL, 'Isabel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14974, 18, 'BR', NULL, NULL, 'Itabaiana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14975, 18, 'BR', NULL, NULL, 'Itaguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14976, 18, 'BR', NULL, NULL, 'Itaicí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14977, 18, 'BR', NULL, NULL, 'Itaimbé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14978, 18, 'BR', NULL, NULL, 'Itaipava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14979, 18, 'BR', NULL, NULL, 'Itamira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14980, 18, 'BR', NULL, NULL, 'Itapecoá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14981, 18, 'BR', NULL, NULL, 'Itapemirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14982, 18, 'BR', NULL, NULL, 'Itaperuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14983, 18, 'BR', NULL, NULL, 'Itapina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14984, 18, 'BR', NULL, NULL, 'Itaquari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14985, 18, 'BR', NULL, NULL, 'Itarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14986, 18, 'BR', NULL, NULL, 'Itauninhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14987, 18, 'BR', NULL, NULL, 'Itaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14988, 18, 'BR', NULL, NULL, 'Itaóca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14989, 18, 'BR', NULL, NULL, 'Itaúnas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14990, 18, 'BR', NULL, NULL, 'Iúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14991, 18, 'BR', NULL, NULL, 'Jabaquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14992, 18, 'BR', NULL, NULL, 'Jacaraipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14993, 18, 'BR', NULL, NULL, 'Jaciguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14994, 18, 'BR', NULL, NULL, 'Jacupemba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14995, 18, 'BR', NULL, NULL, 'Jaguaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14996, 18, 'BR', NULL, NULL, 'Jerônimo Monteiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14997, 18, 'BR', NULL, NULL, 'Joatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14998, 18, 'BR', NULL, NULL, 'Joaçuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (14999, 18, 'BR', NULL, NULL, 'José Carlos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15000, 18, 'BR', NULL, NULL, 'João Neiva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15001, 18, 'BR', NULL, NULL, 'Jucu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15002, 18, 'BR', NULL, NULL, 'Jurama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15003, 18, 'BR', NULL, NULL, 'Lajinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15004, 18, 'BR', NULL, NULL, 'Laranja da Terra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15005, 18, 'BR', NULL, NULL, 'Limoeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15006, 18, 'BR', NULL, NULL, 'Linhares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15007, 18, 'BR', NULL, NULL, 'Mangaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15008, 18, 'BR', NULL, NULL, 'Mantenópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15009, 18, 'BR', NULL, NULL, 'Marataízes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15010, 18, 'BR', NULL, NULL, 'Marechal Floriano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15011, 18, 'BR', NULL, NULL, 'Marilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15012, 18, 'BR', NULL, NULL, 'Matilde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15013, 18, 'BR', NULL, NULL, 'Melgaço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15014, 18, 'BR', NULL, NULL, 'Menino Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15015, 18, 'BR', NULL, NULL, 'Mimoso do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15016, 18, 'BR', NULL, NULL, 'Montanha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15017, 18, 'BR', NULL, NULL, 'Monte Carmelo do Rio Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15018, 18, 'BR', NULL, NULL, 'Monte Pio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15019, 18, 'BR', NULL, NULL, 'Monte Sinai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15020, 18, 'BR', NULL, NULL, 'Mucurici')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15021, 18, 'BR', NULL, NULL, 'Mundo Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15022, 18, 'BR', NULL, NULL, 'Muniz Freire')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15023, 18, 'BR', NULL, NULL, 'Muqui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15024, 18, 'BR', NULL, NULL, 'Nestor Gomes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15025, 18, 'BR', NULL, NULL, 'Nossa Senhora de Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15026, 18, 'BR', NULL, NULL, 'Nova Almeida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15027, 18, 'BR', NULL, NULL, 'Nova Canaã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15028, 18, 'BR', NULL, NULL, 'Nova Venécia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15029, 18, 'BR', NULL, NULL, 'Nova Verona')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15030, 18, 'BR', NULL, NULL, 'Novo Brasil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15031, 18, 'BR', NULL, NULL, 'Novo Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15032, 18, 'BR', NULL, NULL, 'Pacotuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15033, 18, 'BR', NULL, NULL, 'Paineiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15034, 18, 'BR', NULL, NULL, 'Palmerino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15035, 18, 'BR', NULL, NULL, 'Pancas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15036, 18, 'BR', NULL, NULL, 'Paraju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15037, 18, 'BR', NULL, NULL, 'Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15038, 18, 'BR', NULL, NULL, 'Pedro Canário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15039, 18, 'BR', NULL, NULL, 'Pendanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15040, 18, 'BR', NULL, NULL, 'Pequiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15041, 18, 'BR', NULL, NULL, 'Perdição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15042, 18, 'BR', NULL, NULL, 'Piaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15043, 18, 'BR', NULL, NULL, 'Pinheiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15044, 18, 'BR', NULL, NULL, 'Piracema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15045, 18, 'BR', NULL, NULL, 'Piúma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15046, 18, 'BR', NULL, NULL, 'Ponte de Itabapoana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15047, 18, 'BR', NULL, NULL, 'Ponto Belo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15048, 18, 'BR', NULL, NULL, 'Pontões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15049, 18, 'BR', NULL, NULL, 'Porangá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15050, 18, 'BR', NULL, NULL, 'Praia Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15051, 18, 'BR', NULL, NULL, 'Praia do Coqueiral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15052, 18, 'BR', NULL, NULL, 'Presidente Kennedy')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15053, 18, 'BR', NULL, NULL, 'Princesa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15054, 18, 'BR', NULL, NULL, 'Prosperidade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15055, 18, 'BR', NULL, NULL, 'Queimado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15056, 18, 'BR', NULL, NULL, 'Quilômetro 14 do Mutum')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15057, 18, 'BR', NULL, NULL, 'Regência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15058, 18, 'BR', NULL, NULL, 'Riacho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15059, 18, 'BR', NULL, NULL, 'Ribeirão do Cristo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15060, 18, 'BR', NULL, NULL, 'Rio Bananal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15061, 18, 'BR', NULL, NULL, 'Rio Calçado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15062, 18, 'BR', NULL, NULL, 'Rio Muqui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15063, 18, 'BR', NULL, NULL, 'Rio Novo do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15064, 18, 'BR', NULL, NULL, 'Rio Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15065, 18, 'BR', NULL, NULL, 'Rive')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15066, 18, 'BR', NULL, NULL, 'Sagrada Família')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15067, 18, 'BR', NULL, NULL, 'Santa Angélica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15068, 18, 'BR', NULL, NULL, 'Santa Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15069, 18, 'BR', NULL, NULL, 'Santa Cruz de Irupi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15070, 18, 'BR', NULL, NULL, 'Santa Júlia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15071, 18, 'BR', NULL, NULL, 'Santa Leopoldina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15072, 18, 'BR', NULL, NULL, 'Santa Luzia de Mantenópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15073, 18, 'BR', NULL, NULL, 'Santa Luzia do Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15074, 18, 'BR', NULL, NULL, 'Santa Luzia do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15075, 18, 'BR', NULL, NULL, 'Santa Maria de Jetibá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15076, 18, 'BR', NULL, NULL, 'Santa Maria de Marechal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15077, 18, 'BR', NULL, NULL, 'Santa Marta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15078, 18, 'BR', NULL, NULL, 'Santa Teresa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15079, 18, 'BR', NULL, NULL, 'Santa Terezinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15080, 18, 'BR', NULL, NULL, 'Santo Agostinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15081, 18, 'BR', NULL, NULL, 'Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15082, 18, 'BR', NULL, NULL, 'Santo Antônio do Canaã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15083, 18, 'BR', NULL, NULL, 'Santo Antônio do Muqui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15084, 18, 'BR', NULL, NULL, 'Santo Antônio do Pousalegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15085, 18, 'BR', NULL, NULL, 'Santo Antônio do Quinze')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15086, 18, 'BR', NULL, NULL, 'Santíssima Trindade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15087, 18, 'BR', NULL, NULL, 'Sapucaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15088, 18, 'BR', NULL, NULL, 'Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15089, 18, 'BR', NULL, NULL, 'Serra Pelada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15090, 18, 'BR', NULL, NULL, 'Sobreiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15091, 18, 'BR', NULL, NULL, 'Sooretama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15092, 18, 'BR', NULL, NULL, 'São Domingos do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15093, 18, 'BR', NULL, NULL, 'São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15094, 18, 'BR', NULL, NULL, 'São Francisco Xavier do Guandu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15095, 18, 'BR', NULL, NULL, 'São Gabriel da Palha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15096, 18, 'BR', NULL, NULL, 'São Geraldo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15097, 18, 'BR', NULL, NULL, 'São Jacinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15098, 18, 'BR', NULL, NULL, 'São Jorge da Barra Seca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15099, 18, 'BR', NULL, NULL, 'São Jorge do Oliveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15100, 18, 'BR', NULL, NULL, 'São Jorge do Tiradentes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15101, 18, 'BR', NULL, NULL, 'São José das Torres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15102, 18, 'BR', NULL, NULL, 'São José de Fruteiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15103, 18, 'BR', NULL, NULL, 'São José de Mantenópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15104, 18, 'BR', NULL, NULL, 'São José do Calçado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15105, 18, 'BR', NULL, NULL, 'São José do Sobradinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15106, 18, 'BR', NULL, NULL, 'São João de Petrópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15107, 18, 'BR', NULL, NULL, 'São João de Viçosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15108, 18, 'BR', NULL, NULL, 'São João do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15109, 18, 'BR', NULL, NULL, 'São João do Príncipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15110, 18, 'BR', NULL, NULL, 'São João do Sobrado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15111, 18, 'BR', NULL, NULL, 'São Mateus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15112, 18, 'BR', NULL, NULL, 'São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15113, 18, 'BR', NULL, NULL, 'São Pedro de Itabapoana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15114, 18, 'BR', NULL, NULL, 'São Pedro de Rates')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15115, 18, 'BR', NULL, NULL, 'São Rafael')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15116, 18, 'BR', NULL, NULL, 'São Raimundo da Pedra Menina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15117, 18, 'BR', NULL, NULL, 'São Roque do Canaã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15118, 18, 'BR', NULL, NULL, 'São Tiago')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15119, 18, 'BR', NULL, NULL, 'São Torquato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15120, 18, 'BR', NULL, NULL, 'Timbuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15121, 18, 'BR', NULL, NULL, 'Todos os Santos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15122, 18, 'BR', NULL, NULL, 'Urânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15123, 18, 'BR', NULL, NULL, 'Vargem Alta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15124, 18, 'BR', NULL, NULL, 'Vargem Grande do Soturno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15125, 18, 'BR', NULL, NULL, 'Venda Nova do Imigrante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15126, 18, 'BR', NULL, NULL, 'Viana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15127, 18, 'BR', NULL, NULL, 'Vieira Machado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15128, 18, 'BR', NULL, NULL, 'Vila Guaraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15129, 18, 'BR', NULL, NULL, 'Vila Nelita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15130, 18, 'BR', NULL, NULL, 'Vila Nova de Bananal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15131, 18, 'BR', NULL, NULL, 'Vila Pavão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15132, 18, 'BR', NULL, NULL, 'Vila Valério')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15133, 18, 'BR', NULL, NULL, 'Vila Velha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15134, 18, 'BR', NULL, NULL, 'Vila Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15135, 18, 'BR', NULL, NULL, 'Vinhático')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15136, 18, 'BR', NULL, NULL, 'Vinte e Cinco de Julho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15137, 18, 'BR', NULL, NULL, 'Água Doce do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15138, 18, 'BR', NULL, NULL, 'Águia Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15139, 18, 'BR', NULL, NULL, 'Ângelo Frechiani')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15140, 19, 'BR', NULL, NULL, 'Abaiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15141, 19, 'BR', NULL, NULL, 'Abílio Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15142, 19, 'BR', NULL, NULL, 'Acarape')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15143, 19, 'BR', NULL, NULL, 'Acaraú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15144, 19, 'BR', NULL, NULL, 'Acopiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15145, 19, 'BR', NULL, NULL, 'Adrianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15146, 19, 'BR', NULL, NULL, 'Aguaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15147, 19, 'BR', NULL, NULL, 'Aiuaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15148, 19, 'BR', NULL, NULL, 'Aiuá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15149, 19, 'BR', NULL, NULL, 'Alagoinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15150, 19, 'BR', NULL, NULL, 'Alcântaras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15151, 19, 'BR', NULL, NULL, 'Algodões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15152, 19, 'BR', NULL, NULL, 'Almofala')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15153, 19, 'BR', NULL, NULL, 'Altaneira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15154, 19, 'BR', NULL, NULL, 'Alto Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15155, 19, 'BR', NULL, NULL, 'Amanaiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15156, 19, 'BR', NULL, NULL, 'Amanari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15157, 19, 'BR', NULL, NULL, 'Amaniutuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15158, 19, 'BR', NULL, NULL, 'Amarelas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15159, 19, 'BR', NULL, NULL, 'Amaro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15160, 19, 'BR', NULL, NULL, 'Amontada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15161, 19, 'BR', NULL, NULL, 'América')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15162, 19, 'BR', NULL, NULL, 'Anauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15163, 19, 'BR', NULL, NULL, 'Aningás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15164, 19, 'BR', NULL, NULL, 'Anjinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15165, 19, 'BR', NULL, NULL, 'Antonina do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15166, 19, 'BR', NULL, NULL, 'Antônio Bezerra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15167, 19, 'BR', NULL, NULL, 'Antônio Diogo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15168, 19, 'BR', NULL, NULL, 'Antônio Marques')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15169, 19, 'BR', NULL, NULL, 'Aprazível')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15170, 19, 'BR', NULL, NULL, 'Apuiarés')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15171, 19, 'BR', NULL, NULL, 'Aquinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15172, 19, 'BR', NULL, NULL, 'Aquiraz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15173, 19, 'BR', NULL, NULL, 'Aracati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15174, 19, 'BR', NULL, NULL, 'Aracatiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15175, 19, 'BR', NULL, NULL, 'Aracatiaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15176, 19, 'BR', NULL, NULL, 'Aracoiaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15177, 19, 'BR', NULL, NULL, 'Arajara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15178, 19, 'BR', NULL, NULL, 'Aranaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15179, 19, 'BR', NULL, NULL, 'Arapari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15180, 19, 'BR', NULL, NULL, 'Araporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15181, 19, 'BR', NULL, NULL, 'Arapá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15182, 19, 'BR', NULL, NULL, 'Araquém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15183, 19, 'BR', NULL, NULL, 'Ararendá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15184, 19, 'BR', NULL, NULL, 'Araripe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15185, 19, 'BR', NULL, NULL, 'Arariús')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15186, 19, 'BR', NULL, NULL, 'Aratama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15187, 19, 'BR', NULL, NULL, 'Araticum')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15188, 19, 'BR', NULL, NULL, 'Aratuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15189, 19, 'BR', NULL, NULL, 'Araçás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15190, 19, 'BR', NULL, NULL, 'Areial')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15191, 19, 'BR', NULL, NULL, 'Ariscos dos Marianos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15192, 19, 'BR', NULL, NULL, 'Arneiroz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15193, 19, 'BR', NULL, NULL, 'Aroeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15194, 19, 'BR', NULL, NULL, 'Arrojado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15195, 19, 'BR', NULL, NULL, 'Aruaru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15196, 19, 'BR', NULL, NULL, 'Assaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15197, 19, 'BR', NULL, NULL, 'Assunção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15198, 19, 'BR', NULL, NULL, 'Aurora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15199, 19, 'BR', NULL, NULL, 'Baixa Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15200, 19, 'BR', NULL, NULL, 'Baixio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15201, 19, 'BR', NULL, NULL, 'Baixio da Donana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15202, 19, 'BR', NULL, NULL, 'Banabuiú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15203, 19, 'BR', NULL, NULL, 'Bandeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15204, 19, 'BR', NULL, NULL, 'Barbalha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15205, 19, 'BR', NULL, NULL, 'Barra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15206, 19, 'BR', NULL, NULL, 'Barra Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15207, 19, 'BR', NULL, NULL, 'Barra do Sotero')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15208, 19, 'BR', NULL, NULL, 'Barreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15209, 19, 'BR', NULL, NULL, 'Barreira dos Vianas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15210, 19, 'BR', NULL, NULL, 'Barreiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15211, 19, 'BR', NULL, NULL, 'Barreiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15212, 19, 'BR', NULL, NULL, 'Barrento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15213, 19, 'BR', NULL, NULL, 'Barro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15214, 19, 'BR', NULL, NULL, 'Barro Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15215, 19, 'BR', NULL, NULL, 'Barroquinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15216, 19, 'BR', NULL, NULL, 'Barão de Aquiraz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15217, 19, 'BR', NULL, NULL, 'Baturité')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15218, 19, 'BR', NULL, NULL, 'Baú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15219, 19, 'BR', NULL, NULL, 'Beberibe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15220, 19, 'BR', NULL, NULL, 'Bela Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15221, 19, 'BR', NULL, NULL, 'Bela Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15222, 19, 'BR', NULL, NULL, 'Betânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15223, 19, 'BR', NULL, NULL, 'Bitupitá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15224, 19, 'BR', NULL, NULL, 'Bixopa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15225, 19, 'BR', NULL, NULL, 'Boa Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15226, 19, 'BR', NULL, NULL, 'Boa Viagem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15227, 19, 'BR', NULL, NULL, 'Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15228, 19, 'BR', NULL, NULL, 'Boa Vista do Caxitoré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15229, 19, 'BR', NULL, NULL, 'Boa Água')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15230, 19, 'BR', NULL, NULL, 'Bonfim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15231, 19, 'BR', NULL, NULL, 'Bonhu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15232, 19, 'BR', NULL, NULL, 'Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15233, 19, 'BR', NULL, NULL, 'Borges')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15234, 19, 'BR', NULL, NULL, 'Brejinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15235, 19, 'BR', NULL, NULL, 'Brejo Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15236, 19, 'BR', NULL, NULL, 'Brejo Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15237, 19, 'BR', NULL, NULL, 'Brotas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15238, 19, 'BR', NULL, NULL, 'Buritizal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15239, 19, 'BR', NULL, NULL, 'Buritizinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15240, 19, 'BR', NULL, NULL, 'Cabreiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15241, 19, 'BR', NULL, NULL, 'Cachoeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15242, 19, 'BR', NULL, NULL, 'Cachoeira Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15243, 19, 'BR', NULL, NULL, 'Caio Prado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15244, 19, 'BR', NULL, NULL, 'Caioca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15245, 19, 'BR', NULL, NULL, 'Caipu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15246, 19, 'BR', NULL, NULL, 'Caiçara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15247, 19, 'BR', NULL, NULL, 'Caiçarinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15248, 19, 'BR', NULL, NULL, 'Calabaça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15249, 19, 'BR', NULL, NULL, 'Caldeirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15250, 19, 'BR', NULL, NULL, 'Califórnia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15251, 19, 'BR', NULL, NULL, 'Camará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15252, 19, 'BR', NULL, NULL, 'Camboas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15253, 19, 'BR', NULL, NULL, 'Camilos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15254, 19, 'BR', NULL, NULL, 'Camocim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15255, 19, 'BR', NULL, NULL, 'Campanário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15256, 19, 'BR', NULL, NULL, 'Campestre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15257, 19, 'BR', NULL, NULL, 'Campos Sales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15258, 19, 'BR', NULL, NULL, 'Canaan')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15259, 19, 'BR', NULL, NULL, 'Canafistula')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15260, 19, 'BR', NULL, NULL, 'Canaúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15261, 19, 'BR', NULL, NULL, 'Cangati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15262, 19, 'BR', NULL, NULL, 'Canindezinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15263, 19, 'BR', NULL, NULL, 'Canindé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15264, 19, 'BR', NULL, NULL, 'Capistrano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15265, 19, 'BR', NULL, NULL, 'Caponga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15266, 19, 'BR', NULL, NULL, 'Caponga da Bernarda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15267, 19, 'BR', NULL, NULL, 'Caracará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15268, 19, 'BR', NULL, NULL, 'Caridade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15269, 19, 'BR', NULL, NULL, 'Caririaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15270, 19, 'BR', NULL, NULL, 'Cariré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15271, 19, 'BR', NULL, NULL, 'Cariutaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15272, 19, 'BR', NULL, NULL, 'Cariús')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15273, 19, 'BR', NULL, NULL, 'Carmelópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15274, 19, 'BR', NULL, NULL, 'Carnaubal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15275, 19, 'BR', NULL, NULL, 'Carnaubinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15276, 19, 'BR', NULL, NULL, 'Carnaúbas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15277, 19, 'BR', NULL, NULL, 'Carquejo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15278, 19, 'BR', NULL, NULL, 'Carrapateiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15279, 19, 'BR', NULL, NULL, 'Caruataí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15280, 19, 'BR', NULL, NULL, 'Carvalho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15281, 19, 'BR', NULL, NULL, 'Carvoeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15282, 19, 'BR', NULL, NULL, 'Castanhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15283, 19, 'BR', NULL, NULL, 'Catarina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15284, 19, 'BR', NULL, NULL, 'Catolé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15285, 19, 'BR', NULL, NULL, 'Catuana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15286, 19, 'BR', NULL, NULL, 'Catunda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15287, 19, 'BR', NULL, NULL, 'Caucaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15288, 19, 'BR', NULL, NULL, 'Caxitoré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15289, 19, 'BR', NULL, NULL, 'Cedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15290, 19, 'BR', NULL, NULL, 'Cemoaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15291, 19, 'BR', NULL, NULL, 'Chaval')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15292, 19, 'BR', NULL, NULL, 'Chorozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15293, 19, 'BR', NULL, NULL, 'Choró')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15294, 19, 'BR', NULL, NULL, 'Cipó dos Anjos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15295, 19, 'BR', NULL, NULL, 'Cococi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15296, 19, 'BR', NULL, NULL, 'Codiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15297, 19, 'BR', NULL, NULL, 'Coité')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15298, 19, 'BR', NULL, NULL, 'Colina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15299, 19, 'BR', NULL, NULL, 'Conceição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15300, 19, 'BR', NULL, NULL, 'Coreaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15301, 19, 'BR', NULL, NULL, 'Crateús')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15302, 19, 'BR', NULL, NULL, 'Crato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15303, 19, 'BR', NULL, NULL, 'Crioulos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15304, 19, 'BR', NULL, NULL, 'Cristais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15305, 19, 'BR', NULL, NULL, 'Croatá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15306, 19, 'BR', NULL, NULL, 'Cruxati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15307, 19, 'BR', NULL, NULL, 'Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15308, 19, 'BR', NULL, NULL, 'Cruz de Pedra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15309, 19, 'BR', NULL, NULL, 'Cruzeirinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15310, 19, 'BR', NULL, NULL, 'Cuncas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15311, 19, 'BR', NULL, NULL, 'Curatis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15312, 19, 'BR', NULL, NULL, 'Curupira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15313, 19, 'BR', NULL, NULL, 'Custódio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15314, 19, 'BR', NULL, NULL, 'Córrego dos Fernandes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15315, 19, 'BR', NULL, NULL, 'Daniel de Queirós')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15316, 19, 'BR', NULL, NULL, 'Delmiro Gouveia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15317, 19, 'BR', NULL, NULL, 'Deputado Irapuan Pinheiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15318, 19, 'BR', NULL, NULL, 'Deserto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15319, 19, 'BR', NULL, NULL, 'Dom Leme')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15320, 19, 'BR', NULL, NULL, 'Dom Maurício')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15321, 19, 'BR', NULL, NULL, 'Dom Quintino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15322, 19, 'BR', NULL, NULL, 'Domingos da Costa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15323, 19, 'BR', NULL, NULL, 'Donato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15324, 19, 'BR', NULL, NULL, 'Ebron')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15325, 19, 'BR', NULL, NULL, 'Ema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15326, 19, 'BR', NULL, NULL, 'Ematuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15327, 19, 'BR', NULL, NULL, 'Encantado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15328, 19, 'BR', NULL, NULL, 'Engenheiro José Lopes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15329, 19, 'BR', NULL, NULL, 'Engenheiro João Tomé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15330, 19, 'BR', NULL, NULL, 'Engenho Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15331, 19, 'BR', NULL, NULL, 'Ererê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15332, 19, 'BR', NULL, NULL, 'Espacinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15333, 19, 'BR', NULL, NULL, 'Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15334, 19, 'BR', NULL, NULL, 'Espinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15335, 19, 'BR', NULL, NULL, 'Eusébio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15336, 19, 'BR', NULL, NULL, 'Farias Brito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15337, 19, 'BR', NULL, NULL, 'Feiticeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15338, 19, 'BR', NULL, NULL, 'Feitosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15339, 19, 'BR', NULL, NULL, 'Felizardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15340, 19, 'BR', NULL, NULL, 'Flamengo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15341, 19, 'BR', NULL, NULL, 'Flores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15342, 19, 'BR', NULL, NULL, 'Forquilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15343, 19, 'BR', NULL, NULL, 'Fortim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15344, 19, 'BR', NULL, NULL, 'Frecheirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15345, 19, 'BR', NULL, NULL, 'Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15346, 19, 'BR', NULL, NULL, 'Gado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15347, 19, 'BR', NULL, NULL, 'Gado dos Rodrigues')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15348, 19, 'BR', NULL, NULL, 'Gameleira de São Sebastião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15349, 19, 'BR', NULL, NULL, 'Garças')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15350, 19, 'BR', NULL, NULL, 'General Sampaio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15351, 19, 'BR', NULL, NULL, 'General Tibúrcio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15352, 19, 'BR', NULL, NULL, 'Genipapeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15353, 19, 'BR', NULL, NULL, 'Gereraú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15354, 19, 'BR', NULL, NULL, 'Giqui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15355, 19, 'BR', NULL, NULL, 'Girau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15356, 19, 'BR', NULL, NULL, 'Granja')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15357, 19, 'BR', NULL, NULL, 'Granjeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15358, 19, 'BR', NULL, NULL, 'Graça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15359, 19, 'BR', NULL, NULL, 'Groairas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15360, 19, 'BR', NULL, NULL, 'Guaiúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15361, 19, 'BR', NULL, NULL, 'Guajiru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15362, 19, 'BR', NULL, NULL, 'Guanacés')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15363, 19, 'BR', NULL, NULL, 'Guaraciaba do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15364, 19, 'BR', NULL, NULL, 'Guaramiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15365, 19, 'BR', NULL, NULL, 'Guararu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15366, 19, 'BR', NULL, NULL, 'Guassi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15367, 19, 'BR', NULL, NULL, 'Guassossé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15368, 19, 'BR', NULL, NULL, 'Guia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15369, 19, 'BR', NULL, NULL, 'Guriú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15370, 19, 'BR', NULL, NULL, 'Gázea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15371, 19, 'BR', NULL, NULL, 'Hidrolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15372, 19, 'BR', NULL, NULL, 'Holanda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15373, 19, 'BR', NULL, NULL, 'Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15374, 19, 'BR', NULL, NULL, 'Iapi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15375, 19, 'BR', NULL, NULL, 'Iara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15376, 19, 'BR', NULL, NULL, 'Ibaretama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15377, 19, 'BR', NULL, NULL, 'Ibiapaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15378, 19, 'BR', NULL, NULL, 'Ibiapina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15379, 19, 'BR', NULL, NULL, 'Ibicatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15380, 19, 'BR', NULL, NULL, 'Ibicuitaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15381, 19, 'BR', NULL, NULL, 'Ibicuitinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15382, 19, 'BR', NULL, NULL, 'Ibicuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15383, 19, 'BR', NULL, NULL, 'Iborepi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15384, 19, 'BR', NULL, NULL, 'Ibuaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15385, 19, 'BR', NULL, NULL, 'Ibuguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15386, 19, 'BR', NULL, NULL, 'Icapuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15387, 19, 'BR', NULL, NULL, 'Icaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15388, 19, 'BR', NULL, NULL, 'Icozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15389, 19, 'BR', NULL, NULL, 'Icó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15390, 19, 'BR', NULL, NULL, 'Ideal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15391, 19, 'BR', NULL, NULL, 'Igaroi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15392, 19, 'BR', NULL, NULL, 'Iguatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15393, 19, 'BR', NULL, NULL, 'Independência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15394, 19, 'BR', NULL, NULL, 'Ingazeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15395, 19, 'BR', NULL, NULL, 'Inhamuns')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15396, 19, 'BR', NULL, NULL, 'Inhuporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15397, 19, 'BR', NULL, NULL, 'Inhuçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15398, 19, 'BR', NULL, NULL, 'Ipaporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15399, 19, 'BR', NULL, NULL, 'Ipaumirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15400, 19, 'BR', NULL, NULL, 'Ipu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15401, 19, 'BR', NULL, NULL, 'Ipueiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15402, 19, 'BR', NULL, NULL, 'Ipueiras dos Gomes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15403, 19, 'BR', NULL, NULL, 'Iracema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15404, 19, 'BR', NULL, NULL, 'Irajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15405, 19, 'BR', NULL, NULL, 'Irapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15406, 19, 'BR', NULL, NULL, 'Iratinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15407, 19, 'BR', NULL, NULL, 'Irauçuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15408, 19, 'BR', NULL, NULL, 'Isidoro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15409, 19, 'BR', NULL, NULL, 'Itacima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15410, 19, 'BR', NULL, NULL, 'Itaguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15411, 19, 'BR', NULL, NULL, 'Itaipaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15412, 19, 'BR', NULL, NULL, 'Itaitinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15413, 19, 'BR', NULL, NULL, 'Itaiçaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15414, 19, 'BR', NULL, NULL, 'Itans')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15415, 19, 'BR', NULL, NULL, 'Itapajé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15416, 19, 'BR', NULL, NULL, 'Itapebussu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15417, 19, 'BR', NULL, NULL, 'Itapeim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15418, 19, 'BR', NULL, NULL, 'Itapipoca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15419, 19, 'BR', NULL, NULL, 'Itapiúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15420, 19, 'BR', NULL, NULL, 'Itapó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15421, 19, 'BR', NULL, NULL, 'Itarema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15422, 19, 'BR', NULL, NULL, 'Itatira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15423, 19, 'BR', NULL, NULL, 'Jaburuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15424, 19, 'BR', NULL, NULL, 'Jacampari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15425, 19, 'BR', NULL, NULL, 'Jacarecoara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15426, 19, 'BR', NULL, NULL, 'Jacaúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15427, 19, 'BR', NULL, NULL, 'Jaguaretama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15428, 19, 'BR', NULL, NULL, 'Jaguaribara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15429, 19, 'BR', NULL, NULL, 'Jaguaribe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15430, 19, 'BR', NULL, NULL, 'Jaguaruana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15431, 19, 'BR', NULL, NULL, 'Jaguarão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15432, 19, 'BR', NULL, NULL, 'Jaibaras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15433, 19, 'BR', NULL, NULL, 'Jamacaru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15434, 19, 'BR', NULL, NULL, 'Jandrangoeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15435, 19, 'BR', NULL, NULL, 'Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15436, 19, 'BR', NULL, NULL, 'Jardimirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15437, 19, 'BR', NULL, NULL, 'Jati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15438, 19, 'BR', NULL, NULL, 'Jijoca de Jericoacoara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15439, 19, 'BR', NULL, NULL, 'Jordão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15440, 19, 'BR', NULL, NULL, 'José de Alencar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15441, 19, 'BR', NULL, NULL, 'João Cordeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15442, 19, 'BR', NULL, NULL, 'Juatama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15443, 19, 'BR', NULL, NULL, 'Juazeiro de Baixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15444, 19, 'BR', NULL, NULL, 'Juazeiro do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15445, 19, 'BR', NULL, NULL, 'Jubaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15446, 19, 'BR', NULL, NULL, 'Jucás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15447, 19, 'BR', NULL, NULL, 'Jurema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15448, 19, 'BR', NULL, NULL, 'Justiniano Serpa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15449, 19, 'BR', NULL, NULL, 'Juá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15450, 19, 'BR', NULL, NULL, 'Lacerda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15451, 19, 'BR', NULL, NULL, 'Ladeira Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15452, 19, 'BR', NULL, NULL, 'Lages')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15453, 19, 'BR', NULL, NULL, 'Lagoa Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15454, 19, 'BR', NULL, NULL, 'Lagoa de São José')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15455, 19, 'BR', NULL, NULL, 'Lagoa do Juvenal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15456, 19, 'BR', NULL, NULL, 'Lagoa do Mato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15457, 19, 'BR', NULL, NULL, 'Lagoa dos Crioulos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15458, 19, 'BR', NULL, NULL, 'Lagoinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15459, 19, 'BR', NULL, NULL, 'Lambedouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15460, 19, 'BR', NULL, NULL, 'Lameiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15461, 19, 'BR', NULL, NULL, 'Lavras da Mangabeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15462, 19, 'BR', NULL, NULL, 'Lima Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15463, 19, 'BR', NULL, NULL, 'Limoeiro do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15464, 19, 'BR', NULL, NULL, 'Lisieux')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15465, 19, 'BR', NULL, NULL, 'Livramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15466, 19, 'BR', NULL, NULL, 'Logradouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15467, 19, 'BR', NULL, NULL, 'Macambira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15468, 19, 'BR', NULL, NULL, 'Macaraú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15469, 19, 'BR', NULL, NULL, 'Macaóca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15470, 19, 'BR', NULL, NULL, 'Maceió')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15471, 19, 'BR', NULL, NULL, 'Madalena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15472, 19, 'BR', NULL, NULL, 'Major Simplício')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15473, 19, 'BR', NULL, NULL, 'Majorlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15474, 19, 'BR', NULL, NULL, 'Malhada Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15475, 19, 'BR', NULL, NULL, 'Mangabeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15476, 19, 'BR', NULL, NULL, 'Manibu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15477, 19, 'BR', NULL, NULL, 'Manituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15478, 19, 'BR', NULL, NULL, 'Manoel Guedes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15479, 19, 'BR', NULL, NULL, 'Mapuá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15480, 19, 'BR', NULL, NULL, 'Maracanaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15481, 19, 'BR', NULL, NULL, 'Maraguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15482, 19, 'BR', NULL, NULL, 'Maranguape')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15483, 19, 'BR', NULL, NULL, 'Mararupá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15484, 19, 'BR', NULL, NULL, 'Marco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15485, 19, 'BR', NULL, NULL, 'Marinheiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15486, 19, 'BR', NULL, NULL, 'Marrecas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15487, 19, 'BR', NULL, NULL, 'Marrocos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15488, 19, 'BR', NULL, NULL, 'Marruás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15489, 19, 'BR', NULL, NULL, 'Martinópole')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15490, 19, 'BR', NULL, NULL, 'Massapê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15491, 19, 'BR', NULL, NULL, 'Mata Fresca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15492, 19, 'BR', NULL, NULL, 'Matias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15493, 19, 'BR', NULL, NULL, 'Matriz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15494, 19, 'BR', NULL, NULL, 'Mauriti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15495, 19, 'BR', NULL, NULL, 'Mel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15496, 19, 'BR', NULL, NULL, 'Meruoca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15497, 19, 'BR', NULL, NULL, 'Messejana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15498, 19, 'BR', NULL, NULL, 'Miguel Xavier')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15499, 19, 'BR', NULL, NULL, 'Milagres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15500, 19, 'BR', NULL, NULL, 'Milhã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15501, 19, 'BR', NULL, NULL, 'Milton Belo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15502, 19, 'BR', NULL, NULL, 'Mineirolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15503, 19, 'BR', NULL, NULL, 'Miragem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15504, 19, 'BR', NULL, NULL, 'Mirambé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15505, 19, 'BR', NULL, NULL, 'Miraíma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15506, 19, 'BR', NULL, NULL, 'Missi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15507, 19, 'BR', NULL, NULL, 'Missão Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15508, 19, 'BR', NULL, NULL, 'Missão Velha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15509, 19, 'BR', NULL, NULL, 'Moitas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15510, 19, 'BR', NULL, NULL, 'Mombaça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15511, 19, 'BR', NULL, NULL, 'Mondubim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15512, 19, 'BR', NULL, NULL, 'Monguba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15513, 19, 'BR', NULL, NULL, 'Monsenhor Tabosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15514, 19, 'BR', NULL, NULL, 'Monte Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15515, 19, 'BR', NULL, NULL, 'Monte Castelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15516, 19, 'BR', NULL, NULL, 'Monte Grave')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15517, 19, 'BR', NULL, NULL, 'Monte Sion')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15518, 19, 'BR', NULL, NULL, 'Montenebo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15519, 19, 'BR', NULL, NULL, 'Morada Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15520, 19, 'BR', NULL, NULL, 'Moraújo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15521, 19, 'BR', NULL, NULL, 'Morrinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15522, 19, 'BR', NULL, NULL, 'Morrinhos Novos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15523, 19, 'BR', NULL, NULL, 'Morro Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15524, 19, 'BR', NULL, NULL, 'Mucambo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15525, 19, 'BR', NULL, NULL, 'Mulungu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15526, 19, 'BR', NULL, NULL, 'Mumbaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15527, 19, 'BR', NULL, NULL, 'Mundau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15528, 19, 'BR', NULL, NULL, 'Muribeca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15529, 19, 'BR', NULL, NULL, 'Muriti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15530, 19, 'BR', NULL, NULL, 'Mutambeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15531, 19, 'BR', NULL, NULL, 'Naraniu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15532, 19, 'BR', NULL, NULL, 'Nascente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15533, 19, 'BR', NULL, NULL, 'Nenenlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15534, 19, 'BR', NULL, NULL, 'Nossa Senhora do Livramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15535, 19, 'BR', NULL, NULL, 'Nova Betânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15536, 19, 'BR', NULL, NULL, 'Nova Floresta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15537, 19, 'BR', NULL, NULL, 'Nova Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15538, 19, 'BR', NULL, NULL, 'Nova Olinda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15539, 19, 'BR', NULL, NULL, 'Nova Russas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15540, 19, 'BR', NULL, NULL, 'Nova Vida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15541, 19, 'BR', NULL, NULL, 'Novo Assis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15542, 19, 'BR', NULL, NULL, 'Novo Oriente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15543, 19, 'BR', NULL, NULL, 'Ocara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15544, 19, 'BR', NULL, NULL, 'Oiticica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15545, 19, 'BR', NULL, NULL, 'Olho-D''Água')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15546, 19, 'BR', NULL, NULL, 'Olho-D''Água da Bica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15547, 19, 'BR', NULL, NULL, 'Oliveiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15548, 19, 'BR', NULL, NULL, 'Orós')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15549, 19, 'BR', NULL, NULL, 'Pacajus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15550, 19, 'BR', NULL, NULL, 'Pacatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15551, 19, 'BR', NULL, NULL, 'Pacoti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15552, 19, 'BR', NULL, NULL, 'Pacujá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15553, 19, 'BR', NULL, NULL, 'Padre Cícero')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15554, 19, 'BR', NULL, NULL, 'Padre Linhares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15555, 19, 'BR', NULL, NULL, 'Padre Vieira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15556, 19, 'BR', NULL, NULL, 'Pajeú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15557, 19, 'BR', NULL, NULL, 'Palestina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15558, 19, 'BR', NULL, NULL, 'Palestina do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15559, 19, 'BR', NULL, NULL, 'Palhano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15560, 19, 'BR', NULL, NULL, 'Palmatória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15561, 19, 'BR', NULL, NULL, 'Palmácia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15562, 19, 'BR', NULL, NULL, 'Panacuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15563, 19, 'BR', NULL, NULL, 'Papara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15564, 19, 'BR', NULL, NULL, 'Paracuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15565, 19, 'BR', NULL, NULL, 'Paracuá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15566, 19, 'BR', NULL, NULL, 'Paraipaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15567, 19, 'BR', NULL, NULL, 'Parajuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15568, 19, 'BR', NULL, NULL, 'Parambu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15569, 19, 'BR', NULL, NULL, 'Paramoti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15570, 19, 'BR', NULL, NULL, 'Parangaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15571, 19, 'BR', NULL, NULL, 'Parapuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15572, 19, 'BR', NULL, NULL, 'Parazinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15573, 19, 'BR', NULL, NULL, 'Paripueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15574, 19, 'BR', NULL, NULL, 'Passagem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15575, 19, 'BR', NULL, NULL, 'Passagem Funda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15576, 19, 'BR', NULL, NULL, 'Pasta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15577, 19, 'BR', NULL, NULL, 'Patacas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15578, 19, 'BR', NULL, NULL, 'Patos dos Liberatos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15579, 19, 'BR', NULL, NULL, 'Patriarca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15580, 19, 'BR', NULL, NULL, 'Pavuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15581, 19, 'BR', NULL, NULL, 'Pecém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15582, 19, 'BR', NULL, NULL, 'Pedra Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15583, 19, 'BR', NULL, NULL, 'Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15584, 19, 'BR', NULL, NULL, 'Pedrinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15585, 19, 'BR', NULL, NULL, 'Peixe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15586, 19, 'BR', NULL, NULL, 'Peixe Gordo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15587, 19, 'BR', NULL, NULL, 'Penaforte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15588, 19, 'BR', NULL, NULL, 'Penedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15589, 19, 'BR', NULL, NULL, 'Pentecoste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15590, 19, 'BR', NULL, NULL, 'Pereiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15591, 19, 'BR', NULL, NULL, 'Pernambuquinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15592, 19, 'BR', NULL, NULL, 'Pessoa Anta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15593, 19, 'BR', NULL, NULL, 'Pindoguaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15594, 19, 'BR', NULL, NULL, 'Pindoretama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15595, 19, 'BR', NULL, NULL, 'Pio X')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15596, 19, 'BR', NULL, NULL, 'Piquet Carneiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15597, 19, 'BR', NULL, NULL, 'Pirabibu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15598, 19, 'BR', NULL, NULL, 'Pirangi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15599, 19, 'BR', NULL, NULL, 'Pires Ferreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15600, 19, 'BR', NULL, NULL, 'Pitombeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15601, 19, 'BR', NULL, NULL, 'Pitombeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15602, 19, 'BR', NULL, NULL, 'Plácido Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15603, 19, 'BR', NULL, NULL, 'Podimirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15604, 19, 'BR', NULL, NULL, 'Ponta da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15605, 19, 'BR', NULL, NULL, 'Poranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15606, 19, 'BR', NULL, NULL, 'Porfirio Sampaio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15607, 19, 'BR', NULL, NULL, 'Porteiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15608, 19, 'BR', NULL, NULL, 'Potengi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15609, 19, 'BR', NULL, NULL, 'Poti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15610, 19, 'BR', NULL, NULL, 'Potiretama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15611, 19, 'BR', NULL, NULL, 'Poço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15612, 19, 'BR', NULL, NULL, 'Poço Comprido')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15613, 19, 'BR', NULL, NULL, 'Poço Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15614, 19, 'BR', NULL, NULL, 'Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15615, 19, 'BR', NULL, NULL, 'Prudente de Morais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15616, 19, 'BR', NULL, NULL, 'Quatiguaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15617, 19, 'BR', NULL, NULL, 'Queimadas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15618, 19, 'BR', NULL, NULL, 'Quimami')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15619, 19, 'BR', NULL, NULL, 'Quincoé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15620, 19, 'BR', NULL, NULL, 'Quincuncá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15621, 19, 'BR', NULL, NULL, 'Quitaiús')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15622, 19, 'BR', NULL, NULL, 'Quiterianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15623, 19, 'BR', NULL, NULL, 'Quixadá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15624, 19, 'BR', NULL, NULL, 'Quixariú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15625, 19, 'BR', NULL, NULL, 'Quixelô')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15626, 19, 'BR', NULL, NULL, 'Quixeramobim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15627, 19, 'BR', NULL, NULL, 'Quixeré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15628, 19, 'BR', NULL, NULL, 'Quixoá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15629, 19, 'BR', NULL, NULL, 'Raimundo Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15630, 19, 'BR', NULL, NULL, 'Redenção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15631, 19, 'BR', NULL, NULL, 'Reriutaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15632, 19, 'BR', NULL, NULL, 'Riacho Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15633, 19, 'BR', NULL, NULL, 'Riacho Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15634, 19, 'BR', NULL, NULL, 'Riacho Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15635, 19, 'BR', NULL, NULL, 'Riachão do Banabuiú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15636, 19, 'BR', NULL, NULL, 'Rinaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15637, 19, 'BR', NULL, NULL, 'Roldão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15638, 19, 'BR', NULL, NULL, 'Russas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15639, 19, 'BR', NULL, NULL, 'Sabiaguaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15640, 19, 'BR', NULL, NULL, 'Saboeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15641, 19, 'BR', NULL, NULL, 'Sacramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15642, 19, 'BR', NULL, NULL, 'Salitre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15643, 19, 'BR', NULL, NULL, 'Salão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15644, 19, 'BR', NULL, NULL, 'Sambaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15645, 19, 'BR', NULL, NULL, 'Santa Ana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15646, 19, 'BR', NULL, NULL, 'Santa Felícia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15647, 19, 'BR', NULL, NULL, 'Santa Fé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15648, 19, 'BR', NULL, NULL, 'Santa Luzia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15649, 19, 'BR', NULL, NULL, 'Santa Quitéria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15650, 19, 'BR', NULL, NULL, 'Santa Tereza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15651, 19, 'BR', NULL, NULL, 'Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15652, 19, 'BR', NULL, NULL, 'Santana do Acaraú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15653, 19, 'BR', NULL, NULL, 'Santana do Cariri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15654, 19, 'BR', NULL, NULL, 'Santarém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15655, 19, 'BR', NULL, NULL, 'Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15656, 19, 'BR', NULL, NULL, 'Santo Antônio da Pindoba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15657, 19, 'BR', NULL, NULL, 'Santo Antônio dos Fernandes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15658, 19, 'BR', NULL, NULL, 'Sapo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15659, 19, 'BR', NULL, NULL, 'Sapupara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15660, 19, 'BR', NULL, NULL, 'Sebastião de Abreu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15661, 19, 'BR', NULL, NULL, 'Senador Carlos Jereissati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15662, 19, 'BR', NULL, NULL, 'Senador Pompeu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15663, 19, 'BR', NULL, NULL, 'Senador Sá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15664, 19, 'BR', NULL, NULL, 'Sereno de Cima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15665, 19, 'BR', NULL, NULL, 'Serra do Félix')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15666, 19, 'BR', NULL, NULL, 'Serragem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15667, 19, 'BR', NULL, NULL, 'Serrota')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15668, 19, 'BR', NULL, NULL, 'Serrote')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15669, 19, 'BR', NULL, NULL, 'Sitiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15670, 19, 'BR', NULL, NULL, 'Siupê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15671, 19, 'BR', NULL, NULL, 'Sobral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15672, 19, 'BR', NULL, NULL, 'Soledade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15673, 19, 'BR', NULL, NULL, 'Solonópole')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15674, 19, 'BR', NULL, NULL, 'Suassurana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15675, 19, 'BR', NULL, NULL, 'Sucatinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15676, 19, 'BR', NULL, NULL, 'Sucesso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15677, 19, 'BR', NULL, NULL, 'Sussuanha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15678, 19, 'BR', NULL, NULL, 'São Bartolomeu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15679, 19, 'BR', NULL, NULL, 'São Benedito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15680, 19, 'BR', NULL, NULL, 'São Domingos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15681, 19, 'BR', NULL, NULL, 'São Felipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15682, 19, 'BR', NULL, NULL, 'São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15683, 19, 'BR', NULL, NULL, 'São Gerardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15684, 19, 'BR', NULL, NULL, 'São Gonçalo do Amarante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15685, 19, 'BR', NULL, NULL, 'São Gonçalo do Umari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15686, 19, 'BR', NULL, NULL, 'São Joaquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15687, 19, 'BR', NULL, NULL, 'São Joaquim do Salgado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15688, 19, 'BR', NULL, NULL, 'São José das Lontras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15689, 19, 'BR', NULL, NULL, 'São José de Solonópole')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15690, 19, 'BR', NULL, NULL, 'São José do Torto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15691, 19, 'BR', NULL, NULL, 'São João de Deus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15692, 19, 'BR', NULL, NULL, 'São João do Amanari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15693, 19, 'BR', NULL, NULL, 'São João do Jaguaribe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15694, 19, 'BR', NULL, NULL, 'São João dos Queiroz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15695, 19, 'BR', NULL, NULL, 'São Luís do Curu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15696, 19, 'BR', NULL, NULL, 'São Miguel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15697, 19, 'BR', NULL, NULL, 'São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15698, 19, 'BR', NULL, NULL, 'São Romão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15699, 19, 'BR', NULL, NULL, 'São Sebastião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15700, 19, 'BR', NULL, NULL, 'São Vicente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15701, 19, 'BR', NULL, NULL, 'Sítios Novos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15702, 19, 'BR', NULL, NULL, 'Tabainha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15703, 19, 'BR', NULL, NULL, 'Taboleiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15704, 19, 'BR', NULL, NULL, 'Tabuleiro do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15705, 19, 'BR', NULL, NULL, 'Tamboril')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15706, 19, 'BR', NULL, NULL, 'Tanques')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15707, 19, 'BR', NULL, NULL, 'Tapera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15708, 19, 'BR', NULL, NULL, 'Taperuaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15709, 19, 'BR', NULL, NULL, 'Tapuiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15710, 19, 'BR', NULL, NULL, 'Targinos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15711, 19, 'BR', NULL, NULL, 'Tarrafas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15712, 19, 'BR', NULL, NULL, 'Tauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15713, 19, 'BR', NULL, NULL, 'Taíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15714, 19, 'BR', NULL, NULL, 'Tejuçuoca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15715, 19, 'BR', NULL, NULL, 'Tianguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15716, 19, 'BR', NULL, NULL, 'Timbaúba dos Marinheiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15717, 19, 'BR', NULL, NULL, 'Timonha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15718, 19, 'BR', NULL, NULL, 'Tipi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15719, 19, 'BR', NULL, NULL, 'Tomé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15720, 19, 'BR', NULL, NULL, 'Trairi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15721, 19, 'BR', NULL, NULL, 'Trapiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15722, 19, 'BR', NULL, NULL, 'Trici')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15723, 19, 'BR', NULL, NULL, 'Triângulo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15724, 19, 'BR', NULL, NULL, 'Trussu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15725, 19, 'BR', NULL, NULL, 'Tróia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15726, 19, 'BR', NULL, NULL, 'Tucunduba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15727, 19, 'BR', NULL, NULL, 'Tucuns')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15728, 19, 'BR', NULL, NULL, 'Tururu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15729, 19, 'BR', NULL, NULL, 'Tuína')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15730, 19, 'BR', NULL, NULL, 'Ubajara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15731, 19, 'BR', NULL, NULL, 'Ubaúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15732, 19, 'BR', NULL, NULL, 'Ubiraçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15733, 19, 'BR', NULL, NULL, 'Uiraponga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15734, 19, 'BR', NULL, NULL, 'Umari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15735, 19, 'BR', NULL, NULL, 'Umarituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15736, 19, 'BR', NULL, NULL, 'Umarizeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15737, 19, 'BR', NULL, NULL, 'Umburanas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15738, 19, 'BR', NULL, NULL, 'Umirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15739, 19, 'BR', NULL, NULL, 'Uruburetama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15740, 19, 'BR', NULL, NULL, 'Uruoca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15741, 19, 'BR', NULL, NULL, 'Uruquê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15742, 19, 'BR', NULL, NULL, 'Varjota')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15743, 19, 'BR', NULL, NULL, 'Vazantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15744, 19, 'BR', NULL, NULL, 'Ventura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15745, 19, 'BR', NULL, NULL, 'Vertentes do Lagedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15746, 19, 'BR', NULL, NULL, 'Vila Soares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15747, 19, 'BR', NULL, NULL, 'Viçosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15748, 19, 'BR', NULL, NULL, 'Viçosa do Ceará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15749, 19, 'BR', NULL, NULL, 'Várzea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15750, 19, 'BR', NULL, NULL, 'Várzea Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15751, 19, 'BR', NULL, NULL, 'Várzea da Volta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15752, 19, 'BR', NULL, NULL, 'Várzea do Gilo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15753, 19, 'BR', NULL, NULL, 'Água Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15754, 21, 'BR', NULL, NULL, 'Acrelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15755, 21, 'BR', NULL, NULL, 'Assis Brasil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15756, 21, 'BR', NULL, NULL, 'Brasiléia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15757, 21, 'BR', NULL, NULL, 'Bujari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15758, 21, 'BR', NULL, NULL, 'Campinas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15759, 21, 'BR', NULL, NULL, 'Capixaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15760, 21, 'BR', NULL, NULL, 'Cruzeiro do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15761, 21, 'BR', NULL, NULL, 'Epitaciolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15762, 21, 'BR', NULL, NULL, 'Feijó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15763, 21, 'BR', NULL, NULL, 'Jordão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15764, 21, 'BR', NULL, NULL, 'Manoel Urbano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15765, 21, 'BR', NULL, NULL, 'Marechal Thaumaturgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15766, 21, 'BR', NULL, NULL, 'Mâncio Lima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15767, 21, 'BR', NULL, NULL, 'Plácido de Castro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15768, 21, 'BR', NULL, NULL, 'Porto Acre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15769, 21, 'BR', NULL, NULL, 'Porto Walter')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15770, 21, 'BR', NULL, NULL, 'Rio Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15771, 21, 'BR', NULL, NULL, 'Rodrigues Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15772, 21, 'BR', NULL, NULL, 'Santa Rosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15773, 21, 'BR', NULL, NULL, 'Sena Madureira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15774, 21, 'BR', NULL, NULL, 'Senador Guiomard')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15775, 21, 'BR', NULL, NULL, 'Tarauacá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15776, 21, 'BR', NULL, NULL, 'Xapuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15777, 22, 'BR', NULL, NULL, 'Alazão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15778, 22, 'BR', NULL, NULL, 'Alecrim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15779, 22, 'BR', NULL, NULL, 'Anadia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15780, 22, 'BR', NULL, NULL, 'Anel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15781, 22, 'BR', NULL, NULL, 'Anum Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15782, 22, 'BR', NULL, NULL, 'Anum Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15783, 22, 'BR', NULL, NULL, 'Arapiraca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15784, 22, 'BR', NULL, NULL, 'Atalaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15785, 22, 'BR', NULL, NULL, 'Baixa da Onça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15786, 22, 'BR', NULL, NULL, 'Baixa do Capim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15787, 22, 'BR', NULL, NULL, 'Bananeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15788, 22, 'BR', NULL, NULL, 'Barra Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15789, 22, 'BR', NULL, NULL, 'Barra de Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15790, 22, 'BR', NULL, NULL, 'Barra de São Miguel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15791, 22, 'BR', NULL, NULL, 'Barra do Bonifácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15792, 22, 'BR', NULL, NULL, 'Batalha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15793, 22, 'BR', NULL, NULL, 'Batingas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15794, 22, 'BR', NULL, NULL, 'Belo Monte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15795, 22, 'BR', NULL, NULL, 'Belém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15796, 22, 'BR', NULL, NULL, 'Boa Sorte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15797, 22, 'BR', NULL, NULL, 'Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15798, 22, 'BR', NULL, NULL, 'Boca da Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15799, 22, 'BR', NULL, NULL, 'Bom Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15800, 22, 'BR', NULL, NULL, 'Bonifácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15801, 22, 'BR', NULL, NULL, 'Bonsucesso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15802, 22, 'BR', NULL, NULL, 'Botafogo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15803, 22, 'BR', NULL, NULL, 'Branquinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15804, 22, 'BR', NULL, NULL, 'Bálsamo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15805, 22, 'BR', NULL, NULL, 'Cacimbinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15806, 22, 'BR', NULL, NULL, 'Cajarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15807, 22, 'BR', NULL, NULL, 'Cajueiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15808, 22, 'BR', NULL, NULL, 'Caldeirões de Cima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15809, 22, 'BR', NULL, NULL, 'Camadanta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15810, 22, 'BR', NULL, NULL, 'Campestre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15811, 22, 'BR', NULL, NULL, 'Campo Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15812, 22, 'BR', NULL, NULL, 'Campo Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15813, 22, 'BR', NULL, NULL, 'Canafístula')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15814, 22, 'BR', NULL, NULL, 'Canapi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15815, 22, 'BR', NULL, NULL, 'Canastra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15816, 22, 'BR', NULL, NULL, 'Canaã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15817, 22, 'BR', NULL, NULL, 'Cangandu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15818, 22, 'BR', NULL, NULL, 'Capela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15819, 22, 'BR', NULL, NULL, 'Carneiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15820, 22, 'BR', NULL, NULL, 'Carrasco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15821, 22, 'BR', NULL, NULL, 'Chã Preta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15822, 22, 'BR', NULL, NULL, 'Coité do Nóia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15823, 22, 'BR', NULL, NULL, 'Colônia Leopoldina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15824, 22, 'BR', NULL, NULL, 'Coqueiro Seco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15825, 22, 'BR', NULL, NULL, 'Coruripe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15826, 22, 'BR', NULL, NULL, 'Coruripe da Cal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15827, 22, 'BR', NULL, NULL, 'Craíbas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15828, 22, 'BR', NULL, NULL, 'Delmiro Gouveia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15829, 22, 'BR', NULL, NULL, 'Dois Riachos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15830, 22, 'BR', NULL, NULL, 'Entremontes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15831, 22, 'BR', NULL, NULL, 'Estrela de Alagoas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15832, 22, 'BR', NULL, NULL, 'Feira Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15833, 22, 'BR', NULL, NULL, 'Feliz Deserto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15834, 22, 'BR', NULL, NULL, 'Flexeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15835, 22, 'BR', NULL, NULL, 'Gaspar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15836, 22, 'BR', NULL, NULL, 'Girau do Ponciano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15837, 22, 'BR', NULL, NULL, 'Ibateguara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15838, 22, 'BR', NULL, NULL, 'Igaci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15839, 22, 'BR', NULL, NULL, 'Igreja Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15840, 22, 'BR', NULL, NULL, 'Inhapi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15841, 22, 'BR', NULL, NULL, 'Jacaré dos Homens')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15842, 22, 'BR', NULL, NULL, 'Jacuípe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15843, 22, 'BR', NULL, NULL, 'Japaratinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15844, 22, 'BR', NULL, NULL, 'Jaramataia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15845, 22, 'BR', NULL, NULL, 'Jenipapo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15846, 22, 'BR', NULL, NULL, 'Jequiá da Praia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15847, 22, 'BR', NULL, NULL, 'Joaquim Gomes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15848, 22, 'BR', NULL, NULL, 'Jundiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15849, 22, 'BR', NULL, NULL, 'Junqueiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15850, 22, 'BR', NULL, NULL, 'Lagoa Dantas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15851, 22, 'BR', NULL, NULL, 'Lagoa da Areia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15852, 22, 'BR', NULL, NULL, 'Lagoa da Canoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15853, 22, 'BR', NULL, NULL, 'Lagoa da Pedra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15854, 22, 'BR', NULL, NULL, 'Lagoa do Caldeirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15855, 22, 'BR', NULL, NULL, 'Lagoa do Canto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15856, 22, 'BR', NULL, NULL, 'Lagoa do Exú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15857, 22, 'BR', NULL, NULL, 'Lagoa do Rancho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15858, 22, 'BR', NULL, NULL, 'Lajes do Caldeirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15859, 22, 'BR', NULL, NULL, 'Laranjal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15860, 22, 'BR', NULL, NULL, 'Limoeiro de Anadia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15861, 22, 'BR', NULL, NULL, 'Maceió')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15862, 22, 'BR', NULL, NULL, 'Major Isidoro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15863, 22, 'BR', NULL, NULL, 'Mar Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15864, 22, 'BR', NULL, NULL, 'Maragogi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15865, 22, 'BR', NULL, NULL, 'Maravilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15866, 22, 'BR', NULL, NULL, 'Marechal Deodoro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15867, 22, 'BR', NULL, NULL, 'Maribondo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15868, 22, 'BR', NULL, NULL, 'Massaranduba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15869, 22, 'BR', NULL, NULL, 'Mata Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15870, 22, 'BR', NULL, NULL, 'Matriz de Camaragibe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15871, 22, 'BR', NULL, NULL, 'Messias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15872, 22, 'BR', NULL, NULL, 'Minador do Negrão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15873, 22, 'BR', NULL, NULL, 'Monteirópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15874, 22, 'BR', NULL, NULL, 'Moreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15875, 22, 'BR', NULL, NULL, 'Munguba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15876, 22, 'BR', NULL, NULL, 'Murici')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15877, 22, 'BR', NULL, NULL, 'Novo Lino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15878, 22, 'BR', NULL, NULL, 'Olho D''Água Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15879, 22, 'BR', NULL, NULL, 'Olho D''Água das Flores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15880, 22, 'BR', NULL, NULL, 'Olho D''Água de Cima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15881, 22, 'BR', NULL, NULL, 'Olho D''Água do Casado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15882, 22, 'BR', NULL, NULL, 'Olho D''Água dos Dandanhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15883, 22, 'BR', NULL, NULL, 'Olivença')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15884, 22, 'BR', NULL, NULL, 'Ouro Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15885, 22, 'BR', NULL, NULL, 'Palestina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15886, 22, 'BR', NULL, NULL, 'Palmeira de Fora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15887, 22, 'BR', NULL, NULL, 'Palmeira dos Índios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15888, 22, 'BR', NULL, NULL, 'Pariconha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15889, 22, 'BR', NULL, NULL, 'Paripueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15890, 22, 'BR', NULL, NULL, 'Passo de Camaragibe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15891, 22, 'BR', NULL, NULL, 'Pau D''Arco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15892, 22, 'BR', NULL, NULL, 'Pau Ferro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15893, 22, 'BR', NULL, NULL, 'Paulo Jacinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15894, 22, 'BR', NULL, NULL, 'Penedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15895, 22, 'BR', NULL, NULL, 'Piaçabuçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15896, 22, 'BR', NULL, NULL, 'Pilar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15897, 22, 'BR', NULL, NULL, 'Pindoba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15898, 22, 'BR', NULL, NULL, 'Piranhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15899, 22, 'BR', NULL, NULL, 'Pontal de Coruripe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15900, 22, 'BR', NULL, NULL, 'Porto Calvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15901, 22, 'BR', NULL, NULL, 'Porto Real do Colégio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15902, 22, 'BR', NULL, NULL, 'Porto de Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15903, 22, 'BR', NULL, NULL, 'Poxim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15904, 22, 'BR', NULL, NULL, 'Poço da Pedra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15905, 22, 'BR', NULL, NULL, 'Poço das Trincheiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15906, 22, 'BR', NULL, NULL, 'Poção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15907, 22, 'BR', NULL, NULL, 'Pão de Açúcar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15908, 22, 'BR', NULL, NULL, 'Quebrangulo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15909, 22, 'BR', NULL, NULL, 'Riacho Fundo de Cima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15910, 22, 'BR', NULL, NULL, 'Riacho do Sertão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15911, 22, 'BR', NULL, NULL, 'Rio Largo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15912, 22, 'BR', NULL, NULL, 'Rocha Cavalcante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15913, 22, 'BR', NULL, NULL, 'Roteiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15914, 22, 'BR', NULL, NULL, 'Santa Efigênia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15915, 22, 'BR', NULL, NULL, 'Santa Luzia do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15916, 22, 'BR', NULL, NULL, 'Santana do Ipanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15917, 22, 'BR', NULL, NULL, 'Santana do Mundaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15918, 22, 'BR', NULL, NULL, 'Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15919, 22, 'BR', NULL, NULL, 'Sapucaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15920, 22, 'BR', NULL, NULL, 'Satuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15921, 22, 'BR', NULL, NULL, 'Senador Rui Palmeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15922, 22, 'BR', NULL, NULL, 'Serra da Mandioca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15923, 22, 'BR', NULL, NULL, 'Serra do São José')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15924, 22, 'BR', NULL, NULL, 'São Brás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15925, 22, 'BR', NULL, NULL, 'São José da Laje')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15926, 22, 'BR', NULL, NULL, 'São José da Tapera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15927, 22, 'BR', NULL, NULL, 'São Luís do Quitunde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15928, 22, 'BR', NULL, NULL, 'São Miguel dos Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15929, 22, 'BR', NULL, NULL, 'São Miguel dos Milagres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15930, 22, 'BR', NULL, NULL, 'São Sebastião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15931, 22, 'BR', NULL, NULL, 'Taboleiro do Pinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15932, 22, 'BR', NULL, NULL, 'Taboquinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15933, 22, 'BR', NULL, NULL, 'Tanque D''Arca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15934, 22, 'BR', NULL, NULL, 'Taquarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15935, 22, 'BR', NULL, NULL, 'Tatuamunha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15936, 22, 'BR', NULL, NULL, 'Teotônio Vilela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15937, 22, 'BR', NULL, NULL, 'Traipu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15938, 22, 'BR', NULL, NULL, 'União dos Palmares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15939, 22, 'BR', NULL, NULL, 'Usina Camaçari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15940, 22, 'BR', NULL, NULL, 'Vila Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15941, 22, 'BR', NULL, NULL, 'Vila São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15942, 22, 'BR', NULL, NULL, 'Viçosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15943, 22, 'BR', NULL, NULL, 'Água Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15944, 23, 'BR', NULL, NULL, 'Abacate da Pedreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15945, 23, 'BR', NULL, NULL, 'Amapari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15946, 23, 'BR', NULL, NULL, 'Amapá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15947, 23, 'BR', NULL, NULL, 'Ambé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15948, 23, 'BR', NULL, NULL, 'Aporema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15949, 23, 'BR', NULL, NULL, 'Ariri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15950, 23, 'BR', NULL, NULL, 'Bailique')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15951, 23, 'BR', NULL, NULL, 'Boca do Jari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15952, 23, 'BR', NULL, NULL, 'Calçoene')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15953, 23, 'BR', NULL, NULL, 'Cantanzal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15954, 23, 'BR', NULL, NULL, 'Carmo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15955, 23, 'BR', NULL, NULL, 'Clevelândia do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15956, 23, 'BR', NULL, NULL, 'Corre Água')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15957, 23, 'BR', NULL, NULL, 'Cunani')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15958, 23, 'BR', NULL, NULL, 'Curiaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15959, 23, 'BR', NULL, NULL, 'Cutias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15960, 23, 'BR', NULL, NULL, 'Fazendinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15961, 23, 'BR', NULL, NULL, 'Ferreira Gomes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15962, 23, 'BR', NULL, NULL, 'Gaivota')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15963, 23, 'BR', NULL, NULL, 'Gurupora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15964, 23, 'BR', NULL, NULL, 'Igarapé do Lago')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15965, 23, 'BR', NULL, NULL, 'Ilha de Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15966, 23, 'BR', NULL, NULL, 'Inajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15967, 23, 'BR', NULL, NULL, 'Itaubal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15968, 23, 'BR', NULL, NULL, 'Laranjal do Jari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15969, 23, 'BR', NULL, NULL, 'Livramento do Pacuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15970, 23, 'BR', NULL, NULL, 'Lourenço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15971, 23, 'BR', NULL, NULL, 'Macapá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15972, 23, 'BR', NULL, NULL, 'Mazagão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15973, 23, 'BR', NULL, NULL, 'Mazagão Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15974, 23, 'BR', NULL, NULL, 'Oiapoque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15975, 23, 'BR', NULL, NULL, 'Paredão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15976, 23, 'BR', NULL, NULL, 'Porto Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15977, 23, 'BR', NULL, NULL, 'Pracuúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15978, 23, 'BR', NULL, NULL, 'Santa Luzia do Pacuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15979, 23, 'BR', NULL, NULL, 'Santa Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15980, 23, 'BR', NULL, NULL, 'Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15981, 23, 'BR', NULL, NULL, 'Serra do Navio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15982, 23, 'BR', NULL, NULL, 'Sucuriju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15983, 23, 'BR', NULL, NULL, 'São Joaquim do Pacuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15984, 23, 'BR', NULL, NULL, 'São Sebastião do Livramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15985, 23, 'BR', NULL, NULL, 'São Tomé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15986, 23, 'BR', NULL, NULL, 'Tartarugalzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15987, 23, 'BR', NULL, NULL, 'Vila Velha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15988, 23, 'BR', NULL, NULL, 'Vitória do Jari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15989, 24, 'BR', NULL, NULL, 'Afonso Cunha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15990, 24, 'BR', NULL, NULL, 'Alcântara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15991, 24, 'BR', NULL, NULL, 'Aldeias Altas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15992, 24, 'BR', NULL, NULL, 'Altamira do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15993, 24, 'BR', NULL, NULL, 'Alto Alegre do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15994, 24, 'BR', NULL, NULL, 'Alto Alegre do Pindaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15995, 24, 'BR', NULL, NULL, 'Alto Parnaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15996, 24, 'BR', NULL, NULL, 'Amapá do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15997, 24, 'BR', NULL, NULL, 'Amarante do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15998, 24, 'BR', NULL, NULL, 'Anajatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (15999, 24, 'BR', NULL, NULL, 'Anapurus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16000, 24, 'BR', NULL, NULL, 'Anil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16001, 24, 'BR', NULL, NULL, 'Apicum-Açu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16002, 24, 'BR', NULL, NULL, 'Araguanã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16003, 24, 'BR', NULL, NULL, 'Araióses')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16004, 24, 'BR', NULL, NULL, 'Arame')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16005, 24, 'BR', NULL, NULL, 'Arari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16006, 24, 'BR', NULL, NULL, 'Aurizona')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16007, 24, 'BR', NULL, NULL, 'Axixá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16008, 24, 'BR', NULL, NULL, 'Açailândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16009, 24, 'BR', NULL, NULL, 'Bacabal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16010, 24, 'BR', NULL, NULL, 'Bacabeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16011, 24, 'BR', NULL, NULL, 'Bacatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16012, 24, 'BR', NULL, NULL, 'Bacuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16013, 24, 'BR', NULL, NULL, 'Bacurituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16014, 24, 'BR', NULL, NULL, 'Balsas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16015, 24, 'BR', NULL, NULL, 'Barra do Corda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16016, 24, 'BR', NULL, NULL, 'Barreirinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16017, 24, 'BR', NULL, NULL, 'Barro Duro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16018, 24, 'BR', NULL, NULL, 'Barão de Grajaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16019, 24, 'BR', NULL, NULL, 'Barão de Tromai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16020, 24, 'BR', NULL, NULL, 'Bela Vista do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16021, 24, 'BR', NULL, NULL, 'Belágua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16022, 24, 'BR', NULL, NULL, 'Benedito Leite')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16023, 24, 'BR', NULL, NULL, 'Bequimão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16024, 24, 'BR', NULL, NULL, 'Bernardo do Mearim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16025, 24, 'BR', NULL, NULL, 'Boa Vista do Gurupi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16026, 24, 'BR', NULL, NULL, 'Boa Vista do Pindaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16027, 24, 'BR', NULL, NULL, 'Bom Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16028, 24, 'BR', NULL, NULL, 'Bom Jesus das Selvas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16029, 24, 'BR', NULL, NULL, 'Bom Lugar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16030, 24, 'BR', NULL, NULL, 'Bonfim do Arari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16031, 24, 'BR', NULL, NULL, 'Brejo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16032, 24, 'BR', NULL, NULL, 'Brejo de Areia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16033, 24, 'BR', NULL, NULL, 'Brejo de São Félix')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16034, 24, 'BR', NULL, NULL, 'Buriti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16035, 24, 'BR', NULL, NULL, 'Buriti Bravo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16036, 24, 'BR', NULL, NULL, 'Buriti Cortado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16037, 24, 'BR', NULL, NULL, 'Buriticupu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16038, 24, 'BR', NULL, NULL, 'Buritirama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16039, 24, 'BR', NULL, NULL, 'Cachoeira Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16040, 24, 'BR', NULL, NULL, 'Cajapió')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16041, 24, 'BR', NULL, NULL, 'Cajari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16042, 24, 'BR', NULL, NULL, 'Campestre do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16043, 24, 'BR', NULL, NULL, 'Cantanhede')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16044, 24, 'BR', NULL, NULL, 'Capinzal do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16045, 24, 'BR', NULL, NULL, 'Caraíba do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16046, 24, 'BR', NULL, NULL, 'Carolina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16047, 24, 'BR', NULL, NULL, 'Carutapera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16048, 24, 'BR', NULL, NULL, 'Caxias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16049, 24, 'BR', NULL, NULL, 'Cedral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16050, 24, 'BR', NULL, NULL, 'Central do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16051, 24, 'BR', NULL, NULL, 'Centro Novo do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16052, 24, 'BR', NULL, NULL, 'Centro do Guilherme')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16053, 24, 'BR', NULL, NULL, 'Chapadinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16054, 24, 'BR', NULL, NULL, 'Cidelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16055, 24, 'BR', NULL, NULL, 'Codozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16056, 24, 'BR', NULL, NULL, 'Codó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16057, 24, 'BR', NULL, NULL, 'Coelho Neto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16058, 24, 'BR', NULL, NULL, 'Colinas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16059, 24, 'BR', NULL, NULL, 'Conceição do Lago-Açu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16060, 24, 'BR', NULL, NULL, 'Coroatá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16061, 24, 'BR', NULL, NULL, 'Curupa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16062, 24, 'BR', NULL, NULL, 'Cururupu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16063, 24, 'BR', NULL, NULL, 'Curva Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16064, 24, 'BR', NULL, NULL, 'Custódio Lima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16065, 24, 'BR', NULL, NULL, 'Cândido Mendes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16066, 24, 'BR', NULL, NULL, 'Davinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16067, 24, 'BR', NULL, NULL, 'Dom Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16068, 24, 'BR', NULL, NULL, 'Duque Bacelar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16069, 24, 'BR', NULL, NULL, 'Esperantinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16070, 24, 'BR', NULL, NULL, 'Estandarte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16071, 24, 'BR', NULL, NULL, 'Estreito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16072, 24, 'BR', NULL, NULL, 'Feira Nova do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16073, 24, 'BR', NULL, NULL, 'Fernando Falcão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16074, 24, 'BR', NULL, NULL, 'Formosa da Serra Negra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16075, 24, 'BR', NULL, NULL, 'Fortaleza dos Nogueiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16076, 24, 'BR', NULL, NULL, 'Fortuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16077, 24, 'BR', NULL, NULL, 'Frecheiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16078, 24, 'BR', NULL, NULL, 'Godofredo Viana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16079, 24, 'BR', NULL, NULL, 'Gonçalves Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16080, 24, 'BR', NULL, NULL, 'Governador Archer')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16081, 24, 'BR', NULL, NULL, 'Governador Edson Lobão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16082, 24, 'BR', NULL, NULL, 'Governador Eugênio Barros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16083, 24, 'BR', NULL, NULL, 'Governador Luiz Rocha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16084, 24, 'BR', NULL, NULL, 'Governador Newton Bello')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16085, 24, 'BR', NULL, NULL, 'Governador Nunes Freire')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16086, 24, 'BR', NULL, NULL, 'Grajaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16087, 24, 'BR', NULL, NULL, 'Graça Aranha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16088, 24, 'BR', NULL, NULL, 'Guimarães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16089, 24, 'BR', NULL, NULL, 'Humberto de Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16090, 24, 'BR', NULL, NULL, 'Ibipira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16091, 24, 'BR', NULL, NULL, 'Icatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16092, 24, 'BR', NULL, NULL, 'Igarapé Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16093, 24, 'BR', NULL, NULL, 'Igarapé do Meio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16094, 24, 'BR', NULL, NULL, 'Imperatriz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16095, 24, 'BR', NULL, NULL, 'Itaipava do Grajaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16096, 24, 'BR', NULL, NULL, 'Itamataré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16097, 24, 'BR', NULL, NULL, 'Itapecuru Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16098, 24, 'BR', NULL, NULL, 'Itapera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16099, 24, 'BR', NULL, NULL, 'Itinga do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16100, 24, 'BR', NULL, NULL, 'Jatobá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16101, 24, 'BR', NULL, NULL, 'Jenipapo dos Vieiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16102, 24, 'BR', NULL, NULL, 'Joselândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16103, 24, 'BR', NULL, NULL, 'João Lisboa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16104, 24, 'BR', NULL, NULL, 'Junco do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16105, 24, 'BR', NULL, NULL, 'Lago Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16106, 24, 'BR', NULL, NULL, 'Lago da Pedra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16107, 24, 'BR', NULL, NULL, 'Lago do Junco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16108, 24, 'BR', NULL, NULL, 'Lago dos Rodrigues')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16109, 24, 'BR', NULL, NULL, 'Lagoa Grande do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16110, 24, 'BR', NULL, NULL, 'Lagoa do Mato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16111, 24, 'BR', NULL, NULL, 'Lajeado Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16112, 24, 'BR', NULL, NULL, 'Lapela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16113, 24, 'BR', NULL, NULL, 'Leandro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16114, 24, 'BR', NULL, NULL, 'Lima Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16115, 24, 'BR', NULL, NULL, 'Loreto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16116, 24, 'BR', NULL, NULL, 'Luís Domingues')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16117, 24, 'BR', NULL, NULL, 'Magalhães de Almeida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16118, 24, 'BR', NULL, NULL, 'Maioba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16119, 24, 'BR', NULL, NULL, 'Maracaçumé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16120, 24, 'BR', NULL, NULL, 'Marajá do Sena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16121, 24, 'BR', NULL, NULL, 'Maranhãozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16122, 24, 'BR', NULL, NULL, 'Marianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16123, 24, 'BR', NULL, NULL, 'Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16124, 24, 'BR', NULL, NULL, 'Mata Roma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16125, 24, 'BR', NULL, NULL, 'Matinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16126, 24, 'BR', NULL, NULL, 'Matões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16127, 24, 'BR', NULL, NULL, 'Matões do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16128, 24, 'BR', NULL, NULL, 'Milagres do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16129, 24, 'BR', NULL, NULL, 'Mirador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16130, 24, 'BR', NULL, NULL, 'Miranda do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16131, 24, 'BR', NULL, NULL, 'Mirinzal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16132, 24, 'BR', NULL, NULL, 'Montes Altos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16133, 24, 'BR', NULL, NULL, 'Monção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16134, 24, 'BR', NULL, NULL, 'Morros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16135, 24, 'BR', NULL, NULL, 'Nina Rodrigues')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16136, 24, 'BR', NULL, NULL, 'Nova Colinas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16137, 24, 'BR', NULL, NULL, 'Nova Iorque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16138, 24, 'BR', NULL, NULL, 'Nova Olinda do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16139, 24, 'BR', NULL, NULL, 'Olho D''Água das Cunhãs')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16140, 24, 'BR', NULL, NULL, 'Olinda Nova do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16141, 24, 'BR', NULL, NULL, 'Palmeirândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16142, 24, 'BR', NULL, NULL, 'Papagaio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16143, 24, 'BR', NULL, NULL, 'Paraibano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16144, 24, 'BR', NULL, NULL, 'Parnarama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16145, 24, 'BR', NULL, NULL, 'Passagem Franca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16146, 24, 'BR', NULL, NULL, 'Pastos Bons')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16147, 24, 'BR', NULL, NULL, 'Paulino Neves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16148, 24, 'BR', NULL, NULL, 'Paulo Ramos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16149, 24, 'BR', NULL, NULL, 'Paço do Lumiar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16150, 24, 'BR', NULL, NULL, 'Pedreiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16151, 24, 'BR', NULL, NULL, 'Pedro do Rosário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16152, 24, 'BR', NULL, NULL, 'Penalva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16153, 24, 'BR', NULL, NULL, 'Peri Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16154, 24, 'BR', NULL, NULL, 'Peritoró')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16155, 24, 'BR', NULL, NULL, 'Pimentel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16156, 24, 'BR', NULL, NULL, 'Pindaré Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16157, 24, 'BR', NULL, NULL, 'Pinheiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16158, 24, 'BR', NULL, NULL, 'Pio XII')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16159, 24, 'BR', NULL, NULL, 'Pirapemas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16160, 24, 'BR', NULL, NULL, 'Porto Franco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16161, 24, 'BR', NULL, NULL, 'Porto Rico do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16162, 24, 'BR', NULL, NULL, 'Porto das Gabarras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16163, 24, 'BR', NULL, NULL, 'Poção de Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16164, 24, 'BR', NULL, NULL, 'Presidente Dutra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16165, 24, 'BR', NULL, NULL, 'Presidente Juscelino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16166, 24, 'BR', NULL, NULL, 'Presidente Médici')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16167, 24, 'BR', NULL, NULL, 'Presidente Sarney')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16168, 24, 'BR', NULL, NULL, 'Presidente Vargas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16169, 24, 'BR', NULL, NULL, 'Primeira Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16170, 24, 'BR', NULL, NULL, 'Raposa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16171, 24, 'BR', NULL, NULL, 'Resplandes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16172, 24, 'BR', NULL, NULL, 'Riachão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16173, 24, 'BR', NULL, NULL, 'Ribamar Fiquene')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16174, 24, 'BR', NULL, NULL, 'Ribeirão Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16175, 24, 'BR', NULL, NULL, 'Rocado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16176, 24, 'BR', NULL, NULL, 'Roque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16177, 24, 'BR', NULL, NULL, 'Rosário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16178, 24, 'BR', NULL, NULL, 'Sambaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16179, 24, 'BR', NULL, NULL, 'Santa Filomena do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16180, 24, 'BR', NULL, NULL, 'Santa Inês')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16181, 24, 'BR', NULL, NULL, 'Santa Luzia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16182, 24, 'BR', NULL, NULL, 'Santa Luzia do Paruá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16183, 24, 'BR', NULL, NULL, 'Santa Quitéria do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16184, 24, 'BR', NULL, NULL, 'Santa Rita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16185, 24, 'BR', NULL, NULL, 'Santana do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16186, 24, 'BR', NULL, NULL, 'Santo Amaro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16187, 24, 'BR', NULL, NULL, 'Santo Antônio dos Lopes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16188, 24, 'BR', NULL, NULL, 'Satubinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16189, 24, 'BR', NULL, NULL, 'Senador Alexandre Costa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16190, 24, 'BR', NULL, NULL, 'Senador La Roque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16191, 24, 'BR', NULL, NULL, 'Serrano do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16192, 24, 'BR', NULL, NULL, 'Sucupira do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16193, 24, 'BR', NULL, NULL, 'Sucupira do Riachão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16194, 24, 'BR', NULL, NULL, 'São Benedito do Rio Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16195, 24, 'BR', NULL, NULL, 'São Bento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16196, 24, 'BR', NULL, NULL, 'São Bernardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16197, 24, 'BR', NULL, NULL, 'São Domingos do Azeitão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16198, 24, 'BR', NULL, NULL, 'São Domingos do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16199, 24, 'BR', NULL, NULL, 'São Francisco do Brejão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16200, 24, 'BR', NULL, NULL, 'São Francisco do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16201, 24, 'BR', NULL, NULL, 'São Félix de Balsas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16202, 24, 'BR', NULL, NULL, 'São Joaquim dos Melos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16203, 24, 'BR', NULL, NULL, 'São José de Ribamar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16204, 24, 'BR', NULL, NULL, 'São José dos Basílios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16205, 24, 'BR', NULL, NULL, 'São João Batista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16206, 24, 'BR', NULL, NULL, 'São João de Cortes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16207, 24, 'BR', NULL, NULL, 'São João do Carú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16208, 24, 'BR', NULL, NULL, 'São João do Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16209, 24, 'BR', NULL, NULL, 'São João do Sóter')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16210, 24, 'BR', NULL, NULL, 'São João dos Patos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16211, 24, 'BR', NULL, NULL, 'São Luís')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16212, 24, 'BR', NULL, NULL, 'São Luís Gonzaga do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16213, 24, 'BR', NULL, NULL, 'São Mateus do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16214, 24, 'BR', NULL, NULL, 'São Pedro da Água Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16215, 24, 'BR', NULL, NULL, 'São Pedro dos Crentes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16216, 24, 'BR', NULL, NULL, 'São Raimundo das Mangabeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16217, 24, 'BR', NULL, NULL, 'São Raimundo de Codó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16218, 24, 'BR', NULL, NULL, 'São Raimundo do Doca Bezerra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16219, 24, 'BR', NULL, NULL, 'São Roberto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16220, 24, 'BR', NULL, NULL, 'São Vicente Ferrer')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16221, 24, 'BR', NULL, NULL, 'Sítio Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16222, 24, 'BR', NULL, NULL, 'Tasso Fragoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16223, 24, 'BR', NULL, NULL, 'Timbiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16224, 24, 'BR', NULL, NULL, 'Timon')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16225, 24, 'BR', NULL, NULL, 'Trizidela do Vale')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16226, 24, 'BR', NULL, NULL, 'Tufilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16227, 24, 'BR', NULL, NULL, 'Tuntum')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16228, 24, 'BR', NULL, NULL, 'Turiaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16229, 24, 'BR', NULL, NULL, 'Turilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16230, 24, 'BR', NULL, NULL, 'Tutóia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16231, 24, 'BR', NULL, NULL, 'Urbano Santos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16232, 24, 'BR', NULL, NULL, 'Vargem Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16233, 24, 'BR', NULL, NULL, 'Viana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16234, 24, 'BR', NULL, NULL, 'Vila Nova dos Martírios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16235, 24, 'BR', NULL, NULL, 'Vitorino Freire')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16236, 24, 'BR', NULL, NULL, 'Vitória do Mearim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16237, 24, 'BR', NULL, NULL, 'Zé Doca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16238, 24, 'BR', NULL, NULL, 'Água Doce do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16239, 25, 'BR', NULL, NULL, 'Abadia dos Dourados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16240, 25, 'BR', NULL, NULL, 'Abaeté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16241, 25, 'BR', NULL, NULL, 'Abaeté dos Mendes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16242, 25, 'BR', NULL, NULL, 'Abaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16243, 25, 'BR', NULL, NULL, 'Abre Campo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16244, 25, 'BR', NULL, NULL, 'Abreus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16245, 25, 'BR', NULL, NULL, 'Acaiaca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16246, 25, 'BR', NULL, NULL, 'Acuruí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16247, 25, 'BR', NULL, NULL, 'Adão Colares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16248, 25, 'BR', NULL, NULL, 'Aguanil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16249, 25, 'BR', NULL, NULL, 'Aimorés')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16250, 25, 'BR', NULL, NULL, 'Aiuruoca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16251, 25, 'BR', NULL, NULL, 'Alagoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16252, 25, 'BR', NULL, NULL, 'Albertina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16253, 25, 'BR', NULL, NULL, 'Alberto Isaacson')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16254, 25, 'BR', NULL, NULL, 'Albertos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16255, 25, 'BR', NULL, NULL, 'Aldeia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16256, 25, 'BR', NULL, NULL, 'Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16257, 25, 'BR', NULL, NULL, 'Alegria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16258, 25, 'BR', NULL, NULL, 'Alexandrita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16259, 25, 'BR', NULL, NULL, 'Alfenas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16260, 25, 'BR', NULL, NULL, 'Alfredo Vasconcelos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16261, 25, 'BR', NULL, NULL, 'Almeida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16262, 25, 'BR', NULL, NULL, 'Almenara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16263, 25, 'BR', NULL, NULL, 'Alpercata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16264, 25, 'BR', NULL, NULL, 'Alpinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16265, 25, 'BR', NULL, NULL, 'Alterosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16266, 25, 'BR', NULL, NULL, 'Alto Belo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16267, 25, 'BR', NULL, NULL, 'Alto Caparaó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16268, 25, 'BR', NULL, NULL, 'Alto Capim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16269, 25, 'BR', NULL, NULL, 'Alto Jequitibá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16270, 25, 'BR', NULL, NULL, 'Alto Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16271, 25, 'BR', NULL, NULL, 'Alto Rio Doce')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16272, 25, 'BR', NULL, NULL, 'Alto de Santa Helena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16273, 25, 'BR', NULL, NULL, 'Altolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16274, 25, 'BR', NULL, NULL, 'Alvarenga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16275, 25, 'BR', NULL, NULL, 'Alvação')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16276, 25, 'BR', NULL, NULL, 'Alvinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16277, 25, 'BR', NULL, NULL, 'Alvorada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16278, 25, 'BR', NULL, NULL, 'Alvorada de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16279, 25, 'BR', NULL, NULL, 'Além Paraíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16280, 25, 'BR', NULL, NULL, 'Amanda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16281, 25, 'BR', NULL, NULL, 'Amanhece')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16282, 25, 'BR', NULL, NULL, 'Amarantina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16283, 25, 'BR', NULL, NULL, 'Amparo da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16284, 25, 'BR', NULL, NULL, 'Andiroba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16285, 25, 'BR', NULL, NULL, 'Andradas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16286, 25, 'BR', NULL, NULL, 'Andrelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16287, 25, 'BR', NULL, NULL, 'Andrequicé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16288, 25, 'BR', NULL, NULL, 'Angaturama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16289, 25, 'BR', NULL, NULL, 'Angelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16290, 25, 'BR', NULL, NULL, 'Angicos de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16291, 25, 'BR', NULL, NULL, 'Angueretá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16292, 25, 'BR', NULL, NULL, 'Angustura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16293, 25, 'BR', NULL, NULL, 'Antunes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16294, 25, 'BR', NULL, NULL, 'Antônio Carlos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16295, 25, 'BR', NULL, NULL, 'Antônio Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16296, 25, 'BR', NULL, NULL, 'Antônio Ferreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16297, 25, 'BR', NULL, NULL, 'Antônio Pereira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16298, 25, 'BR', NULL, NULL, 'Antônio Prado de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16299, 25, 'BR', NULL, NULL, 'Antônio dos Santos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16300, 25, 'BR', NULL, NULL, 'Aparecida de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16301, 25, 'BR', NULL, NULL, 'Aracati de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16302, 25, 'BR', NULL, NULL, 'Aracitaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16303, 25, 'BR', NULL, NULL, 'Araguari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16304, 25, 'BR', NULL, NULL, 'Aramirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16305, 25, 'BR', NULL, NULL, 'Aranha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16306, 25, 'BR', NULL, NULL, 'Arantina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16307, 25, 'BR', NULL, NULL, 'Araponga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16308, 25, 'BR', NULL, NULL, 'Araporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16309, 25, 'BR', NULL, NULL, 'Arapuá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16310, 25, 'BR', NULL, NULL, 'Araxá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16311, 25, 'BR', NULL, NULL, 'Araçaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16312, 25, 'BR', NULL, NULL, 'Araçuaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16313, 25, 'BR', NULL, NULL, 'Araújos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16314, 25, 'BR', NULL, NULL, 'Araúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16315, 25, 'BR', NULL, NULL, 'Arceburgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16316, 25, 'BR', NULL, NULL, 'Arcos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16317, 25, 'BR', NULL, NULL, 'Arcângelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16318, 25, 'BR', NULL, NULL, 'Areado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16319, 25, 'BR', NULL, NULL, 'Argenita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16320, 25, 'BR', NULL, NULL, 'Argirita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16321, 25, 'BR', NULL, NULL, 'Aricanduva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16322, 25, 'BR', NULL, NULL, 'Arinos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16323, 25, 'BR', NULL, NULL, 'Aristides Batista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16324, 25, 'BR', NULL, NULL, 'Ascenção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16325, 25, 'BR', NULL, NULL, 'Assaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16326, 25, 'BR', NULL, NULL, 'Astolfo Dutra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16327, 25, 'BR', NULL, NULL, 'Ataléia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16328, 25, 'BR', NULL, NULL, 'Augusto de Lima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16329, 25, 'BR', NULL, NULL, 'Avaí do Jacinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16330, 25, 'BR', NULL, NULL, 'Azurita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16331, 25, 'BR', NULL, NULL, 'Açucena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16332, 25, 'BR', NULL, NULL, 'Babilônia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16333, 25, 'BR', NULL, NULL, 'Baependi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16334, 25, 'BR', NULL, NULL, 'Baguari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16335, 25, 'BR', NULL, NULL, 'Baixa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16336, 25, 'BR', NULL, NULL, 'Baiões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16337, 25, 'BR', NULL, NULL, 'Balbinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16338, 25, 'BR', NULL, NULL, 'Baldim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16339, 25, 'BR', NULL, NULL, 'Bambuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16340, 25, 'BR', NULL, NULL, 'Bandeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16341, 25, 'BR', NULL, NULL, 'Bandeira do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16342, 25, 'BR', NULL, NULL, 'Bandeirantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16343, 25, 'BR', NULL, NULL, 'Barbacena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16344, 25, 'BR', NULL, NULL, 'Barra Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16345, 25, 'BR', NULL, NULL, 'Barra Feliz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16346, 25, 'BR', NULL, NULL, 'Barra Longa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16347, 25, 'BR', NULL, NULL, 'Barra da Figueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16348, 25, 'BR', NULL, NULL, 'Barra do Ariranha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16349, 25, 'BR', NULL, NULL, 'Barra do Cuieté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16350, 25, 'BR', NULL, NULL, 'Barranco Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16351, 25, 'BR', NULL, NULL, 'Barreiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16352, 25, 'BR', NULL, NULL, 'Barreiro Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16353, 25, 'BR', NULL, NULL, 'Barreiro da Raiz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16354, 25, 'BR', NULL, NULL, 'Barreiro do Rio Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16355, 25, 'BR', NULL, NULL, 'Barretos de Alvinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16356, 25, 'BR', NULL, NULL, 'Barrocão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16357, 25, 'BR', NULL, NULL, 'Barroso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16358, 25, 'BR', NULL, NULL, 'Barão de Cocais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16359, 25, 'BR', NULL, NULL, 'Barão de Monte Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16360, 25, 'BR', NULL, NULL, 'Bação')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16361, 25, 'BR', NULL, NULL, 'Baú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16362, 25, 'BR', NULL, NULL, 'Bela Vista de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16363, 25, 'BR', NULL, NULL, 'Belisário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16364, 25, 'BR', NULL, NULL, 'Belmiro Braga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16365, 25, 'BR', NULL, NULL, 'Belo Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16366, 25, 'BR', NULL, NULL, 'Belo Oriente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16367, 25, 'BR', NULL, NULL, 'Belo Vale')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16368, 25, 'BR', NULL, NULL, 'Bentópolis de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16369, 25, 'BR', NULL, NULL, 'Berilo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16370, 25, 'BR', NULL, NULL, 'Berizal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16371, 25, 'BR', NULL, NULL, 'Bertópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16372, 25, 'BR', NULL, NULL, 'Betim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16373, 25, 'BR', NULL, NULL, 'Bias Fortes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16374, 25, 'BR', NULL, NULL, 'Bicas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16375, 25, 'BR', NULL, NULL, 'Bicuíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16376, 25, 'BR', NULL, NULL, 'Biquinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16377, 25, 'BR', NULL, NULL, 'Bituri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16378, 25, 'BR', NULL, NULL, 'Boa Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16379, 25, 'BR', NULL, NULL, 'Boa Família')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16380, 25, 'BR', NULL, NULL, 'Boa União de Itabirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16381, 25, 'BR', NULL, NULL, 'Boa Vista de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16382, 25, 'BR', NULL, NULL, 'Bocaina de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16383, 25, 'BR', NULL, NULL, 'Bocaiúva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16384, 25, 'BR', NULL, NULL, 'Bom Despacho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16385, 25, 'BR', NULL, NULL, 'Bom Jardim de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16386, 25, 'BR', NULL, NULL, 'Bom Jesus da Cachoeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16387, 25, 'BR', NULL, NULL, 'Bom Jesus da Penha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16388, 25, 'BR', NULL, NULL, 'Bom Jesus de Cardosos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16389, 25, 'BR', NULL, NULL, 'Bom Jesus do Amparo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16390, 25, 'BR', NULL, NULL, 'Bom Jesus do Divino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16391, 25, 'BR', NULL, NULL, 'Bom Jesus do Galho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16392, 25, 'BR', NULL, NULL, 'Bom Jesus do Madeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16393, 25, 'BR', NULL, NULL, 'Bom Pastor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16394, 25, 'BR', NULL, NULL, 'Bom Repouso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16395, 25, 'BR', NULL, NULL, 'Bom Retiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16396, 25, 'BR', NULL, NULL, 'Bom Sucesso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16397, 25, 'BR', NULL, NULL, 'Bom Sucesso de Patos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16398, 25, 'BR', NULL, NULL, 'Bonança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16399, 25, 'BR', NULL, NULL, 'Bonfim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16400, 25, 'BR', NULL, NULL, 'Bonfinópolis de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16401, 25, 'BR', NULL, NULL, 'Bonito de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16402, 25, 'BR', NULL, NULL, 'Borba Gato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16403, 25, 'BR', NULL, NULL, 'Borda da Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16404, 25, 'BR', NULL, NULL, 'Botelhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16405, 25, 'BR', NULL, NULL, 'Botumirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16406, 25, 'BR', NULL, NULL, 'Brasilândia de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16407, 25, 'BR', NULL, NULL, 'Brasília de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16408, 25, 'BR', NULL, NULL, 'Brasópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16409, 25, 'BR', NULL, NULL, 'Braúnas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16410, 25, 'BR', NULL, NULL, 'Brejaubinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16411, 25, 'BR', NULL, NULL, 'Brejaúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16412, 25, 'BR', NULL, NULL, 'Brejo Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16413, 25, 'BR', NULL, NULL, 'Brejo do Amparo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16414, 25, 'BR', NULL, NULL, 'Brumadinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16415, 25, 'BR', NULL, NULL, 'Brumal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16416, 25, 'BR', NULL, NULL, 'Brás Pires')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16417, 25, 'BR', NULL, NULL, 'Buarque de Macedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16418, 25, 'BR', NULL, NULL, 'Bueno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16419, 25, 'BR', NULL, NULL, 'Bueno Brandão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16420, 25, 'BR', NULL, NULL, 'Buenópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16421, 25, 'BR', NULL, NULL, 'Bugre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16422, 25, 'BR', NULL, NULL, 'Buritis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16423, 25, 'BR', NULL, NULL, 'Buritizeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16424, 25, 'BR', NULL, NULL, 'Caatinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16425, 25, 'BR', NULL, NULL, 'Cabeceira Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16426, 25, 'BR', NULL, NULL, 'Cabo Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16427, 25, 'BR', NULL, NULL, 'Caburu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16428, 25, 'BR', NULL, NULL, 'Cachoeira Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16429, 25, 'BR', NULL, NULL, 'Cachoeira Dourada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16430, 25, 'BR', NULL, NULL, 'Cachoeira da Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16431, 25, 'BR', NULL, NULL, 'Cachoeira de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16432, 25, 'BR', NULL, NULL, 'Cachoeira de Pajeú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16433, 25, 'BR', NULL, NULL, 'Cachoeira de Santa Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16434, 25, 'BR', NULL, NULL, 'Cachoeira do Brumado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16435, 25, 'BR', NULL, NULL, 'Cachoeira do Campo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16436, 25, 'BR', NULL, NULL, 'Cachoeira do Manteiga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16437, 25, 'BR', NULL, NULL, 'Cachoeira do Vale')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16438, 25, 'BR', NULL, NULL, 'Cachoeira dos Antunes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16439, 25, 'BR', NULL, NULL, 'Cachoeirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16440, 25, 'BR', NULL, NULL, 'Caetano Lopes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16441, 25, 'BR', NULL, NULL, 'Caetanópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16442, 25, 'BR', NULL, NULL, 'Caeté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16443, 25, 'BR', NULL, NULL, 'Caiana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16444, 25, 'BR', NULL, NULL, 'Caiapó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16445, 25, 'BR', NULL, NULL, 'Cajuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16446, 25, 'BR', NULL, NULL, 'Caldas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16447, 25, 'BR', NULL, NULL, 'Calixto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16448, 25, 'BR', NULL, NULL, 'Camacho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16449, 25, 'BR', NULL, NULL, 'Camanducaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16450, 25, 'BR', NULL, NULL, 'Camargos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16451, 25, 'BR', NULL, NULL, 'Cambuquira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16452, 25, 'BR', NULL, NULL, 'Cambuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16453, 25, 'BR', NULL, NULL, 'Campanha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16454, 25, 'BR', NULL, NULL, 'Campanário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16455, 25, 'BR', NULL, NULL, 'Campestre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16456, 25, 'BR', NULL, NULL, 'Campestrinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16457, 25, 'BR', NULL, NULL, 'Campina Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16458, 25, 'BR', NULL, NULL, 'Campo Alegre de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16459, 25, 'BR', NULL, NULL, 'Campo Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16460, 25, 'BR', NULL, NULL, 'Campo Belo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16461, 25, 'BR', NULL, NULL, 'Campo Florido')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16462, 25, 'BR', NULL, NULL, 'Campo Redondo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16463, 25, 'BR', NULL, NULL, 'Campo do Meio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16464, 25, 'BR', NULL, NULL, 'Campolide')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16465, 25, 'BR', NULL, NULL, 'Campos Altos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16466, 25, 'BR', NULL, NULL, 'Campos Gerais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16467, 25, 'BR', NULL, NULL, 'Cana Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16468, 25, 'BR', NULL, NULL, 'Canabrava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16469, 25, 'BR', NULL, NULL, 'Canastrão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16470, 25, 'BR', NULL, NULL, 'Canaã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16471, 25, 'BR', NULL, NULL, 'Candeias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16472, 25, 'BR', NULL, NULL, 'Canoeiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16473, 25, 'BR', NULL, NULL, 'Cantagalo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16474, 25, 'BR', NULL, NULL, 'Canápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16475, 25, 'BR', NULL, NULL, 'Caparaó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16476, 25, 'BR', NULL, NULL, 'Capela Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16477, 25, 'BR', NULL, NULL, 'Capelinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16478, 25, 'BR', NULL, NULL, 'Capetinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16479, 25, 'BR', NULL, NULL, 'Capim Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16480, 25, 'BR', NULL, NULL, 'Capinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16481, 25, 'BR', NULL, NULL, 'Capitânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16482, 25, 'BR', NULL, NULL, 'Capitão Andrade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16483, 25, 'BR', NULL, NULL, 'Capitão Enéas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16484, 25, 'BR', NULL, NULL, 'Capitólio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16485, 25, 'BR', NULL, NULL, 'Caputira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16486, 25, 'BR', NULL, NULL, 'Caranaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16487, 25, 'BR', NULL, NULL, 'Carandaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16488, 25, 'BR', NULL, NULL, 'Carangola')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16489, 25, 'BR', NULL, NULL, 'Caratinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16490, 25, 'BR', NULL, NULL, 'Caraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16491, 25, 'BR', NULL, NULL, 'Carbonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16492, 25, 'BR', NULL, NULL, 'Cardeal Mota')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16493, 25, 'BR', NULL, NULL, 'Careaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16494, 25, 'BR', NULL, NULL, 'Carioca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16495, 25, 'BR', NULL, NULL, 'Carlos Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16496, 25, 'BR', NULL, NULL, 'Carlos Chagas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16497, 25, 'BR', NULL, NULL, 'Carmo da Cachoeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16498, 25, 'BR', NULL, NULL, 'Carmo da Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16499, 25, 'BR', NULL, NULL, 'Carmo de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16500, 25, 'BR', NULL, NULL, 'Carmo do Cajuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16501, 25, 'BR', NULL, NULL, 'Carmo do Paranaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16502, 25, 'BR', NULL, NULL, 'Carmo do Rio Claro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16503, 25, 'BR', NULL, NULL, 'Carmésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16504, 25, 'BR', NULL, NULL, 'Carmópolis de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16505, 25, 'BR', NULL, NULL, 'Carneirinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16506, 25, 'BR', NULL, NULL, 'Carrancas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16507, 25, 'BR', NULL, NULL, 'Carvalho de Brito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16508, 25, 'BR', NULL, NULL, 'Carvalhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16509, 25, 'BR', NULL, NULL, 'Carvalhópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16510, 25, 'BR', NULL, NULL, 'Casa Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16511, 25, 'BR', NULL, NULL, 'Cascalho Rico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16512, 25, 'BR', NULL, NULL, 'Cataguarino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16513, 25, 'BR', NULL, NULL, 'Cataguases')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16514, 25, 'BR', NULL, NULL, 'Catajás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16515, 25, 'BR', NULL, NULL, 'Catas Altas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16516, 25, 'BR', NULL, NULL, 'Catas Altas da Noruega')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16517, 25, 'BR', NULL, NULL, 'Catiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16518, 25, 'BR', NULL, NULL, 'Catuji')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16519, 25, 'BR', NULL, NULL, 'Catuni')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16520, 25, 'BR', NULL, NULL, 'Catuné')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16521, 25, 'BR', NULL, NULL, 'Catuti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16522, 25, 'BR', NULL, NULL, 'Caxambu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16523, 25, 'BR', NULL, NULL, 'Caçaratiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16524, 25, 'BR', NULL, NULL, 'Caçarema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16525, 25, 'BR', NULL, NULL, 'Cedro do Abaeté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16526, 25, 'BR', NULL, NULL, 'Centenário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16527, 25, 'BR', NULL, NULL, 'Central de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16528, 25, 'BR', NULL, NULL, 'Central de Santa Helena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16529, 25, 'BR', NULL, NULL, 'Centralina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16530, 25, 'BR', NULL, NULL, 'Cervo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16531, 25, 'BR', NULL, NULL, 'Chalé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16532, 25, 'BR', NULL, NULL, 'Chapada Gaúcha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16533, 25, 'BR', NULL, NULL, 'Chapada de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16534, 25, 'BR', NULL, NULL, 'Chapada do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16535, 25, 'BR', NULL, NULL, 'Chaveslândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16536, 25, 'BR', NULL, NULL, 'Chiador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16537, 25, 'BR', NULL, NULL, 'Chonim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16538, 25, 'BR', NULL, NULL, 'Chonin de Baixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16539, 25, 'BR', NULL, NULL, 'Chumbo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16540, 25, 'BR', NULL, NULL, 'Chácara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16541, 25, 'BR', NULL, NULL, 'Cipotânea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16542, 25, 'BR', NULL, NULL, 'Cisneiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16543, 25, 'BR', NULL, NULL, 'Citrolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16544, 25, 'BR', NULL, NULL, 'Claraval')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16545, 25, 'BR', NULL, NULL, 'Claro de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16546, 25, 'BR', NULL, NULL, 'Claro dos Poções')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16547, 25, 'BR', NULL, NULL, 'Cláudio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16548, 25, 'BR', NULL, NULL, 'Cláudio Manuel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16549, 25, 'BR', NULL, NULL, 'Cocais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16550, 25, 'BR', NULL, NULL, 'Coco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16551, 25, 'BR', NULL, NULL, 'Coimbra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16552, 25, 'BR', NULL, NULL, 'Coluna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16553, 25, 'BR', NULL, NULL, 'Comendador Gomes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16554, 25, 'BR', NULL, NULL, 'Comercinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16555, 25, 'BR', NULL, NULL, 'Conceição da Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16556, 25, 'BR', NULL, NULL, 'Conceição da Barra de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16557, 25, 'BR', NULL, NULL, 'Conceição da Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16558, 25, 'BR', NULL, NULL, 'Conceição da Brejaúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16559, 25, 'BR', NULL, NULL, 'Conceição da Ibitipoca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16560, 25, 'BR', NULL, NULL, 'Conceição das Alagoas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16561, 25, 'BR', NULL, NULL, 'Conceição das Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16562, 25, 'BR', NULL, NULL, 'Conceição de Ipanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16563, 25, 'BR', NULL, NULL, 'Conceição de Itaguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16564, 25, 'BR', NULL, NULL, 'Conceição de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16565, 25, 'BR', NULL, NULL, 'Conceição de Piracicaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16566, 25, 'BR', NULL, NULL, 'Conceição de Tronqueiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16567, 25, 'BR', NULL, NULL, 'Conceição do Capim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16568, 25, 'BR', NULL, NULL, 'Conceição do Formoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16569, 25, 'BR', NULL, NULL, 'Conceição do Mato Dentro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16570, 25, 'BR', NULL, NULL, 'Conceição do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16571, 25, 'BR', NULL, NULL, 'Conceição do Rio Acima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16572, 25, 'BR', NULL, NULL, 'Conceição do Rio Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16573, 25, 'BR', NULL, NULL, 'Conceição dos Ouros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16574, 25, 'BR', NULL, NULL, 'Concórdia de Mucuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16575, 25, 'BR', NULL, NULL, 'Condado do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16576, 25, 'BR', NULL, NULL, 'Confins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16577, 25, 'BR', NULL, NULL, 'Congonhal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16578, 25, 'BR', NULL, NULL, 'Congonhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16579, 25, 'BR', NULL, NULL, 'Congonhas do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16580, 25, 'BR', NULL, NULL, 'Conquista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16581, 25, 'BR', NULL, NULL, 'Conselheiro Lafaiete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16582, 25, 'BR', NULL, NULL, 'Conselheiro Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16583, 25, 'BR', NULL, NULL, 'Conselheiro Pena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16584, 25, 'BR', NULL, NULL, 'Consolação')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16585, 25, 'BR', NULL, NULL, 'Contagem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16586, 25, 'BR', NULL, NULL, 'Contrato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16587, 25, 'BR', NULL, NULL, 'Contria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16588, 25, 'BR', NULL, NULL, 'Coqueiral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16589, 25, 'BR', NULL, NULL, 'Coração de Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16590, 25, 'BR', NULL, NULL, 'Cordisburgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16591, 25, 'BR', NULL, NULL, 'Cordislândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16592, 25, 'BR', NULL, NULL, 'Corinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16593, 25, 'BR', NULL, NULL, 'Coroaci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16594, 25, 'BR', NULL, NULL, 'Coromandel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16595, 25, 'BR', NULL, NULL, 'Coronel Fabriciano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16596, 25, 'BR', NULL, NULL, 'Coronel Murta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16597, 25, 'BR', NULL, NULL, 'Coronel Pacheco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16598, 25, 'BR', NULL, NULL, 'Coronel Xavier Chaves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16599, 25, 'BR', NULL, NULL, 'Correia de Almeida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16600, 25, 'BR', NULL, NULL, 'Correntinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16601, 25, 'BR', NULL, NULL, 'Costa Sena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16602, 25, 'BR', NULL, NULL, 'Costas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16603, 25, 'BR', NULL, NULL, 'Costas da Mantiqueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16604, 25, 'BR', NULL, NULL, 'Couto de Magalhães de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16605, 25, 'BR', NULL, NULL, 'Crispim Jaques')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16606, 25, 'BR', NULL, NULL, 'Cristais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16607, 25, 'BR', NULL, NULL, 'Cristiano Otoni')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16608, 25, 'BR', NULL, NULL, 'Cristina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16609, 25, 'BR', NULL, NULL, 'Cristália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16610, 25, 'BR', NULL, NULL, 'Crisólia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16611, 25, 'BR', NULL, NULL, 'Crisólita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16612, 25, 'BR', NULL, NULL, 'Crucilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16613, 25, 'BR', NULL, NULL, 'Cruzeiro da Fortaleza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16614, 25, 'BR', NULL, NULL, 'Cruzeiro dos Peixotos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16615, 25, 'BR', NULL, NULL, 'Cruzília')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16616, 25, 'BR', NULL, NULL, 'Cubas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16617, 25, 'BR', NULL, NULL, 'Cuité Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16618, 25, 'BR', NULL, NULL, 'Cuparaque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16619, 25, 'BR', NULL, NULL, 'Curimataí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16620, 25, 'BR', NULL, NULL, 'Curral de Dentro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16621, 25, 'BR', NULL, NULL, 'Curvelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16622, 25, 'BR', NULL, NULL, 'Cássia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16623, 25, 'BR', NULL, NULL, 'Córrego Danta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16624, 25, 'BR', NULL, NULL, 'Córrego Fundo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16625, 25, 'BR', NULL, NULL, 'Córrego Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16626, 25, 'BR', NULL, NULL, 'Córrego do Barro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16627, 25, 'BR', NULL, NULL, 'Córrego do Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16628, 25, 'BR', NULL, NULL, 'Córrego do Ouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16629, 25, 'BR', NULL, NULL, 'Córregos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16630, 25, 'BR', NULL, NULL, 'Cônego João Pio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16631, 25, 'BR', NULL, NULL, 'Cônego Marinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16632, 25, 'BR', NULL, NULL, 'Datas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16633, 25, 'BR', NULL, NULL, 'Delfim Moreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16634, 25, 'BR', NULL, NULL, 'Delfinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16635, 25, 'BR', NULL, NULL, 'Delta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16636, 25, 'BR', NULL, NULL, 'Deputado Augusto Clementino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16637, 25, 'BR', NULL, NULL, 'Derribadinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16638, 25, 'BR', NULL, NULL, 'Descoberto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16639, 25, 'BR', NULL, NULL, 'Desembargador Otoni')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16640, 25, 'BR', NULL, NULL, 'Desemboque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16641, 25, 'BR', NULL, NULL, 'Desterro de Entre Rios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16642, 25, 'BR', NULL, NULL, 'Desterro do Melo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16643, 25, 'BR', NULL, NULL, 'Diamante de Ubá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16644, 25, 'BR', NULL, NULL, 'Diamantina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16645, 25, 'BR', NULL, NULL, 'Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16646, 25, 'BR', NULL, NULL, 'Dias Tavares/Siderúrgica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16647, 25, 'BR', NULL, NULL, 'Diogo de Vasconcelos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16648, 25, 'BR', NULL, NULL, 'Dionísio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16649, 25, 'BR', NULL, NULL, 'Divino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16650, 25, 'BR', NULL, NULL, 'Divino Espírito Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16651, 25, 'BR', NULL, NULL, 'Divino das Laranjeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16652, 25, 'BR', NULL, NULL, 'Divino de Virgolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16653, 25, 'BR', NULL, NULL, 'Divinolândia de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16654, 25, 'BR', NULL, NULL, 'Divinésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16655, 25, 'BR', NULL, NULL, 'Divinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16656, 25, 'BR', NULL, NULL, 'Divisa Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16657, 25, 'BR', NULL, NULL, 'Divisa Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16658, 25, 'BR', NULL, NULL, 'Divisópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16659, 25, 'BR', NULL, NULL, 'Dois de Abril')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16660, 25, 'BR', NULL, NULL, 'Dom Bosco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16661, 25, 'BR', NULL, NULL, 'Dom Cavati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16662, 25, 'BR', NULL, NULL, 'Dom Joaquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16663, 25, 'BR', NULL, NULL, 'Dom Lara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16664, 25, 'BR', NULL, NULL, 'Dom Modesto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16665, 25, 'BR', NULL, NULL, 'Dom Silvério')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16666, 25, 'BR', NULL, NULL, 'Dom Viçoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16667, 25, 'BR', NULL, NULL, 'Dona Euzébia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16668, 25, 'BR', NULL, NULL, 'Dores da Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16669, 25, 'BR', NULL, NULL, 'Dores de Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16670, 25, 'BR', NULL, NULL, 'Dores de Guanhães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16671, 25, 'BR', NULL, NULL, 'Dores do Indaiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16672, 25, 'BR', NULL, NULL, 'Dores do Paraibuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16673, 25, 'BR', NULL, NULL, 'Dores do Turvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16674, 25, 'BR', NULL, NULL, 'Doresópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16675, 25, 'BR', NULL, NULL, 'Douradinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16676, 25, 'BR', NULL, NULL, 'Douradoquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16677, 25, 'BR', NULL, NULL, 'Doutor Campolina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16678, 25, 'BR', NULL, NULL, 'Doutor Lund')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16679, 25, 'BR', NULL, NULL, 'Durandé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16680, 25, 'BR', NULL, NULL, 'Edgard Melo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16681, 25, 'BR', NULL, NULL, 'Elói Mendes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16682, 25, 'BR', NULL, NULL, 'Emboabas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16683, 25, 'BR', NULL, NULL, 'Engenheiro Caldas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16684, 25, 'BR', NULL, NULL, 'Engenheiro Correia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16685, 25, 'BR', NULL, NULL, 'Engenheiro Navarro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16686, 25, 'BR', NULL, NULL, 'Engenheiro Schnoor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16687, 25, 'BR', NULL, NULL, 'Engenho Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16688, 25, 'BR', NULL, NULL, 'Engenho do Ribeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16689, 25, 'BR', NULL, NULL, 'Entre Folhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16690, 25, 'BR', NULL, NULL, 'Entre Rios de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16691, 25, 'BR', NULL, NULL, 'Epaminondas Otoni')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16692, 25, 'BR', NULL, NULL, 'Ermidinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16693, 25, 'BR', NULL, NULL, 'Ervália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16694, 25, 'BR', NULL, NULL, 'Esmeraldas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16695, 25, 'BR', NULL, NULL, 'Esmeraldas de Ferros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16696, 25, 'BR', NULL, NULL, 'Espera Feliz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16697, 25, 'BR', NULL, NULL, 'Espinosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16698, 25, 'BR', NULL, NULL, 'Espírito Santo do Dourado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16699, 25, 'BR', NULL, NULL, 'Esteios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16700, 25, 'BR', NULL, NULL, 'Estevão de Araújo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16701, 25, 'BR', NULL, NULL, 'Estiva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16702, 25, 'BR', NULL, NULL, 'Estrela Dalva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16703, 25, 'BR', NULL, NULL, 'Estrela da Barra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16704, 25, 'BR', NULL, NULL, 'Estrela de Jordânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16705, 25, 'BR', NULL, NULL, 'Estrela do Indaiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16706, 25, 'BR', NULL, NULL, 'Estrela do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16707, 25, 'BR', NULL, NULL, 'Eugenópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16708, 25, 'BR', NULL, NULL, 'Euxenita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16709, 25, 'BR', NULL, NULL, 'Ewbank da Câmara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16710, 25, 'BR', NULL, NULL, 'Expedicionário Alício')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16711, 25, 'BR', NULL, NULL, 'Extração')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16712, 25, 'BR', NULL, NULL, 'Extrema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16713, 25, 'BR', NULL, NULL, 'Fama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16714, 25, 'BR', NULL, NULL, 'Faria Lemos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16715, 25, 'BR', NULL, NULL, 'Farias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16716, 25, 'BR', NULL, NULL, 'Fechados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16717, 25, 'BR', NULL, NULL, 'Felicina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16718, 25, 'BR', NULL, NULL, 'Felisburgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16719, 25, 'BR', NULL, NULL, 'Felixlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16720, 25, 'BR', NULL, NULL, 'Felício dos Santos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16721, 25, 'BR', NULL, NULL, 'Fernandes Tourinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16722, 25, 'BR', NULL, NULL, 'Fernão Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16723, 25, 'BR', NULL, NULL, 'Ferreiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16724, 25, 'BR', NULL, NULL, 'Ferreirópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16725, 25, 'BR', NULL, NULL, 'Ferros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16726, 25, 'BR', NULL, NULL, 'Ferruginha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16727, 25, 'BR', NULL, NULL, 'Fervedouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16728, 25, 'BR', NULL, NULL, 'Fidalgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16729, 25, 'BR', NULL, NULL, 'Fidelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16730, 25, 'BR', NULL, NULL, 'Flor de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16731, 25, 'BR', NULL, NULL, 'Floresta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16732, 25, 'BR', NULL, NULL, 'Florestal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16733, 25, 'BR', NULL, NULL, 'Florestina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16734, 25, 'BR', NULL, NULL, 'Florália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16735, 25, 'BR', NULL, NULL, 'Fonseca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16736, 25, 'BR', NULL, NULL, 'Formiga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16737, 25, 'BR', NULL, NULL, 'Formoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16738, 25, 'BR', NULL, NULL, 'Fortaleza de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16739, 25, 'BR', NULL, NULL, 'Fortuna de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16740, 25, 'BR', NULL, NULL, 'Francisco Badaró')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16741, 25, 'BR', NULL, NULL, 'Francisco Dumont')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16742, 25, 'BR', NULL, NULL, 'Francisco Sá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16743, 25, 'BR', NULL, NULL, 'Franciscópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16744, 25, 'BR', NULL, NULL, 'Frei Eustáquio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16745, 25, 'BR', NULL, NULL, 'Frei Gaspar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16746, 25, 'BR', NULL, NULL, 'Frei Inocêncio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16747, 25, 'BR', NULL, NULL, 'Frei Lagonegro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16748, 25, 'BR', NULL, NULL, 'Frei Orlando')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16749, 25, 'BR', NULL, NULL, 'Frei Serafim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16750, 25, 'BR', NULL, NULL, 'Freire Cardoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16751, 25, 'BR', NULL, NULL, 'Fronteira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16752, 25, 'BR', NULL, NULL, 'Fronteira dos Vales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16753, 25, 'BR', NULL, NULL, 'Fruta de Leite')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16754, 25, 'BR', NULL, NULL, 'Frutal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16755, 25, 'BR', NULL, NULL, 'Funchal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16756, 25, 'BR', NULL, NULL, 'Funilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16757, 25, 'BR', NULL, NULL, 'Furnas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16758, 25, 'BR', NULL, NULL, 'Furquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16759, 25, 'BR', NULL, NULL, 'Galego')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16760, 25, 'BR', NULL, NULL, 'Galena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16761, 25, 'BR', NULL, NULL, 'Galiléia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16762, 25, 'BR', NULL, NULL, 'Gama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16763, 25, 'BR', NULL, NULL, 'Gameleiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16764, 25, 'BR', NULL, NULL, 'Garapuava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16765, 25, 'BR', NULL, NULL, 'Gavião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16766, 25, 'BR', NULL, NULL, 'Glaucilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16767, 25, 'BR', NULL, NULL, 'Glaura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16768, 25, 'BR', NULL, NULL, 'Glucínio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16769, 25, 'BR', NULL, NULL, 'Goiabeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16770, 25, 'BR', NULL, NULL, 'Goianases')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16771, 25, 'BR', NULL, NULL, 'Goianá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16772, 25, 'BR', NULL, NULL, 'Gonzaga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16773, 25, 'BR', NULL, NULL, 'Gonçalves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16774, 25, 'BR', NULL, NULL, 'Gororós')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16775, 25, 'BR', NULL, NULL, 'Gorutuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16776, 25, 'BR', NULL, NULL, 'Gouvea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16777, 25, 'BR', NULL, NULL, 'Governador Valadares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16778, 25, 'BR', NULL, NULL, 'Gramínea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16779, 25, 'BR', NULL, NULL, 'Granada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16780, 25, 'BR', NULL, NULL, 'Grota')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16781, 25, 'BR', NULL, NULL, 'Grupiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16782, 25, 'BR', NULL, NULL, 'Grão Mogol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16783, 25, 'BR', NULL, NULL, 'Guaipava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16784, 25, 'BR', NULL, NULL, 'Guanhães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16785, 25, 'BR', NULL, NULL, 'Guapé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16786, 25, 'BR', NULL, NULL, 'Guaraciaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16787, 25, 'BR', NULL, NULL, 'Guaraciama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16788, 25, 'BR', NULL, NULL, 'Guarani')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16789, 25, 'BR', NULL, NULL, 'Guaranilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16790, 25, 'BR', NULL, NULL, 'Guaranésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16791, 25, 'BR', NULL, NULL, 'Guarará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16792, 25, 'BR', NULL, NULL, 'Guarataia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16793, 25, 'BR', NULL, NULL, 'Guarda dos Ferreiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16794, 25, 'BR', NULL, NULL, 'Guarda-Mor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16795, 25, 'BR', NULL, NULL, 'Guardinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16796, 25, 'BR', NULL, NULL, 'Guaxima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16797, 25, 'BR', NULL, NULL, 'Guaxupé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16798, 25, 'BR', NULL, NULL, 'Guaçuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16799, 25, 'BR', NULL, NULL, 'Guidoval')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16800, 25, 'BR', NULL, NULL, 'Guimarânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16801, 25, 'BR', NULL, NULL, 'Guinda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16802, 25, 'BR', NULL, NULL, 'Guiricema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16803, 25, 'BR', NULL, NULL, 'Gurinhatã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16804, 25, 'BR', NULL, NULL, 'Heliodora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16805, 25, 'BR', NULL, NULL, 'Hematita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16806, 25, 'BR', NULL, NULL, 'Hermilo Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16807, 25, 'BR', NULL, NULL, 'Honorópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16808, 25, 'BR', NULL, NULL, 'Iapu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16809, 25, 'BR', NULL, NULL, 'Ibertioga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16810, 25, 'BR', NULL, NULL, 'Ibiaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16811, 25, 'BR', NULL, NULL, 'Ibiracatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16812, 25, 'BR', NULL, NULL, 'Ibiraci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16813, 25, 'BR', NULL, NULL, 'Ibirité')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16814, 25, 'BR', NULL, NULL, 'Ibitira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16815, 25, 'BR', NULL, NULL, 'Ibitiúra de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16816, 25, 'BR', NULL, NULL, 'Ibituruna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16817, 25, 'BR', NULL, NULL, 'Ibiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16818, 25, 'BR', NULL, NULL, 'Icaraí de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16819, 25, 'BR', NULL, NULL, 'Igarapé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16820, 25, 'BR', NULL, NULL, 'Igaratinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16821, 25, 'BR', NULL, NULL, 'Iguatama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16822, 25, 'BR', NULL, NULL, 'Ijaci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16823, 25, 'BR', NULL, NULL, 'Ilhéus do Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16824, 25, 'BR', NULL, NULL, 'Ilicínea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16825, 25, 'BR', NULL, NULL, 'Imbé de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16826, 25, 'BR', NULL, NULL, 'Inconfidentes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16827, 25, 'BR', NULL, NULL, 'Indaiabira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16828, 25, 'BR', NULL, NULL, 'Independência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16829, 25, 'BR', NULL, NULL, 'Indianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16830, 25, 'BR', NULL, NULL, 'Ingaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16831, 25, 'BR', NULL, NULL, 'Inhapim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16832, 25, 'BR', NULL, NULL, 'Inhaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16833, 25, 'BR', NULL, NULL, 'Inhaúma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16834, 25, 'BR', NULL, NULL, 'Inimutaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16835, 25, 'BR', NULL, NULL, 'Ipaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16836, 25, 'BR', NULL, NULL, 'Ipanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16837, 25, 'BR', NULL, NULL, 'Ipatinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16838, 25, 'BR', NULL, NULL, 'Ipiaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16839, 25, 'BR', NULL, NULL, 'Ipoema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16840, 25, 'BR', NULL, NULL, 'Ipuiúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16841, 25, 'BR', NULL, NULL, 'Iraí de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16842, 25, 'BR', NULL, NULL, 'Itabira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16843, 25, 'BR', NULL, NULL, 'Itabirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16844, 25, 'BR', NULL, NULL, 'Itabirito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16845, 25, 'BR', NULL, NULL, 'Itaboca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16846, 25, 'BR', NULL, NULL, 'Itacambira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16847, 25, 'BR', NULL, NULL, 'Itacarambi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16848, 25, 'BR', NULL, NULL, 'Itaci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16849, 25, 'BR', NULL, NULL, 'Itacolomi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16850, 25, 'BR', NULL, NULL, 'Itaguara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16851, 25, 'BR', NULL, NULL, 'Itaim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16852, 25, 'BR', NULL, NULL, 'Itaipé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16853, 25, 'BR', NULL, NULL, 'Itajubá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16854, 25, 'BR', NULL, NULL, 'Itajutiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16855, 25, 'BR', NULL, NULL, 'Itamarandiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16856, 25, 'BR', NULL, NULL, 'Itamarati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16857, 25, 'BR', NULL, NULL, 'Itamarati de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16858, 25, 'BR', NULL, NULL, 'Itambacuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16859, 25, 'BR', NULL, NULL, 'Itambé do Mato Dentro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16860, 25, 'BR', NULL, NULL, 'Itamirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16861, 25, 'BR', NULL, NULL, 'Itamogi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16862, 25, 'BR', NULL, NULL, 'Itamonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16863, 25, 'BR', NULL, NULL, 'Itamuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16864, 25, 'BR', NULL, NULL, 'Itanhandu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16865, 25, 'BR', NULL, NULL, 'Itanhomi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16866, 25, 'BR', NULL, NULL, 'Itaobim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16867, 25, 'BR', NULL, NULL, 'Itapagipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16868, 25, 'BR', NULL, NULL, 'Itapanhoacanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16869, 25, 'BR', NULL, NULL, 'Itapecerica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16870, 25, 'BR', NULL, NULL, 'Itapeva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16871, 25, 'BR', NULL, NULL, 'Itapiru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16872, 25, 'BR', NULL, NULL, 'Itapirucu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16873, 25, 'BR', NULL, NULL, 'Itatiaiuçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16874, 25, 'BR', NULL, NULL, 'Itauninha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16875, 25, 'BR', NULL, NULL, 'Itaverava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16876, 25, 'BR', NULL, NULL, 'Itaú de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16877, 25, 'BR', NULL, NULL, 'Itaúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16878, 25, 'BR', NULL, NULL, 'Itererê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16879, 25, 'BR', NULL, NULL, 'Itinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16880, 25, 'BR', NULL, NULL, 'Itira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16881, 25, 'BR', NULL, NULL, 'Itueta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16882, 25, 'BR', NULL, NULL, 'Ituiutaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16883, 25, 'BR', NULL, NULL, 'Itumirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16884, 25, 'BR', NULL, NULL, 'Iturama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16885, 25, 'BR', NULL, NULL, 'Itutinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16886, 25, 'BR', NULL, NULL, 'Ituí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16887, 25, 'BR', NULL, NULL, 'Jaboticatubas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16888, 25, 'BR', NULL, NULL, 'Jacarandira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16889, 25, 'BR', NULL, NULL, 'Jacaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16890, 25, 'BR', NULL, NULL, 'Jacinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16891, 25, 'BR', NULL, NULL, 'Jacutinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16892, 25, 'BR', NULL, NULL, 'Jacuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16893, 25, 'BR', NULL, NULL, 'Jaguaraçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16894, 25, 'BR', NULL, NULL, 'Jaguaritira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16895, 25, 'BR', NULL, NULL, 'Jaguarão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16896, 25, 'BR', NULL, NULL, 'Jampruca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16897, 25, 'BR', NULL, NULL, 'Janaúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16898, 25, 'BR', NULL, NULL, 'Januária')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16899, 25, 'BR', NULL, NULL, 'Japaraíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16900, 25, 'BR', NULL, NULL, 'Japonvar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16901, 25, 'BR', NULL, NULL, 'Jardinésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16902, 25, 'BR', NULL, NULL, 'Jaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16903, 25, 'BR', NULL, NULL, 'Jeceaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16904, 25, 'BR', NULL, NULL, 'Jenipapo de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16905, 25, 'BR', NULL, NULL, 'Jequeri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16906, 25, 'BR', NULL, NULL, 'Jequitaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16907, 25, 'BR', NULL, NULL, 'Jequitibá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16908, 25, 'BR', NULL, NULL, 'Jequitinhonha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16909, 25, 'BR', NULL, NULL, 'Jesuânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16910, 25, 'BR', NULL, NULL, 'Joanésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16911, 25, 'BR', NULL, NULL, 'Joaquim Felício')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16912, 25, 'BR', NULL, NULL, 'Joaíma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16913, 25, 'BR', NULL, NULL, 'Jordânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16914, 25, 'BR', NULL, NULL, 'Joselândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16915, 25, 'BR', NULL, NULL, 'Josenópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16916, 25, 'BR', NULL, NULL, 'José Gonçalves de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16917, 25, 'BR', NULL, NULL, 'José Raydan')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16918, 25, 'BR', NULL, NULL, 'João Monlevade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16919, 25, 'BR', NULL, NULL, 'João Pinheiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16920, 25, 'BR', NULL, NULL, 'Juatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16921, 25, 'BR', NULL, NULL, 'Jubaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16922, 25, 'BR', NULL, NULL, 'Juiraçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16923, 25, 'BR', NULL, NULL, 'Juiz de Fora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16924, 25, 'BR', NULL, NULL, 'Junco de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16925, 25, 'BR', NULL, NULL, 'Juramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16926, 25, 'BR', NULL, NULL, 'Juruaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16927, 25, 'BR', NULL, NULL, 'Jurumirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16928, 25, 'BR', NULL, NULL, 'Juréia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16929, 25, 'BR', NULL, NULL, 'Justinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16930, 25, 'BR', NULL, NULL, 'Juvenília')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16931, 25, 'BR', NULL, NULL, 'Lacerdinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16932, 25, 'BR', NULL, NULL, 'Ladainha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16933, 25, 'BR', NULL, NULL, 'Lagamar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16934, 25, 'BR', NULL, NULL, 'Lagoa Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16935, 25, 'BR', NULL, NULL, 'Lagoa Dourada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16936, 25, 'BR', NULL, NULL, 'Lagoa Formosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16937, 25, 'BR', NULL, NULL, 'Lagoa Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16938, 25, 'BR', NULL, NULL, 'Lagoa Santa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16939, 25, 'BR', NULL, NULL, 'Lagoa da Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16940, 25, 'BR', NULL, NULL, 'Lagoa dos Patos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16941, 25, 'BR', NULL, NULL, 'Lajinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16942, 25, 'BR', NULL, NULL, 'Lambari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16943, 25, 'BR', NULL, NULL, 'Lamim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16944, 25, 'BR', NULL, NULL, 'Lamounier')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16945, 25, 'BR', NULL, NULL, 'Lapinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16946, 25, 'BR', NULL, NULL, 'Laranjal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16947, 25, 'BR', NULL, NULL, 'Laranjeiras de Caldas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16948, 25, 'BR', NULL, NULL, 'Lassance')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16949, 25, 'BR', NULL, NULL, 'Lavras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16950, 25, 'BR', NULL, NULL, 'Leandro Ferreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16951, 25, 'BR', NULL, NULL, 'Leme do Prado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16952, 25, 'BR', NULL, NULL, 'Leopoldina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16953, 25, 'BR', NULL, NULL, 'Levinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16954, 25, 'BR', NULL, NULL, 'Liberdade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16955, 25, 'BR', NULL, NULL, 'Lima Duarte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16956, 25, 'BR', NULL, NULL, 'Limeira de Mantena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16957, 25, 'BR', NULL, NULL, 'Limeira do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16958, 25, 'BR', NULL, NULL, 'Lobo Leite')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16959, 25, 'BR', NULL, NULL, 'Lontra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16960, 25, 'BR', NULL, NULL, 'Lourenço Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16961, 25, 'BR', NULL, NULL, 'Lufa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16962, 25, 'BR', NULL, NULL, 'Luisburgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16963, 25, 'BR', NULL, NULL, 'Luislândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16964, 25, 'BR', NULL, NULL, 'Luiz Pires de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16965, 25, 'BR', NULL, NULL, 'Luizlândia do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16966, 25, 'BR', NULL, NULL, 'Luminosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16967, 25, 'BR', NULL, NULL, 'Luminárias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16968, 25, 'BR', NULL, NULL, 'Luz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16969, 25, 'BR', NULL, NULL, 'Macaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16970, 25, 'BR', NULL, NULL, 'Machacalis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16971, 25, 'BR', NULL, NULL, 'Machado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16972, 25, 'BR', NULL, NULL, 'Macuco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16973, 25, 'BR', NULL, NULL, 'Macuco de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16974, 25, 'BR', NULL, NULL, 'Madre de Deus de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16975, 25, 'BR', NULL, NULL, 'Major Ezequiel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16976, 25, 'BR', NULL, NULL, 'Major Porto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16977, 25, 'BR', NULL, NULL, 'Malacacheta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16978, 25, 'BR', NULL, NULL, 'Mamonas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16979, 25, 'BR', NULL, NULL, 'Manga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16980, 25, 'BR', NULL, NULL, 'Manhuaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16981, 25, 'BR', NULL, NULL, 'Manhumirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16982, 25, 'BR', NULL, NULL, 'Mantena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16983, 25, 'BR', NULL, NULL, 'Mantiqueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16984, 25, 'BR', NULL, NULL, 'Mantiqueira do Palmital')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16985, 25, 'BR', NULL, NULL, 'Mar de Espanha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16986, 25, 'BR', NULL, NULL, 'Marambainha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16987, 25, 'BR', NULL, NULL, 'Maravilhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16988, 25, 'BR', NULL, NULL, 'Maria da Fé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16989, 25, 'BR', NULL, NULL, 'Mariana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16990, 25, 'BR', NULL, NULL, 'Marilac')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16991, 25, 'BR', NULL, NULL, 'Marilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16992, 25, 'BR', NULL, NULL, 'Maripá de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16993, 25, 'BR', NULL, NULL, 'Marliéria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16994, 25, 'BR', NULL, NULL, 'Marmelópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16995, 25, 'BR', NULL, NULL, 'Martinho Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16996, 25, 'BR', NULL, NULL, 'Martins Guimarães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16997, 25, 'BR', NULL, NULL, 'Martins Soares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16998, 25, 'BR', NULL, NULL, 'Martinésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (16999, 25, 'BR', NULL, NULL, 'Mata Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17000, 25, 'BR', NULL, NULL, 'Materlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17001, 25, 'BR', NULL, NULL, 'Mateus Leme')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17002, 25, 'BR', NULL, NULL, 'Mathias Lobato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17003, 25, 'BR', NULL, NULL, 'Matias Barbosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17004, 25, 'BR', NULL, NULL, 'Matias Cardoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17005, 25, 'BR', NULL, NULL, 'Matipó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17006, 25, 'BR', NULL, NULL, 'Mato Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17007, 25, 'BR', NULL, NULL, 'Matozinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17008, 25, 'BR', NULL, NULL, 'Matutina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17009, 25, 'BR', NULL, NULL, 'Medeiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17010, 25, 'BR', NULL, NULL, 'Medina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17011, 25, 'BR', NULL, NULL, 'Melo Viana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17012, 25, 'BR', NULL, NULL, 'Mendanha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17013, 25, 'BR', NULL, NULL, 'Mendes Pimentel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17014, 25, 'BR', NULL, NULL, 'Mendonça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17015, 25, 'BR', NULL, NULL, 'Mercês')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17016, 25, 'BR', NULL, NULL, 'Mercês de Água Limpa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17017, 25, 'BR', NULL, NULL, 'Mesquita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17018, 25, 'BR', NULL, NULL, 'Mestre Caetano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17019, 25, 'BR', NULL, NULL, 'Miguel Burnier')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17020, 25, 'BR', NULL, NULL, 'Milagre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17021, 25, 'BR', NULL, NULL, 'Milho Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17022, 25, 'BR', NULL, NULL, 'Minas Novas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17023, 25, 'BR', NULL, NULL, 'Minduri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17024, 25, 'BR', NULL, NULL, 'Mirabela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17025, 25, 'BR', NULL, NULL, 'Miradouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17026, 25, 'BR', NULL, NULL, 'Miragaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17027, 25, 'BR', NULL, NULL, 'Miralta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17028, 25, 'BR', NULL, NULL, 'Mirantão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17029, 25, 'BR', NULL, NULL, 'Miraporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17030, 25, 'BR', NULL, NULL, 'Miravânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17031, 25, 'BR', NULL, NULL, 'Miraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17032, 25, 'BR', NULL, NULL, 'Missionário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17033, 25, 'BR', NULL, NULL, 'Mocambeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17034, 25, 'BR', NULL, NULL, 'Mocambinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17035, 25, 'BR', NULL, NULL, 'Moeda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17036, 25, 'BR', NULL, NULL, 'Moema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17037, 25, 'BR', NULL, NULL, 'Monjolinho de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17038, 25, 'BR', NULL, NULL, 'Monjolos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17039, 25, 'BR', NULL, NULL, 'Monsenhor Horta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17040, 25, 'BR', NULL, NULL, 'Monsenhor Isidro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17041, 25, 'BR', NULL, NULL, 'Monsenhor João Alexandre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17042, 25, 'BR', NULL, NULL, 'Monsenhor Paulo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17043, 25, 'BR', NULL, NULL, 'Montalvânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17044, 25, 'BR', NULL, NULL, 'Monte Alegre de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17045, 25, 'BR', NULL, NULL, 'Monte Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17046, 25, 'BR', NULL, NULL, 'Monte Belo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17047, 25, 'BR', NULL, NULL, 'Monte Carmelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17048, 25, 'BR', NULL, NULL, 'Monte Celeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17049, 25, 'BR', NULL, NULL, 'Monte Formoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17050, 25, 'BR', NULL, NULL, 'Monte Rei')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17051, 25, 'BR', NULL, NULL, 'Monte Santo de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17052, 25, 'BR', NULL, NULL, 'Monte Sião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17053, 25, 'BR', NULL, NULL, 'Monte Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17054, 25, 'BR', NULL, NULL, 'Montes Claros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17055, 25, 'BR', NULL, NULL, 'Montezuma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17056, 25, 'BR', NULL, NULL, 'Morada Nova de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17057, 25, 'BR', NULL, NULL, 'Morro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17058, 25, 'BR', NULL, NULL, 'Morro Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17059, 25, 'BR', NULL, NULL, 'Morro da Garça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17060, 25, 'BR', NULL, NULL, 'Morro do Ferro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17061, 25, 'BR', NULL, NULL, 'Morro do Pilar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17062, 25, 'BR', NULL, NULL, 'Mucuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17063, 25, 'BR', NULL, NULL, 'Mundo Novo de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17064, 25, 'BR', NULL, NULL, 'Munhoz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17065, 25, 'BR', NULL, NULL, 'Muquém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17066, 25, 'BR', NULL, NULL, 'Muriaé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17067, 25, 'BR', NULL, NULL, 'Mutum')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17068, 25, 'BR', NULL, NULL, 'Muzambinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17069, 25, 'BR', NULL, NULL, 'Mário Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17070, 25, 'BR', NULL, NULL, 'Mãe dos Homens')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17071, 25, 'BR', NULL, NULL, 'Nacip Raydan')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17072, 25, 'BR', NULL, NULL, 'Nanuque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17073, 25, 'BR', NULL, NULL, 'Naque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17074, 25, 'BR', NULL, NULL, 'Naque-Nanuque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17075, 25, 'BR', NULL, NULL, 'Natalândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17076, 25, 'BR', NULL, NULL, 'Natércia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17077, 25, 'BR', NULL, NULL, 'Nazareno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17078, 25, 'BR', NULL, NULL, 'Nazaré de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17079, 25, 'BR', NULL, NULL, 'Nelson de Sena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17080, 25, 'BR', NULL, NULL, 'Neolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17081, 25, 'BR', NULL, NULL, 'Nepomuceno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17082, 25, 'BR', NULL, NULL, 'Nhandutiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17083, 25, 'BR', NULL, NULL, 'Nicolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17084, 25, 'BR', NULL, NULL, 'Ninheira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17085, 25, 'BR', NULL, NULL, 'Nova Belém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17086, 25, 'BR', NULL, NULL, 'Nova Era')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17087, 25, 'BR', NULL, NULL, 'Nova Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17088, 25, 'BR', NULL, NULL, 'Nova Lima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17089, 25, 'BR', NULL, NULL, 'Nova Minda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17090, 25, 'BR', NULL, NULL, 'Nova Módica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17091, 25, 'BR', NULL, NULL, 'Nova Ponte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17092, 25, 'BR', NULL, NULL, 'Nova Porteirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17093, 25, 'BR', NULL, NULL, 'Nova Resende')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17094, 25, 'BR', NULL, NULL, 'Nova Serrana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17095, 25, 'BR', NULL, NULL, 'Nova União')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17096, 25, 'BR', NULL, NULL, 'Novilhona')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17097, 25, 'BR', NULL, NULL, 'Novo Cruzeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17098, 25, 'BR', NULL, NULL, 'Novo Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17099, 25, 'BR', NULL, NULL, 'Novo Oriente de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17100, 25, 'BR', NULL, NULL, 'Novorizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17101, 25, 'BR', NULL, NULL, 'Ocidente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17102, 25, 'BR', NULL, NULL, 'Olaria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17103, 25, 'BR', NULL, NULL, 'Olegário Maciel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17104, 25, 'BR', NULL, NULL, 'Olhos D''Água')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17105, 25, 'BR', NULL, NULL, 'Olhos D''Água do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17106, 25, 'BR', NULL, NULL, 'Oliveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17107, 25, 'BR', NULL, NULL, 'Oliveira Fortes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17108, 25, 'BR', NULL, NULL, 'Olímpio Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17109, 25, 'BR', NULL, NULL, 'Olímpio Noronha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17110, 25, 'BR', NULL, NULL, 'Onça de Pitangui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17111, 25, 'BR', NULL, NULL, 'Oratórios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17112, 25, 'BR', NULL, NULL, 'Orizânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17113, 25, 'BR', NULL, NULL, 'Ouro Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17114, 25, 'BR', NULL, NULL, 'Ouro Fino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17115, 25, 'BR', NULL, NULL, 'Ouro Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17116, 25, 'BR', NULL, NULL, 'Ouro Verde de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17117, 25, 'BR', NULL, NULL, 'Paciência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17118, 25, 'BR', NULL, NULL, 'Padre Brito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17119, 25, 'BR', NULL, NULL, 'Padre Carvalho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17120, 25, 'BR', NULL, NULL, 'Padre Felisberto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17121, 25, 'BR', NULL, NULL, 'Padre Fialho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17122, 25, 'BR', NULL, NULL, 'Padre João Afonso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17123, 25, 'BR', NULL, NULL, 'Padre Júlio Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17124, 25, 'BR', NULL, NULL, 'Padre Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17125, 25, 'BR', NULL, NULL, 'Padre Pinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17126, 25, 'BR', NULL, NULL, 'Padre Viegas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17127, 25, 'BR', NULL, NULL, 'Pai Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17128, 25, 'BR', NULL, NULL, 'Paineiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17129, 25, 'BR', NULL, NULL, 'Pains')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17130, 25, 'BR', NULL, NULL, 'Paiolinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17131, 25, 'BR', NULL, NULL, 'Paiva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17132, 25, 'BR', NULL, NULL, 'Palma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17133, 25, 'BR', NULL, NULL, 'Palmeiral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17134, 25, 'BR', NULL, NULL, 'Palmeirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17135, 25, 'BR', NULL, NULL, 'Palmital dos Carvalhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17136, 25, 'BR', NULL, NULL, 'Palmópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17137, 25, 'BR', NULL, NULL, 'Papagaios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17138, 25, 'BR', NULL, NULL, 'Paracatu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17139, 25, 'BR', NULL, NULL, 'Paraguai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17140, 25, 'BR', NULL, NULL, 'Paraguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17141, 25, 'BR', NULL, NULL, 'Paraisópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17142, 25, 'BR', NULL, NULL, 'Paraopeba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17143, 25, 'BR', NULL, NULL, 'Paraíso Garcia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17144, 25, 'BR', NULL, NULL, 'Paredão de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17145, 25, 'BR', NULL, NULL, 'Parque Durval de Barros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17146, 25, 'BR', NULL, NULL, 'Parque Industrial')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17147, 25, 'BR', NULL, NULL, 'Pará de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17148, 25, 'BR', NULL, NULL, 'Passa Dez')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17149, 25, 'BR', NULL, NULL, 'Passa Quatro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17150, 25, 'BR', NULL, NULL, 'Passa Tempo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17151, 25, 'BR', NULL, NULL, 'Passa Vinte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17152, 25, 'BR', NULL, NULL, 'Passabém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17153, 25, 'BR', NULL, NULL, 'Passagem de Mariana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17154, 25, 'BR', NULL, NULL, 'Passos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17155, 25, 'BR', NULL, NULL, 'Patis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17156, 25, 'BR', NULL, NULL, 'Patos de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17157, 25, 'BR', NULL, NULL, 'Patrimônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17158, 25, 'BR', NULL, NULL, 'Patrocínio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17159, 25, 'BR', NULL, NULL, 'Patrocínio do Muriaé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17160, 25, 'BR', NULL, NULL, 'Paula Cândido')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17161, 25, 'BR', NULL, NULL, 'Paula Lima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17162, 25, 'BR', NULL, NULL, 'Paulistas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17163, 25, 'BR', NULL, NULL, 'Pavão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17164, 25, 'BR', NULL, NULL, 'Pedra Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17165, 25, 'BR', NULL, NULL, 'Pedra Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17166, 25, 'BR', NULL, NULL, 'Pedra Corrida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17167, 25, 'BR', NULL, NULL, 'Pedra Dourada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17168, 25, 'BR', NULL, NULL, 'Pedra Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17169, 25, 'BR', NULL, NULL, 'Pedra Menina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17170, 25, 'BR', NULL, NULL, 'Pedra do Anta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17171, 25, 'BR', NULL, NULL, 'Pedra do Indaiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17172, 25, 'BR', NULL, NULL, 'Pedra do Sino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17173, 25, 'BR', NULL, NULL, 'Pedralva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17174, 25, 'BR', NULL, NULL, 'Pedras de Maria da Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17175, 25, 'BR', NULL, NULL, 'Pedrinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17176, 25, 'BR', NULL, NULL, 'Pedro Leopoldo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17177, 25, 'BR', NULL, NULL, 'Pedro Lessa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17178, 25, 'BR', NULL, NULL, 'Pedro Teixeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17179, 25, 'BR', NULL, NULL, 'Pedro Versiani')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17180, 25, 'BR', NULL, NULL, 'Penha Longa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17181, 25, 'BR', NULL, NULL, 'Penha de França')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17182, 25, 'BR', NULL, NULL, 'Penha do Capim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17183, 25, 'BR', NULL, NULL, 'Penha do Cassiano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17184, 25, 'BR', NULL, NULL, 'Penha do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17185, 25, 'BR', NULL, NULL, 'Penédia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17186, 25, 'BR', NULL, NULL, 'Pequeri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17187, 25, 'BR', NULL, NULL, 'Pequi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17188, 25, 'BR', NULL, NULL, 'Perdigão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17189, 25, 'BR', NULL, NULL, 'Perdilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17190, 25, 'BR', NULL, NULL, 'Perdizes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17191, 25, 'BR', NULL, NULL, 'Perdões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17192, 25, 'BR', NULL, NULL, 'Pereirinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17193, 25, 'BR', NULL, NULL, 'Periquito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17194, 25, 'BR', NULL, NULL, 'Perpétuo Socorro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17195, 25, 'BR', NULL, NULL, 'Pescador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17196, 25, 'BR', NULL, NULL, 'Petúnia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17197, 25, 'BR', NULL, NULL, 'Peçanha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17198, 25, 'BR', NULL, NULL, 'Piacatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17199, 25, 'BR', NULL, NULL, 'Piau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17200, 25, 'BR', NULL, NULL, 'Pic Sagarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17201, 25, 'BR', NULL, NULL, 'Piedade de Caratinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17202, 25, 'BR', NULL, NULL, 'Piedade de Ponte Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17203, 25, 'BR', NULL, NULL, 'Piedade do Paraopeba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17204, 25, 'BR', NULL, NULL, 'Piedade do Rio Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17205, 25, 'BR', NULL, NULL, 'Piedade dos Gerais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17206, 25, 'BR', NULL, NULL, 'Pilar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17207, 25, 'BR', NULL, NULL, 'Pimenta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17208, 25, 'BR', NULL, NULL, 'Pindaíbas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17209, 25, 'BR', NULL, NULL, 'Pingo-D''Água')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17210, 25, 'BR', NULL, NULL, 'Pinheirinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17211, 25, 'BR', NULL, NULL, 'Pinheiros Altos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17212, 25, 'BR', NULL, NULL, 'Pinhotiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17213, 25, 'BR', NULL, NULL, 'Pintos Negreiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17214, 25, 'BR', NULL, NULL, 'Pintópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17215, 25, 'BR', NULL, NULL, 'Piracaiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17216, 25, 'BR', NULL, NULL, 'Piracema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17217, 25, 'BR', NULL, NULL, 'Pirajuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17218, 25, 'BR', NULL, NULL, 'Piranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17219, 25, 'BR', NULL, NULL, 'Piranguinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17220, 25, 'BR', NULL, NULL, 'Piranguita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17221, 25, 'BR', NULL, NULL, 'Piranguçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17222, 25, 'BR', NULL, NULL, 'Pirapanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17223, 25, 'BR', NULL, NULL, 'Pirapetinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17224, 25, 'BR', NULL, NULL, 'Pirapora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17225, 25, 'BR', NULL, NULL, 'Piraúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17226, 25, 'BR', NULL, NULL, 'Piscamba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17227, 25, 'BR', NULL, NULL, 'Pitangui')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17228, 25, 'BR', NULL, NULL, 'Pitarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17229, 25, 'BR', NULL, NULL, 'Piumhi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17230, 25, 'BR', NULL, NULL, 'Pião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17231, 25, 'BR', NULL, NULL, 'Planalto de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17232, 25, 'BR', NULL, NULL, 'Planura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17233, 25, 'BR', NULL, NULL, 'Plautino Soares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17234, 25, 'BR', NULL, NULL, 'Poaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17235, 25, 'BR', NULL, NULL, 'Pocrane')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17236, 25, 'BR', NULL, NULL, 'Pompéu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17237, 25, 'BR', NULL, NULL, 'Poncianos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17238, 25, 'BR', NULL, NULL, 'Pontalete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17239, 25, 'BR', NULL, NULL, 'Ponte Alta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17240, 25, 'BR', NULL, NULL, 'Ponte Alta de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17241, 25, 'BR', NULL, NULL, 'Ponte Firme')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17242, 25, 'BR', NULL, NULL, 'Ponte Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17243, 25, 'BR', NULL, NULL, 'Ponte Segura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17244, 25, 'BR', NULL, NULL, 'Ponte dos Ciganos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17245, 25, 'BR', NULL, NULL, 'Pontevila')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17246, 25, 'BR', NULL, NULL, 'Ponto Chique')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17247, 25, 'BR', NULL, NULL, 'Ponto Chique do Martelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17248, 25, 'BR', NULL, NULL, 'Ponto do Marambaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17249, 25, 'BR', NULL, NULL, 'Ponto dos Volantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17250, 25, 'BR', NULL, NULL, 'Porteirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17251, 25, 'BR', NULL, NULL, 'Porto Agrário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17252, 25, 'BR', NULL, NULL, 'Porto Firme')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17253, 25, 'BR', NULL, NULL, 'Porto das Flores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17254, 25, 'BR', NULL, NULL, 'Porto dos Mendes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17255, 25, 'BR', NULL, NULL, 'Poté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17256, 25, 'BR', NULL, NULL, 'Pouso Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17257, 25, 'BR', NULL, NULL, 'Pouso Alto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17258, 25, 'BR', NULL, NULL, 'Poço Fundo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17259, 25, 'BR', NULL, NULL, 'Poços de Caldas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17260, 25, 'BR', NULL, NULL, 'Poções de Paineiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17261, 25, 'BR', NULL, NULL, 'Prados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17262, 25, 'BR', NULL, NULL, 'Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17263, 25, 'BR', NULL, NULL, 'Pratinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17264, 25, 'BR', NULL, NULL, 'Pratápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17265, 25, 'BR', NULL, NULL, 'Presidente Bernardes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17266, 25, 'BR', NULL, NULL, 'Presidente Juscelino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17267, 25, 'BR', NULL, NULL, 'Presidente Kubitschek')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17268, 25, 'BR', NULL, NULL, 'Presidente Olegário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17269, 25, 'BR', NULL, NULL, 'Presidente Pena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17270, 25, 'BR', NULL, NULL, 'Professor Sperber')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17271, 25, 'BR', NULL, NULL, 'Providência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17272, 25, 'BR', NULL, NULL, 'Prudente de Morais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17273, 25, 'BR', NULL, NULL, 'Pântano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17274, 25, 'BR', NULL, NULL, 'Pé do Morro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17275, 25, 'BR', NULL, NULL, 'Quartel Geral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17276, 25, 'BR', NULL, NULL, 'Quartel de São João')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17277, 25, 'BR', NULL, NULL, 'Quartel do Sacramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17278, 25, 'BR', NULL, NULL, 'Quatituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17279, 25, 'BR', NULL, NULL, 'Queixada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17280, 25, 'BR', NULL, NULL, 'Queluzita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17281, 25, 'BR', NULL, NULL, 'Quem-Quem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17282, 25, 'BR', NULL, NULL, 'Quilombo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17283, 25, 'BR', NULL, NULL, 'Quintinos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17284, 25, 'BR', NULL, NULL, 'Raposos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17285, 25, 'BR', NULL, NULL, 'Raul Soares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17286, 25, 'BR', NULL, NULL, 'Ravena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17287, 25, 'BR', NULL, NULL, 'Realeza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17288, 25, 'BR', NULL, NULL, 'Recreio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17289, 25, 'BR', NULL, NULL, 'Reduto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17290, 25, 'BR', NULL, NULL, 'Resende Costa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17291, 25, 'BR', NULL, NULL, 'Resplendor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17292, 25, 'BR', NULL, NULL, 'Ressaquinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17293, 25, 'BR', NULL, NULL, 'Riachinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17294, 25, 'BR', NULL, NULL, 'Riacho da Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17295, 25, 'BR', NULL, NULL, 'Riacho dos Machados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17296, 25, 'BR', NULL, NULL, 'Ribeiro Junqueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17297, 25, 'BR', NULL, NULL, 'Ribeiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17298, 25, 'BR', NULL, NULL, 'Ribeirão Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17299, 25, 'BR', NULL, NULL, 'Ribeirão das Neves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17300, 25, 'BR', NULL, NULL, 'Ribeirão de São Domingos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17301, 25, 'BR', NULL, NULL, 'Rio Acima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17302, 25, 'BR', NULL, NULL, 'Rio Casca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17303, 25, 'BR', NULL, NULL, 'Rio Doce')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17304, 25, 'BR', NULL, NULL, 'Rio Espera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17305, 25, 'BR', NULL, NULL, 'Rio Manso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17306, 25, 'BR', NULL, NULL, 'Rio Melo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17307, 25, 'BR', NULL, NULL, 'Rio Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17308, 25, 'BR', NULL, NULL, 'Rio Paranaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17309, 25, 'BR', NULL, NULL, 'Rio Pardo de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17310, 25, 'BR', NULL, NULL, 'Rio Piracicaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17311, 25, 'BR', NULL, NULL, 'Rio Pomba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17312, 25, 'BR', NULL, NULL, 'Rio Pretinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17313, 25, 'BR', NULL, NULL, 'Rio Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17314, 25, 'BR', NULL, NULL, 'Rio Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17315, 25, 'BR', NULL, NULL, 'Rio das Mortes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17316, 25, 'BR', NULL, NULL, 'Rio do Prado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17317, 25, 'BR', NULL, NULL, 'Ritápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17318, 25, 'BR', NULL, NULL, 'Rochedo de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17319, 25, 'BR', NULL, NULL, 'Rodeador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17320, 25, 'BR', NULL, NULL, 'Rodeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17321, 25, 'BR', NULL, NULL, 'Rodrigo Silva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17322, 25, 'BR', NULL, NULL, 'Romaria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17323, 25, 'BR', NULL, NULL, 'Roseiral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17324, 25, 'BR', NULL, NULL, 'Rosário da Limeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17325, 25, 'BR', NULL, NULL, 'Rosário de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17326, 25, 'BR', NULL, NULL, 'Rosário do Pontal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17327, 25, 'BR', NULL, NULL, 'Roça Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17328, 25, 'BR', NULL, NULL, 'Roças Novas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17329, 25, 'BR', NULL, NULL, 'Rubelita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17330, 25, 'BR', NULL, NULL, 'Rubim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17331, 25, 'BR', NULL, NULL, 'Sabará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17332, 25, 'BR', NULL, NULL, 'Sabinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17333, 25, 'BR', NULL, NULL, 'Sacramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17334, 25, 'BR', NULL, NULL, 'Salinas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17335, 25, 'BR', NULL, NULL, 'Salitre de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17336, 25, 'BR', NULL, NULL, 'Salto da Divisa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17337, 25, 'BR', NULL, NULL, 'Sanatório Santa Fé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17338, 25, 'BR', NULL, NULL, 'Santa Bárbara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17339, 25, 'BR', NULL, NULL, 'Santa Bárbara do Leste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17340, 25, 'BR', NULL, NULL, 'Santa Bárbara do Monte Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17341, 25, 'BR', NULL, NULL, 'Santa Bárbara do Tugúrio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17342, 25, 'BR', NULL, NULL, 'Santa Cruz da Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17343, 25, 'BR', NULL, NULL, 'Santa Cruz de Botumirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17344, 25, 'BR', NULL, NULL, 'Santa Cruz de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17345, 25, 'BR', NULL, NULL, 'Santa Cruz de Salinas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17346, 25, 'BR', NULL, NULL, 'Santa Cruz do Escalvado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17347, 25, 'BR', NULL, NULL, 'Santa Cruz do Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17348, 25, 'BR', NULL, NULL, 'Santa Efigênia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17349, 25, 'BR', NULL, NULL, 'Santa Efigênia de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17350, 25, 'BR', NULL, NULL, 'Santa Filomena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17351, 25, 'BR', NULL, NULL, 'Santa Fé de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17352, 25, 'BR', NULL, NULL, 'Santa Helena de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17353, 25, 'BR', NULL, NULL, 'Santa Juliana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17354, 25, 'BR', NULL, NULL, 'Santa Luzia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17355, 25, 'BR', NULL, NULL, 'Santa Luzia da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17356, 25, 'BR', NULL, NULL, 'Santa Margarida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17357, 25, 'BR', NULL, NULL, 'Santa Maria de Itabira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17358, 25, 'BR', NULL, NULL, 'Santa Maria do Salto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17359, 25, 'BR', NULL, NULL, 'Santa Maria do Suaçuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17360, 25, 'BR', NULL, NULL, 'Santa Rita Durão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17361, 25, 'BR', NULL, NULL, 'Santa Rita da Estrela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17362, 25, 'BR', NULL, NULL, 'Santa Rita de Caldas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17363, 25, 'BR', NULL, NULL, 'Santa Rita de Jacutinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17364, 25, 'BR', NULL, NULL, 'Santa Rita de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17365, 25, 'BR', NULL, NULL, 'Santa Rita de Ouro Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17366, 25, 'BR', NULL, NULL, 'Santa Rita do Cedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17367, 25, 'BR', NULL, NULL, 'Santa Rita do Ibitipoca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17368, 25, 'BR', NULL, NULL, 'Santa Rita do Itueto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17369, 25, 'BR', NULL, NULL, 'Santa Rita do Rio do Peixe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17370, 25, 'BR', NULL, NULL, 'Santa Rita do Sapucaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17371, 25, 'BR', NULL, NULL, 'Santa Rosa da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17372, 25, 'BR', NULL, NULL, 'Santa Rosa de Lima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17373, 25, 'BR', NULL, NULL, 'Santa Rosa dos Dourados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17374, 25, 'BR', NULL, NULL, 'Santa Teresa do Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17375, 25, 'BR', NULL, NULL, 'Santa Terezinha de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17376, 25, 'BR', NULL, NULL, 'Santa Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17377, 25, 'BR', NULL, NULL, 'Santa da Pedra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17378, 25, 'BR', NULL, NULL, 'Santana da Vargem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17379, 25, 'BR', NULL, NULL, 'Santana de Caldas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17380, 25, 'BR', NULL, NULL, 'Santana de Cataguases')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17381, 25, 'BR', NULL, NULL, 'Santana de Patos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17382, 25, 'BR', NULL, NULL, 'Santana de Pirapama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17383, 25, 'BR', NULL, NULL, 'Santana do Alfié')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17384, 25, 'BR', NULL, NULL, 'Santana do Araçuaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17385, 25, 'BR', NULL, NULL, 'Santana do Campestre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17386, 25, 'BR', NULL, NULL, 'Santana do Capivari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17387, 25, 'BR', NULL, NULL, 'Santana do Deserto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17388, 25, 'BR', NULL, NULL, 'Santana do Garambéu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17389, 25, 'BR', NULL, NULL, 'Santana do Jacaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17390, 25, 'BR', NULL, NULL, 'Santana do Manhuaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17391, 25, 'BR', NULL, NULL, 'Santana do Paraopeba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17392, 25, 'BR', NULL, NULL, 'Santana do Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17393, 25, 'BR', NULL, NULL, 'Santana do Riacho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17394, 25, 'BR', NULL, NULL, 'Santana do Tabuleiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17395, 25, 'BR', NULL, NULL, 'Santana dos Montes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17396, 25, 'BR', NULL, NULL, 'Santo Antônio da Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17397, 25, 'BR', NULL, NULL, 'Santo Antônio da Fortaleza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17398, 25, 'BR', NULL, NULL, 'Santo Antônio da Vargem Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17399, 25, 'BR', NULL, NULL, 'Santo Antônio do Amparo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17400, 25, 'BR', NULL, NULL, 'Santo Antônio do Aventureiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17401, 25, 'BR', NULL, NULL, 'Santo Antônio do Boqueirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17402, 25, 'BR', NULL, NULL, 'Santo Antônio do Cruzeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17403, 25, 'BR', NULL, NULL, 'Santo Antônio do Glória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17404, 25, 'BR', NULL, NULL, 'Santo Antônio do Grama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17405, 25, 'BR', NULL, NULL, 'Santo Antônio do Itambé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17406, 25, 'BR', NULL, NULL, 'Santo Antônio do Jacinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17407, 25, 'BR', NULL, NULL, 'Santo Antônio do Leite')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17408, 25, 'BR', NULL, NULL, 'Santo Antônio do Manhuaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17409, 25, 'BR', NULL, NULL, 'Santo Antônio do Monte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17410, 25, 'BR', NULL, NULL, 'Santo Antônio do Mucuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17411, 25, 'BR', NULL, NULL, 'Santo Antônio do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17412, 25, 'BR', NULL, NULL, 'Santo Antônio do Pirapetinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17413, 25, 'BR', NULL, NULL, 'Santo Antônio do Retiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17414, 25, 'BR', NULL, NULL, 'Santo Antônio do Rio Abaixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17415, 25, 'BR', NULL, NULL, 'Santo Antônio dos Araújos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17416, 25, 'BR', NULL, NULL, 'Santo Antônio dos Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17417, 25, 'BR', NULL, NULL, 'Santo Hilário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17418, 25, 'BR', NULL, NULL, 'Santo Hipólito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17419, 25, 'BR', NULL, NULL, 'Santos Dumont')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17420, 25, 'BR', NULL, NULL, 'Sapucaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17421, 25, 'BR', NULL, NULL, 'Sapucaia de Guanhães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17422, 25, 'BR', NULL, NULL, 'Sapucaia do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17423, 25, 'BR', NULL, NULL, 'Sapucaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17424, 25, 'BR', NULL, NULL, 'Sapucaí-Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17425, 25, 'BR', NULL, NULL, 'Sarandira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17426, 25, 'BR', NULL, NULL, 'Sardoá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17427, 25, 'BR', NULL, NULL, 'Sarzedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17428, 25, 'BR', NULL, NULL, 'Saudade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17429, 25, 'BR', NULL, NULL, 'Sem Peixe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17430, 25, 'BR', NULL, NULL, 'Senador Amaral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17431, 25, 'BR', NULL, NULL, 'Senador Cortes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17432, 25, 'BR', NULL, NULL, 'Senador Firmino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17433, 25, 'BR', NULL, NULL, 'Senador José Bento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17434, 25, 'BR', NULL, NULL, 'Senador Melo Viana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17435, 25, 'BR', NULL, NULL, 'Senador Modestino Gonçalves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17436, 25, 'BR', NULL, NULL, 'Senador Mourão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17437, 25, 'BR', NULL, NULL, 'Senhora da Glória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17438, 25, 'BR', NULL, NULL, 'Senhora da Penha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17439, 25, 'BR', NULL, NULL, 'Senhora das Dores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17440, 25, 'BR', NULL, NULL, 'Senhora de Oliveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17441, 25, 'BR', NULL, NULL, 'Senhora do Carmo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17442, 25, 'BR', NULL, NULL, 'Senhora do Porto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17443, 25, 'BR', NULL, NULL, 'Senhora dos Remédios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17444, 25, 'BR', NULL, NULL, 'Sereno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17445, 25, 'BR', NULL, NULL, 'Sericita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17446, 25, 'BR', NULL, NULL, 'Seritinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17447, 25, 'BR', NULL, NULL, 'Serra Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17448, 25, 'BR', NULL, NULL, 'Serra Azul de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17449, 25, 'BR', NULL, NULL, 'Serra Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17450, 25, 'BR', NULL, NULL, 'Serra Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17451, 25, 'BR', NULL, NULL, 'Serra da Canastra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17452, 25, 'BR', NULL, NULL, 'Serra da Saudade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17453, 25, 'BR', NULL, NULL, 'Serra das Araras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17454, 25, 'BR', NULL, NULL, 'Serra do Camapuã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17455, 25, 'BR', NULL, NULL, 'Serra do Salitre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17456, 25, 'BR', NULL, NULL, 'Serra dos Aimorés')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17457, 25, 'BR', NULL, NULL, 'Serra dos Lemes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17458, 25, 'BR', NULL, NULL, 'Serrania')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17459, 25, 'BR', NULL, NULL, 'Serranos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17460, 25, 'BR', NULL, NULL, 'Serranópolis de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17461, 25, 'BR', NULL, NULL, 'Serro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17462, 25, 'BR', NULL, NULL, 'Sertãozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17463, 25, 'BR', NULL, NULL, 'Sete Cachoeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17464, 25, 'BR', NULL, NULL, 'Sete Lagoas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17465, 25, 'BR', NULL, NULL, 'Setubinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17466, 25, 'BR', NULL, NULL, 'Silva Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17467, 25, 'BR', NULL, NULL, 'Silva Xavier')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17468, 25, 'BR', NULL, NULL, 'Silvano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17469, 25, 'BR', NULL, NULL, 'Silveira Carvalho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17470, 25, 'BR', NULL, NULL, 'Silveirânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17471, 25, 'BR', NULL, NULL, 'Silvestre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17472, 25, 'BR', NULL, NULL, 'Silvianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17473, 25, 'BR', NULL, NULL, 'Simonésia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17474, 25, 'BR', NULL, NULL, 'Simão Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17475, 25, 'BR', NULL, NULL, 'Simão Pereira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17476, 25, 'BR', NULL, NULL, 'Sobral Pinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17477, 25, 'BR', NULL, NULL, 'Sobrália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17478, 25, 'BR', NULL, NULL, 'Soledade de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17479, 25, 'BR', NULL, NULL, 'Sopa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17480, 25, 'BR', NULL, NULL, 'Sucanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17481, 25, 'BR', NULL, NULL, 'São Bartolomeu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17482, 25, 'BR', NULL, NULL, 'São Benedito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17483, 25, 'BR', NULL, NULL, 'São Bento Abade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17484, 25, 'BR', NULL, NULL, 'São Bento de Caldas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17485, 25, 'BR', NULL, NULL, 'São Braz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17486, 25, 'BR', NULL, NULL, 'São Brás do Suaçuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17487, 25, 'BR', NULL, NULL, 'São Cândido')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17488, 25, 'BR', NULL, NULL, 'São Domingos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17489, 25, 'BR', NULL, NULL, 'São Domingos da Bocaina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17490, 25, 'BR', NULL, NULL, 'São Domingos das Dores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17491, 25, 'BR', NULL, NULL, 'São Domingos do Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17492, 25, 'BR', NULL, NULL, 'São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17493, 25, 'BR', NULL, NULL, 'São Francisco de Paula')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17494, 25, 'BR', NULL, NULL, 'São Francisco de Sales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17495, 25, 'BR', NULL, NULL, 'São Francisco do Glória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17496, 25, 'BR', NULL, NULL, 'São Francisco do Humaitá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17497, 25, 'BR', NULL, NULL, 'São Félix de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17498, 25, 'BR', NULL, NULL, 'São Geraldo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17499, 25, 'BR', NULL, NULL, 'São Geraldo da Piedade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17500, 25, 'BR', NULL, NULL, 'São Geraldo de Tumiritinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17501, 25, 'BR', NULL, NULL, 'São Geraldo do Baguari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17502, 25, 'BR', NULL, NULL, 'São Geraldo do Baixio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17503, 25, 'BR', NULL, NULL, 'São Gonçalo de Botelhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17504, 25, 'BR', NULL, NULL, 'São Gonçalo do Abaeté')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17505, 25, 'BR', NULL, NULL, 'São Gonçalo do Monte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17506, 25, 'BR', NULL, NULL, 'São Gonçalo do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17507, 25, 'BR', NULL, NULL, 'São Gonçalo do Rio Abaixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17508, 25, 'BR', NULL, NULL, 'São Gonçalo do Rio Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17509, 25, 'BR', NULL, NULL, 'São Gonçalo do Rio das Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17510, 25, 'BR', NULL, NULL, 'São Gonçalo do Sapucaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17511, 25, 'BR', NULL, NULL, 'São Gotardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17512, 25, 'BR', NULL, NULL, 'São Jerônimo dos Poções')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17513, 25, 'BR', NULL, NULL, 'São Joaquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17514, 25, 'BR', NULL, NULL, 'São Joaquim de Bicas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17515, 25, 'BR', NULL, NULL, 'São José da Barra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17516, 25, 'BR', NULL, NULL, 'São José da Bela Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17517, 25, 'BR', NULL, NULL, 'São José da Lapa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17518, 25, 'BR', NULL, NULL, 'São José da Pedra Menina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17519, 25, 'BR', NULL, NULL, 'São José da Safira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17520, 25, 'BR', NULL, NULL, 'São José da Varginha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17521, 25, 'BR', NULL, NULL, 'São José das Tronqueiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17522, 25, 'BR', NULL, NULL, 'São José do Acácio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17523, 25, 'BR', NULL, NULL, 'São José do Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17524, 25, 'BR', NULL, NULL, 'São José do Barreiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17525, 25, 'BR', NULL, NULL, 'São José do Batatal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17526, 25, 'BR', NULL, NULL, 'São José do Buriti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17527, 25, 'BR', NULL, NULL, 'São José do Divino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17528, 25, 'BR', NULL, NULL, 'São José do Goiabal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17529, 25, 'BR', NULL, NULL, 'São José do Itueto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17530, 25, 'BR', NULL, NULL, 'São José do Jacuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17531, 25, 'BR', NULL, NULL, 'São José do Mantimento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17532, 25, 'BR', NULL, NULL, 'São José do Mato Dentro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17533, 25, 'BR', NULL, NULL, 'São José do Paraopeba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17534, 25, 'BR', NULL, NULL, 'São José do Pântano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17535, 25, 'BR', NULL, NULL, 'São José dos Lopes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17536, 25, 'BR', NULL, NULL, 'São José dos Salgados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17537, 25, 'BR', NULL, NULL, 'São João Batista do Glória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17538, 25, 'BR', NULL, NULL, 'São João Del Rei')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17539, 25, 'BR', NULL, NULL, 'São João Evangelista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17540, 25, 'BR', NULL, NULL, 'São João Nepomuceno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17541, 25, 'BR', NULL, NULL, 'São João da Chapada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17542, 25, 'BR', NULL, NULL, 'São João da Lagoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17543, 25, 'BR', NULL, NULL, 'São João da Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17544, 25, 'BR', NULL, NULL, 'São João da Ponte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17545, 25, 'BR', NULL, NULL, 'São João da Sapucaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17546, 25, 'BR', NULL, NULL, 'São João da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17547, 25, 'BR', NULL, NULL, 'São João da Serra Negra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17548, 25, 'BR', NULL, NULL, 'São João da Vereda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17549, 25, 'BR', NULL, NULL, 'São João das Missões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17550, 25, 'BR', NULL, NULL, 'São João do Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17551, 25, 'BR', NULL, NULL, 'São João do Jacutinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17552, 25, 'BR', NULL, NULL, 'São João do Manhuaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17553, 25, 'BR', NULL, NULL, 'São João do Manteninha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17554, 25, 'BR', NULL, NULL, 'São João do Oriente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17555, 25, 'BR', NULL, NULL, 'São João do Pacuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17556, 25, 'BR', NULL, NULL, 'São João do Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17557, 25, 'BR', NULL, NULL, 'São Lourenço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17558, 25, 'BR', NULL, NULL, 'São Manoel do Guaiaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17559, 25, 'BR', NULL, NULL, 'São Mateus de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17560, 25, 'BR', NULL, NULL, 'São Miguel do Anta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17561, 25, 'BR', NULL, NULL, 'São Pedro da Garça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17562, 25, 'BR', NULL, NULL, 'São Pedro da União')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17563, 25, 'BR', NULL, NULL, 'São Pedro das Tabocas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17564, 25, 'BR', NULL, NULL, 'São Pedro de Caldas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17565, 25, 'BR', NULL, NULL, 'São Pedro do Avaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17566, 25, 'BR', NULL, NULL, 'São Pedro do Glória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17567, 25, 'BR', NULL, NULL, 'São Pedro do Jequitinhonha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17568, 25, 'BR', NULL, NULL, 'São Pedro do Suaçuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17569, 25, 'BR', NULL, NULL, 'São Pedro dos Ferros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17570, 25, 'BR', NULL, NULL, 'São Roberto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17571, 25, 'BR', NULL, NULL, 'São Romão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17572, 25, 'BR', NULL, NULL, 'São Roque de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17573, 25, 'BR', NULL, NULL, 'São Sebastião da Barra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17574, 25, 'BR', NULL, NULL, 'São Sebastião da Bela Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17575, 25, 'BR', NULL, NULL, 'São Sebastião da Vala')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17576, 25, 'BR', NULL, NULL, 'São Sebastião da Vargem Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17577, 25, 'BR', NULL, NULL, 'São Sebastião da Vitória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17578, 25, 'BR', NULL, NULL, 'São Sebastião de Braúnas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17579, 25, 'BR', NULL, NULL, 'São Sebastião do Anta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17580, 25, 'BR', NULL, NULL, 'São Sebastião do Baixio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17581, 25, 'BR', NULL, NULL, 'São Sebastião do Barreado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17582, 25, 'BR', NULL, NULL, 'São Sebastião do Barreiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17583, 25, 'BR', NULL, NULL, 'São Sebastião do Bonsucesso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17584, 25, 'BR', NULL, NULL, 'São Sebastião do Bugre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17585, 25, 'BR', NULL, NULL, 'São Sebastião do Gil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17586, 25, 'BR', NULL, NULL, 'São Sebastião do Maranhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17587, 25, 'BR', NULL, NULL, 'São Sebastião do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17588, 25, 'BR', NULL, NULL, 'São Sebastião do Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17589, 25, 'BR', NULL, NULL, 'São Sebastião do Pontal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17590, 25, 'BR', NULL, NULL, 'São Sebastião do Rio Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17591, 25, 'BR', NULL, NULL, 'São Sebastião do Rio Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17592, 25, 'BR', NULL, NULL, 'São Sebastião do Sacramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17593, 25, 'BR', NULL, NULL, 'São Sebastião do Soberbo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17594, 25, 'BR', NULL, NULL, 'São Sebastião do Óculo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17595, 25, 'BR', NULL, NULL, 'São Sebastião dos Poções')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17596, 25, 'BR', NULL, NULL, 'São Sebastião dos Robertos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17597, 25, 'BR', NULL, NULL, 'São Sebastião dos Torres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17598, 25, 'BR', NULL, NULL, 'São Thomé das Letras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17599, 25, 'BR', NULL, NULL, 'São Tiago')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17600, 25, 'BR', NULL, NULL, 'São Tomás de Aquino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17601, 25, 'BR', NULL, NULL, 'São Vicente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17602, 25, 'BR', NULL, NULL, 'São Vicente da Estrela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17603, 25, 'BR', NULL, NULL, 'São Vicente de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17604, 25, 'BR', NULL, NULL, 'São Vicente do Grama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17605, 25, 'BR', NULL, NULL, 'São Vicente do Rio Doce')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17606, 25, 'BR', NULL, NULL, 'São Vítor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17607, 25, 'BR', NULL, NULL, 'Tabajara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17608, 25, 'BR', NULL, NULL, 'Tabaúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17609, 25, 'BR', NULL, NULL, 'Tabuleiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17610, 25, 'BR', NULL, NULL, 'Tabuão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17611, 25, 'BR', NULL, NULL, 'Taiobeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17612, 25, 'BR', NULL, NULL, 'Taparuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17613, 25, 'BR', NULL, NULL, 'Tapira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17614, 25, 'BR', NULL, NULL, 'Tapiraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17615, 25, 'BR', NULL, NULL, 'Tapuirama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17616, 25, 'BR', NULL, NULL, 'Taquaral de Guanhães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17617, 25, 'BR', NULL, NULL, 'Taquaraçu de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17618, 25, 'BR', NULL, NULL, 'Taruaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17619, 25, 'BR', NULL, NULL, 'Tarumirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17620, 25, 'BR', NULL, NULL, 'Tebas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17621, 25, 'BR', NULL, NULL, 'Teixeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17622, 25, 'BR', NULL, NULL, 'Tejuco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17623, 25, 'BR', NULL, NULL, 'Terra Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17624, 25, 'BR', NULL, NULL, 'Teófilo Otoni')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17625, 25, 'BR', NULL, NULL, 'Timóteo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17626, 25, 'BR', NULL, NULL, 'Tiradentes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17627, 25, 'BR', NULL, NULL, 'Tiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17628, 25, 'BR', NULL, NULL, 'Tobati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17629, 25, 'BR', NULL, NULL, 'Tocandira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17630, 25, 'BR', NULL, NULL, 'Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17631, 25, 'BR', NULL, NULL, 'Tocos do Moji')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17632, 25, 'BR', NULL, NULL, 'Tombos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17633, 25, 'BR', NULL, NULL, 'Tomás Gonzaga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17634, 25, 'BR', NULL, NULL, 'Topázio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17635, 25, 'BR', NULL, NULL, 'Torneiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17636, 25, 'BR', NULL, NULL, 'Torreões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17637, 25, 'BR', NULL, NULL, 'Trimonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17638, 25, 'BR', NULL, NULL, 'Três Corações')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17639, 25, 'BR', NULL, NULL, 'Três Ilhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17640, 25, 'BR', NULL, NULL, 'Três Marias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17641, 25, 'BR', NULL, NULL, 'Três Pontas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17642, 25, 'BR', NULL, NULL, 'Tuiutinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17643, 25, 'BR', NULL, NULL, 'Tumiritinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17644, 25, 'BR', NULL, NULL, 'Tupaciguara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17645, 25, 'BR', NULL, NULL, 'Tuparecê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17646, 25, 'BR', NULL, NULL, 'Turmalina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17647, 25, 'BR', NULL, NULL, 'Turvolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17648, 25, 'BR', NULL, NULL, 'Ubaporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17649, 25, 'BR', NULL, NULL, 'Ubari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17650, 25, 'BR', NULL, NULL, 'Ubaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17651, 25, 'BR', NULL, NULL, 'Uberaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17652, 25, 'BR', NULL, NULL, 'Uberlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17653, 25, 'BR', NULL, NULL, 'Ubá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17654, 25, 'BR', NULL, NULL, 'Umburatiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17655, 25, 'BR', NULL, NULL, 'Umbuzeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17656, 25, 'BR', NULL, NULL, 'Unaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17657, 25, 'BR', NULL, NULL, 'União de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17658, 25, 'BR', NULL, NULL, 'Uruana de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17659, 25, 'BR', NULL, NULL, 'Urucuia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17660, 25, 'BR', NULL, NULL, 'Urucânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17661, 25, 'BR', NULL, NULL, 'Usina Monte Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17662, 25, 'BR', NULL, NULL, 'Vai-Volta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17663, 25, 'BR', NULL, NULL, 'Valadares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17664, 25, 'BR', NULL, NULL, 'Vale Verde de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17665, 25, 'BR', NULL, NULL, 'Valo Fundo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17666, 25, 'BR', NULL, NULL, 'Valão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17667, 25, 'BR', NULL, NULL, 'Vargem Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17668, 25, 'BR', NULL, NULL, 'Vargem Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17669, 25, 'BR', NULL, NULL, 'Vargem Grande do Rio Pardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17670, 25, 'BR', NULL, NULL, 'Vargem Linda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17671, 25, 'BR', NULL, NULL, 'Varginha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17672, 25, 'BR', NULL, NULL, 'Varjão de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17673, 25, 'BR', NULL, NULL, 'Varzelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17674, 25, 'BR', NULL, NULL, 'Vau-Açu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17675, 25, 'BR', NULL, NULL, 'Vazante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17676, 25, 'BR', NULL, NULL, 'Vera Cruz de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17677, 25, 'BR', NULL, NULL, 'Verdelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17678, 25, 'BR', NULL, NULL, 'Vereda do Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17679, 25, 'BR', NULL, NULL, 'Veredas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17680, 25, 'BR', NULL, NULL, 'Veredinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17681, 25, 'BR', NULL, NULL, 'Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17682, 25, 'BR', NULL, NULL, 'Vermelho Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17683, 25, 'BR', NULL, NULL, 'Vermelho Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17684, 25, 'BR', NULL, NULL, 'Veríssimo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17685, 25, 'BR', NULL, NULL, 'Vespasiano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17686, 25, 'BR', NULL, NULL, 'Vieiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17687, 25, 'BR', NULL, NULL, 'Vila Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17688, 25, 'BR', NULL, NULL, 'Vila Costina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17689, 25, 'BR', NULL, NULL, 'Vila Nova de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17690, 25, 'BR', NULL, NULL, 'Vila Nova dos Poções')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17691, 25, 'BR', NULL, NULL, 'Vila Pereira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17692, 25, 'BR', NULL, NULL, 'Vilas Boas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17693, 25, 'BR', NULL, NULL, 'Virgem da Lapa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17694, 25, 'BR', NULL, NULL, 'Virginópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17695, 25, 'BR', NULL, NULL, 'Virgolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17696, 25, 'BR', NULL, NULL, 'Virgínia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17697, 25, 'BR', NULL, NULL, 'Visconde do Rio Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17698, 25, 'BR', NULL, NULL, 'Vista Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17699, 25, 'BR', NULL, NULL, 'Vitorinos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17700, 25, 'BR', NULL, NULL, 'Viçosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17701, 25, 'BR', NULL, NULL, 'Volta Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17702, 25, 'BR', NULL, NULL, 'Várzea da Palma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17703, 25, 'BR', NULL, NULL, 'Zelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17704, 25, 'BR', NULL, NULL, 'Zito Soares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17705, 25, 'BR', NULL, NULL, 'Água Boa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17706, 25, 'BR', NULL, NULL, 'Água Branca de Minas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17707, 25, 'BR', NULL, NULL, 'Água Comprida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17708, 25, 'BR', NULL, NULL, 'Água Viva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17709, 25, 'BR', NULL, NULL, 'Águas Formosas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17710, 25, 'BR', NULL, NULL, 'Águas Férreas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17711, 25, 'BR', NULL, NULL, 'Águas Vermelhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17712, 25, 'BR', NULL, NULL, 'Águas de Araxá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17713, 25, 'BR', NULL, NULL, 'Águas de Contendas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17714, 26, 'BR', NULL, NULL, 'Acorizal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17715, 26, 'BR', NULL, NULL, 'Aguapeí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17716, 26, 'BR', NULL, NULL, 'Aguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17717, 26, 'BR', NULL, NULL, 'Ainhumas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17718, 26, 'BR', NULL, NULL, 'Alcantilado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17719, 26, 'BR', NULL, NULL, 'Alta Floresta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17720, 26, 'BR', NULL, NULL, 'Alto Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17721, 26, 'BR', NULL, NULL, 'Alto Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17722, 26, 'BR', NULL, NULL, 'Alto Coité')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17723, 26, 'BR', NULL, NULL, 'Alto Garças')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17724, 26, 'BR', NULL, NULL, 'Alto Juruena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17725, 26, 'BR', NULL, NULL, 'Alto Paraguai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17726, 26, 'BR', NULL, NULL, 'Alto Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17727, 26, 'BR', NULL, NULL, 'Alto Taquari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17728, 26, 'BR', NULL, NULL, 'Analândia do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17729, 26, 'BR', NULL, NULL, 'Apiacás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17730, 26, 'BR', NULL, NULL, 'Araguaiana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17731, 26, 'BR', NULL, NULL, 'Araguainha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17732, 26, 'BR', NULL, NULL, 'Araputanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17733, 26, 'BR', NULL, NULL, 'Arenápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17734, 26, 'BR', NULL, NULL, 'Aripuanã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17735, 26, 'BR', NULL, NULL, 'Arruda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17736, 26, 'BR', NULL, NULL, 'Assari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17737, 26, 'BR', NULL, NULL, 'Barra do Bugres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17738, 26, 'BR', NULL, NULL, 'Barra do Garças')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17739, 26, 'BR', NULL, NULL, 'Barão de Melgaço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17740, 26, 'BR', NULL, NULL, 'Batovi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17741, 26, 'BR', NULL, NULL, 'Bauxi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17742, 26, 'BR', NULL, NULL, 'Baús')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17743, 26, 'BR', NULL, NULL, 'Bel Rios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17744, 26, 'BR', NULL, NULL, 'Bezerro Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17745, 26, 'BR', NULL, NULL, 'Boa Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17746, 26, 'BR', NULL, NULL, 'Boa União')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17747, 26, 'BR', NULL, NULL, 'Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17748, 26, 'BR', NULL, NULL, 'Bom Jesus do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17749, 26, 'BR', NULL, NULL, 'Bom Sucesso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17750, 26, 'BR', NULL, NULL, 'Brasnorte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17751, 26, 'BR', NULL, NULL, 'Buriti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17752, 26, 'BR', NULL, NULL, 'Caite')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17753, 26, 'BR', NULL, NULL, 'Campinápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17754, 26, 'BR', NULL, NULL, 'Campo Novo do Parecis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17755, 26, 'BR', NULL, NULL, 'Campo Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17756, 26, 'BR', NULL, NULL, 'Campos Novos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17757, 26, 'BR', NULL, NULL, 'Campos de Júlio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17758, 26, 'BR', NULL, NULL, 'Canabrava do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17759, 26, 'BR', NULL, NULL, 'Canarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17760, 26, 'BR', NULL, NULL, 'Cangas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17761, 26, 'BR', NULL, NULL, 'Capão Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17762, 26, 'BR', NULL, NULL, 'Capão Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17763, 26, 'BR', NULL, NULL, 'Caramujo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17764, 26, 'BR', NULL, NULL, 'Caravagio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17765, 26, 'BR', NULL, NULL, 'Carlinda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17766, 26, 'BR', NULL, NULL, 'Cassununga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17767, 26, 'BR', NULL, NULL, 'Castanheira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17768, 26, 'BR', NULL, NULL, 'Catuai')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17769, 26, 'BR', NULL, NULL, 'Chapada dos Guimarães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17770, 26, 'BR', NULL, NULL, 'Cidade Morena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17771, 26, 'BR', NULL, NULL, 'Cláudia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17772, 26, 'BR', NULL, NULL, 'Cocalinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17773, 26, 'BR', NULL, NULL, 'Colniza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17774, 26, 'BR', NULL, NULL, 'Colorado do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17775, 26, 'BR', NULL, NULL, 'Colíder')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17776, 26, 'BR', NULL, NULL, 'Comodoro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17777, 26, 'BR', NULL, NULL, 'Confresa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17778, 26, 'BR', NULL, NULL, 'Conquista D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17779, 26, 'BR', NULL, NULL, 'Coronel Ponce')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17780, 26, 'BR', NULL, NULL, 'Cotrel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17781, 26, 'BR', NULL, NULL, 'Cotriguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17782, 26, 'BR', NULL, NULL, 'Coxipó Açu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17783, 26, 'BR', NULL, NULL, 'Coxipó da Ponte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17784, 26, 'BR', NULL, NULL, 'Coxipó do Ouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17785, 26, 'BR', NULL, NULL, 'Cristinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17786, 26, 'BR', NULL, NULL, 'Cristo Rei')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17787, 26, 'BR', NULL, NULL, 'Cuiabá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17788, 26, 'BR', NULL, NULL, 'Curvelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17789, 26, 'BR', NULL, NULL, 'Cáceres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17790, 26, 'BR', NULL, NULL, 'Del Rios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17791, 26, 'BR', NULL, NULL, 'Denise')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17792, 26, 'BR', NULL, NULL, 'Diamantino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17793, 26, 'BR', NULL, NULL, 'Dom Aquino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17794, 26, 'BR', NULL, NULL, 'Engenho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17795, 26, 'BR', NULL, NULL, 'Engenho Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17796, 26, 'BR', NULL, NULL, 'Entre Rios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17797, 26, 'BR', NULL, NULL, 'Estrela do Leste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17798, 26, 'BR', NULL, NULL, 'Faval')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17799, 26, 'BR', NULL, NULL, 'Fazenda de Cima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17800, 26, 'BR', NULL, NULL, 'Feliz Natal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17801, 26, 'BR', NULL, NULL, 'Figueirópolis D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17802, 26, 'BR', NULL, NULL, 'Filadélfia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17803, 26, 'BR', NULL, NULL, 'Flor da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17804, 26, 'BR', NULL, NULL, 'Fontanilhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17805, 26, 'BR', NULL, NULL, 'Gaúcha do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17806, 26, 'BR', NULL, NULL, 'General Carneiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17807, 26, 'BR', NULL, NULL, 'Glória D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17808, 26, 'BR', NULL, NULL, 'Guarantã do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17809, 26, 'BR', NULL, NULL, 'Guarita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17810, 26, 'BR', NULL, NULL, 'Guiratinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17811, 26, 'BR', NULL, NULL, 'Horizonte do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17812, 26, 'BR', NULL, NULL, 'Indianápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17813, 26, 'BR', NULL, NULL, 'Indiavaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17814, 26, 'BR', NULL, NULL, 'Ipiranga do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17815, 26, 'BR', NULL, NULL, 'Irenópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17816, 26, 'BR', NULL, NULL, 'Itamarati Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17817, 26, 'BR', NULL, NULL, 'Itanhangá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17818, 26, 'BR', NULL, NULL, 'Itaúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17819, 26, 'BR', NULL, NULL, 'Itiquira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17820, 26, 'BR', NULL, NULL, 'Jaciara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17821, 26, 'BR', NULL, NULL, 'Jangada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17822, 26, 'BR', NULL, NULL, 'Jarudore')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17823, 26, 'BR', NULL, NULL, 'Jatobá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17824, 26, 'BR', NULL, NULL, 'Jauru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17825, 26, 'BR', NULL, NULL, 'Joselândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17826, 26, 'BR', NULL, NULL, 'Juara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17827, 26, 'BR', NULL, NULL, 'Juruena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17828, 26, 'BR', NULL, NULL, 'Juscimeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17829, 26, 'BR', NULL, NULL, 'Juína')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17830, 26, 'BR', NULL, NULL, 'Lambari D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17831, 26, 'BR', NULL, NULL, 'Lavouras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17832, 26, 'BR', NULL, NULL, 'Lucas do Rio Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17833, 26, 'BR', NULL, NULL, 'Lucialva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17834, 26, 'BR', NULL, NULL, 'Luciara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17835, 26, 'BR', NULL, NULL, 'Machado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17836, 26, 'BR', NULL, NULL, 'Marcelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17837, 26, 'BR', NULL, NULL, 'Marzagão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17838, 26, 'BR', NULL, NULL, 'Mata Dentro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17839, 26, 'BR', NULL, NULL, 'Matupá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17840, 26, 'BR', NULL, NULL, 'Mimoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17841, 26, 'BR', NULL, NULL, 'Mirassol D''Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17842, 26, 'BR', NULL, NULL, 'Nobres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17843, 26, 'BR', NULL, NULL, 'Nonoai do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17844, 26, 'BR', NULL, NULL, 'Nortelândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17845, 26, 'BR', NULL, NULL, 'Nossa Senhora da Guia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17846, 26, 'BR', NULL, NULL, 'Nossa Senhora do Livramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17847, 26, 'BR', NULL, NULL, 'Nova Alvorada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17848, 26, 'BR', NULL, NULL, 'Nova Bandeirantes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17849, 26, 'BR', NULL, NULL, 'Nova Brasilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17850, 26, 'BR', NULL, NULL, 'Nova Brasília')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17851, 26, 'BR', NULL, NULL, 'Nova Canãa do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17852, 26, 'BR', NULL, NULL, 'Nova Catanduva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17853, 26, 'BR', NULL, NULL, 'Nova Galileia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17854, 26, 'BR', NULL, NULL, 'Nova Guarita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17855, 26, 'BR', NULL, NULL, 'Nova Lacerda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17856, 26, 'BR', NULL, NULL, 'Nova Marilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17857, 26, 'BR', NULL, NULL, 'Nova Maringá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17858, 26, 'BR', NULL, NULL, 'Nova Monte Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17859, 26, 'BR', NULL, NULL, 'Nova Mutum')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17860, 26, 'BR', NULL, NULL, 'Nova Nazaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17861, 26, 'BR', NULL, NULL, 'Nova Olímpia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17862, 26, 'BR', NULL, NULL, 'Nova Santa Helena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17863, 26, 'BR', NULL, NULL, 'Nova Ubiratã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17864, 26, 'BR', NULL, NULL, 'Nova Xavantina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17865, 26, 'BR', NULL, NULL, 'Novo Diamantino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17866, 26, 'BR', NULL, NULL, 'Novo Eldorado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17867, 26, 'BR', NULL, NULL, 'Novo Horizonte do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17868, 26, 'BR', NULL, NULL, 'Novo Mundo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17869, 26, 'BR', NULL, NULL, 'Novo Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17870, 26, 'BR', NULL, NULL, 'Novo Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17871, 26, 'BR', NULL, NULL, 'Novo São Joaquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17872, 26, 'BR', NULL, NULL, 'Padronal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17873, 26, 'BR', NULL, NULL, 'Pai André')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17874, 26, 'BR', NULL, NULL, 'Paranaitá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17875, 26, 'BR', NULL, NULL, 'Paranatinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17876, 26, 'BR', NULL, NULL, 'Paraíso do Leste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17877, 26, 'BR', NULL, NULL, 'Passagem da Conceição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17878, 26, 'BR', NULL, NULL, 'Pedra Preta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17879, 26, 'BR', NULL, NULL, 'Peixoto de Azevedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17880, 26, 'BR', NULL, NULL, 'Pirizal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17881, 26, 'BR', NULL, NULL, 'Placa de Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17882, 26, 'BR', NULL, NULL, 'Planalto da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17883, 26, 'BR', NULL, NULL, 'Poconé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17884, 26, 'BR', NULL, NULL, 'Pombas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17885, 26, 'BR', NULL, NULL, 'Pontal do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17886, 26, 'BR', NULL, NULL, 'Ponte Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17887, 26, 'BR', NULL, NULL, 'Ponte de Pedra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17888, 26, 'BR', NULL, NULL, 'Pontes e Lacerda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17889, 26, 'BR', NULL, NULL, 'Pontinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17890, 26, 'BR', NULL, NULL, 'Porto Alegre do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17891, 26, 'BR', NULL, NULL, 'Porto Esperidião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17892, 26, 'BR', NULL, NULL, 'Porto Estrela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17893, 26, 'BR', NULL, NULL, 'Porto dos Gaúchos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17894, 26, 'BR', NULL, NULL, 'Poxoréo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17895, 26, 'BR', NULL, NULL, 'Praia Rica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17896, 26, 'BR', NULL, NULL, 'Primavera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17897, 26, 'BR', NULL, NULL, 'Primavera do Leste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17898, 26, 'BR', NULL, NULL, 'Progresso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17899, 26, 'BR', NULL, NULL, 'Querência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17900, 26, 'BR', NULL, NULL, 'Rancharia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17901, 26, 'BR', NULL, NULL, 'Reserva do Cabaçal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17902, 26, 'BR', NULL, NULL, 'Ribeirão Cascalheira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17903, 26, 'BR', NULL, NULL, 'Ribeirão dos Cocais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17904, 26, 'BR', NULL, NULL, 'Ribeirãozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17905, 26, 'BR', NULL, NULL, 'Rio Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17906, 26, 'BR', NULL, NULL, 'Rio Manso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17907, 26, 'BR', NULL, NULL, 'Riolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17908, 26, 'BR', NULL, NULL, 'Rondolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17909, 26, 'BR', NULL, NULL, 'Rondonópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17910, 26, 'BR', NULL, NULL, 'Rosário Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17911, 26, 'BR', NULL, NULL, 'Salto do Céu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17912, 26, 'BR', NULL, NULL, 'Sangradouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17913, 26, 'BR', NULL, NULL, 'Santa Carmem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17914, 26, 'BR', NULL, NULL, 'Santa Cruz do Xingu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17915, 26, 'BR', NULL, NULL, 'Santa Elvira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17916, 26, 'BR', NULL, NULL, 'Santa Fé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17917, 26, 'BR', NULL, NULL, 'Santa Rita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17918, 26, 'BR', NULL, NULL, 'Santa Rita do Trivelato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17919, 26, 'BR', NULL, NULL, 'Santa Terezinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17920, 26, 'BR', NULL, NULL, 'Santaninha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17921, 26, 'BR', NULL, NULL, 'Santo Afonso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17922, 26, 'BR', NULL, NULL, 'Santo Antônio do Leste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17923, 26, 'BR', NULL, NULL, 'Santo Antônio do Leverger')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17924, 26, 'BR', NULL, NULL, 'Santo Antônio do Rio Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17925, 26, 'BR', NULL, NULL, 'Sapezal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17926, 26, 'BR', NULL, NULL, 'Selma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17927, 26, 'BR', NULL, NULL, 'Serra Nova Dourada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17928, 26, 'BR', NULL, NULL, 'Sinop')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17929, 26, 'BR', NULL, NULL, 'Sonho Azul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17930, 26, 'BR', NULL, NULL, 'Sorriso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17931, 26, 'BR', NULL, NULL, 'Sumidouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17932, 26, 'BR', NULL, NULL, 'São Cristovão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17933, 26, 'BR', NULL, NULL, 'São Félix do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17934, 26, 'BR', NULL, NULL, 'São Joaquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17935, 26, 'BR', NULL, NULL, 'São Jorge')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17936, 26, 'BR', NULL, NULL, 'São José do Apuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17937, 26, 'BR', NULL, NULL, 'São José do Planalto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17938, 26, 'BR', NULL, NULL, 'São José do Povo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17939, 26, 'BR', NULL, NULL, 'São José do Rio Claro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17940, 26, 'BR', NULL, NULL, 'São José do Xingu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17941, 26, 'BR', NULL, NULL, 'São José dos Quatro Marcos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17942, 26, 'BR', NULL, NULL, 'São Lourenço de Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17943, 26, 'BR', NULL, NULL, 'São Pedro da Cipa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17944, 26, 'BR', NULL, NULL, 'São Vicente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17945, 26, 'BR', NULL, NULL, 'Tabaporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17946, 26, 'BR', NULL, NULL, 'Tangará da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17947, 26, 'BR', NULL, NULL, 'Tapirapua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17948, 26, 'BR', NULL, NULL, 'Tapurah')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17949, 26, 'BR', NULL, NULL, 'Terra Nova do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17950, 26, 'BR', NULL, NULL, 'Terra Roxa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17951, 26, 'BR', NULL, NULL, 'Tesouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17952, 26, 'BR', NULL, NULL, 'Toricueyje')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17953, 26, 'BR', NULL, NULL, 'Torixoréu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17954, 26, 'BR', NULL, NULL, 'Três Pontes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17955, 26, 'BR', NULL, NULL, 'União do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17956, 26, 'BR', NULL, NULL, 'Vale Rico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17957, 26, 'BR', NULL, NULL, 'Vale de São Domingos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17958, 26, 'BR', NULL, NULL, 'Vale dos Sonhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17959, 26, 'BR', NULL, NULL, 'Varginha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17960, 26, 'BR', NULL, NULL, 'Vera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17961, 26, 'BR', NULL, NULL, 'Vila Atlântica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17962, 26, 'BR', NULL, NULL, 'Vila Bela da Santíssima Trindade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17963, 26, 'BR', NULL, NULL, 'Vila Bueno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17964, 26, 'BR', NULL, NULL, 'Vila Mutum')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17965, 26, 'BR', NULL, NULL, 'Vila Operária')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17966, 26, 'BR', NULL, NULL, 'Vila Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17967, 26, 'BR', NULL, NULL, 'Vila Progresso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17968, 26, 'BR', NULL, NULL, 'Vila Rica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17969, 26, 'BR', NULL, NULL, 'Várzea Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17970, 26, 'BR', NULL, NULL, 'Água Boa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17971, 26, 'BR', NULL, NULL, 'Água Fria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17972, 26, 'BR', NULL, NULL, 'Águas Claras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17973, 27, 'BR', NULL, NULL, 'Abaetetuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17974, 27, 'BR', NULL, NULL, 'Abel Figueiredo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17975, 27, 'BR', NULL, NULL, 'Acará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17976, 27, 'BR', NULL, NULL, 'Afuá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17977, 27, 'BR', NULL, NULL, 'Agrópolis Bela Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17978, 27, 'BR', NULL, NULL, 'Alenquer')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17979, 27, 'BR', NULL, NULL, 'Algodoal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17980, 27, 'BR', NULL, NULL, 'Almeirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17981, 27, 'BR', NULL, NULL, 'Almoço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17982, 27, 'BR', NULL, NULL, 'Alta Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17983, 27, 'BR', NULL, NULL, 'Altamira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17984, 27, 'BR', NULL, NULL, 'Alter do Chão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17985, 27, 'BR', NULL, NULL, 'Alvorada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17986, 27, 'BR', NULL, NULL, 'Americano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17987, 27, 'BR', NULL, NULL, 'Anajás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17988, 27, 'BR', NULL, NULL, 'Ananindeua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17989, 27, 'BR', NULL, NULL, 'Anapu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17990, 27, 'BR', NULL, NULL, 'Antônio Lemos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17991, 27, 'BR', NULL, NULL, 'Apeú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17992, 27, 'BR', NULL, NULL, 'Apinagés')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17993, 27, 'BR', NULL, NULL, 'Arapixuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17994, 27, 'BR', NULL, NULL, 'Araquaim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17995, 27, 'BR', NULL, NULL, 'Arco-Íris')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17996, 27, 'BR', NULL, NULL, 'Areias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17997, 27, 'BR', NULL, NULL, 'Arumanduba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17998, 27, 'BR', NULL, NULL, 'Aruri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (17999, 27, 'BR', NULL, NULL, 'Aturiaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18000, 27, 'BR', NULL, NULL, 'Augusto Corrêa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18001, 27, 'BR', NULL, NULL, 'Aurora do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18002, 27, 'BR', NULL, NULL, 'Aveiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18003, 27, 'BR', NULL, NULL, 'Bagre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18004, 27, 'BR', NULL, NULL, 'Baião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18005, 27, 'BR', NULL, NULL, 'Bannach')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18006, 27, 'BR', NULL, NULL, 'Barcarena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18007, 27, 'BR', NULL, NULL, 'Barreira Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18008, 27, 'BR', NULL, NULL, 'Barreira dos Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18009, 27, 'BR', NULL, NULL, 'Barreiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18010, 27, 'BR', NULL, NULL, 'Baturité')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18011, 27, 'BR', NULL, NULL, 'Beja')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18012, 27, 'BR', NULL, NULL, 'Bela Vista do Caracol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18013, 27, 'BR', NULL, NULL, 'Belterra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18014, 27, 'BR', NULL, NULL, 'Belém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18015, 27, 'BR', NULL, NULL, 'Benevides')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18016, 27, 'BR', NULL, NULL, 'Benfica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18017, 27, 'BR', NULL, NULL, 'Boa Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18018, 27, 'BR', NULL, NULL, 'Boa Fé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18019, 27, 'BR', NULL, NULL, 'Boa Sorte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18020, 27, 'BR', NULL, NULL, 'Boa Vista do Iririteua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18021, 27, 'BR', NULL, NULL, 'Boim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18022, 27, 'BR', NULL, NULL, 'Bom Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18023, 27, 'BR', NULL, NULL, 'Bom Jesus do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18024, 27, 'BR', NULL, NULL, 'Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18025, 27, 'BR', NULL, NULL, 'Bragança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18026, 27, 'BR', NULL, NULL, 'Brasil Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18027, 27, 'BR', NULL, NULL, 'Brasília Legal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18028, 27, 'BR', NULL, NULL, 'Brejo Grande do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18029, 27, 'BR', NULL, NULL, 'Brejo do Meio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18030, 27, 'BR', NULL, NULL, 'Breu Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18031, 27, 'BR', NULL, NULL, 'Breves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18032, 27, 'BR', NULL, NULL, 'Bujaru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18033, 27, 'BR', NULL, NULL, 'Cachoeira do Arari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18034, 27, 'BR', NULL, NULL, 'Cachoeira do Piriá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18035, 27, 'BR', NULL, NULL, 'Cafezal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18036, 27, 'BR', NULL, NULL, 'Cairari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18037, 27, 'BR', NULL, NULL, 'Caju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18038, 27, 'BR', NULL, NULL, 'Cambuquira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18039, 27, 'BR', NULL, NULL, 'Cametá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18040, 27, 'BR', NULL, NULL, 'Camiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18041, 27, 'BR', NULL, NULL, 'Canaã dos Carajás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18042, 27, 'BR', NULL, NULL, 'Capanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18043, 27, 'BR', NULL, NULL, 'Capitão Poço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18044, 27, 'BR', NULL, NULL, 'Caracará do Arari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18045, 27, 'BR', NULL, NULL, 'Carajás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18046, 27, 'BR', NULL, NULL, 'Carapajó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18047, 27, 'BR', NULL, NULL, 'Caraparu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18048, 27, 'BR', NULL, NULL, 'Caratateua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18049, 27, 'BR', NULL, NULL, 'Caripi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18050, 27, 'BR', NULL, NULL, 'Carrazedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18051, 27, 'BR', NULL, NULL, 'Castanhal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18052, 27, 'BR', NULL, NULL, 'Castelo dos Sonhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18053, 27, 'BR', NULL, NULL, 'Chaves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18054, 27, 'BR', NULL, NULL, 'Colares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18055, 27, 'BR', NULL, NULL, 'Conceição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18056, 27, 'BR', NULL, NULL, 'Conceição do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18057, 27, 'BR', NULL, NULL, 'Concórdia do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18058, 27, 'BR', NULL, NULL, 'Condeixa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18059, 27, 'BR', NULL, NULL, 'Coqueiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18060, 27, 'BR', NULL, NULL, 'Cripurizinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18061, 27, 'BR', NULL, NULL, 'Cripurizão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18062, 27, 'BR', NULL, NULL, 'Cuiú-Cuiú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18063, 27, 'BR', NULL, NULL, 'Cumaru do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18064, 27, 'BR', NULL, NULL, 'Curionópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18065, 27, 'BR', NULL, NULL, 'Curralinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18066, 27, 'BR', NULL, NULL, 'Curuaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18067, 27, 'BR', NULL, NULL, 'Curumu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18068, 27, 'BR', NULL, NULL, 'Curuá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18069, 27, 'BR', NULL, NULL, 'Curuçambaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18070, 27, 'BR', NULL, NULL, 'Curuçá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18071, 27, 'BR', NULL, NULL, 'Câmara do Marajó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18072, 27, 'BR', NULL, NULL, 'Dom Eliseu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18073, 27, 'BR', NULL, NULL, 'Eldorado dos Carajás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18074, 27, 'BR', NULL, NULL, 'Emboraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18075, 27, 'BR', NULL, NULL, 'Espírito Santo do Tauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18076, 27, 'BR', NULL, NULL, 'Faro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18077, 27, 'BR', NULL, NULL, 'Fernandes Belo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18078, 27, 'BR', NULL, NULL, 'Flexal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18079, 27, 'BR', NULL, NULL, 'Floresta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18080, 27, 'BR', NULL, NULL, 'Floresta do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18081, 27, 'BR', NULL, NULL, 'Garrafão do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18082, 27, 'BR', NULL, NULL, 'Goianésia do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18083, 27, 'BR', NULL, NULL, 'Gradaus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18084, 27, 'BR', NULL, NULL, 'Guajará-Açú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18085, 27, 'BR', NULL, NULL, 'Guajará-Miri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18086, 27, 'BR', NULL, NULL, 'Gurupizinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18087, 27, 'BR', NULL, NULL, 'Gurupá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18088, 27, 'BR', NULL, NULL, 'Hidrelétrica Tucuruí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18089, 27, 'BR', NULL, NULL, 'Iataí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18090, 27, 'BR', NULL, NULL, 'Icoaraci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18091, 27, 'BR', NULL, NULL, 'Igarapé da Lama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18092, 27, 'BR', NULL, NULL, 'Igarapé-Açu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18093, 27, 'BR', NULL, NULL, 'Igarapé-Miri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18094, 27, 'BR', NULL, NULL, 'Inanu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18095, 27, 'BR', NULL, NULL, 'Inhangapi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18096, 27, 'BR', NULL, NULL, 'Ipixuna do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18097, 27, 'BR', NULL, NULL, 'Irituia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18098, 27, 'BR', NULL, NULL, 'Itaituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18099, 27, 'BR', NULL, NULL, 'Itapixuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18100, 27, 'BR', NULL, NULL, 'Itatupã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18101, 27, 'BR', NULL, NULL, 'Itupiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18102, 27, 'BR', NULL, NULL, 'Jacareacanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18103, 27, 'BR', NULL, NULL, 'Jacundá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18104, 27, 'BR', NULL, NULL, 'Jaguarari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18105, 27, 'BR', NULL, NULL, 'Jamanxinzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18106, 27, 'BR', NULL, NULL, 'Jambuaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18107, 27, 'BR', NULL, NULL, 'Jandiaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18108, 27, 'BR', NULL, NULL, 'Japerica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18109, 27, 'BR', NULL, NULL, 'Joana Coeli')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18110, 27, 'BR', NULL, NULL, 'Joana Peres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18111, 27, 'BR', NULL, NULL, 'Joanes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18112, 27, 'BR', NULL, NULL, 'Juabá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18113, 27, 'BR', NULL, NULL, 'Jubim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18114, 27, 'BR', NULL, NULL, 'Juruti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18115, 27, 'BR', NULL, NULL, 'Lauro Sodré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18116, 27, 'BR', NULL, NULL, 'Ligação do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18117, 27, 'BR', NULL, NULL, 'Limoeiro do Ajuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18118, 27, 'BR', NULL, NULL, 'Magalhães Barata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18119, 27, 'BR', NULL, NULL, 'Maiauata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18120, 27, 'BR', NULL, NULL, 'Manjeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18121, 27, 'BR', NULL, NULL, 'Marabá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18122, 27, 'BR', NULL, NULL, 'Maracanã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18123, 27, 'BR', NULL, NULL, 'Marajoara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18124, 27, 'BR', NULL, NULL, 'Marapanim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18125, 27, 'BR', NULL, NULL, 'Marituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18126, 27, 'BR', NULL, NULL, 'Marudá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18127, 27, 'BR', NULL, NULL, 'Mata Geral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18128, 27, 'BR', NULL, NULL, 'Matapiquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18129, 27, 'BR', NULL, NULL, 'Medicilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18130, 27, 'BR', NULL, NULL, 'Melgaço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18131, 27, 'BR', NULL, NULL, 'Menino Deus do Anapu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18132, 27, 'BR', NULL, NULL, 'Meruú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18133, 27, 'BR', NULL, NULL, 'Mirasselvas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18134, 27, 'BR', NULL, NULL, 'Miritituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18135, 27, 'BR', NULL, NULL, 'Mocajuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18136, 27, 'BR', NULL, NULL, 'Moiraba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18137, 27, 'BR', NULL, NULL, 'Moju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18138, 27, 'BR', NULL, NULL, 'Monsaras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18139, 27, 'BR', NULL, NULL, 'Monte Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18140, 27, 'BR', NULL, NULL, 'Monte Alegre do Mau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18141, 27, 'BR', NULL, NULL, 'Monte Dourado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18142, 27, 'BR', NULL, NULL, 'Morada Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18143, 27, 'BR', NULL, NULL, 'Moraes Almeida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18144, 27, 'BR', NULL, NULL, 'Mosqueiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18145, 27, 'BR', NULL, NULL, 'Muaná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18146, 27, 'BR', NULL, NULL, 'Mujuí dos Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18147, 27, 'BR', NULL, NULL, 'Murajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18148, 27, 'BR', NULL, NULL, 'Murucupi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18149, 27, 'BR', NULL, NULL, 'Murumuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18150, 27, 'BR', NULL, NULL, 'Muta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18151, 27, 'BR', NULL, NULL, 'Mutucal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18152, 27, 'BR', NULL, NULL, 'Mãe do Rio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18153, 27, 'BR', NULL, NULL, 'Nazaré de Mocajuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18154, 27, 'BR', NULL, NULL, 'Nazaré dos Patos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18155, 27, 'BR', NULL, NULL, 'Nova Esperança do Piriá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18156, 27, 'BR', NULL, NULL, 'Nova Ipixuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18157, 27, 'BR', NULL, NULL, 'Nova Mocajuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18158, 27, 'BR', NULL, NULL, 'Nova Timboteua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18159, 27, 'BR', NULL, NULL, 'Novo Planalto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18160, 27, 'BR', NULL, NULL, 'Novo Progresso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18161, 27, 'BR', NULL, NULL, 'Novo Repartimento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18162, 27, 'BR', NULL, NULL, 'Núcleo Urbano Quilômetro 30')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18163, 27, 'BR', NULL, NULL, 'Oeiras do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18164, 27, 'BR', NULL, NULL, 'Oriximiná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18165, 27, 'BR', NULL, NULL, 'Osvaldilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18166, 27, 'BR', NULL, NULL, 'Otelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18167, 27, 'BR', NULL, NULL, 'Ourilândia do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18168, 27, 'BR', NULL, NULL, 'Ourém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18169, 27, 'BR', NULL, NULL, 'Outeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18170, 27, 'BR', NULL, NULL, 'Pacajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18171, 27, 'BR', NULL, NULL, 'Pacoval')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18172, 27, 'BR', NULL, NULL, 'Palestina do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18173, 27, 'BR', NULL, NULL, 'Paragominas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18174, 27, 'BR', NULL, NULL, 'Paratins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18175, 27, 'BR', NULL, NULL, 'Parauapebas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18176, 27, 'BR', NULL, NULL, 'Pau D''Arco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18177, 27, 'BR', NULL, NULL, 'Pedreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18178, 27, 'BR', NULL, NULL, 'Peixe-Boi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18179, 27, 'BR', NULL, NULL, 'Penhalonga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18180, 27, 'BR', NULL, NULL, 'Perseverança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18181, 27, 'BR', NULL, NULL, 'Pesqueiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18182, 27, 'BR', NULL, NULL, 'Piabas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18183, 27, 'BR', NULL, NULL, 'Pinhal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18184, 27, 'BR', NULL, NULL, 'Piraquara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18185, 27, 'BR', NULL, NULL, 'Piriá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18186, 27, 'BR', NULL, NULL, 'Piçarra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18187, 27, 'BR', NULL, NULL, 'Placas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18188, 27, 'BR', NULL, NULL, 'Ponta de Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18189, 27, 'BR', NULL, NULL, 'Ponta de Ramos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18190, 27, 'BR', NULL, NULL, 'Portel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18191, 27, 'BR', NULL, NULL, 'Porto Salvo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18192, 27, 'BR', NULL, NULL, 'Porto Trombetas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18193, 27, 'BR', NULL, NULL, 'Porto de Moz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18194, 27, 'BR', NULL, NULL, 'Prainha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18195, 27, 'BR', NULL, NULL, 'Primavera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18196, 27, 'BR', NULL, NULL, 'Quatipuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18197, 27, 'BR', NULL, NULL, 'Quatro Bocas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18198, 27, 'BR', NULL, NULL, 'Redenção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18199, 27, 'BR', NULL, NULL, 'Remansão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18200, 27, 'BR', NULL, NULL, 'Repartimento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18201, 27, 'BR', NULL, NULL, 'Rio Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18202, 27, 'BR', NULL, NULL, 'Rio Vermelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18203, 27, 'BR', NULL, NULL, 'Riozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18204, 27, 'BR', NULL, NULL, 'Rondon do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18205, 27, 'BR', NULL, NULL, 'Rurópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18206, 27, 'BR', NULL, NULL, 'Salinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18207, 27, 'BR', NULL, NULL, 'Salvaterra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18208, 27, 'BR', NULL, NULL, 'Santa Bárbara do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18209, 27, 'BR', NULL, NULL, 'Santa Cruz do Arari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18210, 27, 'BR', NULL, NULL, 'Santa Isabel do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18211, 27, 'BR', NULL, NULL, 'Santa Luzia do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18212, 27, 'BR', NULL, NULL, 'Santa Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18213, 27, 'BR', NULL, NULL, 'Santa Maria das Barreiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18214, 27, 'BR', NULL, NULL, 'Santa Maria do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18215, 27, 'BR', NULL, NULL, 'Santa Rosa da Vigia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18216, 27, 'BR', NULL, NULL, 'Santa Terezinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18217, 27, 'BR', NULL, NULL, 'Santana do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18218, 27, 'BR', NULL, NULL, 'Santarém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18219, 27, 'BR', NULL, NULL, 'Santarém Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18220, 27, 'BR', NULL, NULL, 'Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18221, 27, 'BR', NULL, NULL, 'Santo Antônio do Tauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18222, 27, 'BR', NULL, NULL, 'Sapucaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18223, 27, 'BR', NULL, NULL, 'Senador José Porfírio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18224, 27, 'BR', NULL, NULL, 'Serra Pelada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18225, 27, 'BR', NULL, NULL, 'Soure')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18226, 27, 'BR', NULL, NULL, 'São Caetano de Odivelas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18227, 27, 'BR', NULL, NULL, 'São Domingos do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18228, 27, 'BR', NULL, NULL, 'São Domingos do Capim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18229, 27, 'BR', NULL, NULL, 'São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18230, 27, 'BR', NULL, NULL, 'São Francisco da Jararaca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18231, 27, 'BR', NULL, NULL, 'São Francisco do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18232, 27, 'BR', NULL, NULL, 'São Félix do Xingu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18233, 27, 'BR', NULL, NULL, 'São Geraldo do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18234, 27, 'BR', NULL, NULL, 'São Joaquim do Tapará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18235, 27, 'BR', NULL, NULL, 'São Jorge')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18236, 27, 'BR', NULL, NULL, 'São José do Gurupi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18237, 27, 'BR', NULL, NULL, 'São José do Piriá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18238, 27, 'BR', NULL, NULL, 'São João da Ponta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18239, 27, 'BR', NULL, NULL, 'São João de Pirabas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18240, 27, 'BR', NULL, NULL, 'São João do Acangata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18241, 27, 'BR', NULL, NULL, 'São João do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18242, 27, 'BR', NULL, NULL, 'São João do Piriá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18243, 27, 'BR', NULL, NULL, 'São João dos Ramos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18244, 27, 'BR', NULL, NULL, 'São Luiz do Tapajós')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18245, 27, 'BR', NULL, NULL, 'São Miguel do Guamá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18246, 27, 'BR', NULL, NULL, 'São Miguel dos Macacos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18247, 27, 'BR', NULL, NULL, 'São Pedro de Viseu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18248, 27, 'BR', NULL, NULL, 'São Pedro do Capim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18249, 27, 'BR', NULL, NULL, 'São Raimundo de Borralhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18250, 27, 'BR', NULL, NULL, 'São Raimundo do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18251, 27, 'BR', NULL, NULL, 'São Raimundo dos Furtados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18252, 27, 'BR', NULL, NULL, 'São Roberto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18253, 27, 'BR', NULL, NULL, 'São Sebastião da Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18254, 27, 'BR', NULL, NULL, 'São Sebastião de Viçosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18255, 27, 'BR', NULL, NULL, 'Tailândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18256, 27, 'BR', NULL, NULL, 'Tatuteua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18257, 27, 'BR', NULL, NULL, 'Tauari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18258, 27, 'BR', NULL, NULL, 'Tauarizinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18259, 27, 'BR', NULL, NULL, 'Tentugal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18260, 27, 'BR', NULL, NULL, 'Terra Alta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18261, 27, 'BR', NULL, NULL, 'Terra Santa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18262, 27, 'BR', NULL, NULL, 'Tijoca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18263, 27, 'BR', NULL, NULL, 'Timboteua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18264, 27, 'BR', NULL, NULL, 'Tomé-Açú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18265, 27, 'BR', NULL, NULL, 'Tracuateua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18266, 27, 'BR', NULL, NULL, 'Trairão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18267, 27, 'BR', NULL, NULL, 'Tucumã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18268, 27, 'BR', NULL, NULL, 'Tucuruí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18269, 27, 'BR', NULL, NULL, 'Ulianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18270, 27, 'BR', NULL, NULL, 'Uruará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18271, 27, 'BR', NULL, NULL, 'Urucuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18272, 27, 'BR', NULL, NULL, 'Urucuriteua')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18273, 27, 'BR', NULL, NULL, 'Val-de-Cães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18274, 27, 'BR', NULL, NULL, 'Veiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18275, 27, 'BR', NULL, NULL, 'Vigia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18276, 27, 'BR', NULL, NULL, 'Vila França')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18277, 27, 'BR', NULL, NULL, 'Vila Goreth')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18278, 27, 'BR', NULL, NULL, 'Vila Isol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18279, 27, 'BR', NULL, NULL, 'Vila Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18280, 27, 'BR', NULL, NULL, 'Vila Planalto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18281, 27, 'BR', NULL, NULL, 'Vila Santa Fé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18282, 27, 'BR', NULL, NULL, 'Vila Socorro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18283, 27, 'BR', NULL, NULL, 'Vila do Carmo do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18284, 27, 'BR', NULL, NULL, 'Vila dos Cabanos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18285, 27, 'BR', NULL, NULL, 'Vilarinho do Monte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18286, 27, 'BR', NULL, NULL, 'Viseu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18287, 27, 'BR', NULL, NULL, 'Vista Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18288, 27, 'BR', NULL, NULL, 'Vista Alegre do Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18289, 27, 'BR', NULL, NULL, 'Vitória do Xingu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18290, 27, 'BR', NULL, NULL, 'Xinguara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18291, 27, 'BR', NULL, NULL, 'Xinguarinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18292, 27, 'BR', NULL, NULL, 'km 19')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18293, 27, 'BR', NULL, NULL, 'km 26')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18294, 27, 'BR', NULL, NULL, 'Água Azul do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18295, 27, 'BR', NULL, NULL, 'Água Fria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18296, 27, 'BR', NULL, NULL, 'Óbidos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18297, 28, 'BR', NULL, NULL, 'Aguiar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18298, 28, 'BR', NULL, NULL, 'Alagoa Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18299, 28, 'BR', NULL, NULL, 'Alagoa Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18300, 28, 'BR', NULL, NULL, 'Alagoinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18301, 28, 'BR', NULL, NULL, 'Alcantil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18302, 28, 'BR', NULL, NULL, 'Algodão de Jandaíra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18303, 28, 'BR', NULL, NULL, 'Alhandra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18304, 28, 'BR', NULL, NULL, 'Amparo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18305, 28, 'BR', NULL, NULL, 'Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18306, 28, 'BR', NULL, NULL, 'Arara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18307, 28, 'BR', NULL, NULL, 'Araruna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18308, 28, 'BR', NULL, NULL, 'Araçagi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18309, 28, 'BR', NULL, NULL, 'Areia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18310, 28, 'BR', NULL, NULL, 'Areia de Baraúnas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18311, 28, 'BR', NULL, NULL, 'Areial')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18312, 28, 'BR', NULL, NULL, 'Areias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18313, 28, 'BR', NULL, NULL, 'Aroeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18314, 28, 'BR', NULL, NULL, 'Assunção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18315, 28, 'BR', NULL, NULL, 'Balanços')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18316, 28, 'BR', NULL, NULL, 'Bananeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18317, 28, 'BR', NULL, NULL, 'Baraúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18318, 28, 'BR', NULL, NULL, 'Barra de Santa Rosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18319, 28, 'BR', NULL, NULL, 'Barra de Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18320, 28, 'BR', NULL, NULL, 'Barra de São Miguel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18321, 28, 'BR', NULL, NULL, 'Barra do Camaratuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18322, 28, 'BR', NULL, NULL, 'Bayeux')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18323, 28, 'BR', NULL, NULL, 'Baía da Traição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18324, 28, 'BR', NULL, NULL, 'Belém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18325, 28, 'BR', NULL, NULL, 'Belém do Brejo do Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18326, 28, 'BR', NULL, NULL, 'Bernardino Batista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18327, 28, 'BR', NULL, NULL, 'Boa Ventura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18328, 28, 'BR', NULL, NULL, 'Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18329, 28, 'BR', NULL, NULL, 'Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18330, 28, 'BR', NULL, NULL, 'Bom Sucesso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18331, 28, 'BR', NULL, NULL, 'Bonito de Santa Fé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18332, 28, 'BR', NULL, NULL, 'Boqueirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18333, 28, 'BR', NULL, NULL, 'Borborema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18334, 28, 'BR', NULL, NULL, 'Brejo do Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18335, 28, 'BR', NULL, NULL, 'Brejo dos Santos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18336, 28, 'BR', NULL, NULL, 'Caaporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18337, 28, 'BR', NULL, NULL, 'Cabaceiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18338, 28, 'BR', NULL, NULL, 'Cabedelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18339, 28, 'BR', NULL, NULL, 'Cachoeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18340, 28, 'BR', NULL, NULL, 'Cachoeira dos Índios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18341, 28, 'BR', NULL, NULL, 'Cachoeirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18342, 28, 'BR', NULL, NULL, 'Cacimba de Areia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18343, 28, 'BR', NULL, NULL, 'Cacimba de Dentro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18344, 28, 'BR', NULL, NULL, 'Cacimbas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18345, 28, 'BR', NULL, NULL, 'Caiçara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18346, 28, 'BR', NULL, NULL, 'Cajazeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18347, 28, 'BR', NULL, NULL, 'Cajazeirinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18348, 28, 'BR', NULL, NULL, 'Caldas Brandão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18349, 28, 'BR', NULL, NULL, 'Camalaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18350, 28, 'BR', NULL, NULL, 'Campina Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18351, 28, 'BR', NULL, NULL, 'Campo Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18352, 28, 'BR', NULL, NULL, 'Campo Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18353, 28, 'BR', NULL, NULL, 'Campo de Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18354, 28, 'BR', NULL, NULL, 'Camurupim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18355, 28, 'BR', NULL, NULL, 'Capim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18356, 28, 'BR', NULL, NULL, 'Caraúbas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18357, 28, 'BR', NULL, NULL, 'Cardoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18358, 28, 'BR', NULL, NULL, 'Carrapateira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18359, 28, 'BR', NULL, NULL, 'Casinha do Homem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18360, 28, 'BR', NULL, NULL, 'Casserengue')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18361, 28, 'BR', NULL, NULL, 'Catingueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18362, 28, 'BR', NULL, NULL, 'Catolé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18363, 28, 'BR', NULL, NULL, 'Catolé do Rocha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18364, 28, 'BR', NULL, NULL, 'Caturité')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18365, 28, 'BR', NULL, NULL, 'Cepilho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18366, 28, 'BR', NULL, NULL, 'Conceição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18367, 28, 'BR', NULL, NULL, 'Condado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18368, 28, 'BR', NULL, NULL, 'Conde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18369, 28, 'BR', NULL, NULL, 'Congo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18370, 28, 'BR', NULL, NULL, 'Coremas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18371, 28, 'BR', NULL, NULL, 'Coronel Maia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18372, 28, 'BR', NULL, NULL, 'Coxixola')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18373, 28, 'BR', NULL, NULL, 'Cruz do Espírito Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18374, 28, 'BR', NULL, NULL, 'Cubati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18375, 28, 'BR', NULL, NULL, 'Cuitegi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18376, 28, 'BR', NULL, NULL, 'Cuité')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18377, 28, 'BR', NULL, NULL, 'Cuité de Mamanguape')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18378, 28, 'BR', NULL, NULL, 'Cupissura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18379, 28, 'BR', NULL, NULL, 'Curral Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18380, 28, 'BR', NULL, NULL, 'Curral de Cima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18381, 28, 'BR', NULL, NULL, 'Damião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18382, 28, 'BR', NULL, NULL, 'Desterro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18383, 28, 'BR', NULL, NULL, 'Diamante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18384, 28, 'BR', NULL, NULL, 'Dona Inês')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18385, 28, 'BR', NULL, NULL, 'Duas Estradas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18386, 28, 'BR', NULL, NULL, 'Emas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18387, 28, 'BR', NULL, NULL, 'Engenheiro Ávidos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18388, 28, 'BR', NULL, NULL, 'Esperança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18389, 28, 'BR', NULL, NULL, 'Fagundes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18390, 28, 'BR', NULL, NULL, 'Fazenda Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18391, 28, 'BR', NULL, NULL, 'Forte Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18392, 28, 'BR', NULL, NULL, 'Frei Martinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18393, 28, 'BR', NULL, NULL, 'Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18394, 28, 'BR', NULL, NULL, 'Gado Bravo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18395, 28, 'BR', NULL, NULL, 'Galante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18396, 28, 'BR', NULL, NULL, 'Guarabira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18397, 28, 'BR', NULL, NULL, 'Guarita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18398, 28, 'BR', NULL, NULL, 'Gurinhém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18399, 28, 'BR', NULL, NULL, 'Gurjão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18400, 28, 'BR', NULL, NULL, 'Ibiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18401, 28, 'BR', NULL, NULL, 'Igaracy')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18402, 28, 'BR', NULL, NULL, 'Imaculada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18403, 28, 'BR', NULL, NULL, 'Ingá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18404, 28, 'BR', NULL, NULL, 'Itabaiana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18405, 28, 'BR', NULL, NULL, 'Itajubatiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18406, 28, 'BR', NULL, NULL, 'Itaporanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18407, 28, 'BR', NULL, NULL, 'Itapororoca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18408, 28, 'BR', NULL, NULL, 'Itatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18409, 28, 'BR', NULL, NULL, 'Jacaraú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18410, 28, 'BR', NULL, NULL, 'Jericó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18411, 28, 'BR', NULL, NULL, 'João Pessoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18412, 28, 'BR', NULL, NULL, 'Juarez Távora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18413, 28, 'BR', NULL, NULL, 'Juazeirinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18414, 28, 'BR', NULL, NULL, 'Junco do Seridó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18415, 28, 'BR', NULL, NULL, 'Juripiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18416, 28, 'BR', NULL, NULL, 'Juru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18417, 28, 'BR', NULL, NULL, 'Lagoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18418, 28, 'BR', NULL, NULL, 'Lagoa Seca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18419, 28, 'BR', NULL, NULL, 'Lagoa de Dentro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18420, 28, 'BR', NULL, NULL, 'Lastro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18421, 28, 'BR', NULL, NULL, 'Lerolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18422, 28, 'BR', NULL, NULL, 'Livramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18423, 28, 'BR', NULL, NULL, 'Logradouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18424, 28, 'BR', NULL, NULL, 'Lucena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18425, 28, 'BR', NULL, NULL, 'Maia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18426, 28, 'BR', NULL, NULL, 'Malta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18427, 28, 'BR', NULL, NULL, 'Mamanguape')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18428, 28, 'BR', NULL, NULL, 'Manaíra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18429, 28, 'BR', NULL, NULL, 'Marcação')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18430, 28, 'BR', NULL, NULL, 'Mari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18431, 28, 'BR', NULL, NULL, 'Marizópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18432, 28, 'BR', NULL, NULL, 'Massaranduba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18433, 28, 'BR', NULL, NULL, 'Mata Limpa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18434, 28, 'BR', NULL, NULL, 'Mata Virgem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18435, 28, 'BR', NULL, NULL, 'Mataraca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18436, 28, 'BR', NULL, NULL, 'Matinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18437, 28, 'BR', NULL, NULL, 'Mato Grosso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18438, 28, 'BR', NULL, NULL, 'Maturéia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18439, 28, 'BR', NULL, NULL, 'Melo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18440, 28, 'BR', NULL, NULL, 'Mogeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18441, 28, 'BR', NULL, NULL, 'Montadas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18442, 28, 'BR', NULL, NULL, 'Monte Horebe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18443, 28, 'BR', NULL, NULL, 'Monteiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18444, 28, 'BR', NULL, NULL, 'Montevidéu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18445, 28, 'BR', NULL, NULL, 'Mulungu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18446, 28, 'BR', NULL, NULL, 'Muquém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18447, 28, 'BR', NULL, NULL, 'Mãe D''Água')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18448, 28, 'BR', NULL, NULL, 'Natuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18449, 28, 'BR', NULL, NULL, 'Nazarezinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18450, 28, 'BR', NULL, NULL, 'Nazaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18451, 28, 'BR', NULL, NULL, 'Nossa Senhora do Livramento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18452, 28, 'BR', NULL, NULL, 'Nova Floresta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18453, 28, 'BR', NULL, NULL, 'Nova Olinda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18454, 28, 'BR', NULL, NULL, 'Nova Palmeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18455, 28, 'BR', NULL, NULL, 'Núcleo N 2')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18456, 28, 'BR', NULL, NULL, 'Núcleo N 3')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18457, 28, 'BR', NULL, NULL, 'Odilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18458, 28, 'BR', NULL, NULL, 'Olho D''Água')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18459, 28, 'BR', NULL, NULL, 'Olivedos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18460, 28, 'BR', NULL, NULL, 'Ouro Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18461, 28, 'BR', NULL, NULL, 'Parari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18462, 28, 'BR', NULL, NULL, 'Passagem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18463, 28, 'BR', NULL, NULL, 'Patos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18464, 28, 'BR', NULL, NULL, 'Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18465, 28, 'BR', NULL, NULL, 'Pedra Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18466, 28, 'BR', NULL, NULL, 'Pedra Lavrada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18467, 28, 'BR', NULL, NULL, 'Pedras de Fogo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18468, 28, 'BR', NULL, NULL, 'Pedro Régis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18469, 28, 'BR', NULL, NULL, 'Pelo Sinal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18470, 28, 'BR', NULL, NULL, 'Pereiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18471, 28, 'BR', NULL, NULL, 'Piancó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18472, 28, 'BR', NULL, NULL, 'Picuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18473, 28, 'BR', NULL, NULL, 'Pilar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18474, 28, 'BR', NULL, NULL, 'Pilões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18475, 28, 'BR', NULL, NULL, 'Pilõezinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18476, 28, 'BR', NULL, NULL, 'Pindurão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18477, 28, 'BR', NULL, NULL, 'Pio X')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18478, 28, 'BR', NULL, NULL, 'Pirauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18479, 28, 'BR', NULL, NULL, 'Pirpirituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18480, 28, 'BR', NULL, NULL, 'Pitanga de Estrada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18481, 28, 'BR', NULL, NULL, 'Pitimbu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18482, 28, 'BR', NULL, NULL, 'Pocinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18483, 28, 'BR', NULL, NULL, 'Pombal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18484, 28, 'BR', NULL, NULL, 'Porteirinha de Pedra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18485, 28, 'BR', NULL, NULL, 'Poço Dantas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18486, 28, 'BR', NULL, NULL, 'Poço de José de Moura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18487, 28, 'BR', NULL, NULL, 'Prata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18488, 28, 'BR', NULL, NULL, 'Princesa Isabel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18489, 28, 'BR', NULL, NULL, 'Puxinanã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18490, 28, 'BR', NULL, NULL, 'Queimadas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18491, 28, 'BR', NULL, NULL, 'Quixabá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18492, 28, 'BR', NULL, NULL, 'Quixadá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18493, 28, 'BR', NULL, NULL, 'Remígio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18494, 28, 'BR', NULL, NULL, 'Riacho de Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18495, 28, 'BR', NULL, NULL, 'Riacho dos Cavalos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18496, 28, 'BR', NULL, NULL, 'Riachão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18497, 28, 'BR', NULL, NULL, 'Riachão do Bacamarte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18498, 28, 'BR', NULL, NULL, 'Riachão do Poço')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18499, 28, 'BR', NULL, NULL, 'Ribeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18500, 28, 'BR', NULL, NULL, 'Rio Tinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18501, 28, 'BR', NULL, NULL, 'Rua Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18502, 28, 'BR', NULL, NULL, 'Salema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18503, 28, 'BR', NULL, NULL, 'Salgadinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18504, 28, 'BR', NULL, NULL, 'Salgado de São Félix')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18505, 28, 'BR', NULL, NULL, 'Santa Cecília de Umbuzeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18506, 28, 'BR', NULL, NULL, 'Santa Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18507, 28, 'BR', NULL, NULL, 'Santa Gertrudes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18508, 28, 'BR', NULL, NULL, 'Santa Inês')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18509, 28, 'BR', NULL, NULL, 'Santa Luzia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18510, 28, 'BR', NULL, NULL, 'Santa Luzia do Cariri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18511, 28, 'BR', NULL, NULL, 'Santa Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18512, 28, 'BR', NULL, NULL, 'Santa Rita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18513, 28, 'BR', NULL, NULL, 'Santa Teresinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18514, 28, 'BR', NULL, NULL, 'Santa Terezinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18515, 28, 'BR', NULL, NULL, 'Santana de Mangueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18516, 28, 'BR', NULL, NULL, 'Santana dos Garrotes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18517, 28, 'BR', NULL, NULL, 'Santarém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18518, 28, 'BR', NULL, NULL, 'Santo André')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18519, 28, 'BR', NULL, NULL, 'Sapé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18520, 28, 'BR', NULL, NULL, 'Seridó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18521, 28, 'BR', NULL, NULL, 'Serra Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18522, 28, 'BR', NULL, NULL, 'Serra Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18523, 28, 'BR', NULL, NULL, 'Serra Redonda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18524, 28, 'BR', NULL, NULL, 'Serra da Raiz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18525, 28, 'BR', NULL, NULL, 'Serraria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18526, 28, 'BR', NULL, NULL, 'Sertãozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18527, 28, 'BR', NULL, NULL, 'Sobrado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18528, 28, 'BR', NULL, NULL, 'Soledade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18529, 28, 'BR', NULL, NULL, 'Solânea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18530, 28, 'BR', NULL, NULL, 'Sossego')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18531, 28, 'BR', NULL, NULL, 'Sousa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18532, 28, 'BR', NULL, NULL, 'Sucuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18533, 28, 'BR', NULL, NULL, 'Sumé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18534, 28, 'BR', NULL, NULL, 'São Bentinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18535, 28, 'BR', NULL, NULL, 'São Bento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18536, 28, 'BR', NULL, NULL, 'São Domingos de Pombal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18537, 28, 'BR', NULL, NULL, 'São Domingos do Cariri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18538, 28, 'BR', NULL, NULL, 'São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18539, 28, 'BR', NULL, NULL, 'São Gonçalo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18540, 28, 'BR', NULL, NULL, 'São José da Lagoa Tapada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18541, 28, 'BR', NULL, NULL, 'São José da Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18542, 28, 'BR', NULL, NULL, 'São José de Caiana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18543, 28, 'BR', NULL, NULL, 'São José de Espinharas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18544, 28, 'BR', NULL, NULL, 'São José de Marimbas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18545, 28, 'BR', NULL, NULL, 'São José de Piranhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18546, 28, 'BR', NULL, NULL, 'São José de Princesa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18547, 28, 'BR', NULL, NULL, 'São José do Bonfim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18548, 28, 'BR', NULL, NULL, 'São José do Brejo do Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18549, 28, 'BR', NULL, NULL, 'São José do Sabugi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18550, 28, 'BR', NULL, NULL, 'São José dos Cordeiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18551, 28, 'BR', NULL, NULL, 'São José dos Ramos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18552, 28, 'BR', NULL, NULL, 'São João Bosco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18553, 28, 'BR', NULL, NULL, 'São João do Cariri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18554, 28, 'BR', NULL, NULL, 'São João do Rio do Peixe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18555, 28, 'BR', NULL, NULL, 'São João do Tigre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18556, 28, 'BR', NULL, NULL, 'São Mamede')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18557, 28, 'BR', NULL, NULL, 'São Miguel de Taipu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18558, 28, 'BR', NULL, NULL, 'São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18559, 28, 'BR', NULL, NULL, 'São Sebastião de Lagoa de Roça')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18560, 28, 'BR', NULL, NULL, 'São Sebastião do Umbuzeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18561, 28, 'BR', NULL, NULL, 'São Vicente do Seridó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18562, 28, 'BR', NULL, NULL, 'Tambauzinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18563, 28, 'BR', NULL, NULL, 'Taperoá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18564, 28, 'BR', NULL, NULL, 'Tavares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18565, 28, 'BR', NULL, NULL, 'Teixeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18566, 28, 'BR', NULL, NULL, 'Tenório')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18567, 28, 'BR', NULL, NULL, 'Triunfo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18568, 28, 'BR', NULL, NULL, 'Uiraúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18569, 28, 'BR', NULL, NULL, 'Umari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18570, 28, 'BR', NULL, NULL, 'Umbuzeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18571, 28, 'BR', NULL, NULL, 'Vazante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18572, 28, 'BR', NULL, NULL, 'Vieirópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18573, 28, 'BR', NULL, NULL, 'Vista Serrana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18574, 28, 'BR', NULL, NULL, 'Várzea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18575, 28, 'BR', NULL, NULL, 'Várzea Comprida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18576, 28, 'BR', NULL, NULL, 'Várzea Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18577, 28, 'BR', NULL, NULL, 'Zabelê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18578, 28, 'BR', NULL, NULL, 'Água Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18579, 29, 'BR', NULL, NULL, 'Abreu e Lima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18580, 29, 'BR', NULL, NULL, 'Afogados da Ingazeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18581, 29, 'BR', NULL, NULL, 'Afrânio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18582, 29, 'BR', NULL, NULL, 'Agrestina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18583, 29, 'BR', NULL, NULL, 'Airi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18584, 29, 'BR', NULL, NULL, 'Alagoinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18585, 29, 'BR', NULL, NULL, 'Albuquerque Né')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18586, 29, 'BR', NULL, NULL, 'Algodões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18587, 29, 'BR', NULL, NULL, 'Aliança')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18588, 29, 'BR', NULL, NULL, 'Altinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18589, 29, 'BR', NULL, NULL, 'Amaraji')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18590, 29, 'BR', NULL, NULL, 'Ameixas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18591, 29, 'BR', NULL, NULL, 'Angelim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18592, 29, 'BR', NULL, NULL, 'Apoti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18593, 29, 'BR', NULL, NULL, 'Araripina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18594, 29, 'BR', NULL, NULL, 'Araçoiaba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18595, 29, 'BR', NULL, NULL, 'Arcoverde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18596, 29, 'BR', NULL, NULL, 'Aripibu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18597, 29, 'BR', NULL, NULL, 'Arizona')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18598, 29, 'BR', NULL, NULL, 'Barra de Farias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18599, 29, 'BR', NULL, NULL, 'Barra de Guabiraba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18600, 29, 'BR', NULL, NULL, 'Barra de São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18601, 29, 'BR', NULL, NULL, 'Barra do Brejo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18602, 29, 'BR', NULL, NULL, 'Barra do Chata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18603, 29, 'BR', NULL, NULL, 'Barra do Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18604, 29, 'BR', NULL, NULL, 'Barra do Riachão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18605, 29, 'BR', NULL, NULL, 'Barra do Sirinhaém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18606, 29, 'BR', NULL, NULL, 'Barreiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18607, 29, 'BR', NULL, NULL, 'Batateira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18608, 29, 'BR', NULL, NULL, 'Belo Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18609, 29, 'BR', NULL, NULL, 'Belém de Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18610, 29, 'BR', NULL, NULL, 'Belém de São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18611, 29, 'BR', NULL, NULL, 'Bengalas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18612, 29, 'BR', NULL, NULL, 'Bentivi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18613, 29, 'BR', NULL, NULL, 'Bernardo Vieira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18614, 29, 'BR', NULL, NULL, 'Betânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18615, 29, 'BR', NULL, NULL, 'Bezerros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18616, 29, 'BR', NULL, NULL, 'Bizarra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18617, 29, 'BR', NULL, NULL, 'Boas Novas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18618, 29, 'BR', NULL, NULL, 'Bodocó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18619, 29, 'BR', NULL, NULL, 'Bom Conselho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18620, 29, 'BR', NULL, NULL, 'Bom Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18621, 29, 'BR', NULL, NULL, 'Bom Nome')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18622, 29, 'BR', NULL, NULL, 'Bonfim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18623, 29, 'BR', NULL, NULL, 'Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18624, 29, 'BR', NULL, NULL, 'Brejinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18625, 29, 'BR', NULL, NULL, 'Brejo da Madre de Deus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18626, 29, 'BR', NULL, NULL, 'Brejão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18627, 29, 'BR', NULL, NULL, 'Buenos Aires')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18628, 29, 'BR', NULL, NULL, 'Buíque')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18629, 29, 'BR', NULL, NULL, 'Cabanas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18630, 29, 'BR', NULL, NULL, 'Cabo de Santo Agostinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18631, 29, 'BR', NULL, NULL, 'Cabrobó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18632, 29, 'BR', NULL, NULL, 'Cachoeira do Roberto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18633, 29, 'BR', NULL, NULL, 'Cachoeirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18634, 29, 'BR', NULL, NULL, 'Caetés')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18635, 29, 'BR', NULL, NULL, 'Caiçarinha da Penha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18636, 29, 'BR', NULL, NULL, 'Caldeirões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18637, 29, 'BR', NULL, NULL, 'Calumbi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18638, 29, 'BR', NULL, NULL, 'Calçado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18639, 29, 'BR', NULL, NULL, 'Camaragibe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18640, 29, 'BR', NULL, NULL, 'Camela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18641, 29, 'BR', NULL, NULL, 'Camocim de São Félix')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18642, 29, 'BR', NULL, NULL, 'Camutanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18643, 29, 'BR', NULL, NULL, 'Canaã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18644, 29, 'BR', NULL, NULL, 'Canhotinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18645, 29, 'BR', NULL, NULL, 'Capoeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18646, 29, 'BR', NULL, NULL, 'Caraibeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18647, 29, 'BR', NULL, NULL, 'Carapotos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18648, 29, 'BR', NULL, NULL, 'Caraíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18649, 29, 'BR', NULL, NULL, 'Carice')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18650, 29, 'BR', NULL, NULL, 'Carima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18651, 29, 'BR', NULL, NULL, 'Caririmirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18652, 29, 'BR', NULL, NULL, 'Carnaubeira da Penha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18653, 29, 'BR', NULL, NULL, 'Carnaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18654, 29, 'BR', NULL, NULL, 'Carneiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18655, 29, 'BR', NULL, NULL, 'Carpina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18656, 29, 'BR', NULL, NULL, 'Carqueja')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18657, 29, 'BR', NULL, NULL, 'Caruaru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18658, 29, 'BR', NULL, NULL, 'Casinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18659, 29, 'BR', NULL, NULL, 'Catende')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18660, 29, 'BR', NULL, NULL, 'Catimbaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18661, 29, 'BR', NULL, NULL, 'Catolé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18662, 29, 'BR', NULL, NULL, 'Cavaleiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18663, 29, 'BR', NULL, NULL, 'Cedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18664, 29, 'BR', NULL, NULL, 'Chã Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18665, 29, 'BR', NULL, NULL, 'Chã de Alegria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18666, 29, 'BR', NULL, NULL, 'Chã do Rocha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18667, 29, 'BR', NULL, NULL, 'Cimbres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18668, 29, 'BR', NULL, NULL, 'Clarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18669, 29, 'BR', NULL, NULL, 'Cocau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18670, 29, 'BR', NULL, NULL, 'Conceição das Crioulas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18671, 29, 'BR', NULL, NULL, 'Condado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18672, 29, 'BR', NULL, NULL, 'Correntes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18673, 29, 'BR', NULL, NULL, 'Cortês')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18674, 29, 'BR', NULL, NULL, 'Couro D''Antas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18675, 29, 'BR', NULL, NULL, 'Cristália')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18676, 29, 'BR', NULL, NULL, 'Cruanji')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18677, 29, 'BR', NULL, NULL, 'Cruzes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18678, 29, 'BR', NULL, NULL, 'Cuiambuca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18679, 29, 'BR', NULL, NULL, 'Cumaru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18680, 29, 'BR', NULL, NULL, 'Cupira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18681, 29, 'BR', NULL, NULL, 'Curral Queimado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18682, 29, 'BR', NULL, NULL, 'Custódia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18683, 29, 'BR', NULL, NULL, 'Dois Leões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18684, 29, 'BR', NULL, NULL, 'Dormentes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18685, 29, 'BR', NULL, NULL, 'Entroncamento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18686, 29, 'BR', NULL, NULL, 'Escada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18687, 29, 'BR', NULL, NULL, 'Espírito Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18688, 29, 'BR', NULL, NULL, 'Exu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18689, 29, 'BR', NULL, NULL, 'Fazenda Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18690, 29, 'BR', NULL, NULL, 'Feira Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18691, 29, 'BR', NULL, NULL, 'Feitoria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18692, 29, 'BR', NULL, NULL, 'Fernando de Noronha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18693, 29, 'BR', NULL, NULL, 'Ferreiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18694, 29, 'BR', NULL, NULL, 'Flores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18695, 29, 'BR', NULL, NULL, 'Floresta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18696, 29, 'BR', NULL, NULL, 'Frei Miguelinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18697, 29, 'BR', NULL, NULL, 'Frexeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18698, 29, 'BR', NULL, NULL, 'Gameleira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18699, 29, 'BR', NULL, NULL, 'Garanhuns')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18700, 29, 'BR', NULL, NULL, 'Glória do Goitá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18701, 29, 'BR', NULL, NULL, 'Goiana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18702, 29, 'BR', NULL, NULL, 'Gonçalves Ferreira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18703, 29, 'BR', NULL, NULL, 'Granito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18704, 29, 'BR', NULL, NULL, 'Gravatá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18705, 29, 'BR', NULL, NULL, 'Gravatá do Ibiapina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18706, 29, 'BR', NULL, NULL, 'Grotão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18707, 29, 'BR', NULL, NULL, 'Guanumbi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18708, 29, 'BR', NULL, NULL, 'Henrique Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18709, 29, 'BR', NULL, NULL, 'Iateca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18710, 29, 'BR', NULL, NULL, 'Iati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18711, 29, 'BR', NULL, NULL, 'Ibimirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18712, 29, 'BR', NULL, NULL, 'Ibirajuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18713, 29, 'BR', NULL, NULL, 'Ibiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18714, 29, 'BR', NULL, NULL, 'Ibiratinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18715, 29, 'BR', NULL, NULL, 'Ibitiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18716, 29, 'BR', NULL, NULL, 'Ibó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18717, 29, 'BR', NULL, NULL, 'Icaiçara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18718, 29, 'BR', NULL, NULL, 'Igapó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18719, 29, 'BR', NULL, NULL, 'Igarapeassu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18720, 29, 'BR', NULL, NULL, 'Igarapeba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18721, 29, 'BR', NULL, NULL, 'Igarassu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18722, 29, 'BR', NULL, NULL, 'Iguaraci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18723, 29, 'BR', NULL, NULL, 'Ilha de Itamaracá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18724, 29, 'BR', NULL, NULL, 'Inajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18725, 29, 'BR', NULL, NULL, 'Ingazeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18726, 29, 'BR', NULL, NULL, 'Ipojuca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18727, 29, 'BR', NULL, NULL, 'Ipubi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18728, 29, 'BR', NULL, NULL, 'Ipuera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18729, 29, 'BR', NULL, NULL, 'Iraguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18730, 29, 'BR', NULL, NULL, 'Irajaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18731, 29, 'BR', NULL, NULL, 'Iratama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18732, 29, 'BR', NULL, NULL, 'Itacuruba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18733, 29, 'BR', NULL, NULL, 'Itambé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18734, 29, 'BR', NULL, NULL, 'Itapetim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18735, 29, 'BR', NULL, NULL, 'Itapissuma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18736, 29, 'BR', NULL, NULL, 'Itaquitinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18737, 29, 'BR', NULL, NULL, 'Itaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18738, 29, 'BR', NULL, NULL, 'Ituguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18739, 29, 'BR', NULL, NULL, 'Iuiteporã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18740, 29, 'BR', NULL, NULL, 'Jabitaca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18741, 29, 'BR', NULL, NULL, 'Jaboatão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18742, 29, 'BR', NULL, NULL, 'Jaboatão dos Guararapes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18743, 29, 'BR', NULL, NULL, 'Japecanga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18744, 29, 'BR', NULL, NULL, 'Jaqueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18745, 29, 'BR', NULL, NULL, 'Jataúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18746, 29, 'BR', NULL, NULL, 'Jatiúca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18747, 29, 'BR', NULL, NULL, 'Jatobá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18748, 29, 'BR', NULL, NULL, 'Jenipapo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18749, 29, 'BR', NULL, NULL, 'Joaquim Nabuco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18750, 29, 'BR', NULL, NULL, 'José Mariano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18751, 29, 'BR', NULL, NULL, 'José da Costa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18752, 29, 'BR', NULL, NULL, 'João Alfredo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18753, 29, 'BR', NULL, NULL, 'Jucati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18754, 29, 'BR', NULL, NULL, 'Jupi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18755, 29, 'BR', NULL, NULL, 'Jurema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18756, 29, 'BR', NULL, NULL, 'Jutaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18757, 29, 'BR', NULL, NULL, 'Juçaral')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18758, 29, 'BR', NULL, NULL, 'Lagoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18759, 29, 'BR', NULL, NULL, 'Lagoa Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18760, 29, 'BR', NULL, NULL, 'Lagoa de São José')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18761, 29, 'BR', NULL, NULL, 'Lagoa do Barro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18762, 29, 'BR', NULL, NULL, 'Lagoa do Carro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18763, 29, 'BR', NULL, NULL, 'Lagoa do Itaenga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18764, 29, 'BR', NULL, NULL, 'Lagoa do Ouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18765, 29, 'BR', NULL, NULL, 'Lagoa do Souza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18766, 29, 'BR', NULL, NULL, 'Lagoa dos Gatos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18767, 29, 'BR', NULL, NULL, 'Laje Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18768, 29, 'BR', NULL, NULL, 'Laje de São José')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18769, 29, 'BR', NULL, NULL, 'Lajedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18770, 29, 'BR', NULL, NULL, 'Lajedo do Cedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18771, 29, 'BR', NULL, NULL, 'Limoeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18772, 29, 'BR', NULL, NULL, 'Livramento do Tiúma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18773, 29, 'BR', NULL, NULL, 'Luanda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18774, 29, 'BR', NULL, NULL, 'Macaparana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18775, 29, 'BR', NULL, NULL, 'Machados')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18776, 29, 'BR', NULL, NULL, 'Macujé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18777, 29, 'BR', NULL, NULL, 'Manari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18778, 29, 'BR', NULL, NULL, 'Mandacaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18779, 29, 'BR', NULL, NULL, 'Mandacaru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18780, 29, 'BR', NULL, NULL, 'Maniçoba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18781, 29, 'BR', NULL, NULL, 'Maraial')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18782, 29, 'BR', NULL, NULL, 'Maravilha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18783, 29, 'BR', NULL, NULL, 'Mimoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18784, 29, 'BR', NULL, NULL, 'Miracica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18785, 29, 'BR', NULL, NULL, 'Mirandiba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18786, 29, 'BR', NULL, NULL, 'Morais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18787, 29, 'BR', NULL, NULL, 'Moreilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18788, 29, 'BR', NULL, NULL, 'Moreno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18789, 29, 'BR', NULL, NULL, 'Moxotó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18790, 29, 'BR', NULL, NULL, 'Mulungu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18791, 29, 'BR', NULL, NULL, 'Murupé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18792, 29, 'BR', NULL, NULL, 'Mutuca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18793, 29, 'BR', NULL, NULL, 'Nascente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18794, 29, 'BR', NULL, NULL, 'Navarro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18795, 29, 'BR', NULL, NULL, 'Nazaré da Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18796, 29, 'BR', NULL, NULL, 'Negras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18797, 29, 'BR', NULL, NULL, 'Nossa Senhora da Luz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18798, 29, 'BR', NULL, NULL, 'Nossa Senhora do Carmo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18799, 29, 'BR', NULL, NULL, 'Nossa Senhora do Ó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18800, 29, 'BR', NULL, NULL, 'Nova Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18801, 29, 'BR', NULL, NULL, 'Olho D''Água de Dentro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18802, 29, 'BR', NULL, NULL, 'Olinda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18803, 29, 'BR', NULL, NULL, 'Oratório')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18804, 29, 'BR', NULL, NULL, 'Ori')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18805, 29, 'BR', NULL, NULL, 'Orobó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18806, 29, 'BR', NULL, NULL, 'Orocó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18807, 29, 'BR', NULL, NULL, 'Ouricuri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18808, 29, 'BR', NULL, NULL, 'Pajeú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18809, 29, 'BR', NULL, NULL, 'Palmares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18810, 29, 'BR', NULL, NULL, 'Palmeirina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18811, 29, 'BR', NULL, NULL, 'Panelas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18812, 29, 'BR', NULL, NULL, 'Papagaio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18813, 29, 'BR', NULL, NULL, 'Paquevira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18814, 29, 'BR', NULL, NULL, 'Paranatama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18815, 29, 'BR', NULL, NULL, 'Paratibe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18816, 29, 'BR', NULL, NULL, 'Parnamirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18817, 29, 'BR', NULL, NULL, 'Pará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18818, 29, 'BR', NULL, NULL, 'Passagem do Tó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18819, 29, 'BR', NULL, NULL, 'Passira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18820, 29, 'BR', NULL, NULL, 'Pau Ferro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18821, 29, 'BR', NULL, NULL, 'Paudalho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18822, 29, 'BR', NULL, NULL, 'Paulista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18823, 29, 'BR', NULL, NULL, 'Pedra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18824, 29, 'BR', NULL, NULL, 'Perpétuo Socorro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18825, 29, 'BR', NULL, NULL, 'Pesqueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18826, 29, 'BR', NULL, NULL, 'Petrolina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18827, 29, 'BR', NULL, NULL, 'Petrolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18828, 29, 'BR', NULL, NULL, 'Pirituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18829, 29, 'BR', NULL, NULL, 'Pombos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18830, 29, 'BR', NULL, NULL, 'Pontas de Pedra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18831, 29, 'BR', NULL, NULL, 'Ponte dos Carvalhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18832, 29, 'BR', NULL, NULL, 'Poço Comprido')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18833, 29, 'BR', NULL, NULL, 'Poço Fundo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18834, 29, 'BR', NULL, NULL, 'Poção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18835, 29, 'BR', NULL, NULL, 'Poção de Afrânio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18836, 29, 'BR', NULL, NULL, 'Praia da Conceição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18837, 29, 'BR', NULL, NULL, 'Primavera')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18838, 29, 'BR', NULL, NULL, 'Pão de Açúcar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18839, 29, 'BR', NULL, NULL, 'Pão de Açúcar do Poção')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18840, 29, 'BR', NULL, NULL, 'Quipapá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18841, 29, 'BR', NULL, NULL, 'Quitimbu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18842, 29, 'BR', NULL, NULL, 'Quixabá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18843, 29, 'BR', NULL, NULL, 'Rainha Isabel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18844, 29, 'BR', NULL, NULL, 'Rajada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18845, 29, 'BR', NULL, NULL, 'Rancharia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18846, 29, 'BR', NULL, NULL, 'Recife')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18847, 29, 'BR', NULL, NULL, 'Riacho Fechado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18848, 29, 'BR', NULL, NULL, 'Riacho Pequeno')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18849, 29, 'BR', NULL, NULL, 'Riacho das Almas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18850, 29, 'BR', NULL, NULL, 'Riacho do Meio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18851, 29, 'BR', NULL, NULL, 'Ribeirão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18852, 29, 'BR', NULL, NULL, 'Rio Formoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18853, 29, 'BR', NULL, NULL, 'Rio da Barra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18854, 29, 'BR', NULL, NULL, 'Sairé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18855, 29, 'BR', NULL, NULL, 'Salgadinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18856, 29, 'BR', NULL, NULL, 'Salgueiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18857, 29, 'BR', NULL, NULL, 'Salobro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18858, 29, 'BR', NULL, NULL, 'Saloá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18859, 29, 'BR', NULL, NULL, 'Sanharó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18860, 29, 'BR', NULL, NULL, 'Santa Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18861, 29, 'BR', NULL, NULL, 'Santa Cruz da Baixa Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18862, 29, 'BR', NULL, NULL, 'Santa Cruz do Capibaribe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18863, 29, 'BR', NULL, NULL, 'Santa Filomena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18864, 29, 'BR', NULL, NULL, 'Santa Maria da Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18865, 29, 'BR', NULL, NULL, 'Santa Maria do Cambucá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18866, 29, 'BR', NULL, NULL, 'Santa Rita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18867, 29, 'BR', NULL, NULL, 'Santa Terezinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18868, 29, 'BR', NULL, NULL, 'Santana de São Joaquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18869, 29, 'BR', NULL, NULL, 'Santo Agostinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18870, 29, 'BR', NULL, NULL, 'Santo Antônio das Queimadas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18871, 29, 'BR', NULL, NULL, 'Santo Antônio dos Palmares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18872, 29, 'BR', NULL, NULL, 'Sapucarana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18873, 29, 'BR', NULL, NULL, 'Saué')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18874, 29, 'BR', NULL, NULL, 'Serra Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18875, 29, 'BR', NULL, NULL, 'Serra Talhada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18876, 29, 'BR', NULL, NULL, 'Serra do Vento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18877, 29, 'BR', NULL, NULL, 'Serrita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18878, 29, 'BR', NULL, NULL, 'Serrolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18879, 29, 'BR', NULL, NULL, 'Sertânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18880, 29, 'BR', NULL, NULL, 'Sertãozinho de Baixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18881, 29, 'BR', NULL, NULL, 'Siriji')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18882, 29, 'BR', NULL, NULL, 'Sirinhaém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18883, 29, 'BR', NULL, NULL, 'Solidão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18884, 29, 'BR', NULL, NULL, 'Surubim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18885, 29, 'BR', NULL, NULL, 'São Benedito do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18886, 29, 'BR', NULL, NULL, 'São Bento do Una')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18887, 29, 'BR', NULL, NULL, 'São Caetano do Navio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18888, 29, 'BR', NULL, NULL, 'São Caitano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18889, 29, 'BR', NULL, NULL, 'São Domingos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18890, 29, 'BR', NULL, NULL, 'São Joaquim do Monte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18891, 29, 'BR', NULL, NULL, 'São José da Coroa Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18892, 29, 'BR', NULL, NULL, 'São José do Belmonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18893, 29, 'BR', NULL, NULL, 'São José do Egito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18894, 29, 'BR', NULL, NULL, 'São João')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18895, 29, 'BR', NULL, NULL, 'São Lourenço da Mata')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18896, 29, 'BR', NULL, NULL, 'São Lázaro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18897, 29, 'BR', NULL, NULL, 'São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18898, 29, 'BR', NULL, NULL, 'São Vicente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18899, 29, 'BR', NULL, NULL, 'São Vicente Ferrer')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18900, 29, 'BR', NULL, NULL, 'Sítio dos Nunes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18901, 29, 'BR', NULL, NULL, 'Tabira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18902, 29, 'BR', NULL, NULL, 'Tabocas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18903, 29, 'BR', NULL, NULL, 'Tacaimbó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18904, 29, 'BR', NULL, NULL, 'Tacaratu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18905, 29, 'BR', NULL, NULL, 'Tamandaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18906, 29, 'BR', NULL, NULL, 'Tamboatá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18907, 29, 'BR', NULL, NULL, 'Tapiraim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18908, 29, 'BR', NULL, NULL, 'Taquaritinga do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18909, 29, 'BR', NULL, NULL, 'Tara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18910, 29, 'BR', NULL, NULL, 'Tauapiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18911, 29, 'BR', NULL, NULL, 'Tejucupapo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18912, 29, 'BR', NULL, NULL, 'Terezinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18913, 29, 'BR', NULL, NULL, 'Terra Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18914, 29, 'BR', NULL, NULL, 'Timbaúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18915, 29, 'BR', NULL, NULL, 'Timorante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18916, 29, 'BR', NULL, NULL, 'Toritama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18917, 29, 'BR', NULL, NULL, 'Tracunhaém')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18918, 29, 'BR', NULL, NULL, 'Trapiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18919, 29, 'BR', NULL, NULL, 'Trindade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18920, 29, 'BR', NULL, NULL, 'Triunfo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18921, 29, 'BR', NULL, NULL, 'Três Ladeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18922, 29, 'BR', NULL, NULL, 'Tupanaci')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18923, 29, 'BR', NULL, NULL, 'Tupanatinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18924, 29, 'BR', NULL, NULL, 'Tuparetama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18925, 29, 'BR', NULL, NULL, 'Tupaóca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18926, 29, 'BR', NULL, NULL, 'Umburetama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18927, 29, 'BR', NULL, NULL, 'Umãs')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18928, 29, 'BR', NULL, NULL, 'Upatininga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18929, 29, 'BR', NULL, NULL, 'Urimama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18930, 29, 'BR', NULL, NULL, 'Urucubá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18931, 29, 'BR', NULL, NULL, 'Uruçu-Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18932, 29, 'BR', NULL, NULL, 'Vasques')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18933, 29, 'BR', NULL, NULL, 'Veneza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18934, 29, 'BR', NULL, NULL, 'Venturosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18935, 29, 'BR', NULL, NULL, 'Verdejante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18936, 29, 'BR', NULL, NULL, 'Vertente do Lério')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18937, 29, 'BR', NULL, NULL, 'Vertentes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18938, 29, 'BR', NULL, NULL, 'Vicência')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18939, 29, 'BR', NULL, NULL, 'Vila Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18940, 29, 'BR', NULL, NULL, 'Viração')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18941, 29, 'BR', NULL, NULL, 'Vitória de Santo Antão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18942, 29, 'BR', NULL, NULL, 'Volta do Moxotó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18943, 29, 'BR', NULL, NULL, 'Xexéu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18944, 29, 'BR', NULL, NULL, 'Xucuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18945, 29, 'BR', NULL, NULL, 'Zé Gomes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18946, 29, 'BR', NULL, NULL, 'Água Fria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18947, 29, 'BR', NULL, NULL, 'Água Preta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18948, 29, 'BR', NULL, NULL, 'Águas Belas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18949, 30, 'BR', NULL, NULL, 'Acauã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18950, 30, 'BR', NULL, NULL, 'Agricolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18951, 30, 'BR', NULL, NULL, 'Alagoinha do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18952, 30, 'BR', NULL, NULL, 'Alegrete do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18953, 30, 'BR', NULL, NULL, 'Alto Longá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18954, 30, 'BR', NULL, NULL, 'Altos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18955, 30, 'BR', NULL, NULL, 'Alvorada do Gurguéia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18956, 30, 'BR', NULL, NULL, 'Amarante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18957, 30, 'BR', NULL, NULL, 'Angical do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18958, 30, 'BR', NULL, NULL, 'Antônio Almeida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18959, 30, 'BR', NULL, NULL, 'Anísio de Abreu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18960, 30, 'BR', NULL, NULL, 'Aroazes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18961, 30, 'BR', NULL, NULL, 'Aroeiras do Itaim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18962, 30, 'BR', NULL, NULL, 'Arraial')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18963, 30, 'BR', NULL, NULL, 'Assunção do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18964, 30, 'BR', NULL, NULL, 'Avelino Lopes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18965, 30, 'BR', NULL, NULL, 'Baixa Grande do Ribeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18966, 30, 'BR', NULL, NULL, 'Barra D''Alcântara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18967, 30, 'BR', NULL, NULL, 'Barras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18968, 30, 'BR', NULL, NULL, 'Barreiras do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18969, 30, 'BR', NULL, NULL, 'Barro Duro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18970, 30, 'BR', NULL, NULL, 'Batalha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18971, 30, 'BR', NULL, NULL, 'Bela Vista do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18972, 30, 'BR', NULL, NULL, 'Belém do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18973, 30, 'BR', NULL, NULL, 'Beneditinos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18974, 30, 'BR', NULL, NULL, 'Bertolínia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18975, 30, 'BR', NULL, NULL, 'Betânia do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18976, 30, 'BR', NULL, NULL, 'Boa Hora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18977, 30, 'BR', NULL, NULL, 'Bocaina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18978, 30, 'BR', NULL, NULL, 'Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18979, 30, 'BR', NULL, NULL, 'Bom Princípio do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18980, 30, 'BR', NULL, NULL, 'Bonfim do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18981, 30, 'BR', NULL, NULL, 'Boqueirão do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18982, 30, 'BR', NULL, NULL, 'Brasileira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18983, 30, 'BR', NULL, NULL, 'Brejo do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18984, 30, 'BR', NULL, NULL, 'Buriti dos Lopes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18985, 30, 'BR', NULL, NULL, 'Buriti dos Montes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18986, 30, 'BR', NULL, NULL, 'Cabeceiras do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18987, 30, 'BR', NULL, NULL, 'Cajazeiras do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18988, 30, 'BR', NULL, NULL, 'Cajueiro da Praia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18989, 30, 'BR', NULL, NULL, 'Caldeirão Grande do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18990, 30, 'BR', NULL, NULL, 'Campinas do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18991, 30, 'BR', NULL, NULL, 'Campo Alegre do Fidalgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18992, 30, 'BR', NULL, NULL, 'Campo Grande do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18993, 30, 'BR', NULL, NULL, 'Campo Largo do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18994, 30, 'BR', NULL, NULL, 'Campo Maior')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18995, 30, 'BR', NULL, NULL, 'Canavieira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18996, 30, 'BR', NULL, NULL, 'Canto do Buriti')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18997, 30, 'BR', NULL, NULL, 'Capitão Gervásio Oliveira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18998, 30, 'BR', NULL, NULL, 'Capitão de Campos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (18999, 30, 'BR', NULL, NULL, 'Caracol')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19000, 30, 'BR', NULL, NULL, 'Caraúbas do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19001, 30, 'BR', NULL, NULL, 'Caridade do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19002, 30, 'BR', NULL, NULL, 'Castelo do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19003, 30, 'BR', NULL, NULL, 'Caxingó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19004, 30, 'BR', NULL, NULL, 'Cocal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19005, 30, 'BR', NULL, NULL, 'Cocal de Telha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19006, 30, 'BR', NULL, NULL, 'Cocal dos Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19007, 30, 'BR', NULL, NULL, 'Coivaras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19008, 30, 'BR', NULL, NULL, 'Colônia do Gurguéia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19009, 30, 'BR', NULL, NULL, 'Colônia do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19010, 30, 'BR', NULL, NULL, 'Conceição do Canindé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19011, 30, 'BR', NULL, NULL, 'Coronel José Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19012, 30, 'BR', NULL, NULL, 'Corrente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19013, 30, 'BR', NULL, NULL, 'Cristalândia do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19014, 30, 'BR', NULL, NULL, 'Cristino Castro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19015, 30, 'BR', NULL, NULL, 'Curimatá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19016, 30, 'BR', NULL, NULL, 'Currais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19017, 30, 'BR', NULL, NULL, 'Curral Novo do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19018, 30, 'BR', NULL, NULL, 'Curralinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19019, 30, 'BR', NULL, NULL, 'Demerval Lobão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19020, 30, 'BR', NULL, NULL, 'Dirceu Arcoverde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19021, 30, 'BR', NULL, NULL, 'Dom Expedito Lopes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19022, 30, 'BR', NULL, NULL, 'Dom Inocêncio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19023, 30, 'BR', NULL, NULL, 'Domingos Mourão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19024, 30, 'BR', NULL, NULL, 'Elesbão Veloso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19025, 30, 'BR', NULL, NULL, 'Eliseu Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19026, 30, 'BR', NULL, NULL, 'Esperantina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19027, 30, 'BR', NULL, NULL, 'Fartura do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19028, 30, 'BR', NULL, NULL, 'Flores do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19029, 30, 'BR', NULL, NULL, 'Floresta do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19030, 30, 'BR', NULL, NULL, 'Floriano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19031, 30, 'BR', NULL, NULL, 'Francinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19032, 30, 'BR', NULL, NULL, 'Francisco Ayres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19033, 30, 'BR', NULL, NULL, 'Francisco Macedo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19034, 30, 'BR', NULL, NULL, 'Francisco Santos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19035, 30, 'BR', NULL, NULL, 'Fronteiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19036, 30, 'BR', NULL, NULL, 'Geminiano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19037, 30, 'BR', NULL, NULL, 'Gilbués')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19038, 30, 'BR', NULL, NULL, 'Guadalupe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19039, 30, 'BR', NULL, NULL, 'Guaribas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19040, 30, 'BR', NULL, NULL, 'Hugo Napoleão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19041, 30, 'BR', NULL, NULL, 'Ilha Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19042, 30, 'BR', NULL, NULL, 'Inhuma')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19043, 30, 'BR', NULL, NULL, 'Ipiranga do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19044, 30, 'BR', NULL, NULL, 'Isaías Coelho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19045, 30, 'BR', NULL, NULL, 'Itainópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19046, 30, 'BR', NULL, NULL, 'Itaueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19047, 30, 'BR', NULL, NULL, 'Jacobina do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19048, 30, 'BR', NULL, NULL, 'Jaicós')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19049, 30, 'BR', NULL, NULL, 'Jardim do Mulato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19050, 30, 'BR', NULL, NULL, 'Jatobá do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19051, 30, 'BR', NULL, NULL, 'Jerumenha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19052, 30, 'BR', NULL, NULL, 'Joaquim Pires')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19053, 30, 'BR', NULL, NULL, 'Joca Marques')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19054, 30, 'BR', NULL, NULL, 'José de Freitas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19055, 30, 'BR', NULL, NULL, 'João Costa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19056, 30, 'BR', NULL, NULL, 'Juazeiro do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19057, 30, 'BR', NULL, NULL, 'Jurema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19058, 30, 'BR', NULL, NULL, 'Júlio Borges')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19059, 30, 'BR', NULL, NULL, 'Lagoa Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19060, 30, 'BR', NULL, NULL, 'Lagoa de São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19061, 30, 'BR', NULL, NULL, 'Lagoa do Barro do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19062, 30, 'BR', NULL, NULL, 'Lagoa do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19063, 30, 'BR', NULL, NULL, 'Lagoa do Sítio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19064, 30, 'BR', NULL, NULL, 'Lagoinha do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19065, 30, 'BR', NULL, NULL, 'Landri Sales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19066, 30, 'BR', NULL, NULL, 'Luzilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19067, 30, 'BR', NULL, NULL, 'Luís Correia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19068, 30, 'BR', NULL, NULL, 'Madeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19069, 30, 'BR', NULL, NULL, 'Manoel Emídio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19070, 30, 'BR', NULL, NULL, 'Marcolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19071, 30, 'BR', NULL, NULL, 'Marcos Parente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19072, 30, 'BR', NULL, NULL, 'Massapê do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19073, 30, 'BR', NULL, NULL, 'Matias Olímpio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19074, 30, 'BR', NULL, NULL, 'Miguel Alves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19075, 30, 'BR', NULL, NULL, 'Miguel Leão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19076, 30, 'BR', NULL, NULL, 'Milton Brandão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19077, 30, 'BR', NULL, NULL, 'Monsenhor Gil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19078, 30, 'BR', NULL, NULL, 'Monsenhor Hipólito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19079, 30, 'BR', NULL, NULL, 'Monte Alegre do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19080, 30, 'BR', NULL, NULL, 'Morro Cabeça no Tempo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19081, 30, 'BR', NULL, NULL, 'Morro do Chapéu do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19082, 30, 'BR', NULL, NULL, 'Murici dos Portelas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19083, 30, 'BR', NULL, NULL, 'Nazaré do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19084, 30, 'BR', NULL, NULL, 'Nossa Senhora de Nazaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19085, 30, 'BR', NULL, NULL, 'Nossa Senhora dos Remédios')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19086, 30, 'BR', NULL, NULL, 'Nova Santa Rita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19087, 30, 'BR', NULL, NULL, 'Novo Nilo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19088, 30, 'BR', NULL, NULL, 'Novo Oriente do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19089, 30, 'BR', NULL, NULL, 'Novo Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19090, 30, 'BR', NULL, NULL, 'Oeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19091, 30, 'BR', NULL, NULL, 'Olho D''Água do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19092, 30, 'BR', NULL, NULL, 'Padre Marcos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19093, 30, 'BR', NULL, NULL, 'Paes Landim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19094, 30, 'BR', NULL, NULL, 'Pajeú do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19095, 30, 'BR', NULL, NULL, 'Palmeira do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19096, 30, 'BR', NULL, NULL, 'Palmeirais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19097, 30, 'BR', NULL, NULL, 'Paquetá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19098, 30, 'BR', NULL, NULL, 'Parnaguá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19099, 30, 'BR', NULL, NULL, 'Parnaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19100, 30, 'BR', NULL, NULL, 'Passagem Franca do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19101, 30, 'BR', NULL, NULL, 'Patos do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19102, 30, 'BR', NULL, NULL, 'Pau D''Arco do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19103, 30, 'BR', NULL, NULL, 'Paulistana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19104, 30, 'BR', NULL, NULL, 'Pavussu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19105, 30, 'BR', NULL, NULL, 'Pedro II')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19106, 30, 'BR', NULL, NULL, 'Pedro Laurentino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19107, 30, 'BR', NULL, NULL, 'Picos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19108, 30, 'BR', NULL, NULL, 'Pimenteiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19109, 30, 'BR', NULL, NULL, 'Pio IX')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19110, 30, 'BR', NULL, NULL, 'Piracuruca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19111, 30, 'BR', NULL, NULL, 'Piripiri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19112, 30, 'BR', NULL, NULL, 'Porto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19113, 30, 'BR', NULL, NULL, 'Porto Alegre do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19114, 30, 'BR', NULL, NULL, 'Prata do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19115, 30, 'BR', NULL, NULL, 'Queimada Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19116, 30, 'BR', NULL, NULL, 'Redenção do Gurguéia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19117, 30, 'BR', NULL, NULL, 'Regeneração')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19118, 30, 'BR', NULL, NULL, 'Riacho Frio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19119, 30, 'BR', NULL, NULL, 'Ribeira do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19120, 30, 'BR', NULL, NULL, 'Ribeiro Gonçalves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19121, 30, 'BR', NULL, NULL, 'Rio Grande do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19122, 30, 'BR', NULL, NULL, 'Santa Cruz do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19123, 30, 'BR', NULL, NULL, 'Santa Cruz dos Milagres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19124, 30, 'BR', NULL, NULL, 'Santa Filomena')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19125, 30, 'BR', NULL, NULL, 'Santa Luz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19126, 30, 'BR', NULL, NULL, 'Santa Rosa do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19127, 30, 'BR', NULL, NULL, 'Santana do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19128, 30, 'BR', NULL, NULL, 'Santo Antônio de Lisboa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19129, 30, 'BR', NULL, NULL, 'Santo Antônio dos Milagres')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19130, 30, 'BR', NULL, NULL, 'Santo Inácio do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19131, 30, 'BR', NULL, NULL, 'Sebastião Barros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19132, 30, 'BR', NULL, NULL, 'Sebastião Leal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19133, 30, 'BR', NULL, NULL, 'Sigefredo Pacheco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19134, 30, 'BR', NULL, NULL, 'Simplício Mendes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19135, 30, 'BR', NULL, NULL, 'Simões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19136, 30, 'BR', NULL, NULL, 'Socorro do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19137, 30, 'BR', NULL, NULL, 'Sussuapara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19138, 30, 'BR', NULL, NULL, 'São Braz do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19139, 30, 'BR', NULL, NULL, 'São Francisco de Assis do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19140, 30, 'BR', NULL, NULL, 'São Francisco do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19141, 30, 'BR', NULL, NULL, 'São Félix do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19142, 30, 'BR', NULL, NULL, 'São Gonçalo do Gurguéia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19143, 30, 'BR', NULL, NULL, 'São Gonçalo do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19144, 30, 'BR', NULL, NULL, 'São José do Divino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19145, 30, 'BR', NULL, NULL, 'São José do Peixe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19146, 30, 'BR', NULL, NULL, 'São José do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19147, 30, 'BR', NULL, NULL, 'São João da Canabrava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19148, 30, 'BR', NULL, NULL, 'São João da Fronteira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19149, 30, 'BR', NULL, NULL, 'São João da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19150, 30, 'BR', NULL, NULL, 'São João da Varjota')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19151, 30, 'BR', NULL, NULL, 'São João do Arraial')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19152, 30, 'BR', NULL, NULL, 'São João do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19153, 30, 'BR', NULL, NULL, 'São Julião')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19154, 30, 'BR', NULL, NULL, 'São Lourenço do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19155, 30, 'BR', NULL, NULL, 'São Luís do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19156, 30, 'BR', NULL, NULL, 'São Miguel da Baixa Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19157, 30, 'BR', NULL, NULL, 'São Miguel do Fidalgo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19158, 30, 'BR', NULL, NULL, 'São Miguel do Tapuio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19159, 30, 'BR', NULL, NULL, 'São Pedro do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19160, 30, 'BR', NULL, NULL, 'São Raimundo Nonato')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19161, 30, 'BR', NULL, NULL, 'Tamboril do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19162, 30, 'BR', NULL, NULL, 'Tanque do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19163, 30, 'BR', NULL, NULL, 'Teresina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19164, 30, 'BR', NULL, NULL, 'União')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19165, 30, 'BR', NULL, NULL, 'Uruçuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19166, 30, 'BR', NULL, NULL, 'Valença do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19167, 30, 'BR', NULL, NULL, 'Vera Mendes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19168, 30, 'BR', NULL, NULL, 'Vila Nova do Piauí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19169, 30, 'BR', NULL, NULL, 'Várzea Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19170, 30, 'BR', NULL, NULL, 'Várzea Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19171, 30, 'BR', NULL, NULL, 'Wall Ferraz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19172, 30, 'BR', NULL, NULL, 'Água Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19173, 31, 'BR', NULL, NULL, 'Acari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19174, 31, 'BR', NULL, NULL, 'Afonso Bezerra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19175, 31, 'BR', NULL, NULL, 'Alexandria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19176, 31, 'BR', NULL, NULL, 'Almino Afonso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19177, 31, 'BR', NULL, NULL, 'Alto do Rodrigues')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19178, 31, 'BR', NULL, NULL, 'Angicos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19179, 31, 'BR', NULL, NULL, 'Antônio Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19180, 31, 'BR', NULL, NULL, 'Apodi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19181, 31, 'BR', NULL, NULL, 'Areia Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19182, 31, 'BR', NULL, NULL, 'Arez')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19183, 31, 'BR', NULL, NULL, 'Açu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19184, 31, 'BR', NULL, NULL, 'Baraúna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19185, 31, 'BR', NULL, NULL, 'Barcelona')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19186, 31, 'BR', NULL, NULL, 'Barão de Serra Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19187, 31, 'BR', NULL, NULL, 'Baía Formosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19188, 31, 'BR', NULL, NULL, 'Belo Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19189, 31, 'BR', NULL, NULL, 'Bento Fernandes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19190, 31, 'BR', NULL, NULL, 'Boa Saúde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19191, 31, 'BR', NULL, NULL, 'Bodó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19192, 31, 'BR', NULL, NULL, 'Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19193, 31, 'BR', NULL, NULL, 'Brejinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19194, 31, 'BR', NULL, NULL, 'Caicó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19195, 31, 'BR', NULL, NULL, 'Caiçara do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19196, 31, 'BR', NULL, NULL, 'Caiçara do Rio do Vento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19197, 31, 'BR', NULL, NULL, 'Campo Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19198, 31, 'BR', NULL, NULL, 'Campo Redondo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19199, 31, 'BR', NULL, NULL, 'Canguaretama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19200, 31, 'BR', NULL, NULL, 'Caraúbas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19201, 31, 'BR', NULL, NULL, 'Carnaubais')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19202, 31, 'BR', NULL, NULL, 'Carnaúba dos Dantas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19203, 31, 'BR', NULL, NULL, 'Ceará-Mirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19204, 31, 'BR', NULL, NULL, 'Cerro Corá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19205, 31, 'BR', NULL, NULL, 'Coronel Ezequiel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19206, 31, 'BR', NULL, NULL, 'Coronel João Pessoa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19207, 31, 'BR', NULL, NULL, 'Cruzeta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19208, 31, 'BR', NULL, NULL, 'Currais Novos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19209, 31, 'BR', NULL, NULL, 'Córrego de São Mateus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19210, 31, 'BR', NULL, NULL, 'Doutor Severiano')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19211, 31, 'BR', NULL, NULL, 'Encanto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19212, 31, 'BR', NULL, NULL, 'Equador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19213, 31, 'BR', NULL, NULL, 'Espírito Santo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19214, 31, 'BR', NULL, NULL, 'Espírito Santo do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19215, 31, 'BR', NULL, NULL, 'Extremoz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19216, 31, 'BR', NULL, NULL, 'Felipe Guerra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19217, 31, 'BR', NULL, NULL, 'Fernando Pedroza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19218, 31, 'BR', NULL, NULL, 'Firmamento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19219, 31, 'BR', NULL, NULL, 'Florânia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19220, 31, 'BR', NULL, NULL, 'Francisco Dantas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19221, 31, 'BR', NULL, NULL, 'Frutuoso Gomes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19222, 31, 'BR', NULL, NULL, 'Galinhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19223, 31, 'BR', NULL, NULL, 'Gameleira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19224, 31, 'BR', NULL, NULL, 'Goianinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19225, 31, 'BR', NULL, NULL, 'Governador Dix-Sept Rosado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19226, 31, 'BR', NULL, NULL, 'Grossos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19227, 31, 'BR', NULL, NULL, 'Guamaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19228, 31, 'BR', NULL, NULL, 'Ielmo Marinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19229, 31, 'BR', NULL, NULL, 'Igreja Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19230, 31, 'BR', NULL, NULL, 'Ipanguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19231, 31, 'BR', NULL, NULL, 'Ipiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19232, 31, 'BR', NULL, NULL, 'Ipueira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19233, 31, 'BR', NULL, NULL, 'Itajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19234, 31, 'BR', NULL, NULL, 'Itaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19235, 31, 'BR', NULL, NULL, 'Jandaíra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19236, 31, 'BR', NULL, NULL, 'Janduís')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19237, 31, 'BR', NULL, NULL, 'Japi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19238, 31, 'BR', NULL, NULL, 'Jardim de Angicos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19239, 31, 'BR', NULL, NULL, 'Jardim de Piranhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19240, 31, 'BR', NULL, NULL, 'Jardim do Seridó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19241, 31, 'BR', NULL, NULL, 'Jaçanã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19242, 31, 'BR', NULL, NULL, 'José da Penha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19243, 31, 'BR', NULL, NULL, 'João Câmara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19244, 31, 'BR', NULL, NULL, 'João Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19245, 31, 'BR', NULL, NULL, 'Jucurutu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19246, 31, 'BR', NULL, NULL, 'Jundiá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19247, 31, 'BR', NULL, NULL, 'Lagoa D''Anta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19248, 31, 'BR', NULL, NULL, 'Lagoa Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19249, 31, 'BR', NULL, NULL, 'Lagoa Salgada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19250, 31, 'BR', NULL, NULL, 'Lagoa de Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19251, 31, 'BR', NULL, NULL, 'Lagoa de Velhos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19252, 31, 'BR', NULL, NULL, 'Lajes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19253, 31, 'BR', NULL, NULL, 'Lajes Pintadas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19254, 31, 'BR', NULL, NULL, 'Lucrécia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19255, 31, 'BR', NULL, NULL, 'Luís Gomes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19256, 31, 'BR', NULL, NULL, 'Macau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19257, 31, 'BR', NULL, NULL, 'Macaíba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19258, 31, 'BR', NULL, NULL, 'Major Felipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19259, 31, 'BR', NULL, NULL, 'Major Sales')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19260, 31, 'BR', NULL, NULL, 'Marcelino Vieira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19261, 31, 'BR', NULL, NULL, 'Martins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19262, 31, 'BR', NULL, NULL, 'Mata de São Braz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19263, 31, 'BR', NULL, NULL, 'Maxaranguape')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19264, 31, 'BR', NULL, NULL, 'Messias Targino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19265, 31, 'BR', NULL, NULL, 'Montanhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19266, 31, 'BR', NULL, NULL, 'Monte Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19267, 31, 'BR', NULL, NULL, 'Monte das Gameleiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19268, 31, 'BR', NULL, NULL, 'Mossoró')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19269, 31, 'BR', NULL, NULL, 'Natal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19270, 31, 'BR', NULL, NULL, 'Nova Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19271, 31, 'BR', NULL, NULL, 'Nísia Floresta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19272, 31, 'BR', NULL, NULL, 'Olho-D''Água do Borges')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19273, 31, 'BR', NULL, NULL, 'Ouro Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19274, 31, 'BR', NULL, NULL, 'Paraná')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19275, 31, 'BR', NULL, NULL, 'Parazinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19276, 31, 'BR', NULL, NULL, 'Parelhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19277, 31, 'BR', NULL, NULL, 'Parnamirim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19278, 31, 'BR', NULL, NULL, 'Passa e Fica')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19279, 31, 'BR', NULL, NULL, 'Passagem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19280, 31, 'BR', NULL, NULL, 'Patu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19281, 31, 'BR', NULL, NULL, 'Pau dos Ferros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19282, 31, 'BR', NULL, NULL, 'Pedra Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19283, 31, 'BR', NULL, NULL, 'Pedra Preta')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19284, 31, 'BR', NULL, NULL, 'Pedro Avelino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19285, 31, 'BR', NULL, NULL, 'Pedro Velho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19286, 31, 'BR', NULL, NULL, 'Pendências')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19287, 31, 'BR', NULL, NULL, 'Pilões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19288, 31, 'BR', NULL, NULL, 'Portalegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19289, 31, 'BR', NULL, NULL, 'Porto do Mangue')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19290, 31, 'BR', NULL, NULL, 'Poço Branco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19291, 31, 'BR', NULL, NULL, 'Pureza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19292, 31, 'BR', NULL, NULL, 'Rafael Fernandes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19293, 31, 'BR', NULL, NULL, 'Rafael Godeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19294, 31, 'BR', NULL, NULL, 'Riacho da Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19295, 31, 'BR', NULL, NULL, 'Riacho de Santana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19296, 31, 'BR', NULL, NULL, 'Riachuelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19297, 31, 'BR', NULL, NULL, 'Rio do Fogo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19298, 31, 'BR', NULL, NULL, 'Rodolfo Fernandes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19299, 31, 'BR', NULL, NULL, 'Rosário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19300, 31, 'BR', NULL, NULL, 'Ruy Barbosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19301, 31, 'BR', NULL, NULL, 'Salva Vida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19302, 31, 'BR', NULL, NULL, 'Santa Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19303, 31, 'BR', NULL, NULL, 'Santa Fé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19304, 31, 'BR', NULL, NULL, 'Santa Maria')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19305, 31, 'BR', NULL, NULL, 'Santa Teresa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19306, 31, 'BR', NULL, NULL, 'Santana do Matos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19307, 31, 'BR', NULL, NULL, 'Santana do Seridó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19308, 31, 'BR', NULL, NULL, 'Santo Antônio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19309, 31, 'BR', NULL, NULL, 'Santo Antônio do Potengi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19310, 31, 'BR', NULL, NULL, 'Senador Elói de Souza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19311, 31, 'BR', NULL, NULL, 'Senador Georgino Avelino')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19312, 31, 'BR', NULL, NULL, 'Serra Caiada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19313, 31, 'BR', NULL, NULL, 'Serra Negra do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19314, 31, 'BR', NULL, NULL, 'Serra da Tapuia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19315, 31, 'BR', NULL, NULL, 'Serra de São Bento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19316, 31, 'BR', NULL, NULL, 'Serra do Mel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19317, 31, 'BR', NULL, NULL, 'Serrinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19318, 31, 'BR', NULL, NULL, 'Serrinha dos Pintos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19319, 31, 'BR', NULL, NULL, 'Severiano Melo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19320, 31, 'BR', NULL, NULL, 'São Bento do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19321, 31, 'BR', NULL, NULL, 'São Bento do Trairi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19322, 31, 'BR', NULL, NULL, 'São Bernardo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19323, 31, 'BR', NULL, NULL, 'São Fernando')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19324, 31, 'BR', NULL, NULL, 'São Francisco do Oeste')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19325, 31, 'BR', NULL, NULL, 'São Geraldo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19326, 31, 'BR', NULL, NULL, 'São Gonçalo do Amarante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19327, 31, 'BR', NULL, NULL, 'São José da Passagem')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19328, 31, 'BR', NULL, NULL, 'São José de Mipibu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19329, 31, 'BR', NULL, NULL, 'São José do Campestre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19330, 31, 'BR', NULL, NULL, 'São José do Seridó')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19331, 31, 'BR', NULL, NULL, 'São João do Sabugi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19332, 31, 'BR', NULL, NULL, 'São Miguel')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19333, 31, 'BR', NULL, NULL, 'São Miguel de Touros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19334, 31, 'BR', NULL, NULL, 'São Paulo do Potengi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19335, 31, 'BR', NULL, NULL, 'São Pedro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19336, 31, 'BR', NULL, NULL, 'São Rafael')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19337, 31, 'BR', NULL, NULL, 'São Tomé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19338, 31, 'BR', NULL, NULL, 'São Vicente')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19339, 31, 'BR', NULL, NULL, 'Sítio Novo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19340, 31, 'BR', NULL, NULL, 'Taboleiro Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19341, 31, 'BR', NULL, NULL, 'Taipu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19342, 31, 'BR', NULL, NULL, 'Tangará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19343, 31, 'BR', NULL, NULL, 'Tenente Ananias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19344, 31, 'BR', NULL, NULL, 'Tenente Laurentino Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19345, 31, 'BR', NULL, NULL, 'Tibau')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19346, 31, 'BR', NULL, NULL, 'Tibau do Sul')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19347, 31, 'BR', NULL, NULL, 'Timbaúba dos Batistas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19348, 31, 'BR', NULL, NULL, 'Touros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19349, 31, 'BR', NULL, NULL, 'Trairi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19350, 31, 'BR', NULL, NULL, 'Triunfo Potiguar')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19351, 31, 'BR', NULL, NULL, 'Umarizal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19352, 31, 'BR', NULL, NULL, 'Upanema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19353, 31, 'BR', NULL, NULL, 'Venha-Ver')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19354, 31, 'BR', NULL, NULL, 'Vera Cruz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19355, 31, 'BR', NULL, NULL, 'Vila Flor')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19356, 31, 'BR', NULL, NULL, 'Viçosa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19357, 31, 'BR', NULL, NULL, 'Várzea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19358, 31, 'BR', NULL, NULL, 'Água Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19359, 32, 'BR', NULL, NULL, 'Alto Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19360, 32, 'BR', NULL, NULL, 'Amajari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19361, 32, 'BR', NULL, NULL, 'Boa Vista')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19362, 32, 'BR', NULL, NULL, 'Bonfim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19363, 32, 'BR', NULL, NULL, 'Cantá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19364, 32, 'BR', NULL, NULL, 'Caracaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19365, 32, 'BR', NULL, NULL, 'Caroebe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19366, 32, 'BR', NULL, NULL, 'Félix Pinto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19367, 32, 'BR', NULL, NULL, 'Iracema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19368, 32, 'BR', NULL, NULL, 'Mucajaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19369, 32, 'BR', NULL, NULL, 'Normandia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19370, 32, 'BR', NULL, NULL, 'Novo Paraíso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19371, 32, 'BR', NULL, NULL, 'Pacaraima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19372, 32, 'BR', NULL, NULL, 'Rorainópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19373, 32, 'BR', NULL, NULL, 'Santa Cecília')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19374, 32, 'BR', NULL, NULL, 'São João da Baliza')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19375, 32, 'BR', NULL, NULL, 'São Luiz')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19376, 32, 'BR', NULL, NULL, 'Taboca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19377, 32, 'BR', NULL, NULL, 'Uiramutã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19378, 33, 'BR', NULL, NULL, 'Altos Verdes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19379, 33, 'BR', NULL, NULL, 'Amparo de São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19380, 33, 'BR', NULL, NULL, 'Aquidabã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19381, 33, 'BR', NULL, NULL, 'Aracaju')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19382, 33, 'BR', NULL, NULL, 'Arauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19383, 33, 'BR', NULL, NULL, 'Areia Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19384, 33, 'BR', NULL, NULL, 'Barra dos Coqueiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19385, 33, 'BR', NULL, NULL, 'Barracas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19386, 33, 'BR', NULL, NULL, 'Boquim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19387, 33, 'BR', NULL, NULL, 'Brejo Grande')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19388, 33, 'BR', NULL, NULL, 'Campo do Brito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19389, 33, 'BR', NULL, NULL, 'Canhoba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19390, 33, 'BR', NULL, NULL, 'Canindé de São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19391, 33, 'BR', NULL, NULL, 'Capela')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19392, 33, 'BR', NULL, NULL, 'Carira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19393, 33, 'BR', NULL, NULL, 'Carmópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19394, 33, 'BR', NULL, NULL, 'Cedro de São João')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19395, 33, 'BR', NULL, NULL, 'Cristinápolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19396, 33, 'BR', NULL, NULL, 'Cumbe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19397, 33, 'BR', NULL, NULL, 'Divina Pastora')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19398, 33, 'BR', NULL, NULL, 'Estância')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19399, 33, 'BR', NULL, NULL, 'Feira Nova')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19400, 33, 'BR', NULL, NULL, 'Frei Paulo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19401, 33, 'BR', NULL, NULL, 'Gararu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19402, 33, 'BR', NULL, NULL, 'General Maynard')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19403, 33, 'BR', NULL, NULL, 'Graccho Cardoso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19404, 33, 'BR', NULL, NULL, 'Ilha das Flores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19405, 33, 'BR', NULL, NULL, 'Indiaroba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19406, 33, 'BR', NULL, NULL, 'Itabaiana')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19407, 33, 'BR', NULL, NULL, 'Itabaianinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19408, 33, 'BR', NULL, NULL, 'Itabi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19409, 33, 'BR', NULL, NULL, 'Itaporanga D''Ajuda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19410, 33, 'BR', NULL, NULL, 'Japaratuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19411, 33, 'BR', NULL, NULL, 'Japoatã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19412, 33, 'BR', NULL, NULL, 'Lagarto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19413, 33, 'BR', NULL, NULL, 'Lagoa Funda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19414, 33, 'BR', NULL, NULL, 'Laranjeiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19415, 33, 'BR', NULL, NULL, 'Macambira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19416, 33, 'BR', NULL, NULL, 'Malhada dos Bois')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19417, 33, 'BR', NULL, NULL, 'Malhador')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19418, 33, 'BR', NULL, NULL, 'Maruim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19419, 33, 'BR', NULL, NULL, 'Miranda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19420, 33, 'BR', NULL, NULL, 'Moita Bonita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19421, 33, 'BR', NULL, NULL, 'Monte Alegre de Sergipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19422, 33, 'BR', NULL, NULL, 'Mosqueiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19423, 33, 'BR', NULL, NULL, 'Muribeca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19424, 33, 'BR', NULL, NULL, 'Neópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19425, 33, 'BR', NULL, NULL, 'Nossa Senhora Aparecida')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19426, 33, 'BR', NULL, NULL, 'Nossa Senhora da Glória')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19427, 33, 'BR', NULL, NULL, 'Nossa Senhora das Dores')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19428, 33, 'BR', NULL, NULL, 'Nossa Senhora de Lourdes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19429, 33, 'BR', NULL, NULL, 'Nossa Senhora do Socorro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19430, 33, 'BR', NULL, NULL, 'Pacatuba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19431, 33, 'BR', NULL, NULL, 'Palmares')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19432, 33, 'BR', NULL, NULL, 'Pedra Mole')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19433, 33, 'BR', NULL, NULL, 'Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19434, 33, 'BR', NULL, NULL, 'Pedrinhas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19435, 33, 'BR', NULL, NULL, 'Pinhão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19436, 33, 'BR', NULL, NULL, 'Pirambu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19437, 33, 'BR', NULL, NULL, 'Porto da Folha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19438, 33, 'BR', NULL, NULL, 'Poço Redondo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19439, 33, 'BR', NULL, NULL, 'Poço Verde')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19440, 33, 'BR', NULL, NULL, 'Propriá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19441, 33, 'BR', NULL, NULL, 'Riachuelo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19442, 33, 'BR', NULL, NULL, 'Riachão do Dantas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19443, 33, 'BR', NULL, NULL, 'Ribeirópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19444, 33, 'BR', NULL, NULL, 'Rosário do Catete')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19445, 33, 'BR', NULL, NULL, 'Salgado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19446, 33, 'BR', NULL, NULL, 'Samambaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19447, 33, 'BR', NULL, NULL, 'Santa Luzia do Itanhy')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19448, 33, 'BR', NULL, NULL, 'Santa Rosa de Lima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19449, 33, 'BR', NULL, NULL, 'Santana do São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19450, 33, 'BR', NULL, NULL, 'Santo Amaro das Brotas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19451, 33, 'BR', NULL, NULL, 'Simão Dias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19452, 33, 'BR', NULL, NULL, 'Siriri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19453, 33, 'BR', NULL, NULL, 'São Cristóvão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19454, 33, 'BR', NULL, NULL, 'São Domingos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19455, 33, 'BR', NULL, NULL, 'São Francisco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19456, 33, 'BR', NULL, NULL, 'São Mateus da Palestina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19457, 33, 'BR', NULL, NULL, 'São Miguel do Aleixo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19458, 33, 'BR', NULL, NULL, 'Telha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19459, 33, 'BR', NULL, NULL, 'Tobias Barreto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19460, 33, 'BR', NULL, NULL, 'Tomar do Geru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19461, 33, 'BR', NULL, NULL, 'Umbaúba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19462, 34, 'BR', NULL, NULL, 'Abreulândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19463, 34, 'BR', NULL, NULL, 'Aguiarnópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19464, 34, 'BR', NULL, NULL, 'Aliança do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19465, 34, 'BR', NULL, NULL, 'Almas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19466, 34, 'BR', NULL, NULL, 'Alvorada')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19467, 34, 'BR', NULL, NULL, 'Anajanópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19468, 34, 'BR', NULL, NULL, 'Ananás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19469, 34, 'BR', NULL, NULL, 'Angico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19470, 34, 'BR', NULL, NULL, 'Aparecida do Rio Negro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19471, 34, 'BR', NULL, NULL, 'Apinajé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19472, 34, 'BR', NULL, NULL, 'Aragaçuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19473, 34, 'BR', NULL, NULL, 'Aragominas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19474, 34, 'BR', NULL, NULL, 'Araguacema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19475, 34, 'BR', NULL, NULL, 'Araguanã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19476, 34, 'BR', NULL, NULL, 'Araguatins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19477, 34, 'BR', NULL, NULL, 'Araguaçu')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19478, 34, 'BR', NULL, NULL, 'Araguaína')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19479, 34, 'BR', NULL, NULL, 'Arapoema')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19480, 34, 'BR', NULL, NULL, 'Arraias')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19481, 34, 'BR', NULL, NULL, 'Augustinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19482, 34, 'BR', NULL, NULL, 'Aurora do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19483, 34, 'BR', NULL, NULL, 'Axixá do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19484, 34, 'BR', NULL, NULL, 'Babaçulândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19485, 34, 'BR', NULL, NULL, 'Bandeirantes do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19486, 34, 'BR', NULL, NULL, 'Barra do Grota')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19487, 34, 'BR', NULL, NULL, 'Barra do Ouro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19488, 34, 'BR', NULL, NULL, 'Barrolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19489, 34, 'BR', NULL, NULL, 'Bernardo Sayão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19490, 34, 'BR', NULL, NULL, 'Bom Jesus do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19491, 34, 'BR', NULL, NULL, 'Brasilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19492, 34, 'BR', NULL, NULL, 'Brasilândia do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19493, 34, 'BR', NULL, NULL, 'Brejinho de Nazaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19494, 34, 'BR', NULL, NULL, 'Buriti do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19495, 34, 'BR', NULL, NULL, 'Cachoeirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19496, 34, 'BR', NULL, NULL, 'Campos Lindos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19497, 34, 'BR', NULL, NULL, 'Cana Brava')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19498, 34, 'BR', NULL, NULL, 'Cariri do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19499, 34, 'BR', NULL, NULL, 'Carmolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19500, 34, 'BR', NULL, NULL, 'Carrasco Bonito')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19501, 34, 'BR', NULL, NULL, 'Cartucho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19502, 34, 'BR', NULL, NULL, 'Caseara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19503, 34, 'BR', NULL, NULL, 'Centenário')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19504, 34, 'BR', NULL, NULL, 'Chapada da Natividade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19505, 34, 'BR', NULL, NULL, 'Chapada de Areia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19506, 34, 'BR', NULL, NULL, 'Cocalinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19507, 34, 'BR', NULL, NULL, 'Cocalândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19508, 34, 'BR', NULL, NULL, 'Colinas do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19509, 34, 'BR', NULL, NULL, 'Colméia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19510, 34, 'BR', NULL, NULL, 'Combinado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19511, 34, 'BR', NULL, NULL, 'Conceição do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19512, 34, 'BR', NULL, NULL, 'Correinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19513, 34, 'BR', NULL, NULL, 'Couto de Magalhães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19514, 34, 'BR', NULL, NULL, 'Craolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19515, 34, 'BR', NULL, NULL, 'Cristalândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19516, 34, 'BR', NULL, NULL, 'Crixás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19517, 34, 'BR', NULL, NULL, 'Crixás do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19518, 34, 'BR', NULL, NULL, 'Darcinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19519, 34, 'BR', NULL, NULL, 'Dianópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19520, 34, 'BR', NULL, NULL, 'Divinópolis do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19521, 34, 'BR', NULL, NULL, 'Dois Irmãos do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19522, 34, 'BR', NULL, NULL, 'Duerê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19523, 34, 'BR', NULL, NULL, 'Escondido')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19524, 34, 'BR', NULL, NULL, 'Esperantina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19525, 34, 'BR', NULL, NULL, 'Figueirópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19526, 34, 'BR', NULL, NULL, 'Filadélfia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19527, 34, 'BR', NULL, NULL, 'Formoso do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19528, 34, 'BR', NULL, NULL, 'Fortaleza do Tabocão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19529, 34, 'BR', NULL, NULL, 'Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19530, 34, 'BR', NULL, NULL, 'Goianorte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19531, 34, 'BR', NULL, NULL, 'Goiatins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19532, 34, 'BR', NULL, NULL, 'Guaraí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19533, 34, 'BR', NULL, NULL, 'Gurupi')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19534, 34, 'BR', NULL, NULL, 'Ilha Barreira Branca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19535, 34, 'BR', NULL, NULL, 'Ipueiras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19536, 34, 'BR', NULL, NULL, 'Itacajá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19537, 34, 'BR', NULL, NULL, 'Itaguatins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19538, 34, 'BR', NULL, NULL, 'Itapiratins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19539, 34, 'BR', NULL, NULL, 'Itaporã do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19540, 34, 'BR', NULL, NULL, 'Jaú do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19541, 34, 'BR', NULL, NULL, 'Juarina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19542, 34, 'BR', NULL, NULL, 'Jussara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19543, 34, 'BR', NULL, NULL, 'Lagoa da Confusão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19544, 34, 'BR', NULL, NULL, 'Lagoa do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19545, 34, 'BR', NULL, NULL, 'Lajeado')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19546, 34, 'BR', NULL, NULL, 'Lavandeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19547, 34, 'BR', NULL, NULL, 'Lizarda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19548, 34, 'BR', NULL, NULL, 'Luzinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19549, 34, 'BR', NULL, NULL, 'Marianópolis do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19550, 34, 'BR', NULL, NULL, 'Mateiros')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19551, 34, 'BR', NULL, NULL, 'Maurilândia do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19552, 34, 'BR', NULL, NULL, 'Miracema do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19553, 34, 'BR', NULL, NULL, 'Mirandópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19554, 34, 'BR', NULL, NULL, 'Miranorte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19555, 34, 'BR', NULL, NULL, 'Monte Lindo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19556, 34, 'BR', NULL, NULL, 'Monte Santo do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19557, 34, 'BR', NULL, NULL, 'Monte do Carmo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19558, 34, 'BR', NULL, NULL, 'Muricilândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19559, 34, 'BR', NULL, NULL, 'Natal')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19560, 34, 'BR', NULL, NULL, 'Natividade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19561, 34, 'BR', NULL, NULL, 'Nazaré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19562, 34, 'BR', NULL, NULL, 'Nova Olinda')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19563, 34, 'BR', NULL, NULL, 'Nova Rosalândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19564, 34, 'BR', NULL, NULL, 'Novo Acordo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19565, 34, 'BR', NULL, NULL, 'Novo Alegre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19566, 34, 'BR', NULL, NULL, 'Novo Horizonte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19567, 34, 'BR', NULL, NULL, 'Novo Jardim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19568, 34, 'BR', NULL, NULL, 'Oliveira de Fátima')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19569, 34, 'BR', NULL, NULL, 'Palmas')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19570, 34, 'BR', NULL, NULL, 'Palmeirante')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19571, 34, 'BR', NULL, NULL, 'Palmeiras do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19572, 34, 'BR', NULL, NULL, 'Palmeirópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19573, 34, 'BR', NULL, NULL, 'Paranã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19574, 34, 'BR', NULL, NULL, 'Paraíso do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19575, 34, 'BR', NULL, NULL, 'Pau D''Arco')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19576, 34, 'BR', NULL, NULL, 'Pedro Afonso')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19577, 34, 'BR', NULL, NULL, 'Pedro Ludovico')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19578, 34, 'BR', NULL, NULL, 'Peixe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19579, 34, 'BR', NULL, NULL, 'Pequizeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19580, 34, 'BR', NULL, NULL, 'Pilões')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19581, 34, 'BR', NULL, NULL, 'Pindorama do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19582, 34, 'BR', NULL, NULL, 'Piraquê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19583, 34, 'BR', NULL, NULL, 'Pium')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19584, 34, 'BR', NULL, NULL, 'Ponte Alta do Bom Jesus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19585, 34, 'BR', NULL, NULL, 'Ponte Alta do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19586, 34, 'BR', NULL, NULL, 'Pontes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19587, 34, 'BR', NULL, NULL, 'Porto Alegre do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19588, 34, 'BR', NULL, NULL, 'Porto Lemos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19589, 34, 'BR', NULL, NULL, 'Porto Nacional')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19590, 34, 'BR', NULL, NULL, 'Porãozinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19591, 34, 'BR', NULL, NULL, 'Praia Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19592, 34, 'BR', NULL, NULL, 'Presidente Kennedy')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19593, 34, 'BR', NULL, NULL, 'Príncipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19594, 34, 'BR', NULL, NULL, 'Pugmil')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19595, 34, 'BR', NULL, NULL, 'Pé da Serra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19596, 34, 'BR', NULL, NULL, 'Recursolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19597, 34, 'BR', NULL, NULL, 'Riachinho')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19598, 34, 'BR', NULL, NULL, 'Rio Sono')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19599, 34, 'BR', NULL, NULL, 'Rio da Conceição')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19600, 34, 'BR', NULL, NULL, 'Rio dos Bois')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19601, 34, 'BR', NULL, NULL, 'Sampaio')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19602, 34, 'BR', NULL, NULL, 'Sandolândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19603, 34, 'BR', NULL, NULL, 'Santa Fé do Araguaia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19604, 34, 'BR', NULL, NULL, 'Santa Maria do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19605, 34, 'BR', NULL, NULL, 'Santa Rita do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19606, 34, 'BR', NULL, NULL, 'Santa Rosa do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19607, 34, 'BR', NULL, NULL, 'Santa Tereza do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19608, 34, 'BR', NULL, NULL, 'Santa Terezinha do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19609, 34, 'BR', NULL, NULL, 'Silvanópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19610, 34, 'BR', NULL, NULL, 'Sucupira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19611, 34, 'BR', NULL, NULL, 'São Bento do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19612, 34, 'BR', NULL, NULL, 'São Félix do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19613, 34, 'BR', NULL, NULL, 'São Miguel do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19614, 34, 'BR', NULL, NULL, 'São Salvador do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19615, 34, 'BR', NULL, NULL, 'São Sebastião do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19616, 34, 'BR', NULL, NULL, 'São Valério da Natividade')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19617, 34, 'BR', NULL, NULL, 'Sítio Novo do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19618, 34, 'BR', NULL, NULL, 'Taguatinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19619, 34, 'BR', NULL, NULL, 'Taipas do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19620, 34, 'BR', NULL, NULL, 'Talismã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19621, 34, 'BR', NULL, NULL, 'Tamboril')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19622, 34, 'BR', NULL, NULL, 'Taquaralto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19623, 34, 'BR', NULL, NULL, 'Taquarussu do Tocantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19624, 34, 'BR', NULL, NULL, 'Tocantinópolis')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19625, 34, 'BR', NULL, NULL, 'Tocantínia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19626, 34, 'BR', NULL, NULL, 'Tupirama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19627, 34, 'BR', NULL, NULL, 'Tupiratins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19628, 34, 'BR', NULL, NULL, 'Tupiratã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19629, 34, 'BR', NULL, NULL, 'Vênus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19630, 34, 'BR', NULL, NULL, 'Wanderlândia')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19631, 34, 'BR', NULL, NULL, 'Xambioá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19632, 35, 'BR', NULL, NULL, 'Alvarães')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19633, 35, 'BR', NULL, NULL, 'Amatari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19634, 35, 'BR', NULL, NULL, 'Amaturá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19635, 35, 'BR', NULL, NULL, 'Anamã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19636, 35, 'BR', NULL, NULL, 'Anori')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19637, 35, 'BR', NULL, NULL, 'Apuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19638, 35, 'BR', NULL, NULL, 'Ariaú')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19639, 35, 'BR', NULL, NULL, 'Atalaia do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19640, 35, 'BR', NULL, NULL, 'Augusto Montenegro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19641, 35, 'BR', NULL, NULL, 'Autazes')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19642, 35, 'BR', NULL, NULL, 'Axinim')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19643, 35, 'BR', NULL, NULL, 'Badajós')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19644, 35, 'BR', NULL, NULL, 'Balbina')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19645, 35, 'BR', NULL, NULL, 'Barcelos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19646, 35, 'BR', NULL, NULL, 'Barreirinha')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19647, 35, 'BR', NULL, NULL, 'Benjamin Constant')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19648, 35, 'BR', NULL, NULL, 'Beruri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19649, 35, 'BR', NULL, NULL, 'Boa Vista do Ramos')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19650, 35, 'BR', NULL, NULL, 'Boca do Acre')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19651, 35, 'BR', NULL, NULL, 'Borba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19652, 35, 'BR', NULL, NULL, 'Caapiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19653, 35, 'BR', NULL, NULL, 'Cacau Pirêra')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19654, 35, 'BR', NULL, NULL, 'Cametá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19655, 35, 'BR', NULL, NULL, 'Canumã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19656, 35, 'BR', NULL, NULL, 'Canutama')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19657, 35, 'BR', NULL, NULL, 'Carauari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19658, 35, 'BR', NULL, NULL, 'Careiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19659, 35, 'BR', NULL, NULL, 'Careiro da Várzea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19660, 35, 'BR', NULL, NULL, 'Carvoeiro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19661, 35, 'BR', NULL, NULL, 'Coari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19662, 35, 'BR', NULL, NULL, 'Codajás')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19663, 35, 'BR', NULL, NULL, 'Cucuí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19664, 35, 'BR', NULL, NULL, 'Eirunepé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19665, 35, 'BR', NULL, NULL, 'Envira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19666, 35, 'BR', NULL, NULL, 'Floriano Peixoto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19667, 35, 'BR', NULL, NULL, 'Fonte Boa')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19668, 35, 'BR', NULL, NULL, 'Freguesia do Andirá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19669, 35, 'BR', NULL, NULL, 'Guajará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19670, 35, 'BR', NULL, NULL, 'Humaitá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19671, 35, 'BR', NULL, NULL, 'Iauaretê')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19672, 35, 'BR', NULL, NULL, 'Ipixuna')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19673, 35, 'BR', NULL, NULL, 'Iranduba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19674, 35, 'BR', NULL, NULL, 'Itacoatiara')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19675, 35, 'BR', NULL, NULL, 'Itamarati')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19676, 35, 'BR', NULL, NULL, 'Itapiranga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19677, 35, 'BR', NULL, NULL, 'Içanã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19678, 35, 'BR', NULL, NULL, 'Japurá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19679, 35, 'BR', NULL, NULL, 'Juruá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19680, 35, 'BR', NULL, NULL, 'Jutaí')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19681, 35, 'BR', NULL, NULL, 'Lago Preto')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19682, 35, 'BR', NULL, NULL, 'Lábrea')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19683, 35, 'BR', NULL, NULL, 'Manacapuru')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19684, 35, 'BR', NULL, NULL, 'Manaquiri')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19685, 35, 'BR', NULL, NULL, 'Manaus')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19686, 35, 'BR', NULL, NULL, 'Manicoré')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19687, 35, 'BR', NULL, NULL, 'Maraã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19688, 35, 'BR', NULL, NULL, 'Massauari')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19689, 35, 'BR', NULL, NULL, 'Maués')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19690, 35, 'BR', NULL, NULL, 'Mocambo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19691, 35, 'BR', NULL, NULL, 'Moura')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19692, 35, 'BR', NULL, NULL, 'Murutinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19693, 35, 'BR', NULL, NULL, 'Nhamundá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19694, 35, 'BR', NULL, NULL, 'Nova Olinda do Norte')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19695, 35, 'BR', NULL, NULL, 'Novo Airão')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19696, 35, 'BR', NULL, NULL, 'Novo Aripuanã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19697, 35, 'BR', NULL, NULL, 'Osório da Fonseca')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19698, 35, 'BR', NULL, NULL, 'Parintins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19699, 35, 'BR', NULL, NULL, 'Pauini')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19700, 35, 'BR', NULL, NULL, 'Pedras')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19701, 35, 'BR', NULL, NULL, 'Presidente Figueiredo')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19702, 35, 'BR', NULL, NULL, 'Repartimento')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19703, 35, 'BR', NULL, NULL, 'Rio Preto da Eva')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19704, 35, 'BR', NULL, NULL, 'Santa Isabel do Rio Negro')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19705, 35, 'BR', NULL, NULL, 'Santa Rita')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19706, 35, 'BR', NULL, NULL, 'Santo Antônio do Içá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19707, 35, 'BR', NULL, NULL, 'Silves')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19708, 35, 'BR', NULL, NULL, 'São Felipe')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19709, 35, 'BR', NULL, NULL, 'São Gabriel da Cachoeira')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19710, 35, 'BR', NULL, NULL, 'São Paulo de Olivença')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19711, 35, 'BR', NULL, NULL, 'São Sebastião do Uatumã')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19712, 35, 'BR', NULL, NULL, 'Tabatinga')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19713, 35, 'BR', NULL, NULL, 'Tapauá')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19714, 35, 'BR', NULL, NULL, 'Tefé')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19715, 35, 'BR', NULL, NULL, 'Tonantins')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19716, 35, 'BR', NULL, NULL, 'Uarini')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19717, 35, 'BR', NULL, NULL, 'Urucará')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19718, 35, 'BR', NULL, NULL, 'Urucurituba')");
+$oProc->query("INSERT INTO phpgw_cc_city VALUES (19719, 35, 'BR', NULL, NULL, 'Vila Pitinga')");
Index: /tags/contactcenter/1.20/setup/default_records.inc.php
===================================================================
--- /tags/contactcenter/1.20/setup/default_records.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/setup/default_records.inc.php	(revision 2)
@@ -0,0 +1,24 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+  *  - Nilton Emilio Buhrer Neto <nilton.neto@gmail.com>                      *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+	/* Default Contact Center Data */	
+	$oProc->query("insert into phpgw_cc_typeof_ct_conns (id_typeof_contact_connection,contact_connection_type_name) values(1,'Email')");
+	$oProc->query("insert into phpgw_cc_typeof_ct_conns (id_typeof_contact_connection,contact_connection_type_name) values(2,'Telefone')");
+	$oProc->query("insert into phpgw_cc_typeof_ct_addrs (id_typeof_contact_address,contact_address_type_name) values(1,'Comercial')");	
+	$oProc->query("insert into phpgw_cc_typeof_ct_addrs (id_typeof_contact_address,contact_address_type_name) values(2,'Residencial')");
+
+	// Populate brazilian database.
+	include("states_pt-br.inc.php"); 
+	include("cities_pt-br.inc.php");
Index: /tags/contactcenter/1.20/setup/states_pt-br.inc.php
===================================================================
--- /tags/contactcenter/1.20/setup/states_pt-br.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/setup/states_pt-br.inc.php	(revision 2)
@@ -0,0 +1,43 @@
+<?php
+/***************************************************************************\
+* eGroupWare - Contacts Center                                              *
+* http://www.egroupware.org                                                 *
+* Written by:                                                               *
+*  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+*  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+*  - Nilton Emilio Buhrer Neto <nilton.neto@gmail.com>                      *
+*  sponsored by Thyamad - http://www.thyamad.com                            *
+* ------------------------------------------------------------------------- *
+*  This program is free software; you can redistribute it and/or modify it  *
+*  under the terms of the GNU General Public License as published by the    *
+*  Free Software Foundation;either version 2 of the License, or (at your    *
+*  option) any later version.                                               *
+\***************************************************************************/
+/* Brazilian States Data */
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (21, 'BR', 'ACRE', 'AC');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (22, 'BR', 'ALAGOAS', 'AL');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (23, 'BR', 'AMAPA', 'AP');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (2, 'BR', 'BAHIA', 'BA');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (19, 'BR', 'CEARA', 'CE');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (3, 'BR', 'DISTRITO FEDERAL', 'DF');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (18, 'BR', 'ESPIRITO SANTO', 'ES');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (11, 'BR', 'GOIAS', 'GO');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (24, 'BR', 'MARANHAO', 'MA');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (25, 'BR', 'MINAS GERAIS', 'MG');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (14, 'BR', 'MATO GROSSO DO SUL', 'MS');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (26, 'BR', 'MATO GROSSO', 'MT');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (27, 'BR', 'PARA', 'PA');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (28, 'BR', 'PARAIBA', 'PB');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (29, 'BR', 'PERNAMBUCO', 'PE');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (30, 'BR', 'PIAUI', 'PI');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (1, 'BR', 'PARANA', 'PR');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (6, 'BR', 'RIO DE JANEIRO', 'RJ');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (31, 'BR', 'RIO GRANDE DO NORTE', 'RN');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (15, 'BR', 'RONDONIA', 'RO');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (32, 'BR', 'RORAIMA', 'RR');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (10, 'BR', 'RIO GRANDE DO SUL', 'RS');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (12, 'BR', 'SANTA CATARINA', 'SC');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (33, 'BR', 'SERGIPE', 'SE');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (4, 'BR', 'SAO PAULO', 'SP');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (34, 'BR', 'TOCANTINS', 'TO');");
+	$oProc->query("INSERT INTO phpgw_cc_state VALUES (35, 'BR', 'AMAZONAS', 'AM');");
Index: /tags/contactcenter/1.20/setup/tables_current.inc.php
===================================================================
--- /tags/contactcenter/1.20/setup/tables_current.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/setup/tables_current.inc.php	(revision 2)
@@ -0,0 +1,394 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	$phpgw_baseline = array(
+		'phpgw_cc_status' => array(
+			'fd' => array(
+				'id_status' => array( 'type' => 'int', 'precision' => 2, 'nullable' => false ),
+				'status_name' => array( 'type' => 'varchar', 'precision' => 30 )
+			),
+			'pk' => array( 'id_status' ),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+		'phpgw_cc_prefixes' => array(
+			'fd' => array(
+				'id_prefix' => array( 'type' => 'int', 'precision' => 2, 'nullable' => false ),
+				'prefix' => array( 'type' => 'varchar','precision' => 30)
+			),
+			'pk' => array('id_prefix'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+		'phpgw_cc_suffixes' => array(
+			'fd' => array(
+				'id_suffix' => array( 'type' => 'int', 'precision' => 2,'nullable' => false),
+				'suffix' => array( 'type' => 'varchar','precision' => 30)
+			),
+			'pk' => array('id_suffix'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+		
+		/* Version 2.0 */
+		'phpgw_cc_typeof_ct_rels' => array(
+			'fd' => array(
+				'id_typeof_contact_relation' => array( 'type' => 'int', 'precision' => 4,'nullable' => false),
+				'contact_relation_type_name' => array( 'type' => 'varchar','precision' => 30),
+				'contact_relation_is_subordinated' => array( 'type' => 'bool' )
+			),
+			'pk' => array('id_typeof_contact_relation'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+		'phpgw_cc_typeof_ct_addrs' => array(
+			'fd' => array(
+				'id_typeof_contact_address' => array( 'type' => 'int', 'precision' => 4,'nullable' => false),
+				'contact_address_type_name' => array( 'type' => 'varchar', 'precision' => 30)
+			),
+			'pk' => array('id_typeof_contact_address'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+		'phpgw_cc_typeof_ct_conns' => array(
+			'fd' => array(
+				'id_typeof_contact_connection' => array( 'type' => 'int', 'precision' => 4,'nullable' => false),
+				'contact_connection_type_name' => array( 'type' => 'varchar','precision' => 30)
+			),
+			'pk' => array('id_typeof_contact_connection'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+
+		/* Version 2.0 */
+		'phpgw_cc_typeof_co_rels' => array(
+			'fd' => array(
+				'id_typeof_company_relation' => array( 'type' => 'int', 'precision' => 4,'nullable' => false),
+				'company_relation_type_name' => array( 'type' => 'varchar','precision' => 30),
+				'company_relation_is_subordinated' => array(  'type' => 'bool' )
+			),
+			'pk' => array('id_typeof_company_relation'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+		/* Version 2.0 */
+		'phpgw_cc_typeof_co_addrs' => array(
+			'fd' => array(
+				'id_typeof_company_address' => array( 'type' => 'int', 'precision' => 4,'nullable' => false),
+				'company_address_type_name' => array( 'type' => 'varchar','precision' => 30)
+			),
+			'pk' => array('id_typeof_company_address'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+		/* Version 2.0 */
+		'phpgw_cc_typeof_co_conns' => array(
+			'fd' => array(
+				'id_typeof_company_connection' => array( 'type' => 'int', 'precision' => 4,'nullable' => false),
+				'company_connection_type_name' => array( 'type' => 'varchar','precision' => 30)
+			),
+			'pk' => array('id_typeof_company_connection'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+		/* Version 2.0 */
+		'phpgw_cc_typeof_co_legals' => array(
+			'fd' => array(
+				'id_typeof_company_legal' => array( 'type' => 'int', 'precision' => 4,'nullable' => false),
+				'legal_type_name' => array( 'type' => 'varchar', 'precision' => 60)
+			),
+			'pk' => array('id_typeof_company_legal'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+		
+
+		'phpgw_cc_state' => array(
+			'fd' => array(
+				'id_state' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
+				'id_country' => array( 'type' => 'char', 'nullable' => false, 'precision' => 2),
+				'state_name' => array( 'type' => 'varchar', 'precision' => 30),
+				'state_symbol' => array( 'type' => 'varchar', 'precision' => 10)
+			),
+			'pk' => array('id_state'),
+			'fk' => array('id_country' => array('phpgw_common_country_list' => 'id_country')),
+			'ix' => array(),
+			'uc' => array()
+		),
+		'phpgw_cc_city' => array(
+			'fd' => array(
+				'id_city' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_state' => array( 'type' => 'int', 'precision' => 8 ),
+				'id_country' => array( 'type' => 'char', 'nullable' => false, 'precision' => 2),
+				'city_timezone' => array( 'type' => 'int', 'precision' => 2 ),
+				'city_geo_location' => array(  'type'  => 'varchar', 'precision' => 40 ),
+				'city_name' => array( 'type'  => 'varchar', 'precision' => 60, 'nullable' => 'false' ),				
+			),
+			'pk' => array('id_city'),
+			'fk' => array(
+				'id_state'   => array('phpgw_cc_state' => 'id_state')
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+		'phpgw_cc_addresses' => array(
+			'fd' => array(
+				'id_address' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_city' => array( 'type'  => 'int', 'precision' => 8 ),
+				'id_state' => array( 'type' => 'int', 'precision' => 8 ),
+				'id_country' => array( 'type' => 'char', 'nullable' => false, 'precision' => 2),
+				'address1' => array( 'type'  => 'varchar', 'precision' => 60 ),
+				'address2' => array( 'type'  => 'varchar', 'precision' => 60 ),
+				'complement' => array( 'type'  => 'varchar', 'precision' => 30 ),
+				'address_other' => array( 'type'  => 'varchar', 'precision' => 60 ),
+				'postal_code' => array( 'type'  => 'varchar', 'precision' => 15 ),
+				'po_box' => array( 'type'  => 'varchar', 'precision' => 30 ),
+				'address_is_default' => array(  'type' => 'bool' )
+			),
+			'pk' => array('id_address'),
+			'fk' => array(
+				'id_city' => array('phpgw_cc_city' => 'id_city'),
+				'id_state'   => array('phpgw_cc_state' => 'id_state')
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+
+		'phpgw_cc_connections' => array(
+			'fd' => array(
+				'id_connection' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'connection_name' => array( 'type'  => 'varchar', 'precision' => 50 ),
+				'connection_value' => array( 'type'  => 'varchar', 'precision' => 50 ),
+				'connection_is_default' => array(  'type' => 'bool' )
+			),
+			'pk' => array('id_connection'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+
+		/* Version 2.0 */
+		'phpgw_cc_company' => array(
+			'fd' => array(
+				'id_company'       => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_company_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'company_name'     => array( 'type'  => 'varchar', 'precision' => 30 ),
+				'company_notes'    => array( 'type'  => 'text' ),
+			),
+			'pk' => array('id_company'),
+			'fk' => array(
+				//'id_company_owner' => array('phpgw_accounts' => 'account_id'),
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+		/* Version 2.0 */
+		'phpgw_cc_company_rels' => array(
+			'fd' => array(
+				'id_company' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_related' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_typeof_company_relation' => array( 'type' => 'int', 'precision' => 4 )
+			),
+			'pk' => array('id_company', 'id_related'),
+			'fk' => array(
+				'id_company' => array('phpgw_cc_company' => 'id_company'),
+				'id_related' => array('phpgw_cc_company' => 'id_company'),
+				'id_typeof_company_relation' => array('phpgw_cc_typeof_co_rels' => 'id_typeof_company_relation')
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+		/* Version 2.0 */
+		'phpgw_cc_company_addrs' => array(
+			'fd' => array(
+				'id_company' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_address' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_typeof_company_address' => array( 'type' => 'int', 'precision' => 4 )
+			),
+			'pk' => array('id_company', 'id_address'),
+			'fk' => array(
+				'id_company' => array('phpgw_cc_company' => 'id_company'),
+				'id_address' => array('phpgw_cc_addresses' => 'id_address'),
+				'id_typeof_company_address' => array('phpgw_cc_typeof_co_addrs' => 'id_typeof_company_address')			
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+		/* Version 2.0 */
+		'phpgw_cc_company_conns' => array(
+			'fd' => array(
+				'id_company' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_connection' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_typeof_company_connection' => array( 'type' => 'int', 'precision' => 4 )
+			),
+			'pk' => array('id_company', 'id_connection'),
+			'fk' => array(
+				'id_company' => array('phpgw_cc_company' => 'id_company'),
+				'id_connection' => array('phpgw_cc_connections' => 'id_connection'),
+				'id_typeof_company_connection' => array('phpgw_cc_typeof_co_conns' => 'id_typeof_company_connection')			
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+		/* Version 2.0 */
+		'phpgw_cc_company_legals' => array(
+			'fd' => array(
+				'id_company_legal' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_company' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
+				'id_typeof_company_legal' => array( 'type' => 'int', 'precision' => 4, 'nullable' => false ),
+				'legal_info_name' => array( 'type'  => 'varchar', 'precision' => 30 ),
+				'legal_info_value' => array( 'type'  => 'varchar', 'precision' => 30 ),
+			),
+			'pk' => array( 'id_company_legal' ),
+			'fk' => array(
+				'id_company' => array('phpgw_cc_company' => 'id_company'),
+				'id_typeof_company_legal' => array('phpgw_cc_typeof_co_legals' => 'id_typeof_company_legal')			
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+
+		'phpgw_cc_contact' => array(
+			'fd' => array(
+				'id_contact'	=> array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_owner'		=> array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_status'		=> array( 'type' => 'int', 'precision' => 4 ),
+				'photo'			=> array( 'type' => 'blob' ),
+				'alias'			=> array( 'type' => 'varchar', 'precision' => 30 ),
+				'id_prefix'		=> array( 'type' => 'int', 'precision' => 4 ),
+				'given_names'	=> array( 'type' => 'varchar', 'precision' => 100 ),
+				'family_names'	=> array( 'type' => 'varchar', 'precision' => 100 ),
+				'names_ordered'	=> array( 'type' => 'varchar', 'precision' => 100 ),
+				'id_suffix'		=> array( 'type' => 'int', 'precision' => 4 ),
+				'birthdate'		=> array( 'type' => 'date' ),
+				'sex'			=> array( 'type' => 'char', 'precision' => 1 ),
+				'pgp_key'		=> array( 'type' => 'text' ),
+				'notes'			=> array( 'type' => 'text' ),
+				'is_global'		=> array( 'type' => 'bool' )
+			),
+			'pk' => array('id_contact'),
+			'fk' => array(
+				'id_status' => array('phpgw_cc_status' => 'id_status'),
+				'id_prefix' => array('phpgw_cc_prefixes' => 'id_prefix'),
+				'id_suffix' => array('phpgw_cc_suffixes' => 'id_suffix')
+			),
+			'ix' => array('is_global'),
+			'uc' => array()
+		),
+		
+		/* Version 2.0 */
+		'phpgw_cc_contact_rels' => array(
+			'fd' => array(
+				'id_contact' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_related' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_typeof_contact_relation'  => array( 'type' => 'int', 'precision' => 4 )
+			),
+			'pk' => array('id_contact', 'id_related'),
+			'fk' => array(
+				'id_contact' => array('phpgw_cc_contact' => 'id_contact'),
+				'id_related' => array('phpgw_cc_contact' => 'id_contact'),
+				'id_typeof_contact_relation' => array('phpgw_cc_typeof_ct_rels' => 'id_typeof_contact_relation')
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+		
+		'phpgw_cc_contact_addrs' => array(
+			'fd' => array(
+				'id_contact'	=> array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_address'	=> array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_typeof_contact_address' => array( 'type' => 'int', 'precision' => 4 )
+			),
+			'pk' => array('id_contact', 'id_address'),
+			'fk' => array(
+				'id_contact' => array('phpgw_cc_contact' => 'id_contact'),
+				'id_address' => array('phpgw_cc_addresses' => 'id_address'),
+				'id_typeof_contact_address' => array('phpgw_cc_typeof_ct_addrs' => 'id_typeof_contact_address')
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+		'phpgw_cc_contact_grps' => array(
+			'fd' => array(
+				'id_group'	=> array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_connection'	=> array( 'type' => 'int', 'precision' => 8, 'nullable' => false )
+			),
+			'pk' => array(),
+			'fk' => array(
+				'id_group' => array('phpgw_cc_groups' => 'id_group'),
+				'id_connection' => array('phpgw_cc_connections' => 'id_connection'),
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+		'phpgw_cc_contact_conns' => array(
+			'fd' => array(
+				'id_contact'    => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_connection' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_typeof_contact_connection' => array( 'type' => 'int', 'precision' => 4 )
+			),
+			'pk' => array('id_contact', 'id_connection'),
+			'fk' => array(
+				'id_contact' => array('phpgw_cc_contact' => 'id_contact'),
+				'id_connection' => array('phpgw_cc_connections' => 'id_connection'),
+				'id_typeof_contact_connection' => array('phpgw_cc_typeof_ct_conns' => 'id_typeof_contact_connection')
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+		
+		/* Version 2.0 */
+		'phpgw_cc_contact_company' => array(
+			'fd' => array(
+				'id_contact' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'id_company' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'title'      => array( 'type' => 'varchar', 'precision' => 30 ),
+				'department' => array( 'type' => 'varchar', 'precision' => 30 ),
+				'default_contact' => array( 'type' => 'bool' ),
+				'default_company' => array( 'type' => 'bool' ),
+			),
+			'pk' => array('id_contact', 'id_company'),
+			'fk' => array(
+				'id_contact' => array('phpgw_cc_contact' => 'id_contact'),
+				'id_company' => array('phpgw_cc_company' => 'id_company')
+			),
+			'ix' => array(),
+			'uc' => array()
+		),
+		/* Version 2.0 */
+		'phpgw_cc_groups' => array(
+			'fd' => array(
+				'id_group'       => array( 'type' => 'auto', 'nullable' => false ),				
+				'title'     => array( 'type'  => 'varchar', 'precision' => 50 ),
+				'owner'     => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+				'short_name'    => array( 'type'  => 'text', 'precision' => 21 ),
+			),
+			'pk' => array('id_group'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),		
+	);
+?>
Index: /tags/contactcenter/1.20/setup/tables_update.inc.php
===================================================================
--- /tags/contactcenter/1.20/setup/tables_update.inc.php	(revision 285)
+++ /tags/contactcenter/1.20/setup/tables_update.inc.php	(revision 285)
@@ -0,0 +1,79 @@
+<?php
+	/**************************************************************************\
+	* phpGroupWare - Setup                                                     *
+	* http://www.phpgroupware.org                                              *
+	* --------------------------------------------                             *
+	* This program is free software; you can redistribute it and/or modify it  *
+	* under the terms of the GNU General Public License as published by the    *
+	* Free Software Foundation; either version 2 of the License, or (at your   *
+	* option) any later version.                                               *
+	\**************************************************************************/	
+	$test[] = '0.4.1';
+	function contactcenter_upgrade0_4_1() {
+		
+		$oProc = $GLOBALS['phpgw_setup']->oProc;
+		$oProc->DropTable('phpgw_cc_city');
+		$oProc->DropTable('phpgw_cc_state');
+		$oProc->CreateTable(
+			'phpgw_cc_state',array(
+				'fd' => array(
+					'id_state' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
+					'id_country' => array( 'type' => 'char', 'nullable' => false, 'precision' => 2),
+					'state_name' => array( 'type' => 'varchar', 'precision' => 30),
+					'state_symbol' => array( 'type' => 'varchar', 'precision' => 10)
+				),
+				'pk' => array('id_state'),
+				'fk' => array('id_country' => array('phpgw_common_country_list' => 'id_country')),
+				'ix' => array(),
+				'uc' => array()
+			)
+		);
+		$oProc->CreateTable(
+			'phpgw_cc_city', array(
+				'fd' => array(
+					'id_city' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ),
+					'id_state' => array( 'type' => 'int', 'precision' => 8 ),
+					'id_country' => array( 'type' => 'char', 'nullable' => false, 'precision' => 2),
+					'city_timezone' => array( 'type' => 'int', 'precision' => 2 ),
+					'city_geo_location' => array(  'type'  => 'varchar', 'precision' => 40 ),
+					'city_name' => array( 'type'  => 'varchar', 'precision' => 60, 'nullable' => 'false' ),				
+				),
+				'pk' => array('id_city'),
+				'fk' => array('id_state'   => array('phpgw_cc_state' => 'id_state')	),
+				'ix' => array(),
+				'uc' => array()
+			)		
+		);		
+		
+		include("states_pt-br.inc.php"); 
+		include("cities_pt-br.inc.php");
+		$GLOBALS['setup_info']['contactcenter']['currentver'] = '1.0.0';
+		return $GLOBALS['setup_info']['contactcenter']['currentver'];
+	}
+	$test[] = '1.0.0';
+	function contactcenter_upgrade1_0_0() {
+		$GLOBALS['setup_info']['contactcenter']['currentver'] = '1.0.005';
+		return $GLOBALS['setup_info']['contactcenter']['currentver'];
+	}
+	$test[] = '1.0.005';
+	function contactcenter_upgrade1_0_005() {
+		$GLOBALS['setup_info']['contactcenter']['currentver'] = '1.14';
+		return $GLOBALS['setup_info']['contactcenter']['currentver'];
+	}
+	$test[] = '1.14';
+	function contactcenter_upgrade1_14() {				
+		$GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cc_connections ALTER COLUMN connection_value TYPE varchar(100)");
+		$GLOBALS['setup_info']['contactcenter']['currentver'] = '1.150';
+		return $GLOBALS['setup_info']['contactcenter']['currentver'];
+	}
+	$test[] = '1.15';
+	function contactcenter_upgrade1_15() {
+		$GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cc_contact ADD COLUMN last_status char(1) DEFAULT 'N'::bpchar");
+		$GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cc_contact ADD COLUMN last_update int8 DEFAULT (date_part('epoch'::text, ('now'::text)::timestamp(3) with time zone) * (1000)::double precision)");
+		$GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cc_contact ADD COLUMN category character varying(20)");
+
+		$GLOBALS['setup_info']['contactcenter']['currentver'] = '1.20';
+		return $GLOBALS['setup_info']['contactcenter']['currentver'];
+	}
+
+?>
Index: /tags/contactcenter/1.20/setup/external_catalogs.inc.php
===================================================================
--- /tags/contactcenter/1.20/setup/external_catalogs.inc.php	(revision 285)
+++ /tags/contactcenter/1.20/setup/external_catalogs.inc.php	(revision 285)
@@ -0,0 +1,46 @@
+<?php
+/*
+ * Created on 20/08/2007 Por Bruno costa
+ *
+ *	Arquivo de configuração de catálogos externos
+ *
+ */
+
+/*
+ * This file is comprised of two arrays describing the external catalogs ($external_srcs) and their attribute mappings
+ * ($external_mappings). The mapping between an external catalog and his attribute mappings are made with the array indices, i. e.
+ * a catalog at external_srcs with indice = 1 use the mapping with indice = 1 at external_mapping.
+ *
+ * external_srcs' format:
+ *
+ * 	$external_srcs	=	array(
+ * 					1	=>	array(
+ * 						'name'		=>	'Catalog's name',
+ * 						'host'		=>	'catalog's hostname',
+ * 						'dn'		=>	'catalog's base dn',
+ * 						'acc'		=>	'catalog's bind dn',
+ * 						'pw'		=>	'bind dn's password',
+ * 						'obj'		=>	'objectClass that will be used in searches',
+ * 						'branch'	=>	strtolower('attribute used as branches in the catalog tree'),
+ * 					),
+ * 					2 	=>	array(
+ * 						...
+ * 					),
+ * 	);
+ *
+ * external_mappings' format:
+ *
+ * 	$external_mappings	=	array(
+ *							1	=>	array(
+ *								'contact.id_contact'				=>	array('dn'),
+ *								'contact.photo'						=>	array('jpegPhoto'),
+ *								'contact.prefixes.prefix'			=>	false, //used when you don't have an attribute or don't want to use one
+ *								...
+ *							),
+ *							2	=>	array(
+ *								...
+ *							),
+ *		);
+ *
+ */
+?>
Index: /tags/contactcenter/1.20/setup/setup.inc.php
===================================================================
--- /tags/contactcenter/1.20/setup/setup.inc.php	(revision 285)
+++ /tags/contactcenter/1.20/setup/setup.inc.php	(revision 285)
@@ -0,0 +1,79 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/* Basic information about this app */
+	$setup_info['contactcenter']['name']      = 'contactcenter';
+	$setup_info['contactcenter']['title']     = 'ContactCenter';
+	$setup_info['contactcenter']['version']   = '1.20';
+	$setup_info['contactcenter']['app_order'] = 4;
+	$setup_info['contactcenter']['enable']    = 1;
+
+	$setup_info['contactcenter']['author'] = 'Raphael Derosso Pereira, Jonas Goes';
+	$setup_info['contactcenter']['note']   = 'Contact Center is the new eGW addressbook. It manages all contacts, companies and their informations';
+	$setup_info['contactcenter']['license']  = 'GPL';
+	$setup_info['contactcenter']['description'] =
+		'Contact Center is a modern addressbook application that introduces a new way to ' .
+		'do things in the Web Application World. Its key advantages are the possibility to ' .
+		'manage Contacts and Companies independently. Users can access 3 types of catalogs: ' .
+		'Personal (which manages people and companies), Global (LDAP or DB) and Aliens (shared Personal).';
+
+	$setup_info['contactcenter']['maintainer'] = 'Raphael Derosso Pereira';
+	$setup_info['contactcenter']['maintainer_email'] = 'raphaelpereira@users.sourceforge.net';
+
+	/* The hooks this app includes, needed for hooks registration */
+	$setup_info['contactcenter']['hooks'][] = 'admin';
+	$setup_info['contactcenter']['hooks'][] = 'preferences';
+	$setup_info['contactcenter']['hooks'][] = 'config_validate';
+	
+	/* ContactCenter Tables */
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_status';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_prefixes';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_suffixes';
+
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_typeof_ct_rels';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_typeof_ct_addrs';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_typeof_ct_conns';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_typeof_co_rels';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_typeof_co_addrs';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_typeof_co_conns';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_typeof_co_legals';
+
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_state';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_city';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_addresses';
+
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_connections';
+
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_company';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_company_rels';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_company_addrs';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_company_conns';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_company_legals';
+
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_contact';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_contact_rels';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_contact_addrs';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_contact_conns';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_contact_company';
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_contact_grps';
+	
+	$setup_info['contactcenter']['tables'][] = 'phpgw_cc_groups';
+	
+	/* Dependencies for this app to work */
+	$setup_info['contactcenter']['depends'][] = array(
+		'appname' => 'phpgwapi',
+		'versions' => Array('0.9.14', '0.9.15' ,'0.9.24','1.0.0', '1.0.1')
+	);
+?>
Index: /tags/contactcenter/1.20/styles/cc_api.css
===================================================================
--- /tags/contactcenter/1.20/styles/cc_api.css	(revision 2)
+++ /tags/contactcenter/1.20/styles/cc_api.css	(revision 2)
@@ -0,0 +1,31 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+.hidden
+{
+	position: absolute;
+	visibility: hidden;
+}
+
+.loading
+{
+	padding: 1px;
+	width: 130px;
+	height: 36px;
+	border: 2px outset #999;
+	text-align: center;
+	font-weight: bold;
+	font-size: 10pt;
+	font-style: italic;
+	font-family: Verdana;
+}
Index: /tags/contactcenter/1.20/styles/cc.css
===================================================================
--- /tags/contactcenter/1.20/styles/cc.css	(revision 2)
+++ /tags/contactcenter/1.20/styles/cc.css	(revision 2)
@@ -0,0 +1,234 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+.link
+{
+	cursor:pointer;
+	color: #000066;
+	text-decoration: none;
+}
+
+.div_main
+{
+	position: absolute;
+	left: 10px;
+	top: 15px;
+	right: 10px;
+	bottom: 15px;
+	background-color: #fff;
+	border: 1px solid #666666;
+
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+	font-weight: normal;
+	text-align: center;
+}
+
+.div_head
+{
+	position: absolute;
+	left: 10px;
+	top: 10px;
+	right: 10px;
+	height: 70px;
+	background-color: #eee;
+	border: 1px solid #999999;
+}
+
+.div_menu
+{
+	position: absolute;
+	left: 10px;
+	top: 120px;
+	bottom: 10px;
+	width: 150px;
+	background-color: #eeeeee;
+	border: 1px solid #999999;
+}
+
+.div_contact_center
+{
+	position: absolute;
+	left: 170px;
+	top: 120px;
+	right: 10px;
+	bottom: 10px;
+	background-color: #eeeeee;
+	border: 1px solid #999999;
+   	border-style: dotted;
+   	border-width: thin;
+}
+
+.div_cc_add
+{
+	position: absolute;
+	left: 10px;
+	top: 10px;
+	width: 235px;
+	height: 125px;
+	background-color: #eeeeee;
+}
+
+.div_cc_tree
+{
+	position: absolute;
+	left: 10px;
+	top: 145px;
+	bottom: 10px;
+	width: 235px;
+	background-color: #eeeeee;
+	border: 1px solid #999999;
+   	border-style: dotted;
+   	border-width: thin;
+}
+
+.div_cc_main
+{
+	position: absolute;
+	left: 255px;
+	top: 10px;
+	right: 10px;
+	bottom: 10px;
+	background-color: #eeeeee;
+	border: 1px solid #999999;
+   	border-style: dotted;
+   	border-width: thin;
+}
+
+.div_cc_card_space
+{
+	position: absolute;
+	left: 0px;
+	top: 80px;
+	right: 0px;
+	bottom: 0px;
+	background-color: #eeeeee;
+	border: 1px solid #999999;
+   	border-style: dotted;
+   	border-width: thin;
+}
+
+.div_cc_card
+{
+	position: relative;
+	left: 10px;
+	top: 10px;
+	width: 235px;
+	height: 125px;
+}
+
+.layer_cc_card_photo
+{
+	position: absolute;
+	left: 0px;
+	top: 0px;
+	bottom: 0px;
+	width: 70px;
+	text-align: center;
+	visibility: visible;
+}
+
+.layer_cc_card_data
+{
+	position: absolute;
+	left: 75px;
+	top: 0px;
+	right: 25px;
+	bottom: 0px;
+	text-align: center;
+	visibility: visible;
+}
+
+.button {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+	color: #eee;
+	background-color: #bbbbbb;
+	border: 1px solid #eeeeee;
+	font-weight: bold;
+	text-align: center;
+	vertical-align: middle;
+	width: auto;
+	height: auto;
+}
+
+.field {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+	color: #246;
+	background-color: #FFFFFF;
+	margin: 4px;
+	border: 1px solid #aaaaaa;
+}
+
+.tab_box,.tab_box_active 
+{
+	background-color: #D3DCE3;
+	border: 0px solid #D3DCE3;
+	text-align: center;
+	cursor: pointer;
+}
+
+.tab_box_active
+{
+	font-weight: bold;
+	background-color: #E8F0F0;
+}
+
+.tab_box_active,.tab_box:hover 
+{
+	border: 0px solid black;
+	background-color: #E8F0F0;
+}
+
+.letter_box,.letter_box_active 
+{
+	background-color: #D3DCE3;
+	width: 250px;
+	border: 1px solid #D3DCE3;
+	text-align: center;
+	cursor: pointer;
+}
+
+.letter_box_active 
+{
+	font-weight: bold;
+	/*background-color: #E8F0F0;*/
+	background-color: #EEEEEE;
+	color: #0000FF;
+}
+
+.letter_box_active,.letter_box:hover 
+{
+	border: 1px solid black;
+	/*background-color: #E8F0F0;*/
+}
+
+.div_cc_contact_tab
+{
+	position: absolute;
+	visibility: hidden;
+	top: 0px;
+	left: 0px;
+	width: 498px;
+	height: 347px;
+	border: 0px solid #999999;
+}
+
+.div_cc_rectParticipants
+{
+	padding: 1px;
+	border: 2px outset #999999;
+	background-color: WHITE;
+	text-align: left;
+	font-size: 8pt;
+}
Index: /tags/contactcenter/1.20/doc/MER.xml
===================================================================
--- /tags/contactcenter/1.20/doc/MER.xml	(revision 2)
+++ /tags/contactcenter/1.20/doc/MER.xml	(revision 2)
@@ -0,0 +1,1326 @@
+<?xml version="1.0" standalone="yes" ?>
+<DBMODEL Version="4.0">
+<SETTINGS>
+<GLOBALSETTINGS ModelName="MER" IDModel="0" IDVersion="0" VersionStr="1.0.0.0" Comments="" UseVersionHistroy="1" AutoIncVersion="1" DatabaseType="MySQL" ZoomFac="100.00" XPos="1497" YPos="1379" DefaultDataType="4" DefaultTablePrefix="0" DefSaveDBConn="" DefSyncDBConn="" DefQueryDBConn="" Printer="" HPageCount="4.0" PageAspectRatio="1.440892512336408" PageOrientation="1" PageFormat="A4 (210x297 mm, 8.26x11.7 inches)" SelectedPages="" UsePositionGrid="0" PositionGridX="20" PositionGridY="20" TableNameInRefs="0" DefaultTableType="0" ActivateRefDefForNewRelations="1" FKPrefix="" FKPostfix="" CreateFKRefDefIndex="0" DBQuoteCharacter="`" CreateSQLforLinkedObjects="0" DefModelFont="Nimbus Sans L" CanvasWidth="4096" CanvasHeight="2842" />
+<DATATYPEGROUPS>
+<DATATYPEGROUP Name="Numeric Types" Icon="1" />
+<DATATYPEGROUP Name="Date and Time Types" Icon="2" />
+<DATATYPEGROUP Name="String Types" Icon="3" />
+<DATATYPEGROUP Name="Blob and Text Types" Icon="4" />
+<DATATYPEGROUP Name="User defined Types" Icon="5" />
+<DATATYPEGROUP Name="Geographic Types" Icon="6" />
+</DATATYPEGROUPS>
+<DATATYPES>
+<DATATYPE ID="1" IDGroup="0" TypeName="TINYINT" Description="A very small integer. The signed range is -128 to 127. The unsigned range is 0 to 255." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="UNSIGNED" Default="1" />
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="2" IDGroup="0" TypeName="SMALLINT" Description="A small integer. The signed range is -32768 to 32767. The unsigned range is 0 to 65535." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="UNSIGNED" Default="1" />
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="3" IDGroup="0" TypeName="MEDIUMINT" Description="A medium-size integer. The signed range is -8388608 to 8388607. The unsigned range is 0 to 16777215." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="UNSIGNED" Default="1" />
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="4" IDGroup="0" TypeName="INT" Description="A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="1" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="UNSIGNED" Default="0" />
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="5" IDGroup="0" TypeName="INTEGER" Description="A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="1" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="UNSIGNED" Default="1" />
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="6" IDGroup="0" TypeName="BIGINT" Description="A large integer. The signed range is -9223372036854775808 to 9223372036854775807. The unsigned range is 0 to 18446744073709551615." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="UNSIGNED" Default="0" />
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="7" IDGroup="0" TypeName="FLOAT" Description="A small (single-precision) floating-point number. Cannot be unsigned. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="precision" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="8" IDGroup="0" TypeName="FLOAT" Description="A small (single-precision) floating-point number. Cannot be unsigned. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+<PARAM Name="decimals" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="9" IDGroup="0" TypeName="DOUBLE" Description="A normal-size (double-precision) floating-point number. Cannot be unsigned. Allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+<PARAM Name="decimals" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="10" IDGroup="0" TypeName="DOUBLE PRECISION" Description="This is a synonym for DOUBLE." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+<PARAM Name="decimals" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="11" IDGroup="0" TypeName="REAL" Description="This is a synonym for DOUBLE." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+<PARAM Name="decimals" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="12" IDGroup="0" TypeName="DECIMAL" Description="An unpacked floating-point number. Cannot be unsigned. Behaves like a CHAR column." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="3" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+<PARAM Name="decimals" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="13" IDGroup="0" TypeName="NUMERIC" Description="This is a synonym for DECIMAL." ParamCount="2" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="3" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+<PARAM Name="decimals" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="ZEROFILL" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="14" IDGroup="1" TypeName="DATE" Description="A date. The supported range is \a1000-01-01\a to \a9999-12-31\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="15" IDGroup="1" TypeName="DATETIME" Description="A date and time combination. The supported range is \a1000-01-01 00:00:00\a to \a9999-12-31 23:59:59\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="16" IDGroup="1" TypeName="TIMESTAMP" Description="A timestamp. The range is \a1970-01-01 00:00:00\a to sometime in the year 2037. The length can be 14 (or missing), 12, 10, 8, 6, 4, or 2 representing YYYYMMDDHHMMSS, ... , YYYYMMDD, ... , YY formats." ParamCount="1" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+</PARAMS>
+</DATATYPE>
+<DATATYPE ID="17" IDGroup="1" TypeName="TIME" Description="A time. The range is \a-838:59:59\a to \a838:59:59\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="18" IDGroup="1" TypeName="YEAR" Description="A year in 2- or 4-digit format (default is 4-digit)." ParamCount="1" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+</PARAMS>
+</DATATYPE>
+<DATATYPE ID="19" IDGroup="2" TypeName="CHAR" Description="A fixed-length string (1 to 255 characters) that is always right-padded with spaces to the specified length when stored. values are sorted and compared in case-insensitive fashion according to the default character set unless the BINARY keyword is given." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="BINARY" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="20" IDGroup="2" TypeName="VARCHAR" Description="A variable-length string (1 to 255 characters). Values are sorted and compared in case-sensitive fashion unless the BINARY keyword is given." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="length" />
+</PARAMS>
+<OPTIONS>
+<OPTION Name="BINARY" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="21" IDGroup="2" TypeName="BIT" Description="This is a synonym for CHAR(1)." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="22" IDGroup="2" TypeName="BOOL" Description="This is a synonym for CHAR(1)." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="23" IDGroup="3" TypeName="TINYBLOB" Description="A column maximum length of 255 (2^8 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="24" IDGroup="3" TypeName="BLOB" Description="A column maximum length of 65535 (2^16 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="25" IDGroup="3" TypeName="MEDIUMBLOB" Description="A column maximum length of 16777215 (2^24 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="26" IDGroup="3" TypeName="LONGBLOB" Description="A column maximum length of 4294967295 (2^32 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="27" IDGroup="3" TypeName="TINYTEXT" Description="A column maximum length of 255 (2^8 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="28" IDGroup="3" TypeName="TEXT" Description="A column maximum length of 65535 (2^16 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="29" IDGroup="3" TypeName="MEDIUMTEXT" Description="A column maximum length of 16777215 (2^24 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="30" IDGroup="3" TypeName="LONGTEXT" Description="A column maximum length of 4294967295 (2^32 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="31" IDGroup="3" TypeName="ENUM" Description="An enumeration. A string object that can have only one value, chosen from the list of values." ParamCount="1" OptionCount="0" ParamRequired="1" EditParamsAsString="1" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="values" />
+</PARAMS>
+</DATATYPE>
+<DATATYPE ID="32" IDGroup="3" TypeName="SET" Description="A set. A string object that can have zero or more values, each of which must be chosen from the list of values." ParamCount="1" OptionCount="0" ParamRequired="1" EditParamsAsString="1" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<PARAMS>
+<PARAM Name="values" />
+</PARAMS>
+</DATATYPE>
+<DATATYPE ID="33" IDGroup="4" TypeName="Varchar(20)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<OPTIONS>
+<OPTION Name="BINARY" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="34" IDGroup="4" TypeName="Varchar(45)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<OPTIONS>
+<OPTION Name="BINARY" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="35" IDGroup="4" TypeName="Varchar(255)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+<OPTIONS>
+<OPTION Name="BINARY" Default="0" />
+</OPTIONS>
+</DATATYPE>
+<DATATYPE ID="36" IDGroup="5" TypeName="GEOMETRY" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="38" IDGroup="5" TypeName="LINESTRING" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="39" IDGroup="5" TypeName="POLYGON" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="40" IDGroup="5" TypeName="MULTIPOINT" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="41" IDGroup="5" TypeName="MULTILINESTRING" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="42" IDGroup="5" TypeName="MULTIPOLYGON" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+<DATATYPE ID="43" IDGroup="5" TypeName="GEOMETRYCOLLECTION" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
+</DATATYPE>
+</DATATYPES>
+<COMMON_DATATYPES>
+<COMMON_DATATYPE ID="5" />
+<COMMON_DATATYPE ID="8" />
+<COMMON_DATATYPE ID="20" />
+<COMMON_DATATYPE ID="15" />
+<COMMON_DATATYPE ID="22" />
+<COMMON_DATATYPE ID="28" />
+<COMMON_DATATYPE ID="26" />
+<COMMON_DATATYPE ID="33" />
+<COMMON_DATATYPE ID="34" />
+<COMMON_DATATYPE ID="35" />
+</COMMON_DATATYPES>
+<TABLEPREFIXES>
+<TABLEPREFIX Name="Default (no prefix)" />
+</TABLEPREFIXES>
+<REGIONCOLORS>
+<REGIONCOLOR Color="Red=#FFEEEC" />
+<REGIONCOLOR Color="Yellow=#FEFDED" />
+<REGIONCOLOR Color="Green=#EAFFE5" />
+<REGIONCOLOR Color="Cyan=#ECFDFF" />
+<REGIONCOLOR Color="Blue=#F0F1FE" />
+<REGIONCOLOR Color="Magenta=#FFEBFA" />
+</REGIONCOLORS>
+<POSITIONMARKERS>
+<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
+<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
+<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
+<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
+<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
+<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
+<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
+<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
+<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
+<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
+<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
+</POSITIONMARKERS>
+</SETTINGS>
+<METADATA>
+<REGIONS>
+</REGIONS>
+<TABLES>
+<TABLE ID="2546" Tablename="phpgw_addressbook_contact" PrevTableName="Table_03" XPos="1989" YPos="1529" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="4" >
+<COLUMNS>
+<COLUMN ID="2662" ColName="id_contact" PrevColName="id" Pos="14" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2868" ColName="id_owner" PrevColName="" Pos="15" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2816" ColName="id_status" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2553" ColName="b_title" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2554" ColName="b_department" PrevColName="" Pos="2" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2561" ColName="p_photo" PrevColName="" Pos="6" idDatatype="24" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2566" ColName="p_alias" PrevColName="" Pos="11" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2818" ColName="id_prefix" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2563" ColName="p_first_name" PrevColName="" Pos="8" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2564" ColName="p_middle_name" PrevColName="" Pos="9" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2565" ColName="p_last_name" PrevColName="" Pos="10" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2820" ColName="id_sulfix" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2568" ColName="p_birthdate" PrevColName="" Pos="13" idDatatype="14" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2569" ColName="p_sex" PrevColName="" Pos="14" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2575" ColName="p_pgp" PrevColName="" Pos="12" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2576" ColName="p_notes" PrevColName="" Pos="13" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2966" ColName="is_global" PrevColName="is_private" Pos="16" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2602" />
+<RELATION_START ID="2604" />
+<RELATION_START ID="2611" />
+<RELATION_START ID="2696" />
+<RELATION_START ID="2756" />
+</RELATIONS_START>
+<RELATIONS_END>
+<RELATION_END ID="2641" />
+<RELATION_END ID="2652" />
+<RELATION_END ID="2659" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2663" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2662" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2579" Tablename="phpgw_addressbook_company" PrevTableName="Table_04" XPos="2646" YPos="1421" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="5" >
+<COLUMNS>
+<COLUMN ID="2590" ColName="id_company" PrevColName="id" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2931" ColName="id_owner" PrevColName="" Pos="3" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2592" ColName="name" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2595" ColName="notes" PrevColName="" Pos="2" idDatatype="28" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2613" />
+<RELATION_START ID="2706" />
+<RELATION_START ID="2764" />
+<RELATION_START ID="2949" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2591" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2590" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2596" Tablename="phpgw_addressbook_relationship" PrevTableName="Table_05" XPos="1978" YPos="1948" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="4" >
+<COLUMNS>
+<COLUMN ID="2777" ColName="id_contact" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2808" ColName="id_related" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2810" ColName="id_typeof_relation" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_END>
+<RELATION_END ID="2602" />
+<RELATION_END ID="2604" />
+<RELATION_END ID="2675" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2780" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2777" LengthParam="0" />
+<INDEXCOLUMN idColumn="2808" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2606" Tablename="phpgw_addressbook_contact_company" PrevTableName="Table_06" XPos="2269" YPos="1437" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="7" >
+<COLUMNS>
+<COLUMN ID="2778" ColName="id_contact" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2804" ColName="id_company" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_END>
+<RELATION_END ID="2611" />
+<RELATION_END ID="2613" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2609" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2778" LengthParam="0" />
+<INDEXCOLUMN idColumn="2804" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2615" Tablename="phpgw_addressbook_prefixes" PrevTableName="Table_07" XPos="1689" YPos="1647" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="10" >
+<COLUMNS>
+<COLUMN ID="2625" ColName="id_prefix" PrevColName="id" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2619" ColName="prefix" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2652" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2626" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2625" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2629" Tablename="phpgw_addressbook_sulfix" PrevTableName="Table_08" XPos="1702" YPos="1722" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="12" >
+<COLUMNS>
+<COLUMN ID="2631" ColName="id_sulfix" PrevColName="id" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2633" ColName="sulfix" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2641" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2632" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2631" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2654" Tablename="phpgw_addressbook_status" PrevTableName="Table_09" XPos="1695" YPos="1574" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="14" >
+<COLUMNS>
+<COLUMN ID="2656" ColName="id_status" PrevColName="id" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2658" ColName="status_name" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2659" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2657" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2656" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2669" Tablename="phpgw_addressbook_typeof_relations" PrevTableName="Table_10" XPos="2288" YPos="1950" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="16" >
+<COLUMNS>
+<COLUMN ID="2671" ColName="id_typeof_relation" PrevColName="id" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2673" ColName="relation_name" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2813" ColName="issubordinated" PrevColName="" Pos="2" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2675" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2672" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2671" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2679" Tablename="phpgw_addressbook_address" PrevTableName="Table_11" XPos="2280" YPos="1111" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="18" >
+<COLUMNS>
+<COLUMN ID="2719" ColName="id_address" PrevColName="id" Pos="7" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2929" ColName="id_country" PrevColName="" Pos="1" idDatatype="19" DatatypeParams="(2)" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2843" ColName="id_state" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2833" ColName="id_city" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2787" ColName="id_typeof_address" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2683" ColName="address" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2684" ColName="postal_code" PrevColName="zip" Pos="2" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2685" ColName="po_box" PrevColName="" Pos="3" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2694" />
+<RELATION_START ID="2708" />
+</RELATIONS_START>
+<RELATIONS_END>
+<RELATION_END ID="2716" />
+<RELATION_END ID="2832" />
+<RELATION_END ID="2842" />
+<RELATION_END ID="2928" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2720" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2719" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2689" Tablename="phpgw_addressbook_contact_address" PrevTableName="Table_10" XPos="1971" YPos="1203" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="19" >
+<COLUMNS>
+<COLUMN ID="2779" ColName="id_contact" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2784" ColName="id_address" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2789" ColName="isdefault" PrevColName="" Pos="2" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_END>
+<RELATION_END ID="2694" />
+<RELATION_END ID="2696" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2692" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2779" LengthParam="0" />
+<INDEXCOLUMN idColumn="2784" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2701" Tablename="phpgw_addressbook_company_address" PrevTableName="Table_11" XPos="2624" YPos="1179" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="22" >
+<COLUMNS>
+<COLUMN ID="2785" ColName="id_address" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2805" ColName="id_company" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2791" ColName="isdefault" PrevColName="" Pos="2" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_END>
+<RELATION_END ID="2706" />
+<RELATION_END ID="2708" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2704" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2785" LengthParam="0" />
+<INDEXCOLUMN idColumn="2805" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2711" Tablename="phpgw_addressbook_typeof_address" PrevTableName="Table_12" XPos="2473" YPos="889" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="25" >
+<COLUMNS>
+<COLUMN ID="2713" ColName="id_typeof_address" PrevColName="id" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2715" ColName="type_name" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2716" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2714" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2713" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2724" Tablename="phpgw_addressbook_others_access" PrevTableName="Table_13" XPos="1608" YPos="1924" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="27" >
+<COLUMNS>
+<COLUMN ID="2726" ColName="id_owner" PrevColName="" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2728" ColName="id_other" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2729" ColName="read_access" PrevColName="" Pos="2" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2730" ColName="write_acces" PrevColName="" Pos="3" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2731" ColName="create_access" PrevColName="" Pos="4" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2964" ColName="remove_access" PrevColName="" Pos="5" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<INDICES>
+<INDEX ID="2727" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2726" LengthParam="0" />
+<INDEXCOLUMN idColumn="2728" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2732" Tablename="phpgw_addressbook_connections" PrevTableName="Table_14" XPos="2650" YPos="1682" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="28" >
+<COLUMNS>
+<COLUMN ID="2746" ColName="id_connection" PrevColName="id" Pos="3" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2799" ColName="id_typeof_connection" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2737" ColName="name" PrevColName="" Pos="2" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2738" ColName="value" PrevColName="" Pos="3" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2754" />
+<RELATION_START ID="2762" />
+</RELATIONS_START>
+<RELATIONS_END>
+<RELATION_END ID="2744" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2748" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2746" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2739" Tablename="phpgw_addressbook_typeof_connection" PrevTableName="Table_15" XPos="2635" YPos="1927" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="29" >
+<COLUMNS>
+<COLUMN ID="2741" ColName="id_typeof_connection" PrevColName="id" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2743" ColName="type_name" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2802" ColName="isdefault" PrevColName="" Pos="2" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2744" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2742" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2741" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2749" Tablename="phpgw_addressbook_contact_connections" PrevTableName="Table_16" XPos="2255" YPos="1699" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="31" >
+<COLUMNS>
+<COLUMN ID="2753" ColName="id_contact" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2797" ColName="id_connection" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_END>
+<RELATION_END ID="2754" />
+<RELATION_END ID="2756" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2752" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2753" LengthParam="0" />
+<INDEXCOLUMN idColumn="2797" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2758" Tablename="phpgw_addressbook_company_connections" PrevTableName="Table_17" XPos="2977" YPos="1686" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="34" >
+<COLUMNS>
+<COLUMN ID="2798" ColName="id_connection" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2806" ColName="id_company" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_END>
+<RELATION_END ID="2762" />
+<RELATION_END ID="2764" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2761" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2798" LengthParam="0" />
+<INDEXCOLUMN idColumn="2806" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2822" Tablename="phpgw_addressbook_city" PrevTableName="Table_18" XPos="2288" YPos="888" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="37" >
+<COLUMNS>
+<COLUMN ID="2824" ColName="id_city" PrevColName="" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2841" ColName="id_state" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2826" ColName="name" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2830" ColName="timezone" PrevColName="" Pos="4" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+<OPTIONSELECT Value="1" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2827" ColName="geo_latitude" PrevColName="" Pos="2" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2828" ColName="geo_longitude" PrevColName="" Pos="3" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2832" />
+</RELATIONS_START>
+<RELATIONS_END>
+<RELATION_END ID="2840" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2825" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2824" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2834" Tablename="phpgw_addressbook_state" PrevTableName="Table_19" XPos="1980" YPos="925" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="39" >
+<COLUMNS>
+<COLUMN ID="2836" ColName="id_state" PrevColName="" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2863" ColName="id_country" PrevColName="" Pos="3" idDatatype="19" DatatypeParams="(2)" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2838" ColName="name" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2839" ColName="symbol" PrevColName="" Pos="2" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2840" />
+<RELATION_START ID="2842" />
+</RELATIONS_START>
+<RELATIONS_END>
+<RELATION_END ID="2926" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2837" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2836" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2870" Tablename="phpgw_common_localization_info" PrevTableName="Table_21" XPos="1425" YPos="932" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="57" >
+<COLUMNS>
+<COLUMN ID="2956" ColName="localization_iso_name" PrevColName="default_name" Pos="18" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2874" ColName="number_decimal_symbol" PrevColName="" Pos="1" idDatatype="19" DatatypeParams="(1)" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2875" ColName="number_decimal_lenght" PrevColName="" Pos="2" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2876" ColName="number_digits_group_symbol" PrevColName="" Pos="3" idDatatype="19" DatatypeParams="(1)" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2877" ColName="number_digits_group_lenght" PrevColName="" Pos="4" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2878" ColName="number_negative_symbol" PrevColName="" Pos="5" idDatatype="19" DatatypeParams="(1)" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2880" ColName="number_show_left_zeros" PrevColName="" Pos="7" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2881" ColName="number_list_separator" PrevColName="" Pos="8" idDatatype="19" DatatypeParams="(1)" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2882" ColName="measure_type" PrevColName="measure_type_id" Pos="9" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2883" ColName="monetary_symbol" PrevColName="" Pos="10" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2888" ColName="monetary_symbol_on_left" PrevColName="" Pos="11" idDatatype="22" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2889" ColName="date_separator" PrevColName="date_" Pos="11" idDatatype="19" DatatypeParams="(1)" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2895" ColName="id_date_format" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2903" ColName="id_date_extended" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2913" ColName="id_time_format" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2915" ColName="time_separator" PrevColName="" Pos="15" idDatatype="19" DatatypeParams="(1)" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2916" ColName="time_am_symbol" PrevColName="" Pos="16" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2917" ColName="time_pm_symbol" PrevColName="" Pos="17" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_END>
+<RELATION_END ID="2894" />
+<RELATION_END ID="2902" />
+<RELATION_END ID="2912" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2873" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2956" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2885" Tablename="phpgw_common_date_format" PrevTableName="Table_22" XPos="1180" YPos="925" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="58" >
+<COLUMNS>
+<COLUMN ID="2891" ColName="id_date_format" PrevColName="" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2893" ColName="format" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2894" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2892" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2891" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2897" Tablename="phpgw_common_date_extended" PrevTableName="Table_22" XPos="1162" YPos="1000" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="60" >
+<COLUMNS>
+<COLUMN ID="2899" ColName="id_date_extended" PrevColName="" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2901" ColName="format" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2902" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2900" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2899" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2905" Tablename="phpgw_common_time_format" PrevTableName="Table_22" XPos="1180" YPos="1116" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="58" >
+<COLUMNS>
+<COLUMN ID="2906" ColName="id_time_format" PrevColName="id_date_format" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2907" ColName="format" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2912" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2909" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2906" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2918" Tablename="phpgw_common_country_list" PrevTableName="Table_24" XPos="1739" YPos="968" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="64" >
+<COLUMNS>
+<COLUMN ID="2920" ColName="id_country" PrevColName="" Pos="0" idDatatype="19" DatatypeParams="(2)" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2922" ColName="name" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2926" />
+<RELATION_START ID="2928" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2921" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2920" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2932" Tablename="phpgw_addressbook_company_legal" PrevTableName="Table_25" XPos="2983" YPos="1418" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="69" >
+<COLUMNS>
+<COLUMN ID="2934" ColName="id_company_legal" PrevColName="" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2950" ColName="id_company" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2943" ColName="id_company_typeof_legal" PrevColName="" Pos="1" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2947" ColName="legal_info_name" PrevColName="" Pos="3" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2936" ColName="legal_info_value" PrevColName="legal_value" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_END>
+<RELATION_END ID="2942" />
+<RELATION_END ID="2949" />
+</RELATIONS_END>
+<INDICES>
+<INDEX ID="2935" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2934" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+<TABLE ID="2937" Tablename="phpgw_addressbook_company_typeof_legal" PrevTableName="Table_26" XPos="2966" YPos="1571" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="70" >
+<COLUMNS>
+<COLUMN ID="2939" ColName="id_company_typeof_legal" PrevColName="" Pos="0" idDatatype="4" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="1" />
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+<COLUMN ID="2941" ColName="legal_type_name" PrevColName="" Pos="1" idDatatype="20" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<OPTIONSELECTED>
+<OPTIONSELECT Value="0" />
+</OPTIONSELECTED>
+</COLUMN>
+</COLUMNS>
+<RELATIONS_START>
+<RELATION_START ID="2942" />
+</RELATIONS_START>
+<INDICES>
+<INDEX ID="2940" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
+<INDEXCOLUMNS>
+<INDEXCOLUMN idColumn="2939" LengthParam="0" />
+</INDEXCOLUMNS>
+</INDEX>
+</INDICES>
+</TABLE>
+</TABLES>
+<RELATIONS>
+<RELATION ID="2602" RelationName="Owner" Kind="1" SrcTable="2546" DestTable="2596" FKFields="id_contact=id_contact\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="5" />
+<RELATION ID="2604" RelationName="Related" Kind="1" SrcTable="2546" DestTable="2596" FKFields="id_contact=id_related\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="6" />
+<RELATION ID="2611" RelationName="Works_on" Kind="1" SrcTable="2546" DestTable="2606" FKFields="id_contact=id_contact\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="8" />
+<RELATION ID="2613" RelationName="Company_workers" Kind="1" SrcTable="2579" DestTable="2606" FKFields="id_company=id_company\n" FKFieldsComments="\n" relDirection="4" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="9" />
+<RELATION ID="2641" RelationName="Person_sulfix" Kind="2" SrcTable="2629" DestTable="2546" FKFields="id_sulfix=id_sulfix\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="13" />
+<RELATION ID="2652" RelationName="Person_prefix" Kind="2" SrcTable="2615" DestTable="2546" FKFields="id_prefix=id_prefix\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="13" />
+<RELATION ID="2659" RelationName="Register_status" Kind="2" SrcTable="2654" DestTable="2546" FKFields="id_status=id_status\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="15" />
+<RELATION ID="2675" RelationName="relation_type" Kind="2" SrcTable="2669" DestTable="2596" FKFields="id_typeof_relation=id_typeof_relation\n" FKFieldsComments="\n" relDirection="4" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="17" />
+<RELATION ID="2694" RelationName="Address_of" Kind="1" SrcTable="2679" DestTable="2689" FKFields="id_address=id_address\n" FKFieldsComments="\n" relDirection="4" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="20" />
+<RELATION ID="2696" RelationName="Address_owner" Kind="1" SrcTable="2546" DestTable="2689" FKFields="id_contact=id_contact\n" FKFieldsComments="\n" relDirection="1" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="21" />
+<RELATION ID="2706" RelationName="Address_owner" Kind="1" SrcTable="2579" DestTable="2701" FKFields="id_company=id_company\n" FKFieldsComments="\n" relDirection="1" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="23" />
+<RELATION ID="2708" RelationName="Address_of" Kind="1" SrcTable="2679" DestTable="2701" FKFields="id_address=id_address\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="24" />
+<RELATION ID="2716" RelationName="Type_of" Kind="2" SrcTable="2711" DestTable="2679" FKFields="id_typeof_address=id_typeof_address\n" FKFieldsComments="\n" relDirection="4" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="26" />
+<RELATION ID="2744" RelationName="Type_of" Kind="2" SrcTable="2739" DestTable="2732" FKFields="id_typeof_connection=id_typeof_connection\n" FKFieldsComments="\n" relDirection="1" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="30" />
+<RELATION ID="2754" RelationName="Contact_of" Kind="1" SrcTable="2732" DestTable="2749" FKFields="id_connection=id_connection\n" FKFieldsComments="\n" relDirection="4" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="32" />
+<RELATION ID="2756" RelationName="Contact_owner" Kind="1" SrcTable="2546" DestTable="2749" FKFields="id_contact=id_contact\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="33" />
+<RELATION ID="2762" RelationName="Contact_of" Kind="1" SrcTable="2732" DestTable="2758" FKFields="id_connection=id_connection\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="1" CaptionOffsetY="-47" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="35" />
+<RELATION ID="2764" RelationName="Contact_owner" Kind="1" SrcTable="2579" DestTable="2758" FKFields="id_company=id_company\n" FKFieldsComments="\n" relDirection="2" MidOffset="5" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="36" />
+<RELATION ID="2832" RelationName="City_of" Kind="2" SrcTable="2822" DestTable="2679" FKFields="id_city=id_city\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="38" />
+<RELATION ID="2840" RelationName="State_of" Kind="2" SrcTable="2834" DestTable="2822" FKFields="id_state=id_state\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="40" />
+<RELATION ID="2842" RelationName="State_of" Kind="2" SrcTable="2834" DestTable="2679" FKFields="id_state=id_state\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="41" />
+<RELATION ID="2894" RelationName="Date format" Kind="2" SrcTable="2885" DestTable="2870" FKFields="id_date_format=id_date_format\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="59" />
+<RELATION ID="2902" RelationName="Date extended" Kind="2" SrcTable="2897" DestTable="2870" FKFields="id_date_extended=id_date_extended\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="61" />
+<RELATION ID="2912" RelationName="Time format" Kind="2" SrcTable="2905" DestTable="2870" FKFields="id_time_format=id_time_format\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="63" />
+<RELATION ID="2926" RelationName="Country_of" Kind="2" SrcTable="2918" DestTable="2834" FKFields="id_country=id_country\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="66" />
+<RELATION ID="2928" RelationName="Country of" Kind="2" SrcTable="2918" DestTable="2679" FKFields="id_country=id_country\n" FKFieldsComments="\n" relDirection="2" MidOffset="83" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="68" />
+<RELATION ID="2942" RelationName="Legal Info Type" Kind="2" SrcTable="2937" DestTable="2932" FKFields="id_company_typeof_legal=id_company_typeof_legal\n" FKFieldsComments="\n" relDirection="1" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-59" CaptionOffsetY="-24" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="71" />
+<RELATION ID="2949" RelationName="Legal Information" Kind="2" SrcTable="2579" DestTable="2932" FKFields="id_company=id_company\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=1\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="73" />
+</RELATIONS>
+<NOTES>
+<NOTE ID="2848" NoteName="Note_01" XPos="1859" YPos="1459" NoteText="This is the Main Personal Addressbook\ntable. It contains the personal information\nof a single contact.\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="44" />
+<NOTE ID="2849" NoteName="Note_02" XPos="2402" YPos="1066" NoteText="This table stores Addresses information.\nEach address has it\as own unique ID.\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="45" />
+<NOTE ID="2850" NoteName="Note_03" XPos="1977" YPos="1138" NoteText="This table associates one contact with its\naddresses. This enable each contact to\nhave virtualy unlimited addresses.\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="46" />
+<NOTE ID="2851" NoteName="Note_04" XPos="2486" YPos="807" NoteText="Types of Addresses. Ex.:\n- Comercial;\n- Residential;\n- Billing;\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="47" />
+<NOTE ID="2852" NoteName="Note_03" XPos="2628" YPos="1119" NoteText="This table associates one company with its\naddresses. This enable each company to\nhave virtualy unlimited addresses.\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="46" />
+<NOTE ID="2854" NoteName="Note_06" XPos="2595" YPos="1776" NoteText="This table holds ways of\ncommunication. Ex.:\n- Home Phone;\n- Personal Email;\n- Personal ICQ UIN;\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="49" />
+<NOTE ID="2855" NoteName="Note_07" XPos="2659" YPos="2004" NoteText="Types of Connections. Ex.:\n- Phone;\n- Email;\n- Instant Messaging.\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="50" />
+<NOTE ID="2856" NoteName="Note_03" XPos="2646" YPos="1599" NoteText="This table associates one company with its\nways of communication (connections).\nThis enable each company to have\nvirtualy unlimited Connections.\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="46" />
+<NOTE ID="2858" NoteName="Note_03" XPos="2267" YPos="1760" NoteText="This table associates one contact with its\nways of communication (connections).\nThis enable each contact to have\nvirtualy unlimited Connections.\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="46" />
+<NOTE ID="2860" NoteName="Note_10" XPos="1979" YPos="2030" NoteText="This table makes it possible to stablish\nrelations between contacts.\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="53" />
+<NOTE ID="2861" NoteName="Note_11" XPos="2309" YPos="2030" NoteText="Types of Relations. Ex.:\n- Manager;\n- Secretary (subordinated);\n- Child;\n- Spouse;\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="54" />
+<NOTE ID="2864" NoteName="Note_12" XPos="1959" YPos="793" NoteText="id_country associates this state with\nthe country it belongs to, but the country\ntable and its localization defaults\n(monetary info, number info, date format,\netc) should not be restricted to the\nAddressbook, so it\a s these information\nare \a common\a .\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="54" />
+<NOTE ID="2865" NoteName="Note_13" XPos="2139" YPos="1332" NoteText="This associates each contact with its company (ies) and the opposite.\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="55" />
+<NOTE ID="2866" NoteName="Note_14" XPos="1607" YPos="1862" NoteText="This isolated table is responsible for \nkeeping the permitions others have to\naccess ones private addressbook\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="56" />
+<NOTE ID="2927" NoteName="Note_15" XPos="1438" YPos="864" NoteText="These are the Localization defaults for\nnumbers, money, date and time.\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="67" />
+<NOTE ID="2948" NoteName="Note_16" XPos="2993" YPos="1335" NoteText="This table holds the Legal Information\nof the Companies in a way that is\nindependent from Country/Location\nLaws.\n" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="73" />
+</NOTES>
+<IMAGES>
+<IMAGE ID="2846" ImageName="Image_01" XPos="1779" YPos="1920" Width="1" Height="1" StrechImg="1" ImgWidth="0" ImgHeight="0" ImgFormat="BMP" ImgData="" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="43" />
+</IMAGES>
+</METADATA>
+<PLUGINDATA>
+<PLUGINDATARECORDS>
+</PLUGINDATARECORDS>
+</PLUGINDATA>
+<QUERYDATA>
+<QUERYRECORDS>
+</QUERYRECORDS>
+</QUERYDATA>
+<LINKEDMODELS>
+</LINKEDMODELS>
+</DBMODEL>
Index: /tags/contactcenter/1.20/doc/CC-ACLs.txt
===================================================================
--- /tags/contactcenter/1.20/doc/CC-ACLs.txt	(revision 2)
+++ /tags/contactcenter/1.20/doc/CC-ACLs.txt	(revision 2)
@@ -0,0 +1,27 @@
+Possible Permissions for Entries:
+
+0  - No Permissions;
+1  - Read;
+2  - Edit;
+4  - Delete;
+16 - Manage ACLs; (not sure)
+
+
+Possible Permissions for Entries Categories:
+
+0  - No Permissions;
+1  - Read;
+2  - Edit;
+4  - Delete;
+8  - Add;
+16 - Manage ACLs; (not sure)
+
+
+Possible Permissions for Catalogues:
+
+0  - No Permissions;
+1  - Read;
+2  - Edit;
+4  - Delete;
+8  - Add;
+16 - Manage ACLs; (not sure)
Index: /tags/contactcenter/1.20/doc/change_log.txt
===================================================================
--- /tags/contactcenter/1.20/doc/change_log.txt	(revision 285)
+++ /tags/contactcenter/1.20/doc/change_log.txt	(revision 285)
@@ -0,0 +1,33 @@
+Esse arquivo descreve todas as correções, alterações e novas implementações do 
+módulo Catálogo de Endereços 1.0, e a partir da versão 29/11/2006 [1.0.0]
+Nilton Emilio Buhrer Neto.
+
+--------------------------- NOTA IMPORTANTE --------------------------
+
+A partir de Agosto de 2007, todos os registros de bugs aqui relatados foram
+transferidos para o site do ExpressoLivre, no Wiki-Trac do módulo.
+Vide: http://www.expressolivre.org/dev/wiki/contactcenter/changelog
+
+----------------------------------------------------------------------
+27/02/2007 - [1.0.005]
+- Excluído o diretorio contactcenter/templates/celepar e seus arquivos foram movidos para
+contactcenter/templates/default. Essa alteraçao foi feita para corrigir bug que ocorre qdo
+se cria um template com nome diferente de celepar.
+
+10/04/2007 - [1.0.006]
+- Código que carrega foto do usuário, vindo do LDAP, foi alterado para usar o cache do navegador,
+diminuindo o acesso ao LDAP;
+- Código que filtra para buscar os grupos de usuários foi comentado, pois dá problema na visualização.
+Atualmente o Catálogo de Endereços só lista usuários e listas.
+- Corrigido problema ao copiar um contato do catálogo geral para o pessoal, quando esse tinha mais que um
+resultado, procurado pelo UID. Agora a busca é feita através do seu DN, devido aos referrals.
+
+24/04/2007 - [1.13]
+- Foi adicionado importação e exportação aos contatos do outlook 2000 (em inglês e português)
+- Foi adicionado a importação e exportação com suporte ao campo de telefone. Em todos os tipos de arquivos.
+- Corrigido problema de lentidão ao buscar o nome/email dos participantes de uma lista pública grande.
+
+25/06/2007 - [1.14]
+- Corrigido problema na janela de adicionar grupos, que trazia também os telefones de todos os contatos.
+- Menu de opções "Novo" preparado para internacionalização.
+- Corrigido erro javascript do divScrollMain.
Index: /tags/contactcenter/1.20/inc/class.so_legal.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_legal.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_legal.inc.php	(revision 2)
@@ -0,0 +1,190 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+
+	include_once("class.so_main.inc.php");
+	
+	class so_company_legal extends so_main 
+	{
+	
+		function so_company_legal ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_company_legal' => array(
+					'name'  => 'id_company_legal',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'id_typeof_company_legal' => array(
+					'name'  => 'id_typeof_company_legal',
+					'type'  => 'foreign',
+					'association' => array(
+						'table' => 'phpgw_cc_typeof_co_legals',
+						'field' => 'id_typeof_company_legal'
+					),
+					'state' => 'empty',
+					'value' => false
+				),
+				'id_company' => array(
+					'name'  => 'id_company',
+					'type'  => 'foreign',
+					'association' => array(
+						'table' => 'phpgw_cc_company',
+						'field' => 'id_company'
+					),
+					'state' => 'empty',
+					'value' => false
+				),
+				'legal_info_name' => array(
+					'name'  => 'legal_info_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'legal_info_value' => array(
+					'name'  => 'legal_info_value',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+
+			$this->db_tables = array(
+				'phpgw_cc_company_legals' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_company_legal']),
+						'foreign' => array(
+							&$this->main_fields['id_typeof_company_legal'],
+							&$this->main_fields['id_company']
+						)
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+
+			if($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+	
+
+		/*********************************************************************\
+		 *                   Methods to Get Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function get_id_type
+			@abstract Returns the ID of the Type of this Legal
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_id_type (  )
+		{
+			return $this->main_fields['id_type']['value'];
+		}
+	
+		/*!
+		
+			@function get_name
+			@abstract Returns the Legal Name
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_name (  )
+		{
+			return $this->main_fields['legal_name']['value'];
+		}
+	
+		/*!
+		
+			@function get_value
+			@abstract Returns the Legal Value
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_value (  )
+		{
+			return $this->main_fields['legal_value']['value'];
+		}
+	
+
+
+		/*********************************************************************\
+		 *                   Methods to Get Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function set_id_type
+			@abstract Sets the Type ID of this Legal
+			@author Raphael Derosso Pereira
+			
+			@param integer $id_type The Type ID
+		
+		*/
+		function set_id_type ( $id_type )
+		{
+			$this->main_fields['id_type']['value'] = $id_type; 
+			$this->manage_fields($this->main_fields['id_type'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_name
+			@abstract Sets the Legal Name
+			@author Raphael Derosso Pereira
+		
+			@param string $name The Legal Name
+		
+		*/
+		function set_name ( $name )
+		{
+			$this->main_fields['legal_info_name']['value'] = $name; 
+			$this->manage_fields($this->main_fields['legal_info_name'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_value
+			@abstract Sets the Legal value
+			@author Raphael Derosso Pereira
+		
+			@param string $value The Legal Value
+		
+		*/
+		function set_value ( $value )
+		{
+			$this->main_fields['legal_info_value']['value'] = $value; 
+			$this->manage_fields($this->main_fields['legal_info_value'], 'changed');
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_main.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_main.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_main.inc.php	(revision 2)
@@ -0,0 +1,902 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*!
+		This is the main SO class. Every other SO class is derived from this. 
+		The purpose of this class is to centralize the search, checkout and 
+		commit methods, that are designed to be common to all derived classes.
+	*/
+
+	class so_main 
+	{
+
+		// The ID of the class, usually its primary key on the DB.
+		var $id;
+		
+		// The state of this object
+		var $state;
+		
+		// The DB object
+		var $db;
+		
+		/**
+		 * The DB tables' used by the class
+		 *
+		 * This attribute is VERY important. It is responsible
+		 * to maintain all the DB Tables' Information.
+		 *
+		 * It's format is:
+		 *
+		 * $db_tables = array(
+		 *		'<table1_name>'	=> array(
+		 *			'type'      => '<table_type>',
+		 *			'keys'      => array(
+		 *				'primary'	=> array(
+		 *					<pkey1>	=> array(
+		 *						'name'	=> '<key_field_name>',
+		 *						'value'	=>	<key_value>),
+		 *					<pkey2> => array(...)),
+		 *				'foreign'	=> array(
+		 *					<fkey1> => array(
+		 *						'name'			=> '<key_field_name>',
+		 *						'value'			=> <key_value>,
+		 *						'association'	=> array(
+		 *							'table'		=> '<original_table>',
+		 *							'field'		=> '<original_field>')),
+		 *					<fkey2>	=> array(...)),
+		 *			'fields'	=> array(
+		 *				<field1>	=> array(
+		 *					'name'	=> '<field_name>',
+		 *					'type'	=> '<field_type>',
+		 *					'state'	=> '<field_state>',
+		 *					'value'	=> <field_value>),
+		 *				<field2>	=> array(...)))),
+		 *		'<table2_name>'	=> array(...));
+		 *
+		 * The variables:
+		 *	<table_type> can be: (if you find any other type, please, report it).
+		 *		- 'main'	=> The main table used by the class. In essence, 
+		 *			this table 
+		 *		- 'single'	=> The single tables are the ones that each field 
+		 *			keeps just one value;
+		 *		- 'multi'	=> The multi tables are those in which fields keeps 
+		 *			multiple values. So, for this type of tables, the 'state' 
+		 *			and 'value' properties becomes arrays and their names are 
+		 *			'states' and 'values';
+		 *
+		 *	<field_type> can be: (report if find any other)
+		 *		- false		=> The field is an ordinary field;
+		 *		- 'primary'	=> The field is a primary key;
+		 *		- 'foreign' => The field is a foreign key;
+		 *		- array()	=> The field is a multi-type field. The elements of
+		 *			the array specifies the types. 
+		 */
+		 	
+		var $db_tables = array();
+
+		var $remove_all = false;
+	
+		function init()
+		{
+			$this->db = $GLOBALS['phpgw']->db;
+		}
+
+		/*!
+		
+			@function get_field
+			@abstract Returns the value of the Field specified
+			@author Raphael Derosso Pereira
+			
+			@param string $field The name of the Field
+		
+		*/
+		function get_field($field)
+		{
+			if(array_key_exists($field, $this->main_fields))
+			{
+				return $this->main_fields[$field]['value'];
+			}
+			
+			// TODO: Log?
+		}
+	
+		function get_state()
+		{
+			return $this->state;
+		}	
+
+		/*!
+		
+			@function set_field
+			@abstract Sets the value of the Field specified
+			@author Raphael Derosso Pereira
+			
+			@param string $field The name of the Field
+			@param mixed $value The value to be setup
+		
+		*/
+		function set_field($field, $value)
+		{
+			if(array_key_exists($field, $this->main_fields))
+			{
+				$this->main_fields[$field]['value'] = $value;
+				$this->manage_fields($this->main_fields[$field], 'changed');
+			}
+			
+			// TODO: Log?
+			return;
+		}
+
+		/*!
+		
+			@function checkout
+			@abstract Load object from DB
+			@author Raphael Derosso Pereira
+			
+			@param integer $id The object ID (primary_key)
+		
+			@notes IMPORTANT!!! This version just loads from DB in the case
+				where there is just ONE primary key in the main table. If you
+				want to extend it, go ahead and share the code!!! :)
+		*/
+		
+		function checkout ( $id )
+		{
+			$query_main_select = 'SELECT ';
+			$query_main_from = ' FROM ';
+			$query_main_where = ' WHERE ';
+			
+			$query_multi_select = array();
+			$query_multi_from = array();
+			$query_multi_where = array();
+			
+			$table_main = '';
+			reset($this->db_tables);
+			while(list($table, $table_info) = each($this->db_tables))
+			{
+				if ($table_info['type'] === 'main')
+				{
+					$table_main = $table;
+					$main_pkey = $table_info['keys']['primary'][0]['name'];
+					
+					foreach($table_info['fields'] as $field_info)
+					{
+						$query_main_select .= $table.'.'.$field_info['name'].',';
+					}
+
+					$query_main_select{strlen($query_main_select)-1} = ' ';		
+					$query_main_from .= $table;
+					$query_main_where .= $table_info['keys']['primary'][0]['name'].'=\''.$id.'\'';
+					
+					break;
+				}
+			}
+			
+			reset($this->db_tables);
+			while(list($table, $table_info) = each($this->db_tables))
+			{
+				if ($table_info['type'] === 'multi')
+				{
+					$query_multi_select[$table] = 'SELECT ';
+					$query_multi_from[$table] = ' FROM ';
+					$query_multi_where[$table] = ' WHERE ';
+				
+					foreach($table_info['fields'] as $field_info)
+					{
+						$query_multi_select[$table] .= $table.'.'.$field_info['name'].',';
+					}
+
+					$query_multi_select[$table]{strlen($query_multi_select[$table])-1} = ' ';		
+					$query_multi_from[$table] .= $table;
+					$query_multi_where[$table] .= $table_info['keys']['primary'][0]['name'].'=\''.$id.'\'';
+				}
+			}
+
+			$query = $query_main_select . $query_main_from . $query_main_where;
+
+//			echo 'Query in SO_Main CheckOut: "'.$query.'"<br>';
+			
+			if (!$this->db->query($query,__LINE__, __FILE__))
+			{
+				return false;
+			}
+			
+			if (!$this->db->next_record())
+			{
+				return false;
+			}
+			
+			reset($this->db_tables[$table_main]['fields']);
+
+			while (list(,$field_info) = each($this->db_tables[$table_main]['fields']))
+			{
+				$this->db_tables[$table_main]['fields'][$field_info['name']]['value'] = $this->db->f($field_info['name']);
+				$this->manage_fields($this->db_tables[$table_main]['fields'][$field_info['name']], 'sync');
+			}
+
+			foreach($query_multi_select as $table => $query)
+			{
+				$query = $query_multi_select[$table] . $query_multi_from[$table] . $query_multi_where[$table];
+
+				if (!$this->db->query($query, __LINE__, __FILE__))
+				{
+					return false;
+				}
+				
+				$pos = 0;
+				while($this->db->next_record())
+				{
+					reset($this->db_tables[$table]['fields']);					
+					while (list(,$field_info) = each($this->db_tables[$table]['fields']))
+					{
+						$this->db_tables[$table]['fields'][$field_info['name']]['values'][$pos] = $this->db->f($field_info['name']);
+						$this->manage_fields($this->db_tables[$table]['fields'][$field_info['name']], 'sync', 'new');
+					}
+					$pos++;
+				}
+			}
+			
+			return true;
+		}
+	
+		/*!
+		
+			@function commit
+			@abstract Saves object to DB
+			@author Raphael Derosso Pereira
+			
+			@return integer The object ID (primary_key)
+		
+		*/
+		function commit ( )
+		{
+			if ($this->state === 'new')
+			{
+				return $this->commit_new();
+			}
+			else if ($this->state === 'delete')
+			{
+				return $this->delete_record();
+			}
+			
+			$query_main_head = 'UPDATE ';
+			$query_main_tail = ' WHERE ';
+			$query_main_fields = false;
+			
+			$query_multi_head = array();
+			$query_multi_fields = array();
+
+			$table_main = '';
+			$main_table_changed = false;
+			reset($this->db_tables);
+			while(list($table, $table_info) = each($this->db_tables))
+			{
+				if ($table_info['type'] === 'main')
+				{
+					$table_main = $table;
+					$main_pkey = $table_info['keys']['primary'][0]['name'];
+					
+					$query_main_head .= $table . ' SET ';
+					
+					foreach($table_info['fields'] as $field_info)
+					{
+						if ($field_info['state'] === 'changed' or $field_info['state'] === 'new')
+						{
+							$main_table_changed = true;
+
+							if ($field_info['value'] == null)
+							{
+								$sep = '';
+							}
+							else
+							{
+								$sep = "'";
+							}
+
+							if ($field_info['name'] === 'photo')
+							{
+								$query_main_fields .= $field_info['name'].'='.$this->db->quote($field_info['value'], 'blob').',';
+							}
+							else
+							{
+								$f_value = $field_info['value'] === null ? 'NULL' : "'".$field_info['value']."'";
+								$query_main_fields .= $field_info['name'].'='.$f_value.',';
+							}
+							$this->manage_fields($this->main_fields[$field_info['name']], 'sync');
+						}
+						else if ($field_info['state'] === 'deleted')
+						{
+							$main_table_changed = true;
+							$query_main_fields .= $field_info['name'].'=NULL,';
+							$this->manage_fields($this->main_fields[$field_info['name']], 'sync');
+						}
+					}
+
+					if (!$main_table_changed)
+					{
+						continue;
+					}
+					
+					$query_main_fields{strlen($query_main_fields)-1} = ' ';
+					
+					$query_main_tail .= $main_pkey.'=\''.$this->id.'\'';
+
+					$query = $query_main_head . $query_main_fields . $query_main_tail;
+					
+					//echo '<p>Main Update Query: "'.$query.'"</p>';
+		
+					if (!$this->db->query($query, __LINE__, __FILE__))
+					{
+						return false;
+					}
+				}
+				else if ($table_info['type'] === 'multi')
+				{
+					if (!$this->commit_multi($table, $table_info))
+					{
+						exit('Couldn\'t commit on table "'.$table.'"');
+					}
+				}
+			}
+			
+			$this->state = 'sync';
+
+			return $this->id;
+		}
+		
+		/*!
+		
+			@function delete_record
+			@abstract Removes the current entry from the DB
+			@author Raphael Derosso Pereira 
+		
+		*/
+		function delete_record ()
+		{
+			reset($this->db_tables);
+			while(list($table, $table_info) = each($this->db_tables))
+			{
+				if ($table_info['type'] === 'main')
+				{
+					$where = false;
+					$where[$table_info['keys']['primary'][0]['name']] = $table_info['keys']['primary'][0]['value'];
+					
+					$sql = "DELETE FROM $table WHERE ".$table_info['keys']['primary'][0]['name']."='".$table_info['keys']['primary'][0]['value']."'";
+					
+					if (!$this->db->query($sql, __LINE__, __FILE__))
+					{
+						return false;
+					}
+
+					//if (!$this->db->delete($table,$where,__LINE__,__FILE__))
+					//{
+					//	return false;
+					//}
+					
+					continue;
+				}
+				else if ($table_info['type'] === 'multi')
+				{
+					$where = false;
+					$n_values = count($table_info['keys']['primary'][0]['values']);
+					for ($i = 0; $i < $n_values; $i++)
+					{
+						unset($where);
+						foreach ($table_info['keys']['primary'] as $key)
+						{
+							//$where[$key['name']] = $key['values'][$i];
+							$where[] = $key['name']."='".$key['values'][$i]."'";
+						}
+						
+						//print_r($where);
+						$sql = "DELETE FROM $table WHERE ".implode(' AND ', $where);
+						
+						//echo $sql;
+						
+						if (!$this->db->query($sql,__LINE__,__FILE__))
+						{
+							return false;
+						}
+						
+					}
+					continue;
+				}
+			}
+			
+			return true;
+		}
+		
+		/*!
+		
+			@function commit_new
+			@abstract Sets the new ID and commits the data to the DB
+			@author Raphael Derosso Pereira
+			
+			@return integer The new ID
+		
+		*/
+		function commit_new()
+		{
+			$query_main_head = 'INSERT INTO ';
+			$query_main_fields = '( ';
+			$query_main_values = ' VALUES ( ';
+			
+			$query_multi_head = array();
+			$query_multi_fields = array();
+			$query_multi_values = array();
+
+			reset($this->db_tables);
+			while(list($table, $table_info) = each($this->db_tables))
+			{
+				if ($table_info['type'] === 'main')
+				{
+					$main_table_changed = false;
+
+					$table_main = $table;
+					$main_pkey = $table_info['keys']['primary'][0]['name'];
+					
+					$query_main_head .= $table . ' ';
+					
+					$query_id = 'SELECT MAX('.$main_pkey.') AS new_id FROM '.$table_main;
+					
+					//echo 'Query MAX: '.$query_id.'<br>';
+					if (!$this->db->query($query_id, __LINE__, __FILE__) or !$this->db->next_record())
+					{
+						exit('Error in '.__FILE__.' line: '.__LINE__);
+					}
+					
+					$this->id = $this->db->f('new_id')+1;
+					$this->manage_fields($this->main_fields[$main_pkey], 'sync');
+					//echo 'ID: '.$this->id.' Type: '.gettype($this->id);
+				
+					foreach($table_info['fields'] as $field_info)
+					{
+						if ($field_info['state'] === 'changed')
+						{
+							$main_table_changed = true;
+							$query_main_fields .= $field_info['name'].',';
+							
+							if ($field_info['name'] === 'photo')
+							{
+								$query_main_values .= $this->db->quote($field_info['value'], 'blob').',';
+							}
+							else
+							{
+								$query_main_values .= $field_info['value'] === null ? 'NULL,' : "'".$field_info['value']."',";
+							}
+							$this->manage_fields($this->main_fields[$field_info['name']], 'sync');
+						}
+					}
+					
+					if (!$main_table_changed)
+					{
+						continue;
+					}
+					
+					$query_main_fields .= $main_pkey.')';
+					$query_main_values .= '\''.$this->id.'\')';
+
+					$query = $query_main_head . $query_main_fields . $query_main_values;
+					
+					//echo '<p>Main Insert Query: "'.$query.'"</p>';
+
+					if (!$this->db->query($query, __LINE__, __FILE__))
+					{
+						return false;
+					}
+				}
+				else if ($table_info['type'] === 'multi')
+				{
+					$this->commit_multi($table, $table_info);
+				}
+			}
+			
+			$this->state = 'sync';
+			return $this->id;
+		}
+
+		/*!
+		
+			@function commit_multi
+			@abstract Handles the commit of Multi Values tables
+			@author Raphael Derosso Pereira
+			
+			@param string $table The table name
+			@param array $table_info The table infrastructure
+		
+		*/
+		function commit_multi($table, $table_info)
+		{
+			reset($table_info['fields']);
+			list(,$t_field) = each($table_info['fields']);
+			$n_values = count($t_field['values']);
+			
+			//echo 'Table: '.$table.'<br>n_values => '.$n_values.'<br>';
+			
+			reset($table_info['fields']);
+			for ($i = 0; $i < $n_values; $i++)
+			{
+				$multi_table_changed = false;
+				$query_multi_update_head = 'UPDATE '.$table.' SET ';
+				$query_multi_insert_head = 'INSERT INTO '.$table;
+				$query_multi_update_fields = false;
+				$query_multi_insert_fields = '(';
+				$query_multi_insert_values = ' VALUES (';
+				$query_multi_update_tail = ' WHERE ';
+				$main_pkeys = $table_info['keys']['primary'];
+				
+				foreach($table_info['fields'] as $field_info)
+				{
+					$f_value = $field_info['values'][$i] == null ? 'NULL' : $field_info['values'][$i];
+					
+					switch ($field_info['states'][$i])
+					{
+						case 'changed':
+							$multi_table_changed = 'changed';
+							$query_multi_update_fields .= $field_info['name'].'='.$f_value.',';
+							$this->manage_fields($this->db_tables[$table]['fields'][$field_info['name']], 'sync', $i);
+							break;
+					
+						case 'new':
+							$multi_table_changed = 'new';
+							$query_multi_insert_fields .= $field_info['name'].',';
+							$query_multi_insert_values .= $f_value.',';
+							$this->manage_fields($this->db_tables[$table]['fields'][$field_info['name']], 'sync', $i);
+							break;
+
+						case 'deleted':
+							$multi_table_changed = 'deleted';
+							//unset($this->db_tables[$table]['fields'][$field_info['name']]['values'][$i]);
+							//unset($this->db_tables[$table]['fields'][$field_info['name']]['states'][$i]);
+							break;
+					}
+				}
+
+				if (!$multi_table_changed)
+				{
+					continue;
+				}
+				
+				$query_multi_update_fields{strlen($query_multi_update_fields)-1} = ' ';
+
+				foreach($main_pkeys as $pkey)
+				{
+					$query_multi_update_tail_t[] = $pkey['name'].'=\''.$pkey['values'][$i].'\'';
+				}
+				$query_multi_update_tail .= @implode(' AND ', $query_multi_update_tail_t);
+				unset($query_multi_update_tail_t);
+				
+				$query_multi_insert_fields{strlen($query_multi_insert_fields)-1} = ')';
+				$query_multi_insert_values{strlen($query_multi_insert_values)-1} = ')';
+
+				switch ($multi_table_changed)
+				{
+					case 'changed':
+						$query = $query_multi_update_head . $query_multi_update_fields . $query_multi_update_tail;
+						break;
+						
+					case 'new':
+						$query = $query_multi_insert_head . $query_multi_insert_fields . $query_multi_insert_values;
+						break;
+
+					case 'deleted':
+						$query = 'DELETE FROM ' . $table . $query_multi_update_tail;
+				}
+
+//				echo '<p>Multi Query, type '.$multi_table_changed.': "'.$query.'"</p>';
+
+				if (!$this->db->query($query, __LINE__, __FILE__))
+				{
+					return false;
+				}
+			}
+/*
+			foreach($this->db_tables[$table]['fields'] as $field_info)
+			{
+				$this->db_tables[$table]['fields'][$field_info['name']]['values'] = array_values($field_info['values']);
+				$this->db_tables[$table]['fields'][$field_info['name']]['states'] = array_values($field_info['states']);
+			}
+*/
+			return true;
+		}
+	
+		/*!
+		
+			@function get_id
+			@abstract Return the object ID
+			@author Raphael Derosso Pereira
+			
+		*/
+		function get_id (  )
+		{
+			return $this->id;
+		}
+	
+		/*!
+		
+			@function get_db_tables
+			@abstract Return the object DB Tables
+			@author Raphael Derosso Pereira
+			
+		*/
+		function get_db_tables (  )
+		{
+			return $this->db_tables;
+		}
+
+		/**
+		 * Misc Methods
+		 */
+		 
+		/*!
+		
+			@function get_class_by_field
+			@abstract Returns the name of the class that has the specified
+				field
+			@author Raphael Derosso Pereira
+			@param string $field The field name
+					
+		*/
+		function get_class_by_field ($field)
+		{
+			$class_name = '_UNDEF_';
+			
+			switch ($field)
+			{
+				case 'id_status':
+				case 'status_name':
+					$class_name = 'so_status';
+					break;						
+
+				case 'id_prefix':
+				case 'prefix':
+					$class_name = 'so_prefix';
+					break;						
+
+				case 'id_suffix':
+				case 'suffix':
+					$class_name = 'so_suffix';
+					break;						
+
+				case 'id_contact':
+				case 'id_owner':
+				case 'photo':
+				case 'alias':
+				case 'given_names':
+				case 'family_names':
+				case 'names_ordered':
+				case 'birthdate':
+				case 'sex':
+				case 'pgp_key':
+				case 'notes':
+				case 'id_related':
+				case 'is_global':
+				case 'title':
+				case 'department':
+					$class_name = 'so_contact';
+					break;						
+				
+				case 'id_company':
+				case 'id_company_owner':
+				case 'company_name':
+				case 'company_notes':
+					$class_name = 'so_company';
+					break;				
+					
+				case 'legal_info_name':
+				case 'legal_info_value':
+					$class_name = 'so_company_legal';
+					break;						
+
+				case 'id_typeof_company_legal':
+				case 'company_legal_type_name':
+					$class_name = 'so_company_legal_type';
+					break;						
+					
+				case 'id_typeof_contact_relation':
+				case 'contact_relation_name':
+				case 'contact_relation_is_subordinated':
+					$class_name = 'so_contact_relation_type';
+					break;						
+					
+				case 'id_typeof_company_relation':
+				case 'company_relation_name':
+				case 'company_relation_is_subordinated':
+					$class_name = 'so_company_relation_type';
+					break;						
+					
+				case 'id_address':
+				case 'address1':
+				case 'address2':
+				case 'complement':
+				case 'address_other':
+				case 'postal_code':
+				case 'po_box':
+				case 'address_is_default':
+					$class_name = 'so_address';
+					break;
+
+				case 'id_city':
+				case 'city_name':
+				case 'city_timezone':
+				case 'city_geographic_location':
+					$class_name = 'so_city';
+					break;
+
+				case 'id_state':
+				case 'state_name':
+				case 'state_symbol':
+					$class_name = 'so_state';
+					break;
+				
+				case 'country_name':
+					$class_name = 'so_country';
+					break;
+					
+				case 'id_typeof_contact_address':
+				case 'contact_address_type_name':
+					$class_name = 'so_contact_address_type';
+					break;
+					
+				case 'id_typeof_company_address':
+				case 'company_address_type_name':
+					$class_name = 'so_company_address_type';						
+					
+				case 'id_connection':
+				case 'connection_name':
+				case 'connection_value':
+				case 'connection_is_default':
+					$class_name = 'so_connection';
+					break;						
+					
+				case 'id_typeof_contact_connection':
+				case 'contact_connection_type_name':
+					$class_name = 'so_contact_connection_type';
+					break;
+					
+				case 'id_typeof_company_connection':
+				case 'company_connection_type_name':
+					$class_name = 'so_company_connection_type';
+					break;
+
+				default:
+					break;						
+
+			}
+			
+			if ($class_name == '_UNDEF_')
+			{
+				return false;
+			}
+			
+			return 'contactcenter.'.$class_name;
+		}
+		
+		/*!
+			
+			@function get_table_by_field
+			@abstract Returns the table wich holds the specified field
+			@author Raphael Derosso Pereira
+			
+			@param string $field The field to be found
+			@param array $tables The array returned by get_db_tables
+		*/
+		function get_table_by_field ($field, & $tables)
+		{
+			$return = false;
+			
+			reset($tables);
+			while(list($table, $properties) = each($tables))
+			{
+				if(array_key_exists($properties['fields']))
+				{
+					if (strtolower($properties['type']) === 'main')
+					{
+						return $table;
+					}
+					array_push($return,$table);
+				}
+			}
+			
+			return $return;
+		}
+
+		/*!
+		
+			@function manage_fields
+			@abstract Change the state of the fields
+			@author Raphael Derosso Pereira
+			
+			@param mixed $field The reference to the field
+			@param string $new_state The new field state
+			@param mixed $position [optional] The position where the field 
+				is state is to be stored. This is used when the table type
+				is 'multi'.
+		
+		*/
+		function manage_fields(& $field, $new_state, $position = false)
+		{
+			if ($this->state !== 'delete')
+			{
+				if ($this->state != 'new')
+				{
+					$this->state = 'changed';
+				}
+				
+				if ($position === false)
+				{
+					$field['state'] = $new_state;
+					
+					return;
+				}
+				
+				if ($position !== 'new')
+				{
+					$field['states'][$position] = $new_state;
+				}
+				else
+				{
+					array_push($field['states'], $new_state);
+				}
+			}
+		}
+		
+		/*!
+			
+			@function reset_values
+			@abstract Reset all the values to false and all
+				states to empty
+			@author Raphael Derosso Pereira
+		*/
+		function reset_values()
+		{
+			foreach($this->db_tables as $table_name => $table_info)
+			{
+				foreach($table_info['fields'] as $field => $field_info)
+				{
+					if ($field_info['value'])
+					{
+						$this->db_tables[$table_name]['fields'][$field]['value'] = false;
+						$this->manage_fields($this->db_tables[$table_name]['fields'][$field], 'empty');
+					}
+					else if ($field_info['values'])
+					{
+						unset($this->db_tables[$table_name]['fields'][$field]['states']);
+						unset($this->db_tables[$table_name]['fields'][$field]['values']);
+					}
+				}
+			}
+			$this->state = 'new';
+		}
+
+
+		/*!
+		
+			@function remove
+			@abstract Removes the entry from the DB
+			@author Raphael Derosso Pereira
+		*/
+		function remove()
+		{
+			$this->state = 'delete';
+			
+			$result = $this->commit();
+			$this->reset_values();
+			return $result;
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_address.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_address.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_address.inc.php	(revision 2)
@@ -0,0 +1,428 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once("class.so_main.inc.php");
+
+	class so_address extends so_main {
+
+		function so_address ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_address' => array(
+					'name'  => 'id_address',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'id_city' => array(
+					'name'  => 'id_city',
+					'type'  => 'foreign',
+					'association' => array(
+						'table' => 'phpgw_cc_city',
+						'field' => 'id_city'
+					),
+					'state' => 'empty',
+					'value' => false
+				),
+				'id_state' => array(
+					'name'  => 'id_state',
+					'type'  => 'foreign',
+					'association' => array(
+						'table' => 'phpgw_cc_state',
+						'field' => 'id_state'
+					),
+					'state' => 'empty',
+					'value' => false
+				),
+				'id_country' => array(
+					'name'  => 'id_country',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'address1' => array(
+					'name'  => 'address1',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'address2' => array(
+					'name'  => 'address2',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'complement' => array(
+					'name'  => 'complement',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'address_other' => array(
+					'name'  => 'address_other',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'postal_code' => array(
+					'name'  => 'postal_code',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'po_box' => array(
+					'name'  => 'po_box',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'address_is_default' => array(
+					'name'  => 'address_is_default',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+			
+
+			$this->db_tables = array(
+				'phpgw_cc_addresses' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_address']),
+						'foreign' => array(&$this->main_fields['id_city'],
+						                   &$this->main_fields['id_state'])
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+			
+			if($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+	
+
+		/*********************************************************************\
+		 *                   Methods to Get Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function get_id_city
+			@abstract Returns the ID of the City where this
+				address is located
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_id_city (  )
+		{
+			return $this->main_fields['id_city']['value'];
+		}
+	
+		/*!
+		
+			@function get_id_state
+			@abstract Returns the ID of the State where this
+				address is located
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_id_state (  )
+		{
+			return $this->main_fields['id_state']['value'];
+		}
+	
+		/*!
+		
+			@function get_id_country
+			@abstract Returns the ID of the Country where this
+				address is located
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_id_country (  )
+		{
+			return $this->main_fields['id_country']['value'];
+		}
+	
+		/*!
+		
+			@function get_address1
+			@abstract Returns the Address1
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_address1 (  )
+		{
+			return $this->main_fields['address1']['value'];
+		}
+	
+		/*!
+		
+			@function get_address2
+			@abstract Returns the Address2
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_address2 (  )
+		{
+			return $this->main_fields['address2']['value'];
+		}
+	
+		/*!
+		
+			@function get_complement
+			@abstract Returns the Address' Complement
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_complement (  )
+		{
+			return $this->main_fields['complement']['value'];
+		}
+	
+		/*!
+		
+			@function get_address_other
+			@abstract Returns the Other Address Info, like
+				quarter, neighborhood, county, etc...
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_address_other (  )
+		{
+			return $this->main_fields['address_other']['value'];
+		}
+	
+		/*!
+		
+			@function get_postal_code
+			@abstract Returns the Postal Code of the Address
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_postal_code (  )
+		{
+			return $this->main_fields['postal_code']['value'];
+		}
+	
+		/*!
+		
+			@function get_bo_box
+			@abstract Returns the PO BOX number
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_po_box (  )
+		{
+			return $this->main_fields['po_box']['value'];
+		}
+	
+		/*!
+		
+			@function is_default
+			@abstract Returns true or false depending on the value
+				of address_is_default
+			@author Raphael Derosso Pereira
+		
+		*/
+		function is_default (  )
+		{
+			switch(strtoupper($this->main_fields['address_is_default']['value']))
+			{
+				case 'T':
+				case 'TRUE':
+				case '1':
+					return true;
+					
+				default:
+					return false; 
+			}
+		}
+	
+
+		/*********************************************************************\
+		 *                   Methods to Alter Information                    *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function set_id_city
+			@abstract Sets the Address City ID
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_city The City ID
+		*/
+		function set_id_city ( $id_city )
+		{
+			$this->main_fields['id_city']['value'] = $id_city;
+			$this->manage_fields($this->main_fields['id_city'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_id_state
+			@abstract Sets the Address State ID
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_state The State ID
+		*/
+		function set_id_state ( $id_state )
+		{
+			$this->main_fields['id_state']['value'] = $id_state;
+			$this->manage_fields($this->main_fields['id_state'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_id_country
+			@abstract Sets the Address Country ID
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_country The Country ID
+		*/
+		function set_id_country ( $id_country )
+		{
+			$this->main_fields['id_country']['value'] = $id_country;
+			$this->manage_fields($this->main_fields['id_country'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_address1
+			@abstract Sets the Address 1
+			@author Raphael Derosso Pereira
+		
+			@param string $address1 The Address
+		
+		*/
+		function set_address1 ( $address1 )
+		{
+			$this->main_fields['address1']['value'] = $address1;
+			$this->manage_fields($this->main_fields['address1'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_address2
+			@abstract Sets the Address 2
+			@author Raphael Derosso Pereira
+		
+			@param string $address2 The Address
+		
+		*/
+		function set_address2 ( $address2 )
+		{
+			$this->main_fields['address2']['value'] = $address2;
+			$this->manage_fields($this->main_fields['address2'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_postal_code
+			@abstract Sets the Postal Code
+			@author Raphael Derosso Pereira
+		
+			@param string $postal_code The Postal Code
+		
+		*/
+		function set_postal_code ( $postal_code )
+		{
+			$this->main_fields['postal_code']['value'] = $postal_code;
+			$this->manage_fields($this->main_fields['postal_code'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_po_box
+			@abstract Sets the PO BOX
+			@author Raphael Derosso Pereira
+		
+			@param string $po_box The PO BOX
+		
+		*/
+		function set_po_box ( $po_box )
+		{
+			$this->main_fields['po_box']['value'] = $po_box;
+			$this->manage_fields($this->main_fields['po_box'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_complement
+			@abstract Sets the Complement
+			@author Raphael Derosso Pereira
+		
+			@param string $complement The Complement
+		
+		*/
+		function set_complement ( $complement )
+		{
+			$this->main_fields['complement']['value'] = $complement;
+			$this->manage_fields($this->main_fields['complement'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_address_other
+			@abstract Sets any other address information on
+				the option of the user, like quarter, county, etc
+			@author Raphael Derosso Pereira
+		
+			@param string $address_other The Address
+		
+		*/
+		function set_address_other ( $address_other )
+		{
+			$this->main_fields['address_other']['value'] = $address_other;
+			$this->manage_fields($this->main_fields['address_other'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_address_is_default
+			@abstract Sets the default state of this Address
+			@author Raphael Derosso Pereira
+		
+			@param boolean $default The default state
+		
+		*/
+		function set_address_is_default ( $default )
+		{
+			if ($default)
+			{
+				$this->main_fields['address_is_default']['value'] = 1;
+			}
+			else
+			{
+				$this->main_fields['address_is_default']['value'] = 0;
+			}
+			$this->manage_fields($this->main_fields['address_is_default'], 'changed');
+		}
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_company_connection_type.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_company_connection_type.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_company_connection_type.inc.php	(revision 2)
@@ -0,0 +1,72 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once( "class.so_type.inc.php" );
+	
+	class so_company_connection_type extends so_type {
+
+		function so_company_connection_type ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_typeof_company_connection' => array(
+					'name'  => 'id_typeof_company_connection',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'company_connection_type_name' => array(
+					'name'  => 'company_connection_type_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+
+			$this->type_name = & $this->main_fields['company_connection_type_name'];
+
+			$this->db_tables = array(
+				'phpgw_cc_typeof_co_conns' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_typeof_company_connection']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+
+			if ($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+	
+	}
+
+
+
+?>
Index: /tags/contactcenter/1.20/inc/ThreadUtility.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/ThreadUtility.inc.php	(revision 284)
+++ /tags/contactcenter/1.20/inc/ThreadUtility.inc.php	(revision 284)
@@ -0,0 +1,32 @@
+<?php
+	/***********************************************************************************\
+	* eGroupWare - Contacts Center                                              		*
+	* http://www.egroupware.org                                                 		*
+	* Written by:                                                               		*
+	*  - Brian W. Bosh from	Multi-threading strategies in PHP at						*
+	* http://www.alternateinterior.com/2007/05/multi-threading-strategies-in-php.html	*
+	* Adapted by:																		*
+	*  - Mário César Kolling <mario.kolling@serpro.gov.br>								*
+	* ----------------------------------------------------------------------------------*
+	*  This program is free software; you can redistribute it and/or modify it  		*
+	*  under the terms of the GNU General Public License as published by the    		*
+	*  Free Software Foundation; either version 2 of the License, or (at your   		*
+	*  option) any later version.                                               		*
+	\***********************************************************************************/
+
+	/*
+	 * Utility class used in the "Thread" solution
+	 */
+
+	function response ($status, $response) {
+		echo $status . "\n";
+		echo base64_encode(serialize($response)), "\n";
+	}
+	function processresponse ($string) {
+		$parts = explode ("\n", $string);
+		$status = $parts[0];
+		$data = unserialize (base64_decode ($parts[1]));
+		return array ("status" => $status, "data" => $data);
+	}
+
+?>
Index: /tags/contactcenter/1.20/inc/class.bo_global_sql_catalog.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.bo_global_sql_catalog.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.bo_global_sql_catalog.inc.php	(revision 2)
@@ -0,0 +1,68 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*
+		This class is responsible for manipulating the global SQL Contact Manager
+	*/
+
+	class bo_global_sql_manager 
+	{
+		// Attributes
+		// Associations
+	   /**
+		*    XXX
+		*    @accociation bo_ldap_manager to ldap_manager
+		*    @access private
+		*/
+		#var $ldap_manager;
+	
+		// Operations
+	   /**
+		*    XXX
+		*    
+		*    @access public 
+		*/
+		function global_contact_manager (  ){
+		}
+	
+	   /**
+		*    XXX
+		*    
+		*    @access public 
+		*    @returns array
+		*    @param string $root XXX
+		*/
+		function get_global_tree ( $root ){
+		}
+	
+	   /**
+		*    XXX
+		*    
+		*    @access public 
+		*    @returns string
+		*/
+		function get_actual_brach (  ){
+		}
+	
+	   /**
+		*    XXX
+		*    
+		*    @access public 
+		*    @returns bool
+		*    @param string $branch XXX
+		*/
+		function set_actual_branch ( $branch ){
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_contact_relation_type.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_contact_relation_type.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_contact_relation_type.inc.php	(revision 2)
@@ -0,0 +1,77 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once( "class.so_relation_type.inc.php" );
+	
+	class so_contact_relation_type extends so_relation_type 
+	{
+	
+		function so_contact_relation_type ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_typeof_contact_relation' => array(
+					'name'  => 'id_typeof_contact_relation',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'contact_relation_type_name' => array(
+					'name'  => 'contact_relation_type_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'contact_relation_is_subordinated' => array(
+					'name'  => 'contact_relation_is_subordinated',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+
+			$this->type_name = & $this->main_fields['contact_relation_type_name'];
+			$this->is_subordinated = & $this->main_fields['contact_relation_is_subordinated'];
+
+			$this->db_tables = array(
+				'phpgw_cc_typeof_ct_rels' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_typeof_contact_relation']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+			
+			if ($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.bo_ldap_manager.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.bo_ldap_manager.inc.php	(revision 285)
+++ /tags/contactcenter/1.20/inc/class.bo_ldap_manager.inc.php	(revision 285)
@@ -0,0 +1,596 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	
+	/*
+		This class is responsible for the LDAP control/generic functions and for
+		configuration gathering
+	*/
+	include_once('class.Thread.inc.php');
+
+	class bo_ldap_manager 
+	{
+		
+		var $srcs;
+
+		
+		function bo_ldap_manager ()
+		{
+			if (!($this->srcs = $GLOBALS['phpgw']->session->appsession('bo_ldap_manager.srcs','contactcenter')))
+			{
+				$c = CreateObject('phpgwapi.config','contactcenter');
+				$data = $c->read_repository();
+				
+				if (!$data or $data['cc_global_source0'] !== 'ldap')
+				{
+					$this->srcs = null;
+					return;
+				}
+				
+				$this->srcs = array(
+					1 => array(
+						'name'   => $data['cc_catalog_name'],
+						'host'   => $data['cc_ldap_host0'],
+						'dn'     => $data['cc_ldap_context0'],
+						'acc'    => $data['cc_ldap_browse_dn0'],
+						'pw'     => $data['cc_ldap_pw0'],
+						'obj'    => 'inetOrgPerson',
+						'branch' => strtolower('ou'),
+						'visible' => $data['cc_ldap_query_automatic']
+					)
+				);
+			}
+		}
+
+		function new_ldap_source ( $source_name, $charset, $host, $port, $dn_root, $dn_admin, $admin_pass, $contact_objectclass )
+		{
+		}
+	
+		/*
+		
+			@function get_all_ldap_sources
+			@abstract Returns an array containing all LDAP sources informations
+			@author Raphael Derosso Pereira
+		
+			@return array All LDAP information
+				$return = array(
+					<id_source> => array(
+						'host' => (string),
+						'dn'   => (string),
+						'acc'  => (string),
+						'pw'   => (string)   
+					),
+					...
+				)
+				
+			TODO: Return multiple sources...
+		*/
+		function get_all_ldap_sources (  )
+		{
+			return $this->srcs;
+		}
+		
+		/*
+		* @function get_external_ldap_sources
+		* @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		* @abstract returns an array with the external sources
+		* @return (array) the external sources
+		*/
+
+		function get_external_ldap_sources()
+		{
+			include(PHPGW_INCLUDE_ROOT . '/contactcenter/setup/external_catalogs.inc.php' );
+			//include('external_catalogs.inc.php' );
+			return $external_srcs;
+		}
+
+		/*
+		 * @function get_ldap_fields_association
+		 * @abstract get the fields associantion for ldap source
+		 * @return an array with attribute mappings
+		 */
+		function get_ldap_fields_association ( $id_source )
+		{
+			
+			$op_iop = array(
+				'contact.id_contact'               => array('dn'),
+				'contact.photo'                    => array('jpegPhoto'),
+				'contact.prefixes.prefix'          => false,
+				'contact.alias'                    => array('alias'),
+				'contact.given_names'              => array('givenName'),
+				'contact.family_names'             => array('sn'),
+				'contact.names_ordered'            => array('cn'),//,'displayName'),
+				'contact.suffixes.suffix'          => false,
+				'contact.birthdate'                => false,
+				'contact.sex'                      => false,
+				'contact.pgp_key'                  => false,
+				'contact.notes'                    => false,
+				'contact.mail_forwarding_address' => array('mailForwardingAddress'),
+				'contact.account_type' => array('phpgwAccountType'),
+                'contact.account_status'           => array('phpgwAccountStatus'),
+                'contact.account_visible'          => array('phpgwAccountVisible'),
+				'contact.object_class'             => array('objectClass'),
+				'contact.business_info.title'      => array('title'),
+				'contact.business_info.department' => array('ou'),
+				'contact.company.company_name'     => array('o'),
+				'contact.company.company_notes'    => array('businessCategory'),
+				
+				'contact.contact_related.names_ordered' => 'contact.contact_related.typeof_relation.contact_relation_name',
+				'contact.contact_related.typeof_relation.contact_relation_name' =>  array(
+					'manager'   => array('manager'),
+					'secretary' => array('secretary')
+				),
+				
+				'contact.address.address1'         => 'contact.address.typeof_address.contact_address_type_name',
+				'contact.address.typeof_address.contact_address_type_name' => array(
+					'home' => array('street', 'st', 'postalAddress', 'homePostalAddress'),
+				),
+				
+				'contact.address.postal_code'      => 'contact.address.typeof_address.contact_address_type_name',
+				'contact.address.typeof_address.contact_address_type_name' => array(
+					'home' => array('PostalCode'),
+				),
+				
+				'contact.address.city.city_name'   => 'contact.address.typeof_address.contact_address_type_name',
+				'contact.address.typeof_address.contact_address_type_name' => array(
+					'home' => array('l'),
+				),
+				
+				'contact.address.city.state.state_name'       => 'contact.address.typeof_address.contact_address_type_name',
+				'contact.address.typeof_address.contact_address_type_name' => array(
+					'home' => false,
+				),
+				
+				'contact.address.city.country.id_country'     => 'contact.address.typeof_address.contact_address_type_name',
+				'contact.address.typeof_address.contact_address_type_name' => array(
+					'home' => array('c')
+				),
+				
+				'contact.connection.connection_value'         => 'contact.connection.typeof_connection.contact_connection_type_name',
+				'contact.connection.typeof_connection.contact_connection_type_name' => array (
+					'email'  => array('mail'),
+					'phone'  => array('telephoneNumber'),
+					'mobile' => array('mobile'),
+					'pager'  => array('pager'),
+					'fax'    => array('facsimileTelephoneNumber'),
+					'telex'  => array('telexNumber')
+				),
+			);
+			
+			return $op_iop;
+		}
+
+		/*
+		 * @function get_external_ldap_fields_association
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 * @abstract get the fields association for an external ldap_source
+		 * @return an array with attribute mappings
+		 */
+		function get_external_ldap_fields_association ( $id_source )
+		{
+			include(PHPGW_INCLUDE_ROOT . '/contactcenter/setup/external_catalogs.inc.php' );
+			//include('external_catalogs.inc.php' );
+			return $external_mappings[$id_source];
+		}
+
+		/*
+		 * @function test_connection
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 * @abstract Test if we can bind to a ldap server in a reasonable time
+		 * @param (string) $host ldap server's hostname
+		 * @param (string) $account ldap bind dn
+		 * @param (string) $password a bind dn's password
+		 * @return (array) an array with the answer from the subprocess, null otherwise
+		 */
+		function test_connection($host, $account, $password, $timeout = 5)
+		{
+			//opens a subprocess for nonblocking bind
+			$tsearch = Thread::Create('class.ldap_assync.inc.php', array('host'	=> $host,
+																'account'	=> $account,
+																'password'	=> $password
+																)
+			);
+
+			// It's problably more efficient to let method readResponse control the timeout through
+			// stream_select native timeout.
+			$response = NULL;
+			for ($i = 0; $i < $timeout; $i++)
+			{
+				if ($tsearch->isActive())
+				{
+					sleep(1);
+					if (($response = $tsearch->readResponse()) !== NULL)
+					{
+						$tsearch->close();
+						return $response;
+					}
+
+				}
+				else
+				{
+					$response = $tsearch->readResponse();
+					break;
+				}
+			}
+
+			$tsearch->close();
+			return null;
+		}
+
+		/*!
+		
+			@function get_ldap_tree
+			@abstract Returns the LDAP tree corresponding to the specified level
+			@author Raphael Derosso Pereira
+			
+			@param (integer) $id_source The ID of the LDAP source
+			
+			@param (string)  $context The context to be used as root branch
+				
+			@param (boolean) $recursive Make it a recursive construction.
+				CAUTION! This is EXTREMELY SLOW on large LDAP databases,
+				specially when they're not indexed
+		*/		
+		function get_ldap_tree($id_source, $context = false, $recursive = false) 
+		{
+			if (!$this->srcs[$id_source])
+			{
+				return null;
+			}
+			
+			$ldap = $GLOBALS['phpgw']->common->ldapConnect($this->srcs[$id_source]['host'], $this->srcs[$id_source]['acc'],$this->srcs[$id_source]['pw'], false);
+			if (!$ldap)
+			{
+				return false;
+			}
+			
+			if ($recursive)
+			{
+				$tree = $this->get_ldap_tree_recursive($ldap, $context, $this->srcs[$id_source]['obj'],$this->srcs[$id_source]['branch']);
+				$tree['recursive'] = true;
+
+				return $tree;
+			}
+			
+			return $this->get_ldap_tree_level($id_source, $ldap, $context, $this->srcs[$id_source]['obj'],$this->srcs[$id_source]['branch']);
+		}
+		// SERPRO
+
+		/*!
+
+			@function get_external_ldap_tree
+			@abstract Returns the LDAP external tree corresponding to the specified level
+			@author Mário César Kolling <mario.kolling@serpro.gov.br>
+			@param (integer) $id_source The ID of the external LDAP source
+			@param (string)  $context The context to be used as root branch
+			@param (boolean) $recursive Make it a recursive construction.
+				CAUTION! This is EXTREMELY SLOW on large LDAP databases,
+				specially when they're not indexed
+		*/
+		function get_external_ldap_tree($id_source, $context = false, $recursive = false)
+		{
+
+
+			include(PHPGW_INCLUDE_ROOT . '/contactcenter/setup/external_catalogs.inc.php' );
+			//include('external_catalogs.inc.php' );
+
+			if (!$external_srcs[$id_source])
+			{
+				return null;
+			}
+
+			// calls test_connection first. If succeeded continue, return error message otherwise.
+			if (!($response = $this->test_connection($external_srcs[$id_source]['host'], $external_srcs[$id_source]['acc'], $external_srcs[$id_source]['pw'], 10)))
+			{
+				return array(
+					'msg'		=>	lang("Catalog %1 temporarily unavailable. Please try again later!", $external_srcs[$id_source]['name']),
+					'timeout'	=>	'true'
+				);
+			}
+
+			$ldap = $GLOBALS['phpgw']->common->ldapConnect($external_srcs[$id_source]['host'], $external_srcs[$id_source]['acc'],$external_srcs[$id_source]['pw'], false);
+			if (!$ldap)
+			{
+				return false;
+			}
+
+			// Option recursive commented out
+			/*
+			if ($recursive)
+			{
+				$tree = $this->get_ldap_tree_recursive($ldap, $context, $this->srcs[$id_source]['obj'],$this->srcs[$id_source]['branch']);
+				$tree['recursive'] = true;
+
+				return $tree;
+			}
+			*/
+
+			return $this->get_ldap_tree_level($id_source, $ldap, $context, $external_srcs[$id_source]['obj'],$external_srcs[$id_source]['branch'], 1);
+		}
+
+		/*!
+
+			THIS FUNCTION IS NOT TESTED AND IS PROBABLY BROKEN!
+			I WILL CORRECT IT IN THE NEAR FUTURE
+
+		*/
+		function get_ldap_tree_recursive($resource, $context, $objectClass)
+		{
+			$filter = '(!(objectClass='.$objectClass.'))';
+			$result_res = ldap_list($resource, $context, $filter);
+
+			if ($result_res === false)
+			{
+				return null;
+			}
+			
+			$count = ldap_count_entries($resource,$result_res);
+			if ( $count == 0 )
+			{
+				$filter = 'objectClass='.$objectClass;
+				$result_res2 = ldap_list($resource, $context, $filter);
+				$entries_count = ldap_count_entries($resource, $result_res2);
+
+				if ($result_res2 !== false && $entries_count > 0)
+				{
+					return $entries_count;
+				}
+				else
+				{
+					return null;
+				}
+			}
+			
+			$entries = ldap_get_entries($resource, $result_res);
+			
+			for ($i = 0; $i < $entries['count']; $i++)
+			{
+				$subtree = $this->get_ldap_tree_recursive($resource, $entries[$i]['dn'], $objectClass);
+				
+				$dn_parts=ldap_explode_dn($entries[$i]['dn'],1);
+				
+				if ($subtree !== null and is_array($subtree)) 
+				{
+					$tree[$i]['name'] = $dn_parts[0];
+					$tree[$i]['type'] = 'catalog_group';
+					$tree[$i]['recursive'] = true;
+					$tree[$i]['sub_branch'] = $subtree;
+				}
+				else if (is_int($subtree) and $subtree !== null)
+				{
+					$tree[$i] = array(
+						'name'       => $dn_parts[0],
+						'type'       => 'catalog',
+						'class'      => 'global_contact_manager',
+						'icon'       => 'share-mini.png',
+						'value'      => $entries[$i]['dn'],
+						'sub_branch' => false
+					);
+				} 
+			}
+
+			if (is_array($tree))
+			{
+				return $tree;
+			}
+			else
+			{
+				return null;
+			}
+		}
+		
+		function get_ldap_referrals($ds, $dn, $filter) {
+			
+			ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
+			ldap_set_option($ds,LDAP_OPT_PROTOCOL_VERSION,3);
+			
+			if ($ds) {
+			    ldap_bind($ds);
+			   	$sr=ldap_list($ds,$dn, $filter);		    
+			   	$ref = ldap_first_reference($ds, $sr);
+			   	$array_referral = array();
+			   	$idx = 0;
+			    	
+				 while ($ref) {
+					$array_referral[$idx++] = ldap_get_dn($ds, $ref);
+					$ref = ldap_next_reference($ds, $ref);
+				}
+				return $array_referral;
+			}
+			else 
+				return false;
+		}
+
+		function get_ldap_sub_branches_referrals($ds, $dn, $filter) {
+			
+			$referral = $this -> get_ldap_referrals($ds, $dn, $filter);
+			$sub_branches = array();
+			
+			for($i = 0; $i <count($referral); $i++) {
+				$dn = str_replace("??base","",preg_replace('!^(ldap://[^/]+)/(.*$)!', '\\2', $referral[$i]));
+				$dn = explode(",",$dn);				
+				$dn = strtoupper(str_replace("ou=", "",$dn[0]));
+				$dn = str_replace("DC=", "",$dn);
+																						
+				$sub_branch = array(
+											'name' => $dn,
+					                    	'type' => 'unknown',
+                    						'value' => $referral[$i],
+                    						'sub_branch' => false		
+										);															
+				$sub_branches[$i] = $sub_branch;			
+			}
+			return $sub_branches;
+		}
+		
+
+		function translate_accentuation($text)
+		{
+			/*
+			 * Esta operação resolve o problema causado pela conversão de caracteres acentuados realizada
+			 * pela função ldap_explode_dn().
+			 */
+
+			return utf8_decode(preg_replace("/\\\([0-9A-Fa-f]{2})/e", "''.chr(hexdec('\\1')).''", $text));
+		}
+
+		function get_ldap_tree_level($id_source, $resource, $context, $objectClass, $branch_dn, $external = 0)
+		{
+			if(strstr($context, "ldap://")){
+				$refer_context = str_replace("??base","",preg_replace('!^(ldap://[^/]+)/(.*$)!', '\\2', $context));
+				$host	= preg_replace('!^(ldap://[^/]+)/.*$!', '\\1', $context);
+				$resource = ldap_connect($host);
+				ldap_bind($resource);
+			}
+
+			/*
+			 * TODO: Search timeouts
+			 */
+
+			$dn_parts = ldap_explode_dn(($refer_context ? $refer_context : $context),1);
+			//$filter = '(!(objectClass='.$objectClass.'))';
+			// Don't show OU's whith phpgwAccountVisible equal to '-1'
+			if ($external)
+			{
+				// external source: get all organizationalUnits
+				$filter = '(objectClass=organizationalUnit)';
+			}
+			else
+			{
+				// get any objectClass except the objectClass used for the source
+				// and whose attribute phpgwAccountVisible value is different from -1
+				$filter = '(&(!(objectClass='.$objectClass.')) (!(phpgwAccountVisible=-1)))';
+			}
+			$result_res = @ldap_list($resource,  ($refer_context ? $refer_context : $context), $filter, array(), 0, 0);
+			@ldap_sort($resource, $result_res, 'ou');
+
+			// Timeouts commented out
+			/*
+			if ($result_res === false)
+			{
+				return null;
+			}
+			*/
+
+			$count = ldap_count_entries($resource,$result_res);
+
+			if ( $count == 0 )
+			{
+				$filter = '(objectClass='.$objectClass.')';
+				// Get only one attribute of the source's objectClass
+				$result_res2 = @ldap_list($resource, ($refer_context ? $refer_context : $context), $filter, Array('cn'), 0, 1);
+				$entries_count = ldap_count_entries($resource, $result_res2);
+
+				if ($result_res2 !== false && $entries_count > 0)
+				{
+					return array(
+						'name'       => $this->translate_accentuation($dn_parts[0]),
+						'type'       => 'catalog',
+						'class'      => 'bo_global_ldap_catalog',
+						// Pass the variable $external as a parameter to the constructor
+						'class_args' => array($id_source, $context, $external),
+						'icon'       => 'globalcatalog-mini.png',
+						'value'      => $context,
+						'sub_branch' => false
+					);
+				}
+				else
+				{
+					return array(
+						'name' => $this->translate_accentuation($dn_parts[0]),
+						'type' => 'empty'
+					);
+				}
+			}
+
+			$sub_branch_found = false;
+			$i = 0;
+			for ($entry = ldap_first_entry($resource, $result_res);
+			     $entry != false;
+			     $entry = ldap_next_entry($resource, $entry))
+			{
+				$dn = ldap_get_dn($resource, $entry);
+				$dn_parts_1 = ldap_explode_dn($dn,1);
+				$dn_parts_full = ldap_explode_dn($dn,0);
+				list($group) = explode('=',$dn_parts_full[0]);
+
+				//Faz a comparação do branch como case insensitive
+				if (strtolower($group) == strtolower($branch_dn) or $branch_dn === 'all')
+				{
+					$tree['sub_branch'][$i] = array(
+						'name'  => $this->translate_accentuation($dn_parts_1[0]),
+						'type'  => 'unknown',
+						'value' =>  ($refer_context ? $host."/" : "").$dn,
+						'sub_branch' => false
+					);
+					$sub_branch_found = true;
+				}
+				$i++;
+			}
+
+			if(! $refer_context) {
+				$array_referral = $this -> get_ldap_sub_branches_referrals($resource, $context,'(objectClass=organizationalUnit)');
+				for($z = 0; $z < count($array_referral); $z++) {
+					$tree['sub_branch'][$i++] = $array_referral[$z];
+				}
+			}
+
+			$filter = 'objectClass='.$objectClass;
+			$result_res2 = @ldap_list($resource, ($refer_context ? $refer_context : $context), $filter, Array('cn'), 0, 1);
+			$entries_count = ldap_count_entries($resource, $result_res2);
+
+			if ($result_res2 !== false && $entries_count > 0 && $sub_branch_found)
+			{
+				$tree['name']       = $this->translate_accentuation($dn_parts[0]);
+				$tree['type']       = 'mixed_catalog_group';
+				$tree['class']      = 'bo_global_ldap_catalog';
+				// Pass the variable $external as a parameter to the constructor
+				$tree['class_args'] = array($id_source,$context,$external);
+				$tree['icon']       = 'globalcatalog-mini.png';
+				$tree['value']      = $context;
+			}
+			elseif ($result_res2 !== false && $entries_count > 0 && !$sub_branch_found)
+			{
+				return array(
+					'name'       => $this->translate_accentuation($dn_parts[0]),
+					'type'       => 'catalog',
+					'class'      => 'bo_global_ldap_catalog',
+					// Pass the variable $external as a parameter to the constructor
+					'class_args' => array($id_source, $context,$external),
+					'icon'       => 'globalcatalog-mini.png',
+					'value'      => $context,
+					'sub_branch' => false
+				);
+			}
+			else
+			{
+				$tree['name']       = $this->translate_accentuation($dn_parts[0]);
+				$tree['type']       = 'catalog_group';
+				$tree['class']      = 'bo_catalog_group_catalog';
+				// Pass the variable $external as a parameter to the constructor
+				$tree['class_args'] = array('$this', '$this->get_branch_by_level($this->catalog_level[0])', $external);
+				$tree['value']      = $context;
+				$tree['ldap']       = array('id_source' => $id_source, 'context' => $context);
+			}
+			
+			usort($tree['sub_branch'], array($this, "compareTreeNodes"));
+			return $tree;
+		}
+
+		function compareTreeNodes($a, $b)	{
+						
+			return strnatcasecmp($a['name'], $b['name']);
+		}	
+
+	}
+?>
Index: /tags/contactcenter/1.20/inc/hook_config_validate.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/hook_config_validate.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/hook_config_validate.inc.php	(revision 2)
@@ -0,0 +1,49 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*
+	  Set a global flag to indicate this file was found by admin/config.php.
+	  config.php will unset it after parsing the form values.
+	*/
+	$GLOBALS['phpgw_info']['server']['found_validation_hook'] = True;
+
+	/* Check all settings to validate input.  Name must be 'final_validation' */
+	function final_validation($value='')
+	{
+		$error = false;
+		
+		if($value['cc_global_source0'] == 'ldap')
+		{
+			if (!$value['cc_ldap_host0'])
+			{
+				$error[] = '<br>LDAP host must be set!';
+			}
+			
+			if(!$value['cc_ldap_context0'])
+			{
+				$error[] = '<br>There must be a Context';
+			}
+			
+			if(!$value['cc_ldap_browse_dn0'])
+			{
+				$error[] = '<br>The Browse Account must be set';
+			}	
+		}
+		
+		if ($error)
+		{ 
+			$GLOBALS['config_error'] = implode("\n", $error);
+		}
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_group.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_group.inc.php	(revision 293)
+++ /tags/contactcenter/1.20/inc/class.so_group.inc.php	(revision 293)
@@ -0,0 +1,329 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Nilton Emilio Buhrer Neto <niltonneto@celepar.pr.gov.br>			      *
+  *  sponsored by Celepar - http://celepar.pr.gov.br                          *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+	class so_group {
+		
+		var $db;
+		var $owner;
+
+		function so_group ()
+		{
+			$this->db    = $GLOBALS['phpgw']->db;
+			$this->owner = $GLOBALS['phpgw_info']['user']['account_id']; 
+		}
+		
+		function select($id = '')
+		{
+			$query = 'SELECT id_group,title,short_name FROM phpgw_cc_groups WHERE owner = '.$this->owner;
+			
+			if($id != '')
+				$query .= ' AND id_group ='.$id;
+			
+			$query .= ' ORDER BY title';
+			
+			if (!$this->db->query($query))
+			{
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);
+			}
+			 
+			$return = false;
+			
+			while($this->db->next_record())
+			{
+				$return[] = $this->db->row(); 
+			}
+	
+			
+			return $return;
+		}
+
+		function remove_accents($string) {
+ 			return strtr($string, 
+ 			"?Ó??ó?Ý?úÁÀÃÂÄÇÉÈÊËÍÌ?ÎÏÑÕÔÓÒÖÚÙ?ÛÜ?áàãâäçéèêëíì?îïñóòõôöúù?ûüýÿ", 
+ 			"SOZsozYYuAAAAACEEEEIIIIINOOOOOUUUUUsaaaaaceeeeiiiiinooooouuuuuyy");
+		}
+		
+		function insert($data)
+		{
+			
+			$shortName = $this -> remove_accents(strtolower(str_replace(" ","", $data['title'])));			
+			
+			$query = "INSERT INTO phpgw_cc_groups(title, owner,short_name) ".
+			 		"VALUES('".$data['title']."',".$this->owner.",'".$shortName."')";			
+										
+			if (!$this->db->query($query))
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);				
+						
+			$objSequence = $this->db->query("SELECT last_value FROM seq_phpgw_cc_groups");			
+			$id = $objSequence -> fields['last_value'];
+			$this -> updateContactsByGroup($id, $data['contact_in_list']);
+
+			return $id;		
+		}
+		
+		function update($data)
+		{
+			$shortName = $this -> remove_accents(strtolower(str_replace(" ","", $data['title'])));
+						
+			$query = "UPDATE phpgw_cc_groups SET title = '".$data['title']."',short_name = '".$shortName."' WHERE id_group = ".$data['id_group'];
+			
+			if (!$this->db->query($query))			
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);				
+			
+			$this -> updateContactsByGroup($data['id_group'], $data['contact_in_list']);		
+						 			
+			return True;		
+		}
+		
+		function delete($data)
+		{
+			$query = "DELETE FROM phpgw_cc_groups WHERE id_group = ".$data['id_group'];			
+										
+			if (!$this->db->query($query))			
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);				
+									
+			$this -> deleteContactsByGroup($data['id_group'], $data['contact_in_list']);
+			 			
+			return True;		
+		}		
+		
+		function deleteContactFromGroups($id)
+		{
+			$query = "DELETE FROM phpgw_cc_contact_grps WHERE id_connection = ".$id;			
+										
+			if (!$this->db->query($query))			
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);				
+									
+			return True;		
+		}
+		
+		
+		function selectAllContacts()
+		{
+						
+			$query = 'select C.id_connection, A.id_contact, A.names_ordered, C.connection_value , B.id_typeof_contact_connection from phpgw_cc_contact A,'.
+			'phpgw_cc_contact_conns B, phpgw_cc_connections C where '.
+			'A.id_contact = B.id_contact and B.id_connection = C.id_connection and '.
+			'A.id_owner ='.$this->owner.' and C.connection_is_default = true '.
+			' order by A.names_ordered,C.connection_value';
+
+					
+			if (!$this->db->query($query))
+			{
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);
+			}
+			 
+			$return = false;
+			
+			while($this->db->next_record())
+			{
+				$return[] = $this->db->row(); 
+			}
+				
+			// Essa iteração transforma uma esturuta com contatos redundantes e separados por email ou tel.
+			// em outra com apenas 1 elemento pra cada contato
+			foreach($return as $i => $object){
+				if ($object['id_typeof_contact_connection'] == 1){
+					$all_contacts[$object['id_contact']]['connection_value'] = $object['connection_value'];
+                    $all_contacts[$object['id_contact']]['names_ordered'] = $object['names_ordered'];
+                    $all_contacts[$object['id_contact']]['id_contact'] = $object['id_contact'];
+                    $all_contacts[$object['id_contact']]['id_connection'] = $object['id_connection'];
+				}
+				else 
+					if ($object['id_typeof_contact_connection'] == 2){
+						$all_contacts[$object['id_contact']]['phone'] = $object['connection_value'];
+						$all_contacts[$object['id_contact']]['names_ordered'] = $object['names_ordered'];
+						$all_contacts[$object['id_contact']]['id_contact'] = $object['id_contact'];
+						$all_contacts[$object['id_contact']]['id_connection'] = $object['id_connection'];
+					}
+			}
+			
+			return array_values($all_contacts);
+		}		
+		
+		function verifyContact($email)
+		{
+			$query = 'select A.names_ordered from phpgw_cc_contact A,'.
+			'phpgw_cc_contact_conns B, phpgw_cc_connections C where '.
+			'A.id_contact = B.id_contact and B.id_connection = C.id_connection '.
+			'and B.id_typeof_contact_connection = 1 and '.
+			'A.id_owner ='.$this->owner.' and C.connection_value = \''.$email.'\'';
+						
+			if (!$this->db->query($query))
+			{
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);
+			}
+			 
+			$return = false;
+			
+			while($this->db->next_record())
+			{
+				$row = $this->db->row();
+				$return[] =  $row['names_ordered']; 
+			}
+			
+			return $return;
+		}		
+		
+		function selectContactsByGroup($idGroup)
+		{
+			$query = 'select C.id_connection, A.names_ordered, C.connection_value from phpgw_cc_contact A,'.
+			'phpgw_cc_contact_conns B, phpgw_cc_connections C,phpgw_cc_contact_grps D where '.
+			'A.id_contact = B.id_contact and B.id_connection = C.id_connection '.
+			'and B.id_typeof_contact_connection = 1 and '.
+			'A.id_owner ='.$this->owner.' and D.id_connection = C.id_connection and D.id_group = '.$idGroup.
+			' order by A.names_ordered';
+						
+			if (!$this->db->query($query))
+			{
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);
+			}
+			 
+			$return = false;
+			
+			
+			while($this->db->next_record())
+			{
+				$return[] = $this->db->row(); 
+			}
+			
+			return $return;
+		}
+		
+		function selectContactsByGroupAlias($alias)
+		{
+			$query = "select C.id_connection, A.names_ordered, C.connection_value from phpgw_cc_contact A, ".
+			"phpgw_cc_contact_conns B, phpgw_cc_connections C,phpgw_cc_contact_grps D,phpgw_cc_groups E where ".
+			"A.id_contact = B.id_contact and B.id_connection = C.id_connection ".
+			"and B.id_typeof_contact_connection = 1 and ".
+			"A.id_owner =".$this->owner." and ".			
+			"D.id_group = E.id_group and ".
+			"D.id_connection = C.id_connection and E.short_name = '".$alias.
+			"' order by A.names_ordered";
+						
+			if (!$this->db->query($query))
+			{
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);
+			}
+			 
+			$return = false;
+			
+			
+			while($this->db->next_record())
+			{
+				$return[] = $this->db->row(); 
+			}
+			
+			return $return;
+		}
+		
+		function insertContactsByGroup($idGroup, $contacts)
+		{									
+			
+			foreach($contacts as $index => $idConnection) 
+			{			
+				$query = "INSERT INTO phpgw_cc_contact_grps(id_group,id_connection) ".
+			 			"VALUES(".$idGroup.",".$idConnection.")";			
+
+				if (!$this->db->query($query))
+					exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);			
+			}
+									 			
+			return True;		
+		}
+		
+		function updateContactsByGroup($id_group, $contacts)
+		{
+						
+			$query = 'select C.id_connection from phpgw_cc_contact A,'.
+			'phpgw_cc_contact_conns B, phpgw_cc_connections C,phpgw_cc_contact_grps D where '.
+			'A.id_contact = B.id_contact and B.id_connection = C.id_connection '.
+			'and B.id_typeof_contact_connection = 1 and '.
+			'A.id_owner ='.$this->owner.' and D.id_connection = C.id_connection and D.id_group = '.$id_group.
+			' order by A.names_ordered';
+						
+			if (!$this->db->query($query))
+			{
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);
+			}
+			 
+			$return = false;
+			
+			
+			while($this->db->next_record())
+			{
+				$return[] = $this->db->row();
+				 
+			}
+						
+			$array_connections = array();
+			
+			if($return) {
+				foreach($return as $index => $connection){				
+					array_push($array_connections,$connection['id_connection']);
+				}
+			}
+			
+			if(!is_array($contacts))
+				$contacts = array();
+			
+			if(!is_array($connections))
+				$connections = array();				
+									
+			$connections_to_add 	= array_diff($contacts, $array_connections);
+			$connections_to_remove 	= array_diff($array_connections,$contacts);
+			
+			if($connections_to_add){
+				$this -> insertContactsByGroup($id_group, $connections_to_add);	 
+			}
+			
+			if($connections_to_remove){
+				$this -> deleteContactsByGroup($id_group, $connections_to_remove);
+			}
+			
+			return True;
+		}		
+		
+		function deleteContactsByGroup($id_group, $contacts = null)
+		{
+			
+			$query = "DELETE FROM phpgw_cc_contact_grps ";
+			
+			if($contacts) {						
+				$index = 0;
+				
+				foreach($contacts as $a => $id_connection) {
+					 
+					if($index++)
+						$query .= " OR";
+					else
+						$query .= " WHERE (";
+					 
+					$query .= " id_connection = ".$id_connection;										
+				}
+				$query .= ") AND ";
+			} 	
+			else
+				$query.= " WHERE ";
+			
+			$query.= "id_group = ".$id_group;
+			
+			
+			if (!$this->db->query($query))			
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);				
+						 			
+			return True;		
+		}
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.bo_catalog_group_catalog.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.bo_catalog_group_catalog.inc.php	(revision 285)
+++ /tags/contactcenter/1.20/inc/class.bo_catalog_group_catalog.inc.php	(revision 285)
@@ -0,0 +1,267 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	/* This is a special class that handles requests to a catalog that is actually
+	 * a catalog group. So this class actually performs all the requests in its
+	 * catalog childs.
+	 */
+
+	include_once('class.abo_catalog.inc.php');
+	
+	class bo_catalog_group_catalog extends abo_catalog
+	{
+		var $external;
+		var $fields = array(
+			'id_contact'    => true,
+			'status'        => true,
+			'photo'         => true,
+			'alias'         => true,
+			'prefix'        => true,
+			'given_names'   => true,
+			'family_names'  => true,
+			'names_ordered' => true,
+			'suffix'        => true,
+			'birthdate'     => true,
+			'sex'           => true,
+			'pgp_key'       => true,
+			'notes'         => true,
+			
+			/* Array fields */
+			'companies'     => true,
+			'relations'     => true,
+			'addresses'     => true,
+			'connections'   => true
+		);
+	
+		/*!
+		
+		 @function bo_people_catalog
+		 @abstract Constructor
+	 	 @author Raphael Derosso Pereira
+	 	 
+	 	*/
+		function bo_catalog_group_catalog(& $bo_contactcenter, & $catalog, $external = 0 )
+		{
+			$this->bo_contactcenter = & $bo_contactcenter;
+			$this->catalog = & $catalog;
+			$this->external = $external;
+		}
+		 	
+
+		/*!
+
+		 @function find
+		 @abstract Returns all the IDs of the entries found in all child
+		 	catalogues that corresponds to the specified rules.
+		 @author Raphael Derosso Pereira
+
+		 @param SEE class bo_contactcenter for usage
+		
+		*/
+		function find($what, $rules, $other)
+		{
+			if ($ldap_info = $this->catalog['ldap'])
+			{
+				$meta_catalog =& CreateObject('contactcenter.bo_global_ldap_catalog',$ldap_info['id_source'], $ldap_info['context'], $this->external);
+				return $meta_catalog->find($what, $rules, $other);
+			}
+			
+			$results = array();
+			
+			reset($this->catalog);
+			while(list(, $new_catalog) = each($this->catalog['sub_branch']))
+			{
+				//print_r($new_catalog);
+				//echo 'Setting catalog: <b>'.$new_catalog['name'].'</b><br>';
+				$new_catalog = $this->bo_contactcenter->set_catalog($new_catalog);
+				
+				//if($new_catalog) echo 'Setado corretamente!<br><br>'; else echo 'Erro ao setar<br><br>';
+				
+				if ($new_catalog['type'] === 'empty')
+				{
+					continue;
+				}
+				
+				$temp_res = $this->bo_contactcenter->catalog->find($what, $rules, $other);
+				if (is_array($temp_res) and count($temp_res))
+				{
+					foreach ($temp_res as $id => $value)
+					{
+						$result[$id] = $value;
+					}
+				}
+			}
+
+			//$this->bo_contactcenter->set_catalog($this->catalog);
+			return $result;
+		}
+		
+		/*!
+		
+		 @function get_single_entry
+		 @abstract Returns all information requested about one contact
+		 @author Raphael Derosso Pereira
+		     
+		 @param integer $id_contact The contact ID
+		 @param array $fields The array returned by get_fields whith true
+		 	on the fields to be taken.
+		 	
+		*/
+		function get_single_entry ( $id_contact, $fields )
+		{	
+			if (!is_array($fields)) 
+			{
+				if (is_object($GLOBALS['phpgw']->log)) 
+				{
+					$GLOBALS['phpgw']->log->message(array(
+						'text' => 'F-BadcontactcenterParam, wrong get_single_entry parameters type.',
+						'line' => __LINE__,
+						'file' => __FILE__));
+					
+					$GLOBALS['phpgw']->log->commit();
+				}
+				else 
+				{
+					exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>');
+				}
+			}
+			
+			$contact_array = $this->get_multiple_entries(array($id_contact), $fields);
+			
+			if (!count($contact_array))
+			{
+				return false;
+			}
+
+			if($contact_array[0])
+				$contact_data = $contact_array[0];
+			else
+				$contact_data = $contact_array[$id_contact];
+			
+			if (!is_array($contact_data))
+			{
+				return false;
+			}
+			
+			return $contact_data;
+		}
+	
+		/*!
+		 
+		 @function get_multiple_entries
+		 @abstract Returns multiple Contacts data into one array
+		 @author Raphael Derosso Pereira
+
+		 @param array $id_contacts The Contacts IDs
+		 @param array $fields The Contacts fields to be retrieved
+		 @param array $other_data Other informations. The format is:
+		 	$other_data = array(
+		 		'offset'    => <offset>,
+		 		'limit'     => <max_num_returns>,
+		 		'sort'      => <sort>,
+		 		'order_by'  => <order by>
+		 	); 
+		
+		*/
+		function get_multiple_entries ( $id_contacts, $fields, $other_data = false )
+		{
+			if (!is_array($id_contacts) or !is_array($fields) or ($other_data != false and !is_array($other_data)))
+			{
+				if (is_object($GLOBALS['phpgw']->log)) 
+				{
+					$GLOBALS['phpgw']->log->message(array(
+						'text' => 'F-BadcontactcenterParam, wrong get_multiple_entry parameter type.',
+						'line' => __LINE__,
+						'file' => __FILE__));
+					
+					$GLOBALS['phpgw']->log->commit();
+				}
+				else {
+					exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>');
+				}
+			}
+			
+			$contacts = array();
+	
+			if ($other_data)
+			{
+				//TODO
+			}
+	
+			/* First check if this is a LDAP Catalog Group. In this case, just leave the
+			 * subtree search for the LDAP server
+			 */
+			if ($ldap_info = $this->catalog['ldap'])
+			{
+				$meta_catalog = CreateObject('contactcenter.bo_global_ldap_catalog', $ldap_info['id_source'], $ldap_info['context'], $this->external);
+				return $meta_catalog->get_multiple_entries($id_contacts, $fields, $other_data);
+			}
+			
+			/* Search for the catalog of the first entry and try to get all ids from that
+			 * catalog. Repeat to the ones not found until there's none missing or no more
+			 * catalogs.
+			 */
+
+			$contacts = array();
+			reset($this->catalog);
+			while (list($level,$branch) = each($this->catalog['sub_branch']))
+			{
+				$this->bo_contactcenter->set_catalog($branch);
+				$contacts += $this->bo_contactcenter->catalog->get_multiple_entries($id_contacts, $fields, $other_data);
+				
+				reset($contacts);
+				while (list($id) = each($contacts))
+				{
+					if ($id_contacts[$id])
+					{
+						unset($id_contacts[$id]);
+					}
+				}
+
+				if (!count($id_contacts))
+				{
+					break;
+				}
+			}
+
+			$this->bo_contactcenter->set_catalog($this->catalog);
+			
+			return $contacts;
+		}
+	
+		function get_all_entries_ids ()
+		{
+			// TODO!
+			return null;
+		}
+		
+		/*********************************************************************\
+		 *                Methods to get general fields                      *
+		\*********************************************************************/
+		
+		/*********************************************************************\
+		 *                   Methods to Include Data                         *
+		\*********************************************************************/
+
+		/*********************************************************************\
+		 *                   Methods to Alter Data                           *
+		\*********************************************************************/
+
+		/*********************************************************************\
+		 *                   Methods to Remove Data                          *
+		\*********************************************************************/
+
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.ldap_assync.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.ldap_assync.inc.php	(revision 284)
+++ /tags/contactcenter/1.20/inc/class.ldap_assync.inc.php	(revision 284)
@@ -0,0 +1,63 @@
+<?php
+	/***********************************************************************************\
+	* eGroupWare - Contacts Center                                              		*
+	* http://www.egroupware.org                                                 		*
+	* Written by:                                                               		*
+	*  - Mário César Kolling <mario.kolling@serpro.gov.br>								*
+	* Based on:																			*
+	* - Multi-threading strategies in PHP from 											*
+	* http://www.alternateinterior.com/2007/05/multi-threading-strategies-in-php.html	*
+	* ----------------------------------------------------------------------------------*
+	*  This program is free software; you can redistribute it and/or modify it  		*
+	*  under the terms of the GNU General Public License as published by the    		*
+	*  Free Software Foundation; either version 2 of the License, or (at your   		*
+	*  option) any later version.                                               		*
+	\***********************************************************************************/
+
+	require_once('class.ThreadInstance.inc.php');
+
+	/*
+	 * This is the Main Class that will be called in a new php process to test a bind in an ldap source
+	 */
+
+	class ldap_assync extends ThreadInstance
+	{
+
+		var $ldap;
+		var $account;
+		var $password;
+		var $host;
+
+		function ldap_assync($host, $account = false, $password = false)
+		{
+			$this->host = $host;
+			$this->account = $account;
+			$this->password = $password;
+			$this->ldap = ldap_connect($this->host);
+
+			$this->setup();
+			$this->go();
+		}
+
+		function go ()
+		{
+			if (ldap_bind($this->ldap, $this->account, $this->password))
+			{
+				$this->response("ok", ldap_error($this->ldap));
+			}
+			else
+			{
+				$this->response("no", ldap_error($this->ldap));
+			}
+
+		}
+
+	}
+
+	/*
+	 * Here is where we instantiate the new class. All the parameters are passed to the php process
+	 * as environment variables
+	 */
+	$search_ldap = new ldap_assync($_ENV['host'], $_ENV['account'], $_ENV['password']);
+
+?>
Index: /tags/contactcenter/1.20/inc/class.object_keeper.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.object_keeper.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.object_keeper.inc.php	(revision 2)
@@ -0,0 +1,126 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Object Keeper                                                *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	class object_keeper
+	{
+		var $repository = array('_USED_' => array());
+		var $rep_size = 0;
+		var $max_rep_size = 0; 
+
+		var $serial_rep;
+		
+		function object_keeper ()
+		{
+			// TODO: get this value from preferences
+			$this->max_rep_size = 50000;
+		}
+		
+		function & GetObject ($class_name, $unique_id = '_UNDEF_',
+							$p1='_UNDEF_',$p2='_UNDEF_',$p3='_UNDEF_',$p4='_UNDEF_',
+	                		$p5='_UNDEF_',$p6='_UNDEF_',$p7='_UNDEF_',$p8='_UNDEF_',
+	                		$p9='_UNDEF_',$p10='_UNDEF_',$p11='_UNDEF_',$p12='_UNDEF_',
+	                		$p13='_UNDEF_',$p14='_UNDEF_',$p15='_UNDEF_',$p16='_UNDEF_')
+		{
+			// TODO: error management
+			if (is_array($unique_id))
+			{
+				exit(lang('Object Keeper ERROR: Can\'t use an array as an unique ID!'));
+			}
+				
+			if (is_object($repository[$class_name][$unique_id]))
+			{
+				$this->repository['_USED_'][$class_name.','.$unique_id]++;
+				return ($this->repository[$class_name][$unique_id]);
+			}
+			
+			if ($this->repository_size > $this->max_rep_size)
+			{
+				arsort($this->repository['_USED_']);
+				reset($this->repository['_USED_']);
+				$remove_class = explode(',',array_shift($this->repository['_USED_']));
+				unset($this->repository[$remove_class[0]]);
+			}
+			
+			$this->repository[$class_name][$unique_id] =& CreateObject($class_name,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15,$p16);
+			//$this->repository[$class_name]['_INC_'] = '../../'.substr($class_name, 1, strpos($class_name, '.')).substr($class_name, strpos($class_name, '.')+1, strlen($class_name));
+
+			$this->repository['_USED_'][$class_name.','.$unique_id] = 1;
+	
+			$this->rep_size = strlen(serialize($this->repository));
+			
+			return $this->repository[$class_name][$unique_id];		
+		}
+		
+		/*!
+		
+			@function RemoveObject
+			@abstract Removes an object with the specified ID from the repository
+			@author Raphael Derosso Pereira
+			
+			@param string $class The class full name
+			@param mixed $id The Object's Unique ID
+		
+		*/
+		function RemoveObject($class,$id)
+		{
+			if ($this->repository[$class][$id])
+			{
+				unset($this->repository[$class][$id]);
+				unset($this->repository['_USED_'][$class.','.$id]);
+				return true;
+			}
+			
+			return false;
+		}
+		/*!
+		
+			@function __sleep
+			@abstract Reserved PHP function to be executed when the Object
+				Keeper is serialized
+			@author Raphael Derosso Pereira
+		
+		*/
+		function __sleep()
+		{
+			/* This is a temporary solution to keep the Object Keeper
+			 * inside the session. It is here while the method below
+			 * isn't implemented.
+			 */
+			unset($this->repository);
+			
+			/* This is an attempt to keep the objects serialized in another
+			 * array, but the problem is that the php serialize function
+			 * doesn't keep track of references, so it's impossible (at least
+			 * I didn't find any good way to do it) to manage references. This
+			 * doesn't apply only to objects. It applies to any type.
+			 * 
+			foreach($repository as $class_name => $object)
+			{
+				foreach(get_object_vars($object) as $attr => $attr_value)
+				{
+					if (!is_object($attr_value))
+					{
+						$this->serial_rep[$class_name][$attr] = serialize($attr_value);
+					}
+				}
+			}*/
+		}
+		
+		function __wakeup()
+		{
+		}
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_contact_address_type.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_contact_address_type.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_contact_address_type.inc.php	(revision 2)
@@ -0,0 +1,70 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once( "class.so_type.inc.php" );
+	
+	class so_contact_address_type extends so_type 
+	{
+	
+		function so_contact_address_type ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_typeof_contact_address' => array(
+					'name'  => 'id_typeof_contact_address',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'contact_address_type_name' => array(
+					'name'  => 'contact_address_type_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+
+			$this->type_name = & $this->main_fields['contact_address_type_name'];
+
+			$this->db_tables = array(
+				'phpgw_cc_typeof_ct_addrs' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_typeof_contact_address']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+			
+			if ($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/hook_admin.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/hook_admin.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/hook_admin.inc.php	(revision 2)
@@ -0,0 +1,25 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	// Only Modify the $file and $title variables.....
+	$title = $appname;
+	$file = Array(
+		'Global Catalogues Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname),
+		//'Edit custom fields' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uifields.index'),
+		//'Global Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=addressbook')
+	);
+	//Do not modify below this line
+	display_section($appname,$title,$file);
+
+?>
Index: /tags/contactcenter/1.20/inc/cc_updown.php
===================================================================
--- /tags/contactcenter/1.20/inc/cc_updown.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/cc_updown.php	(revision 2)
@@ -0,0 +1,18 @@
+<?php
+//	This script upload an CSV file to import contacts ....	
+	if($ftmp = $_FILES['import_file']['tmp_name']){				 		
+		$fname = ini_get("session.save_path").'/'."contacts_".md5(microtime()).".swp";					
+		if(move_uploaded_file($ftmp, $fname))	
+			$_SESSION['contactcenter']['importCSV'] = $fname;		
+	}		
+//	... or download an CSV file to export contacts.	
+	else if($_GET['file_name']) {	
+		$file_name = $_GET['file_name'];	
+		$file_path = $_GET['file_path'];
+		header ("Content-Type: application/octet-stream");
+		header ("Cache-Control: must-revalidate, post-check=0, pre-check=0");
+		header('Content-Length: ' . filesize($file_path)); 
+		header("Content-disposition: attachment; filename=".$file_name);
+		readfile($file_path);
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.bo_group_manager.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.bo_group_manager.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.bo_group_manager.inc.php	(revision 2)
@@ -0,0 +1,195 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	include_once('class.abo_catalog.inc.php');
+	class bo_group_manager extends abo_catalog
+	{
+			
+		var $fields = array(
+			'id_group'    	=> true,
+			'title'       			=> true,			
+			'short_name'	=> true,
+			'owner'	=> true
+		);
+	
+		/*!
+		
+		 @function bo_group_manager
+		 @abstract Constructor
+	 	 @author Raphael Derosso Pereira
+	 	 
+	 	*/
+		function bo_group_manager()
+		{
+			$this->init();		
+			
+		}
+
+		/*!
+			@function find
+			@abstract Find function for this catalog
+			@author Raphael Derosso Pereira
+
+		*/
+		function find($what, $rules=false, $other=false)
+		{
+			
+			if (is_array($what) and count($what))
+			{
+				$found = false;
+				
+				foreach ($what as $value)
+				{
+					if (strpos($value, 'group') === 0)
+					{
+						$found = true;
+					}
+				}
+				
+				if (!$found)
+				{
+					return $this->sql_find($what, $rules, $other);
+				}
+								
+			}
+
+			return $this->sql_find($what, $rules, $other);
+		}
+		 	
+		/*!
+		 
+		 @function get_multiple_entries
+		 @abstract Returns multiple Contacts data into one array
+		 @author Raphael Derosso Pereira
+
+		 @param array $id_contacts The Contacts IDs
+		 @param array $fields The Contacts fields to be retrieved
+		 @param array $other_data Other informations. The format is:
+		 	$other_data = array(
+		 		'offset'    => <offset>,
+		 		'limit'     => <max_num_returns>,
+		 		'sort'      => <sort>,
+		 		'order_by'  => <order by>
+		 	); 
+		
+		*/
+		function get_multiple_entries ( $id_groups, $fields, $other_data = false )
+		{
+				
+			$groups = array();
+			
+			foreach ($id_groups as $id)
+			{
+				$group = $this->get_single_entry($id,$fields);				
+								
+				if ($group)
+				{
+					$groups[] = $group;
+				}
+			}			
+			
+			return $groups;
+	
+		}
+
+		/*!
+		
+			@function get_all_entries_ids
+			@abstract Returns the IDs of all the entries in this catalog
+			@author Raphael Derosso Pereira
+
+		*/
+		function get_all_entries_ids ()
+		{
+			
+			$search_fields = array('group.id_group', 'group.title');
+			$search_other  = array('order' => 'group.title');
+			
+			$search_rules = array();
+			array_push($search_rules, array(
+					'field' => 'group.owner',
+					'type'  => '=',
+					'value' => $GLOBALS['phpgw_info']['user']['account_id']
+				));			
+
+			$result_i = $this->find($search_fields, $search_rules, $search_other);
+			
+
+			if (is_array($result_i) and count($result_i))
+			{
+				$result = array();
+				foreach($result_i as $result_part)
+				{
+					$result[] = $result_part['id_group'];
+				}
+												
+				return $result;
+			}
+			
+			return null;
+		}
+		
+		function get_single_entry ( $id, $fields )
+		{	
+			
+			if (!is_array($fields)) 
+			{
+				if (is_object($GLOBALS['phpgw']->log)) 
+				{
+					$GLOBALS['phpgw']->log->message(array(
+						'text' => 'F-BadcontactcenterParam, wrong get_single_entry parameters type.',
+						'line' => __LINE__,
+						'file' => __FILE__));
+					
+					$GLOBALS['phpgw']->log->commit();
+				}
+				else 
+				{
+					exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>');
+				}
+			}
+
+			$soGroup = CreateObject('contactcenter.so_group');			
+			$group = $soGroup -> select($id);
+
+			 return $group[0];						
+		}
+		
+		function add_group ( $data )
+		{
+			$permissions = $this->security->get_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+			
+			$soGroup = CreateObject('contactcenter.so_group');
+	
+			if(! $data['id_group'])
+				$id = $soGroup -> insert($data);
+			else				
+				$id = $soGroup -> update($data);
+				
+			return $id;
+		}
+		
+		function get_contacts_by_group ( $id )
+		{
+			$soGroup = CreateObject('contactcenter.so_group');			
+			return $soGroup -> selectContactsByGroup($id);
+		}
+	
+}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_company.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_company.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_company.inc.php	(revision 2)
@@ -0,0 +1,816 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	include_once("class.so_main.inc.php");
+
+	class so_company extends so_main {
+
+		function so_company ( $id_company = false)
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_company'       => array(
+					'name'  => 'id_company',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),	
+				'id_company_owner' => array(
+					'name'  => 'id_company_owner',		
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'company_name'  => array(
+					'name'  => 'company_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'company_notes' => array(
+					'name'  => 'company_notes',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+			);
+					
+			$this->contacts = array(
+				'id_contact' => array(
+					'name'        => 'id_contact',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_contact',
+						'field'   => 'id_contact'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'id_company' => array(
+					'name'        => 'id_company',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_company',
+						'field'   => 'id_company'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'title'      => array(
+					'name'   => 'title',
+					'type'   => false,
+					'states' => array(),
+					'values' => array()
+				),
+				'department' => array(
+					'name'   => 'department',
+					'type'   => false,
+					'states' => array(),
+					'values' => array()
+				),
+				'default_contact' => array(
+					'name'   => 'default_contact',
+					'type'   => false,
+					'states' => array(),
+					'values' => array()
+				),
+				'default_company' => array(
+					'name'   => 'default_company',
+					'type'   => false,
+					'states' => array(),
+					'values' => array()
+				)
+			);
+						
+			$this->relations = array(
+				'id_company' => array(
+					'name'        => 'id_company',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_company',
+						'field'   => 'id_contact'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'id_related' => array(
+					'name'        => 'id_related',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_company',
+						'field'   => 'id_contact'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'id_typeof_company_relation' => array(
+					'name'        => 'id_typeof_company_relation',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_typeof_co_rels',
+						'field'   => 'id_typeof_company_relation'
+					),
+					'states'      => array(),
+					'values'      => false
+				)
+			);
+				
+			$this->addresses = array(
+				'id_company' => array(
+					'name'        => 'id_company',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_company',
+						'field'   => 'id_contact'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'id_address' => array(
+					'name'        => 'id_address',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_addresses',
+						'field'   => 'id_address'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'id_typeof_company_address' => array(
+					'name'        => 'id_typeof_company_address',
+					'type'        => 'foreign',
+					'association' => array(
+						'table'   => 'phpgw_cc_typeof_co_addrs',
+						'field'   => 'id_typeof_company_address'
+					),
+					'states'      => array(),
+					'values'      => array()
+				)
+			);
+			
+			$this->connections = array(
+				'id_company' => array(
+					'name'        => 'id_company',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_company',
+						'field'   => 'id_contact'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'id_connection' => array(
+					'name'        => 'id_connection',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_connections',
+						'field'   => 'id_connection'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'id_typeof_company_connection' => array(
+					'name'        => 'id_typeof_company_connection',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_typeof_co_conns',
+						'field'   => 'id_typeof_company_connection'
+					),
+					'states'      => array(),
+					'values'      => array()
+				)
+			);
+
+			$this->legals = array(
+				'id_company_legal' => array(
+					'name'        => 'id_company_legal',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_company',
+						'field'   => 'id_company'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'id_typeof_company_legal' => array(
+					'name'        => 'id_typeof_company_legal',
+					'type'        => 'foreign',
+					'association' => array(
+						'table'   => 'phpgw_cc_company_legal',
+						'field'   => 'id_typeof_company_legal'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'id_company' => array(
+					'name'        => 'id_company',
+					'type'        => 'foreign',
+					'association' => array(
+						'table'   => 'phpgw_cc_company',
+						'field'   => 'id_company'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'legal_info_name' => array(
+					'name'   => 'legal_info_name',
+					'type'   => false,
+					'states' => array(),
+					'values' => array()
+				),
+				'legal_info_value' => array(
+					'name'   => 'legal_info_value',
+					'type'   => false,
+					'states' => array(),
+					'values' => array()
+				)
+			);
+
+
+			$this->db_tables = array(
+				'phpgw_cc_company' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_company']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				),
+				'phpgw_cc_contact_company' => array(
+					'type'   => 'multi',
+					'keys'   => array(
+						'primary' => array(
+							&$this->contacts['id_contact'],
+							&$this->contacts['id_company']
+						),
+						'foreign' => array(
+							&$this->contacts['id_contact'],
+							&$this->contacts['id_company']
+						)
+					),
+					'fields' => & $this->contacts
+				),
+				'phpgw_cc_company_rels' => array(
+					'type'   => 'multi',
+					'keys'   => array(
+						'primary' => array(
+							&$this->relations['id_company'],
+							&$this->relations['id_related']
+						),
+						'foreign' => array(
+							&$this->relations['id_company'],
+							&$this->relations['id_related']
+						)
+					),
+					'fields' => & $this->relations
+				),
+				'phpgw_cc_company_addrs' => array(
+					'type'   => 'multi',
+					'keys'   => array(
+						'primary' => array(
+							&$this->addresses['id_company'],
+							&$this->addresses['id_address']
+						),
+						'foreign' => array(
+							&$this->addresses['id_company'],
+							&$this->addresses['id_address'],
+							&$this->addresses['id_typeof_company_address']
+						)
+					),
+					'fields' => & $this->addresses
+				),
+				'phpgw_cc_company_conns' => array(
+					'type'   => 'multi',
+					'keys'   => array(
+						'primary' => array(
+							&$this->connections['id_company'],
+							&$this->connections['id_connection']
+						),
+						'foreign' => array(
+							&$this->connections['id_company'],
+							&$this->connections['id_connection'],
+							&$this->connections['id_typeof_company_connection']
+						)
+					),
+					'fields' => & $this->connections
+				)
+			);
+					
+			if ($id_company)
+			{
+				$this->id = $id_company;
+				if (!$this->checkout($id_company))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}			
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+
+		/*********************************************************************\
+		 *                Methods to Get Company Info                        *
+		\*********************************************************************/
+
+		/*!
+		
+			@function get_company_name
+			@abstract Returns the Company Name
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_company_name()
+		{
+			return $this->main_fields['company_name']['value'];
+		}
+		
+		/*!
+		
+			@function get_company_notes
+			@abstract Returns the Company Notes
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_company_notes()
+		{
+			return $this->main_fields['company_notes']['value'];
+		}
+	
+		/*!
+		
+			@function get_legals
+			@abstract Returns the Company's Legals IDs
+			@author Raphael Derosso Pereira
+		
+			@return array Format:
+				$return = array(
+					'<id_legal1>' => array(
+						'id_type'          => '<id_type>',
+						'legal_info_name'  => '<legal_info_name>',
+						'legal_info_value' => '<legal_info_value>'
+					),
+					'<id_legal2>' => array(
+						'id_type'          => '<id_type>',
+						'legal_info_name'  => '<legal_info_name>',
+						'legal_info_value' => '<legal_info_value>'
+					),
+					...
+				);
+		*/
+		function get_legals (  )
+		{
+			$return = array();
+			
+			while(list(,$id_legal) = each($this->legals['id_legal']['values']) and
+				list(,$id_type) = each($this->legals['id_typeof_company_legal']['values']) and
+				list(,$legal_info_name) = each($this->legals['legal_info_name']['values']) and
+				list(,$legal_info_value) = each($this->legals['legal_info_value']['values']))
+			{
+				$return[$id_legal] = array(
+					'id_type'          => $id_type,
+					'legal_info_name'  => $legal_info_name,
+					'legal_info_value' => $legal_info_value
+				);		
+			}
+			
+			return $return;
+		}
+	
+		/*!
+		
+			@function get_relations
+			@abstract Returns the Company's Relations
+			@author Raphael Derosso Pereira
+		
+			@return array Format:
+				$return = array(
+					'<id_related1>' => '<id_relation1_type>',
+					'<id_related2>' => '<id_relation2_type>',
+					...);
+		*/
+		function get_relations (  )
+		{
+			$return = array();
+			
+			while(list(,$id_related) = each($this->relations['id_related']['values']) and
+				list(,$id_relation_type) = each($this->relations['id_typeof_company_relation']['values']))
+			{
+				$return[$id_related] = $id_relation_type;				
+			}
+			
+			return $return;
+		}
+	
+		/*!
+		
+			@function get_addresses
+			@abstract Returns the Company's Addresses
+			@author Raphael Derosso Pereira
+		
+			@return array Format:
+				$return = array(
+					'<id_address1>' => '<id_address1_type>',
+					'<id_address2>' => '<id_address2_type>',
+					...);
+		*/
+		function get_addresses (  )
+		{
+			$return = array();
+			
+			while(list(,$id_address) = each($this->addresses['id_address']['values']) and
+				list(,$id_address_type) = each($this->addresses['id_typeof_company_address']['values']))
+			{
+				$return[$id_address] = $id_address_type;				
+			}
+			
+			return $return;
+		}
+	
+		/*!
+		
+			@function get_connections
+			@abstract Returns the Company's Connections
+			@author Raphael Derosso Pereira
+		
+			@return array Format:
+				$return = array(
+					'<id_connection1>' => '<id_connection1_type>',
+					'<id_connection2>' => '<id_connection2_type>',
+					...);
+		*/
+		function get_connections (  )
+		{
+			$return = array();
+			
+			while(list(,$id_connection) = each($this->connections['id_connection']['values']) and
+				list(,$id_connection_type) = each($this->connections['id_typeof_company_connection']['values']))
+			{
+				$return[$id_connection] = $id_connection_type;				
+			}
+			
+			return $return;
+		}
+
+		/*!
+		
+			@function get_contacts
+			@abstract Returns the Company's Contacts IDs and
+				bussiness info
+			@author Raphael Derosso Pereira
+		
+			@return array Format:
+				$return = array(
+					'<id_contact1>' => array(
+						'title'			=> '<title>',
+						'department'	=> '<department>'
+					),
+					'<id_contact2>' => array(
+						'title'			=> '<title>',
+						'department'	=> '<department>'
+					),
+					...
+				);
+		*/
+		function get_contacts (  )
+		{
+			$return = array();
+			
+			while(list(,$id_contact) = each($this->contacts['id_contact']['values']) and
+				list(,$title) = each($this->contacts['title']['values']) and
+				list(,$department) = each($this->contacts['department']['values']))
+			{
+				$return[$id_contact] = array(
+					'title'			=> $title,
+					'department'	=> $department);		
+			}
+			
+			return $return;
+		}
+	
+	
+		/*********************************************************************\
+		 *                   Methods to Alter Data                           *
+		\*********************************************************************/
+
+		/*!
+		
+			@function set_company_name
+			@abstract Sets the Company's Name
+			@author Raphael Derosso Pereira
+			@param string $name The new Contact's Name 
+		
+		*/
+		function set_company_name ( $name )
+		{
+			$this->main_fields['company_name']['value'] = $name;
+			$this->manage_fields($this->main_fields['company_name'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_company_notes
+			@abstract Sets the Company's Notes
+			@author Raphael Derosso Pereira
+			@param string $name The new Company's Name 
+		
+		*/
+		function set_company_notes ( $notes )
+		{
+			$this->main_fields['company_notes']['value'] = $notes;
+			$this->manage_fields($this->main_fields['company_notes'], 'changed');
+		}
+
+		/*!
+		
+			@function set_legal
+			@abstract Sets on of this Company's Legal
+			@author Raphael Derosso Pereira
+			@param integer $id_legal The Company's Legal ID
+			@param integer $id_type The new Company's Legal type ID
+			@param string $legal_info The new Company's Legal information name
+			@param string $legal_info_value The new Company's Legal information
+				value 
+		
+		*/
+		function set_legal ( $id_legal, $id_type, $legal_info_name, $legal_info_value )
+		{
+			if (($pos = array_search($id_legal, $this->legals['id_legal']['values'])))
+			{
+				$this->legals['id_typeof_company_legal']['values'][$pos] = $id_type;
+				$this->legals['legal_info_name']['values'][$pos] = $legal_info_name;
+				$this->legals['legal_info_value']['values'][$pos] = $legal_info_value;
+				
+				$this->manage_fields($this->legals['id_typeof_company_legal'], 'changed', $pos);
+				$this->manage_fields($this->legals['legal_info'], 'changed', $pos);
+				$this->manage_fields($this->legals['legal_value'], 'changed', $pos);
+				
+				return;
+			}
+			
+			array_push($this->legals['id_company']['values'], &$this->id);
+			array_push($this->legals['id_legal']['values'], $id_legal);
+			array_push($this->legals['id_typeof_company_legal']['values'], $id_legal);
+			array_push($this->legals['legal_info_name']['values'], $legal_info_name);
+			array_push($this->legals['legal_info_value']['values'], $legal_info_value);
+			
+			$this->manage_fields($this->legals['id_company']['values'], 'changed', 'new');
+			$this->manage_fields($this->legals['id_legal']['values'], 'changed', 'new');
+			$this->manage_fields($this->legals['id_typeof_company_legal'], 'changed', 'new');
+			$this->manage_fields($this->legals['legal_info'], 'changed', 'new');
+			$this->manage_fields($this->legals['legal_value'], 'changed', 'new');
+		}
+	
+		/*!
+		
+			@function set_relation
+			@abstract Sets the company's Relation
+			@author Raphael Derosso Pereira
+			@param integer $id_related The new company's Relation type ID
+			@param integer $id_type The new company's Relation ID 
+		
+		*/
+		function set_relation ( $id_related, $id_type )
+		{
+			if (($pos = array_search($id_related, $this->relations['id_related']['values'])))
+			{
+				$this->relations['id_typeof_company_relation']['values'][$pos] = $id_type;
+				$this->manage_fields($this->relations['id_typeof_company_relation'], 'changed', $pos);
+				
+				return;
+			}
+			
+			array_push($this->relations['id_company']['values'], &$this->id);
+			array_push($this->relations['id_related']['values'], $id_related);
+			array_push($this->relations['id_typeof_company_relation']['values'], $id_type);
+			
+			$this->manage_fields($this->relations['id_company']['values'], 'changed', 'new');
+			$this->manage_fields($this->relations['id_typeof_company_relation'], 'changed', 'new');
+			$this->manage_fields($this->relations['id_related'], 'changed', 'new');
+		}
+	
+		/*!
+		
+			@function set_address
+			@abstract Sets the company's Address
+			@author Raphael Derosso Pereira
+			@param integer $id_address The new company's Address ID 
+			@param integer $id_type The new company's Address type ID
+		
+		*/
+		function set_address ( $id_address, $id_type )
+		{
+			if (($pos = array_search($id_address, $this->addresses['id_address']['values'])))
+			{
+				$this->addresses['id_typeof_company_address']['values'][$pos] = $id_type;
+				$this->manage_fields($this->addresses['id_typeof_company_address'], 'changed', $pos);
+				
+				return;
+			}
+			
+			array_push($this->addresses['id_company']['values'], &$this->id);
+			array_push($this->addresses['id_address']['values'], $id_address);
+			array_push($this->addresses['id_typeof_company_address']['values'], $id_type);
+			
+			$this->manage_fields($this->addresses['id_company']['values'], 'changed', 'new');
+			$this->manage_fields($this->addresses['id_typeof_company_address'], 'changed', 'new');
+			$this->manage_fields($this->addresses['id_address'], 'changed', 'new');
+		}
+	
+		/*!
+		
+			@function set_connection
+			@abstract Sets the company's Connection
+			@author Raphael Derosso Pereira
+			@param integer $id_connection The new company's Connection ID 
+			@param integer $id_type The new company's Connection type ID
+		
+		*/
+		function set_connection ( $id_connection, $id_type )
+		{
+			if (($pos = array_search($id_connection, $this->connections['id_connection']['values'])))
+			{
+				$this->connections['id_typeof_company_connection']['values'][$pos] = $id_type;
+				$this->manage_fields($this->connections['id_typeof_company_connection'], 'changed', $pos);
+				
+				return;
+			}
+			
+			array_push($this->connections['id_company']['values'], &$this->id);
+			array_push($this->connections['id_connection']['values'], $id_connection);
+			array_push($this->connections['id_typeof_company_connection']['values'], $id_type);
+			
+			$this->manage_fields($this->connections['id_company']['values'], 'changed', 'new');
+			$this->manage_fields($this->connections['id_typeof_company_connection'], 'changed', 'new');
+			$this->manage_fields($this->connections['id_connection'], 'changed', 'new');
+		}
+	
+		/*!
+		
+			@function set_contact
+			@abstract Sets the Company's Contacts information
+			@author Raphael Derosso Pereira
+			@param integer $id_contact The new Company's Contac ID
+			@param string $title The new Contact's Title on this Company
+			@param string $department The new Contact's Department on this 
+				Company 
+		
+		*/
+		function set_contact ( $id_contact, $title, $department )
+		{
+			if (($pos = array_search($id_contact, $this->contacts['id_contact']['values'])))
+			{
+				$this->contacts['title']['values'][$pos] = $title;
+				$this->contacts['department']['values'][$pos] = $department;
+				
+				$this->manage_fields($this->contacts['title'], 'changed', $pos);
+				$this->manage_fields($this->contacts['department'], 'changed', $pos);
+				
+				return;
+			}
+			
+			array_push($this->contacts['id_company']['values'], &$this->id);
+			array_push($this->contacts['id_contact']['values'], $id_contact);
+			array_push($this->contacts['title']['values'], $title);
+			array_push($this->contacts['department']['values'], $department);
+			
+			$this->manage_fields($this->contacts['id_company']['values'], 'changed', 'new');
+			$this->manage_fields($this->contacts['title'], 'changed', 'new');
+			$this->manage_fields($this->contacts['department'], 'changed', 'new');
+		}
+	
+
+
+		/*********************************************************************\
+		 *                   Methods to Remove Data                          *
+		\*********************************************************************/
+
+	
+		/*!
+		
+			@function remove_relation
+			@abstract Remove one Company's Relation
+			@author Raphael Derosso Pereira
+			@param integer $id_relation The ID of the relation to be removed 
+		
+		*/
+		function remove_relation ( $id_related )
+		{
+			if (($pos = array_search($id_related, $this->relations['id_related']['values'])))
+			{
+				$this->manage_fields($this->relations['id_related'], 'deleted', $pos);
+				$this->manage_fields($this->relations['id_typeof_company_relation'], 'deleted', $pos);
+				
+				return true;
+			}
+			
+			return false;
+		}
+	
+		/*!
+		
+			@function remove_address
+			@abstract Remove one Company's Address
+			@author Raphael Derosso Pereira
+			@param integer $id_address The ID of the address to be removed 
+		
+		*/
+		function remove_address ( $id_address )
+		{
+			if (($pos = array_search($id_address, $this->addresses['id_address']['values'])))
+			{
+				$this->manage_fields($this->addresses['id_address'], 'deleted', $pos);
+				$this->manage_fields($this->addresses['id_typeof_company_address'], 'deleted', $pos);
+				
+				return true;
+			}
+			
+			return false;
+		}
+	
+		/*!
+		
+			@function remove_connection
+			@abstract Remove one Company's Connection
+			@author Raphael Derosso Pereira
+			@param integer $id_connection The ID of the connection to be removed 
+		
+		*/
+		function remove_connection ( $id_connection )
+		{
+			if (($pos = array_search($id_connection, $this->connections['id_connection']['values'])))
+			{
+				$this->manage_fields($this->connections['id_connection'], 'deleted', $pos);
+				$this->manage_fields($this->connections['id_typeof_company_connection'], 'deleted', $pos);
+				
+				return true;
+			}
+			
+			return false;
+		}
+	
+		/*!
+		
+			@function remove_contact
+			@abstract Remove one Company's Contact
+			@author Raphael Derosso Pereira
+			@param integer $id_contact The ID of the contact to be removed 
+		
+		*/
+		function remove_contact ( $id_contact )
+		{
+			if (($pos = array_search($id_contact, $this->contacts['id_contact']['values'])))
+			{
+				$this->manage_fields($this->contacts['id_contact'], 'deleted', $pos);
+				$this->manage_fields($this->contacts['title'], 'deleted', $pos);
+				$this->manage_fields($this->contacts['department'], 'deleted', $pos);
+				
+				return true;
+			}
+			
+			return false;
+		}
+	
+
+		/*!
+		
+			@function remove_legal
+			@abstract Remove one Company's Legal
+			@author Raphael Derosso Pereira
+			@param integer $id_company The ID of the legal information to be removed 
+		
+		*/
+		function remove_legal ( $id_type )
+		{
+			if (($pos = array_search($id_type, $this->contacts['id_contact']['values'])))
+			{
+				$this->manage_fields($this->legals['id_company']['values'], 'deleted', $pos);
+				$this->manage_fields($this->legals['id_legal']['values'], 'deleted', $pos);
+				$this->manage_fields($this->legals['id_typeof_company_legal'], 'deleted', $pos);
+				$this->manage_fields($this->legals['legal_info'], 'deleted', $pos);
+				$this->manage_fields($this->legals['legal_value'], 'deleted', $pos);
+				
+				return true;
+			}
+			
+			return false;
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.bo_global_ldap_catalog.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.bo_global_ldap_catalog.inc.php	(revision 285)
+++ /tags/contactcenter/1.20/inc/class.bo_global_ldap_catalog.inc.php	(revision 285)
@@ -0,0 +1,1354 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*
+		This class is responsible for manipulating the Global LDAP Contact Manager
+	*/
+	include_once('class.abo_catalog.inc.php');
+	
+	class bo_global_ldap_catalog extends abo_catalog
+	{
+		var $ldap;
+	
+		var $src_info;
+		
+		var $trans_table;
+		// used to determine if a catalog is external
+		var $external;
+		var $fields = array(
+			'id_contact'    => true,
+			'status'        => true,
+			'photo'         => true,
+			'alias'         => true,
+			'prefix'        => true,
+			'given_names'   => true,
+			'family_names'  => true,
+			'account_type'  => true,
+			'names_ordered' => true,
+			'suffix'        => true,
+			'birthdate'     => true,
+			'sex'           => true,
+			'pgp_key'       => true,
+			'notes'         => true,
+			
+			/* Array fields */
+			'companies'     => true,
+			'relations'     => true,
+			'addresses'     => true,
+			'connections'   => true
+		);
+		
+		/*
+		
+			@function global_ldap_catalog
+			@abstract Constructor
+			@author Raphael Derosso Pereira
+			@author Mário César Kolling (external catalogs)
+
+			@param integer $id_source The ID of the LDAP source
+			@param string $context Ldap bind DN
+			@param integer $external 0 = internal catalog, 1 = external catalog
+		*/
+		function bo_global_ldap_catalog ( $id_source, $context, $external = 0 )
+		{
+			$this->external = $external;
+			if (!function_exists('ldap_search'))
+			{
+				exit('PHP LDAP support Unavailable!');
+			}
+			
+			$this->ldap = CreateObject('contactcenter.bo_ldap_manager');
+			
+			if ($this->external)
+			{
+				$all_src = $this->ldap->get_external_ldap_sources();
+			}
+			else
+			{
+				$all_src = $this->ldap->get_all_ldap_sources();
+			}
+
+			if (!$all_src[$id_source] or !$context)
+			{
+				exit('Unavailable LDAP source.');
+			}
+
+			$this->src_info = $all_src[$id_source];
+			$this->src_info['context'] = $context;
+
+			if ($this->external)
+			{
+				$this->trans_table = $this->ldap->get_external_ldap_fields_association($id_source);
+			}
+			else
+			{	
+				$this->trans_table = $this->ldap->get_ldap_fields_association($id_source);
+			}
+		}
+		
+		/*
+		
+			@function find
+			@abstract Searches the LDAP directory for the specified fields with
+				the specified rules and retuns an array containing all the DNs
+				that matches the rules.
+			@author Raphael Derosso Pereira
+			
+			@param array $what The fields to be taken
+			@param array $rules The rules to be match. See class.abo_catalog.inc.php
+				for reference
+			@param array $other Other parameters:
+				$return = array(
+					'limit'  => (integer),
+					'offset' => (integer) [NOT IMPLEMENTED]
+				)
+		
+		*/
+		function find($what, $rules=false, $other=false)
+		{
+			$restric_fields = $this->get_restrictions_without_branch($rules);
+			
+			$trans_f = $this->translate_fields($what, $restric_fields);
+			
+			foreach($trans_f as $orig => $field_a)
+			{
+				foreach($field_a as $field)
+				{
+					$fields[] = $field;
+				}
+			}
+			
+			$fields = array_unique($fields);
+			
+			$filter = $this->process_restrictions($rules, $trans_f);
+
+			if(strstr($this->src_info['context'], "ldap://")) {
+				$refer_context 	= str_replace("??base","",preg_replace('!^(ldap://[^/]+)/(.*$)!', '\\2', $this->src_info['context']));
+				$host	= preg_replace('!^(ldap://[^/]+)/.*$!', '\\1', $this->src_info['context']);				
+				$this->src_info['host'] = $host;
+			}			
+
+			if($refer_context || "ou" === strtolower(substr($this->src_info['context'], 0, 2)))
+			{		
+				$followReferral = false;			
+			}
+			elseif(trim($rules[4]['value']) != "inetOrgPerson")	
+			{			
+				$followReferral = true;
+			}
+			else
+			{				
+				return false;
+			}
+			
+			$ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'], $this->src_info['acc'], $this->src_info['pw'], $followReferral);
+			$result_r = ldap_search($ldap ,($refer_context  ? $refer_context  : $this->src_info['context']), $filter, $fields, 0);
+
+			if (!$result_r)
+			{
+				return false;
+			}
+			
+			if ($other['order'])
+			{
+				$sort_f = array($other['order']);
+				$ldap_sort_by = $this->translate_fields($sort_f, $restric_fields);
+			}
+
+			if ($ldap_sort_by)
+			{
+				if (!ldap_sort($ldap, $result_r, $ldap_sort_by[$other['order']][0]))
+				{
+					return false;
+				}
+			}
+			
+			$result_u = ldap_get_entries($ldap, $result_r);
+			
+			$i = 0;
+			foreach ($result_u as $index => $result_p)
+			{
+				if ($index === 'count' or $index === 'dn' or (!$this->external and $result_p['phpgwaccountvisible'][0] == '-1'))
+				{
+					continue;
+				}
+				
+				foreach ($trans_f as $orig => $trans)
+				{
+					$orig = substr($orig, strrpos($orig, '.')+1, strlen($orig));
+					foreach ($trans as $f)
+					{
+						if ($f === 'dn')
+						{
+							$return[$i][$orig] = $result_p['dn'];
+						}
+						else if ($result_p[$f][0])
+						{
+							$return[$i][$orig] = $result_p[$f][0];
+						}
+					}
+				}
+				$i++;
+			}
+			
+			return $return;
+		}
+		
+		/*
+		
+			@function translate_fields
+			@abstract Return the LDAP objectClass fields that corresponds to the
+				specified parameter fields
+			@author Raphael Derosso Pereira
+			
+			@param array $fields The fields in the standard ContactCenter format
+			@param array $rules The rules
+		
+		*/
+		function translate_fields ( $fields, &$restric_fields )
+		{
+			$return = array();
+			
+			$i = 0;
+			foreach ($fields as $field)
+			{
+				if (!array_key_exists($field,$this->trans_table) or !$this->trans_table[$field])
+				{
+					continue;
+				}
+				
+				if (!is_array($this->trans_table[$field]))
+				{
+					$reference = $this->trans_table[$field];
+					
+					reset($restric_fields);
+					while(list(,$field_r) = each($restric_fields))
+					{
+						if ($field_r['field'] === $reference and array_key_exists($field_r['value'], $this->trans_table[$reference]))
+						{
+							array_push($return[$field], $this->trans_table[$reference][$field_r['value']]);
+						}
+					}
+				}
+				else
+				{
+					if (!is_array($return[$field]))
+					{
+						$return[$field] = $this->trans_table[$field];
+					}
+					else
+					{
+						array_push($return[$field], $this->trans_table[$field]);
+					}
+				}
+			}
+			
+			if (count($return))
+			{
+				return $return;
+			}
+			
+			return false;
+		}
+		
+		/*
+		
+			@function process_restrictions
+			@abstract Returns a LDAP filter string that corresponds to the
+				specified restriction rules
+			@author Raphael Derosso Pereira
+			
+			@param string $rules The restriction rules
+		
+		*/
+		function process_restrictions( $rules, &$trans_table, $join_type='&' )
+		{
+			if (!is_array($rules) or !count($rules))
+			{
+				return null;
+			}
+			
+			foreach($rules as $rule_i => $rule)
+			{
+				$t = array();
+				switch($rule['type'])
+				{
+					case 'branch':
+						switch(strtoupper($rule['value']))
+						{
+							case 'OR':
+								$join = '|';
+								break;
+								
+							case 'AND':
+								$join = '&';
+								break;
+								
+							case 'NOT':
+								$join = '!';
+								break;
+								
+							default:
+								$join = $join_type;
+						}
+						$return_t[] = $this->process_restrictions($rule['sub_branch'], $trans_table, $join);
+						break;
+						
+					case '=':
+						if (array_key_exists($rule['field'], $trans_table))
+						{
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								$t[] = '('.$field.'='.$rule['value'].')';
+							}
+							$return_t[] = '(|'.implode(' ',$t).')';
+						}
+						break;
+					
+					case '!=':	
+						if (array_key_exists($rule['field'], $trans_table))
+						{
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								$t[] = '(!('.$field.'='.$rule['value'].'))';
+							}
+							$return_t[] = '(&'.implode(' ',$t).')';
+						}
+						break;
+					
+					case '<=':
+					case '<':
+						if (array_key_exists($rule['field'], $trans_table))
+						{
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								$t[] = '('.$field.'<='.$rule['value'].')';
+							}
+							$return_t[] = '(|'.implode(' ',$t).')';
+						}
+						break;
+					
+					case '>':
+					case '>=':
+						if (array_key_exists($rule['field'], $trans_table))
+						{
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								$t[] = '('.$field.'>='.$rule['value'].')';
+							}
+							$return_t[] = '(|'.implode(' ',$t).')';
+						}
+						break;
+						
+					case 'NULL':
+						if (array_key_exists($rule['field'], $trans_table))
+						{
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								$t[] = '(!('.$field.'=*'.'))';
+							}
+							$return_t[] = '(&'.implode(' ',$t).')';
+						}
+						break;
+					
+					case 'IN':
+						if (array_key_exists($rule['field'], $trans_table))
+						{
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								foreach($rule['value'] as $value)
+								{
+									$t[] = '('.$field.'='.$value.')';
+								}
+							}
+							$return_t[] = '(|'.implode(' ',$t).')';
+						}
+						break;
+
+					case 'iLIKE':
+/*						if (array_key_exists($rule['field'], $trans_table))
+						{
+							$value_1 = strtoupper(str_replace('%', '*', $rule['value']));
+							$value_2 = strtolower($value_1);
+							
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								$t[] = '('.$field.'='.$value_1.')';
+								$t[] = '('.$field.'='.$value_2.')';
+							}
+							$return_t[] = '(|'.implode(' ',$t).')';
+						}
+						break;
+						
+*/					case 'LIKE':
+						if (array_key_exists($rule['field'], $trans_table))
+						{
+							$value = str_replace('%', '*', $rule['value']);
+							
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								$t[] = '('.$field.'='.$value.')';
+							}
+							$return_t[] = '(|'.implode(' ',$t).')';
+						}
+						break;
+						
+					case 'NOT NULL':
+						if (array_key_exists($rule['field'], $trans_table))
+						{
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								$t[] = '('.$field.'=*'.')';
+							}
+							$return_t[] = '(|'.implode(' ',$t).')';
+						}
+						break;
+					
+					case 'NOT IN':
+						if (array_key_exists($rule['field'], $trans_table))
+						{
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								foreach($rule['value'] as $value)
+								{
+									$t[] = '('.$field.'='.$value.')';
+								}
+							}
+							$return_t[] = '(!(|'.implode('',$t).'))';
+						}
+						break;
+
+					case 'NOT iLIKE':
+						if (array_key_exists($rule['field'], $trans_table))
+						{
+							$value_1 = strtoupper(str_replace('%', '*', $rule['value']));
+							$value_2 = strtolower($value_1);
+							
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								$t[] = '('.$field.'='.$value_1.')';
+								$t[] = '('.$field.'='.$value_2.')';
+							}
+							$return_t[] = '(!(|'.implode(' ',$t).'))';
+						}
+						break;
+
+					case 'NOT LIKE':
+						if (array_key_exists($rule['field'], $trans_table))
+						{
+							$value = str_replace('%', '*', $rule['value']);
+							
+							foreach($trans_table[$rule['field']] as $field)
+							{
+								$t[] = '('.$field.'='.$value.')';
+							}
+							$return_t[] = '(!(|'.implode(' ',$t).'))';
+						}
+						break;
+				}
+			}
+			
+			if (count($return_t))
+			{
+				$return = '('.$join_type;
+				foreach ($return_t as $return_p)
+				{
+					$return .= $return_p;
+				}
+				$return .= ')';
+			}
+			else
+			{
+				$return = null;
+			}
+			return $return;
+		}
+
+		/*!
+		
+			@function get_restrictions_without_branch
+			@abstract Returns an array containing the restrictions ignoring the
+				branches
+			@author Raphael Derosso Pereira
+			
+			@param array $restrictions The restrictions
+		
+		*/
+		function get_restrictions_without_branch(&$restrictions)
+		{
+			if (!is_array($restrictions))
+			{
+				return null;
+			}
+			
+			$fields = array();
+			
+			foreach ($restrictions as $restrict_data)
+			{
+				switch($restrict_data['type'])
+				{
+					case 'branch':
+						$fields = array_merge($fields, $this->get_restrictions_without_branch($restrict_data['sub_branch']));
+						break;
+						
+					case '=':
+					case '!=':	
+					case '<=':
+					case '<':
+					case '>':
+					case '>=':
+					case 'NULL':
+					case 'IN':
+					case 'LIKE':
+					case 'iLIKE':
+					case 'NOT NULL':
+					case 'NOT IN':
+					case 'NOT LIKE':
+					case 'NOT iLIKE':
+						array_push($fields, $restrict_data);
+						break;
+						
+					default:
+						exit('Error in '.__FILE__.' on '.__LINE__.'<br>The restriction type passed was: '.$restrict_data['type']);					
+				}
+			}
+			
+			return $fields;
+		}
+		
+		
+		/*********************************************************************\
+		 *                        Methods to Get Data                        *
+		\*********************************************************************/
+		
+	
+		/*!
+		
+		 @function get_single_entry
+		 @abstract Returns all information requested about one contact
+		 @author Raphael Derosso Pereira
+		     
+		 @param integer $id_contact The contact ID
+		 @param array $fields The array returned by get_fields with true
+		 	on the fields to be taken.
+		 	
+		*/
+		function get_single_entry ( $id_contact, $fields )
+		{
+			if (!is_array($fields)) 
+			{
+				if (is_object($GLOBALS['phpgw']->log)) 
+				{
+					$GLOBALS['phpgw']->log->message(array(
+						'text' => 'F-BadcontactcenterParam, wrong get_single_entry parameters type.',
+						'line' => __LINE__,
+						'file' => __FILE__));
+					
+					$GLOBALS['phpgw']->log->commit();
+				}
+				else 
+				{
+					exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>');
+				}
+			}
+			
+			$ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'],$this->src_info['acc'],$this->src_info['pw'],true);
+			
+			if (!$ldap)
+			{
+				return false;
+			}
+			
+			$resource = ldap_read($ldap, $id_contact, 'objectClass='.$this->src_info['obj']);
+			$n_entries = ldap_count_entries($ldap, $resource);
+			if ( $n_entries > 1 or $n_entries < 1)
+			{
+				return false;
+			}
+			
+			$first_entry = ldap_first_entry($ldap, $resource);
+			$contact = ldap_get_attributes($ldap,$first_entry);
+			if($contact['jpegPhoto']){	
+				$contact['jpegPhoto'] = ldap_get_values_len ($ldap, $first_entry, "jpegPhoto"); 
+			}
+
+//			print_r($contact);
+			
+		//	$contact_data = $this->fields;
+			
+			foreach($fields as $field => $trueness)
+			{
+				if (!$trueness)
+				{
+					//unset($contact_data[$field]);
+					continue;
+				}
+				
+				switch ($field)
+				{
+					case 'companies':
+						unset($l_fields);
+						$l_fields['company_name']  = $this->trans_table['contact.company.company_name'];
+						$l_fields['title']         = $this->trans_table['contact.business_info.title'];
+						$l_fields['department']    = $this->trans_table['contact.business_info.department'];
+						$l_fields['company_notes'] = $this->trans_table['contact.company.company_notes'];
+						
+						$contact_data['companies'] = array();
+						foreach($l_fields as $l_field => $l_value)
+						{
+							if (!( $contact[$l_value[0]][0]))
+							{
+								continue;
+							}
+							
+							$contact_data['companies']['company1'][$l_field] = utf8_decode($contact[$l_value[0]][0]);
+						}
+						
+						if (!(count($contact_data['companies'])))
+						{
+							unset($contact_data['companies']);
+						}
+						break;
+					
+					case 'relations':
+						unset($l_fields);
+						if (!$this->trans_table['contact.contact_related.names_ordered'])
+						{
+							unset($contact_data['relations']);
+						}
+						
+						$contact_data['relations'] = array();
+						if (!is_array($this->trans_table['contact.contact_related.names_ordered']))
+						{
+							if (!($trans = $this->trans_table[$this->trans_table['contact.contact_related.names_ordered']]))
+							{
+								continue;
+							}
+							
+							$i = 1;
+							foreach($trans as $l_type => $l_type_fields)
+							{
+								if (!($contact[$l_type_fields[0]][0]))
+								{
+									continue;
+								}
+								
+								$contact_data['relations']['relation'.$i]['type'] = $l_type;
+								$contact_data['relations']['relation'.$i]['names_ordered'] = utf8_decode($contact[$l_type_fields[0]][0]);
+								$i++;
+							}
+						}
+						
+						if (!(count($contact_data['relations'])))
+						{
+							unset($contact_data['relations']);
+						}
+						break;
+					
+					case 'addresses':
+						unset($l_fields);
+						$l_fields['address1'] = $this->trans_table['contact.address.address1'];
+				 		$l_fields['address2'] = $this->trans_table['contact.address.address2'];
+				 		$l_fields['complement'] = $this->trans_table['contact.address.complement'];
+				 		$l_fields['address_other'] = $this->trans_table['contact.address.address_other'];
+						$l_fields['postal_code'] = $this->trans_table['contact.address.postal_code'];
+				 		$l_fields['po_box'] = $this->trans_table['contact.address.po_box'];
+				 		$l_fields['id_city'] = $this->trans_table['contact.address.city.id_city'];
+						$l_fields['city_name'] = $this->trans_table['contact.address.city.city_name'];
+						$l_fields['city_timezone'] = $this->trans_table['contact.address.city.city_timezone'];
+						$l_fields['city_geo_location'] = $this->trans_table['contact.address.city.city_geo_location'];
+						$l_fields['id_state'] = $this->trans_table['contact.address.city.state.id_state'];
+						$l_fields['state_name'] = $this->trans_table['contact.address.city.state.state_name'];
+						$l_fields['state_symbol'] = $this->trans_table['contact.address.city.state.state_symbol'];
+						$l_fields['id_country'] = $this->trans_table['contact.address.city.country.id_country'];
+						$l_fields['country_name'] = $this->trans_table['contact.address.city.country.country_name'];
+				 		$l_fields['address_is_default'] = $this->trans_table['contact.address.address_is_default'];
+
+						$contact_data['addresses'] = array();
+						foreach($l_fields as $l_field => $l_value)
+						{
+							if (!is_array($l_value))
+							{
+								if (!($trans = $this->trans_table[$l_value]))
+								{
+									continue;
+								}
+								
+								$i = 1;
+								foreach($trans as $l_type => $l_type_fields)
+								{
+									if (!($contact[$l_type_fields[0]][0]))
+									{
+										continue;
+									}
+									
+									$contact_data['addresses']['address'.$i]['type'] = $l_type;
+									$contact_data['addresses']['address'.$i][$l_field] = utf8_decode($contact[$l_type_fields[0]][0]);
+									$i++;
+								}
+							}
+							else
+							{
+								$contact_data['addresses']['address1'][$l_field] = utf8_decode($contact[$l_value[0]][0]);
+							}
+						}
+						
+						if (!(count($contact_data['addresses'])))
+						{
+							unset($contact_data['addresses']);
+						}
+						break;
+					
+					case 'connections':
+	                    $preferences = ExecMethod('contactcenter.ui_preferences.get_preferences');
+	                    if (!is_array($preferences))
+	                    {
+							$preferences['personCardEmail'] = 1;
+							$preferences['personCardPhone'] = 2;
+						}
+						unset($l_fields);
+				 		$l_fields['connection_name'] = $this->trans_table['contact.connection.connection_name'];
+				 		$l_fields['connection_value'] = $this->trans_table['contact.connection.connection_value'];
+
+						$contact_data['connections'] = array();
+						foreach($l_fields as $l_field => $l_value)
+						{
+							if (!is_array($l_value))
+							{
+								if (!($trans = $this->trans_table[$l_value]))
+								{
+									continue;
+								}
+								
+								$i = 1;
+								foreach($trans as $l_type => $l_type_fields)
+								{
+									if (!($contact[$l_type_fields[0]][0]))
+									{
+										continue;
+									}
+									
+									switch ($l_type)
+									{
+										case 'email':
+										$contact_data['connections']['connection'.$i]['id_type'] = $preferences['personCardEmail'];
+										break;
+
+										default:
+										$contact_data['connections']['connection'.$i]['id_type'] = $preferences['personCardPhone'];
+									}
+									$contact_data['connections']['connection'.$i]['type'] = $l_type;
+									$contact_data['connections']['connection'.$i][$l_field] = utf8_decode($contact[$l_type_fields[0]][0]);
+									$i++;
+								}
+							}
+							else
+							{
+								$contact_data['connections']['connection1'][$l_field] = utf8_decode($contact[$l_value[0]][0]);
+							}
+						}
+						
+						if (!(count($contact_data['connections'])))
+						{
+							unset($contact_data['connections']);
+						}
+						break;
+					
+					case 'prefix':
+						unset($l_fields);
+						$l_fields = $this->trans_table['contact.prefixes.prefix'];
+						if (!$l_fields or !$contact[$l_fields[0]][0])
+						{
+							unset($contact_data['prefix']);
+							continue;
+						}
+						
+						$contact_data['prefix'] = utf8_decode($contact[$l_fields[0]][0]);
+						break;
+						
+					case 'suffix':
+						unset($l_fields);
+						$l_fields = $this->trans_table['contact.suffixes.suffix'];
+						if (!$l_fields or !$contact[$l_fields[0]][0])
+						{
+							unset($contact_data['suffix']);
+							continue;
+						}
+						
+						$contact_data['suffix'] = utf8_decode($contact[$l_fields[0]][0]);
+						break;
+						
+					case 'status':
+						unset($l_fields);
+						$l_fields = $this->trans_table['contact.status.status_name'];
+						if (!$l_fields or !$contact[$l_fields[0]][0])
+						{
+							unset($contact_data['status']);
+							continue;
+						}
+						
+						$contact_data['status'] = utf8_decode($contact[$l_fields[0]][0]);
+						break;
+						
+						case 'photo':
+						unset($l_fields);
+						$l_fields = $this->trans_table['contact.photo'];
+						if (!$l_fields or !$contact[$l_fields[0]][0])
+						{
+							unset($contact_data['photo']);
+							continue;
+						}
+						
+						$contact_data['photo'] = $contact[$l_fields[0]][0];
+						break;											
+
+					default:
+						unset($l_fields);
+						$l_fields = $this->trans_table['contact.'.$field];
+						if (!$l_fields or !$contact[$l_fields[0]][0])
+						{
+							unset($contact_data[$field]);
+							continue;
+						}
+						
+						if(count($contact[$l_fields[0]]) > 1)
+						{
+							$tmp = array();
+							foreach ($contact[$l_fields[0]] as $i => $j)
+							{
+								$tmp["$i"] = utf8_decode($j);
+							}
+							//$contact_data[$field] = $contact[$l_fields[0]];
+							$contact_data[$field] = $tmp;
+						}
+						else
+							$contact_data[$field] = utf8_decode($contact[$l_fields[0]][0]);
+
+						break;
+				}
+			}
+			
+			if (!is_array($contact_data))
+			{
+				return false;
+			}
+			
+			return $contact_data;
+		}
+		//SERPRO
+		/*!
+
+		 @function get_all_entries
+		 @abstract Returns all information requested about a bunch of contacts, usually a page
+		 @author Raphael Derosso Pereira
+		 @author Mário César Kolling
+
+		 @param string $filter Filter (returned by generate_filter).
+		 @param array $fields The array returned by get_fields with true
+		 	on the fields to be taken.
+
+		*/
+		function get_all_entries($filter, $fields)
+		{
+			if (!is_array($fields))
+			{
+				if (is_object($GLOBALS['phpgw']->log))
+				{
+					$GLOBALS['phpgw']->log->message(array(
+						'text' => 'F-BadcontactcenterParam, wrong get_single_entry parameters type.',
+						'line' => __LINE__,
+						'file' => __FILE__));
+
+					$GLOBALS['phpgw']->log->commit();
+				}
+				else
+				{
+					exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>');
+				}
+			}
+
+			$ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'],$this->src_info['acc'],$this->src_info['pw'],true);
+
+			if (!$ldap)
+			{
+				return false;
+			}
+
+			$resource = @ldap_search($ldap, $this->src_info['dn'], $filter);
+			$n_entries = @ldap_count_entries($ldap, $resource);
+
+			ldap_sort($ldap, $resource, 'cn');
+
+			if ( $n_entries < 1)
+			{
+				return false;
+			}
+
+			$contacts = array();
+
+			for ($entry = ldap_first_entry($ldap, $resource);
+				 $entry != false;
+				 $entry = ldap_next_entry($ldap, $entry))
+			{
+				$contact = ldap_get_attributes($ldap,$entry);
+				if($contact['jpegPhoto']){
+					$contact['jpegPhoto'] = ldap_get_values_len ($ldap, $entry, "jpegPhoto");
+				}
+
+				foreach($fields as $field => $trueness)
+				{
+					if (!$trueness)
+					{
+						//unset($contact_data[$field]);
+						continue;
+					}
+
+					switch ($field)
+					{
+						case 'companies':
+							unset($l_fields);
+							$l_fields['company_name']  = $this->trans_table['contact.company.company_name'];
+							$l_fields['title']         = $this->trans_table['contact.business_info.title'];
+							$l_fields['department']    = $this->trans_table['contact.business_info.department'];
+							$l_fields['company_notes'] = $this->trans_table['contact.company.company_notes'];
+
+							$contact_data['companies'] = array();
+							foreach($l_fields as $l_field => $l_value)
+							{
+								if (!( $contact[$l_value[0]][0]))
+								{
+									continue;
+								}
+
+								$contact_data['companies']['company1'][$l_field] = utf8_decode($contact[$l_value[0]][0]);
+							}
+
+							if (!(count($contact_data['companies'])))
+							{
+								unset($contact_data['companies']);
+							}
+							break;
+
+						case 'relations':
+							unset($l_fields);
+							if (!$this->trans_table['contact.contact_related.names_ordered'])
+							{
+								unset($contact_data['relations']);
+							}
+
+							$contact_data['relations'] = array();
+							if (!is_array($this->trans_table['contact.contact_related.names_ordered']))
+							{
+								if (!($trans = $this->trans_table[$this->trans_table['contact.contact_related.names_ordered']]))
+								{
+									continue;
+								}
+
+								$i = 1;
+								foreach($trans as $l_type => $l_type_fields)
+								{
+									if (!($contact[$l_type_fields[0]][0]))
+									{
+										continue;
+									}
+
+									$contact_data['relations']['relation'.$i]['type'] = $l_type;
+									$contact_data['relations']['relation'.$i]['names_ordered'] = utf8_decode($contact[$l_type_fields[0]][0]);
+									$i++;
+								}
+							}
+
+							if (!(count($contact_data['relations'])))
+							{
+								unset($contact_data['relations']);
+							}
+							break;
+
+						case 'addresses':
+							unset($l_fields);
+							$l_fields['address1'] = $this->trans_table['contact.address.address1'];
+					 		$l_fields['address2'] = $this->trans_table['contact.address.address2'];
+					 		$l_fields['complement'] = $this->trans_table['contact.address.complement'];
+					 		$l_fields['address_other'] = $this->trans_table['contact.address.address_other'];
+							$l_fields['postal_code'] = $this->trans_table['contact.address.postal_code'];
+					 		$l_fields['po_box'] = $this->trans_table['contact.address.po_box'];
+					 		$l_fields['id_city'] = $this->trans_table['contact.address.city.id_city'];
+							$l_fields['city_name'] = $this->trans_table['contact.address.city.city_name'];
+							$l_fields['city_timezone'] = $this->trans_table['contact.address.city.city_timezone'];
+							$l_fields['city_geo_location'] = $this->trans_table['contact.address.city.city_geo_location'];
+							$l_fields['id_state'] = $this->trans_table['contact.address.city.state.id_state'];
+							$l_fields['state_name'] = $this->trans_table['contact.address.city.state.state_name'];
+							$l_fields['state_symbol'] = $this->trans_table['contact.address.city.state.state_symbol'];
+							$l_fields['id_country'] = $this->trans_table['contact.address.city.country.id_country'];
+							$l_fields['country_name'] = $this->trans_table['contact.address.city.country.country_name'];
+					 		$l_fields['address_is_default'] = $this->trans_table['contact.address.address_is_default'];
+
+							$contact_data['addresses'] = array();
+							foreach($l_fields as $l_field => $l_value)
+							{
+								if (!is_array($l_value))
+								{
+									if (!($trans = $this->trans_table[$l_value]))
+									{
+										continue;
+									}
+
+									$i = 1;
+									foreach($trans as $l_type => $l_type_fields)
+									{
+										if (!($contact[$l_type_fields[0]][0]))
+										{
+											continue;
+										}
+
+										$contact_data['addresses']['address'.$i]['type'] = $l_type;
+										$contact_data['addresses']['address'.$i][$l_field] = utf8_decode($contact[$l_type_fields[0]][0]);
+										$i++;
+									}
+								}
+								else
+								{
+									$contact_data['addresses']['address1'][$l_field] = utf8_decode($contact[$l_value[0]][0]);
+								}
+							}
+
+							if (!(count($contact_data['addresses'])))
+							{
+								unset($contact_data['addresses']);
+							}
+							break;
+
+						case 'connections':
+		                    $preferences = ExecMethod('contactcenter.ui_preferences.get_preferences');
+		                    if (!is_array($preferences))
+		                    {
+								$preferences['personCardEmail'] = 1;
+								$preferences['personCardPhone'] = 2;
+							}
+							unset($l_fields);
+					 		$l_fields['connection_name'] = $this->trans_table['contact.connection.connection_name'];
+					 		$l_fields['connection_value'] = $this->trans_table['contact.connection.connection_value'];
+
+							$contact_data['connections'] = array();
+							foreach($l_fields as $l_field => $l_value)
+							{
+								if (!is_array($l_value))
+								{
+									if (!($trans = $this->trans_table[$l_value]))
+									{
+										continue;
+									}
+
+									$i = 1;
+									foreach($trans as $l_type => $l_type_fields)
+									{
+										if (!($contact[$l_type_fields[0]][0]))
+										{
+											continue;
+										}
+
+										switch ($l_type)
+										{
+											case 'email':
+											$contact_data['connections']['connection'.$i]['id_type'] = $preferences['personCardEmail'];
+											break;
+
+											default:
+											$contact_data['connections']['connection'.$i]['id_type'] = $preferences['personCardPhone'];
+										}
+										$contact_data['connections']['connection'.$i]['type'] = $l_type;
+										$contact_data['connections']['connection'.$i][$l_field] = utf8_decode($contact[$l_type_fields[0]][0]);
+										$i++;
+									}
+								}
+								else
+								{
+									$contact_data['connections']['connection1'][$l_field] = utf8_decode($contact[$l_value[0]][0]);
+								}
+							}
+
+							if (!(count($contact_data['connections'])))
+							{
+								unset($contact_data['connections']);
+							}
+							break;
+
+						case 'prefix':
+							unset($l_fields);
+							$l_fields = $this->trans_table['contact.prefixes.prefix'];
+							if (!$l_fields or !$contact[$l_fields[0]][0])
+							{
+								unset($contact_data['prefix']);
+								continue;
+							}
+
+							$contact_data['prefix'] = utf8_decode($contact[$l_fields[0]][0]);
+							break;
+
+						case 'suffix':
+							unset($l_fields);
+							$l_fields = $this->trans_table['contact.suffixes.suffix'];
+							if (!$l_fields or !$contact[$l_fields[0]][0])
+							{
+								unset($contact_data['suffix']);
+								continue;
+							}
+
+							$contact_data['suffix'] = utf8_decode($contact[$l_fields[0]][0]);
+							break;
+
+						case 'status':
+							unset($l_fields);
+							$l_fields = $this->trans_table['contact.status.status_name'];
+							if (!$l_fields or !$contact[$l_fields[0]][0])
+							{
+								unset($contact_data['status']);
+								continue;
+							}
+
+							$contact_data['status'] = utf8_decode($contact[$l_fields[0]][0]);
+							break;
+
+							case 'photo':
+							unset($l_fields);
+							$l_fields = $this->trans_table['contact.photo'];
+							if (!$l_fields or !$contact[$l_fields[0]][0])
+							{
+								unset($contact_data['photo']);
+								continue;
+							}
+
+							$contact_data['photo'] = $contact[$l_fields[0]][0];
+							break;
+
+						default:
+							unset($l_fields);
+							$l_fields = $this->trans_table['contact.'.$field];
+							if (!$l_fields or !$contact[$l_fields[0]][0])
+							{
+								unset($contact_data[$field]);
+								continue;
+							}
+
+							if(count($contact[$l_fields[0]]) > 1)
+							{
+								$tmp = array();
+								foreach ($contact[$l_fields[0]] as $i => $j)
+								{
+									$tmp["$i"] = utf8_decode($j);
+								}
+								//$contact_data[$field] = $contact[$l_fields[0]];
+								$contact_data[$field] = $tmp;
+							}
+							else
+								$contact_data[$field] = utf8_decode($contact[$l_fields[0]][0]);
+
+							break;
+
+					}
+				}
+
+				if (is_array($contact_data))
+				{
+					$contacts[ldap_get_dn($ldap, $entry)] = $contact_data;
+				}
+
+			}
+
+			return $contacts;
+		}
+		
+		function get_multiple_entries ( $id_contacts, $fields, $other_data = false )
+		{
+			if (!is_array($id_contacts) or !is_array($fields) or ($other_data != false and !is_array($other_data)))
+			{
+				if (is_object($GLOBALS['phpgw']->log)) 
+				{
+					$GLOBALS['phpgw']->log->message(array(
+						'text' => 'F-BadcontactcenterParam, wrong get_multiple_entry parameter type.',
+						'line' => __LINE__,
+						'file' => __FILE__));
+					
+					$GLOBALS['phpgw']->log->commit();
+				}
+				else {
+					exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>');
+				}
+			}
+			 
+			foreach ($id_contacts as $id)
+			{
+				$contacts[$id] = $this->get_single_entry($id,$fields);
+			}
+			
+			return $contacts;
+
+			// SERPRO
+						
+			/*$contacts = array();
+	
+			if ($other_data)
+			{
+				//TODO
+			}
+
+			$filter = $this->generate_filter($id_contacts);
+
+			//$teste = $this->get_all_entries($filter, $fields);
+
+			return $this->get_all_entries($filter, $fields);*/
+			
+		}
+
+        // CELEPAR
+		function generate_filter($id_contacts)
+		{
+			if (($size = count($id_contacts)))
+			{
+				$contacts[$id] = $this->get_single_entry($id,$fields);
+			}
+			
+			return $contacts;
+		}
+		
+		// SERPRO
+		/*
+		function generate_filter($id_contacts)
+		{
+			if (($size = count($id_contacts)))
+			{
+				$filter = '(&(objectClass='.$this->src_info['obj'] .  ')(|';
+				for ($i = 0; $i < $size; $i++)
+				{
+
+					// 
+					//  Não utiliza mais a função ldap_explode, usa a expressão regular a seguir para pegar o primeiro
+					//  componente da dn
+					// 
+					preg_match('/^(\w*=[^,]*),.*$/', $id_contacts[$i], $cn);
+
+    				//
+    				// Adicionados os str_replace para adicionar caracteres de escape em frente aos caracteres '(' e ')',
+    				// posteriormente poderá ser necessário substituir por uma expressão regular mais genérica.
+    				//
+
+					if ($cn[1])
+					{
+						//
+						// Esta operação resolve o problema causado pela conversão de caracteres acentuados realizada
+						// pela função ldap_explode_dn(). Talvez seja necessário utilizar esta tradução em outros lugares,
+						// neste caso é mais apropriado colocar dentro de uma função.
+						//
+						//foreach($cn as $key=>$value){
+	          			//	$cn[$key]=preg_replace("/\\\([0-9A-Fa-f]{2})/e", "''.chr(hexdec('\\1')).''", $value);
+	    				//}
+
+						$filter .= '(' . str_replace(')', '\)', str_replace('(','\(',$cn[1])) . ')';
+					}
+				}
+				$filter .= '))';
+			}
+
+			return $filter;
+
+		}
+		*/
+
+		function get_all_entries_ids ()
+		{
+			$search_fields = array('contact.id_contact', 'contact.names_ordered');
+			$search_rules  = array(
+				0 => array(
+					'field' => 'contact.names_ordered',
+					'type'  => 'LIKE',
+					'value' => '%'
+				)
+			);
+			$search_other  = array('order' => 'contact.names_ordered');
+
+			$result_i = $this->find($search_fields, $search_rules, $search_other);
+
+			if (is_array($result_i) and count($result_i))
+			{
+				$result = array();
+				foreach($result_i as $result_part)
+				{
+					$result[] = $result_part['id_contact'];
+				}
+
+				return $result;
+			}
+
+			return null;
+		}
+		
+		function get_relations ($id_contact,$extra=false)
+		{
+		}
+		
+		function get_addresses ( $id_contact,$extra=false )
+		{
+		}
+		
+		function get_connections ( $id_contact,$extra=false )
+		{
+		}
+		
+		function get_companies ( $id_contact, $extra=false )
+		{
+		}
+		
+		function get_all_prefixes (  )
+		{
+		}
+		
+		function get_all_suffixes (  )
+		{
+		}
+		
+		function get_all_status (  )
+		{
+		}
+		
+		function get_all_relations_types (  )
+		{
+		}
+		
+		function get_all_addresses_types (  )
+		{
+		}
+		
+		function get_all_connections_types (  )
+		{
+		}
+		
+		function get_vcard ( $id_contact )
+		{
+		}
+		
+		
+		
+		
+		function get_global_tree ( $root )
+		{
+		}
+	
+		function get_actual_brach (  )
+		{
+		}
+	
+		function set_actual_branch ( $branch )
+		{
+		}
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.bo_group.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.bo_group.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.bo_group.inc.php	(revision 2)
@@ -0,0 +1,63 @@
+<?php
+	
+	class bo_group
+	{
+			
+		var $so;
+		
+		function bo_group()
+		{	
+			$this->so = CreateObject('contactcenter.so_group');
+		}
+		
+		function get_groups()
+		{				
+			return $this->so -> select();			
+		}
+		
+		function get_group($id)
+		{	$result = $this-> so -> select($id);			
+			return $result[0]; 
+		}
+		
+		function commit($status, $data)
+		{
+			if($status == 'insert')
+				$result = $this-> so -> insert($data);
+				
+			else if($status == 'update')
+				$result = $this-> so -> update($data);
+				
+			else if($status == 'delete')
+				$result = $this-> so -> delete($data);				
+				
+			
+			return $result;
+		}
+		
+		function get_all_contacts(){
+		
+			$result = $this-> so -> selectAllContacts();
+			return $result;
+		}
+		
+		function verify_contact($email){
+		
+			$result = $this-> so -> verifyContact($email);
+			return $result;
+		}
+		
+		function get_contacts_by_group($id){
+		
+			$result = $this-> so -> selectContactsByGroup($id);
+			return $result;
+		}
+		
+		function getContactsByGroupAlias($alias){
+			$result = $this-> so -> selectContactsByGroupAlias($alias);
+			return $result;
+		}		
+		
+		
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_contact_connection_type.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_contact_connection_type.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_contact_connection_type.inc.php	(revision 2)
@@ -0,0 +1,70 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once( "class.so_type.inc.php" );
+	
+	class so_contact_connection_type extends so_type 
+	{
+	
+		function so_contact_connection_type ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_typeof_contact_connection' => array(
+					'name'  => 'id_typeof_contact_connection',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'contact_connection_type_name' => array(
+					'name'  => 'contact_connection_type_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+
+			$this->type_name = & $this->main_fields['contact_connection_type_name'];
+
+			$this->db_tables = array(
+				'phpgw_cc_typeof_ct_conns' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_typeof_contact_connection']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+
+			if ($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/hook_preferences.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/hook_preferences.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/hook_preferences.inc.php	(revision 2)
@@ -0,0 +1,26 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+{
+// Only Modify the $file and $title variables.....
+	$title = $appname;
+	$file = Array(
+		'Preferences'   => $GLOBALS['phpgw']->link('/index.php','menuaction=contactcenter.ui_preferences.index'),
+		//'Grant Access'  => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
+		//'Edit Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app='.$appname . '&cats_level=True&global_cats=True')
+	);
+//Do not modify below this line
+	display_section($appname,$title,$file);
+}
+?>
Index: /tags/contactcenter/1.20/inc/class.bo_alien_contact_manager.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.bo_alien_contact_manager.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.bo_alien_contact_manager.inc.php	(revision 2)
@@ -0,0 +1,27 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once( 'class.abo_catalog.inc.php' );
+	
+	class bo_alien_contact_manager extends abo_catalog {
+	
+		function alien_contact_manager ( $id_owner )
+		{
+		}
+	
+	}
+
+
+
+?>
Index: /tags/contactcenter/1.20/inc/class.so_company_address_type.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_company_address_type.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_company_address_type.inc.php	(revision 2)
@@ -0,0 +1,68 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once( "class.so_type.inc.php" );
+	
+	class so_company_address_type extends so_type {
+
+		function so_company_address_type ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_typeof_company_address' => array(
+					'name'  => 'id_typeof_company_address',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'company_address_type_name' => array(
+					'name'  => 'company_address_type_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+			
+			$this->type_name = & $this->main_fields['company_address_type_name'];
+
+			$this->db_tables = array(
+				'phpgw_cc_typeof_co_addrs' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_typeof_company_address']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+
+			if ($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+	}
+
+?>
Index: /tags/contactcenter/1.20/inc/class.so_relation_type.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_relation_type.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_relation_type.inc.php	(revision 2)
@@ -0,0 +1,53 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once( "class.so_type.inc.php" );
+	
+	class so_relation_type extends so_type 
+	{
+		var $is_subordinated;
+	
+		/*!
+			
+			@function is_subordinated
+			@abstract Returns true if this relation type is
+				subordinated
+			@author Raphael Derosso Pereira
+			
+		*/
+		function is_subordinated (  )
+		{
+			return $this->is_subordinated['value'];
+		}
+	
+		/*!
+			
+			@function set_subordinated
+			@abstract Sets the trueness of the subordinated property
+			@author Raphael Derosso Pereira
+			
+			@param boolean $subordinated
+			
+		*/
+		function set_subordinated ( $subordinated )
+		{
+			$this->is_subordinated['value'] = $subordinated;
+			$this->manage_fields($this->subordinated, 'changed');
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.bo_company_manager.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.bo_company_manager.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.bo_company_manager.inc.php	(revision 2)
@@ -0,0 +1,961 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	include_once('class.abo_catalog.inc.php');
+
+	class bo_company_manager extends abo_catalog
+	{
+		
+		var $fields = array(
+			'id_company'    => true,
+			'company_name'  => true,
+			'company_notes' => true,
+			
+			/* Array fields */
+			'contacts'      => true,
+			'relations'     => true,
+			'addresses'     => true,
+			'connections'   => true,
+			'legals'        => true
+		);
+	
+		/*!
+		
+		 @function bo_contact_manager
+		 @abstract Constructor
+	 	 @author Raphael Derosso Pereira
+	 	 
+	 	*/
+		function bo_company_manager()
+		{
+		}		 	
+		
+		 
+		/*********************************************************************\
+		 *                Methods to Get Companies Info                      *
+		\*********************************************************************/
+
+		/*!
+		
+		 @function get_single_info
+		 @abstract Returns all information requested about one company
+		 @author Raphael Derosso Pereira    
+		 @param integer $id_company The company ID
+		 @param array $fields The array returned by get_fields whith true
+		 	on the fields to be taken.
+		*/
+		function get_single_info ( $id_company, $fields )
+		{	
+			if (!is_integer($id_company) or !is_array($fields)) 
+			{
+				if (is_object($GLOBALS['phpgw']->log)) 
+				{
+					$GLOBALS['phpgw']->log->message(array(
+						'text' => 'F-BadcontactcenterParam, wrong get_single_info parameters type.',
+						'line' => __LINE__,
+						'file' => __FILE__));
+					
+					$GLOBALS['phpgw']->log->commit();
+				}
+				else 
+				{
+					exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>');
+				}
+			}
+			
+			// Verify permitions
+			$permitions = $this->security->get_permissions($id_company);
+			
+			if (!$permitions['read'])
+			{
+				return false;
+			}
+			
+			$company_data = $this->fields;
+	
+			$company = CreateObject('contactcenter.so_company', $id_company);
+			
+			foreach ($fields as $field => $trueness)
+			{
+				if (!$trueness)
+				{
+					unset($company_data[$field]);
+					continue;
+				}
+					
+				switch ($field)
+				{
+					case 'contacts':
+						$company_data['contacts'] = $this->get_contacts($id_company);
+						break;
+					
+					case 'relations':
+						$company_data['relations'] = $this->get_relations($id_company);
+						break;
+					
+					case 'addresses':
+						$company_data['addresses'] = $this->get_addresses($id_company);
+						break;
+					
+					case 'connections':
+						$company_data['connections'] = $this->get_connections($id_company);
+						break;
+					
+					case 'legals':
+						$company_data['legals'] = $this->get_legals($id_company);
+						break;
+					
+					default:
+						$func_name = 'company->get_'.$field;
+						$company_data[$field] = $this->$func_name();
+						break;
+				}
+			}
+			
+			if (!is_array($company_data))
+			{
+				return false;
+			}
+			
+			return $company_data;
+		}
+	
+		/*!
+		 
+		 @function get_multiple_info
+		 @abstract Returns multiple companies data into one array
+		 @author Raphael Derosso Pereira
+
+		 @param array $id_companies The companies IDs
+		 @param array $fields The companies fields to be retrieved
+		 @param array $other_data Other informations. The format is:
+		 	$other_data = array(
+		 		'offset' => <offset>,
+		 		'limit'  => <max_num_returns>
+		 	); 
+		
+		*/
+		function get_multiple_info ( $id_companies, $fields, $other_data = false )
+		{
+			if (!is_array($id_companies) or !is_array($fields) or ($other_data != false and !is_array($other_data)))
+			{
+				if (is_object($GLOBALS['phpgw']->log)) 
+				{
+					$GLOBALS['phpgw']->log->message(array(
+						'text' => 'F-BadcontactcenterParam, wrong get_multiple_companies_info parameter type.',
+						'line' => __LINE__,
+						'file' => __FILE__));
+					
+					$GLOBALS['phpgw']->log->commit();
+				}
+				else {
+					exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>');
+				}
+			}
+			
+			$companies = array();
+	
+			if ($other_data)
+			{
+				//TODO
+			}
+	
+			foreach ($id_companies as $id)
+			{
+				$companies[$id] = $this->get_single_info($id,$fields[$id]);
+			}
+			
+			return $companies;
+		}
+	
+		/*!
+		
+			@function get_relations
+			@abstract Returns the IDs of all companies relations
+			@author Raphael Derosso Pereira
+		 
+			@param integer $id_company The company ID
+			
+			@return The following array:
+				 $return = array(
+				 	'relation1' => array(
+				 		'id_relation'     => <id_relation>,
+				 		'id_type'         => <id_type>,
+				 		'type'            => '<type_name>',
+				 		'is_subordinated' => <trueness>
+				 	),
+				 	'relation2' => array(...),
+				 	...
+				 );
+		 
+		*/
+		function get_relations ($id_company)
+		{
+			$company =& CreateObject('contactcenter.so_company', $id_company);
+			$relations = $company->get_relations();
+		
+			$count = 1;	
+			foreach($relations as $id => $type)
+			{
+				$relation =& CreateObject('contactcenter.so_company_relation_type',$type);
+				$return['relation'.$count]['id_relation'] = $id;
+				$return['relation'.$count]['id_type'] = $type;
+				$return['relation'.$count]['type'] = $relation->get_type_name(); 
+				$return['relation'.$count]['is_subordinated'] = $relation->get_is_subordinated();
+				$count++;
+			}
+			
+			return $return;
+		}
+	
+		/*!
+		
+			@function get_addresses
+			@abstract Returns all companies Address Information
+			@author Raphael Derosso Pereira
+		 
+			@param integer $id_company The company ID
+			
+			@return The following array:
+				 $return = array(
+				 	'address1' => array(
+				 		'id_address'         => <id_address>,
+				 		'id_type'            => <id_type>,
+				 		'type'               => '<type_name>',
+				 		'address1'           => '<address1>',
+				 		'address2'           => '<address2>',
+				 		'complement'         => '<complement>',
+				 		'address_other'      => '<address_other>',
+				 		'postal_code'        => '<postal_code>',
+				 		'po_box'		     => '<po_box>',
+				 		'id_city'            => '<city>',
+				 		'city_name'          => '<city_name>',
+				 		'city_timezone'      => '<city_timezone>',
+				 		'city_geo_location'  => '<city_geo_location>',
+				 		'id_state'           => '<id_state>',
+				 		'state_name'         => '<state_name>',
+				 		'state_symbol'       => '<state_symbol>',
+				 		'id_country'         => '<id_country>',
+				 		'country_name'       => '<country_name>',
+				 		'address_is_default' => <trueness>
+				 	),
+				 	'address2' => array(...),
+				 	...
+				 );
+		 
+		*/
+		function get_addresses ( $id_company )
+		{
+			$company =& CreateObject('contactcenter.so_company', $id_company);
+			$addresses = $company->get_addresses();
+		
+			$count = 1;	
+			foreach($addresses as $id => $type)
+			{
+				$address =& CreateObject('contactcenter.so_address',$id);
+				$address_type =& CreateObject('contactcenter.so_company_address_type',$type);
+				
+				$return['address'.$count]['id_address'] = $id;
+				$return['address'.$count]['id_type'] = $type;
+				$return['address'.$count]['type'] = $address_type->get_type_name();
+				$return['address'.$count]['address1'] = $address->get_address1();
+				$return['address'.$count]['address2'] = $address->get_address2();
+				$return['address'.$count]['complement'] = $address->get_complement();
+				$return['address'.$count]['address_other'] = $address->get_address_other();
+				$return['address'.$count]['postal_code'] = $address->get_postal_code();
+				$return['address'.$count]['po_box'] = $address->get_po_box();
+				$return['address'.$count]['address_is_default'] = $address->is_default();
+				$return['address'.$count]['id_city'] = $address->get_id_city();
+				$return['address'.$count]['city_name'] = $address->get_city_name();
+				$return['address'.$count]['city_timezone'] = $address->get_city_timezone();
+				$return['address'.$count]['city_geo_location'] = $address->get_geo_location();
+				$return['address'.$count]['id_state'] = $address->get_id_state();
+				$return['address'.$count]['state_name'] = $address->get_state_name();
+				$return['address'.$count]['state_symbol'] = $address->get_state_symbol();
+				$return['address'.$count]['id_country'] = $address->get_id_country();
+				$return['address'.$count]['country_name'] = $address->get_country_name();
+				$count++;
+			}
+			
+			return $return;
+		}
+	
+	
+		/*!
+		
+			@function get_connections
+			@abstract Returns all companies connections information
+			@author Raphael Derosso Pereira
+		 
+			@param integer $id_company The company ID
+			
+			@return The following array:
+				 $return = array(
+				 	'connection1' => array(
+				 		'id_connection'         => <id_connection>,
+				 		'id_type'               => <id_type>,
+				 		'type'                  => '<type_name>',
+				 		'connection_name'       => '<connection_name>',
+				 		'connection_value'      => '<connection_value>',
+				 		'connection_is_default' => '<connection_is_default>'
+				 	),
+				 	'connection2' => array(...),
+				 	...
+				 );
+		 
+		*/
+		function get_connections ( $id_company, $types )
+		{
+			$company =& CreateObject('contactcenter.so_company', $id_company);
+			$connections = $company->get_connections();
+		
+			$count = 1;	
+			foreach($connections as $id => $type)
+			{
+				$connection =& CreateObject('contactcenter.so_connection',$id);
+				$connection_type =& CreateObject('contactcenter.so_company_connection_type',$type);
+				$return['connection'.$count]['id_connection'] = $id;
+				$return['connection'.$count]['id_type'] = $type;
+				$return['connection'.$count]['type'] = $connection_type->get_type_name(); 
+				$return['connection'.$count]['connection_name'] = $connection->get_name();
+				$return['connection'.$count]['connection_value'] = $connection->get_value();
+				$return['connection'.$count]['connection_is_default'] = $connection->is_default();
+				$count++;
+			}
+			
+			return $return;
+		}
+	
+		/*!
+		
+			@function get_companies
+			@abstract Returns all Companies Employees information
+			@author Raphael Derosso Pereira
+		 
+			@param integer $id_company The company ID
+			
+			@return The following array:
+				 $return = array(
+				 	'contact1' => array(
+				 		'id_contact' => <id_company>,
+				 		'title'      => '<company_name>',
+				 		'department' => '<company_value>',
+				 	),
+				 	'contact2' => array(...),
+				 	...
+				 );
+		 
+		*/
+		function get_contacts ( $id_company )
+		{
+			$company =& CreateObject('contactcenter.so_company', $id_company);
+			$companies = $company->get_contacts();
+		
+			$count = 1;	
+			foreach($companies as $id => $value)
+			{
+				$return['contact'.$count]['id_contact'] = $id;
+				$return['contact'.$count]['title'] = $value['title'];
+				$return['contact'.$count]['department'] = $value['department'];
+				$count++;
+			}
+			
+			return $return;
+		}
+		
+		/*!
+		
+			@function get_legals
+			@abstract Returns all companies legals information
+			@author Raphael Derosso Pereira
+		 
+			@param integer $id_company The company ID
+			
+			@return The following array:
+				 $return = array(
+				 	'legal1' => array(
+				 		'id_legal'         => <id_legal>,
+				 		'id_type'          => <id_type>,
+				 		'type'             => '<type_name>',
+				 		'legal_info_name'  => '<legal_name>',
+				 		'legal_info_value' => '<legal_value>'
+				 	),
+				 	'legal2' => array(...),
+				 	...
+				 );
+		 
+		*/
+		function get_legals ( $id_company, $types )
+		{
+			$company =& CreateObject('contactcenter.so_company', $id_company);
+			$legals = $company->get_legals();
+		
+			$count = 1;	
+			foreach($legals as $id => $type)
+			{
+				$legal =& CreateObject('contactcenter.so_legal',$id);
+				$legal_type =& CreateObject('contactcenter.so_company_legal_type',$type);
+				$return['legal'.$count]['id_legal'] = $id;
+				$return['legal'.$count]['id_type'] = $type;
+				$return['legal'.$count]['type'] = $legal_type->get_type_name(); 
+				$return['legal'.$count]['legal_info_name'] = $legal->get_name();
+				$return['legal'.$count]['legal_info_value'] = $legal->get_value();
+				$return['legal'.$count]['legal_is_default'] = $legal->is_default();
+				$count++;
+			}
+			
+			return $return;
+		}
+	
+		
+		/*********************************************************************\
+		 *                Methods to get general fields                      *
+		\*********************************************************************/
+		
+
+		/*!
+		
+		 @function get_all_relations_types
+		 @abstract Returns all companies relations types
+		 @author Raphael Derosso Pereira
+		 
+		 @return array The format of the return is:
+		 	$return = array(
+		 		<id_type1> => '<type1_name>',
+		 		<id_type2> => '<type2_name>',
+		 		...);
+		*/
+		function get_all_relations_types (  )
+		{
+			$fields = array('id_typeof_company_relation', 'company_relation_name');
+			
+			$relation_types = $this->find($fields);
+			
+			if (!is_array($relation_types))
+			{
+				return false;
+			}
+			
+			while ($relation_type = each($relation_types))
+			{
+				$result[$relation_type['id_typeof_company_relation']] = $relation_type['company_relation_name'];				
+			}
+			
+			return $result;
+		}
+	
+		/*!
+		
+		 @function get_all_addresses_types
+		 @abstract Returns all companies addresses types
+		 @author Raphael Derosso Pereira
+		 
+		 @return array The format of the return is:
+		 	$return = array(
+		 		<id_type1> => '<type1_name>',
+		 		<id_type2> => '<type2_name>',
+		 		...);
+		*/
+		function get_all_addresses_types (  )
+		{
+			$fields = array('id_typeof_company_address', 'company_address_type_name');
+			
+			$address_types = $this->find($fields);
+			
+			if (!is_array($address_types))
+			{
+				return false;
+			}
+			
+			while ($address_type = each($address_types))
+			{
+				$result[$address_type['id_typeof_company_address']] = $address_type['company_address_name'];				
+			}
+			
+			return $result;
+		}
+
+		/*!
+		
+		 @function get_all_connections_types
+		 @abstract Returns all companies connections types
+		 @author Raphael Derosso Pereira
+		 
+		 @return array The format of the return is:
+		 	$return = array(
+		 		<id_type1> => '<type1_name>',
+		 		<id_type2> => '<type2_name>',
+		 		...);
+		*/
+		function get_all_connections_types (  )
+		{
+			$fields = array('id_typeof_company_relation', 'company_connections_type_name');
+			
+			$relation_types = $this->find($fields);
+			
+			if (!is_array($relation_types))
+			{
+				return false;
+			}
+			
+			while ($relation_type = each($relation_types))
+			{
+				$result[$relation_type['id_typeof_company_relation']] = $relation_type['company_connections_type_name'];				
+			}
+			
+			return $result;
+		}
+
+		/*!
+		
+		 @function get_all_legals_types
+		 @abstract Returns all companies legals types
+		 @author Raphael Derosso Pereira
+		 
+		 @return array The format of the return is:
+		 	$return = array(
+		 		<id_type1> => '<type1_name>',
+		 		<id_type2> => '<type2_name>',
+		 		...);
+		*/
+		function get_all_legals_types (  )
+		{
+			$fields = array('id_typeof_company_legal', 'legal_type_name');
+			
+			$relation_types = $this->find($fields);
+			
+			if (!is_array($relation_types))
+			{
+				return false;
+			}
+			
+			while ($relation_type = each($relation_types))
+			{
+				$result[$relation_type['id_typeof_company_legal']] = $relation_type['legal_type_name'];				
+			}
+			
+			return $result;
+		}
+
+
+		/*********************************************************************\
+		 *                   Methods to Include Data                         *
+		\*********************************************************************/
+
+		/*!
+		
+			@function add
+			@abstract Insert a new company record in the DB
+			@author Raphael Derosso Pereira
+		
+			@param array $data The company Information. 
+			
+			Format:
+		
+				$data = array(
+					'company_name'       => '<company_name>',
+					'company_notes'      => '<company_notes>',
+					
+					'contacts'          => array(
+						contact1 => array(
+							'id_contact' => <id_company>,
+							'title'      => <title>,
+							'department' => <department>
+						),
+						company2 => array(...),
+						...
+					),
+					
+					'relations'          => array(
+						'relation1' => array(
+							'id_relation'        => <id_relation>,
+							'id_typeof_relation' => <id_typeof_relation>,
+						),
+						'relation2' => array(...),
+						...
+					),
+			 		
+			 		'addresses'          => array(
+			 			'address1' => array(
+					 		'id_typeof_address'  => <id_typeof_address>,
+					 		'address1'           => '<address1>',
+					 		'address2'           => '<address2>',
+					 		'complement'         => '<complement>',
+					 		'address_other'      => '<address_other>',
+					 		'postal_code'        => '<postal_code>',
+					 		'po_box'		     => '<po_box>',
+					 		'id_city'            => '<city>',
+					 		'id_state'           => '<id_state>',
+					 		'id_country'         => '<id_country>',
+					 		'address_is_default' => <trueness>
+			 			),
+			 			'address2' => array(...),
+			 			...
+			 		),
+			 		
+			 		'connections'        => array(
+			 			'connection1' => array(
+				 			'id_typeof_connection'  => <id_typeof_connection>,
+				 			'connection_name'       => <connection_name>,
+				 			'connection_value'      => <connection_value>,
+				 			'connection_is_default' => <trueness>
+			 			),
+			 			'connection2' => array(...),
+			 			...
+			 		),
+			 		
+			 		'legals'             => array(
+			 			'legal1' => array(
+				 			'id_typeof_legal'       => <id_typeof_connection>,
+				 			'legal_info_name'       => <connection_name>,
+				 			'legal_info_value'      => <connection_value>
+			 			),
+			 			'legal2' => array(...),
+			 			...
+			 		)
+			 		
+				);
+			
+			If any of the above fields doesn't have a value, it should hold false.
+			In the case of the multiple-values fields, instead of the array, there 
+			should be a false.
+		*/	
+		function add ( $data )
+		{
+			$permissions = $this->security->get_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+			
+			$company =& CreateObject('contactcenter.so_company');
+			$company->reset_fields();
+			
+			foreach($data as $field => $value)
+			{
+				if ($value === false)
+				{
+					continue;
+				}
+				
+				switch($field)
+				{
+					case 'company_name':
+					case 'company_notes':
+						$func = 'set_'.$field;
+						$company->$func();
+						break;
+
+					case 'contacts':					
+						foreach($value as $contact_fields)
+						{
+							$company->set_contact($contact_fields['id_contact'], 
+								$company_fields['title'], $company_fields['department']);
+						}
+						break;
+					
+					case 'relations':
+						foreach($value as $relation_fields)
+						{
+							$company->set_relation($relation_fields['id_relation'], $relation_fields['id_typeof_relation']);
+						}
+						break;
+					
+					case 'addresses':
+						foreach($value as $address_fields)
+						{
+							$address =& CreateObject('contactcenter.so_address');
+							$address->reset_values();
+							foreach($address_fields as $a_field => $a_value)
+							{
+								if ($a_field !== 'id_typeof_address')
+								{
+									$func = 'set_'.$a_field;
+									$address->$func($a_value);
+								}
+							}
+							$address->commit();
+							$id_address = $address->get_id();
+							$company->set_address($id_address, $address_fields['id_typeof_address']);
+						}
+						break;
+					
+					case 'connections':
+						foreach($value as $connection_fields)
+						{
+							$connection =& CreateObject('contactcenter.so_connection');
+							$connection->reset_values();
+							foreach($connection_fields as $a_field => $a_value)
+							{
+								if ($a_field !== 'id_typeof_connection')
+								{
+									$func = 'set_'.$a_field;
+									$connection->$func($a_value);
+								}
+							}
+							$connection->commit();
+							$id_connection = $connection->get_id();
+							$company->set_connection($id_connection, $connection_fields['id_typeof_connection']);
+						}
+			 			break;
+			 			
+					case 'legals':
+						foreach($value as $connection_fields)
+						{
+							$legal =& CreateObject('contactcenter.so_legal');
+							$legal->reset_values();
+							foreach($legal_fields as $a_field => $a_value)
+							{
+								if ($a_field !== 'id_typeof_legal')
+								{
+									$func = 'set_'.$a_field;
+									$legal->$func($a_value);
+								}
+							}
+							$legal->commit();
+							$id_legal = $legal->get_id();
+							$company->set_legal($id_legal, $legal_fields['id_typeof_legal']);
+						}
+			 			break;
+			 			
+			 		default:
+			 			return false;
+			 			break;
+				}
+			}
+		}
+		
+	
+		/*!
+		
+			@function add_relation_type
+			@abstract Insert a new Relation Type in the DB
+			@author Raphael Derosso Pereira
+		
+			@param string $type_name The Relation Type
+			@return integer The new ID
+			
+		*/ 
+		function add_relation_type ( $type_name )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function add_address_type
+			@abstract Insert a new Address Type in the DB
+			@author Raphael Derosso Pereira
+		
+			@param string $type_name The Address Type
+			@return integer The new ID
+			
+		*/ 
+		function add_address_type ( $type_name )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function add_connection_type
+			@abstract Insert a new Connection Type in the DB
+			@author Raphael Derosso Pereira
+		
+			@param string $type_name The Connection Type
+			@return integer The new ID
+			
+		*/ 
+		function add_connection_type ( $type_name )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function add_legal_type
+			@abstract Insert a new legal Type in the DB
+			@author Raphael Derosso Pereira
+		
+			@param string $type_name The legal Type
+			@return integer The new ID
+			
+		*/ 
+		function add_legal_type ( $type_name )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+		}
+
+
+		/*********************************************************************\
+		 *                   Methods to Alter Data                           *
+		\*********************************************************************/
+
+		/*!
+		
+			@function update_company_info
+			@abstract Update information of an existing company
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_status The company ID
+			@param string $status The new Status value
+			
+		*/ 
+		function update_single_info ( $id_company, $data )
+		{
+			$permissions = $this->security->get_permissions($id_company);
+			
+			if (!$permissions['alter'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function update_prefix
+			@abstract Update an existing Prefix
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_prefix The Prefix ID
+			@param string $prefix The new Prefix value
+			
+		*/ 
+		function update_prefix ( $id_prefix, $prefix )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['alter'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function update_suffix
+			@abstract Update an existing Sulfix
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_suffix The Sulfix ID
+			@param string $suffix The new Sulfix value
+			
+		*/ 
+		function update_suffix ( $id_suffix, $suffix )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['alter'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function update_status
+			@abstract Update an existing Status
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_status The Status ID
+			@param string $status The new Status value
+			
+		*/ 
+		function update_status ( $id_status, $status )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['alter'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function update_relation_type
+			@abstract Update an existing Relation Type
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_type The Type ID
+			@param string $type The new type value
+			
+		*/ 
+		function update_relation_type ( $old_name, $relation_name )
+		{
+		}
+	
+		/*!
+		
+			@function update_address_type
+			@abstract Update an existing Address Type
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_type The Type ID
+			@param string $type The new type value
+			
+		*/ 
+		function update_address_type ( $id_type, $type )
+		{
+		}
+	
+		/*!
+		
+			@function update_connection_type
+			@abstract Update an existing Connection Type
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_type The Type ID
+			@param string $type The new type value
+			
+		*/ 
+		function update_connection_type ( $id_type, $type )
+		{
+		}
+
+		/*!
+		
+			@function update_legal_type
+			@abstract Update an existing legal Type
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_type The Type ID
+			@param string $type The new type value
+			
+		*/ 
+		function update_legal_type ( $id_type, $type )
+		{
+		}
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_state.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_state.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_state.inc.php	(revision 2)
@@ -0,0 +1,173 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once("class.so_main.inc.php");
+
+	class so_state extends so_main 
+	{
+
+		function so_state ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_state' => array(
+					'name'  => 'id_state',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'id_country' => array(
+					'name'  => 'id_country',
+					'type'  => 'foreign',
+					'association' => array(
+						'table' => 'phpgw_common_country_list',
+						'field' => 'id_country'
+					),
+					'state' => 'empty',
+					'value' => false
+				),
+				'state_name' => array(
+					'name'  => 'state_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'state_symbol' => array(
+					'name'  => 'state_symbol',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+
+
+			$this->db_tables = array(
+				'phpgw_cc_state' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_state']),
+						'foreign' => array(&$this->main_fields['id_country'])
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+			
+			if($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+		
+
+		/*********************************************************************\
+		 *                   Methods to Get Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function get_id_country
+			@abstract Returns the ID of the Country where this
+				State is located
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_id_country (  )
+		{
+			return $this->main_fields['id_country']['value'];
+		}
+	
+		/*!
+		
+			@function get_state_name
+			@abstract Returns the Name of the State
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_state_name (  )
+		{
+			return $this->main_fields['state_name']['value'];
+		}
+
+		/*!
+		
+			@function get_state_symbol
+			@abstract Returns the State Symbol
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_state_symbol (  )
+		{
+			return $this->main_fields['state_symbol']['value'];
+		}
+
+
+		/*********************************************************************\
+		 *                   Methods to Alter Information                    *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function set_id_country
+			@abstract Sets the State's Country ID
+			@author Raphael Derosso Pereira
+		
+			@param string $id_country The Country ID
+		*/
+		function set_id_country ( $id_country )
+		{
+			$this->main_fields['id_country']['value'] = $id_country;
+			$this->manage_fields($this->main_fields['id_country'], 'changed');
+		}
+		
+		/*!
+		
+			@function set_state_name
+			@abstract Sets the State's Name
+			@author Raphael Derosso Pereira
+		
+			@param string $name The State Name
+		*/
+		function set_state_name ( $name )
+		{
+			$this->main_fields['state_name']['value'] = $name;
+			$this->manage_fields($this->main_fields['state_name'], 'changed');
+		}
+		
+		/*!
+		
+			@function set_state_symbol
+			@abstract Sets the State's Symbol
+			@author Raphael Derosso Pereira
+		
+			@param string $symbol The State Symbol
+		*/
+		function set_state_symbol ( $symbol )
+		{
+			$this->main_fields['state_symbol']['value'] = $symbol;
+			$this->manage_fields($this->main_fields['state_symbol'], 'changed');
+		}
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_type.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_type.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_type.inc.php	(revision 2)
@@ -0,0 +1,45 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once("class.so_main.inc.php");
+	
+	class so_type extends so_main 
+	{
+		var $type_name;
+		
+		/*!
+		
+			@function get_type_name
+			@abstract Returns the Type Name
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_type_name (  )
+		{
+			return $this->type_name['value'];
+		}
+	
+		/*!
+		*/
+		function set_type_name ( $type )
+		{
+			$this->type_name['value'] = $name;
+			$this->manage_fields($this->type_name, 'changed');
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_status.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_status.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_status.inc.php	(revision 2)
@@ -0,0 +1,105 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once("class.so_main.inc.php");
+	
+	class so_status extends so_main 
+	{
+	
+		function so_status ( $id = false )
+		{
+			$this->init();
+				
+			$this->main_fields = array(
+				'id_status' => array(
+					'name'  => 'id_status',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'status_name' => array(
+					'name'  => 'status_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+			);
+
+			$this->db_tables = array(
+				'phpgw_cc_status' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_status']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+
+			if ($id)
+			{
+				$this->id = $id;
+				if (!$this->checkout($id))
+				{
+					$this->state = 'new';
+				}
+			}			
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+	
+
+		/*********************************************************************\
+		 *                   Methods to Get Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function get_status
+			@abstract Returns Status name
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_status (  )
+		{			
+			return $this->main_fields['status_name']['value'];
+		}
+	
+
+
+		/*********************************************************************\
+		 *                   Methods to Set Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function set_status
+			@abstract Sets the Status name
+			@author Raphael Derosso Pereira
+		
+			@param string $status The Status
+		*/
+		function set_status ( $status )
+		{
+			$this->main_fields['status_name']['value'] = $status;
+			$this->manage_fields($this->main_fields['status_name'],'changed');
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.abo_catalog.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.abo_catalog.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.abo_catalog.inc.php	(revision 2)
@@ -0,0 +1,1112 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	class abo_catalog
+	{
+		var $db;
+		
+		var $security;
+		
+		/*!
+			@attr array Tables
+			@abstract The main descriptor between high-level field indication
+				and low-level table relations
+			@author Raphael Derosso Pereira (conception and code)
+			@author Vinicius Cubas Brand (conception)
+		*/
+
+		var $tables = array(
+			'status' => array(
+				'table' => 'phpgw_cc_status'
+			),
+			
+			'prefix' => array(
+				'table' => 'phpgw_cc_prefixes'
+			),
+			
+			'suffix' => array(
+				'table' => 'phpgw_cc_suffixes'
+			),
+			
+			'contact' => array(
+				'table'  => 'phpgw_cc_contact',
+				
+				'status' => 'id_status,id_status',
+				'prefix' => 'id_prefix,id_prefix',
+				'suffix' => 'id_suffix,id_suffix',
+				
+				'contact_related' => 'id_contact,id_contact',
+				'related'         => array('shortcut' => 'contact_related'),
+				
+				'contact_connection' => 'id_contact,id_contact',
+				'connection'         => array('path' => 'contact_connection'),
+
+				'contact_address' => 'id_contact,id_contact',
+				'address'         => array('path' => 'contact_address'),
+				
+				'business_info'   => 'id_contact,id_contact',
+				'company'         => array('path' => 'business_info') 
+			),
+			
+			'business_info' => array(
+				'table'   => 'phpgw_cc_contact_company',
+				'company' => 'id_company,id_company'
+			),
+			
+			'group' => array('phpgw_cc_groups',
+				'table'              => 'phpgw_cc_groups',
+			),
+			
+			'company' => array(
+				'table'              => 'phpgw_cc_company',
+				
+				'company_related'    => 'id_company.id_company',
+				'related'            => array('shortcut' => 'company_related'),
+				
+				'company_address'    => 'id_company,id_company',
+				'address'            => array('path' => 'company_address'),
+				
+				'company_connection' => 'id_company,id_company',
+				'connection'         => array('path' => 'company_connection'),
+				
+				'business_info'      => 'id_company,id_company',
+				'contact'            => array('path' => 'business_info'),
+				
+				'legal'              => 'id_company,id_company',
+			),
+			
+			'company_related' => array(
+				'table'                   => 'phpgw_cc_company_rels',
+				'company'                 => 'id_related,id_company',
+
+				'company_related'         => 'id_related,id_company',
+				'related'                 => array('shortcut' => 'company_related'),
+
+				'typeof_company_relation' => 'id_typeof_company_relation,id_typeof_company_relation',
+				'typeof_relation'         => array('shortcut' => 'typeof_company_relation'),
+				'type'                    => array('shortcut' => 'typeof_company_relation')
+			),
+			'contact_related' => array(
+				'table'                   => 'phpgw_cc_contact_rels',
+				'contact'                 => 'id_related,id_contact',
+				
+				'contact_related'         => 'id_contact,id_related',
+				'related'                 => array('shortcut' => 'contact_related'),
+				
+				'typeof_contact_relation' => 'id_typeof_contact_relation,id_typeof_contact_relation',
+				'typeof_relation'         => array('shortcut' => 'typeof_contact_relation'),
+				'type'                    => array('shortcut' => 'typeof_contact_relation')
+			),
+			
+			'company_address' => array(
+				'table'          => 'phpgw_cc_company_addrs',
+				'address'        => 'id_address,id_address',
+				'typeof_address' => array('shortcut' => 'typeof_company_address'),
+				'type'           => array('shortcut' => 'typeof_company_address')
+			),
+			'contact_address' => array(
+				'table'          => 'phpgw_cc_contact_addrs',
+				'address'        => 'id_address,id_address',
+				'typeof_address' => array('shortcut' => 'typeof_contact_address'),
+				'type'           => array('shortcut' => 'typeof_contact_address')
+			),
+			'address' => array(
+				'table' => 'phpgw_cc_addresses',
+				'city'  => 'id_city,id_city'
+			),
+			'city' => array(
+				'table'   => 'phpgw_cc_city',
+				'state'   => 'id_state,id_state',
+				'country' => 'id_country,id_country'
+			),
+			'state' => array(
+				'table'   => 'phpgw_cc_state',
+				'country' => 'id_country,id_country',
+			),
+			'country' => array(
+				'table' => 'phpgw_cc_country'
+			),
+			
+			'company_connection' => array(
+				'table'             => 'phpgw_cc_company_conns',
+				'connection'        => 'id_connection,id_connection',
+				'typeof_connection' => array('shortcut' => 'typeof_company_connection'),
+				'type'              => array('shortcut' => 'typeof_company_connection')
+			),
+			'contact_connection' => array(
+				'table'             => 'phpgw_cc_contact_conns',
+				'connection'        => 'id_connection,id_connection',
+				'typeof_connection' => array('shortcut' => 'typeof_contact_connection'),
+				'type'              => array('shortcut' => 'typeof_contact_connection')
+			),
+			'connection' => array(
+				'table'             => 'phpgw_cc_connections'
+			),
+
+			'legal' => array(
+				'table'                => 'phpgw_cc_company_legals',
+				'typeof_company_legal' => 'id_typeof_company_legal,id_typeof_company_legal',
+				'typeof_legal'         => array('shortcut' => 'typeof_company_legal'),
+				'type'                 => array('shortcut' => 'typeof_company_legal') 
+			),
+			
+						
+			'typeof_contact_relation' => array(
+				'table' => 'phpgw_cc_typeof_ct_rels'
+			),
+			'typeof_company_relation' => array(
+				'table' => 'phpgw_cc_typeof_co_rels'
+			),
+			'typeof_contact_address' => array(
+				'table' => 'phpgw_cc_typeof_ct_addrs'
+			),
+			'typeof_company_address' => array(
+				'table' => 'phpgw_cc_typeof_co_addrs'
+			),
+			'typeof_contact_connection' => array(
+				'table' => 'phpgw_cc_typeof_ct_conns'
+			),
+			'typeof_company_connection' => array(
+				'table' => 'phpgw_cc_typeof_co_conns'
+			),
+			'typeof_company_legal' => array(
+				'table' => 'phpgw_cc_typeof_co_legals'
+			)
+		);
+		
+		function init()
+		{
+			$this->db =& $GLOBALS['phpgw']->db;
+			$this->security =& CreateObject('contactcenter.security_manager');
+		}
+
+		/*!
+		
+			@function sql_find
+			@abstract Performs a search in the DB based on the parameters
+			@author Raphael Derosso Pereira (algorithm and code)
+			@author Vinicius Cubas Brand (algorithm)
+			
+			@param array $what The list of fields to be returned. The format is:
+				$what = array(
+					'contact.company.company_name',
+					'contact.names_ordered'
+				);
+			
+			@param array $rules The restrictions.
+			
+			The restrictions format is quite complicated, but is very complete.
+			As defined here, there is the possibility to do almost any type of
+			search (tell me if you can't do any). For example, imagine the
+			following search:
+					
+						and(a,or(d,e,and(f,g)))
+			
+			That is represented by the folloowing tree:
+				
+                                   and
+                                    |
+                  .--------------------.
+                  |                    |
+                a = 5                 or
+                                       |
+                          .---------.------------.
+                          |         |            |
+                       d != 10  e LIKE %a       and
+                                                 |
+                                             .-------.
+                                             |       |
+                                           f = 5   g < 10
+
+
+			The rules that should be passed to the find function for this tree
+			is:
+				
+	 			$rules = array(
+ 					0 => array(
+ 						'field' => 'A',
+ 						'type'  => '=',
+ 						'value' => 5
+ 					),
+ 					1 => array (
+	 					'type'	     => 'branch',
+	 					'value'	     => 'OR',
+	 					'sub_branch' => array(
+ 							0 => array(
+ 								'field' => 'D'
+ 								'type'  => '!=',
+ 								'value' => 10
+ 							),
+ 							1 => array(
+ 								'field' => 'E',
+ 								'type'  => 'LIKE',
+ 								'value' => '%a'
+ 							)
+ 							2 => array(
+ 								'type'       => 'branch',
+ 								'value'      => 'AND',
+ 								'sub_branch' => array(
+ 									0 => array(
+ 										'field' => 'F',
+ 										'type'  => '=',
+ 										'value' => 5
+ 									),
+ 									1 => array(
+ 										'field' => 'G'
+ 										'type'  => '<',
+ 										'value' => 10
+ 									)
+ 								)
+ 							)
+ 						)
+ 					)
+	 			);
+
+  
+			The restriction type can be: =, !=, <=, <, >, >=, NULL, IN, LIKE, 
+			NOT NULL, NOT IN, NOT LIKE
+			Value of branch can be AND, OR, NOT
+			
+			@param array $other Other parameter to the search 
+				$other = array(
+					'offset'          => (int),
+					'limit'           => (int),
+					'order'           => (string with field names separated by commas)
+					'sort'            => {ASC|DESC},
+					'fields_modifier' => (COUNT|MAX)
+				);
+
+			@return array $array[<field_name>][<row_number>]
+				
+		*/
+		function sql_find($what, $rules=false, $other=false)
+		{
+			if (!is_array($what))
+			{
+				exit('Error');
+			}
+			
+			$tables_def = $GLOBALS['phpgw']->db->get_table_definitions('contactcenter');
+			
+			$query_select = 'SELECT ';
+			$query_from = array();
+			$query_fields_joins = array();
+			$query_restric_joins = array();
+			$query_wheres = array();
+			$tables_as = array();
+			
+			$n_fields = count($what);
+			for($i = 0; $i < $n_fields; $i++)
+			{
+				$path = $this->get_tables_by_field($what[$i], $tables_def);
+				$n_tables = count($path);
+				
+				$fields[] = $path[$n_tables-1];
+				$fields_translate[$what[$i]] = $path[$n_tables-1]; 
+				
+				list($from_t,) = explode('.',$path[0]);
+				$query_from[] = $from_t;
+				
+				$last_non_unique = false; 
+				for($j = 0; $j < $n_tables-1; $j += 2)
+				{
+					list($left_t,$left_k) = explode('.',$path[$j+1]);
+					list($right_t,$right_k) = explode('.',$path[$j]);
+					
+					$query_join_t = 'LEFT JOIN '.$left_t.' AS t0'.$i.$j.' ON t0'.
+					                 $i.$j.'.'.$left_k.'=';
+
+					$query_join_reg = 'LEFT JOIN '.$left_t.' AS t[0-9]{2,} ON t[0-9]{2,}'.
+					                 '\.'.$left_k.'=';
+					
+					$t = $j-2;
+					if ($j == 0)
+					{
+						$query_join_t .= $path[$j];
+						$query_join_reg .= $path[$j];
+					}
+					else
+					{
+						$query_join_t .= 't0'.$i.$t.'.'.$right_k;
+						$query_join_reg .= 't[0-9]{2,}\.'.$right_k;
+					}
+					
+					$query_fields_joins[] = $query_join_t;
+					$tables_as[] = 't0'.$i.$j;
+					continue;
+					
+					/* TODO: The code below detects the double JOIN lines, but
+					 * the problem is that it doesn't do that correctly, because
+					 * it should consider the hole path, not just one entry.
+					 */
+					$unique = true;
+					if ($n_joins = count($query_fields_joins))
+					{
+						for($k = 0; $k < $n_joins; $k++)
+						{
+							if (ereg($query_join_reg,$query_fields_joins[$k]))
+							{	
+								$unique = false;
+								$last_non_unique = $k;	
+							}
+						}
+					}
+
+					if ($unique and $j != 0)
+					{
+						if ($j != 0)
+						{
+							if ($last_non_unique === false)
+							{
+								$query_join_t .= 't0'.$i.$t.'.'.$right_k;
+							}
+							else
+							{
+								$query_join_t .= $tables_as[$last_non_unique].'.'.$right_k;
+							}
+						}
+						$query_fields_joins[] = $query_join_t;
+						$tables_as[] = 't0'.$i.$j;
+	
+						$last_non_unique = false;
+					}
+				}
+			}
+			
+			$restric_fields = $this->get_fields_from_restrictions($rules);
+			$n_restrictions = count($restric_fields);
+			
+			for ($i = 0; $i < $n_restrictions; $i++)
+			{
+				$path = $this->get_tables_by_field($restric_fields[$i], $tables_def);
+				$n_tables = count($path);
+				
+				$last_non_unique = false; 
+				for($j = 0; $j < $n_tables-1; $j += 2)
+				{
+					list($left_t,$left_k) = explode('.',$path[$j+1]);
+					list($right_t,$right_k) = explode('.',$path[$j]);
+					
+					$query_join_t = 'LEFT JOIN '.$left_t.' AS t1'.$i.$j.' ON t1'.
+					                 $i.$j.'.'.$left_k.'=';
+
+					$query_join_reg = 'LEFT JOIN '.$left_t.' AS t[0-9]{2,} ON t[0-9]{2,}'.
+					                 '\.'.$left_k.'=';
+
+					$t = $j-2;
+					if ($j == 0)
+					{
+						$query_join_t .= $path[$j];
+						$query_join_reg .= $path[$j];
+					}
+					else
+					{
+						$query_join_t .= 't1'.$i.$t.'.'.$right_k;
+						$query_join_reg .= 't[0-9]{2,}\.'.$right_k;
+					}
+					
+					$query_restric_joins[] = $query_join_t;
+					$tables_as[] = 't1'.$i.$j;
+					continue;
+					
+					/* TODO: The code below detects the double JOIN lines, but
+					 * the problem is that it doesn't do that correctly, because
+					 * it should consider the hole path, not just one entry.
+					 */
+					$unique = true;
+					if ($n_joins = count($query_restric_joins))
+					{
+						for($k = 0; $k < $n_joins; $k++)
+						{
+							if (ereg($query_join_reg,$query_restric_joins[$k]))
+							{	
+								$unique = false;
+								$last_non_unique = $k;	
+							}
+						}
+					}
+
+					if ($unique)
+					{
+						if ($j != 0)
+						{
+							if ($last_non_unique === false)
+							{
+								$query_join_t .= 't1'.$i.$t.'.'.$right_k;
+							}
+							else
+							{
+								$query_join_t .= $tables_as[$last_non_unique].'.'.$right_k;
+							}
+						}
+						$query_restric_joins[] = $query_join_t;
+						$tables_as[] = 't1'.$i.$j;
+	
+						$last_non_unique = false;
+					}
+				}
+				
+				list($table,$field_r) = explode('.',$path[$n_tables-1]);
+				
+				if ($n_tables > 1)
+				{
+					$t = $j-2;
+					$tables_restric[$restric_fields[$i]] = array(
+						'table' => 't1'.$i.$t,
+						'field' => $field_r
+					);
+				}
+				else
+				{
+					$tables_restric[$restric_fields[$i]] = array(
+						'table' => $table,
+						'field' => $field_r
+					);
+				}
+				
+			}
+
+			if ($other)
+			{			
+				foreach($other as $name => $value)
+				{
+					switch($name)
+					{
+						case 'offset':
+							if(is_int($value))
+							{
+								$query_other[2] = 'OFFSET '.$value;
+							}
+							break;
+							 
+						case 'limit':
+							if(is_int($value))
+							{
+								$query_other[3] = 'LIMIT '.$value;
+							}
+							break;
+							
+						case 'order':
+							$order_fs = explode(',',$value);
+							foreach($order_fs as $order_f)
+							{
+								$query_other[0] = 'ORDER BY '.$fields_translate[$order_f];
+							}
+							break;
+							
+						case 'sort':
+							switch($value)
+							{
+								case 'ASC':
+								case 'DESC':
+									$query_other[1] = $value;
+							}
+							break;
+							
+						case 'fields_modifier':
+							switch($value)
+							{
+								case 'COUNT':
+								case 'MAX':
+									$query_fields_mod = $value;
+							}
+							break;
+											
+						default:
+							exit('Invalid \'other\' field passed to find in file '.__FILE__.' on line '.__LINE__);
+					}
+				}
+			}
+
+			$query_from = array_unique($query_from);
+			if ($query_fields_mod)
+			{
+				$query_select .= ' '.$query_fields_mod.'('.implode(',',$fields).') AS mod';
+			}
+			else
+			{
+				$query_select .= implode(',',$fields);
+			}
+			
+			@ksort($query_other);
+			
+			$query_from_f = ' FROM '.implode(',',$query_from);
+			
+			$query = $query_select . $query_from_f;
+			
+			if (count($query_fields_joins))
+			{
+				$query = ' '.implode("\n",$query_fields_joins);
+			}
+
+			if (count($query_restric_joins))
+			{
+				$query .= ' '.implode("\n",$query_restric_joins);
+			}
+
+			if ($rules)
+			{
+				$query .= ' WHERE '.$this->process_restrictions($rules,$tables_restric);
+			}
+
+			if (count($query_other))
+			{
+				if (!($query_other[1] and !$query_other[0]))
+				{
+					$query .= ' '.@implode(' ',$query_other);
+				}
+			}
+
+			//echo 'Query in Find: "'.$query.'"<br>';
+			if (!$this->db->query($query))
+			{
+				exit ('Query failed! File: '.__FILE__.' on line'.__LINE__);
+			}
+			 
+			$return = false;
+			while($this->db->next_record())
+			{
+				$return[] = $this->db->row(); 
+			}
+			 
+			return $return;
+		}
+		
+		/*!
+			
+			@function get_tables_by_field
+			@abstract Returns the table wich holds the specified field
+			@author Raphael Derosso Pereira
+			
+			@param string $field  The field to be found
+			@param array  $tables The array returned by get_db_tables
+		*/
+		function get_tables_by_field ($field, &$apptables)
+		{
+			
+			$field_parts = explode('.',$field);
+			$n_fields = count($field_parts);
+			
+			$return = array();
+			$previous = false;
+			for($i = 0; $i < $n_fields-1; $i++)
+			{
+				$actual = $field_parts[$i];
+				$next = $field_parts[$i+1];
+				
+				if (!isset($apptables[$this->tables[$actual]['table']]))
+				{
+					exit('Some unrecognized parameter in '.__FILE__.' on line '.__LINE__.'<br>'.
+					     'Couldn\'t find '.$this->tables[$actual]['table']);
+				}
+				
+				if (array_key_exists($next,$apptables[$this->tables[$actual]['table']]['fd']))
+				{
+					array_push($return, $this->tables[$actual]['table'].'.'.$next);
+					continue;
+				}
+
+				if (array_key_exists($next,$this->tables[$actual]))
+				{
+					if (is_array($this->tables[$actual][$next]))
+					{
+					    if (isset($this->tables[$actual][$next]['shortcut']))
+						{
+							$next = $this->tables[$actual][$next]['shortcut'];
+							$field_parts[$i+1] = $next;
+						}
+						else if (isset($this->tables[$actual][$next]['path']))
+						{
+							$path = $this->tables[$actual][$next]['path'];
+							$field_parts[$i+1] = $path;
+							$field_parts = array_merge(array_slice($field_parts,0,$i+2),$next,array_slice($field_parts,$i+2,count($field_parts)));
+							$next = $path;
+							$n_fields = count($field_parts);
+						}
+					}
+
+					list($key1, $key2) = explode(',',$this->tables[$actual][$next]);
+					array_push($return, $this->tables[$actual]['table'].'.'.$key1, $this->tables[$next]['table'].'.'.$key2);
+					continue;
+				}
+
+				exit('Invalid field in '.__FILE__.' on line '.__LINE__.'<br>Actual: '.$actual.'<br>Next: '.$next);
+			}
+			
+			return $return;
+		}
+
+		/*!
+		
+			@function get_fields_from_restrictions
+			@abstract Returns an array containing the fields inside the restrictions
+				ignoring the branches
+			@author Raphael Derosso Pereira
+			
+			@param array $restrictions The restrictions
+		
+		*/
+		function get_fields_from_restrictions(&$restrictions)
+		{
+			if (!is_array($restrictions))
+			{
+				return null;
+			}
+			
+			$fields = array();
+			
+			foreach ($restrictions as $restrict_data)
+			{
+				switch($restrict_data['type'])
+				{
+					case 'branch':
+						$fields = array_merge($fields, $this->get_fields_from_restrictions($restrict_data['sub_branch']));
+						break;
+						
+					case '=':
+					case '!=':	
+					case '<=':
+					case '<':
+					case '>':
+					case '>=':
+					case 'NULL':
+					case 'IN':
+					case 'LIKE':
+					case 'iLIKE':
+					case 'NOT NULL':
+					case 'NOT IN':
+					case 'NOT LIKE':
+					case 'NOT iLIKE':
+						array_push($fields, $restrict_data['field']);
+						break;
+						
+					default:
+						exit('Error in '.__FILE__.' on '.__LINE__.'<br>The restriction type passed was: '.$restrict_data['type']);					
+				}
+			}
+			
+			return $fields;
+		}
+		
+		/*!
+		
+			@function process_restrictions
+			@abstract Takes the restrictions array and returns an string
+				that corresponds to the array
+			@author Raphael Derosso Pereira
+			
+			@param array $restriction The restriction array
+			@param array $associative_tree The 
+			@param string $logic_type The type of the logic that should be
+				used to join the fields
+		
+		*/
+		function process_restrictions(&$restrictions, &$associative_tree, $join_type='AND' )
+		{
+			foreach($restrictions as $restrict_index => $restrict_data)
+			{
+				switch($restrict_data['type'])
+				{
+					case 'branch':
+						$return_t[] = ' ('.$this->process_restrictions($restrict_data['sub_branch'],$associative_tree,$restrict_data['value']).') ';
+						break;
+						
+					case 'iLIKE':
+						$return_t[] = 'UPPER( '.$associative_tree[$restrict_data['field']]['table'].'.'.
+						              $associative_tree[$restrict_data['field']]['field'].') LIKE UPPER(\''.$restrict_data['value'].'\')';
+						break;
+					
+					case 'NOT iLIKE':
+						$return_t[] = 'UPPER( '.$associative_tree[$restrict_data['field']]['table'].'.'.
+						              $associative_tree[$restrict_data['field']]['field'].') NOT LIKE UPPER(\''.$restrict_data['value'].'\')';
+						break;
+						
+					case '=':
+					case '!=':	
+					case '<=':
+					case '<':
+					case '>':
+					case '>=':
+					case 'NULL':
+					case 'LIKE':
+					case 'NOT NULL':
+					case 'NOT LIKE':
+						$return_t[] = $associative_tree[$restrict_data['field']]['table'].'.'.
+						              $associative_tree[$restrict_data['field']]['field'].' '.$restrict_data['type'].' \''.$restrict_data['value'].'\'';
+						break;
+					
+					case 'IN':
+					case 'NOT IN':
+						$return_t[] = $associative_tree[$restrict_data['field']]['table'].'.'.
+						              $associative_tree[$restrict_data['field']]['field'].' '.$restrict_data['type'].' '.$restrict_data['value'];
+						break;
+				}
+				
+			}
+			
+			if (count($return_t) > 1)
+			{
+				return(implode(' '.$join_type.' ',$return_t));
+			}
+			
+			return $return_t[0];
+		}
+
+
+		/*********************************************************************\
+		 *                     Data Management                               *
+		\*********************************************************************/
+
+		/*!
+		 @function get_fields
+		 @abstract Returns all the fields that a catalog can have
+		 	on an array
+		 @author Raphael Derosso Pereira
+		     
+		 @param bool $all Return filled with True or False?
+		 
+		*/
+		function get_fields($all=false)
+		{
+			if (!is_bool($all)) 
+			{
+				if (is_object($GLOBALS['phpgw']->log)) 
+				{
+					$GLOBALS['phpgw']->log->message(array(
+						'text' => 'F-BadcontactcenterParam, get_contact_fields parameter must be boolean.',
+						'line' => __LINE__,
+						'file' => __FILE__));
+					
+					$GLOBALS['phpgw']->log->commit();
+				}
+				else {
+					exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>');
+				}
+			}
+			
+			if ($all)
+			{
+				return $this->fields;
+			} 
+			else 
+			{
+				$fields_temp = $this->fields;
+				
+				foreach(array_keys($fields_temp) as $field)
+				{
+					$fields_temp[$field] = false;
+				}
+				
+				return $fields_temp;
+			}
+		}
+
+
+        /*********************************************************************\
+		 *                Methods to Access Shared Catalog Data              *
+		\*********************************************************************/
+
+
+		/*!
+
+			@function get_all_countries
+			@abstract Returns all the countries the API provides
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_all_countries()
+		{
+			$obj = CreateObject('phpgwapi.country');
+			$countries = $obj->country_array;
+			unset($countries['  ']);
+
+			foreach($countries as $code => $name)
+			{
+				$name = lang($name);
+				$countries[$code] = $name{0} . strtolower(substr($name, 1));
+			}
+
+			return $countries;
+		}
+
+		/*!
+
+			@function get_all_states
+			@abstract Returns all the states for the given country
+			@author Raphael Derosso Pereira
+
+			@param $id_country The ID of the Country that contains the requested States
+
+		*/
+		function get_all_states($id_country)
+		{
+			$id_states = $this->find(array('state.id_state', 'state.state_name'), 
+			                         array(
+									 	0 => array(
+										 	'field' => 'state.id_country',
+											'type'  => '=',
+											'value' => $id_country
+										)
+			                         ),
+									 array(
+									 	'order' => 'state.state_name',
+										'sort'  => 'ASC'
+									 ));
+
+			if (!is_array($id_states) || count($id_states) == 0)
+			{
+				return false;
+			}
+
+			$result = false;
+			foreach($id_states as $id_state)
+			{
+				$state =& CreateObject('contactcenter.so_state', $id_state['id_state']);
+				
+				$result[$id_state['id_state']]['id_state']   = $state->get_id();
+				$result[$id_state['id_state']]['id_country'] = $state->get_id_country();
+				$result[$id_state['id_state']]['name']       = $state->get_state_name();
+				$result[$id_state['id_state']]['symbol']     = $state->get_state_symbol();
+			}
+
+			return $result;
+		}
+
+		/*!
+
+			@function get_all_cities
+			@abstract Returns all the cities for the given state
+			@author Raphael Derosso Pereira
+
+			#param $id_country The ID of the Country that contains the requested Cities
+			@param $id_state   The ID of the State that contains the requested Cities
+
+		*/
+		function get_all_cities($id_country, $id_state=false)
+		{
+			if ($id_state)
+			{
+				$id_cities = $this->find(array('city.id_city', 'city.city_name'), 
+										 array(
+											0 => array(
+												'field' => 'city.id_state',
+												'type'  => '=',
+												'value' => $id_state
+											)
+										 ),
+										 array(
+											'order' => 'city.city_name',
+											'sort'  => 'ASC'
+										 ));
+			}
+			else
+			{
+				$id_cities = $this->find(array('city.id_city', 'city.city_name'), 
+										 array(
+											0 => array(
+												'field' => 'city.id_country',
+												'type'  => '=',
+												'value' => $id_country
+											)
+										 ),
+										 array(
+											'order' => 'city.city_name',
+											'sort'  => 'ASC'
+										 ));
+			}
+
+			if (!is_array($id_cities) || count($id_cities) == 0)
+			{
+				return false;
+			}
+
+			$result = false;
+			foreach($id_cities as $id_city)
+			{
+				$city =& CreateObject('contactcenter.so_city', $id_city['id_city']);
+				
+				$result[$id_city['id_city']]['id_city']      = $city->get_id();
+				$result[$id_city['id_city']]['id_country']   = $city->get_id_country();
+				$result[$id_city['id_city']]['id_state']     = $city->get_id_state();
+				$result[$id_city['id_city']]['name']         = $city->get_city_name();
+				$result[$id_city['id_city']]['timezone']     = $city->get_city_timezone();
+				$result[$id_city['id_city']]['geo_location'] = $city->get_city_geo_location();
+			}
+
+			return $result;
+		}
+
+
+		/*********************************************************************\
+		 *           Methods to Insert/Update Shared Catalog Data            *
+		\*********************************************************************/
+
+		/*!
+			@function add_city
+			@abstract Inserts a new City in the DB
+			@author Raphael Derosso Pereira
+
+			@params array $city_info The city information:
+				$city_info = array(
+					'id_state'  => (int),
+					'id_country' => (int),     MANDATORY
+					'city_name' => (str),      MANDATORY
+					'city_time_zone' => (int),
+					'city_geo_location' => (str),
+				);
+
+			@return int City ID
+
+		*/
+		function add_city($city_info)
+		{
+			if(!is_array($city_info) || !count($city_info) || !$city_info['city_name'] || !$city_info['id_country'])
+			{
+				exit(print_r(array(
+					'file' => __FILE__,
+					'line' => __LINE__,
+					'msg' => lang('Wrong parameters'),
+					'status' => 'fatal',
+				)));
+			}
+			
+			$permissions = $this->security->get_permissions();
+
+			if (!is_array($permissions['cities']) || array_search('c', $permissions['cities']) === false)
+			{
+				exit(print_r(array(
+					'file' => __FILE__,
+					'line' => __LINE__,
+					'msg' => lang('You does not have sufficient privileges. Aborted!'),
+					'status' => 'aborted'
+				)));
+			}
+
+			/* Search for cities with the same data */
+			$what = array('city.id_city');
+			$rules = array(
+				0 => array(
+					'field' => 'city.city_name',
+					'type'  => 'iLIKE',
+					'value' => $city_info['city_name']
+				),
+				1 => array(
+					'field' => 'city.id_country',
+					'type'  => 'iLIKE',
+					'value' => $city_info['id_country']
+				)
+			);
+
+			if (isset($city_info['id_state']))
+			{
+				array_push($rules, array(
+					'field' => 'city.id_state',
+					'type'  => '=',
+					'value' => $city_info['id_state']
+				));
+			}
+
+			$result = $this->find($what, $rules);
+
+			if (is_array($result) and count($result))
+			{
+				return $result[0]['id_city'];
+			}
+
+			$city =& CreateObject('contactcenter.so_city');
+
+			$city->set_id_country($city_info['id_country']);
+			$city->set_city_name($city_info['city_name']);
+			isset($city_info['id_state']) ? $city->set_id_state($city_info['id_state']) : null;
+			isset($city_info['city_timezone']) ? $city->set_city_timezone($city_info['city_timezone']) : null;
+			isset($city_info['city_geo_location']) ? $city->set_city_geo_location($city_info['city_geo_location']) : null;
+
+			$city->commit();
+			$id = $city->get_id();
+
+			return $id;
+		}
+
+
+		/*!
+			@function add_state
+			@abstract Inserts a new State in the DB
+			@author Raphael Derosso Pereira
+
+			@params array $state_info The state information:
+				$state_info = array(
+					'id_country' => (int),     MANDATORY
+					'state_name' => (str),      MANDATORY
+					'state_symbol' => (str),
+				);
+
+			@return int State ID
+
+		*/
+		function add_state($state_info)
+		{
+			if(!is_array($state_info) || !count($state_info) || !$state_info['state_name'] || !$state_info['id_country'])
+			{
+				exit(print_r(array(
+					'msg' => lang('Wrong parameters'),
+					'status' => 'fatal'
+				)));
+			}
+			
+			$permissions = $this->security->get_permissions();
+
+			if (!is_array($permissions['states']) || array_search('c', $permissions['states']) === false)
+			{
+				exit(print_r(array(
+					'msg' => lang('You does not have sufficient privileges. Aborted!'),
+					'status' => 'aborted'
+				)));
+			}
+
+			/* Search for states with the same data */
+			$what = array('state.id_state');
+			$rules = array(
+				0 => array(
+					'field' => 'state.state_name',
+					'type'  => 'iLIKE',
+					'value' => $state_info['state_name']
+				),
+				1 => array(
+					'field' => 'state.id_country',
+					'type'  => 'iLIKE',
+					'value' => $state_info['id_country']
+				)
+			);
+			
+			$result = $this->find($what, $rules);
+
+			if (is_array($result) and count($result))
+			{
+				return $result[0]['id_state'];
+			}
+
+			$state =& CreateObject('contactcenter.so_state');
+
+			$state->set_id_country($state_info['id_country']);
+			$state->set_state_name($state_info['state_name']);
+			isset($state_info['state_symbol']) ? $state->set_state_symbol($state_info['state_symbol']) : null;
+
+			$state->commit();
+			$id = $state->get_id();
+
+			return $id;
+		}
+
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.ThreadInstance.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.ThreadInstance.inc.php	(revision 284)
+++ /tags/contactcenter/1.20/inc/class.ThreadInstance.inc.php	(revision 284)
@@ -0,0 +1,55 @@
+<?php
+	/***********************************************************************************\
+	* eGroupWare - Contacts Center                                              		*
+	* http://www.egroupware.org                                                 		*
+	* Written by:                                                               		*
+	*  - Brian W. Bosh from	Multi-threading strategies in PHP at						*
+	* http://www.alternateinterior.com/2007/05/multi-threading-strategies-in-php.html	*
+	* Adapted by:																		*
+	*  - Mário César Kolling <mario.kolling@serpro.gov.br>								*
+	* ----------------------------------------------------------------------------------*
+	*  This program is free software; you can redistribute it and/or modify it  		*
+	*  under the terms of the GNU General Public License as published by the    		*
+	*  Free Software Foundation; either version 2 of the License, or (at your   		*
+	*  option) any later version.                                               		*
+	\***********************************************************************************/
+
+	set_time_limit (0);
+	require 'ThreadUtility.inc.php';
+
+	/*
+	 * A class that is extended by the new php process and deals with communication at the new php process side
+	 */
+
+	class ThreadInstance {
+		var $stdin;
+		var $stdout;
+
+		function setup() {
+			$this->stdin = fopen ("php://stdin", "r");
+			$this->stderr = fopen ("php://stderr", "w");
+			stream_set_blocking ($this->stdin, false);
+		}
+		function getCommand() {
+				return $this->getLine(true);
+		}
+		function response ($status, $data) {
+			response ($status, $data);
+		}
+		function getLine ($wait = false) {
+			if ($wait) {
+				$buffer = "";
+				while (!strlen($buffer)) {
+					$buffer .= fgets ($this->stdin, 1024);
+				}
+			} else {
+				$buffer = fgets ($this->stdin, 1024);
+			}
+			return trim($buffer);
+		}
+		function debug ($text) {
+			fwrite ($this->stderr, $text);
+		}
+	}
+
+?>
Index: /tags/contactcenter/1.20/inc/class.so_contact.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_contact.inc.php	(revision 285)
+++ /tags/contactcenter/1.20/inc/class.so_contact.inc.php	(revision 285)
@@ -0,0 +1,1006 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/**
+	 * This class handles the Contact DB Table
+	 *
+	 */
+
+	include_once("class.so_main.inc.php");
+
+	class so_contact extends so_main {
+		
+		function so_contact ( $id_contact = false)
+		{
+			$this->init();
+						
+			$this->main_fields = array(
+				'id_contact'	=> array(
+					'name'		=> 'id_contact',
+					'type'		=> 'primary',
+					'state'		=> 'empty',
+					'value'		=> &$this->id),
+				'id_owner'		=> array(
+					'name'		=> 'id_owner',		
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'id_status'		=> array(
+					'name'		=> 'id_status',
+					'type'		=> 'foreign',
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_status',
+						'field'			=> 'id_status'),
+					'state'		=> 'empty',
+					'value'		=> false),
+				'photo'			=> array(
+					'name'		=> 'photo',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'alias'			=> array(
+					'name'		=> 'alias',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'id_prefix'		=> array(
+					'name'			=> 'id_prefix',
+					'type'			=> 'foreign',
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_prefixes',
+						'field'			=> 'id_prefix'),
+					'state'		=> 'empty',
+					'value'		=> false),
+				'given_names'	=> array(
+					'name'		=> 'given_names',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'family_names'	=> array(
+					'name'		=> 'family_names',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'names_ordered'	=> array(
+					'name'		=> 'names_ordered',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'id_suffix'		=> array(
+					'name'			=> 'id_suffix',
+					'type'			=> 'foreign',
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_suffixes',
+						'field'			=> 'id_suffix'),
+					'state'		=> 'empty',
+					'value'		=> false),
+				'birthdate'		=> array(
+					'name'		=> 'birthdate',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'sex'			=> array(
+					'name'		=> 'sex',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'pgp_key'		=> array(
+					'name'		=> 'pgp_key',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'notes'			=> array(
+					'name'		=> 'notes',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'is_global'		=> array(
+					'name'		=> 'is_global',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'last_status'		=> array(
+					'name'		=> 'last_status',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false),
+				'last_update'		=> array(
+					'name'		=> 'last_update',
+					'type'		=> false,
+					'state'		=> 'empty',
+					'value'		=> false));
+					
+			$this->companies	= array(
+				'id_contact' => array(
+					'name'        => 'id_contact',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_contact',
+						'field'   => 'id_contact'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'id_company' => array(
+					'name'        => 'id_company',
+					'type'        => array('foreign', 'primary'),
+					'association' => array(
+						'table'   => 'phpgw_cc_company',
+						'field'   => 'id_company'
+					),
+					'states'      => array(),
+					'values'      => array()
+				),
+				'title'      => array(
+					'name'   => 'title',
+					'type'   => false,
+					'states' => array(),
+					'values' => array()
+				),
+				'department' => array(
+					'name'   => 'department',
+					'type'   => false,
+					'states' => array(),
+					'values' => array()
+				),
+				'default_contact' => array(
+					'name'   => 'default_contact',
+					'type'   => false,
+					'states' => array(),
+					'values' => array()
+				),
+				'default_company' => array(
+					'name'   => 'default_company',
+					'type'   => false,
+					'states' => array(),
+					'values' => array()
+				)
+			);
+						
+			$this->addresses	= array(
+				'id_contact'	=> array(
+					'name'			=> 'id_contact',
+					'type'			=> array('foreign', 'primary'),
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_contact',
+						'field'			=> 'id_contact'),
+					'states' 		=>	array(),
+					'values'		=> array()),
+				'id_address'	=> array(
+					'name'			=> 'id_address',
+					'type'			=> array('foreign', 'primary'),
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_addresses',
+						'field'			=> 'id_address'),
+					'states' 		=>	array(),
+					'values'		=> array()),
+				'id_typeof_contact_address'	=> array(
+					'name'			=> 'id_typeof_contact_address',
+					'type'			=> 'foreign',
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_typeof_ct_addrs',
+						'field'			=> 'id_typeof_contact_address'),
+					'states' 		=>	array(),
+					'values'		=> array()));
+				
+				
+			$this->connections	= array(
+				'id_contact'	=> array(
+					'name'			=> 'id_contact',
+					'type'			=> array('foreign', 'primary'),
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_contact',
+						'field'			=> 'id_contact'),
+					'states' 		=>	array(),
+					'values'		=> array()),
+				'id_connection'	=> array(
+					'name'			=> 'id_connection',
+					'type'			=> array('foreign', 'primary'),
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_connections',
+						'field'			=> 'id_connection'),
+					'states' 		=>	array(),
+					'values'		=> array()),
+				'id_typeof_contact_connection'	=> array(
+					'name'			=> 'id_typeof_contact_connection',
+					'type'			=> array('foreign', 'primary'),
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_typeof_ct_conns',
+						'field'			=> 'id_typeof_contact_connection'),
+					'states' 		=>	array(),
+					'values'		=> array()));
+			
+			$this->relations	= array(
+				'id_contact'	=> array(
+					'name'			=> 'id_contact',
+					'type'			=> array('foreign', 'primary'),
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_contact',
+						'field'			=> 'id_contact'
+					),
+					'states' 		=>	array(),
+					'values'	=> array()
+				),
+				'id_related'	=> array(
+					'name'			=> 'id_related',
+					'type'			=> array('foreign', 'primary'),
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_contact',
+						'field'			=> 'id_contact'
+					),
+					'states' 		=>	array(),
+					'values'	=> array()
+				),
+				'id_typeof_contact_relation'	=> array(
+					'name'			=> 'id_typeof_contact_relation',
+					'type'			=> array('foreign', 'primary'),
+					'association'	=> array(
+						'table'			=> 'phpgw_cc_typeof_ct_rels',
+						'field'			=> 'id_typeof_contact_relation'
+					),
+					'states' 		=>	array(),
+					'values'	=> array()
+				)
+			);
+				
+
+			$this->db_tables = array(
+				'phpgw_cc_contact'	=> array(
+					'type'		=> 'main',
+					'keys'		=> array(
+						'primary' => array(&$this->main_fields['id_contact']),
+						'foreign' => array(
+							&$this->main_fields['id_status'],
+							&$this->main_fields['id_prefix'],
+							&$this->main_fields['id_suffix'])),
+					'fields' 	=> & $this->main_fields),
+				'phpgw_cc_contact_company'	=> array(
+					'type'		=> 'multi',
+					'keys'		=> array(
+						'primary' => array(
+							&$this->companies['id_contact'],
+							&$this->companies['id_company']),
+						'foreign' => array(
+							&$this->companies['id_contact'],
+							&$this->companies['id_company'])),
+					'fields' 	=> & $this->companies),
+				'phpgw_cc_contact_rels'	=> array(
+					'type'		=> 'multi',
+					'keys'		=> array(
+						'primary' => array(
+							&$this->relations['id_contact'],
+							&$this->relations['id_related']),
+						'foreign' => array(
+							&$this->relations['id_contact'],
+							&$this->relations['id_related'])),
+					'fields' 	=> & $this->relations),
+				'phpgw_cc_contact_addrs'	=> array(
+					'type'		=> 'multi',
+					'keys'		=> array(
+						'primary' => array(
+							&$this->addresses['id_contact'],
+							&$this->addresses['id_address']),
+						'foreign' => array(
+							&$this->addresses['id_contact'],
+							&$this->addresses['id_address'],
+							&$this->addresses['id_typeof_contact_address'])),
+					'fields' 	=> & $this->addresses),
+				'phpgw_cc_contact_conns'	=> array(
+					'type'		=> 'multi',
+					'keys'		=> array(
+						'primary' => array(
+							&$this->connections['id_contact'],
+							&$this->connections['id_connection']),
+						'foreign' => array(
+							&$this->connections['id_contact'],
+							&$this->connections['id_connection'],
+							&$this->connections['id_typeof_contact_connection'])),
+					'fields' 	=> & $this->connections));
+					
+
+			if ($id_contact)
+			{
+				$this->id = $id_contact;
+				if (!$this->checkout($id_contact))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+						
+		}
+	
+		/*********************************************************************\
+		 *                   Methods to Obtain Data                          *
+		\*********************************************************************/
+	
+		/*!
+		
+			@function get_photo
+			@abstract Returns the Contact's photo binary string
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_photo (  )
+		{
+			return $this->main_fields['photo']['value'];
+		}
+	
+		/*!
+		
+			@function get_alias
+			@abstract Returns the Contact alias
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_alias (  )
+		{
+			return $this->main_fields['alias']['value'];
+		}
+	
+		/*!
+		
+			@function get_prefix
+			@abstract Returns the Contact prefix ID
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_prefix (  )
+		{
+			return $this->main_fields['id_prefix']['value'];
+		}
+	
+		/*!
+		
+			@function get_given_names
+			@abstract Returns the Contact's given names
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_given_names (  )
+		{
+			return $this->main_fields['given_names']['value'];
+		}
+	
+		/*!
+		
+			@function get_family_names
+			@abstract Returns the Contact's family names
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_family_names (  )
+		{
+			return $this->main_fields['family_names']['value'];
+		}
+	
+		/*!
+		
+			@function get_names_ordered
+			@abstract Returns the Contact's names ordered
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_names_ordered (  )
+		{
+			return $this->main_fields['names_ordered']['value'];
+		}
+	
+		/*!
+		
+			@function get_suffix
+			@abstract Returns the Contact's suffix
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_suffix (  )
+		{
+			return $this->main_fields['id_suffix']['value'];
+		}
+	
+		/*!
+		
+			@function get_birthdate
+			@abstract Returns the Contact's birthdata
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_birthdate (  )
+		{
+			return $this->main_fields['birthdate']['value'];
+		}
+	
+		/*!
+		
+			@function get_sex
+			@abstract Returns the Contact's sex
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_sex (  )
+		{
+			return $this->main_fields['sex']['value'];
+		}
+	
+		/*!
+		
+			@function get_pgp_key
+			@abstract Returns the Contact's PGP Key
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_pgp_key (  )
+		{
+			return $this->main_fields['pgp_key']['value'];
+		}
+	
+		/*!
+		
+			@function get_notes
+			@abstract Returns the Contact's notes
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_notes (  )
+		{
+			return $this->main_fields['notes']['value'];
+		}
+	
+		/*!
+		
+			@function get_status
+			@abstract Returns the Contact's status ID
+			@author Raphael Derosso Pereira
+
+		*/
+		function get_status (  )
+		{
+			return $this->main_fields['status']['value'];
+		}
+	
+		/*!
+		
+			@function get_relations
+			@abstract Returns the Contact's Relations
+			@author Raphael Derosso Pereira
+		
+			@return array Format:
+				$return = array(
+					'<id_related1>' => '<id_relation1_type>',
+					'<id_related2>' => '<id_relation2_type>',
+					...);
+		*/
+		function get_relations (  )
+		{
+			$return = array();
+			
+			reset($this->relations['id_related']['values']);
+			reset($this->relations['id_typeof_contact_relation']['values']);
+			while(list(,$id_related) = each($this->relations['id_related']['values']) and
+				list(,$id_relation_type) = each($this->relations['id_typeof_contact_relation']['values']))
+			{
+				$return[$id_related] = $id_relation_type;				
+			}
+			
+			return $return;
+		}
+	
+		/*!
+		
+			@function get_addresses
+			@abstract Returns the Contact's Addresses
+			@author Raphael Derosso Pereira
+		
+			@return array Format:
+				$return = array(
+					'<id_address1>' => '<id_address1_type>',
+					'<id_address2>' => '<id_address2_type>',
+					...);
+		*/
+		function get_addresses (  )
+		{
+			$return = array();
+			
+			reset($this->addresses['id_address']['values']);
+			reset($this->addresses['id_typeof_contact_address']['values']);
+			while(list(,$id_address) = each($this->addresses['id_address']['values']) and
+				list(,$id_address_type) = each($this->addresses['id_typeof_contact_address']['values']))
+			{
+				$return[$id_address] = $id_address_type;				
+			}
+			
+			return $return;
+		}
+	
+		/*!
+		
+			@function get_connections
+			@abstract Returns the Contact's Connections
+			@author Raphael Derosso Pereira
+		
+			@return array Format:
+				$return = array(
+					'<id_connection1>' => '<id_connection1_type>',
+					'<id_connection2>' => '<id_connection2_type>',
+					...);
+		*/
+		function get_connections (  )
+		{
+			$return = array();
+			
+			reset($this->connections['id_connection']['values']);
+			reset($this->connections['id_typeof_contact_connection']['values']);
+			while(list(,$id_connection) = each($this->connections['id_connection']['values']) and
+				list(,$id_connection_type) = each($this->connections['id_typeof_contact_connection']['values']))
+			{
+				$return[$id_connection] = $id_connection_type;				
+			}
+			
+			return $return;
+		}
+	
+		/*!
+		
+			@function get_companies
+			@abstract Returns the Contact's Companies IDs and
+				bussiness info
+			@author Raphael Derosso Pereira
+		
+			@return array Format:
+				$return = array(
+					'<id_company1>' => array(
+						'title'			=> '<title>',
+						'department'	=> '<department>'
+					),
+					'<id_company2>' => array(
+						'title'			=> '<title>',
+						'department'	=> '<department>'
+					),
+					...
+				);
+				
+		*/
+		function get_companies (  )
+		{
+			$return = array();
+			
+			reset($this->companies['id_company']['values']);
+			reset($this->companies['title']['values']);
+			reset($this->companies['department']['values']);
+			reset($this->companies['default_company']['values']);
+			reset($this->companies['default_contact']['values']);
+			while(list(,$id_company) = each($this->companies['id_company']['values']) and
+				list(,$title) = each($this->companies['title']['values']) and
+				list(,$department) = each($this->companies['department']['values']) and
+				list(,$default_company) = each($this->companies['default_company']['values']) and
+				list(,$default_contact) = each($this->companies['default_contact']['values']))
+			{
+				$return[$id_company] = array(
+					'title'           => $title,
+					'department'      => $department,
+					'default_company' => $default_company,
+					'default_contact' => $default_contact,
+				);
+			}
+			
+			return $return;
+		}
+	
+		/*********************************************************************\
+		 *                   Methods to Alter Data                           *
+		\*********************************************************************/
+
+	
+		/*!
+		
+			@function set_photo
+			@abstract Sets the Contact's Photo binary string
+			@author Raphael Derosso Pereira
+			@param string $photo The binary photo string 
+		
+		*/
+		function set_photo ( $photo )
+		{
+			$this->main_fields['photo']['value'] = $photo;
+			$this->manage_fields($this->main_fields['photo'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_alias
+			@abstract Sets the Contact's Alias
+			@author Raphael Derosso Pereira
+			@param string $alias The new Contact alias 
+		
+		*/
+		function set_alias ( $alias )
+		{
+			$this->main_fields['alias']['value'] = $alias;
+			$this->manage_fields($this->main_fields['alias'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_id_prefix
+			@abstract Sets the Contact's Prefix
+			@author Raphael Derosso Pereira
+			@param string $id_prefix The new Contact prefix ID 
+		
+		*/
+		function set_id_prefix ( $id_prefix )
+		{
+			$this->main_fields['prefix']['value'] = $id_prefix;
+			$this->manage_fields($this->main_fields['prefix'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_given_names
+			@abstract Sets the Contact's Given Names
+			@author Raphael Derosso Pereira
+			@param string $names The new Contact's Given Names 
+		
+		*/
+		function set_given_names ( $names )
+		{
+			$this->main_fields['given_names']['value'] = $names;
+			$this->manage_fields($this->main_fields['given_names'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_family_names
+			@abstract Sets the Contact's Family Names
+			@author Raphael Derosso Pereira
+			@param string $names The new Contact's Family Names 
+		
+		*/
+		function set_family_names ( $names )
+		{
+			$this->main_fields['family_names']['value'] = $names;
+			$this->manage_fields($this->main_fields['family_names'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_names_ordered
+			@abstract Sets the Contact's Names Ordered
+			@author Raphael Derosso Pereira
+			@param string $names The new Contact's Names Ordered 
+		
+		*/
+		function set_names_ordered ( $names )
+		{
+			$this->main_fields['names_ordered']['value'] = $names;
+			$this->manage_fields($this->main_fields['names_ordered'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_id_suffix
+			@abstract Sets the Contact's Sulfix
+			@author Raphael Derosso Pereira
+			@param string $id_suffix The new Contact's Sulfix 
+		
+		*/
+		function set_id_suffix ( $id_suffix )
+		{
+			$this->main_fields['suffix']['value'] = $names;
+			$this->manage_fields($this->main_fields['suffix'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_birthdate
+			@abstract Sets the Contact's Birthdate
+			@author Raphael Derosso Pereira
+			@param string $date The new Contact's Birthdate 
+		
+		*/
+		function set_birthdate ( $date )
+		{
+			$this->main_fields['birthdate']['value'] = $names;
+			$this->manage_fields($this->main_fields['birthdate'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_sex
+			@abstract Sets the Contact's Sex
+			@author Raphael Derosso Pereira
+			@param string $sex The new Contact's Sex 
+		
+		*/
+		function set_sex ( $sex )
+		{
+			$this->main_fields['birthdate']['value'] = $names;
+			$this->manage_fields($this->main_fields['birthdate'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_pgp_key
+			@abstract Sets the Contact's PGP Key
+			@author Raphael Derosso Pereira
+			@param string $pgp_key The new Contact's PGP Key 
+		
+		*/
+		function set_pgp_key ( $pgp_key )
+		{
+			$this->main_fields['birthdate']['value'] = $names;
+			$this->manage_fields($this->main_fields['birthdate'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_notes
+			@abstract Sets the Contact's Notes
+			@author Raphael Derosso Pereira
+			@param string $notes The new Contact's Notes 
+		
+		*/
+		function set_notes ( $notes )
+		{
+			$this->main_fields['birthdate']['value'] = $names;
+			$this->manage_fields($this->main_fields['birthdate'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_status
+			@abstract Change the Contact's set Status
+			@author Raphael Derosso Pereira
+			@param integer $id_status The new Contact's set Status 
+		
+		*/
+		function set_id_status ( $id_status )
+		{
+			$this->main_fields['id_status']['value'] = $names;
+			$this->manage_fields($this->main_fields['id_status'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_relation
+			@abstract Sets the Contact's Relation
+			@author Raphael Derosso Pereira
+			@param integer $id_related The new Contact's Relation type ID
+			@param integer $id_type The new Contact's Relation ID 
+		
+		*/
+		function set_relation ( $id_related, $id_type )
+		{
+			if (($pos = array_search($id_related, $this->relations['id_related']['values'])) !== false)
+			{
+				$this->relations['id_typeof_contact_relation']['values'][$pos] = $id_type;
+				$this->manage_fields($this->relations['id_typeof_contact_relation'], 'changed', $pos);
+				
+				return;
+			}
+			
+			array_push($this->relations['id_contact']['values'], & $this->id);
+			array_push($this->relations['id_related']['values'], $id_related);
+			array_push($this->relations['id_typeof_contact_relation']['values'], $id_type);
+			
+			$this->manage_fields($this->relations['id_typeof_contact_relation'], 'new', 'new');
+			$this->manage_fields($this->relations['id_related'], 'new', 'new');
+			$this->manage_fields($this->relations['id_contact'], 'new', 'new');
+		}
+	
+		/*!
+		
+			@function set_address
+			@abstract Sets the Contact's Address
+			@author Raphael Derosso Pereira
+			@param integer $id_address The new Contact's Address ID 
+			@param integer $id_type The new Contact's Address type ID
+		
+		*/
+		function set_address ( $id_address, $id_type )
+		{
+			if (($pos = array_search($id_address, $this->addresses['id_address']['values'])) !== false)
+			{
+				$this->addresses['id_typeof_contact_address']['values'][$pos] = $id_type;
+				$this->manage_fields($this->addresses['id_typeof_contact_address'], 'changed', $pos);
+				
+				return;
+			}
+			
+			array_push($this->addresses['id_contact']['values'], & $this->id);
+			array_push($this->addresses['id_address']['values'], $id_address);
+			array_push($this->addresses['id_typeof_contact_address']['values'], $id_type);
+			
+			$this->manage_fields($this->addresses['id_typeof_contact_address'], 'new', 'new');
+			$this->manage_fields($this->addresses['id_address'], 'new', 'new');
+			$this->manage_fields($this->addresses['id_contact'], 'new', 'new');
+		}
+	
+		/*!
+		
+			@function set_connection
+			@abstract Sets the Contact's Connection
+			@author Raphael Derosso Pereira
+			@param integer $id_connection The new Contact's Connection ID 
+			@param integer $id_type The new Contact's Connection type ID
+		
+		*/
+		function set_connection ( $id_connection, $id_type )
+		{
+			if (($pos = array_search($id_connection, $this->connections['id_connection']['values'])) !== false)
+			{
+				$this->connections['id_typeof_contact_connection']['values'][$pos] = $id_type;
+				$this->manage_fields($this->connections['id_typeof_contact_connection'], 'changed', $pos);
+				
+				return;
+			}
+			
+			array_push($this->connections['id_contact']['values'], & $this->id);
+			array_push($this->connections['id_connection']['values'], $id_connection);
+			array_push($this->connections['id_typeof_contact_connection']['values'], $id_type);
+			
+			$this->manage_fields($this->connections['id_typeof_contact_connection'], 'new', 'new');
+			$this->manage_fields($this->connections['id_connection'], 'new', 'new');
+			$this->manage_fields($this->connections['id_contact'], 'new', 'new');
+		}
+	
+		/*!
+		
+			@function set_company
+			@abstract Sets the Contact's Company and bussiness information
+			@author Raphael Derosso Pereira
+			@param array $company_info The new Contact's Company Information
+		
+		*/
+		function set_company ( $company_info )
+		{
+			if (is_array($company_info))
+			{
+				if (($pos = array_search($company_info['id_company'], $this->companies['id_company']['values'])) !== false)
+				{
+					$this->companies['title']['values'][$pos] = $company_info['title'];
+					$this->companies['department']['values'][$pos] = $company_info['department'];
+					$this->companies['default_company']['values'][$pos] = $company_info['default_company'];
+					$this->companies['default_contact']['values'][$pos] = $company_info['default_contact'];
+					
+					$this->manage_fields($this->companies['title'], 'changed', $pos);
+					$this->manage_fields($this->companies['department'], 'changed', $pos);
+					$this->manage_fields($this->companies['default_company'], 'changed', $pos);
+					$this->manage_fields($this->companies['default_contact'], 'changed', $pos);
+					
+					return true;
+				}
+				
+				array_push($this->companies['id_contact']['values'], & $this->id);
+				array_push($this->companies['id_company']['values'], $company_info['id_company']);
+				array_push($this->companies['title']['values'], $company_info['title']);
+				array_push($this->companies['department']['values'], $company_info['department']);
+				array_push($this->companies['default_company']['values'], $company_info['default_company']);
+				array_push($this->companies['default_contact']['values'], $company_info['default_contact']);
+				
+				$this->manage_fields($this->companies['id_company'], 'new', 'new');
+				$this->manage_fields($this->companies['id_contact'], 'new', 'new');
+				$this->manage_fields($this->companies['title'], 'new', 'new');
+				$this->manage_fields($this->companies['department'], 'new', 'new');
+				$this->manage_fields($this->companies['default_company'], 'new', 'new');
+				$this->manage_fields($this->companies['default_contact'], 'new', 'new');
+				
+				return true;
+			}
+			
+			return false;
+		}
+
+
+		/*********************************************************************\
+		 *                   Methods to Remove Data                          *
+		\*********************************************************************/
+
+
+		/*!
+		
+			@function remove_relation
+			@abstract Remove one Contact's Relation
+			@author Raphael Derosso Pereira
+			@param integer $id_related The ID of the relation to be removed 
+		
+		*/
+		function remove_relation ( $id_related )
+		{
+			if (($pos = array_search($id_related, $this->relations['id_related']['values'])) !== false)
+			{
+				$this->manage_fields($this->relations['id_contact'], 'deleted', $pos);
+				$this->manage_fields($this->relations['id_related'], 'deleted', $pos);
+				$this->manage_fields($this->relations['id_typeof_contact_relation'], 'deleted', $pos);
+				
+				return true;
+			}
+			
+			return false;
+		}
+	
+		/*!
+		
+			@function remove_address
+			@abstract Remove one Contact's Address
+			@author Raphael Derosso Pereira
+			@param integer $id_address The ID of the address to be removed 
+		
+		*/
+		function remove_address ( $id_address )
+		{
+			if (($pos = array_search($id_address, $this->addresses['id_address']['values'])) !== false)
+			{
+				$this->manage_fields($this->addresses['id_contact'], 'deleted', $pos);
+				$this->manage_fields($this->addresses['id_address'], 'deleted', $pos);
+				$this->manage_fields($this->addresses['id_typeof_contact_address'], 'deleted', $pos);
+				
+				return true;
+			}
+			
+			return false;
+		}
+	
+		/*!
+		
+			@function remove_connection
+			@abstract Remove one Contact's Connection
+			@author Raphael Derosso Pereira
+			@param integer $id_connection The ID of the connection to be removed 
+		
+		*/
+		function remove_connection ( $id_connection )
+		{
+			if (($pos = array_search($id_connection, $this->connections['id_connection']['values'])) !== false)
+			{
+				$this->manage_fields($this->connections['id_contact'], 'deleted', $pos);
+				$this->manage_fields($this->connections['id_connection'], 'deleted', $pos);
+				$this->manage_fields($this->connections['id_typeof_contact_connection'], 'deleted', $pos);
+				
+				return true;
+			}
+			
+			return false;
+		}
+	
+		/*!
+		
+			@function remove_company
+			@abstract Remove one Contact's Company
+			@author Raphael Derosso Pereira
+			@param integer $id_company The ID of the compay to be removed 
+		
+		*/
+		function remove_company ( $id_company )
+		{
+			if (($pos = array_search($id_company, $this->companies['id_company']['values'])) !== false)
+			{
+				$this->manage_fields($this->companies['id_contact'], 'deleted', $pos);
+				$this->manage_fields($this->companies['id_company'], 'deleted', $pos);
+				$this->manage_fields($this->companies['title'], 'deleted', $pos);
+				$this->manage_fields($this->companies['department'], 'deleted', $pos);
+				
+				return true;
+			}
+			
+			return false;
+		}
+		
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.bo_people_catalog.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.bo_people_catalog.inc.php	(revision 285)
+++ /tags/contactcenter/1.20/inc/class.bo_people_catalog.inc.php	(revision 285)
@@ -0,0 +1,1598 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	include_once('class.abo_catalog.inc.php');
+	class bo_people_catalog extends abo_catalog
+	{
+			
+		var $fields = array(
+			'id_contact'    => true,
+			'status'        => true,
+			'photo'         => true,
+			'alias'         => true,
+			'prefix'        => true,
+			'given_names'   => true,
+			'family_names'  => true,
+			'names_ordered' => true,
+			'suffix'        => true,
+			'birthdate'     => true,
+			'sex'           => true,
+			'pgp_key'       => true,
+			'notes'         => true,
+			
+			/* Array fields */
+			'companies'     => true,
+			'relations'     => true,
+			'addresses'     => true,
+			'connections'   => true
+		);
+	
+		/*!
+		
+		 @function bo_people_catalog
+		 @abstract Constructor
+	 	 @author Raphael Derosso Pereira
+	 	 
+	 	*/
+		function bo_people_catalog()
+		{
+			$this->init();
+		}
+
+		/*!
+			@function find
+			@abstract Find function for this catalog
+			@author Raphael Derosso Pereira
+
+		*/
+		function find($what, $rules=false, $other=false)
+		{
+			if (is_array($what) and count($what))
+			{
+				$found = false;
+				
+				foreach ($what as $value)
+				{
+					if (strpos($value, 'contact') === 0)
+					{
+						$found = true;
+					}
+				}
+				
+				if (!$found)
+				{
+					return $this->sql_find($what, $rules, $other);
+				}
+				
+				if ($rules and is_array($rules))
+				{
+					array_push($rules, array(
+						'field' => 'contact.id_owner',
+						'type'  => '=',
+						'value' => $GLOBALS['phpgw_info']['user']['account_id']
+					));
+				}
+				else
+				{
+					$rules = array(
+						0 => array(
+							'field' => 'contact.id_owner',
+							'type'  => '=',
+							'value' => $GLOBALS['phpgw_info']['user']['account_id']
+						)
+					);
+				}
+			}
+
+			return $this->sql_find($what, $rules, $other);
+		}
+		 	
+		/*!
+		
+		 @function get_single_entry
+		 @abstract Returns all information requested about one contact
+		 @author Raphael Derosso Pereira
+		     
+		 @param integer $id_contact The contact ID
+		 @param array $fields The array returned by get_fields whith true
+		 	on the fields to be taken.
+		 	
+		*/
+		function get_single_entry ( $id_contact, $fields )
+		{	
+			if (!is_array($fields)) 
+			{
+				if (is_object($GLOBALS['phpgw']->log)) 
+				{
+					$GLOBALS['phpgw']->log->message(array(
+						'text' => 'F-BadcontactcenterParam, wrong get_single_entry parameters type.',
+						'line' => __LINE__,
+						'file' => __FILE__));
+					
+					$GLOBALS['phpgw']->log->commit();
+				}
+				else 
+				{
+					exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>');
+				}
+			}
+			
+			// Verify permissions
+			$permissions = $this->security->get_permissions('entry', $id_contact);
+
+			if (!$permissions['read'])
+			{
+				return false;
+			}
+			
+			//$contact_data = $this->fields;
+	
+			$contact = CreateObject('contactcenter.so_contact', $id_contact);
+
+			foreach ($fields as $field => $trueness)
+			{
+				if (!$trueness)
+				{
+					//unset($contact_data[$field]);
+					continue;
+				}
+					
+				switch ($field)
+				{
+					case 'companies':
+						$companies = $this->get_companies($id_contact,$trueness);
+
+						if (is_array($companies) and count($companies))
+						{
+							$contact_data['companies'] = $companies;
+						}
+						break;
+					
+					case 'relations':
+						$relations = $this->get_relations($id_contact,$trueness);
+
+						if (is_array($relations) and count($relations))
+						{
+							$contact_data['relations'] = $relations;
+						}
+						break;
+					
+					case 'addresses':
+						$addresses = $this->get_addresses($id_contact,$trueness);
+
+						if (is_array($addresses) and count($addresses))
+						{
+							$contact_data['addresses'] = $addresses;
+						}
+						break;
+					
+					case 'connections':
+						$connections = $this->get_connections($id_contact,$trueness);
+
+						if (is_array($connections) and count($connections))
+						{
+							$contact_data['connections'] = $connections;
+						}
+						break;
+					
+					case 'prefix':
+						$id = $contact->get_prefix();
+						if ($id)
+						{
+							$prefix = CreateObject('contactcenter.so_prefix', $id);
+							$contact_data['id_prefix'] = $id;
+							$contact_data['prefix'] = $prefix->get_prefix();  
+						}
+						break;
+						
+					case 'suffix':
+						$id = $contact->get_suffix();
+						if ($id)
+						{
+							$suffix = CreateObject('contactcenter.so_suffix', $id);
+							$contact_data['id_suffix'] = $id;
+							$contact_data['suffix'] = $suffix->get_suffix();  
+						}
+						break;
+						
+					case 'status':
+						$id = $contact->get_status();
+						if ($id)
+						{
+							$status = CreateObject('contactcenter.so_status', $id);
+							$contact_data['id_status'] = $id;
+							$contact_data['status'] = $status->get_status();  
+						}
+						break;
+						
+					default:
+						//$func_name = 'contact->get_'.$field;
+						//$contact_data[$field] = $this->$func_name();
+						$contact_data[$field] = $contact->get_field($field);
+						break;
+				}
+			}
+			
+			if (!is_array($contact_data))
+			{
+				return false;
+			}
+			
+			return $contact_data;
+		}
+	
+		/*!
+		 
+		 @function get_multiple_entries
+		 @abstract Returns multiple Contacts data into one array
+		 @author Raphael Derosso Pereira
+
+		 @param array $id_contacts The Contacts IDs
+		 @param array $fields The Contacts fields to be retrieved
+		 @param array $other_data Other informations. The format is:
+		 	$other_data = array(
+		 		'offset'    => <offset>,
+		 		'limit'     => <max_num_returns>,
+		 		'sort'      => <sort>,
+		 		'order_by'  => <order by>
+		 	); 
+		
+		*/
+		function get_multiple_entries ( $id_contacts, $fields, $other_data = false )
+		{
+			if (!is_array($id_contacts) or !is_array($fields) or ($other_data != false and !is_array($other_data)))
+			{
+				if (is_object($GLOBALS['phpgw']->log)) 
+				{
+					$GLOBALS['phpgw']->log->message(array(
+						'text' => 'F-BadcontactcenterParam, wrong get_multiple_entry parameter type.',
+						'line' => __LINE__,
+						'file' => __FILE__));
+					
+					$GLOBALS['phpgw']->log->commit();
+				}
+				else {
+					exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>');
+				}
+			}
+			
+			$contacts = array();
+	
+			if ($other_data)
+			{
+				//TODO
+			}
+	
+			foreach ($id_contacts as $id)
+			{
+				$contact = $this->get_single_entry($id,$fields);
+				if ($contact)
+				{
+					$contacts[$id] = $contact;
+				}
+			}
+			
+			return $contacts;
+		}
+
+		/*!
+		
+			@function get_all_entries_ids
+			@abstract Returns the IDs of all the entries in this catalog
+			@author Raphael Derosso Pereira
+
+		*/
+		function get_all_entries_ids ()
+		{
+			$search_fields = array('contact.id_contact', 'contact.names_ordered');
+			$search_other  = array('order' => 'contact.names_ordered');
+
+			$result_i = $this->find($search_fields, null, $search_other);
+
+			if (is_array($result_i) and count($result_i))
+			{
+				$result = array();
+				foreach($result_i as $result_part)
+				{
+					$result[] = $result_part['id_contact'];
+				}
+
+				return $result;
+			}
+
+			return null;
+		}
+	
+		/*!
+		
+			@function get_relations
+			@abstract Returns the IDs of all Contacts relations
+			@author Raphael Derosso Pereira
+		 
+			@param integer $id_contact The Contact ID
+			
+			@return The following array:
+				 $return = array(
+				 	'relation1' => array(
+				 		'id_relation'     => <id_relation>,
+				 		'id_type'         => <id_type>,
+				 		'type'            => '<type_name>',
+				 		'is_subordinated' => <trueness>
+				 	),
+				 	'relation2' => array(...),
+				 	...
+				 );
+		 
+		*/
+		function get_relations ($id_contact,$extra=false)
+		{
+			$contact = CreateObject('contactcenter.so_contact', $id_contact);
+			$relations = $contact->get_relations();
+		
+			$count = 1;	
+			foreach($relations as $id => $type)
+			{
+				$relation = CreateObject('contactcenter.so_contact_relation_type', $type);
+				
+				if ($extra === 'subordinated' and $relation->get_is_subordinated())
+				{
+					$return['relation'.$count]['id_relation'] = $id;
+					$return['relation'.$count]['id_type'] = $type;
+					$return['relation'.$count]['type'] = $relation->get_type_name(); 
+					$return['relation'.$count]['is_subordinated'] = $relation->get_is_subordinated();
+					$count++;
+				}
+				else if ($extra !== 'subordinated')
+				{
+					$return['relation'.$count]['id_relation'] = $id;
+					$return['relation'.$count]['id_type'] = $type;
+					$return['relation'.$count]['type'] = $relation->get_type_name(); 
+					$return['relation'.$count]['is_subordinated'] = $relation->get_is_subordinated();
+					$count++;
+				}
+			}
+			
+			return $return;
+		}
+	
+		/*!
+		
+			@function get_addresses
+			@abstract Returns all Contacts Address Information
+			@author Raphael Derosso Pereira
+		 
+			@param integer $id_contact The Contact ID
+			
+			@return The following array:
+				 $return = array(
+				 	'address1' => array(
+				 		'id_address'         => <id_address>,
+				 		'id_type'            => <id_type>,
+				 		'type'               => '<type_name>',
+				 		'address1'           => '<address1>',
+				 		'address2'           => '<address2>',
+				 		'complement'         => '<complement>',
+				 		'address_other'      => '<address_other>',
+				 		'postal_code'        => '<postal_code>',
+				 		'po_box'		     => '<po_box>',
+				 		'id_city'            => '<city>',
+						'city_name'          => (string),
+						'city_timezone'      => (int),
+						'city_geo_location'  => (string),
+						'id_state'           => (int),
+						'state_name'         => (string),
+						'state_symbol'       => (string),
+						'id_country'         => (int),
+						'country_name'       => (string),
+				 		'address_is_default' => <trueness>
+				 	),
+				 	'address2' => array(...),
+				 	...
+				 );
+		 
+		*/
+		function get_addresses ( $id_contact,$extra=false )
+		{
+			$contact = CreateObject('contactcenter.so_contact', $id_contact);
+			$addresses = $contact->get_addresses(extra);
+		
+			foreach($addresses as $id => $type)
+			{
+				$address = CreateObject('contactcenter.so_address',$id);
+				$address_type = CreateObject('contactcenter.so_contact_address_type',$type);
+				
+				if ($extra === 'default' and $address->is_default())
+				{
+					$return['address'.$type]['id_address'] = $id;
+					$return['address'.$type]['id_typeof_address'] = $type;
+					$return['address'.$type]['type'] = $address_type->get_type_name();
+					$return['address'.$type]['address1'] = $address->get_address1();
+					$return['address'.$type]['address2'] = $address->get_address2();
+					$return['address'.$type]['complement'] = $address->get_complement();
+					$return['address'.$type]['address_other'] = $address->get_address_other();
+					$return['address'.$type]['postal_code'] = $address->get_postal_code();
+					$return['address'.$type]['po_box'] = $address->get_po_box();
+					$return['address'.$type]['address_is_default'] = true;
+					$return['address'.$type]['id_city'] = $id_city = $address->get_id_city();
+					$return['address'.$type]['id_state'] = $id_state = $address->get_id_state();
+					$return['address'.$type]['id_country'] = $id_country = $address->get_id_country();
+					
+					if ($id_city)
+					{
+						$city = CreateObject('contactcenter.so_city',$id_city);
+						$return['address'.$type]['city_name'] = $city->get_city_name();
+						$return['address'.$type]['city_timezone'] = $city->get_city_timezone();
+						$return['address'.$type]['city_geo_location'] = $city->get_city_geo_location();
+					}
+					
+					if ($id_state)
+					{
+						$state = CreateObject('contactcenter.so_state',$id_state);
+						$return['address'.$type]['state_name'] = $state->get_state_name();
+						$return['address'.$type]['state_symbol'] = $state->get_state_symbol();
+						$return['address'.$type]['id_country'] = $id_country = $state->get_id_country();
+					}
+
+					$country = CreateObject('contactcenter.so_country',$id_country);
+					$return['address'.$type]['country_name'] = $country->get_country_name();
+				}
+				else if ($extra !== 'default')
+				{	
+					$return['address'.$type]['id_address'] = $id;
+					$return['address'.$type]['id_typeof_address'] = $type;
+					$return['address'.$type]['type'] = $address_type->get_type_name();
+					$return['address'.$type]['address1'] = $address->get_address1();
+					$return['address'.$type]['address2'] = $address->get_address2();
+					$return['address'.$type]['complement'] = $address->get_complement();
+					$return['address'.$type]['address_other'] = $address->get_address_other();
+					$return['address'.$type]['postal_code'] = $address->get_postal_code();
+					$return['address'.$type]['po_box'] = $address->get_po_box();
+					$return['address'.$type]['address_is_default'] = $address->is_default();
+					$return['address'.$type]['id_city'] = $id_city = $address->get_id_city();
+					$return['address'.$type]['id_state'] = $id_state = $address->get_id_state();
+					$return['address'.$type]['id_country'] = $id_country = $address->get_id_country();
+					
+					if ($id_city)
+					{
+						$city = CreateObject('contactcenter.so_city',$id_city);
+						$return['address'.$type]['city_name'] = $city->get_city_name();
+						$return['address'.$type]['city_timezone'] = $city->get_city_timezone();
+						$return['address'.$type]['city_geo_location'] = $city->get_city_geo_location();
+					}
+					
+					if ($id_state)
+					{
+						$state = CreateObject('contactcenter.so_state',$id_state);
+						$return['address'.$type]['state_name'] = $state->get_state_name();
+						$return['address'.$type]['state_symbol'] = $state->get_state_symbol();
+						$return['address'.$type]['id_country'] = $id_country = $state->get_id_country();
+					}
+
+					$country = CreateObject('contactcenter.so_country',$id_country);
+					$return['address'.$type]['country_name'] = $country->get_country_name();
+				}
+			}
+			
+			return $return;
+		}
+	
+	
+		/*!
+		
+			@function get_connections
+			@abstract Returns all Contacts connections information
+			@author Raphael Derosso Pereira
+		 
+			@param integer $id_contact The Contact ID
+			
+			@return The following array:
+				 $return = array(
+				 	'connection1' => array(
+				 		'id_connection'         => <id_connection>,
+				 		'id_type'               => <id_type>,
+				 		'type'                  => '<type_name>',
+				 		'connection_name'       => '<connection_name>',
+				 		'connection_value'      => '<connection_value>',
+				 		'connection_is_default' => '<connection_is_default>'
+				 	),
+				 	'connection2' => array(...),
+				 	...
+				 );
+		 
+		*/
+		function get_connections ( $id_contact,$extra=false )
+		{
+			$contact = CreateObject('contactcenter.so_contact', $id_contact);
+			$connections = $contact->get_connections($extra);
+		
+			$count = 1;	
+			foreach($connections as $id => $type)
+			{
+				$connection = CreateObject('contactcenter.so_connection', $id);
+
+				if ($extra === 'default' and $connection->is_default())
+				{
+					$connection_type = CreateObject('contactcenter.so_contact_connection_type', $type);
+					$return['connection'.$count]['id_connection'] = $id;
+					$return['connection'.$count]['id_type'] = $type;
+					$return['connection'.$count]['type'] = $connection_type->get_type_name(); 
+					$return['connection'.$count]['connection_name'] = $connection->get_name();
+					$return['connection'.$count]['connection_value'] = $connection->get_value();
+					$return['connection'.$count]['connection_is_default'] = $connection->is_default();
+					$count++;
+				}
+				else if ($extra !== 'default')
+				{
+					$connection_type = CreateObject('contactcenter.so_contact_connection_type', $type);
+					$return['connection'.$count]['id_connection'] = $id;
+					$return['connection'.$count]['id_type'] = $type;
+					$return['connection'.$count]['type'] = $connection_type->get_type_name(); 
+					$return['connection'.$count]['connection_name'] = $connection->get_name();
+					$return['connection'.$count]['connection_value'] = $connection->get_value();
+					$return['connection'.$count]['connection_is_default'] = $connection->is_default();
+					$count++;
+				}
+			}
+			
+			return $return;
+		}
+	
+		/*!
+		
+			@function get_companies
+			@abstract Returns all Contacts companies information
+			@author Raphael Derosso Pereira
+		 
+			@param integer $id_contact The Contact ID
+			
+			@return The following array:
+				 $return = array(
+				 	'company1' => array(
+				 		'id_company'   => <id_company>,
+				 		'company_name' => '<company_name>'
+				 		'title'        => '<company_name>',
+				 		'department'   => '<company_value>',
+				 	),
+				 	'company2' => array(...),
+				 	...
+				 );
+		 
+		*/
+		function get_companies ( $id_contact,$extra=false )
+		{
+			$contact = CreateObject('contactcenter.so_contact', $id_contact);
+			$companies = $contact->get_companies($extra);
+		
+			$count = 1;	
+			foreach($companies as $id => $value)
+			{
+				$company = CreateObject('contactcenter.so_company', $id);
+
+				if ($extra === 'default' and $value['default_company'])
+				{
+					$return['company'.$count]['id_company'] = $id;
+					$return['company'.$count]['company_name'] = $company->get_company_name();
+					$return['company'.$count]['title'] = $value['title'];
+					$return['company'.$count]['department'] = $value['department'];
+					$return['company'.$count]['default_company'] = $value['default_company'];
+					$return['company'.$count]['default_contact'] = $value['default_contact'];
+					$count++;
+				}
+				else if ($extra !== 'default')
+				{
+					$return['company'.$count]['id_company'] = $id;
+					$return['company'.$count]['company_name'] = $company->get_company_name();
+					$return['company'.$count]['title'] = $value['title'];
+					$return['company'.$count]['department'] = $value['department'];
+					$return['company'.$count]['default_company'] = $value['default_company'];
+					$return['company'.$count]['default_contact'] = $value['default_contact'];
+					$count++;
+				}
+			}
+			
+			return $return;
+		}
+		
+		
+		/*********************************************************************\
+		 *                Methods to get general fields                      *
+		\*********************************************************************/
+		
+		/*!
+		
+		 @function get_all_prefixes
+		 @abstract Returns all the registered prefixes
+		 @author Raphael Derosso Pereira
+		 
+		*/
+		function get_all_prefixes (  )
+		{
+			$fields = array('prefix.id_prefix','prefix.prefix');
+			
+			$prefixes = $this->find($fields);
+			
+			if (!is_array($prefixes))
+			{
+				return false;
+			}
+			
+			while (list(,$prefix) = each($prefixes))
+			{
+				$result[$prefix['id_prefix']] = $prefix['prefix'];
+			}
+			
+			return $result;
+		}
+		
+	
+		/*!
+		
+		 @function get_all_suffixes
+		 @abstract Returns all the registered suffixes
+		 @author Raphael Derosso Pereira
+		 @return An array as follows:
+		 	$return = array(
+		 		<id_suffix1> => '<suffix_name1>',
+		 		<id_suffix2> => '<suffix_name2>',
+		 		...		 		
+		 	);
+		 
+		*/
+		function get_all_suffixes (  )
+		{
+			$fields = array('suffix.id_suffix','suffix.suffix');
+			
+			$suffixes = $this->find($fields);
+			
+			if (!is_array($suffixes))
+			{
+				return false;
+			}
+			
+			while (list(,$suffix) = each($suffixes))
+			{
+				$result[$suffix['id_suffix']] = $suffix['suffix']; 
+			}
+			
+			return $result;
+		}
+	
+		/*!
+		
+		 @function get_all_status
+		 @abstract Returns all the registered status
+		 @author Raphael Derosso Pereira
+		 @return An array as follows:
+		 	$return = array(
+		 		<id_status1> => '<status_name1>',
+		 		<id_status2> => '<status_name2>',
+		 		...		 		
+		 	);
+		 
+		*/
+		function get_all_status (  )
+		{
+			$fields = array('status.id_status','status.status_name');
+			
+			$status = $this->find($fields);
+			
+			if (!is_array($status))
+			{
+				return false;
+			}
+			
+			while (list(,$status_) = each($status))
+			{
+				$result[$status_['id_status']] = $status_['status_name'];
+			}
+			
+			return $result;
+		}
+
+		/*!
+		
+		 @function get_all_relations_types
+		 @abstract Returns all contacts relations types
+		 @author Raphael Derosso Pereira
+		 
+		 @return array The format of the return is:
+		 	$return = array(
+		 		<id_type1> => '<type1_name>',
+		 		<id_type2> => '<type2_name>',
+		 		...);
+		*/
+		function get_all_relations_types (  )
+		{
+			$fields = array('typeof_contact_relation.id_typeof_contact_relation', 'typeof_contact_relation.contact_relation_type_name');
+			
+			$relation_types = $this->find($fields);
+			
+			if (!is_array($relation_types))
+			{
+				return false;
+			}
+			
+			while (list(,$relation_type) = each($relation_types))
+			{
+				$result[$relation_type['id_typeof_contact_relation']] = $relation_type['contact_relation_type_name'];				
+			}
+			
+			return $result;
+		}
+	
+		/*!
+		
+		 @function get_all_addresses_types
+		 @abstract Returns all contacts addresses types
+		 @author Raphael Derosso Pereira
+		 
+		 @return array The format of the return is:
+		 	$return = array(
+		 		<id_type1> => '<type1_name>',
+		 		<id_type2> => '<type2_name>',
+		 		...);
+		*/
+		function get_all_addresses_types (  )
+		{
+			$fields = array('typeof_contact_address.id_typeof_contact_address', 'typeof_contact_address.contact_address_type_name');
+			
+			$address_types = $this->find($fields);
+			
+			if (!is_array($address_types))
+			{
+				return false;
+			}
+			
+			while (list(,$address_type) = each($address_types))
+			{
+				$result[$address_type['id_typeof_contact_address']] = $address_type['contact_address_type_name'];				
+			}
+			
+			return $result;
+		}
+
+		/*!
+		
+		 @function get_all_connections_types
+		 @abstract Returns all contacts connections types
+		 @author Raphael Derosso Pereira
+		 
+		 @return array The format of the return is:
+		 	$return = array(
+		 		<id_type1> => '<type1_name>',
+		 		<id_type2> => '<type2_name>',
+		 		...);
+		*/
+		function get_all_connections_types (  )
+		{
+			$fields = array('typeof_contact_connection.id_typeof_contact_connection', 'typeof_contact_connection.contact_connection_type_name');
+			
+			$connection_types = $this->find($fields);
+			
+			if (!is_array($connection_types))
+			{
+				return false;
+			}
+			
+			while (list(,$connection_type) = each($connection_types))
+			{
+				$result[$connection_type['id_typeof_contact_connection']] = $connection_type['contact_connection_type_name'];				
+			}
+			
+			return $result;
+		}
+
+		/*!
+		
+			@function get_vcard
+			@abstract Returns an URL that points to the file
+				that contains a vCard of the specified Contact
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_status The Contact ID
+			
+		*/ 
+		function get_vcard ( $id_contact )
+		{
+		}
+
+
+		/*********************************************************************\
+		 *                   Methods to Include Data                         *
+		\*********************************************************************/
+
+		/*!
+		
+			@function add_single_entry
+			@abstract Insert a new Contact record in the DB
+			@author Raphael Derosso Pereira
+		
+			@param array $data The Contact Information. 
+			
+			Format:
+		
+				$data = array(
+					'id_status'          => <id_status>,
+					'photo'              => '<photo_bin_stream>',
+					'alias'              => '<alias>',
+					'id_prefix'          => <id_prefix>,
+					'given_names'        => '<given_names>',
+					'family_names'       => '<family_names>',
+					'names_ordered'      => '<names_ordered>',
+					'id_suffix'          => <id_suffix>,
+					'birthdate'          => '<birthdate>',
+					'sex'                => '<sex>',
+					'pgp_key'            => '<pgp_key>',
+					'notes'              => '<notes>',
+					
+					'companies'          => array(
+						company1 => array(
+							'id_company'      => <id_company>,
+							'company_name'    => <company_name>,
+							'title'           => <title>,
+							'department'      => <department>,
+							'default_company' => (bool),
+							'default_contact' => (bool)
+						),
+						company2 => array(...),
+						...
+					),
+					
+					'relations'          => array(
+						'relation1' => array(
+							'id_relation'        => <id_relation>,
+							'id_typeof_relation' => <id_typeof_relation>,
+						),
+						'relation2' => array(...),
+						...
+					),
+			 		
+			 		'addresses'          => array(
+			 			'address1' => array(
+					 		'id_typeof_address'  => <id_typeof_address>,
+					 		'address1'           => '<address1>',
+					 		'address2'           => '<address2>',
+					 		'complement'         => '<complement>',
+					 		'address_other'      => '<address_other>',
+					 		'postal_code'        => '<postal_code>',
+					 		'po_box'		     => '<po_box>',
+					 		'id_city'            => '<city>',
+					 		'address_is_default' => <trueness>
+			 			),
+			 			'address2' => array(...),
+			 			...
+			 		),
+			 		
+			 		'connections'        => array(
+			 			'connection1' => array(
+				 			'id_typeof_connection'  => <id_typeof_connection>,
+				 			'connection_name'       => <connection_name>,
+				 			'connection_value'      => <connection_value>,
+				 			'connection_is_default' => <trueness>
+			 			),
+			 			'connection2' => array(...),
+			 			...
+			 		),
+			 		
+				);
+			
+			If any of the above fields doesn't have a value, it should hold false.
+			In the case of the multiple-values fields, instead of the array, there 
+			should be a false.
+
+			@return integer $id The Contact ID
+		*/	
+		function add_single_entry ( $data )
+		{
+			$permissions = $this->security->get_permissions();
+			
+			if (!$permissions['create'])
+			{
+				//return false;
+			}
+			
+			$contact = CreateObject('contactcenter.so_contact');
+			$contact->reset_values();
+			
+			$altered = false;
+			foreach($data as $field => $value)
+			{
+				if ($value === false)
+				{
+					continue;
+				}
+				
+				$altered = true;
+				switch($field)
+				{
+					case 'photo':
+					case 'alias':
+					case 'id_prefix':
+					case 'id_status':
+					case 'id_suffix':
+					case 'given_names':
+					case 'family_names':
+					case 'names_ordered':
+					case 'birthdate':
+					case 'sex':
+					case 'pgp_key':
+					case 'notes':
+						$contact->set_field($field,$value);
+						break;
+
+					case 'companies':					
+						foreach($value as $company_fields)
+						{
+							if ($company_fields['company_name'])
+							{
+								$fields = array('company.id_company');
+								$restric = array(
+									0 => array(
+										'field' => 'company.company_name',
+										'type'  => 'iLIKE',
+										'value' => $company_fields['company_name']
+									)
+								);
+								
+								if($result = $this->find($fields,$restric))
+								{
+									$id = $result[0]['id_company'];
+									$company_fields['id_company'] = $id;
+								}
+								else
+								{
+									$company = CreateObject('contactcenter.so_company');
+									$company->reset_values();
+									$company->set_company_name($company_fields['company_name']);
+									$company->set_field('id_company_owner',$GLOBALS['phpgw_info']['user']['account_id']);
+									$company_fields['id_company'] = $company->commit();
+								}
+							}
+							
+							$contact->set_company($company_fields);
+						}
+						break;
+					
+					case 'relations':
+						foreach($value as $relation_fields)
+						{
+							$contact->set_relation($relation_fields['id_relation'], $relation_fields['id_typeof_relation']);
+						}
+						break;
+					
+					case 'addresses':
+						foreach($value as $address_fields)
+						{
+							$address = CreateObject('contactcenter.so_address');
+							$address->reset_values();
+							foreach($address_fields as $a_field => $a_value)
+							{
+								if ($a_field !== 'id_typeof_address')
+								{
+									$address->set_field($a_field,$a_value);
+								}
+							}
+							$address->commit();
+							$id_address = $address->get_id();
+							$contact->set_address($id_address, $address_fields['id_typeof_address']);
+						}
+						break;
+					
+					case 'connections':
+						foreach($value as $connection_name => $connection_fields)
+						{
+							$connection = CreateObject('contactcenter.so_connection');
+							$connection->reset_values();
+							
+							foreach($connection_fields as $a_field => $a_value)
+							{
+								if ($a_field !== 'id_typeof_connection')
+								{
+									$connection->set_field($a_field,$a_value);
+								}
+							}
+							
+							$connection->commit();
+							$id_connection = $connection->get_id();
+							$contact->set_connection($id_connection, $connection_fields['id_typeof_connection']);
+						}
+			 			break;
+			 			
+			 		default:
+			 			return false;
+				}
+			}
+			
+			if ($altered)
+			{
+				$contact->set_field('id_owner',$GLOBALS['phpgw_info']['user']['account_id']);
+				return $contact->commit();
+			}
+			
+			return false;
+		}
+		
+		/*!
+		
+			@function quick_add
+			@abstract Insert a new Contact record in the DB with just the
+				main fields
+			@author Raphael Derosso Pereira
+		
+			@param array $data The Contact Information. 
+			
+			Format:
+		
+				$data = array(
+					'alias'              => '<alias>',
+					'given_names'        => '<given_names>',
+					'family_names'       => '<family_names>',
+
+			 		'connections'        => array(
+			 			'default_email' => array(
+				 			'connection_name'       => <connection_name>,
+				 			'connection_value'      => <connection_value>
+			 			),
+			 			'default_phone' => array(
+				 			'connection_name'       => <connection_name>,
+				 			'connection_value'      => <connection_value>
+			 			)
+			 		)
+				);
+		*/
+		function quick_add ( $data )
+		{
+			$permissions = $this->security->get_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+
+			// TODO: GET THE ORDER TO PUT names_ordered FROM PREFERENCES!
+
+			$preferences = ExecMethod('contactcenter.ui_preferences.get_preferences');
+			
+			if (!is_array($preferences))
+			{
+				$preferences['personCardEmail'] = 1;
+				$preferences['personCardPhone'] = 2;
+			}
+			
+			$new_data = array(
+				'alias'              => $data['alias'],
+				'id_status'          => 1,
+				'given_names'        => $data['given_names'],
+				'family_names'       => $data['family_names'],
+				'names_ordered'      => $data['given_names'].' '.$data['family_names'],
+			);
+
+			$i = 1;
+			if ($data['connections']['default_email']['connection_value'])
+			{
+		 		$new_data['connections']['connection'.$i] = array(
+			 		'id_typeof_connection'  => $preferences['personCardEmail'],
+			 		'connection_name'       => $data['connections']['default_email']['connection_name'],
+			 		'connection_value'      => $data['connections']['default_email']['connection_value'],
+			 		'connection_is_default' => 1,
+		 		);
+				$i++;
+			}
+
+			if ($data['connections']['default_phone']['connection_value'])
+			{
+		 		$new_data['connections']['connection'.$i] = array(
+			 		'id_typeof_connection'  => $preferences['personCardPhone'],
+			 		'connection_name'       => $data['connections']['default_phone']['connection_name'],
+			 		'connection_value'      => $data['connections']['default_phone']['connection_value'],
+			 		'connection_is_default' => 1,
+		 		);
+			}
+			
+			return $this->add_single_entry($new_data);
+		}
+	
+		/*!
+		
+			@function add_prefix
+			@abstract Insert a new Prefix in the DB
+			@author Raphael Derosso Pereira
+		
+			@param string $prefix The Prefix
+			@return integer The new ID
+			
+		*/ 
+		function add_prefix ( $prefix )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function add_suffix
+			@abstract Insert a new suffix in the DB
+			@author Raphael Derosso Pereira
+		
+			@param string $suffix The suffix
+			@return integer The new ID
+			
+		*/ 
+		function add_suffix ( $suffix )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function add_status
+			@abstract Insert a new Status in the DB
+			@author Raphael Derosso Pereira
+		
+			@param string $status The Status
+			@return integer The new ID
+			
+		*/ 
+		function add_status ( $status )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function add_relation_type
+			@abstract Insert a new Relation Type in the DB
+			@author Raphael Derosso Pereira
+		
+			@param string $type_name The Relation Type
+			@return integer The new ID
+			
+		*/ 
+		function add_relation_type ( $type_name )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function add_address_type
+			@abstract Insert a new Address Type in the DB
+			@author Raphael Derosso Pereira
+		
+			@param string $type_name The Address Type
+			@return integer The new ID
+			
+		*/ 
+		function add_address_type ( $type_name )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function add_connection_type
+			@abstract Insert a new Connection Type in the DB
+			@author Raphael Derosso Pereira
+		
+			@param string $type_name The Connection Type
+			@return integer The new ID
+			
+		*/ 
+		function add_connection_type ( $type_name )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['create'])
+			{
+				return false;
+			}
+		}
+	
+
+
+		/*********************************************************************\
+		 *                   Methods to Alter Data                           *
+		\*********************************************************************/
+
+		/*!
+		
+			@function update_single_info
+			@abstract Update information of an existing Contact
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_status The Contact ID
+			@param string $status The new Status value
+			
+		*/ 
+		function update_single_info ( $id_contact, $data )
+		{
+			$permissions = $this->security->get_permissions($id_contact);
+			
+			if (!$permissions['write'])
+			{
+				return false;
+			}
+			
+			$contact = CreateObject('contactcenter.so_contact', $id_contact);
+			
+			$altered = false;
+//			print_r($data);
+			foreach($data as $field => $value)
+			{
+				if ($value === false)
+				{
+					continue;
+				}
+				
+				$altered = true;
+				switch($field)
+				{
+					case 'photo':
+					case 'alias':
+					case 'id_prefix':
+					case 'id_status':
+					case 'id_suffix':
+					case 'given_names':
+					case 'family_names':
+					case 'names_ordered':
+					case 'birthdate':
+					case 'sex':
+					case 'pgp_key':
+					case 'notes':
+						$contact->set_field($field,$value);
+						break;
+
+					case 'companies':					
+						foreach($value as $company_fields)
+						{
+							if ($company_fields['company_name'])
+							{
+								$fields = array('company.id_company');
+								$restric = array(
+									0 => array(
+										'field' => 'company.company_name',
+										'type'  => 'iLIKE',
+										'value' => $company_fields['company_name']
+									)
+								);
+								
+								if($result = $this->find($fields,$restric))
+								{
+									$id = $result[0]['id_company'];
+									$company_fields['id_company'] = $id;
+								}
+								else
+								{
+									$company = CreateObject('contactcenter.so_company');
+									$company->reset_values();
+									$company->set_company_name($company_fields['company_name']);
+									$company->set_field('id_company_owner',$GLOBALS['phpgw_info']['user']['account_id']);
+									$company_fields['id_company'] = $company->commit();
+								}
+							}
+							
+							$contact->set_company($company_fields);
+						}
+						break;
+					
+					case 'relations':
+						foreach($value as $relation_fields)
+						{
+							$contact->set_relation($relation_fields['id_relation'], $relation_fields['id_typeof_relation']);
+						}
+						break;
+					
+					case 'addresses':
+						foreach($value as $address_name => $address_fields)
+						{
+							if ($address_fields['id_address'] && $address_fields['id_address'] !== '')
+							{
+								$address = CreateObject('contactcenter.so_address', $address_fields['id_address']);
+							}
+							else
+							{
+								$address = CreateObject('contactcenter.so_address');
+								$address->reset_values();
+							}
+
+							if (!isset($address_fields['id_country']) or $address_fields['id_country'] === false)
+							{
+								#var_dump($address_fields);
+								echo(serialize(array(
+									'file' => __FILE__,
+									'line' => __LINE__,
+									'msg'  => lang('An Address must have at least a Country'),
+									'status' => 'aborted'
+								)));
+								return;
+							}
+							
+							foreach ($address_fields as $f_name => $f_value)
+							{
+								if ($f_value === false)
+								{
+									$address->set_field($f_name, null);
+								}
+								elseif (isset($f_value))
+								{
+									$address->set_field($f_name, $f_value);
+								}
+							}
+								
+							$address->commit();
+							$id_address = $address->get_id();
+							$contact->set_address($id_address, $address_fields['id_typeof_address']);
+						}
+						break;
+					
+					case 'connections':
+						foreach($value as $connection_name => $connection_fields)
+						{
+							if ($connection_name === 'removed_conns')
+							{
+								foreach($connection_fields as $id)
+								{
+									$connection = CreateObject('contactcenter.so_connection', $id);
+									if (!($connection->remove()))
+									{
+										return false;
+									}
+
+									$contact->remove_connection($id);
+								}
+
+								continue;
+							}
+							
+							$id_connection = $connection_fields['id_connection'];
+							if ($id_connection === '_NEW_' or
+							    $id_connection === '')
+							{
+								$connection = CreateObject('contactcenter.so_connection');
+								$connection->reset_values();
+							}
+							else
+							{
+								$connection = CreateObject('contactcenter.so_connection', $id_connection);
+							}
+								
+							foreach($connection_fields as $a_field => $a_value)
+							{
+								if ($a_field !== 'id_typeof_connection')
+								{
+									$connection->set_field($a_field,$a_value);
+								}
+							}
+							
+							if (!$connection->commit())
+							{
+								return false;
+							}
+							$id_connection = $connection->get_id();
+							$contact->set_connection($id_connection, $connection_fields['id_typeof_connection']);
+						}
+			 			break;
+			 			
+			 		default:
+						echo 'Invalid Field: '.$field.'<br>Value: '.$value;
+			 			return false;
+				}
+			}
+			
+			if ($altered)
+			{
+				$contact->set_field("last_status", 'U');
+				$contact->set_field("last_update",time()."000");
+				return $contact->commit();
+			}
+			
+			return false;
+		}
+	
+		/*!
+		
+			@function update_prefix
+			@abstract Update an existing Prefix
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_prefix The Prefix ID
+			@param string $prefix The new Prefix value
+			
+		*/ 
+		function update_prefix ( $id_prefix, $prefix )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['alter'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function update_suffix
+			@abstract Update an existing suffix
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_suffix The suffix ID
+			@param string $suffix The new suffix value
+			
+		*/ 
+		function update_suffix ( $id_suffix, $suffix )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['alter'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function update_status
+			@abstract Update an existing Status
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_status The Status ID
+			@param string $status The new Status value
+			
+		*/ 
+		function update_status ( $id_status, $status )
+		{
+			$permissions = $this->security->get_type_permissions();
+			
+			if (!$permissions['alter'])
+			{
+				return false;
+			}
+		}
+	
+		/*!
+		
+			@function update_relation_type
+			@abstract Update an existing Relation Type
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_type The Type ID
+			@param string $type The new type value
+			
+		*/ 
+		function update_relation_type ( $old_name, $relation_name )
+		{
+		}
+	
+		/*!
+		
+			@function update_address_type
+			@abstract Update an existing Address Type
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_uype The Type ID
+			@param string $type The new type value
+			
+		*/ 
+		function update_address_type ( $id_type, $type )
+		{
+		}
+	
+		/*!
+		
+			@function update_connection_type
+			@abstract Update an existing Connection Type
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_type The Type ID
+			@param string $type The new type value
+			
+		*/ 
+		function update_connection_type ( $id_type, $type )
+		{
+		}
+
+
+		/*********************************************************************\
+		 *                   Methods to Remove Data                          *
+		\*********************************************************************/
+
+		/*!
+		
+			@function remove_single_entry
+			@abstract Remove one contact from the DB
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_contact The Contact ID
+			
+		*/ 
+		function remove_single_entry ( $id_contact )
+		{
+			$permissions = $this->security->get_permissions();
+			
+			if (!$permissions['remove'])
+			{
+				return false;
+			}
+			
+			$contact = CreateObject('contactcenter.so_contact', $id_contact);
+			
+			if ($contact->get_state() === 'new')
+			{
+				return false;
+			}
+			
+			$addresses = $contact->get_addresses();
+			$connections = $contact->get_connections();
+			
+			if (!$contact->remove())
+			{
+				return false;
+			}
+			
+			foreach ($addresses as $id => $type)
+			{
+				if (!($address = CreateObject('contactcenter.so_address', $id)))
+				{
+					return false;
+				}
+				
+				if (!($address->remove()))
+				{
+					return false;
+				}
+				
+			}
+
+			foreach ($connections as $id => $type)
+			{
+				if (!($connection = CreateObject('contactcenter.so_connection',$id)))
+				{					
+					return false;
+				}
+				
+				if (!($connection->remove()))
+				{
+					return false;
+				}
+				
+			}
+			
+			return true;
+		}
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_prefix.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_prefix.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_prefix.inc.php	(revision 2)
@@ -0,0 +1,105 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once("class.so_main.inc.php");
+	
+	class so_prefix extends so_main 
+	{
+	
+		function so_prefix ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_prefix' => array(
+					'name'  => 'id_prefix',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'prefix' => array(
+					'name'  => 'prefix',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+
+			$this->db_tables = array(
+				'phpgw_cc_prefixes' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_prefix']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+			
+			if ($id)
+			{
+				$this->id = $id;
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+	
+		/*********************************************************************\
+		 *                   Methods to Get Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function get_prefix
+			@abstract Returns the Prefix
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_prefix (  )
+		{
+			return $this->main_fields['prefix']['value'];
+		}
+	
+
+		/*********************************************************************\
+		 *                   Methods to Set Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function set_prefix
+			@abstract Sets the Prefix
+			@author Raphael Derosso Pereira
+			
+			@param string $prefix The Prefix
+		
+		*/
+		function set_prefix ( $prefix )
+		{
+			$this->main_fields['prefix']['value'] = $prefix;
+			$this->manage_fields($this->main_fields['prefix']['value']);
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.ui_preferences.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.ui_preferences.inc.php	(revision 285)
+++ /tags/contactcenter/1.20/inc/class.ui_preferences.inc.php	(revision 285)
@@ -0,0 +1,153 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	class ui_preferences
+	{
+		var $public_functions = array(
+			'index'           => true,
+			'set_preferences' => true,
+		);
+		
+		function index()
+		{
+			$GLOBALS['phpgw_info']['flags']['app_header'] = lang('ContactCenter').' - '.lang('Preferences');
+			$GLOBALS['phpgw']->common->phpgw_header();
+			echo parse_navbar();
+
+			$GLOBALS['phpgw']->template->set_file(array('pref' => 'preferences.tpl'));
+
+			/* Get Saved Preferences */
+			$actual = $this->get_preferences();
+			
+			/* Get the catalog options */
+			$pCatalog = CreateObject('contactcenter.bo_people_catalog');
+			$types = $pCatalog->get_all_connections_types();
+			
+			if (is_array($types))
+			{
+				$options_email = '';
+				foreach($types as $id => $name)
+				{
+					$options_email .= '<option value="'.$id.'"';
+					
+					if ($actual['personCardEmail'] == $id)
+					{
+						$options_email .= ' selected ';
+					}
+				
+					$options_email .= '>'.$name."</option>\n";
+				}
+			
+				$options_phone = '';
+				foreach($types as $id => $name)
+				{
+					$options_phone .= '<option value="'.$id.'"';
+					
+					if ($actual['personCardPhone'] == $id)
+					{
+						$options_phone .= ' selected ';
+					}
+				
+					$options_phone .= '>'.$name."</option>\n";
+				}
+			}
+			else
+			{
+				$options_email = '';
+				$options_phone = '';
+			}
+			
+			if ($actual['displayConnector'] or !$actual['displayConnectorDefault'])
+			{
+				$GLOBALS['phpgw']->template->set_var('displayConnector', 'checked');
+			}
+			else
+			{
+				$GLOBALS['phpgw']->template->set_var('displayConnector', '');
+			}
+			
+			$GLOBALS['phpgw']->template->set_var('personCardEmail', $options_email);
+			$GLOBALS['phpgw']->template->set_var('personCardPhone', $options_phone);
+
+			/* Translate the fields */
+			$this->translate('pref');
+
+			$GLOBALS['phpgw']->template->set_var('form_action', $GLOBALS['phpgw']->link('/index.php', 'menuaction=contactcenter.ui_preferences.set_preferences'));
+
+			$GLOBALS['phpgw']->template->pparse('out', 'pref');
+		}
+		
+		function translate($handle)
+		{
+			$vars = $GLOBALS['phpgw']->template->get_undefined($handle);
+			foreach($vars as $name => $value)
+			{
+				if (ereg('^lang_', $name) !== false)
+				{
+					$GLOBALS['phpgw']->template->set_var($name, lang(str_replace('_',' ',substr($name, 5))));
+				}
+			}
+		}
+		
+		function set_preferences()
+		{
+			if ($_POST['save'])
+			{
+				$GLOBALS['phpgw']->preferences->read();
+				/*
+				$GLOBALS['phpgw']->preferences->delete('contactcenter', 'personCardEmail');
+				$GLOBALS['phpgw']->preferences->delete('contactcenter', 'personCardPhone');
+				*/
+				$GLOBALS['phpgw']->preferences->delete('contactcenter', 'displayConnector');
+				$GLOBALS['phpgw']->preferences->delete('contactcenter', 'displayConnectorDefault');
+				
+				/*
+				$GLOBALS['phpgw']->preferences->add('contactcenter', 'personCardEmail', $_POST['personCardEmail'], 'forced');
+				$GLOBALS['phpgw']->preferences->add('contactcenter', 'personCardPhone', $_POST['personCardPhone'], 'forced');
+				*/
+				
+				$GLOBALS['phpgw']->preferences->add('contactcenter', 'displayConnectorDefault', '1');
+
+				if($_POST['displayConnector'])
+				{
+					$GLOBALS['phpgw']->preferences->add('contactcenter', 'displayConnector', '1');
+				}
+				else
+				{
+					$GLOBALS['phpgw']->preferences->add('contactcenter', 'displayConnector', '0');
+				}
+				
+				$GLOBALS['phpgw']->preferences->save_repository();
+			}
+
+			header('Location: '.$GLOBALS['phpgw']->link('/preferences/index.php'));
+		}
+
+		function get_preferences()
+		{
+			$prefs = $GLOBALS['phpgw']->preferences->read();
+
+			if (!$prefs['contactcenter']['displayConnectorDefault'] and !$prefs['contactcenter']['displayConnector'])
+			{
+				$prefs['contactcenter']['displayConnector'] = true;
+			}
+			
+			$prefs['contactcenter']['personCardEmail'] = 1;
+			$prefs['contactcenter']['personCardPhone'] = 2;
+			
+			return $prefs['contactcenter'];
+		}
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_connection.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_connection.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_connection.inc.php	(revision 2)
@@ -0,0 +1,192 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once("class.so_main.inc.php");
+	
+	class so_connection extends so_main 
+	{
+	
+		function so_connection ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_connection' => array(
+					'name'  => 'id_connection',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'connection_name' => array(
+					'name'  => 'connection_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'connection_value' => array(
+					'name'  => 'connection_value',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'connection_is_default' => array(
+					'name'  => 'connection_is_default',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+
+			$this->db_tables = array(
+				'phpgw_cc_connections' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_connection']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+			
+			if ($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+
+
+
+		/**********************************************************************\
+		 *                    Methods to Get Information                      *
+		\**********************************************************************/
+
+		/*!
+		
+			@function get_name
+			@abstract Returns the Connection Name 
+			@author Raphael Derosso Pereira
+			
+		*/	
+		function get_name (  )
+		{
+			return $this->main_fields['connection_name']['value'];
+		}
+	
+		/*!
+		
+			@function get_value
+			@abstract Return the Connection Value
+			@author Raphael Derosso Pereira
+		
+		*/	
+		function get_value (  )
+		{
+			return $this->main_fields['connection_value']['value'];
+		}
+	
+		/*!
+		
+			@function is_default
+			@abstract Return true if this is the default
+				connection, else return false
+			@author Raphael Derosso Pereira
+		
+		*/	
+		function is_default (  )
+		{
+			switch (strtolower($this->main_fields['connection_is_default']['value']))
+			{
+				case 't':
+				case 'true':
+				case '1':
+					return true;
+
+				case 'f':
+				case 'false':
+				case '0':
+					return false;
+			}
+		}
+	
+
+
+		/**********************************************************************\
+		 *                    Methods to Set Information                      *
+		\**********************************************************************/
+
+		/*!
+		
+			@function set_name
+			@abstract Sets the Connection Name
+			@author Raphael Derosso Pereira
+			
+			@param string $name The Connection Name
+		
+		*/	
+		function set_name ( $name )
+		{
+			$this->main_fields['connection_name']['value'] = $name;
+			$this->manage_fields($this->main_fields['connection_name'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_value
+			@abstract Sets the Connection Value
+			@author Raphael Derosso Pereira
+		
+			@param string $value The Connection Value
+		
+		*/	
+		function set_value ( $value )
+		{
+			$this->main_fields['connection_value']['value'] = $value;
+			$this->manage_fields($this->main_fields['connection_value'], 'changed');
+		}
+	
+		/*!
+		
+			@function set_default
+			@abstract Sets the Connection Default trueness
+			@author Raphael Derosso Pereira
+		
+			@param boolean $default The Connection Default trueness
+		
+		*/	
+		function set_default ( $default )
+		{
+			if ($default)
+			{
+				$this->main_fields['connection_name']['value'] = 1;
+			}
+			else
+			{
+				$this->main_fields['connection_name']['value'] = 0;
+			}
+			$this->manage_fields($this->main_fields['connection_name'], 'changed');
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.security_manager.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.security_manager.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.security_manager.inc.php	(revision 2)
@@ -0,0 +1,99 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	class security_manager 
+	{
+
+		/*
+		
+			@function get_available_aliens
+			@abstract Return an array indicating the ID's of the Available
+				Aliens Catalogs to this user
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_available_aliens (  )
+		{
+		}
+
+		function get_permissions ($type = false, $id_entry = false )
+		{
+			if ($type)
+			{
+				switch ($type)
+				{
+					case 'entry':
+					
+						if ($id_entry)
+						{
+							/* First check if this entry is owned by the requesting user */
+							//TODO: The table must be passed as argument
+							$id_entry = (int)$id_entry;
+							
+							$sql  = 'SELECT COUNT(id_contact) AS nfields FROM phpgw_cc_contact WHERE id_contact=\''.$id_entry;
+							$sql .= '\' AND id_owner=\''.$GLOBALS['phpgw_info']['user']['account_id'].'\'';
+
+							$result = $GLOBALS['phpgw']->db->query($sql);
+
+							if ($result)
+							{
+								if ($GLOBALS['phpgw']->db->next_record())
+								{
+									$result = $GLOBALS['phpgw']->db->f('nfields');
+
+									if ($result)
+									{
+										return array(
+											'read'   => true,
+											'edit'   => true,
+											'delete' => true,
+											'acl'    => true,
+										);
+									}
+								}
+							}
+						}
+						
+						return array(
+							'read'   => false,
+							'edit'   => false,
+							'delete' => false,
+							'acl'    => false,
+						);
+				}
+			}
+			
+			$return['read'] = true;
+			$return['write'] = true;
+			$return['create'] = true;
+			$return['remove'] = true;
+			$return['cities'] = array('c');
+			$return['states'] = array('c');
+			
+			return $return;
+		}
+
+		function get_alien_permissions ( $id_owner_alien )
+		{
+		}
+	
+		function get_global_permissions (  )
+		{
+		}
+	
+		function set_access_permitions_to_global ( $id_user, $rights )
+		{
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_country.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_country.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_country.inc.php	(revision 2)
@@ -0,0 +1,56 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once("class.so_main.inc.php");
+
+	class so_country 
+	{
+
+		function so_country ( $id = false )
+		{
+			if($id)
+			{
+				$obj = CreateObject('phpgwapi.country');
+				$countries = $obj->country_array;
+
+				if ($countries[$id])
+				{
+					$name = lang($countries[$id]);
+					$this->country = $name{0} . strtolower(substr($name, 1));
+				}
+			}
+		}
+		
+
+		/*********************************************************************\
+		 *                   Methods to Get Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function get_country_name
+			@abstract Returns the Name of the Country
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_country_name (  )
+		{
+			return $this->country;
+		}
+	}
+
+?>
Index: /tags/contactcenter/1.20/inc/class.so_company_relation_type.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_company_relation_type.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_company_relation_type.inc.php	(revision 2)
@@ -0,0 +1,76 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once( "class.so_relation_type.inc.php" );
+	
+	class so_company_relation_type extends so_relation_type 
+	{
+	
+		function so_company_relation_type ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_typeof_company_relation' => array(
+					'name'  => 'id_typeof_company_relation',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'company_relation_type_name' => array(
+					'name'  => 'company_relation_type_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'company_relation_is_subordinated' => array(
+					'name'  => 'company_relation_is_subordinated',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+			
+			$this->type_name = & $this->main_fields['company_relation_type_name'];
+			$this->is_subordinated = & $this->main_fields['company_relation_is_subordinated'];
+
+			$this->db_tables = array(
+				'phpgw_cc_typeof_co_rels' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_typeof_company_relation']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+
+			if ($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.so_suffix.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_suffix.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_suffix.inc.php	(revision 2)
@@ -0,0 +1,106 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once( "class.so_main.inc.php" );
+	
+	class so_suffix extends so_main 
+	{
+	
+		function so_suffix ( $id = false )
+		{
+			$this->init();
+				
+			$this->main_fields = array(
+				'id_suffix' => array(
+					'name'  => 'id_suffix',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'suffix' => array(
+					'name'  => 'suffix',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+
+			$this->db_tables = array(
+				'phpgw_cc_suffixes' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_suffix']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+
+			if ($id)
+			{
+				$this->id = $id;
+				if (!$this->checkout($id))
+				{
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+		
+	
+		/*********************************************************************\
+		 *                   Methods to Get Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function get_suffix
+			@abstract Returns the Sulfix
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_suffix (  )
+		{
+			return $this->main_fields['suffix']['value'];
+		}
+	
+	
+
+		/*********************************************************************\
+		 *                   Methods to Get Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function set_suffix
+			@abstract Sets the Sulfix
+			@author Raphael Derosso Pereira
+			
+			@param string $suffix The Sulfix
+		
+		*/
+		function set_suffix ( $suffix )
+		{
+			$this->main_fields['suffix']['value'] = $suffix;
+			$this->manage_fields($this->main_fields['suffix'], 'changed');
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.ui_api.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.ui_api.inc.php	(revision 285)
+++ /tags/contactcenter/1.20/inc/class.ui_api.inc.php	(revision 285)
@@ -0,0 +1,455 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*
+	 * This is the Main ContactCenter API for other eGroupWare applications
+	 *
+	 */
+  
+	class ui_api
+	{
+		var $commons;
+		var $commons_loaded = false;
+		
+		function ui_api()
+		{
+			$preferences = ExecMethod('contactcenter.ui_preferences.get_preferences');
+			
+			if (!is_array($preferences))
+			{
+				$preferences['personCardEmail'] = 1;
+				//$preferences['personCardPhone'] = 2;
+			}
+			
+			//$template_dir = PHPGW_SERVER_ROOT . '/contactcenter/templates/default/';
+			//$template = CreateObject('phpgwapi.Template',$template_dir);
+			$template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
+
+			$template->set_file(array('api' => 'api_common.tpl'));
+			
+			$template->set_var('cc_email_id_type', $preferences['personCardEmail']);
+			
+			
+			/* Messages */
+			$template->set_var('cc_msg_err_invalid_catalog',lang('Unavailable or empty Catalog'));
+			$template->set_var('cc_msg_err_contacting_server',lang('Couldn\'t contact server or server response is invalid. Contact Admin.'));
+			$template->set_var('cc_msg_err_timeout',lang('Operation Timed Out.'));
+			$template->set_var('cc_msg_err_serialize_data_unknown',lang('Data to be serialized is of unknown type!'));
+			/* End Messages */
+
+			if ($preferences['displayConnector'])
+			{
+				$template->set_var('cc_connector_visible', 'true');
+			}
+			else
+			{
+				$template->set_var('cc_connector_visible', 'false');
+			}
+			$template->set_var('cc_loading_1', lang('Contacting Server...'));
+			$template->set_var('cc_loading_2', lang('Server Contacted. Waiting for response...'));
+			$template->set_var('cc_loading_3', lang('Processing Information...'));
+			$template->set_var('cc_loading_image', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/templates/default/images/loading_back.png');
+			$template->set_var('cc_server_root', $GLOBALS['phpgw_info']['server']['webserver_url']);
+			$template->set_var('cc_phpgw_img_dir', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/images');
+
+			/* Style Sheets */
+			$template->set_var('cc_css', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/styles/cc_api.css');
+			$template->set_var('cc_dtree_css', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/js/dftree/dftree.css');
+
+			/* JS Files */
+			$template->set_var('cc_js_aux', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/ccAux.js');
+			$template->set_var('cc_js_connector', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/connector.js');
+			$template->set_var('cc_js_wz_dragdrop', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/js/wz_dragdrop/wz_dragdrop.js');
+			$template->set_var('cc_js_dtree', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/js/dftree/dftree.js');
+			$template->set_var('cc_js_dtabs', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/js/dTabs/dTabs.js');
+			$template->set_var('cc_js_djswin', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/js/dJSWin/dJSWin.js');
+			$template->set_var('cc_js_catalog_tree', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/cc_tree.js');
+			
+			$template->parse('out','api');
+
+			$this->commons = $template->get_var('out');
+			$this->commons_loaded = false;
+		}
+		
+		/* DEPRECTED! Use get_email_win() instead */
+		function ui_get_email_win()
+		{
+			return $this->get_email_win();
+		}
+
+		function get_email_win()
+		{
+			//$search = $this->ui_get_search_win();
+			
+			$template_dir = PHPGW_SERVER_ROOT . '/contactcenter/templates/default/';
+			$template = CreateObject('phpgwapi.Template', $template_dir);
+
+			$template->set_file(array('email_win' => 'email_win.tpl'));
+			
+			if (!$this->commons_loaded)
+			{
+				$template->set_var('cc_api', $this->commons);
+				$this->commons_loaded = true;
+			}
+			else
+			{
+				$template->set_var('cc_api', '');
+			}
+			
+			//$template->set_var('cc_search_win', $search);
+			$template->set_var('cc_js_search', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/cc_search.js');
+			
+			$template->set_var('cc_email_id_type', $search);
+			
+			$template->set_var('cc_email_win_title',lang('Contact Center').' - '.lang('Catalog Entries Emails'));
+			$template->set_var('cc_email_status',lang('Status').':');
+			$template->set_var('cc_email_search_text',lang('Search').'...');
+			
+			$template->set_var('cc_choose_catalogue',lang('Choose a catalogue').'...');
+			$template->set_var('cc_choose_ordinance',lang('Choose a ordinance').'...');
+			
+			$template->set_var('cc_btn_to_add',lang('To').' >>');
+			$template->set_var('cc_btn_to_del','<< '.lang('To'));
+			$template->set_var('cc_btn_cc_add',lang('Cc').' >>');
+			$template->set_var('cc_btn_cc_del','<< '.lang('Cc'));
+			$template->set_var('cc_btn_cco_add',lang('Bcc').' >>');
+			$template->set_var('cc_btn_cco_del','<< '.lang('Bcc'));
+			$template->set_var('cc_btn_new',lang('New').'...');
+			$template->set_var('cc_btn_details',lang('Details').'...');
+			$template->set_var('cc_btn_update',lang('Update'));
+			$template->set_var('cc_btn_ok',lang('Ok'));
+			$template->set_var('cc_btn_cancel',lang('Cancel'));
+			
+			$template->set_var('cc_label_to',lang('To').':');
+			$template->set_var('cc_label_cc',lang('Cc').':');
+			$template->set_var('cc_label_cco',lang('Bcc').':');
+			$template->set_var('cc_label_entries',lang('Entries').':');
+			$template->set_var('cc_label_catalogues',lang('Catalogues').':');
+			$template->set_var('cc_label_catalogue_type',lang('Type Of Catalogue').':');
+			$template->set_var('cc_label_ordinance_type',lang('Type Of Ordinace').':');
+			
+			$template->set_var('phpgw_img_dir', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/images');
+			
+			$template->set_var('cc_js_email_win', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/cc_email_win.js');
+			
+			$template->parse('out','email_win');
+
+			return $template->get_var('out');
+		}
+
+		function ui_get_search_win()
+		{
+			return $this->get_search_win();
+		}
+
+		function get_search_win()
+		{
+			$template_dir = PHPGW_SERVER_ROOT . '/contactcenter/templates/default/';
+			$template = CreateObject('phpgwapi.Template',$template_dir);
+
+			$template->set_file(array('search' => 'search_win.tpl'));
+			
+			if (!$this->commons_loaded)
+			{
+				$template->set_var('cc_api', $this->commons);
+				$this->commons_loaded = true;
+			}
+			else
+			{
+				$template->set_var('cc_api', '');
+			}
+			
+			$template->set_var('cc_search_title',lang('Contact Center - Search for Catalog Entries'));
+			$template->set_var('cc_search_minimize',lang('Minimize'));
+			$template->set_var('cc_search_close',lang('Close'));
+			$template->set_var('cc_search_catalogues',lang('Catalogues'));
+			$template->set_var('cc_search_for',lang('Search for...'));
+			$template->set_var('cc_search_recursive',lang('Recursive Search?'));
+			$template->set_var('cc_search_go',lang('Go'));
+			$template->set_var('cc_search_cancel',lang('Cancel'));
+			
+			$template->set_var('cc_js_search_win', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/cc_search_win.js');
+			
+			$template->set_var('phpgw_img_dir', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/images');
+			
+			$template->parse('out','search');
+
+			return $template->get_var('out');
+		}
+
+		function get_search_obj()
+		{
+			return "\n".'<script type="text/javascript" src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/cc_search.js'.'"></script>'."\n";
+		}
+
+		function ui_get_full_add()
+		{
+			return $this->get_full_add();
+		}
+
+		function get_full_add()
+		{
+			$template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
+
+			$template->set_file(array('full_add' => 'full_add.tpl'));
+			
+			if (!$this->commons_loaded)
+			{
+				$template->set_var('cc_api', $this->commons);
+				$this->commons_loaded = true;
+			}
+			else
+			{
+				$template->set_var('cc_api', '');
+			}
+			
+			$template->set_var('cc_contact_title',lang('Contact Center').' - '.lang('Contacts'));
+
+			/* Messages */
+			$template->set_var('cc_msg_err_empty_field',lang('field is empty'));
+			$template->set_var('cc_msg_type_state',lang('Type new state here').'...');
+			$template->set_var('cc_msg_type_city',lang('Type new city here').'...');
+			/* End Messages */
+			
+			/* Contact */
+			$template->set_var('cc_contact_save',lang('Save'));
+			$template->set_var('cc_contact_cancel',lang('Cancel'));
+			$template->set_var('cc_contact_reset',lang('Reset'));
+
+			$template->set_var('cc_contact_personal',lang('Personal'));
+			$template->set_var('cc_contact_addrs',lang('Addresses'));
+			$template->set_var('cc_contact_conns',lang('Connections'));
+			$template->set_var('emails_telephones', lang("E-Mails and Telephones"));
+			$template->set_var('cc_default', lang("Default"));
+
+			/* End Contact */
+			
+			/* Contact - Personal Data */
+			$dateformat = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+		
+			$j = 0;
+			for ($i = 0; $i < 5; $i+=2)
+			{
+				switch($dateformat{$i})
+				{
+					case 'Y':
+						$date[$j]['size'] = 4;
+						$date[$j]['name'] = lang('Year');
+						break;
+
+					case 'm':
+					case 'M':
+						$date[$j]['size'] = 2;
+						$date[$j]['name'] = lang('Month');
+						break;
+
+					case 'd':
+						$date[$j]['size'] = 2;
+						$date[$j]['name'] = lang('Day');
+				}
+				$j++;
+			}
+			
+			$template->set_var('cc_pd_birth_size_0', "{$date[0]['size']}");
+			$template->set_var('cc_pd_birth_size_1', "{$date[1]['size']}");
+			$template->set_var('cc_pd_birth_size_2', "{$date[2]['size']}");
+			
+			$template->set_var('cc_pd_birthdate_0', "{$date[0]['name']}");
+			$template->set_var('cc_pd_birthdate_1', "{$date[1]['name']}");
+			$template->set_var('cc_pd_birthdate_2', "{$date[2]['name']}");
+
+			$template->set_var('cc_pd_select_photo_b', lang('Browse').'...');
+			$template->set_var('cc_form_photo_src', 'photo_form.html');
+			
+			$template->set_var('cc_pd_select_photo',lang('Select Photo'));
+			$template->set_var('cc_pd_alias',lang('Alias'));
+			$template->set_var('cc_pd_given_names',lang('Given Names'));
+			$template->set_var('cc_pd_family_names',lang('Family Names'));
+			$template->set_var('cc_pd_full_name',lang('Full Name'));
+			$template->set_var('cc_pd_birthdate',lang('Birthdate'));
+			$template->set_var('cc_pd_gpg_finger_print',lang('GPG Finger Print'));
+			$template->set_var('cc_pd_suffix',lang('Suffix'));
+			$template->set_var('cc_pd_choose_suffix',lang('Choose Suffix...'));
+			$template->set_var('cc_pd_prefix',lang('Prefix'));
+			$template->set_var('cc_pd_choose_prefix',lang('Choose Prefix...'));
+			$template->set_var('cc_pd_notes',lang('Notes'));
+			$template->set_var('cc_pd_sex',lang('Sex'));
+			$template->set_var('cc_pd_choose_sex',lang('Choose Sex ...'));
+			$template->set_var('cc_pd_male',lang('Male'));
+			$template->set_var('cc_pd_female',lang('Female'));
+			/* End Contact - Personal Data */
+			
+			/* Contact - Addresses */
+			$template->set_var('cc_addr_types',lang('Type of Address'));
+			$template->set_var('cc_addr_choose_types',lang('Choose Type of Address').'...');
+			$template->set_var('cc_addr_countries',lang('Country'));
+			$template->set_var('cc_addr_choose_countries',lang('Choose Country').'...');
+			$template->set_var('cc_addr_states',lang('State'));
+			$template->set_var('cc_addr_states_new',lang('New State').'...');
+			$template->set_var('cc_addr_states_nostate',lang('No State'));
+			$template->set_var('cc_addr_choose_states',lang('Choose State').'...');
+			$template->set_var('cc_addr_cities',lang('City'));
+			$template->set_var('cc_addr_cities_new',lang('New City').'...');
+			$template->set_var('cc_addr_choose_cities',lang('Choose City').'...');
+			$template->set_var('cc_addr_1',lang('Address 1'));
+			$template->set_var('cc_addr_2',lang('Address 2'));
+			$template->set_var('cc_addr_complement',lang('Complement'));
+			$template->set_var('cc_addr_other',lang('Address Other'));
+			$template->set_var('cc_addr_postal_code',lang('Postal Code'));
+			$template->set_var('cc_addr_po_box',lang('PO Box'));
+			$template->set_var('cc_addr_is_default',lang('Is Default?'));
+			$template->set_var('cc_addr_yes',lang('Yes'));
+			$template->set_var('cc_addr_no',lang('No'));
+			$template->set_var('cc_available',lang('Available'));
+			/* End Contact - Addresses */
+			
+			
+			/* Contact - Connections */
+			$template->set_var('cc_conn_type',lang('Type of Connection'));
+			$template->set_var('cc_conn_name',lang('Connection Name'));
+			$template->set_var('cc_conn_value',lang('Connection Value'));
+			
+			$template->set_var('cc_new_same_type',lang('New from the same Type').'...');
+			
+			$template->set_var('cc_conn_type_none',lang('Choose Type of Connection').'...');
+			/* End Contact - Connections */
+
+			$template->set_var('email', lang("E-Mail"));
+			$template->set_var('telephone', lang("Telephone"));
+			$template->set_var('choose_email_telephone', lang("Choose 'E-Mail' or 'Telephone'"));
+
+			$template->parse('out_full', 'full_add');
+
+			return $template->get_var('out_full');
+		}
+
+		function get_quick_add_plugin()
+		{
+			$template_dir = PHPGW_SERVER_ROOT . '/contactcenter/templates/default/';
+			$template = CreateObject('phpgwapi.Template',$template_dir);
+
+			$template->set_file(array('quickAdd' => 'quickAddPlugin.tpl'));
+			
+			if (!$this->commons_loaded)
+			{
+				$template->set_var('cc_api', $this->commons);
+				$this->commons_loaded = true;
+			}
+			else
+			{
+				$template->set_var('cc_api', '');
+			}
+			
+			$template->set_var('ccQAPluginFile', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/ccQuickAdd-plugin.js');
+
+			/* Fields Insertion */
+
+			// TODO: get this from preferences
+			$nFields = 5;
+			$fields = array(
+				lang('Alias'), 
+				lang('Given Names'), 
+				lang('Family Names'), 
+				lang('Phone'),
+				lang('Email')
+			);
+			
+			$template->set_var('ccQAnFields', $nFields);
+			
+			$fieldsHTML = '';
+			$fieldsTop = 10;
+			$fieldsSpace = 30;
+			for ($i = 0; $i < $nFields; $i++)
+			{
+				$fieldsHTML .= '<span id="ccQuickAddT'.$i.'" style="position: absolute; top: '.($fieldsTop+$i*$fieldsSpace).'px; left: 5px; width: 100px; text-align: right; border: 0px solid #999;">'.$fields[$i].':</span>'."\n";
+				if ($i == 0){
+					$fieldsHTML .= '<input id="ccQuickAddI'.$i.'" type="text" value="" maxlength="30" style="position: absolute; top: '.($fieldsTop+$i*$fieldsSpace).'px; left: 110px; width: 135px;">'."\n";
+				}
+				else if ($i == 4){
+					$fieldsHTML .= '<input id="ccQuickAddI'.$i.'" type="text" value="" maxlength="100" style="position: absolute; top: '.($fieldsTop+$i*$fieldsSpace).'px; left: 110px; width: 135px;">'."\n";
+				}
+				else {
+					$fieldsHTML .= '<input id="ccQuickAddI'.$i.'" type="text" value="" maxlength="50" style="position: absolute; top: '.($fieldsTop+$i*$fieldsSpace).'px; left: 110px; width: 135px;">'."\n";
+				}
+			}
+
+			$template->set_var('ccQAFields', $fieldsHTML);
+			$template->set_var('ccQAWinHeight', ($i+1)*$fieldsSpace+$fieldsTop);
+			$template->set_var('ccQAFunctionsTop', ($fieldsTop+$i*$fieldsSpace).'px');
+			
+			/* Images Dir */
+			$template->set_var('ccQACardImgRoot', $GLOBALS['phpgw_info']['server']['webserver_url'].'/contactcenter/templates/default/images/');
+			
+			/* Texts */
+			$template->set_var('ccQATitle', lang('Contact Center').' - '.lang('Quick Add'));
+			$template->set_var('ccQASave', lang('Save'));
+			$template->set_var('ccQAClear', lang('Reset'));
+			$template->set_var('ccQACancel', lang('Cancel'));
+			
+			$template->parse('out_QA', 'quickAdd');
+
+			return $template->get_var('out_QA');
+		}
+		
+		function get_add_group()
+		{
+			$template_dir = PHPGW_SERVER_ROOT . '/contactcenter/templates/default/';
+			$template = CreateObject('phpgwapi.Template',$template_dir);
+
+			$template->set_file(array('addGroup' => 'addGroup.tpl'));
+			
+			if (!$this->commons_loaded)
+			{
+				$template->set_var('cc_api', $this->commons);
+				$this->commons_loaded = true;
+			}
+			else
+			{
+				
+				$template->set_var('cc_api', '');
+			}
+			
+			$template->set_var('ccAGFile', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/ccAddGroup.js');			
+			$template->set_var('ccAGWinHeightIE', '285');			
+			$template->set_var('ccAGWinHeightMO', '335');
+			
+			/* Images Dir */
+			$template->set_var('ccAGCardImgRoot', $GLOBALS['phpgw_info']['server']['webserver_url'].'/contactcenter/templates/default/images/');
+			
+			/* Texts */
+			$template->set_var('ccAGTitle', lang('Contact Center').' - '.lang('Group Add'));
+			$template->set_var('ccAGSave', lang('Save'));
+			$template->set_var('ccAGClear', lang('Reset'));
+			$template->set_var('ccAGCancel', lang('Cancel'));
+			$title = '<input type="text" id="title" name="title" value="'.$group['title'].'" size="50" maxlength="50"/>';			
+				
+			$template->set_var('title', $title);												
+			// set content and label variables.
+			$template->set_var(array(
+						'msg_text' 	=> lang($status),						
+						'txt_title' 	=> lang('Contact Group List'),						
+						'txt_cancel'=> lang('cancel'),
+						'txt_add'=> lang('Add'),						
+						'txt_rem'=> lang('Remove'),
+						'txt_personal_contacts' => lang('Personal Contacts'),
+						'txt_contacts_in_list' => lang("Participants"),
+						'txt_name'	=> lang('Full Name')));
+						
+			$template->parse('out_AG', 'addGroup');
+			
+			return $template->get_var('out_AG');
+		}
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.ui_data.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.ui_data.inc.php	(revision 293)
+++ /tags/contactcenter/1.20/inc/class.ui_data.inc.php	(revision 293)
@@ -0,0 +1,3043 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	
+	class ui_data
+	{
+		var $public_functions = array(
+			'data_manager' => true,
+		);
+		
+		var $bo;
+		var $typeContact;
+		
+		var $page_info = array(
+			'n_cards'          => 20,
+			'n_pages'          => false,
+			'actual_letter'    => 'A',
+			'actual_page'      => 1,
+			'actual_entries'   => false,
+			'changed'          => false,
+			'catalogs'         => false,
+			'actual_catalog'   => false
+		);
+		
+		/*!
+		
+			@function ui_data
+			@abstract The constructor. Sets the initial parameters and loads
+				the data saved in the session
+			@author Raphael Derosso Pereira
+			
+		*/
+		function ui_data()
+		{
+			$temp = $GLOBALS['phpgw']->session->appsession('ui_data.page_info','contactcenter');
+			$temp2 = $GLOBALS['phpgw']->session->appsession('ui_data.all_entries','contactcenter');
+			
+			$this->bo = CreateObject('contactcenter.bo_contactcenter');
+			
+			if ($temp)
+			{
+				$this->page_info = $temp;
+			}
+
+			if ($temp2)
+			{
+				$this->all_entries = $temp2;
+			}
+			
+			if (!$this->page_info['actual_catalog'])
+			{
+				$catalogs = $this->bo->get_catalog_tree();
+				$this->page_info['actual_catalog'] = $catalogs[0];
+			}
+			
+			$this->page_info['actual_catalog'] =& $this->bo->set_catalog($this->page_info['actual_catalog']);			
+			
+			if($this->page_info['actual_catalog']['class'] == 'bo_group_manager')
+				$this -> typeContact = 'groups';
+			else
+				$this -> typeContact = 'contacts';
+		}
+
+		/*!
+		
+			@function index
+			@abstract Builds the Main Page
+			@author Raphael Derosso Pereira
+			@author Jonas Goes
+			
+		*/		
+		function index()
+		{	
+			if(!@is_object($GLOBALS['phpgw']->js))
+			{
+				$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
+			}
+			$GLOBALS['phpgw']->js->validate_file('venus','table');
+			$GLOBALS['phpgw']->js->validate_file('venus','shapes');
+			$GLOBALS['phpgw']->js->validate_file('venus','jsStructUtil');
+			$GLOBALS['phpgw']->js->validate_file('venus','cssUtil');
+			
+//			$GLOBALS['phpgw']->js->set_onload('setTimeout(\'updateCards()\',1000)');
+			$GLOBALS['phpgw']->common->phpgw_header();
+			
+			$GLOBALS['phpgw']->template->set_file(array('index' => 'index.tpl'));
+			$GLOBALS['phpgw']->template->set_var('cc_root_dir', $GLOBALS['phpgw_info']['server']['webserver_url'].'/contactcenter/');
+			
+			/* Quick Add */
+			$GLOBALS['phpgw']->template->set_var('cc_qa_alias',lang('Alias').':');
+			$GLOBALS['phpgw']->template->set_var('cc_qa_given_names',lang('Given Names').':');
+			$GLOBALS['phpgw']->template->set_var('cc_qa_family_names',lang('Family Names').':');
+			$GLOBALS['phpgw']->template->set_var('cc_qa_phone',lang('Phone').':');
+			$GLOBALS['phpgw']->template->set_var('cc_qa_email',lang('Email').':');
+			$GLOBALS['phpgw']->template->set_var('cc_qa_save',lang('Save'));
+			$GLOBALS['phpgw']->template->set_var('cc_qa_clear',lang('Clear'));
+			$GLOBALS['phpgw']->template->set_var('cc_qa_close',lang('Close'));
+			/* End Quick Add */
+			
+			$cc_css_file = $GLOBALS['phpgw_info']['server']['webserver_url'].'/contactcenter/styles/cc.css';
+			$cc_card_image_file = $GLOBALS['phpgw_info']['server']['webserver_url'].'/contactcenter/templates/default/images/card.png';
+			$GLOBALS['phpgw']->template->set_var('cc_css',$cc_css_file);
+			$GLOBALS['phpgw']->template->set_var('cc_dtree_css', $cc_dtree_file);
+			$GLOBALS['phpgw']->template->set_var('cc_card_image',$cc_card_image_file);
+			
+			$GLOBALS['phpgw']->template->set_var('cc_personal',lang('Personal'));
+			
+			$GLOBALS['phpgw']->template->set_var('cc_full_add',lang('Full Add'));
+			$GLOBALS['phpgw']->template->set_var('cc_reset',lang('Reset'));
+			
+			$GLOBALS['phpgw']->template->set_var('cc_personal_data',lang('Personal Data'));
+			$GLOBALS['phpgw']->template->set_var('cc_addresses',lang('Addresses'));
+			$GLOBALS['phpgw']->template->set_var('cc_connections',lang('Connections'));
+			$GLOBALS['phpgw']->template->set_var('cc_relations',lang('Relations'));
+
+			$GLOBALS['phpgw']->template->set_var('cc_quick_add',lang('Quick Add'));
+			$GLOBALS['phpgw']->template->set_var('cc_catalogs',lang('Catalogues'));
+			$GLOBALS['phpgw']->template->set_var('cc_group_add',lang('Group Add'));
+			
+			/* Panel */
+			$GLOBALS['phpgw']->template->set_var('cc_panel_new',lang('New').'...');
+			$GLOBALS['phpgw']->template->set_var('cc_panel_search',lang('Search').'...');
+			$GLOBALS['phpgw']->template->set_var('cc_panel_table',lang('Table View'));
+			$GLOBALS['phpgw']->template->set_var('cc_panel_cards',lang('Cards View'));
+			$GLOBALS['phpgw']->template->set_var('cc_btn_import_export', lang('Import/Export'));
+			$GLOBALS['phpgw']->template->set_var('cc_btn_new', lang("New..."));
+			
+			$GLOBALS['phpgw']->template->set_var('cc_panel_search_found',lang('Showing found entries'));
+			$GLOBALS['phpgw']->template->set_var('cc_panel_first_page',lang('First Page'));
+			$GLOBALS['phpgw']->template->set_var('cc_panel_previous_page',lang('Previous Page'));
+			$GLOBALS['phpgw']->template->set_var('cc_panel_next_page',lang('Next Page'));
+			$GLOBALS['phpgw']->template->set_var('cc_panel_last_page',lang('Last Page'));
+			$GLOBALS['phpgw']->template->set_var('cc_all',lang('all'));
+			/* End Panel */
+			
+			/* Messages */
+			$GLOBALS['phpgw']->template->set_var('cc_msg_no_cards',lang('No Cards'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_err_no_room',lang('No Room for Cards! Increase your browser area.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_card_new',lang('New from same Company'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_card_edit',lang('Edit Contact'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_card_remove',lang('Remove Contact'));
+			$GLOBALS['phpgw']->template->set_var('cc_send_mail',lang('Send Mail'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_group_edit',lang('Edit Group'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_group_remove',lang('Remove Group'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_group_remove_confirm',lang('Confirm Removal of this Group?'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_card_remove_confirm',lang('Confirm Removal of this Contact?'));
+			$GLOBALS['phpgw']->template->set_var('cc_participants',lang('Participants'));
+			$GLOBALS['phpgw']->template->set_var('cc_empty',lang('Empty'));
+			/* End Messages */
+			
+			$GLOBALS['phpgw']->template->set_var('cc_results',lang('Results'));
+			$GLOBALS['phpgw']->template->set_var('cc_is_my',lang('Is My'));
+			$GLOBALS['phpgw']->template->set_var('cc_ie_personal',lang('Import/Export pesonal contacts'));
+			$GLOBALS['phpgw']->template->set_var('cc_btn_search',lang('Search'));
+			$GLOBALS['phpgw']->template->set_var('cc_add_relation',lang('Add Relation'));
+			$GLOBALS['phpgw']->template->set_var('cc_del_relation',lang('Remove Selected Relations'));			
+			$GLOBALS['phpgw']->template->set_var('cc_msg_group',lang('Group'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_contact_full',lang('Contact [Full]'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_contact_qa',lang('Contact [Quick Add]'));
+			$GLOBALS['phpgw']->template->set_var('cc_contact_title',lang('Contact Center').' - '.lang('Contacts'));
+			$GLOBALS['phpgw']->template->set_var('cc_window_views_title',lang('Contact Center').' - '.lang('Views'));
+			$GLOBALS['phpgw']->template->set_var('phpgw_img_dir', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/images');
+
+			$GLOBALS['phpgw']->template->set_var('cc_msg_import_contacts', lang('Import Contacts'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_export_contacts', lang('Export Contacts'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_expresso_info_csv', lang('The Expresso supports the contacts importation in the CSV file format.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_choose_file_type', lang('Select the file type'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_outlook_express', lang('Outlook Express'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_outlook2k', lang('Outlook 2000'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_expresso_default', lang('Expresso (default)'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_choose_contacts_file', lang('Select the file that contains the contacts to be imported:'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_close_win', lang('Close'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_close', lang('Close'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_ie_personal', lang('Import / Export personal Contacts'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_import_fail', lang('The importation has failed. Verify the file format.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_importing_contacts', lang('Importing Contacts...'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_import_finished', lang('The importation has finished.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_new', lang(' new'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_failure', lang(' failed'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_exists', lang(' were existent'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_show_more_info', lang('show more info'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_clean', lang('Clean'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_invalid_csv', lang('Select a valid CSV file to import your contacts'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_export_csv', lang('Select the format type that you want to export your contacts'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_automatic', lang('Automatic'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_export_error', lang('An error has occurred while the exportation.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_new_email', lang('New Email'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_main', lang('Main'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_alternative', lang('Alternative'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_select_email', lang('Select E-Mail'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_new_phone', lang('New Telephone'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_home', lang('Home'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_cellphone', lang('Cellphone'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_work', lang('Work'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_fax', lang('Fax'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_pager', lang('Pager'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_choose_phone', lang('Select the telephone'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_warn_firefox', lang('Warning: Too old version of Firefox'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_firefox_half1', lang('For this application work correctly</u>'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_firefox_half2', lang('it\'s necessary to update your Firefox Browser for a new version (version > 1.5) Install now clicking in the link bellow, or if you want to update it later'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_click_close', lang('click Close'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_install_now', lang('Install Now'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_install_new_firefox', lang('Install a new Firefox version'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_moz_thunderbird', lang('Export as Mozilla Thunderbird CSV.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_outlook_express_pt', lang('Export as Outlook Express (Portuguese) CSV.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_outlook_express_en', lang('Export as Outlook Express (English) CSV.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_outlook_2k_pt', lang('Export as Outlook 2000 (Portuguese) CSV.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_outlook_2k_en', lang('Export as Outlook 2000 (English) CSV.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_expresso_default_csv', lang('Export as Expresso (Default) CSV.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_copy_to_catalog', lang('Copy to personal catalog.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_add_contact_to_group', lang('You did not add any contact for this group.'));
+			$GLOBALS['phpgw']->template->set_var('cc_msg_fill_field_name', lang('Fill the field Full Name'));
+			
+			$GLOBALS['phpgw']->template->parse('out','index');
+			
+			$api = CreateObject('contactcenter.ui_api');
+			$main = $api->get_full_add();
+			$main .= $api->get_search_obj();
+			$main .= $api->get_quick_add_plugin();
+			$main .= $api->get_add_group();
+			$main .= $GLOBALS['phpgw']->template->get_var('out');
+
+			echo $main;
+		}
+
+		
+		/*!
+		
+			@function data_manager
+			@abstract Calls the right method and passes to it the right 
+				parameters
+			@author Raphael Derosso Pereira
+		
+		*/
+		function data_manager()
+		{
+			switch($_GET['method'])
+			{
+				/* Cards Methods */
+				case 'set_n_cards':
+					return $this->set_n_cards((int)$_GET['ncards']);
+					
+				case 'get_cards_data':					
+					$ids = false;
+					// To support ldap catalogs using accentuation
+					if ($_POST['letter'] == 'search' && isset($_POST['data']))
+					{
+						$ids = utf8_decode($this->search($_POST['data']));
+					}
+					
+					if(isset($_SESSION['ids']))
+						$ids = $_SESSION['ids'];
+					
+					return $this->get_cards_data($_POST['letter'], $_POST['page'], $ids);						
+				case 'get_cards_data_get':
+					return $this->get_cards_data($_GET['letter'], $_GET['page'], unserialize(str_replace('\\"','"',$_GET['ids'])));
+
+
+				case 'get_photo':
+					return $this->get_photo($_GET['id']);
+
+				case 'get_visible_all_ldap':
+					echo $this->get_visible_all_ldap();
+					return;
+					
+				/* Catalog Methods */
+				case 'set_catalog':
+					return $this->set_catalog($_GET['catalog']);
+					
+				case 'get_catalog_tree':
+					echo serialize($this->get_catalog_tree($_GET['level']));
+					return;
+
+				case 'get_actual_catalog':
+					echo serialize($this->get_actual_catalog());
+					return;
+
+				case 'get_catalog_participants_list':
+					echo serialize($this->get_catalog_participants_list($_POST['id']));
+					return;
+
+				case 'get_catalog_add_contact':
+					// To support ldap catalogs with accentuation
+					echo serialize($this->get_catalog_add_contact(utf8_decode($_POST['id'])));
+					return;
+					
+				/* Full Add Methods */
+				case 'get_full_data':
+					return $this->get_full_data($_GET['id']);
+				
+				case 'get_group':
+					return $this->get_group_data($_GET['id']);
+					
+				case 'get_contact_full_add_const':
+					return $this->get_contact_full_add_const();
+
+				case 'post_full_add':
+					return $this->post_full_add();
+
+				case 'post_photo':
+					return $this->post_photo((int) $_GET['id'] ? (int) $_GET['id'] : '_new_');
+
+				case 'get_states':
+					return $this->get_states($_GET['country']);
+					
+				case 'get_cities':
+					return $this->get_cities($_GET['country'], $_GET['state'] ? $_GET['state'] : null);
+					
+					
+				/* Other Methods */
+				case 'quick_add':															
+					return $this->quick_add($_POST['add']);
+				
+				case 'add_group':															
+					return $this->add_group($_POST['add']);
+									
+				case 'remove_entry':
+					return $this->remove_entry((int)$_GET['remove']);
+				
+				case 'remove_all_entries':
+					return $this->remove_all_entries();
+
+				case 'remove_group':
+					 					
+					return $this->remove_group((int)$_GET['remove']);					
+
+				case 'search':
+					$ids = false;
+					$ids = $this->search($_GET['data']);
+					return $this->get_cards_data('search', '1', $ids);
+
+				case 'email_win':
+					$GLOBALS['phpgw']->common->phpgw_header();
+					$api = CreateObject('contactcenter.ui_api');
+					$win = $api->get_email_win();
+					$win .= $api->get_quick_add_plugin();
+					$win .= '<input id="QAbutton" type="button" value="QuickAdd" />'
+						.'<br><input type="button" value="EmailWin" onclick="ccEmailWin.open()" />'
+						.'<script type="text/javascript">'
+						.'	ccQuickAdd.associateAsButton(Element("QAbutton"));'
+						.'</script>';
+					echo $win;
+					return;
+
+				/* Information Gathering */
+				case 'get_multiple_entries':
+					echo serialize($this->get_multiple_entries(str_replace('\\"','"',$_POST['data'])));
+					return;
+
+				case 'get_all_entries':
+					echo serialize($this->get_all_entries(str_replace('\\"','"',$_POST['data'])));
+					return;
+
+				case 'import_contacts':
+					return $this->import_contacts($_GET['typeImport']);
+
+				case 'export_contacts':
+					return $this->export_contacts($_POST['typeExport']);
+
+			}
+		}
+
+		/*!
+		
+			@function set_n_cards
+			@abstract Informs the class the number of cards the page can show
+			@author Raphael Derosso Pereira
+			
+			@param integer $n_cards The number of cards
+			
+		*/
+		function set_n_cards($n_cards)
+		{
+			if (is_int($n_cards))
+			{
+				$this->page_info['n_cards'] = $n_cards;
+				echo 1;
+			}
+			
+			$this->save_session();
+		}
+				
+		/*!
+		
+			@function set_catalog
+			@abstract Sets the current catalog selected by the user
+			@author Raphael Derosso Pereira
+			
+			@param string $id_catalog The sequence of IDs to reach the catalog
+				separated by commas
+		
+		*/
+		function set_catalog($id_catalog)
+		{
+			$id_catalog = str_replace('\\"', '"', $id_catalog);
+			$temp =& $this->bo->set_catalog($id_catalog);
+			
+			if ($temp)
+			{
+				$this->page_info['changed'] = true;
+				$this->page_info['actual_entries'] = false;
+				$this->page_info['actual_catalog'] =& $temp;
+				$this->save_session();
+				
+				$catalog_info = $this->bo->get_branch_by_level($this->bo->catalog_level[0]);
+				
+				if ($catalog_info['class'] === 'bo_global_ldap_catalog' ||
+				    $catalog_info['class'] === 'bo_catalog_group_catalog')
+				{
+					$perms = 1;
+				}
+				else
+				{
+					$perms = 15;
+				}
+				
+				echo serialize(array(
+					'status' => 'ok',
+					'perms'  => $perms
+				));
+
+				return;
+			}
+			
+			echo serialize(array(
+				'status' => 'ok',
+				'perms'  => 0
+			));
+		}
+		
+		
+		/*!
+		
+			@function get_catalog_tree
+			@abstract Returns the JS serialized array to used as the tree
+				level
+			@author Raphael Derosso Pereira
+            @author Mário César Kolling (error messages and timeout)
+			
+			@param (string) $level The level to be taken 
+		
+		*/
+		function get_catalog_tree($level)
+		{
+			if ($level === '0')
+			{
+				$folderImageDir = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/dftree/images/';
+
+				$parent = '0';
+				
+				if (!($tree = $this->bo->get_catalog_tree($level)))
+				{
+					return array(
+						'msg'    => lang('Couldn\'t get the Catalogue Tree. Please contact the Administrator.'),
+						'status' => 'fatal'
+					);
+				}
+			}
+			else
+			{
+				$last_dot = strrpos($level,'.');
+				$parent = substr($level, 0, $last_dot);
+				$child = substr($level, $last_dot+1, strlen($level));
+			
+				if (!($tree[$child] = $this->bo->get_catalog_tree($level)))
+				{
+					return array(
+						'msg'    => lang('Couldn\'t get the Catalogue Tree. Please contact the Administrator.'),
+						'status' => 'fatal'
+					);
+				}
+				// Deals with timeout and returns the generated message to the browser
+				else if (!empty($tree[$child]['timeout']) && !empty($tree[$child]['msg']))
+				{
+					$tmp = array(
+						'msg'    => $tree[$child]['msg'],
+						'status' => 'fatal'
+					);
+					unset($tree[$child]);
+					return $tmp;
+				}
+			}
+			
+			$folderImageDir = $GLOBALS['phpgw']->common->image('contactcenter','globalcatalog-mini.png');
+			$folderImageDir = substr($folderImageDir, 0, strpos($folderImageDir, 'globalcatalog-mini.png'));
+			
+			// Deals with error messages from the server and returns them to the browser
+			if ($tree['msg'])
+			{
+				$msg = $tree['msg'];
+				unset($tree['msg']);
+			}
+
+			$tree_js = $this->convert_tree($tree, $folderImageDir, $parent);
+
+			// Return status = ok, or else return generated message to the browser
+			if (!$msg)
+			{
+				return array(
+					'data' => $tree_js,
+					'msg'  => lang('Catalog Tree Successfully taken!'),
+					'status' => 'ok'
+				);
+			}
+			else
+			{
+				return array(
+					'data' => $tree_js,
+					'msg'  => $msg,
+					'status' => 'error'
+				);
+			}
+		}
+		
+		/*!
+		
+			@function get_actual_catalog
+			@abstract Returns the actual selected Catalog
+			@author Raphael Derosso Pereira
+
+		*/
+		function get_actual_catalog()
+		{			
+			$level = $this->bo->get_level_by_branch($this->bo->get_actual_catalog(), $this->bo->tree['branches'], '0');
+			
+			if ($level)
+			{
+				return array(
+					'status' => 'ok',
+					'data'   => $level
+				);
+			}
+
+			return array(
+				'status' => 'fatal',
+				'msg'    => lang('Couldn\'t get the actual catalog.'),
+			);
+		}
+		
+		/*!
+		
+			@function get_cards_data
+			@abstract Returns the information that is placed on the cards
+			@author Raphael Derosso Pereira
+			
+			@param string $letter The first letter to be searched
+			@param (int)  $page The page to be taken 
+			@param (str)  $ids The ids to be taken in case of search
+
+			TODO: This function is not well done. It must be rewritten
+				using the new array 'msg','status','data' schema.
+		*/
+		function get_cards_data($letter, $page, $ids)
+		{
+			if( $ids )
+				$_SESSION['ids'] = $ids;		   
+
+			// It's an external catalog?
+			$external = $this->bo->is_external($this->page_info['actual_catalog']);
+			//echo $page."\n";
+			if ($letter !== 'search' and ($letter != $this->page_info['actual_letter'] or
+			    ($letter == $this->page_info['actual_letter'] and $page == $this->page_info['actual_page']) or 
+			    $this->page_info['changed']))
+			{
+				unset($ids);
+				$this->page_info['changed'] = false;
+				 
+				switch ($this->page_info['actual_catalog']['class'])
+				{
+					case 'bo_people_catalog':
+						$field_name = 'id_contact';
+
+						if ($letter !== 'number')
+						{
+							$find_restric[0] = array(
+								0 => array(
+									'field' => 'contact.names_ordered',
+									'type'  => 'iLIKE',
+									'value' => $letter !== 'all' ? $letter.'%' : '%'
+								),
+								1 => array(
+									'field' => 'contact.id_owner',
+									'type'  => '=',
+									'value' => $GLOBALS['phpgw_info']['user']['account_id']
+								)
+							);
+						}
+						else
+						{
+							$find_restric[0] = array(
+								0 => array(
+									'type'  => 'branch',
+									'value' => 'OR',
+									'sub_branch' => array(
+										0 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '0%'
+										),
+										1 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '1%'
+										),
+										2 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '2%'
+										),
+										3 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '3%'
+										),
+										4 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '4%'
+										),
+										5 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '5%'
+										),
+										6 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '6%'
+										),
+										7 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '7%'
+										),
+										8 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '8%'
+										),
+										9 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '9%'
+										),
+									),
+								),
+								1 => array(
+									'field' => 'contact.id_owner',
+									'type'  => '=',
+									'value' => $GLOBALS['phpgw_info']['user']['account_id']
+								),
+							);
+						}
+						
+						$find_field[0] = array('contact.id_contact','contact.names_ordered');
+						
+						$find_other[0] = array(
+							//'offset' => (($page-1)*$this->page_info['n_cards']),
+							//'limit'  => $this->page_info['n_cards'],
+							'order'  => 'contact.names_ordered'
+						);
+						
+						break;
+					
+					case 'bo_global_ldap_catalog':
+					
+						$field_name = 'id_contact';
+
+						if ($letter !== 'number')
+						{
+							$find_restric[0] = array(
+								0 => array(
+									'field' => 'contact.names_ordered',
+									'type'  => 'iLIKE',
+									'value' => $letter !== 'all' ? $letter.'%' : '%'
+								),
+								/*
+								 * Restrict the returned contacts in a "first letter" search
+								 * to objectClass = phpgwAccount, must have attibute phpgwAccountStatus,
+								 * phpgwAccountVisible != -1 and objectClass = inetOrgPerson
+								 */
+								1 => array(
+									'field' => 'contact.object_class',
+									'type'  => '=',
+									'value' => 'phpgwAccount'
+								),
+								2 => array(
+									'field' => 'contact.account_status',
+									'type'  => 'iLIKE',
+									'value' => '%'
+								),
+								3 => array(
+									'field' => 'contact.account_visible',
+									'type'  => '!=',
+									'value' => '-1'
+								),
+								4 => array(
+									'field' => 'contact.object_class',
+									'type'  => '=',
+									'value' => 'inetOrgPerson'
+								),
+							);
+							// If not external catalog get only phpgwAccountType = u ou l
+							if (!$external)
+							{
+								$find_restric[0][5] =  array(
+										'type'  => 'branch',
+										'value' => 'OR',
+										'sub_branch' => array(
+											0 => array(
+											'field' => 'contact.account_type',
+											'type'  => '=',
+											'value' => 'u'
+											),
+											1 => array(
+											'field' => 'contact.account_type',
+											'type'  => '=',
+											'value' => 'l'
+											)
+										)
+								);
+							}
+						}
+						else
+						{
+							$find_restric[0] = array(
+								/*
+								 * Restrict the returned contacts in a "first number" search
+								 * to objectClass = phpgwAccount, must have attibute phpgwAccountStatus,
+								 * phpgwAccountVisible != -1 and objectClass = inetOrgPerson
+								 */
+								0 => array(
+									'field' => 'contact.object_class',
+									'type'  => '=',
+									'value' => 'phpgwAccount'
+								),
+								1 => array(
+									'field' => 'contact.account_status',
+									'type'  => 'iLIKE',
+									'value' => '%'
+								),
+								2 => array(
+									'field' => 'contact.account_visible',
+									'type'  => '!=',
+									'value' => '-1'
+								),
+								3 => array(
+									'field' => 'contact.object_class',
+									'type'  => '=',
+									'value' => 'inetOrgPerson'
+								),
+								4 => array(
+									'type'  => 'branch',
+									'value' => 'OR',
+									'sub_branch' => array(
+										0 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '0%'
+										),
+										1 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '1%'
+										),
+										2 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '2%'
+										),
+										3 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '3%'
+										),
+										4 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '4%'
+										),
+										5 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '5%'
+										),
+										6 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '6%'
+										),
+										7 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '7%'
+										),
+										8 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '8%'
+										),
+										9 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '9%'
+										),
+									),
+								),
+							);
+							// If not external catalog get only phpgwAccountType = u ou l
+							if (!$external)
+							{
+								$find_restric[0][5] =  array(
+									'type'  => 'branch',
+									'value' => 'OR',
+									'sub_branch' => array(
+										0 => array(
+										'field' => 'contact.account_type',
+										'type'  => '=',
+										'value' => 'u'
+										),
+										/*1 => array(
+										'field' => 'contact.account_type',
+										'type'  => '=',
+										'value' => 'g'
+										),*/
+										1 => array(
+										'field' => 'contact.account_type',
+										'type'  => '=',
+										'value' => 'l'
+										)
+									)
+								);
+							}
+						}
+
+						if (!$external)
+						{
+							// Get only this attributes: dn, cn, phpgwAccountType, objectClass, phpgwAccountStatus, phpghAccountVisible
+							// for non-external catalogs, used to restrict the attributes used in filters
+							$find_field[0] = array('contact.id_contact','contact.names_ordered','contact.account_type',
+								'contact.object_class','contact.account_status','contact.account_visible');
+						}
+						else
+						{
+							// Get only this attributes: dn, cn for external catalogs,
+							// used to restrict the attributes used in filters
+							$find_field[0] = array('contact.id_contact','contact.names_ordered');
+						}
+						
+						$find_other[0] = array(
+							//'offset' => (($page-1)*$this->page_info['n_cards']),
+							//'limit'  => $this->page_info['n_cards'],
+							'order'  => 'contact.names_ordered'
+						);
+						
+						break;
+					
+					case 'bo_company_manager':
+						$field_name = 'id_company';
+	
+						$find_field[0] = array('company.id_company','company.company_name');
+						
+						$find_other[0] = array(
+							//'offset' => (($page-1)*$this->page_info['n_cards']),
+							//'limit'  => $this->page_info['n_cards'],
+							'order'  => 'company.company_name'
+						);
+	
+						$find_restric[0] = array(
+							0 => array(
+								'field' => 'company.company_name',
+								'type'  => 'iLIKE',
+								'value' => $letter !== 'all' ? $letter.'%' : '%'
+							)
+						);
+							
+						break;
+
+					case 'bo_group_manager':
+					
+						$field_name = 'id_group';
+						
+						if ($letter !== 'number')	{
+							
+							$find_restric[0] = array(
+								0 => array(
+									'field' => 'group.title',
+									'type'  => 'iLIKE',
+									'value' => $letter !== 'all' ? $letter.'%' : '%'
+								)
+							);
+						}
+						 else {
+							
+							$find_restric[0] = array(
+								0 => array(
+											'field' => 'group.title',
+											'type'  => 'LIKE',
+											'value' => '0%'										
+								)
+							);						
+						}
+						
+						array_push($find_restric[0],  array(
+											'field' => 'group.owner',
+											'type'  => '=',
+											'value' => $GLOBALS['phpgw_info']['user']['account_id']										
+								)
+						);
+						
+						$find_field[0] = array('group.id_group','group.title','group.short_name');						
+						$find_other[0] = array(
+							'order'  => 'group.title'
+						);
+						
+						break;
+						
+					case 'bo_catalog_group_catalog':
+						$this->page_info['actual_entries'] = false;
+						
+						$this->page_info['actual_letter'] = $letter;
+						$this->page_info['actual_page'] = 0;
+						
+						$this->save_session();
+						$final[0] = 0;
+						$final[1] = $this->typeContact;
+						echo serialize($final);						
+						return;
+
+				}
+				
+				$result = $this->bo->find($find_field[0],$find_restric[0],$find_other[0]);
+				$n_entries = count($result);
+				
+				if ($n_entries)
+				{
+					//echo 'N_entries: '.$n_entries.'<br>';
+					$this->page_info['n_pages'] = ceil($n_entries/($this->page_info['n_cards'] ? $this->page_info['n_cards'] : 1));
+				}
+				else
+				{
+					$this->page_info['n_pages'] = 0;
+				}
+
+				if (!$result)
+				{
+					$this->page_info['actual_entries'] = false;
+					
+					$this->page_info['actual_letter'] = $letter;
+					$this->page_info['actual_page'] = 0;
+					
+					$this->save_session();				
+					$final[0] = 0;
+					$final[1] = $this->typeContact;
+					echo serialize($final);											
+					return;
+				}
+				else
+				{
+					unset($this->page_info['actual_entries']);
+					foreach ($result as $id => $value)
+					{
+						$this->page_info['actual_entries'][] = $value[$field_name];
+					} 
+					//print_r($this->page_info['actual_entries']);
+				}
+			}
+			else if ($letter === 'search')
+			{
+				//if (!$ids and $this->page_info['actual_letter'] !== 'search')
+				if (!$ids)
+				{
+					error_log('!$ids e $this->page_info[\'actual_letter\'] != search');
+					$this->page_info['actual_entries'] = false;
+					
+					$this->page_info['actual_letter'] = $letter;
+					$this->page_info['actual_page'] = 0;
+					
+					$this->save_session();
+					$final[0] = 0;
+					$final[1] = $this -> typeContact;
+					echo serialize($final);					
+					return;
+				}
+				else if ($ids['error'])
+				{
+					$this->page_info['actual_entries'] = false;
+					$this->page_info['actual_letter'] = $letter;
+					$this->page_info['actual_page'] = 0;
+
+					$this->save_session();
+					$final[0] = 0;
+					$final[1] = $this -> typeContact;
+					$final['error'] = $ids['error'];
+					echo serialize($final);
+					return;
+				}
+				else if ($ids)
+				{				
+					$this->page_info['actual_letter']  = $letter;
+					$this->page_info['actual_entries'] = $ids;
+					$this->page_info['n_pages'] = ceil(count($ids)/($this->page_info['n_cards'] ? $this->page_info['n_cards'] : 1));
+				}
+			}
+			else
+			{
+				unset($ids);
+			}
+
+			if ($this->page_info['actual_entries'])
+			{
+				if ($page >= $this->page_info['n_pages'])
+				{
+					$page = $this->page_info['n_pages'];
+				}
+				
+				$final = array(
+					0 => (int)$this->page_info['n_pages'],
+					1 => (int)$page,
+					2 => array(
+						0 => 'cc_company',
+						1 => 'cc_name',
+						2 => 'cc_title',
+						3 => 'cc_phone',
+						4 => 'cc_mail',
+						5 => 'cc_alias',
+						6 => 'cc_id',
+						7 => 'cc_forwarding_address'
+					)
+				);
+				
+				//echo 'Page: '.$page.'<br>';
+				$id_i = (($page-1)*$this->page_info['n_cards']);
+				$id_f = $id_i + $this->page_info['n_cards'];
+				$n_entries = count($this->page_info['actual_entries']);
+				
+				//echo 'ID_I: '.$id_i.'<br>';
+				//echo 'ID_F: '.$id_f.'<br>';
+				///---------------- Correção Temporária PHP5 -----------------------///
+				$ids = array();
+				$array_temp = array();			
+								
+				foreach($this->page_info['actual_entries'] as $key=>$tmp){
+					$array_temp[] = $tmp;				
+				}	
+				
+				for($i = $id_i; $i < $id_f and $i < $n_entries; $i++)
+				{
+					$ids[] = $array_temp[$i];
+				}
+				
+				/// Original
+				//for($i = $id_i; $i < $id_f and $i < $n_entries; $i++)
+				//{
+				//	$ids[] = $this->page_info['actual_entries'][$i];
+				//}
+				///
+				
+				$fields = $this->bo->catalog->get_fields(false);
+
+				if( $this->typeContact == 'groups') {
+					$final = array(
+						0 => (int)$this->page_info['n_pages'],
+						1 => (int)$page,
+						2 => array(
+							0 => 'cc_title',
+							1 => 'cc_short_name',
+							2 => 'cc_id',
+							3 => 'cc_contacts'
+						)						
+					);					
+					
+					$groups =& $this->bo->catalog->get_multiple_entries($ids,$fields);
+					
+					$i = 0;
+					// contatos do grupo
+					$boGroups = CreateObject('contactcenter.bo_group');					
+					$contacts = array();
+					foreach($groups as $group)		{
+										
+						$final[3][$i][0] = $group['title'] ? $group['title'] : 'none';
+						$final[3][$i][1] = $group['short_name'] ? $group['short_name'] : 'none';						
+						$final[3][$i][2] = $group['id_group'] ? $group['id_group'] : 'none';
+						$contacts = $boGroups -> get_contacts_by_group($group['id_group']);
+						$final[3][$i][3] = $contacts;
+						$i++;							
+					}
+					
+					$this->page_info['actual_letter'] = $letter;
+					$this->page_info['actual_page'] = $page;					
+					
+					
+					$lnk_compose = "location.href=('../expressoMail1_2/index.php?to=";
+					
+					$final[5] = '<span class="link"  onclick="'.$lnk_compose;
+					$final[10] = 'groups';																												
+					$this->save_session();					
+					echo serialize($final);
+					return;					
+				}
+				
+				$fields['photo'] = true;
+				$fields['names_ordered'] = true;
+				$fields['alias'] = true;
+				$fields['account_type'] = true;
+				$fields['companies'] = 'default';
+				$fields['connections'] = 'default';
+				// ?aqui alterar a chamada desse método para receber o base dn?
+				$contacts = &$this->bo->catalog->get_multiple_entries($ids,$fields);
+				
+				
+				if (!is_array($contacts) or !count($contacts))
+				{
+					$final[0] = 0;
+					$final[1] = $this -> typeContact;
+					echo serialize($final);
+					return;
+				}
+				
+				$i = 0;
+				foreach($contacts as $index => $contact)
+				{
+					/*
+					 * TODO: Os timeouts de conexão foram retirados, ver se será necessário retornar essa funcionalidade, e,
+					 * neste caso, terminar a implementação das mensagens de retorno.
+					 */
+					if ($index !== 'error'){
+						$final[3][$i][0] = $contact['companies']['company1']['company_name']?$contact['companies']['company1']['company_name']:'none';
+						$final[3][$i][1] = $contact['names_ordered'] ? $contact['names_ordered'] : 'none';
+						$final[3][$i][2] = $contact['companies']['company1']['title']?$contact['companies']['company1']['title']:'none';
+
+						/* Select the correct Email and Telephone to be shown */
+						$preferences = ExecMethod('contactcenter.ui_preferences.get_preferences');
+						
+						if (!is_array($preferences))
+						{
+							$preferences['personCardEmail'] = 1;
+							$preferences['personCardPhone'] = 2;
+						}
+						if ($contact['connections'])
+						{
+							$default_email_found = false;
+							$default_phone_found = false;
+							foreach($contact['connections'] as $conn_info)
+							{
+								if ($conn_info['id_type'] == $preferences['personCardEmail'] and !$default_email_found)
+								{
+									if ($conn_info['connection_is_default'])
+									{
+										$default_email_found = true;
+									}
+									$final[3][$i][4] = $conn_info['connection_value'] ? $conn_info['connection_value'] : 'none';
+								}
+								else if ($conn_info['id_type'] == $preferences['personCardPhone'] and !$default_phone_found)
+								{
+									if ($conn_info['connection_is_default'])
+									{
+										$default_phone_found = true;
+									}
+									if (!($_SESSION['phpgw_info']['user']['preferences']['contactcenter']['telephone_number'] == $conn_info['connection_value']) && $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['voip_enabled'] && $conn_info['connection_value'] && preg_match('/^\([0-9]{2}\)[0-9]{4}\-[0-9]{4}$/',$conn_info['connection_value'])==1 && !$external){
+										$conn_info['connection_value'] = "<a title=\"".lang("Call Extension")."\" href=\"#\" onclick=\"connectVoip('".$conn_info['connection_value']."', 'com')\">".$conn_info['connection_value']."</a>";
+									}
+									$final[3][$i][3] = $conn_info['connection_value'] ? $conn_info['connection_value'] : 'none';
+								}
+							}
+						}
+						
+						if (!$final[3][$i][3])
+						{
+							$final[3][$i][3] = 'none';
+						}
+
+						if (!$final[3][$i][4])
+						{
+							$final[3][$i][4] = 'none';
+						}
+
+						$final[3][$i][5] = $contact['alias']?$contact['alias']:'none';
+						$final[3][$i][6] = $ids[$i];
+
+					//	If contact is a public list, then load the forwarding addresses.
+						if($contact['account_type'][0] == 'l')
+							$final[3][$i][7] = array();
+
+						$final[4][$i] = $contact['photo'] ? 1  : 0;
+						$i++;
+					}
+					else
+					{
+						// coloca mensagem de erro no vetor que retorna para o browser
+					}
+				}
+				$lnk_compose = "location.href=('../expressoMail1_2/index.php?to=";
+				$final[5] = '<span class="link" onclick="'.$lnk_compose;
+
+
+				$this->page_info['actual_letter'] = $letter;
+				$this->page_info['actual_page'] = $page;
+				
+				$this->save_session();				
+				echo serialize($final);
+				return;
+			}
+			
+			$this->page_info['actual_letter'] = $letter;
+			$this->page_info['actual_page'] = $page;
+			
+			$this->save_session();
+			
+			$final[0] = 0;
+			$final[1] = $this -> typeContact;
+			echo serialize($final);
+		}
+		
+		function get_visible_all_ldap()
+		{
+			$bo = CreateObject('contactcenter.bo_ldap_manager');
+			$ldap_query = $bo->srcs;
+			return $ldap_query[1]['visible'];	
+		}
+
+ 
+		/*!
+		
+			@function get_group_data
+			@abstract Returns all the information of a given Group
+			@author Nilton Emilio Buhrer Neto
+			
+			@param (integer) $id The id to get information
+		
+		*/		
+		function get_group_data($id)
+		{
+			$this->bo->catalog = CreateObject('contactcenter.bo_group_manager');
+			$fields = $this->bo->catalog->get_fields(true);
+			$data = $this->bo->catalog->get_single_entry($id,$fields);
+			
+			if($id) {			
+				// get All Contacts by group.
+				$data['contact_in_list'] = $this->bo->catalog->get_contacts_by_group($id);								
+			}
+			
+			$boGroup = CreateObject('contactcenter.bo_group');
+						
+			$all_contacts = $boGroup->get_all_contacts();
+			
+			$contact_options = "";
+			if(count($all_contacts)) {					
+				foreach($all_contacts as $idx => $contact) {				
+					$contact_options .= "<OPTION value='".$contact['id_connection']."'>".$contact['names_ordered']." (".$contact['connection_value'].")</OPTION>";
+				}
+			}
+			$data['contact_list'] = $contact_options;
+			$data['result'] = 'ok';								
+			echo serialize($data);			
+		}		
+		
+		/*!
+		
+			@function get_full_data
+			@abstract Returns all the information of a given Entry
+			@author Raphael Derosso Pereira
+			
+			@param (integer) $id The id to get information
+		
+		*/
+		function get_full_data($id)
+		{
+			$dateformat = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+			$this->bo->catalog = CreateObject('contactcenter.bo_people_catalog');		
+			$fields = $this->bo->catalog->get_fields(true);
+			$fields['photo'] = false;
+			$entry = $this->bo->catalog->get_single_entry($id,$fields);
+
+			if (is_bool($entry['given_names']))
+			{
+				$data['result'] = 'false';
+				echo serialize($data);
+				return;
+			}
+
+			$date = explode('-', $entry['birthdate']);
+			$j = 0;
+			for ($i = 0; $i < 5; $i+=2)
+			{
+				switch($dateformat{$i})
+				{
+					case 'Y':
+						$birthdate[$j] = $date[0];
+						break;
+
+					case 'm':
+					case 'M':
+						$birthdate[$j] = $date[1];
+						break;
+
+					case 'd':
+						$birthdate[$j] = $date[2];
+				}
+				$j++;
+			}
+			$datecount = 0;
+			
+			$data['result'] = 'ok';
+			$data['cc_full_add_contact_id'] = $id;
+
+			/* Personal Data */
+			$data['personal']['cc_pd_photo'] = '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_photo&id='.$id;
+			$data['personal']['cc_pd_alias'] = $entry['alias'];
+			$data['personal']['cc_pd_given_names'] = $entry['given_names'];
+			$data['personal']['cc_pd_family_names'] = $entry['family_names'];
+			$data['personal']['cc_pd_full_name'] = $entry['names_ordered'];
+			$data['personal']['cc_pd_suffix'] = $entry['id_suffix'];
+			$data['personal']['cc_pd_birthdate_0'] = $birthdate[0];
+			$data['personal']['cc_pd_birthdate_1'] = $birthdate[1];
+			$data['personal']['cc_pd_birthdate_2'] = $birthdate[2];
+			//$data['personal']['cc_pd_sex'] = $entry['sex'] === 'M' ? 1 : ($entry['sex'] === 'F' ? 2 : 0);
+			$data['personal']['cc_pd_prefix'] = $entry['id_prefix'];
+			$data['personal']['cc_pd_gpg_finger_print'] = $entry['pgp_key'];
+			$data['personal']['cc_pd_notes'] = $entry['notes'];
+
+			/* Addresses */
+			if (is_array($entry['addresses']))
+			{
+				$data['addresses'] = $entry['addresses'];
+			}
+
+			/* Connections */
+			if (is_array($entry['connections']))
+			{
+				$data['connections'] = array();
+				foreach ($entry['connections'] as $connection)
+				{
+					$type = $connection['id_type'];
+					$i = count($data['connections'][$type]);
+					$data['connections'][$type][$i]['id'] = $connection['id_connection'];
+					$data['connections'][$type][$i]['name'] = $connection['connection_name'];
+					$data['connections'][$type][$i]['value'] = $connection['connection_value'];
+					$data['connections'][$type][$i]['is_default'] = $connection['connection_is_default'];
+				}
+			}
+//			print_r($data);
+
+			/* Relations */
+			
+			echo serialize($data);
+		}
+
+		/*!
+
+			@function get_contact_full_add_const
+			@abstract Returns all the constant fields in Contact Full Add Window to the JS
+			@author Raphael Derosso Pereira
+		*/
+		function get_contact_full_add_const()
+		{
+			$data = array();
+			$boPeopleCatalog = CreateObject('contactcenter.bo_people_catalog');
+			$predata[] = $boPeopleCatalog -> get_all_prefixes();
+			$predata[] = $boPeopleCatalog -> get_all_suffixes();
+			$predata[] = $boPeopleCatalog -> get_all_addresses_types();
+			$predata[] = $boPeopleCatalog -> get_all_countries();
+			$predata[] = $boPeopleCatalog -> get_all_connections_types();
+			//$predata[] = $this->bo->catalog->get_all_relations_types();
+
+			$i = 0;
+			foreach($predata as $data_)
+			{
+				if ($data_)
+				{
+					$data[$i] = $data_;
+				}
+
+				$i++;
+			}
+
+			if (count($data))
+			{
+				echo serialize($data);
+				return;
+			}
+			
+			echo 0;
+		}
+		
+		/*!
+		
+			@function quick_add
+			@abstract Adds a new Contact using the Quick Add interface
+			@author Raphael Derosso Pereira
+			
+			@param string $sdata Serialized data
+		*/
+		function quick_add($sdata)
+		{
+			
+			$sdata = str_replace('\\"', '"', $sdata);
+			$new_array = unserialize($sdata);
+			$tdata = array();
+			
+			foreach($new_array as $tmp)
+				$tdata[] = $tmp;
+			
+			if (!$tdata)
+			{
+				echo serialize(array(
+					'msg'    => lang('Problems on adding your Contact. Invalid Data came from client. No Contact added!'),
+					'status' => 'abort'
+				));
+				
+				return;
+			}
+			
+			// verifica se email já existe!
+			$boGroup = CreateObject('contactcenter.bo_group');
+			$contact = $boGroup->verify_contact($tdata[4]);
+												
+			if($contact)
+			{							
+				$str_contact = "\r\n - ".implode("\r\n - ",$contact);
+				
+				echo serialize(array(
+					'msg'    => lang('Problems on adding your Contact. The email "%1" already exists in: %2',$tdata[4], $str_contact),
+					'status' => 'alreadyExists'
+				));
+				
+				return;			
+			}
+
+			$data['alias'] = $tdata[0];
+			$data['given_names'] = $tdata[1];
+			$data['family_names'] = $tdata[2];
+//			$data['connections']['default_phone']['id_typeof_connection'] = 1;
+			$data['connections']['default_phone']['connection_name'] = lang('Main');
+			$data['connections']['default_phone']['connection_value'] = $tdata[3];
+//			$data['connections']['default_email']['id_typeof_connection'] = 2;
+			$data['connections']['default_email']['connection_name'] = lang('Main');
+			$data['connections']['default_email']['connection_value'] = $tdata[4];
+
+			$boPeople = CreateObject('contactcenter.bo_people_catalog');
+
+			if ($boPeople ->quick_add($data))
+			{				
+				$this->page_info['changed'] = true;
+				
+				echo serialize(array(
+					'msg'    => lang('Entry added with success!'),
+					'status' => 'ok'
+				));
+			}
+			else
+			{
+				echo serialize(array(
+					'msg'    => lang('Problems on adding your Contact. No Contact added!'),
+					'status' => 'error'
+				));
+			}
+
+			$this->save_session();	
+			
+		}
+
+		/*!
+		
+			@function add_group
+			@abstract Adds a new Group using the Add Group interface
+			@author Nilton Emilio Buhrer Neto
+			
+			@param string $sdata Serialized data
+		*/
+		function add_group($sdata)
+		{
+			$sdata = str_replace('\\"', '"', $sdata);
+			$tdata = unserialize($sdata);
+			$new_tdata = array();
+			
+			if (!$tdata)
+			{
+				echo serialize(array(
+					'msg'    => lang('Problems on adding your Contact. Invalid Data came from client. No Contact added!'),
+					'status' => 'abort'
+				));
+				
+				return;
+			}
+			
+			foreach($tdata as $tmp)
+				$new_tdata[] = $tmp;
+			
+			$data['title'] = $new_tdata[0];			
+			$data['contact_in_list'] = $new_tdata[1];
+			$data['id_group'] = $new_tdata[2];
+						
+			$boGroup = CreateObject('contactcenter.bo_group_manager');
+			$id = $boGroup -> add_group($data);
+			
+			if ($id)
+			{
+				$this->page_info['changed'] = true;
+				
+				echo serialize(array(
+					'msg'    => lang('Entry added with success!'),
+					'status' => 'ok'
+				));
+			}
+			else
+			{
+				echo serialize(array(
+					'msg'    => lang('Problems on adding your Contact. No Contact added!'),
+					'status' => 'error'
+				));
+			}
+
+			$this->save_session();
+		}
+
+		/*!
+		
+			@function remove_group
+			@abstract Removes a group if the user has the right to do it
+			@author Nilton Emilio Buhrer Neto			
+			@param (integer) $id The id to be removed
+				
+		*/
+		function remove_group($id)
+		{				
+				$soGroup = CreateObject('contactcenter.so_group');				
+				$data = array ('id_group' => $id);
+				if($soGroup -> delete($data)) {
+					echo serialize(array(
+						'msg'    => lang('Removed Entry ID '.$id.'!'),
+						'status' => 'ok'
+					));							
+				}
+				else {
+					echo serialize(array(
+						'msg'    => lang('Problems on adding your Contact. No Contact added!'),
+						'status' => 'error'
+					));
+				}
+
+			$this->save_session();				
+		}
+
+
+		function remove_all_entries (){
+		
+			$error = false;
+			$this->all_entries = $this->bo->catalog->get_all_entries_ids();
+
+			foreach($this->all_entries as $index => $id) {
+				$result = $this->bo->catalog->remove_single_entry($id);
+				if(!$result) {
+					$error = true;
+					break;		
+				}
+			}
+
+			if(!$error) {
+				echo serialize(array(
+					'msg'    => lang('Removed Entry ID '.$id.'!'),
+					'status' => 'ok'
+				));
+			} 
+			else {
+				echo serialize(array(
+					'msg'    => lang('Couldn\'t remove this entry. Inform the Site Admin!'),
+					'status' => 'fail'
+				));
+			}
+
+			$this->save_session();
+		}
+
+		/*!
+		
+			@function remove_entry
+			@abstract Removes an entry if the user has the right to do it
+			@author Raphael Derosso Pereira
+			
+			@param (integer) $id The id to be removed
+				
+		*/
+		function remove_entry ($id)
+		{
+			if (!is_int($id))
+			{
+				echo lang('Couldn\'t remove entry! Problem passing data to the server. Please inform admin!');
+				return;
+			}
+			
+			$this->page_info['changed'] = true;
+			$result = $this->bo->catalog->remove_single_entry($id);
+			
+			if ($result)
+			{
+				if ($pos = array_search($id, $this->page_info['actual_entries']))
+				{
+					unset($this->page_info['actual_entries'][$pos]);
+				}
+				
+				$temp = false;
+				reset($this->page_info['actual_entries']);
+				foreach($this->page_info['actual_entries'] as $t)
+				{
+					$temp[] = $t;
+				}
+				
+				$this->page_info['actual_entries'] = $temp;
+
+				echo serialize(array(
+					'msg'    => lang('Removed Entry ID '.$id.'!'),
+					'status' => 'ok'
+				));
+			}
+			else
+			{
+				echo serialize(array(
+					'msg'    => lang('Couldn\'t remove this entry. Inform the Site Admin!'),
+					'status' => 'fail'
+				));
+			}
+			
+			$this->save_session();
+		}
+
+		
+		/*!
+		
+			@function post_full_add
+			@abstract Saves all the information altered/entered in the Full Add
+				window
+			@author Raphael Derosso Pereira
+
+		*/
+		function post_full_add()
+		{
+			$data =  $_POST['data'];
+			// Exceptions!!! utf8 special chars. 
+			$data = preg_replace("/\%u2(\d+)(\d+)(\d+)/","-",$data);
+			$data = unserialize(str_replace('\\"', '"', $data));
+			$this -> bo -> catalog = CreateObject('contactcenter.bo_people_catalog');
+
+			if (!is_array($data))
+			{
+				echo serialize(array(
+					'msg' => lang('<p>Some problem receiving data from browser. This is probably a bug in ContactCenter<br>'.
+				                  'Please go to eGroupWare Bug Reporting page and report this bug.<br>'.
+						          'Sorry for the inconvenient!<br><br>'.
+						          '<b><i>ContactCenter Developer Team</i></b></p>'),
+					'status' => 'fatal'
+				));
+				return;
+			}
+//			print_r($data);
+//			echo '<br><br>';
+
+			$replacer = $data['commercialAnd'];
+			unset($data['commercialAnd']);
+			if (!is_string($replacer) or strpos($replacer, "'") or strpos($replacer, '"'))
+			{
+				echo serialize(array(
+					'msg' => lang('Invalid \'&\' replacer! This may be an attempt to bypass Security! Action aborted!'),
+					'status' => 'fatal'
+				));
+				
+				return;
+			}
+
+			if ($data['id_contact'])
+			{
+				$id = $data['id_contact'];
+				$id_photo = $id;
+				unset($data['id_contact']);
+			}
+			else
+			{
+				$id_photo = '_new_';
+			}
+			
+			/* 
+			 * Process Photo, if available 
+			 */
+			$sleep_count = 0;
+			$photo_ok = $GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter');
+			while($photo_ok[0]{0} !== 'o' and $photo_ok[1]{0} === 'y')
+			{
+				sleep(1);
+				$photo_ok = $GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter');
+				$sleep_count++;
+
+				if ($sleep_count > 35)
+				{
+					// TODO
+					return;
+				}
+			}
+			$GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter', array('wait', 'n'));
+			
+			if (isset($this->page_info['photos'][$id_photo]))
+			{
+				if (array_search($this->page_info['photos'][$id_photo]['status'], array('changed', 'sync')) === false)
+				{
+					echo serialize(array(
+						'msg' => $this->page_info['photos'][$id_photo]['msg'],
+						'status' => $this->page_info['photos'][$id_photo]['status']
+					));
+
+					return;
+				}
+
+				$data['photo'] = $this->page_info['photos'][$id_photo]['content'];
+				unset($this->page_info['photos'][$id_photo]);
+				$this->save_session();
+			}
+			
+			/*
+			 * Arrange Date so it gets inserted correctly
+			 */
+			 
+			$dateformat = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+		
+			$j = 0;
+			for ($i = 0; $i < 5; $i+=2)
+			{
+				switch($dateformat{$i})
+				{
+					case 'Y':
+						$date[$j]['size'] = 4;
+						$date[$j]['digit'] = 'Y';
+						break;
+
+					case 'm':
+					case 'M':
+						$date[$j]['size'] = 2;
+						$date[$j]['digit'] = 'M';
+						break;
+
+					case 'd':
+						$date[$j]['size'] = 2;
+						$date[$j]['digit'] = 'D';
+				}
+				$j++;
+			}
+			$datecount = 0;
+
+			/* Verify Data and performs insertion/update */
+			foreach($data as $field => $value)
+			{
+				if ($value == '' or is_null($value))
+				{
+					unset($data[$field]);
+					continue;
+				}
+				
+				switch($field)
+				{
+					case 'alias':
+					case 'given_names':
+					case 'family_names':
+					case 'names_ordered':
+					case 'pgp_key':
+					case 'notes':
+					case 'photo':
+						/* Do Nothing. This is just to make sure no invalid field is passed */
+						break;
+					
+					case 'id_status':
+					case 'id_prefix':
+					case 'id_suffix':
+						if ($data[$field] == 0)
+						{
+							unset($data[$field]);
+						}
+						break;
+					
+					case 'birthdate_0':
+					case 'birthdate_1':
+					case 'birthdate_2':
+					
+						switch($date[$datecount]['digit'])
+						{
+							case 'Y':
+								$date['value'][2] = (int) $data[$field];
+								break;
+
+							case 'M':
+								$date['value'][0] = (int) $data[$field];
+								break;
+
+							case 'D':
+								$date['value'][1] = (int) $data[$field];
+								break;
+						}
+						unset($data[$field]);
+						$datecount++;
+
+						if ($datecount != 3)
+						{
+							break;
+						}
+						
+						if (!checkdate($date['value'][0], $date['value'][1], $date['value'][2]))
+						{
+							echo serialize(array(
+								'msg' => lang('Invalid Date'),
+								'status' => 'invalid_data'
+							));
+							return;
+						}
+						
+						$data['birthdate'] = $date['value'][2].'-'.$date['value'][0].'-'.$date['value'][1];
+						break;
+
+					case 'sex':
+						if ($data[$field] !== 'M' and $data[$field] !== 'F')
+						{
+							echo serialize(array(
+								'msg' => lang('Invalid Sex'),
+								'status' => 'invalid_data'
+							));
+							return;
+						}
+						break;
+
+
+					case 'addresses':
+						/* Insert new cities/states */
+						if (isset($value['new_states']))
+						{
+							foreach($value['new_states'] as $type => $state_info)
+							{
+								$index = 'address'.$type;
+								
+								$id_state = $this->bo->catalog->add_state($state_info);
+								$data['addresses'][$index]['id_state'] = $id_state;
+
+								if ($value['new_cities'][$type])
+								{
+									$value['new_cities'][$type]['id_state'] = $id_state;
+								}
+							}
+
+							unset($data['addresses']['new_states']);
+						}
+
+						if (isset($value['new_cities']))
+						{
+							foreach($value['new_cities'] as $type => $city_info)
+							{
+								$index = 'address'.$type;
+								
+								$id_city = $this->bo->catalog->add_city($city_info);
+								$data['addresses'][$index]['id_city'] = $id_city;
+							}
+
+							unset($data['addresses']['new_cities']);
+						}
+
+					break;
+
+					case 'connections':
+						/* Does nothing... */
+						break;
+
+					default:
+						echo serialize(array(
+							'msg' => lang('Invalid field: ').$field,
+							'status' => 'invalid_data'
+						));
+						return;
+				}
+			}
+
+			$code = '$id = $this->bo->catalog->';
+
+			if (!is_null($id) and $id !== '')
+			{
+				$code .= $code.'update_single_info($id, $data);';
+				$result = array(
+					'msg' => lang('Updated Successfully!'),
+					'status' => 'ok'
+				);
+			}
+			else
+			{
+				$code .= 'add_single_entry($data);';
+				$result = array(
+					'msg' => lang('Entry Added Successfully!'),
+					'status' => 'ok'
+				);
+			}
+			
+			eval($code);
+
+			if (!($id))
+			{
+				$result = array(
+					'msg' => lang('Some problem occured when trying to insert/update contact information.<br>'.
+				                   'Report the problem to the Administrator.'),
+					'status' => 'fail'
+				);
+			}
+
+			echo serialize($result);
+		}
+
+		/*!
+		
+			@function post_photo
+			@abstract Wrapper to post a photo without reload a page.
+			@author Raphael Derosso Pereira
+
+		*/
+		function post_photo($id)
+		{
+			//print_r($_FILES);
+			$GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter', array('wait', 'y'));
+			
+			if (!is_array($_FILES) and is_array(!$_FILES['cc_pd_photo']))
+			{
+				$this->page_info['photos'][$id]['status'] = 'no_upload';
+				$this->page_info['photos'][$id]['msg'] = lang('No Photos uploaded to Server.');
+				
+				$this->save_session();
+				$GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter', array('ok', 'y'));
+				return;
+			}
+
+			if (!function_exists('imagecreate'))
+			{
+				$this->page_info['photos'][$id]['status'] = 'no_GD_lib';
+				$this->page_info['photos'][$id]['msg'] = lang('Cannot manipulate Image. No Image added. Please, if you want to use images, ask the Administrator to install GD library.');
+				
+				$this->save_session();
+				$GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter', array('ok', 'y'));
+				return;
+			}
+
+			// TODO: Get Max Size from preferences!
+			if ($_FILES['cc_pd_photo']['size'] > 1000000)
+			{
+				$this->page_info['photos'][$id]['status'] = 'too_large';
+				$this->page_info['photos'][$id]['msg'] = lang('Image too large! ContactCenter limits the image size to 1 Mb');
+
+				$this->save_session();
+				$GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter', array('ok', 'y'));
+				return;
+			}
+
+			if ($_FILES['cc_pd_photo']['error'])
+			{
+				$this->page_info['photos'][$id]['status'] = 'error';
+				$this->page_info['photos'][$id]['msg'] = lang('Some Error occured while processed the Image. Contact the Administrator. The error code was: ').$_FILES['cc_pd_photo']['error'];
+
+				$this->save_session();
+				$GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter', array('ok', 'y'));
+				return;
+			}
+			
+			switch($_FILES['cc_pd_photo']['type'])
+			{
+				case 'image/jpeg':
+				case 'image/pjpeg':
+					$src_img = imagecreatefromjpeg($_FILES['cc_pd_photo']['tmp_name']);
+					if ($src_img == '')
+					{
+						$bogus = true;
+					}
+					break;
+
+				case 'image/png':
+				case 'image/x-png':
+					$src_img = imagecreatefrompng($_FILES['cc_pd_photo']['tmp_name']);
+					if ($src_img == '')
+					{
+						$bogus = true;
+					}
+					break;
+
+				case 'image/gif':
+					$src_img = imagecreatefromgif($_FILES['cc_pd_photo']['tmp_name']);
+					if ($src_img == '')
+					{
+						$bogus = true;
+					}
+					break;
+
+				default:
+					
+					$this->page_info['photos'][$id]['status'] = 'invalid_image';
+					$this->page_info['photos'][$id]['msg'] = lang('The file must be an JPEG, PNG or GIF Image.');
+
+					$this->save_session();
+					$GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter', array('ok', 'y'));
+					return;
+			}
+
+			if ($bogus)
+			{
+					$this->page_info['photos'][$id]['status'] = 'invalid_file';
+					$this->page_info['photos'][$id]['msg'] = lang('Couldn\'t open Image. It may be corrupted or internal library doesn\'t support this format.');
+					
+					$this->save_session();
+					$GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter', array('ok', 'y'));
+					return;
+			}
+			
+			$img_size = getimagesize($_FILES['cc_pd_photo']['tmp_name']);
+			$dst_img = imagecreatetruecolor(60, 80);
+			
+			if (!imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, 60, 80, $img_size[0], $img_size[1]))
+			{
+				$this->page_info['photos'][$id]['status'] = 'invalid_file';
+				$this->page_info['photos'][$id]['msg'] = lang('Couldn\'t open Image. It may be corrupted or internal library doesn\'t support this format.');
+				
+				$this->save_session();
+				$GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter', array('ok', 'y'));
+				return;
+			}
+			
+			ob_start();
+			imagepng($dst_img);
+			$this->page_info['photos'][$id]['content'] = ob_get_contents();
+			ob_end_clean();
+
+			$this->page_info['photos'][$id]['status'] = 'changed';
+			$this->page_info['photos'][$id]['msg'] = lang('Photo Successfully Updated!');
+
+			$this->save_session();
+		
+			$GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter', array('ok', 'y'));
+
+			imagedestroy($src_img);
+			imagedestroy($dst_img);
+			echo 'ok';
+			return;
+		}
+
+
+		/*!
+
+			@function get_photo
+			@abstract Returns the photo to the browser
+			@author Raphael Derosso Pereira
+
+		*/
+		function get_photo($id)
+		{
+			$fields = $this->bo->catalog->get_fields(false);
+			$fields['photo'] = true;
+			
+			$contact = $this->bo->catalog->get_single_entry($id, $fields);
+
+			if (!$contact['photo'])
+			{
+				header('Content-type: image/png');
+				echo file_get_contents(PHPGW_INCLUDE_ROOT.'/contactcenter/templates/default/images/photo_celepar.png');
+				return;
+			}
+			
+			header('Content-type: image/jpeg');
+			$photo = imagecreatefromstring ($contact['photo']);
+			$width = imagesx($photo);
+			$height = imagesy($photo);
+			$twidth = 70;
+			$theight = 90;
+			$small_photo = imagecreatetruecolor ($twidth, $theight);
+			imagecopyresampled($small_photo, $photo, 0, 0, 0, 0,$twidth, $theight, $width, $height);
+			imagejpeg($small_photo,"",100);
+			return;
+		}
+		
+		/*!
+		
+			@function get_states
+			@abstract Echos a serialized array containing all the states for the given country
+			@author Raphael Derosso Pereira
+
+			@params $id_country The ID of the Country that contains the requested states
+
+		*/
+		function get_states($id_country)
+		{
+			$states = $this->bo->catalog->get_all_states($id_country);
+
+			if (!$states)
+			{
+				$result = array(
+					'msg'    => lang('No States found for this Country.'),
+					'status' => 'empty'
+				);
+
+				echo serialize($result);
+				return;
+			}
+			
+			$result = array(
+				'msg'    => lang('States Successfully retrieved!'),
+				'status' => 'ok'
+			);
+			
+			foreach ($states as $state_info)
+			{
+				$result['data'][$state_info['id_state']] = $state_info['name'];
+
+				if ($state_info['symbol'])
+				{
+					$result['data'][$state_info['id_state']] .= ', '.$state_info['symbol'];
+				}
+			}
+
+			echo serialize($result);
+		}
+
+		/*!
+
+			@function get_cities
+			@abstract Echos a serialized array containing all the cities of a given state
+			@author Raphael Derosso Pereira
+
+			@param $id_country The ID of the Country that has the specified Cities (in case the
+				Country doesn't have any States)
+			@param $id_state The ID of the State that has the Cities requested
+
+		*/
+		function get_cities($id_country, $id_state=false)
+		{
+			$cities = $this->bo->catalog->get_all_cities($id_country, $id_state);
+
+			if (!$cities)
+			{
+				$result = array(
+					'msg'    => lang('No Cities found for this State.'),
+					'status' => 'empty'
+				);
+
+				echo serialize($result);
+				return;
+			}
+			
+			$result = array(
+				'msg'    => lang('Cities Successfully retrieved!'),
+				'status' => 'ok'
+			);
+			
+			foreach ($cities as $city_info)
+			{
+				$result['data'][$city_info['id_city']] = $city_info['name'];
+			}
+			
+			echo serialize($result);
+		}
+
+
+		/*!
+		
+			@function search
+			@abstract Echos a serialized array containing the IDs
+				of the entries that matches the search argument
+			@author Raphael Derosso Pereira
+			@author Mário César Kolling (external catalogs)
+
+			@param string $str_data A serialized array with two informations:
+				$data = array(
+					'search_for' => (string),
+					'recursive'  => (boolean),
+				);
+
+		*/
+		// SERPRO
+		function search($str_data)
+		{
+			$data = unserialize($str_data);
+			// It's an external catalog?
+			$external = $this->bo->is_external($this->page_info['actual_catalog']);
+			
+            if (!is_array($data) || !$data['search_for'] || !is_array($data['fields']))
+            {
+                echo serialize(array(                                                                                                   
+                   'msg'    => lang('Invalid parameters'),                                                                             
+                    'status' => 'abort'
+                ));
+            
+                return array('error' => lang('Invalid parameters'));                                                                                                                 
+            }   
+
+            
+			/*
+			 * TODO: look into the database to discover the database's encoding and convert the search_for field accordingly
+			 */
+			// Support search parameters with accentuation
+			if ($this->page_info['actual_catalog']['class'] != 'bo_people_catalog' &&
+				$this->page_info['actual_catalog']['class'] != 'bo_group_manager')
+			{
+
+				$data['search_for'] = utf8_encode($data['search_for']);
+			}
+            
+            $rules  = array();                                                                                                          
+            
+            
+            if ($data['search_for'] === '*')                                                                                            
+            {
+                $rules = array(                                                                                                         
+                    0 => array(                                                                                                         
+                        'field' => $data['fields']['search'],                                                                           
+                        'type'  => 'LIKE',
+                        'value' => '%'
+                    )   
+                );  
+            }   
+            else                                                                                                                        
+            {
+                $names = explode(' ', $data['search_for']);                                                                             
+                
+                if (!is_array($names))                                                                                                  
+                {
+                    echo serialize(array(                                                                                               
+                        'msg'    => lang('Invalid Search Parameter'),                                                                   
+                        'status' => 'abort'
+                    ));
+ 
+                }
+
+				if (!$external && $this->page_info['actual_catalog']['class'] != 'bo_people_catalog' &&
+					$this->page_info['actual_catalog']['class'] != 'bo_group_manager')
+				{
+					/*
+					 * Restrict the returned contacts search to objectClass = phpgwAccount,
+					 * must have attibute phpgwAccountStatus, phpgwAccountVisible != -1 and
+					 * objectClass = inetOrgPerson
+					 */
+					$rules = array(
+						0 => array(
+							'field' => 'contact.object_class',
+							'type'  => '=',
+							'value' => 'phpgwAccount'
+						),
+						1 => array(
+							'field' => 'contact.account_status',
+							'type'  => 'iLIKE',
+							'value' => '%'
+						),
+						2 => array(
+							'field' => 'contact.account_visible',
+							'type'  => '!=',
+							'value' => '-1'
+						),
+						3 => array(
+							'field' => 'contact.object_class',
+							'type'  => '=',
+							'value' => 'inetOrgPerson'
+						)
+					);
+				}
+                
+                foreach ($names as $name)
+                {
+                    if ($name != '')
+                    {
+                        array_push($rules, array(
+                            'field' => $data['fields']['search'],
+                            'type'  => 'iLIKE',
+                            'value' => '%'.$name.'%'
+                        ));
+                    }
+                }
+            }
+
+			if ($external || $this->page_info['actual_catalog']['class'] == 'bo_people_catalog' ||
+				$this->page_info['actual_catalog']['class'] == 'bo_group_manager')
+			{
+				// Get only this attributes: dn, cn for external catalogs,
+				// used to restrict the attributes used in filters
+				$ids = $this->bo->find(array($data['fields']['id'], $data['fields']['search']), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'));
+			}
+			else
+			{
+				// Get only this attributes: dn, cn, phpgwAccountType, objectClass, phpgwAccountStatus, phpghAccountVisible
+				// for non-external catalogs, used to restrict the attributes used in filters
+				$ids = $this->bo->find(array(
+					$data['fields']['id'],
+					$data['fields']['search'],
+					'contact.object_class',
+					'contact.account_status',
+					'contact.account_visible'
+					), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'));
+			}
+
+            if (!is_array($ids) || !count($ids))
+            {
+				$this->last_search_ids = null;
+				$this->save_session();
+				return null;
+            }
+
+            $id_field = substr($data['fields']['id'], strrpos($data['fields']['id'], '.')+1);
+			
+            $ids_f = array();
+
+            foreach ($ids as $e_info)
+            {
+                $ids_f[] = $e_info[$id_field];
+            }
+
+			return $ids_f;
+		}
+		
+		// CELEPAR
+		/*
+        function search($str_data)
+        {
+            $data = unserialize($str_data);
+
+            if (!is_array($data) || !$data['search_for'] || !is_array($data['fields']))
+            {
+                echo serialize(array(
+                    'msg'    => lang('Invalid parameters'),
+                    'status' => 'abort'
+                ));
+
+                return;
+            }
+
+            $rules  = array();
+
+            if ($data['search_for'] === '*')
+            {
+                $rules = array(
+                    0 => array(
+                        'field' => $data['fields']['search'],
+                        'type'  => 'LIKE',
+                        'value' => '%'
+                    )
+                );
+            }
+            else
+            {
+                $names = explode(' ', $data['search_for']);
+
+                if (!is_array($names))
+                {
+                    echo serialize(array(
+                        'msg'    => lang('Invalid Search Parameter'),
+                        'status' => 'abort'
+                    ));
+                    
+                    return;
+                }
+                
+                foreach ($names as $name)
+                {
+                    if ($name != '')
+                    {
+                        array_push($rules, array(
+                            'field' => $data['fields']['search'],
+                            'type'  => 'iLIKE',
+                            'value' => '%'.$name.'%'
+                        ));
+                    }
+                }
+            }
+
+            
+            
+            //$catalog = $this->bo->get_branch_by_level($this->bo->catalog_level[0]);
+            
+            //if ($catalog['class'] === 'bo_people_catalog')
+            //{
+            //    array_push($rules, array(
+            //        'field' => 'contact.id_owner',
+            //        'type'  => '=',
+            //        'value' => $GLOBALS['phpgw_info']['user']['account_id']
+            //    ));
+            //}
+            
+            
+            $ids = $this->bo->find(array($data['fields']['id'], $data['fields']['search']), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'));
+
+            if (!is_array($ids) || !count($ids))
+            {
+                echo serialize(array(
+                    'msg'    => lang('No Entries Found!'),
+                    'status' => 'empty'
+                ));
+
+                return;
+            }
+            $id_field = substr($data['fields']['id'], strrpos($data['fields']['id'], '.')+1);
+
+            $ids_f = array();
+            foreach ($ids as $e_info)
+            {
+                $ids_f[] = $e_info[$id_field];
+            }
+
+            echo serialize(array(
+                'data'   => $ids_f,
+                'msg'    => lang('Found %1 Entries', count($ids)),
+                'status' => 'ok'
+            ));
+			
+			return;
+        }*/
+		/*!
+
+			@function get_multiple_entries
+			@abstract Returns an array containing the specifiend data in the default
+				CC UI format
+			@author Raphael Derosso Pereira
+
+			@param array str_data A serialized array containing the ID's of the entries 
+				to be taken, the fields to be taken and the rules to be used on the
+				retrieval:
+				$data = array(
+					'ids'    => array(...),
+					'fields' => array(...),
+					'rules'  => array(...)
+				);
+
+		*/
+		function get_multiple_entries($str_data)
+		{
+			$data = unserialize($str_data);
+			
+			if (!is_array($data) or !count($data) or !count($data['fields']) or !count($data['ids']))
+			{
+				return array(
+					'msg'    => lang('Invalid Parameters'),
+					'status' => 'abort'
+				);
+			}
+
+			$entries = $this->bo->catalog->get_multiple_entries($data['ids'], $data['fields']);
+			
+			if (!is_array($entries) or !count($entries))
+			{
+				return array(
+					'msg'    => lang('No Entries Found!'),
+					'status' => 'empty'
+				);
+			}
+
+			return array(
+				'msg'    => lang('Found %1 Entries!', count($entries)),
+				'status' => 'ok',
+				'data'   => $entries
+			);
+		}
+
+		/*
+
+			@function get_all_entries
+			@abstract Returns the specified fields for all catalog's entries 
+				in the default CC UI format
+			@author Raphael Derosso Pereira
+
+			@params array str_data A serialized array containing the fields to 
+				be grabbed, the maximum number of entries to be returned and a
+				boolean specifying if the calls refers to a new grab or to an
+				unfinished one.
+
+		*/
+		function get_all_entries($str_data)
+		{
+			$data = unserialize($str_data);
+			
+			if (!is_array($data) or 
+			    !count($data) or 
+				!count($data['fields']) or 
+				!$data['maxlength'] or
+				(!$data['new'] and !$data['offset']))
+			{
+				return array(
+					'msg'    => lang('Invalid Parameters'),
+					'status' => 'abort'
+				);
+			}
+
+			if ($data['new'])
+			{
+				$this->all_entries = $this->bo->catalog->get_all_entries_ids();
+
+				$this->save_session();
+
+				if (!is_array($this->all_entries) or !count($this->all_entries))
+				{
+					return array(
+						'msg'    => lang('No Entries Found!'),
+						'status' => 'empty'
+					);
+				}
+
+				$data['offset'] = 0;
+			}
+			
+			if ($data['maxlength'] != -1)
+			{
+				$result = $this->bo->catalog->get_multiple_entries(array_slice($this->all_entries, $data['offset'], $data['maxlength']), $data['fields']);
+			}
+			else
+			{
+				$result = $this->bo->catalog->get_multiple_entries($this->all_entries, $data['fields']);
+			}
+
+			$prefs = ExecMethod('contactcenter.ui_preferences.get_preferences');
+			
+			$jsCode = array();
+			$count = 0;
+			foreach ($result as $each)
+			{
+				if (!is_array($each))
+				{
+					continue;
+				}
+
+				if($this-> typeContact == 'groups') {				
+					
+					foreach ($each as $field => $value)	{
+										
+						if ($field === 'title')	{
+							$optionName = '\\"'.$value.'\\"';
+							 
+						}
+						else if ($field === 'short_name')	{
+							
+							$jsCode[] = '_this.entries.options[_this.entries.options.length] = new Option("'.$optionName.' ('.$value.')", "'.$count.'");';
+							$count++;																					
+						}					
+					}
+				}
+				
+				else  {	
+					foreach ($each as $field => $value)	{
+						if ($field === 'names_ordered')	{
+							 if(is_array($value))
+                             	$value = $value[0];
+							$name = '\\"'.$value.'\\"';
+						}
+						else if ($field === 'connections')	{
+							
+							foreach ($value as $connection)		{
+								if ($connection['id_type'] == $prefs['personCardEmail'])	{
+									$jsCode[] = '_this.entries.options[_this.entries.options.length] = new Option("'.$name.' <'.$connection['connection_value'].'>", "'.$count.'");';
+									$count++;
+								}
+							}
+						}
+					}
+				}
+			}
+
+			$jsCodeFinal = implode("\n", $jsCode);
+			
+			$nEntries = count($result);
+			
+			if (!$nEntries)
+			{
+				return array(
+					'msg'    => lang('Error while getting user information...'),
+					'status' => 'abort'
+				);
+			}
+
+			return array(
+				'msg'      => lang('Found %1 Entries!', $nEntries),
+				'status'   => 'ok',
+				'typeContact'   => $this -> typeContact,
+				'final'    => $nEntries + $data['offset'] < count($this->all_entries) ? false : true,
+				'offset'   => $data['offset'] + $nEntries,
+				'data'     => $jsCodeFinal
+			);
+		}
+		
+		/*********************************************************************\
+		 *                      Auxiliar Methods                             *
+		\*********************************************************************/
+
+		/*!
+		
+			@function save_session
+			@abstract Saves the data on the session
+			@author Raphael Derosso Pereira
+		
+		*/
+		function save_session()
+		{
+			$GLOBALS['phpgw']->session->appsession('ui_data.page_info','contactcenter',$this->page_info);
+			$GLOBALS['phpgw']->session->appsession('ui_data.all_entries','contactcenter',$this->all_entries);
+		}
+
+		/*!
+		
+			@function convert_tree
+			@abstract Converts the tree array in the BO format to a JS tree array compatible
+				with the one available in eGW
+			@author Raphael Derosso Pereira
+		
+			@param (array)  $tree    The tree in the BO format
+			@param (string) $name    The tree name
+			@param (string) $iconDir The dir where the icons are
+			@param (string) $parent  The parent
+		*/
+
+		function convert_tree($tree, &$iconDir, $parent='0')
+		{
+//			echo "Entrou<br>\tPai: $parent <br>";
+			$rtree = array();
+
+			if ($parent === '0')
+			{
+//				echo 'Root!<br>';
+				$rtree['0'] = array(
+					'type'       => 'catalog_group',
+					'id'         => '0',
+					'pid'        => 'none',
+					'caption'    => lang('Catalogues'),
+					'class'      => 'bo_catalog_group_catalog',
+					'class_args' => array('_ROOT_', '$this', '$this->get_branch_by_level($this->catalog_level[0])')
+				);
+			}
+
+			foreach($tree as $id => $value)
+			{
+//				echo 'ID: '.$id.'<br>';
+				$rtree[$parent.'.'.$id] = array(
+					'type'    => $value['type'],
+					'id'      => $parent.'.'.$id,
+					'pid'     => $parent,
+					'caption' => $value['name']
+				);
+				
+				switch($value['type'])
+				{
+					case 'catalog_group':
+					case 'mixed_catalog_group':
+						$rtree = $rtree + $this->convert_tree($value['sub_branch'],$iconDir,$parent.'.'.$id);
+						break;
+				}
+			}
+
+			if (count($rtree))
+			{
+				return $rtree;
+			}
+		}
+
+		function get_catalog_add_contact($id){
+
+			$array_participants = array();
+			if(!$this->bo->catalog->src_info) {
+				$ldap = CreateObject('contactcenter.bo_ldap_manager');
+				$this->bo->catalog->src_info = $ldap->srcs[1];
+			}
+			
+			$ds = $GLOBALS['phpgw']->common->ldapConnect($this->bo->catalog->src_info['host'], $this->bo->catalog->src_info['acc'], $this->bo->catalog->src_info['pw'], true);				
+			$dn=$this->bo->catalog->src_info['dn'];
+			$justThese = array("givenname","givenname","sn","telephonenumber","mail");
+			$sr = ldap_read($ds,$id, "objectClass=*",$justThese);							
+			$info = ldap_get_entries($ds, $sr);							
+			for($z = 0; $z < 5; $z++) {
+				$participant = $info[0][$justThese[$z]];													
+				array_push($array_participants, $participant);
+			}
+
+			ldap_close($ds);
+			echo serialize($array_participants);
+		}	
+		
+		function get_catalog_participants_list($id) 
+		{
+			
+			$fields = $this->bo->catalog->get_fields(false);			
+			$fields['names_ordered'] = true;
+			$fields['mail_forwarding_address'] = true;			
+			$contact = $this->bo->catalog->get_single_entry($id,$fields);			
+			
+			$array_participants = array();
+			$array_emails = array();
+			
+			$filter = null;
+			for($z = 0; $z < $contact['mail_forwarding_address']['count']; $z++) {			
+					if(strstr($contact['mail_forwarding_address'][$z],'@')) {
+						$filter.="(mail=".$contact['mail_forwarding_address'][$z].")";
+						$array_emails[$contact['mail_forwarding_address'][$z]] = "<font color=black>".$contact['mail_forwarding_address'][$z]."</font>";
+					}																
+					else 
+						$array_participants[$z] = "<font color=red>".$contact['mail_forwarding_address'][$z]."</font>";
+			}					
+			
+			if($filter) {
+				$filter = "(|".$filter.")";							
+				if(!$this->bo->catalog->src_info) {
+					$ldap = CreateObject('contactcenter.bo_ldap_manager');
+					$this->bo->catalog->src_info = $ldap->srcs[1];
+				}
+				$ds = $GLOBALS['phpgw']->common->ldapConnect($this->bo->catalog->src_info['host'], $this->bo->catalog->src_info['acc'], $this->bo->catalog->src_info['pw'], true);				
+				$dn=$this->bo->catalog->src_info['dn'];
+				$justThese = array("cn","mail");
+				$sr = ldap_search($ds,$dn, $filter,$justThese);								
+				$info = ldap_get_entries($ds, $sr);							
+				for($z = 0; $z < $info['count']; $z++) {
+					$participant =  '<font color=\'DARKBLUE\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;'.$info[$z]['cn'][0].'&quot; &lt;'.$info[$z]['mail'][0].'&gt;</font><br>';
+					$array_emails[$info[$z]['mail'][0]] = null; 								
+					array_push($array_participants, $participant);					
+				}
+				
+				foreach($array_emails as $index => $email)
+					if($email) 
+						array_push($array_participants, "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$email."<br>");				
+												
+				ldap_close($ds);
+			}
+			sort($array_participants);
+			$innerHTML = '';			
+			foreach($array_participants as $index => $participant){
+				$innerHTML .= $participant;
+			}
+			$return = array('size' => count($array_participants), 'names_ordered'=> $contact['names_ordered'], 'inner_html' => $innerHTML);			 
+			echo serialize($return);
+		}	
+		
+		function export_contacts($typeExport){
+
+			$boGroup = CreateObject('contactcenter.bo_group');
+			$contacts = $boGroup->get_all_contacts();
+			$streamBuffer = '';
+
+			if(!count($contacts))
+				echo null;
+			
+			switch($typeExport) {
+
+				case 'outlook_en':
+					$streamBuffer = "Name;E-mail Address;Notes;Mobile Phone;Pager;Company;".
+							"Job Title;Home Phone;Home Fax;Business Phone;Business Fax\r\n";							
+					foreach($contacts as $index => $object){
+						$streamBuffer.= $object['names_ordered'].";".$object['connection_value'].";;;;;;".$object['phone'].";;;\r\n";
+					}
+				break;
+				
+				case 'outlook_pt-BR':
+					$streamBuffer = "Nome;End. de email;Endereço residencial;".
+					"Cidade do endereço residencial;CEP do endereço residencial;".
+					"Estado;País/região do endereço residencial;Telefone residencial;".
+					"Rua do endereço comercial;Cidade do endereço comercial;".
+					"CEP do endereço comercial;Estado do endereço comercial;".
+					"País/região do endereço comercial;Telefone comercial;Empresa;Cargo\r\n";							
+					foreach($contacts as $index => $object){
+						$streamBuffer.= $object['names_ordered'].";".$object['connection_value'].";;;;;;".$object['phone'].";;;;;;;;\r\n";
+					}
+				break;
+				
+				case 'outlook2000_pt-BR':
+					$streamBuffer = "\"Tratamento\",\"Nome\",\"Segundo Nome\",\"Sobrenome\",\"Sufixo\",".
+					"\"Empresa\",\"Departamento\",\"Cargo\",\"Rua do endereço comercial\",\"Rua do endereço comercial 2\",".
+					"\"Rua do endereço comercial 3\",\"Cidade do endereço comercial\",\"Estado do endereço comercial\",".
+					"\"CEP do endereço comercial\",\"País do endereço comercial\",\"Endereço residencial\",\"Rua residencial 2\",".
+					"\"Rua residencial 3\",\"Cidade do endereço residencial\",\"Estado\",\"CEP do endereço residencial\",\"País do endereço residencial\",".
+					"\"Outro endereço\",\"Outro endereço 2\",\"Outro endereço 3\",\"Cidade\",\"Estado\",\"CEP\",\"País\",".
+					"\"Telefone do assistente\",\"Fax comercial\",\"Telefone comercial\",\"Telefone comercial 2\",\"Retorno de chamada\",".
+					"\"Telefone do carro\",\"Telefone principal da empresa\",\"Fax residencial\",\"Telefone residencial\",".
+					"\"Telefone residencial 2\",\"ISDN\",\"Telefone celular\",\"Outro fax\",\"Outro telefone\",\"Pager\",\"Telefone principal\",".
+					"\"Radiofone\",\"Telefone TTY/TDD\",\"Telex\",\"Aniversário\",\"Anotações\",\"Caixa postal\",\"Categorias\",".
+					"\"Código da empresa\",\"Código do governo\",\"Cônjuge\",\"Conta\",\"Endereço de correio eletrônico\",".
+					"\"Nome de exibição do correio eletr.\",\"Endereço de correio eletrônico 2\",".
+					"\"Nome de exibição do correio eletr.2\",\"Endereço de correio eletrônico 3\",".
+					"\"Nome de exibição do correio eletr.3\",\"Datas especiais\",\"Disponibilidade da Internet\",".
+					"\"Filhos\",\"Hobby\",\"Idioma\",\"Indicação\",\"Informações para cobrança\",\"Iniciais\",\"Local\",".
+					"\"Nome do assistente\",\"Nome do gerenciador\",\"Página da Web\",\"Palavras-chave\",\"Particular\",\"Personalizado 1\",\"Personalizado 2\",".
+					"\"Personalizado 3\",\"Personalizado 4\",\"Prioridade\",\"Profissão\",\"Quilometragem\",\"Sala\",\"Sensibilidade\",\"Servidor de diretório\",".
+					"\"Sexo\"\r\n";
+					foreach($contacts as $index => $object){
+						$streamBuffer.= ",\"".$object['names_ordered']."\",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,".$object['phone'].",,,,,,,,,,,,\"".$object['connection_value']."\",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r\n";
+					}
+				break;
+				
+				case 'outlook2000_en':
+					$streamBuffer = "Title,First Name,Middle Name,Last Name,Suffix,Company,Department,Job Title,".
+					"Business Street,Business Street 2,Business Street 3,Business City,Business State,Business Postal Code,".
+					"Business Country,Home Street,Home Street 2,Home Street 3,Home City,Home State,Home Postal Code,Home Country,".
+					"Other Street,Other Street 2,Other Street 3,Other City,Other State,Other Postal Code,Other Country,".
+					"Assistant's Phone,Business Fax,Business Phone,Business Phone 2,Callback,Car Phone,Company Main Phone,Home Fax,".
+					"Home Phone,Home Phone 2,ISDN,Mobile Phone,Other Fax,Other Phone,Pager,Primary Phone,Radio Phone,TTY/TDD Phone,Telex,".
+					"Account,Anniversary,Assistant's Name,Billing Information,Birthday,Categories,Children,Directory Server,E-mail Address,".
+					"E-mail Type,E-mail Display Name,E-mail 2 Address,E-mail 2 Type,E-mail 2 Display Name,E-mail 3 Address,E-mail 3 Type,E-mail 3 Display Name,".
+					"Gender,Government ID Number,Hobby,Initials,Internet Free Busy,Keywords,Language,Location,Manager's Name,Mileage,Notes,".
+					"Office Location,Organizational ID Number,PO Box,Priority,Private,Profession,Referred By,Sensitivity,Spouse,User 1,User 2,User 3,User 4,Web Page\r\n";
+					foreach($contacts as $index => $object){
+						$streamBuffer.= ",".$object['names_ordered'].",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,".$object['phone'].",,,,,,,,,,,,".$object['connection_value'].",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r\n";
+					}
+				break;
+					
+				case 'thunderbird':
+					$streamBuffer = "\n";							
+					foreach($contacts as $index => $object){
+						$streamBuffer.= ",,".$object['names_ordered'].",,".$object['connection_value'].",,".$object['phone'].",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r\n";
+					}
+				break;
+				
+				case 'expresso':
+					$streamBuffer = "Nome,Email,Telefone\r\n";
+					foreach($contacts as $index => $object){
+						$streamBuffer.= $object['names_ordered'].",".$object['connection_value'].",".$object['phone']."\r\n";
+					}
+				break;
+				
+			}
+
+			$file = "contacts_".md5(microtime()).".swp";
+			$tempDir = ini_get("session.save_path");
+			$f = fopen($tempDir.'/'.$file,"w");
+			if(!$f)
+				echo null;
+		
+			fputs($f,$streamBuffer);
+			fclose($f);
+
+			echo $tempDir.'/'.$file;
+		}
+
+		// Get the csv field and put into array, from php.net
+		function parse_line($input_text, $delimiter = ',', $text_qualifier = '"') {
+  			$text = trim($input_text);
+  			  if(is_string($delimiter) && is_string($text_qualifier)) {
+       			 $re_d = '\x' . dechex(ord($delimiter));            //format for regexp
+        		$re_tq = '\x' . dechex(ord($text_qualifier));    //format for regexp
+        		
+        		$fields = array();
+        		$field_num = 0;
+        		while(strlen($text) > 0) {
+            		if($text{0} == $text_qualifier) {
+                		preg_match('/^' . $re_tq . '((?:[^' . $re_tq . ']|(?<=\x5c)' . $re_tq . ')*)' . $re_tq . $re_d . '?(.*)$/', $text, $matches);
+		               
+        		        $value = str_replace('\\' . $text_qualifier, $text_qualifier, $matches[1]);
+             			$text = trim($matches[2]);
+               
+                		$fields[$field_num++] = $value;
+            		} else {
+                		preg_match('/^([^' . $re_d . ']*)' . $re_d . '?(.*)$/', $text, $matches);
+		               
+        		        $value = $matches[1];
+               			$text = trim($matches[2]);
+               
+              		  	$fields[$field_num++] = $value;
+            	}
+        	}
+        		return $fields;
+		    } else
+       			return false;
+		}
+
+		function import_contacts($typeImport){
+
+			if($file = $_SESSION['contactcenter']['importCSV']) {				
+				unset($_SESSION['contactcenter']['importCSV']);				
+				$len = filesize($file);
+				$count = 0;
+				$return = array('error' => false, '_new' => 0, '_existing' => 0, '_failure' => 0);
+   				$handle = @fopen($file, "r") or die(serialize($return['error'] = true));
+   				
+				$input_header = fgets($handle);
+				if ($typeImport == 'outlook')
+					$delim = ';';
+				else if ($typeImport == 'auto')
+				$delim = strstr($input_header,',') ? ',' : ';';
+				else  
+					$delim = ',';
+				$csv_header = $this->parse_line($input_header,$delim);
+				$firstContact = fgets($handle);
+				preg_match("/\"(.+)\"[,;]/sU",$firstContact,$matches); // yahoo csv
+   				rewind($handle);	   			
+
+   				$header = @fgetcsv($handle, $len, $delim) or die(serialize($return['error'] = true));
+   				if(count($header)  < 2 || count($header) > 100) {
+   					$return['error'] = true;
+   					$return['sizeheader'] = count($header);
+   					echo serialize($return);
+   					return;
+   				}
+   				
+   				if ($matches[0][strlen($matches[0])-1] == ';')
+					$delim = ';';
+   				
+			$boGroup = CreateObject('contactcenter.bo_group');
+			$boPeople = CreateObject('contactcenter.bo_people_catalog');
+				switch($typeImport){
+					case 'outlook2000':
+						$name_pos=1;
+						$email_pos=56;
+						$phone_pos=44;
+						break;
+					case 'outlook':
+						$name_pos=0;
+						$email_pos=1;
+						$phone_pos=7;
+						break;
+					case 'thunderbird':
+						$name_pos=2;
+						$email_pos=4;
+						$phone_pos=7;
+						break;
+					case 'expresso':
+						$name_pos=0;
+						$email_pos=1;
+						$phone_pos=2;
+						break;
+					default:
+						foreach($csv_header as $index => $fieldName)
+						{
+							switch($fieldName){
+							case 'Name':
+							case 'Nome':
+							case 'First Name':
+								$name_pos = $index;
+								break;
+							case 'E-mail':
+							case 'Email':
+							case 'E-mail Address':
+							case 'Endereço de correio eletrônico':
+							case 'End. de email':
+								$email_pos = $index;
+								break;
+							case 'Home Phone':
+							case 'Phone':
+							case 'Telefone':
+							case 'Telefone principal':
+							case 'Telefone comercial':
+								$phone_pos = $index;
+								break;
+							}
+						}	
+						break;
+				}
+				
+
+				while (($data = fgetcsv($handle, $len, $delim))) {
+       				foreach ($header as $key=>$heading)
+               			$row[$heading]=(isset($data[$key])) ? $data[$key] : '';
+       				
+					$sdata = array();
+					$full_name  = trim($row[$header[$name_pos]]);
+					$email		= trim($row[$header[$email_pos]]);
+					$phone		= trim($row[$header[$phone_pos]]);
+					$array_name = explode(' ', str_replace('"','',(str_replace('\'','',$full_name))));
+					$sdata['given_names'] = $array_name[0];
+					$array_name[0] = null;
+					$sdata['family_names'] = trim(implode(' ',$array_name));
+					$sdata['connections']['default_email']['connection_name'] = lang('Main');
+					$sdata['connections']['default_email']['connection_value'] = $email;
+
+					$sdata['connections']['default_phone']['connection_name'] = lang('Main');
+					$sdata['connections']['default_phone']['connection_value'] = $phone;
+					
+					// 	verifica se email já existe!
+					$contact = $boGroup->verify_contact($email);
+										
+					if(!$sdata['given_names'] && $email){
+							$a_email = explode("@",$email);
+							$sdata['given_names'] = $a_email[0];
+					}
+
+					$line_iteration = $return['_failure'] + $return['_existing'] + $return['_new']; 
+					if($contact){
+						$return['_existing']++;
+					}														
+					else if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
+						$return['_failure']++;
+						$return['_failure_status'] .= "Line: " . ($line_iteration + 2) . ", Invalid E-Mail address: " . $email ."<br>";
+					}
+					else if (!$sdata['given_names'] || !$email || !$boPeople ->quick_add($sdata)){
+						$return['_failure']++;							
+						$return['_failure_status'] .= "Line: " . ($line_iteration + 2) . ", Invalid Name: " . $sdata['given_names'] ."<br>";
+					}
+					else
+						$return['_new']++;
+       			}       			
+   				fclose($handle);
+				unlink($file);
+			}
+			else
+				$return['error'] = true;
+
+			echo serialize($return);
+		}
+/*
+		function convert_tree($tree, $name, &$iconDir, $parent='0')
+		{
+			$new = null;
+			$code = null;
+			
+			if ($parent === '0')
+			{
+
+				$code .= $name.".add(new dNode({id:'0', caption: '".lang('Catalogues')."'}),'none');\n";
+			}
+			
+			foreach ($tree as $id => $value)
+			{
+				$title = $value['name'];
+
+				switch ($value['type'])
+				{					
+					case 'unknown':
+						$code .= $name.".add(new dNode({id: '{$parent}.{$id}', caption:'{$value['name']}', onFirstOpen: 'getCatalogTree(\\'{$parent}.{$id}\\');', onClick: 'getCatalogTree(\\'{$parent}.{$id}\\'); waitForTree(\\'{$parent}.{$id}\\', 0)'}),'$parent');\n"; 
+						break;
+					
+					case 'catalog_group':
+						$code .= $name.".add(new dNode({id: '{$parent}.{$id}', caption: '{$value['name']}'}),'$parent');\n"; 
+						$code .= $this->convert_tree($value['sub_branch'],$name,$iconDir,$parent.'.'.$id);
+						break;
+
+					case 'mixed_catalog_group':
+						$code .= $name.".add(new dNode({id: '{$parent}.{$id}', caption: '{$value['name']}', onClick: 'setCatalog(\\'{$parent}.{$id}\\')'}),'$parent');\n";
+
+						$code .= $this->convert_tree($value['sub_branch'],$name,$iconDir,$parent.'.'.$id);
+						break;
+					
+					case 'catalog':
+						$code .= $name.".add(new dNode({id: '{$parent}.{$id}', caption: '{$value['name']}', onClick: 'setCatalog(\\'{$parent}.{$id}\\')'}),'$parent');\n";
+						
+				}
+			}
+			
+			return $code;
+		}
+*/
+	}
+
+?>
Index: /tags/contactcenter/1.20/inc/class.Thread.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.Thread.inc.php	(revision 284)
+++ /tags/contactcenter/1.20/inc/class.Thread.inc.php	(revision 284)
@@ -0,0 +1,102 @@
+<?php
+	/***********************************************************************************\
+	* eGroupWare - Contacts Center                                              		*
+	* http://www.egroupware.org                                                 		*
+	* Written by:                                                               		*
+	*  - Brian W. Bosh from	Multi-threading strategies in PHP at						*
+	* http://www.alternateinterior.com/2007/05/multi-threading-strategies-in-php.html	*
+	* Adapted by:																		*
+	*  - Mário César Kolling <mario.kolling@serpro.gov.br>								*
+	* ----------------------------------------------------------------------------------*
+	*  This program is free software; you can redistribute it and/or modify it  		*
+	*  under the terms of the GNU General Public License as published by the    		*
+	*  Free Software Foundation; either version 2 of the License, or (at your   		*
+	*  option) any later version.                                               		*
+	\***********************************************************************************/
+
+	require 'ThreadUtility.inc.php';
+
+	/*
+	 * This is the class that abstracts the details of process management
+	 */
+
+	class Thread {
+		var $pref ;
+		var $pipes;
+		var $pid;
+		var $stdout;
+		//var $timeout;
+
+		function Thread() {
+			$this->pref = 0;
+			$this->stdout = "";
+			$this->pipes = (array)NULL;
+			//$this->timeout = 30000;
+		}
+
+		function Create ($url, $env) {
+			$t = new Thread;
+			$descriptor = array (0 => array ("pipe", "r"), 1 => array ("pipe", "w"), 2 => array ("pipe", "w"));
+			$t->pref = proc_open ("php -q ". "/var/www/expresso/contactcenter/inc/" . $url, $descriptor, $t->pipes, NULL, $env);
+			stream_set_blocking ($t->pipes[1], 0);
+			stream_set_blocking ($t->pipes[2], 0);
+			//usleep ($this->timeout);
+			return $t;
+		}
+
+		function isActive () {
+			$status = proc_get_status($this->pref);
+			return $status['running'];
+		}
+
+		function close () {
+			$r = proc_terminate($this->pref);
+			$this->pref = NULL;
+			return $r;
+		}
+
+		function tell ($thought, $params = NULL) {
+		    fwrite ($this->pipes[0], $thought . "\n");
+			if (is_array ($params)) {
+				foreach ($params as $param) {
+					fwrite ($this->pipes[0], $param . "\n");
+				}
+			}
+		}
+
+		function readResponse()
+		{
+			$response = NULL;
+			$read = array($this->pipes[1]);
+			$write = NULL;
+			$exception = NULL;
+
+			if (stream_select($read, $write, $exception, 0) > 0){
+				$response = $this->listen();
+				return processresponse($response);
+			}
+			else
+			{
+				return $response;
+			}
+		}
+
+		function listen () {
+			$buffer = $this->stdout;
+			$this->stdout = "";
+			while ($r = fgets ($this->pipes[1], 1024)) {
+				$buffer .= $r;
+			}
+			return $buffer;
+		}
+
+		function getError () {
+			$buffer = "";
+			while ($r = fgets ($this->pipes[2], 1024)) {
+				$buffer .= $r;
+			}
+			return $buffer;
+		}
+	}
+
+?>
Index: /tags/contactcenter/1.20/inc/class.so_city.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_city.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_city.inc.php	(revision 2)
@@ -0,0 +1,242 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once("class.so_main.inc.php");
+
+	class so_city extends so_main {
+
+		function so_city ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_city' => array(
+					'name'  => 'id_city',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'id_state' => array(
+					'name'  => 'id_state',
+					'type'  => 'foreign',
+					'association' => array(
+						'table' => 'phpgw_cc_state',
+						'field' => 'id_state'
+					),
+					'state' => 'empty',
+					'value' => false
+				),
+				'id_country' => array(
+					'name'  => 'id_country',
+					'type'  => 'foreign',
+					'association' => array(
+						'table' => 'phpgw_common_country_list',
+						'field' => 'id_country'
+					),
+					'state' => 'empty',
+					'value' => false
+				),
+				'city_name' => array(
+					'name'  => 'city_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'city_timezone' => array(
+					'name'  => 'city_timezone',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				),
+				'city_geo_location' => array(
+					'name'  => 'city_geo_location',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+			
+			$this->db_tables = array(
+				'phpgw_cc_city' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_city']),
+						'foreign' => array(&$this->main_fields['id_state'])
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+			
+			if($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+		
+
+		/*********************************************************************\
+		 *                   Methods to Get Information                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function get_id_state
+			@abstract Returns the ID of the State where this
+				city is located
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_id_state (  )
+		{
+			return $this->main_fields['id_state']['value'];
+		}
+	
+		/*!
+		
+			@function get_id_country
+			@abstract Returns the ID of the Country where this
+				city is located
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_id_country (  )
+		{
+			return $this->main_fields['id_country']['value'];
+		}
+
+		/*!
+		
+			@function get_city_name
+			@abstract Returns the Name of the City
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_city_name (  )
+		{
+			return $this->main_fields['city_name']['value'];
+		}
+
+		/*!
+		
+			@function get_city_timezone
+			@abstract Returns the City Timezone
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_city_timezone (  )
+		{
+			return $this->main_fields['city_timezone']['value'];
+		}
+
+		/*!
+		
+			@function get_city_geo_location
+			@abstract Returns the City Geographic Location as stablished
+				by ISO 6709 standard
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_city_geo_location (  )
+		{
+			return $this->main_fields['city_geo_location']['value'];
+		}
+
+
+		/*********************************************************************\
+		 *                   Methods to Alter Information                    *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function set_id_country
+			@abstract Sets the City's Country ID
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_country The Country ID
+		*/
+		function set_id_country ( $id_country )
+		{
+			$this->main_fields['id_country']['value'] = $id_country;
+			$this->manage_fields($this->main_fields['id_country'], 'changed');
+		}
+		
+		/*!
+		
+			@function set_id_state
+			@abstract Sets the City's State ID
+			@author Raphael Derosso Pereira
+		
+			@param integer $id_state The State ID
+		*/
+		function set_id_state ( $id_state )
+		{
+			$this->main_fields['id_state']['value'] = $id_state;
+			$this->manage_fields($this->main_fields['id_state'], 'changed');
+		}
+		
+		/*!
+		
+			@function set_city_name
+			@abstract Sets the City's Name
+			@author Raphael Derosso Pereira
+		
+			@param string $name The City Name
+		*/
+		function set_city_name ( $name )
+		{
+			$this->main_fields['city_name']['value'] = $name;
+			$this->manage_fields($this->main_fields['city_name'], 'changed');
+		}
+		
+		/*!
+		
+			@function set_city_timezone
+			@abstract Sets the City's Timezone
+			@author Raphael Derosso Pereira
+		
+			@param string $timezone The City Timezone
+		*/
+		function set_city_timezone ( $timezone )
+		{
+			$this->main_fields['city_timezone']['value'] = $timezone;
+			$this->manage_fields($this->main_fields['city_timezone'], 'changed');
+		}
+		
+		/*!
+		
+			@function set_city_geo_location
+			@abstract Sets the City's Geographic Location as defined
+				by ISO 6709 standard
+			@author Raphael Derosso Pereira
+		
+			@param string $geo The City Geographic Location
+		*/
+		function set_city_geo_location ( $geo )
+		{
+			$this->main_fields['city_geo_location']['value'] = $geo;
+			$this->manage_fields($this->main_fields['city_geo_location'], 'changed');
+		}
+	}
+	
+?>
Index: /tags/contactcenter/1.20/inc/hook_acl.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/hook_acl.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/hook_acl.inc.php	(revision 2)
@@ -0,0 +1,16 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+?>
Index: /tags/contactcenter/1.20/inc/class.so_company_legal_type.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.so_company_legal_type.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/inc/class.so_company_legal_type.inc.php	(revision 2)
@@ -0,0 +1,70 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  *                                                                           *
+  * Storage Object Classes                                                    *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+
+	include_once( "class.so_type.inc.php" );
+	
+	class so_company_legal_type extends so_type 
+	{
+	
+		function so_company_legal_type ( $id = false )
+		{
+			$this->init();
+			
+			$this->main_fields = array(
+				'id_typeof_company_legal' => array(
+					'name'  => 'id_typeof_company_legal',
+					'type'  => 'primary',
+					'state' => 'empty',
+					'value' => &$this->id
+				),
+				'legal_type_name' => array(
+					'name'  => 'legal_type_name',
+					'type'  => false,
+					'state' => 'empty',
+					'value' => false
+				)
+			);
+
+			$this->type_name = & $this->main_fields['legal_type_name'];
+
+			$this->db_tables = array(
+				'phpgw_cc_typeof_co_legals' => array(
+					'type'   => 'main',
+					'keys'   => array(
+						'primary' => array(&$this->main_fields['id_typeof_company_legal']),
+						'foreign' => false
+					),
+					'fields' => & $this->main_fields
+				)
+			);
+		
+			if ($id)
+			{
+				if (!$this->checkout($id))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+			}
+			else
+			{
+				$this->state = 'new';
+			}
+		}
+	
+	}
+?>
Index: /tags/contactcenter/1.20/inc/class.bo_contactcenter.inc.php
===================================================================
--- /tags/contactcenter/1.20/inc/class.bo_contactcenter.inc.php	(revision 285)
+++ /tags/contactcenter/1.20/inc/class.bo_contactcenter.inc.php	(revision 285)
@@ -0,0 +1,647 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	class bo_contactcenter
+	{
+
+		/*!
+			This var holds the actual catalog level.
+		*/
+		var $catalog_level;
+
+		/*!
+			This holds the instantiated catalog class;
+		*/
+		var $catalog;
+		
+		/*!
+			The Security Manager
+		*/
+		var $security;
+		
+
+		function bo_contactcenter($catalog=false)
+		{
+			$this->tree = $GLOBALS['phpgw']->session->appsession('bo_contactcenter.tree','contactcenter');
+			$this->catalog_level = $GLOBALS['phpgw']->session->appsession('bo_contactcenter.catalog_level','contactcenter');
+			$this->security = CreateObject('contactcenter.bo_security_manager');
+			
+			if ($catalog)
+			{
+				$this->set_catalog($catalog);
+			}
+			else
+			{
+				if ($this->catalog_level[0])
+				{
+					$this->set_catalog($this->get_branch_by_level($this->catalog_level[0]));
+				}
+				else
+				{
+					$this->catalog_level = array('0.0');
+					$this->get_catalog_tree();
+					$this->set_catalog($this->catalog_level[0]);
+				}
+			}
+		}
+		
+		/*
+		 *
+		 * @function is_external
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 * @abstract Verify if a catalog is external
+		 * @param (mixed) an catalog array or a catalog tree level, a string in the form 0.sublevel.subsublevel
+		 * @return (boolean) true if it is an external catalog false otherwise
+		 *
+		 */
+
+		function is_external($catalog)
+		{
+			if (is_array($catalog))
+			{
+				$level = $this->get_level_by_branch($catalog, $this->tree['branches']);
+			}
+			else
+			{
+				$level = $catalog;
+			}
+
+			$lvl_vector = explode('.', $level);
+			$id = $lvl_vector[1];
+
+			if ($this->tree['branches'][$id]['external'])
+			{
+				return true;
+			}
+
+			return false;
+
+		}
+
+		/*
+		 function get_letters_filter($catalog)
+		{
+
+		}
+
+		function get_numbers_filter($catalog)
+		{
+
+		}
+
+		function get_search_filter($catalog)
+		{
+
+		}
+		*/
+
+		/*!
+		
+			@function find
+			@abstract Performs a search in the DB based on the parameters
+			@author Raphael Derosso Pereira (algorithm and code)
+			@author Vinicius Cubas Brand (algorithm)
+			
+			@param array $what The list of fields to be returned. The format is:
+				$what = array(
+					'contact.company.company_name',
+					'contact.names_ordered'
+				);
+			
+			@param array $rules The restrictions.
+			
+			The restrictions format is quite complicated, but is very complete.
+			As defined here, there is the possibility to do almost any type of
+			search (tell me if you can't do any). For example, imagine the
+			following search:
+					
+						and(a,or(d,e,and(f,g)))
+			
+			That is represented by the folloowing tree:
+				
+                                   and
+                                    |
+                  .--------------------.
+                  |                    |
+                a = 5                 or
+                                       |
+                          .---------.------------.
+                          |         |            |
+                       d != 10  e LIKE %a       and
+                                                 |
+                                             .-------.
+                                             |       |
+                                           f = 5   g < 10
+
+
+			The rules that should be passed to the find function for this tree
+			is:
+				
+	 			$rules = array(
+ 					0 => array(
+ 						'field' => 'A',
+ 						'type'  => '=',
+ 						'value' => 5
+ 					),
+ 					1 => array (
+	 					'type'	     => 'branch',
+	 					'value'	     => 'OR',
+	 					'sub_branch' => array(
+ 							0 => array(
+ 								'field' => 'D'
+ 								'type'  => '!=',
+ 								'value' => 10
+ 							),
+ 							1 => array(
+ 								'field' => 'E',
+ 								'type'  => 'LIKE',
+ 								'value' => '%a'
+ 							)
+ 							2 => array(
+ 								'type'       => 'branch',
+ 								'value'      => 'AND',
+ 								'sub_branch' => array(
+ 									0 => array(
+ 										'field' => 'F',
+ 										'type'  => '=',
+ 										'value' => 5
+ 									),
+ 									1 => array(
+ 										'field' => 'G'
+ 										'type'  => '<',
+ 										'value' => 10
+ 									)
+ 								)
+ 							)
+ 						)
+ 					)
+	 			);
+
+  
+			The restriction type can be: =, !=, <=, <, >, >=, NULL, IN, LIKE, 
+			NOT NULL, NOT IN, NOT LIKE
+			Value of branch can be AND, OR, NOT
+			
+			@param array $other Other parameter to the search 
+				$other = array(
+					'offset'          => (int),
+					'limit'           => (int),
+					'sort'            => {ASC|DESC},
+					'order'           => (string with field names separated by commas)
+					'fields_modifier' => (COUNT|MAX)
+				);
+
+			@return array $array[<field_name>][<row_number>]
+				
+		*/
+		function find($what, $rules=false, $other=false)
+		{
+			return $this->catalog->find($what, $rules, $other);
+		}
+		
+		/*!
+		
+			@function get_catalog_tree
+			@abstract Returns an array describing the available
+				catalog-entity-view tree and their respective
+				values and types
+			@author Raphael Derosso Pereira
+			@author Mário César Kolling (external catalogs and optimizations)
+
+			@param (string)  $level The level to be taken
+			@param (boolean) $recursive Retrive the whole tree from
+				the level specified until the leaves
+			
+			@return The format of the return is:
+				$return = array(
+					0  => array(
+						'name'       => '<branch_name>',
+						'type'       => '<branch_type>',
+						'class'      => '<branch_class>',
+						'class_args' => '<branch_class_args>',
+						'find_args'  => '<branch_find_args>',
+						'sub_branch' => array(
+							0  => array(
+								'name'       => '<branch_name>',
+								'type'       => '<branch_type>',
+								'class'      => '<branch_class>',
+								'class_args' => '<branch_class_args>',
+								'find_args'  => '<branch_find_args>',
+								'sub_branch' => array(...)
+							),
+							1  => array(...),...
+						),
+					),
+					1  => array(...),...
+				);
+				
+				<branch_type> can be 'catalog_group', 'catalog' or 'view';
+				<branch_class> is the name of the class that is capable of 
+					handling the information for this catalog/view
+				<branch_class_args> is an array that holds the arguments to
+					be passed to <branch_class> when it is instantiated
+				<brach_find_args> is the string that should precede the search
+					string
+						
+				If the branch is actually a leaf, than 'sub_branch' is false; 
+		
+		
+			TODO: This method is hard-coded, but it should grab the tree
+			from the DB using the View Manager...
+		*/
+		function get_catalog_tree($level = '0', $recursive = false)
+		{
+			if ($this->tree)
+			{
+				if ($level === '0')
+				{
+					return $this->tree['branches'];
+				}
+				
+				$lvl_vector = explode('.', $level);
+				$id = $lvl_vector[1];
+
+				$branch =& $this->get_branch_by_level($level);
+				$info = $this->get_info_by_level($level);
+				
+				if ($branch['type'] === 'unknown')
+				{
+					if ($info['type'] === 'ldap')
+					{
+						$ldap = CreateObject('contactcenter.bo_ldap_manager');
+						if ($this->tree['branches'][$id]['external'])
+						{
+							// if it's an external catalog
+							$new_branch = $ldap->get_external_ldap_tree($info['src'], $branch['value'], $recursive);
+						}
+						else
+						{
+							// if it's not an external catalog
+							$new_branch = $ldap->get_ldap_tree($info['src'], $branch['value'], $recursive);
+						}
+						if ($new_branch)
+						{
+							if (!empty($new_branch['timeout']) && !empty($new_branch['msg']))
+							{
+								return $new_branch;
+							}
+
+							// Necessary for the new way the catalog tree is built at initialization
+							$new_branch['name'] = $branch['name'];
+							$new_branch['external'] = $branch['external'];
+							$branch = $new_branch;
+						}
+						else
+						{
+							return false;
+						}
+					}
+					$GLOBALS['phpgw']->session->appsession('bo_contactcenter.tree','contactcenter',$this->tree);
+					
+					return $branch;
+				}
+				else if ($branch['type'])
+				{
+					return $branch;
+				}
+				
+				return false;
+			}
+			
+			if ($level !== '0')
+			{
+				return false;
+			}
+			
+			$this->tree = array(
+				0 => array(
+					'type' => 'sql'
+				),
+				'branches' => array(
+					0  => array(
+						'name'       => lang('People'),
+						'type'       => 'catalog',
+						'class'      => 'bo_people_catalog',
+						'icon'       => 'people-mini.png',
+						'sub_branch' => false
+					),
+					1  => array(
+						'name'       => lang('Groups'),
+						'type'       => 'catalog',
+						'class'      => 'bo_group_manager',
+						'icon'       => 'people-mini.png',
+						'sub_branch' => False
+					)
+				)
+			);
+			
+			$ldap = CreateObject('contactcenter.bo_ldap_manager');
+			$ldap_srcs = $ldap->get_all_ldap_sources();
+			
+			if ($ldap_srcs)
+			{
+				$i = 2;
+				reset($ldap_srcs);
+				while (list($id,) = each($ldap_srcs))
+				{
+					if (($tree = $ldap->get_ldap_tree($id, $ldap_srcs[$id]['dn'], $recursive)))
+					{
+						// It isn't used anymore, but does no harm!
+						// It may be usefull later for use with search timeouts, or another ldap error
+						if (array_key_exists('error_msg', $tree))
+						{
+							if (isset($this->tree['branches']['msg']))
+							{
+								$this->tree['branches']['msg'] .= "\n" . lang('Catalog %1 not showed due to error: ' .
+													 $tree['error_msg'], $ldap_srcs[$id]['name']);
+							}
+							else
+							{
+								$this->tree['branches']['msg'] = lang('Catalog %1 not showed due to error: ' .
+													 $tree['error_msg'], $ldap_srcs[$id]['name']);
+							}
+						}
+						else
+						{
+							$tree['name'] = $ldap_srcs[$id]['name'];
+							$tree['external'] = false;
+							array_push($this->tree['branches'], $tree);
+							$this->tree[$i]['type'] = 'ldap';
+							$this->tree[$i]['src'] = $id;
+						}
+
+					}
+					$i++;
+				}
+			}
+
+			// external LDAP sources
+			$ldap_srcs = $ldap->get_external_ldap_sources();
+
+			if ($ldap_srcs)
+			{
+				$i = count($this->tree);
+
+				reset($ldap_srcs);
+
+				while (list($id,) = each($ldap_srcs))
+				{
+					// External catalogs are now identified as type unknown during initialization. An optimization change.
+
+						$tree['name'] = $ldap_srcs[$id]['name'];
+						$tree['type'] = 'unknown';
+						$tree['value'] = $ldap_srcs[$id]['dn'];
+						$tree['external'] = true;
+						array_push($this->tree['branches'], $tree);
+						$this->tree[$i]['type'] = 'ldap';
+						$this->tree[$i]['src'] = $id;
+					$i++;
+				}
+			}
+			
+			$GLOBALS['phpgw']->session->appsession('bo_contactcenter.tree','contactcenter',$this->tree);
+			return $this->tree['branches'];
+		}
+
+		/*!
+			
+			@function get_branch_by_level
+			@abstract Returns the branch and it's informations given the level
+			@author Raphael Derosso Pereira
+			
+			@param (string) $level The level to be used
+			
+		*/
+		function & get_branch_by_level($level)
+		{
+			$path = @explode('.',$level);
+			$n_ways = count($path);
+			
+			if ($n_ways <= 1)
+			{
+				return false;
+			}
+			
+			$code = '$branch =& $this->tree[\'branches\']';
+			for ($i = 1; $i < $n_ways-1; $i++)
+			{
+				$code .= '['.$path[$i].'][\'sub_branch\']';
+			}
+			$code .= '['.$path[$i].'];';
+
+			//echo 'Codigo: '.$code.'<br>';
+			eval($code);
+			
+			return $branch;
+		}
+
+		/*!
+		 
+		 @function get_info_by_level
+		 @abstract Returns the information about the catalog, given the level
+		 @author Raphael Derosso Pereira
+
+		 @param (string) $level The catalog level
+
+		*/
+		function get_info_by_level($level)
+		{
+			$path = @explode('.',$level);
+			$n_ways = count($path);
+			
+			if ($n_ways <= 1)
+			{
+				return false;
+			}
+			
+			$info = $this->tree[$path[1]];
+			
+			return $info;
+		}
+
+		/*!
+
+			@function get_level_by_branch
+			@abstract Returns the level of the given branch
+			@author Raphael Derosso Pereira
+
+			@param (array) $catalog The catalog
+			@param (array) $branch  The reference to the branch to be searched
+
+		*/
+		function get_level_by_branch($catalog, &$branch, $branch_level = '0')
+		{
+//			echo '<br>';
+			reset($branch);
+			while(list($level, $bcatalog) = each($branch))
+			{
+//				echo 'Parent Level:    '.$branch_level.'<br>';
+//				echo 'This node Level: '.$level.'<br>';
+//				echo 'Catalog:         '.$bcatalog['name'].'<br>';
+
+				$found = true;
+				foreach ($catalog as $property => $value)
+				{
+					if ($property !== 'sub_branch' and $bcatalog[$property] !== $value)
+					{
+//						echo 'Property <b>'.$property.'</b> differs.<br>';
+//						echo 'Expected: '.$value.'<br>';
+//						echo 'Found: '.$bcatalog[$property].'<br>';
+						$found = false;
+					}
+
+					if (!$found)
+					{
+						break;
+					}
+				}
+
+				if ($found)
+				{
+//					echo '<b>FOUND</b><br>';
+					return $branch_level.'.'.((string) $level);
+				}
+				else if ($bcatalog['sub_branch'])
+				{
+//					echo 'Not Found<br>';
+
+					$search = $this->get_level_by_branch($catalog, $bcatalog['sub_branch'], (string) $level);
+					
+					if ($search !== false)
+					{
+//						echo 'Returning level: '.$branch_level.'.'.$search.'<br>';
+//						echo 'Sholud it be '.$branch_level.'.'.$nlevel.' ?<br>';
+//						echo 'Or '.$branch_level.'.'.((string)$search).' ?<br>';
+						return $branch_level.'.'.$search;
+					}
+				}
+			}
+
+//			echo 'Not Found in this Branch<br>';
+			return false;
+		}
+		
+		/*!
+		
+			@function get_actual_catalog
+			@abstract Returns the information about the Catalog that is 
+				instantiated
+
+			@author Raphael Derosso Pereira
+		
+		*/
+		function get_actual_catalog()
+		{
+			$catalog = $this->get_branch_by_level($this->catalog_level[0]);
+			return $catalog;
+		}
+		
+		/*!
+		
+			@function set_catalog
+			@abstract Sets the actual catalog
+			@author Raphael Derosso Pereira
+			
+			@param array $to_catalog The catalog in the format returned by
+				get_available_tree or the level
+		
+		*/
+		function set_catalog(& $to_catalog )
+		{
+			if(!is_array($to_catalog))
+			{
+				if (is_string($to_catalog))
+				{
+					if (!($t =& $this->get_branch_by_level($to_catalog)))
+					{
+						return false;
+					}
+					$level = $to_catalog;
+					$catalog =& $t;
+				}
+				else
+				{
+					return false;
+				}
+			}
+			else
+			{
+				$catalog =& $to_catalog;
+				$level = $this->get_level_by_branch($to_catalog, $this->tree['branches']);
+			}
+			$lvl_vector = explode('.', $level);
+			$id = $lvl_vector[1];
+			
+			switch($catalog['type'])
+			{
+				case 'unknown':
+					$level = $this->get_level_by_branch($catalog, $this->tree['branches']);
+					$catalog =& $this->get_catalog_tree($level);
+
+				case 'catalog':
+				case 'catalog_group':
+				case 'mixed_catalog_group':
+					$this->catalog_level = array($level);
+					$GLOBALS['phpgw']->session->appsession('bo_contactcenter.catalog_level','contactcenter', $this->catalog_level);
+					$call = '$this->catalog = CreateObject('.'\'contactcenter.'.$catalog['class'].'\'';
+					if ($catalog['class_args'])
+					{
+						foreach($catalog['class_args'] as $arg)
+						{
+							$args[] = is_string($arg) ? ($arg{0} != '$' ? "'".$arg."'" : $arg) : $arg;
+							//$args[] = is_string($arg) ? "'".$arg."'" : $arg;
+						}
+						$call .= ','.implode(',',$args);
+					}
+					
+					$call .= ');';
+					
+//					print_r($catalog);
+//					echo '<br><br><b>Setando Catalogo '.$catalog['name'].': </b>'.$call.'<br>';
+
+					eval($call);
+								
+					return $catalog;
+					
+				default: return false;
+			}
+		}
+		
+
+
+		/*********************************************************************\
+		 *                Methods to set general fields                      *
+		\*********************************************************************/
+		
+		/*!
+		
+			@function add_vcard
+			@abstract Insert a VCard to the squema
+			@author Raphael Derosso Pereira
+			@param string $uploaded_file The path to the file that were
+				uploaded.
+		
+		*/
+		function add_vcard ( $uploaded_file )
+		{
+		}
+
+
+		
+		/*********************************************************************\
+		 *                Methods to get general data                        *
+		\*********************************************************************/
+		
+	}
+?>
Index: /tags/contactcenter/1.20/cc_photo_frame.html
===================================================================
--- /tags/contactcenter/1.20/cc_photo_frame.html	(revision 2)
+++ /tags/contactcenter/1.20/cc_photo_frame.html	(revision 2)
@@ -0,0 +1,7 @@
+<html>
+<body>
+	<form id="cc_photo_form" method="POST" enctype="multipart/form-data">
+		<input id="cc_photo_input" type="file" name="cc_pd_photo" onchange="document.parentWindow.frameElement.ownerDocument.all['cc_pd_select_photo_t'].value = document.all['cc_photo_input'].value">
+	</form>
+</body>
+</html>
Index: /tags/contactcenter/1.20/js/cc_email_win-0.2.0.js
===================================================================
--- /tags/contactcenter/1.20/js/cc_email_win-0.2.0.js	(revision 2)
+++ /tags/contactcenter/1.20/js/cc_email_win-0.2.0.js	(revision 2)
@@ -0,0 +1,402 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*
+	 * ContactCenter API - Email Gathering Window
+	 */
+
+	function ccEmailWinClass(params)
+	{
+		if (typeof(params) != 'object')
+		{
+			return false;
+		}
+
+		this.window = params['window'];
+		this.search_win = params['search'];
+		
+		this.entries = Element('cc_email_win_entries');
+		this.to  = Element('cc_email_win_to');
+		this.cc  = Element('cc_email_win_cc');
+		this.cco = Element('cc_email_win_cco');
+
+		this.to_count  = 0;
+		this.cc_count  = 0;
+		this.cco_count = 0;
+
+		this.contents = new Array();
+
+		this.onOk = null;
+
+		this.entries.style.overflow = 'auto';
+	}
+
+	ccEmailWinClass.prototype.setContents = function(data)
+	{
+		if (typeof(data) != 'object')
+		{
+			return false;
+		}
+
+		this.clearAll();
+		
+		if (data['entries'])
+		{
+			for (var i in data['entries'])
+			{
+				this.entries = new Option(data['entries'][i], i);
+			}
+		}
+		
+		if (data['to'])
+		{
+			for (var i in data['to'])
+			{
+				this.to = new Option(data['to'][i], i);
+			}
+		}
+
+		if (data['cc'])
+		{
+			for (var i in data['cc'])
+			{
+				this.cc = new Option(data['cc'][i], i);
+			}
+		}
+
+		if (data['cco'])
+		{
+			for (var i in data['cco'])
+			{
+				this.cco = new Option(data['cco'][i], i);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.getContents = function()
+	{
+		var i;
+		
+		this.contents = new Array();
+		this.contents['entries'] = new Array();
+		this.contents['to'] = new Array();
+		this.contents['cc'] = new Array();
+		this.contents['cco'] = new Array();
+		
+		for (i = 0; i < this.entries.options.length; i++)
+		{
+			this.contents['entries'][this.contents['entries'].length] = this.entries.options[i].text;
+		}
+
+		for (i = 0; i < this.to.options.length; i++)
+		{
+			this.contents['to'][this.contents['to'].length] = this.to.options[i].text;
+		}
+
+		for (i = 0; i < this.cc.options.length; i++)
+		{
+			this.contents['cc'][this.contents['cc'].length] = this.cc.options[i].text;
+		}
+		
+		for (i = 0; i < this.cco.options.length; i++)
+		{
+			this.contents['cco'][this.contents['cco'].length] = this.cco.options[i].text;
+		}
+		
+		return this.contents;
+	}
+
+	ccEmailWinClass.prototype.open = function()
+	{
+		this.window.open()
+	}
+	
+	ccEmailWinClass.prototype.ok = function()
+	{
+		if (this.onOk)
+		{
+			this.onOk(this.getContents());
+		}
+
+		this.clearAll();
+		this.window.close();
+	}
+	
+	ccEmailWinClass.prototype.clearAll = function()
+	{
+		this.clearEntries();
+		this.clearTo();
+		this.clearCC();
+		this.clearCCO();
+	}
+
+	ccEmailWinClass.prototype.clearEntries = function()
+	{
+		var length;
+
+		if (this.entries.options.length)
+		{
+			length = this.entries.options.length-1;
+			for (var i = length; i >= 0; i--)
+			{
+				this.entries.removeChild(this.entries.options[i]);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.clearTo = function()
+	{
+		var length;
+		
+		if (this.to.options.length)
+		{
+			length = this.to.options.length-1;
+			for (var i = length; i >= 0; i--)
+			{
+				this.to.removeChild(this.to.options[i]);
+			}
+		}
+	}
+	
+	ccEmailWinClass.prototype.clearCC = function()
+	{
+		var length;
+		
+		if (this.cc.options.length)
+		{
+			length = this.cc.options.length-1;
+			for (var i = length; i >= 0; i--)
+			{
+				this.cc.removeChild(this.cc.options[i]);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.clearCCO = function()
+	{
+		var length;
+		
+		if (this.cco.options.length)
+		{
+			length = this.cco.options.length-1;
+			for (var i = length; i >= 0; i--)
+			{
+				this.cco.removeChild(this.cco.options[i]);
+			}
+		}
+	}
+	
+	ccEmailWinClass.prototype.close = function()
+	{
+		this.clearAll();
+		this.search_win.close();
+		this.window.close();
+	}
+
+	ccEmailWinClass.prototype.search = function()
+	{
+/*		if (document.all)
+		{
+			this.search_win.onOpen  = this.window.close;
+			this.search_win.onClose = this.window.open;
+		}
+*/		
+		this.search_win.open();
+		this.search_win.window.moveTo(this.window.x()+20, this.window.y()+20);
+
+		var window = this.window;
+		var entries = this.entries;
+		var _this = this;
+		
+		this.search_win.onSearchFinish = function (result)
+		{
+			if (!result || typeof(result) != 'object')
+			{
+				showMessage('Error getting result from search');
+				return false;
+			}
+
+			var sdata = new Array();
+			
+			sdata['ids'] = result;
+			sdata['fields'] = new Array()
+			sdata['fields']['names_ordered'] = true;
+			sdata['fields']['connections'] = true;
+			
+			var str_data = 'data='+serialize(sdata);
+
+			var obj = httpRequestObj();
+
+			var handler = function ()
+			{
+				try
+				{
+					setLoadingState(obj.readyState);
+					if (obj.readyState == 4 && obj.status == 200)
+					{
+						//document.all ? _this.window.open() : false;
+						//Element('cc_email_win_debug').innerHTML = obj.responseText;
+						var data = unserialize(obj.responseText);
+						
+						if (!data)
+						{
+							//showMessage(Element('cc_msg_err_invalid_catalog').value);
+							showMessage('Error getting user Info');
+							return false;
+						}
+
+						_this.clearEntries();
+
+						if (data['status'] == 'empty')
+						{
+							showMessage(data['msg']);
+							return false;
+						}
+
+						if (data['status'] != 'ok')
+						{
+							showMessage(data['msg']);
+							return false;
+						}
+
+						//showMessage(data['msg']);
+
+						var name = '';
+						var emails = new Array();
+						for (var i in data['data'])
+						{
+							emails_count = 0;
+							for (var j in data['data'][i])
+							{
+								if (j == 'names_ordered')
+								{
+									name = '"'+data['data'][i][j]+'"';
+								}
+								else if (j == 'connections')
+								{
+									for (var k in data['data'][i][j])
+									{
+										if (data['data'][i][j][k]['id_type'] == Element('cc_email_id_type').value)
+										{
+											emails[emails.length] = ' <'+data['data'][i][j][k]['connection_value']+'>';
+										}
+									}
+								}
+							}
+
+							if (name != '' && emails.length)
+							{
+								for (var j in emails)
+								{
+									entries.options[entries.options.length] = new Option(name+emails[j], i+'_'+j);
+								}
+							}
+							
+							name = '';
+							emails = new Array();
+						}
+					}
+				}
+				catch (e)
+				{
+					showMessage(e);
+				}
+				
+			};
+
+			httpRequest(obj, CC_url+'get_multiple_entries', 'POST', handler, str_data);
+		};
+	}
+	
+	ccEmailWinClass.prototype.entries_to = function()
+	{
+		var i;
+		var length = this.entries.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.entries.options[i].selected)
+			{
+				this.to.options[this.to.options.length] = new Option(this.entries.options[i].text, this.entries.options[i].value);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.entries_cc = function()
+	{
+		var i;
+		var length = this.entries.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.entries.options[i].selected)
+			{
+				this.cc.options[this.cc.options.length] = new Option(this.entries.options[i].text, this.entries.options[i].value);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.entries_cco = function()
+	{
+		var i;
+		var length = this.entries.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.entries.options[i].selected)
+			{
+				this.cco.options[this.cco.options.length] = new Option(this.entries.options[i].text, this.entries.options[i].value);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.to_entries = function()
+	{
+		var i;
+		var length = this.to.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.to.options[i].selected)
+			{
+				this.to.removeChild(this.to.options[i]);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.cc_entries = function()
+	{
+		var i;
+		var length = this.cc.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.cc.options[i].selected)
+			{
+				this.cc.removeChild(this.cc.options[i]);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.cco_entries = function()
+	{
+		var i;
+		var length = this.cco.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.cco.options[i].selected)
+			{
+				this.cco.removeChild(this.cco.options[i]);
+			}
+		}
+	}
+
+	/****************************************************************************\
+	 *                        Auxiliar Functions                                *
+	\****************************************************************************/
Index: /tags/contactcenter/1.20/js/cc_tree.js
===================================================================
--- /tags/contactcenter/1.20/js/cc_tree.js	(revision 285)
+++ /tags/contactcenter/1.20/js/cc_tree.js	(revision 285)
@@ -0,0 +1,274 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*
+	 * ContactCenter API - Tree Management Class
+	 */
+
+	if (!dFTree)
+	{
+		throw('dFTree lib must be loaded!');
+	}
+	
+	function ccCatalogTree(params)
+	{
+		if (!params || !params['name'] || !params['id_destination'])
+		{
+			throw('Must specify the tree name!');
+		}
+
+		var _tree = this;
+		
+		/* This is the property that holds the Tree Object */
+		this.name = params['name'];
+		this.tree = new dFTree({'name': params['name']+'_tree'});
+		this.actualLevel = null;
+		this.treeAvailable = false;
+		this.afterSetCatalog = params['afterSetCatalog'];
+		this.catalog_perms = -1;
+		this.Connector = params['connector'];
+
+		/* Build the Inicial Tree */ 
+		//this._getActualLevel();
+		setTimeout(function(){ _tree._updateTree('0', true);}, 100);
+		this.tree.draw(Element(params['id_destination']));
+	}
+
+	ccCatalogTree.prototype.setCatalog = function(catalog) {
+		var _this = this;
+		var handler = function (responseText)
+		{
+			Element('cc_debug').innerHTML = responseText;
+			var data = unserialize(responseText);
+
+			if (!data)
+			{
+				showMessage(Element('cc_msg_err_contacting_server').value);
+				return;
+			}
+			
+			if (data['status'] != 'ok')
+			{
+				showMessage(data['msg']);
+				_this._getActualLevel(true);
+				return;
+			}
+
+			_this.catalog_perms = parseInt(data['perms']);
+			
+			if (_this.afterSetCatalog)
+			{
+				typeof(_this.afterSetCatalog) == 'function' ? _this.afterSetCatalog() : eval(_this.afterSetCatalog);
+			}
+		};
+
+		Connector.newRequest(this.name+'catalog', CC_url+'set_catalog&catalog='+catalog, 'GET', handler);
+	}
+	
+	ccCatalogTree.prototype.setCatalogSearch = function (catalog) {
+	
+		var _this = this;
+		var handler = function (responseText)
+		{
+			Element('cc_debug').innerHTML = responseText;
+			var data = unserialize(responseText);
+
+			if (!data)
+			{
+				showMessage(Element('cc_msg_err_contacting_server').value);
+				return;
+			}
+			
+			if (data['status'] != 'ok')
+			{
+				showMessage(data['msg']);
+				_this._getActualLevel(true);
+				return;
+			}
+
+			_this.catalog_perms = parseInt(data['perms']);
+
+			this.afterSetCatalog = ccEmailWin.search.go();
+			
+		};
+
+		Connector.newRequest(this.name+'catalog', CC_url+'set_catalog&catalog='+catalog, 'GET', handler);
+	}
+		
+	
+	ccCatalogTree.prototype.select = function(level, search)
+	{
+		if (!search) { 
+			this.tree.openTo(level);
+			this.tree.getNodeById(level)._select();
+		
+			if (level != this.actualLevel)
+			{
+				this.setCatalog(level);
+				return;
+			}
+		} else {
+			this.tree.openTo(level);
+			this.tree.getNodeById(level)._select();
+			this.setCatalogSearch(level);
+			return;
+		}
+	}
+
+	/*************************************************************************\
+	 *                    Methods For Internal Use                           *
+	\*************************************************************************/
+	
+	ccCatalogTree.prototype._waitForTree = function(level, rlevel)
+	{
+		if (this.treeAvailable)
+		{
+			this.setCatalog(level);
+			return;
+		}
+
+		if (rlevel >= 100)
+		{
+			return;
+		}
+		
+		setTimeout(this.name+'._waitForTree(\''+level+'\', '+rlevel+')', 100);
+	}
+
+	ccCatalogTree.prototype._getActualLevel = function(set)
+	{
+		var _this = this;
+		this.treeAvailable = false;
+
+		var handler = function (responseText)
+		{
+			Element('cc_debug').innerHTML = responseText;
+			var data = unserialize(responseText);
+
+			if (!data)
+			{
+				showMessage(Element('cc_msg_err_contacting_server').value);
+				return;
+			}
+
+			if (data['status'] != 'ok')
+			{
+				showMessage(data['msg']);
+				return;
+			}
+
+			_this.actualLevel = data['data'];
+
+			if (set)
+			{
+			//	_this.select(data['data']);
+				_this.tree.openTo(_this.actualLevel);
+				_this.tree.getNodeById(_this.actualLevel)._select();
+				_this.setCatalog(_this.actualLevel);
+				_this.expandTree();
+
+			}
+		};
+		
+		Connector.newRequest(this.name+'actual', CC_url+'get_actual_catalog', 'GET', handler);
+	}
+
+	ccCatalogTree.prototype.expandTree = function() {
+		for (i=0; i < this.tree._aNodes.length; i++)
+			this._expandSubTree(this.tree._aNodes[i]);
+	}
+
+	ccCatalogTree.prototype._expandSubTree = function(node) {
+		if ( node._children == '' ) {
+			return;
+		}
+		if (node._children != '') {
+			for (i = 0; i <= node._children.length; i++) {
+				if ( node._io == false )
+					node.changeState();
+				this._expandSubTree(node._children[i]);
+			}
+		}
+	}
+
+
+	ccCatalogTree.prototype._updateTree = function(level, open)
+	{
+		var _this = this;
+		this.treeAvailable = false;
+
+		var handler = function (responseText)
+		{
+			var data = unserialize(responseText);
+			var treeData;
+
+			if (!data)
+			{
+				showMessage(Element('cc_msg_err_contacting_server').value);
+				return;
+			}
+
+			if (data['status'] != 'ok')
+			{
+				showMessage(data['msg']);
+				return;
+			}
+
+			treeData = data['data'];
+			
+			var timeout = 10;
+			var limit = 0;
+			for (var i in treeData)
+			{
+				if (i == 'length')
+				{
+					continue;
+				}
+
+				switch (treeData[i]['type'])
+				{
+					case 'unknown':
+						setTimeout(_this.name+".tree.add(new dNode({id: '"+treeData[i]['id']+"', caption: '"+treeData[i]['caption']+"', onFirstOpen: '"+_this.name+"._updateTree(\\'"+treeData[i]['id']+"\\')', onClick: '"+_this.name+"._updateTree(\\'"+treeData[i]['id']+"\\');"+_this.name+"._waitForTree(\\'"+treeData[i]['id']+"\\',0)'}), '"+treeData[i]['pid']+"');", timeout);
+						break;
+
+					case 'catalog_group':
+						//setTimeout(_this.name+".tree.add(new dNode({id: '"+treeData[i]['id']+"', caption: '"+treeData[i]['caption']+"', onFirstOpen: '', onClick: '"+_this.name+".tree.getNodeById(\\'"+treeData[i]['id']+"\\').open();"+_this.name+"._getActualLevel(true);'}), '"+treeData[i]['pid']+"');", timeout);
+						setTimeout(_this.name+".tree.add(new dNode({id: '"+treeData[i]['id']+"', caption: '"+treeData[i]['caption']+"', onFirstOpen: '', onClick: '"+_this.name+".setCatalog(\\'"+treeData[i]['id']+"\\');'}), '"+treeData[i]['pid']+"');", timeout);
+						break;
+
+					case 'catalog':
+						setTimeout(_this.name+".tree.add(new dNode({id: '"+treeData[i]['id']+"', caption: '"+treeData[i]['caption']+"', onFirstOpen: '', onClick: '"+_this.name+".setCatalog(\\'"+treeData[i]['id']+"\\');'}), '"+treeData[i]['pid']+"');", timeout);
+						break;
+
+					case 'mixed_catalog_group':
+						setTimeout(_this.name+".tree.add(new dNode({id: '"+treeData[i]['id']+"', caption: '"+treeData[i]['caption']+"', onFirstOpen: '', onClick: '"+_this.name+".setCatalog(\\'"+treeData[i]['id']+"\\');'}), '"+treeData[i]['pid']+"');", timeout);
+						break;
+
+					case 'empty':
+						setTimeout(_this.name+".tree.add(new dNode({id: '"+treeData[i]['id']+"', caption: '"+treeData[i]['caption']+"', onFirstOpen: '', onClick: '"+_this.name+".setCatalog(\\'"+treeData[i]['id']+"\\');'}), '"+treeData[i]['pid']+"');", timeout);
+				}
+
+				timeout += 5;
+			}
+			
+			_this.treeAvailable = true;
+
+			if (open)
+			{
+				setTimeout(_this.name+"._getActualLevel(true)", timeout+10);
+				//setTimeout(_this.name+".tree.openTo("+_this.name+".actualLevel);", timeout+100);
+				//setTimeout(_this.name+".tree.getNodeById("+_this.name+".actualLevel)._select();", timeout+100);
+			}
+		};
+		Connector.newRequest(this.name+'update', CC_url+'get_catalog_tree&level='+level, 'GET', handler);
+	}
Index: /tags/contactcenter/1.20/js/menu.js
===================================================================
--- /tags/contactcenter/1.20/js/menu.js	(revision 2)
+++ /tags/contactcenter/1.20/js/menu.js	(revision 2)
@@ -0,0 +1,877 @@
+function Menu(label) {
+    this.version = "020903 [Menu; menu.js]";
+    this.type = "Menu";
+    this.fontSize = 14;
+    this.fontWeight = "plain";
+    this.fontFamily = "arial,helvetica,espy,sans-serif";
+    this.fontColor = "#000000";
+    this.fontColorHilite = "#ffffff";
+    this.bgColor = "#555555";
+    this.menuBorder = 1;
+    this.menuItemBorder = 1;
+    this.menuItemBgColor = "#cccccc";
+    this.menuLiteBgColor = "#ffffff";
+    this.menuBorderBgColor = "#777777";
+    this.menuHiliteBgColor = "#000084";
+    this.menuContainerBgColor = "#cccccc";
+    this.childMenuIcon = "images/arrows.gif";
+    this.childMenuIconHilite = "images/arrows2.gif";
+    this.items = new Array();
+    this.actions = new Array();
+    this.colors = new Array();
+    this.mouseovers = new Array();
+    this.mouseouts = new Array();
+    this.childMenus = new Array();
+
+    this.addMenuItem = addMenuItem;
+    this.addMenuSeparator = addMenuSeparator;
+    this.writeMenus = writeMenus;
+    this.showMenu = showMenu;
+    this.onMenuItemOver = onMenuItemOver;
+    this.onMenuItemOut = onMenuItemOut;
+    this.onMenuItemDown = onMenuItemDown;
+    this.onMenuItemAction = onMenuItemAction;
+    this.hideMenu = hideMenu;
+    //this.hideChildMenu = hideChildMenu;
+    this.mouseTracker = mouseTracker;
+    this.setMouseTracker = setMouseTracker;
+
+    if (!window.menus) window.menus = new Array();
+    this.label = label || "menuLabel" + window.menus.length;
+    window.menus[this.label] = this;
+    window.menus[window.menus.length] = this;
+    if (!window.activeMenus) window.activeMenus = new Array();
+    if (!window.menuContainers) window.menuContainers = new Array();
+    if (!window.mDrag) {
+        window.mDrag    = new Object();
+        //mDrag.startMenuDrag = startMenuDrag;
+        //mDrag.doMenuDrag    = doMenuDrag;
+        this.setMouseTracker();
+    }
+    if (window.MenuAPI) MenuAPI(this);
+}
+
+function addMenuItem(label, action, color, mouseover, mouseout) {
+    this.items[this.items.length] = label;
+    this.actions[this.actions.length] = action;
+    this.colors[this.colors.length] = color;
+    this.mouseovers[this.mouseovers.length] = mouseover;
+    this.mouseouts[this.mouseouts.length] = mouseout;
+}
+
+function addMenuSeparator() {
+    this.items[this.items.length] = "separator";
+    this.actions[this.actions.length] = "";
+    this.menuItemBorder = 0;
+}
+
+function writeMenus(container) {
+    if (!container && document.layers) {
+        if (eval("document.width")) 
+            container = new Layer(1000);
+    } else if (!container && document.all) {
+        if (!document.all["menuContainer"]) 
+            document.writeln('<SPAN ID="menuContainer"></SPAN>');
+        container = document.all["menuContainer"];
+    }else if (!container && document.getElementById) {
+      if (!document.getElementById("menuContainer")){ 
+        container = document.createElement("span");
+		container.id="menuContainer"
+	    document.body.appendChild(container);
+	  }
+    }
+		
+    if (!container && !window.delayWriteMenus) {
+        window.delayWriteMenus = this.writeMenus;
+        window.menuContainerBgColor = this.menuContainerBgColor;
+        setTimeout('delayWriteMenus()', 3000);
+        return;
+    }
+    container.isContainer = "menuContainer" + menuContainers.length;
+    menuContainers[menuContainers.length] = container;
+    container.menus = new Array();
+    for (var i=0; i<window.menus.length; i++) 
+        container.menus[i] = window.menus[i];
+    window.menus.length = 0;
+    var countMenus = 0;
+    var countItems = 0;
+    var top = 0;
+    var content = '';
+    var proto;
+    for (var i=0; i<container.menus.length; i++, countMenus++) {
+        var menu = container.menus[i];
+        proto = menu.prototypeStyles || this.prototypeStyles || menu;
+        content += ''+
+        '<DIV ID="menuLayer'+ countMenus +'" STYLE="cursor:hand;position:absolute;left:10px;top:'+ (i * 100) +'px;visibility:hidden;">\n'+
+        '  <DIV ID="menuLite'+ countMenus +'" STYLE="cursor:hand;position:absolute;left:'+ proto.menuBorder +'px;top:'+ proto.menuBorder +'px;visibility:hide;" onMouseOut="hideMenu(event);">\n'+
+        '    <DIV ID="menuFg'+ countMenus +'" STYLE="cursor:hand;position:absolute;left:1px;top:1px;visibility:hide;">\n'+
+        '';
+        var x=i;
+        for (var i=0; i<menu.items.length; i++) {
+            var item = menu.items[i];
+            var childMenu = false;
+            var defaultHeight = 20;
+            var defaultIndent = 15;
+            if (item.label) {
+                item = item.label;
+                childMenu = true;
+            } else if (item.indexOf(".gif") != -1 && item.indexOf("<IMG") == -1) {
+                item = '<IMG SRC="' + item + '" NAME="menuItem'+ countItems +'Img">';
+                defaultIndent = 0;
+                if (document.layers) {
+                    defaultHeight = null;
+                }
+            }
+            proto.menuItemHeight = proto.menuItemHeight || defaultHeight;
+            proto.menuItemIndent = proto.menuItemIndent || defaultIndent;
+            var itemProps = 'visibility:hide;font-Family:' + proto.fontFamily +';font-Weight:' + proto.fontWeight + ';fontSize:' + proto.fontSize + ';';
+            if (document.getElementById || document.all) 
+                itemProps += 'font-size:' + proto.fontSize + ';" onMouseOver="onMenuItemOver(event,this);" onMouseOut="onMenuItemOut(event,this);" onClick="onMenuItemAction(event,this);';
+            var dTag    = '<DIV  class="menuItemText" ID="menuItem'+ countItems +'" STYLE="cursor:hand;position:absolute;left:0;top:'+ (i * proto.menuItemHeight) +';'+ itemProps +'">';
+            var dText   = '<DIV ID="menuItemText'+ countItems +'" STYLE="cursor:hand;position:absolute;left:' + proto.menuItemIndent + 'px;top:0;color:'+ proto.fontColor +';">'+ item +'</DIV>\n<DIV ID="menuItemHilite'+ countItems +'" STYLE="cursor:hand;position:absolute;left:' + proto.menuItemIndent + 'px;top:0;color:'+ proto.fontColorHilite +';visibility:hidden;">'+ item +'</DIV>';
+            if (item == "separator") {
+                content += ( dTag + '<DIV ID="menuSeparator'+ countItems +'" STYLE="position:absolute;left:1;top:2;"></DIV>\n<DIV ID="menuSeparatorLite'+ countItems +'" STYLE="position:absolute;left:1;top:2;"></DIV>\n</DIV>');
+            } else if (childMenu) {
+                content += ( dTag + dText + '<DIV ID="childMenu'+ countItems +'" STYLE="cursor:hand;position:absolute;left:0;top:3;'+ itemProps +'"><IMG SRC="'+ proto.childMenuIcon +'"></DIV>\n</DIV>');
+            } else {
+                content += ( dTag + dText + '</DIV>');
+            }
+            countItems++;
+        }
+        content += '      <DIV ID="focusItem'+ countMenus +'" STYLE="cursor:hand;position:absolute;left:0;top:0;visibility:hide;" onClick="onMenuItemAction(null,this);">&nbsp;</DIV>\n';
+        content += '   </DIV>\n  </DIV>\n</DIV>\n';
+        i=x;
+    }
+    if (!container) return;
+    if (container.innerHTML) {
+        container.innerHTML=content;
+    } else {
+        if (document.getElementById && !document.all)
+          container.innerHTML=content;		
+		else{
+          container.document.open("text/html");
+          container.document.writeln(content);
+          container.document.close();
+		}  
+    }
+    proto = null;
+    if (document.layers) {
+        container.clip.width = window.innerWidth;
+        container.clip.height = window.innerHeight;
+        container.onmouseout = this.hideMenu;
+        container.menuContainerBgColor = this.menuContainerBgColor;
+        for (var i=0; i<container.document.layers.length; i++) {
+            proto = container.menus[i].prototypeStyles || this.prototypeStyles || container.menus[i];
+            var menu = container.document.layers[i];
+            container.menus[i].menuLayer = menu;
+            container.menus[i].menuLayer.Menu = container.menus[i];
+            container.menus[i].menuLayer.Menu.container = container;
+            var body = menu.document.layers[0].document.layers[0];
+            body.clip.width = proto.menuWidth || body.clip.width;
+            body.clip.height = proto.menuHeight || body.clip.height;
+            for (var n=0; n<body.document.layers.length-1; n++) {
+                var l = body.document.layers[n];
+                l.Menu = container.menus[i];
+                l.menuHiliteBgColor = proto.menuHiliteBgColor;
+                l.document.bgColor = proto.menuItemBgColor;
+                l.saveColor = proto.menuItemBgColor;
+                l.mouseout  = l.Menu.mouseouts[n];
+                l.mouseover = l.Menu.mouseovers[n];
+                l.onmouseover = proto.onMenuItemOver;
+                l.onclick = proto.onMenuItemAction;
+                l.action = container.menus[i].actions[n];
+                l.focusItem = body.document.layers[body.document.layers.length-1];
+                l.clip.width = proto.menuItemWidth || body.clip.width + proto.menuItemIndent;
+                l.clip.height = proto.menuItemHeight || l.clip.height;
+                if (n>0) l.top = body.document.layers[n-1].top + body.document.layers[n-1].clip.height + proto.menuItemBorder;
+                l.hilite = l.document.layers[1];
+                l.document.layers[1].isHilite = true;
+                if (l.document.layers[0].id.indexOf("menuSeparator") != -1) {
+                    l.hilite = null;
+                    l.clip.height -= l.clip.height / 2;
+                    l.document.layers[0].document.bgColor = proto.bgColor;
+                    l.document.layers[0].clip.width = l.clip.width -2;
+                    l.document.layers[0].clip.height = 1;
+                    l.document.layers[1].document.bgColor = proto.menuLiteBgColor;
+                    l.document.layers[1].clip.width = l.clip.width -2;
+                    l.document.layers[1].clip.height = 1;
+                    l.document.layers[1].top = l.document.layers[0].top + 1;
+                } else if (l.document.layers.length > 2) {
+                    l.childMenu = container.menus[i].items[n].menuLayer;
+                    l.icon = proto.childMenuIcon;
+                    l.iconHilite = proto.childMenuIconHilite;
+                    l.document.layers[2].left = l.clip.width -13;
+                    l.document.layers[2].top = (l.clip.height / 2) -4;
+                    l.document.layers[2].clip.left += 3;
+                    l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
+                }
+            }
+            body.document.bgColor = proto.bgColor;
+            body.clip.width  = l.clip.width +1;
+            body.clip.height = l.top + l.clip.height +1;
+            body.document.layers[n].clip.width = body.clip.width;
+            body.document.layers[n].captureEvents(Event.MOUSEDOWN);
+            body.document.layers[n].onmousedown = proto.onMenuItemDown;
+            //body.document.layers[n].onfocus = proto.onMenuItemDown;
+            body.document.layers[n].onmouseout = proto.onMenuItemOut;
+            body.document.layers[n].Menu = l.Menu;
+            body.document.layers[n].top = -30;
+            menu.document.bgColor = proto.menuBorderBgColor;
+            menu.document.layers[0].document.bgColor = proto.menuLiteBgColor;
+            menu.document.layers[0].clip.width = body.clip.width +1;
+            menu.document.layers[0].clip.height = body.clip.height +1;
+            menu.clip.width = body.clip.width + (proto.menuBorder * 2) +1;
+            menu.clip.height = body.clip.height + (proto.menuBorder * 2) +1;
+            if (menu.Menu.enableTracker) {
+                menu.Menu.disableHide = true;
+                //setMenuTracker(menu.Menu);
+            }
+        }
+    } else if (document.all) {
+        var menuCount = 0;
+        for (var x=0; x<container.menus.length; x++) {
+            var menu = container.document.all("menuLayer" + x);
+            container.menus[x].menuLayer = menu;
+            container.menus[x].menuLayer.Menu = container.menus[x];
+            container.menus[x].menuLayer.Menu.container = menu;
+            proto = container.menus[x].prototypeStyles || this.prototypeStyles || container.menus[x];
+            proto.menuItemWidth = proto.menuItemWidth || 200;
+            menu.style.backgroundColor = proto.menuBorderBgColor;
+            for (var i=0; i<container.menus[x].items.length; i++) {
+                var l = container.document.all["menuItem" + menuCount];
+                l.Menu = container.menus[x];
+                proto = container.menus[x].prototypeStyles || this.prototypeStyles || container.menus[x];
+                l.style.pixelWidth = proto.menuItemWidth;
+                l.style.pixelHeight = proto.menuItemHeight;
+                if (i>0) l.style.pixelTop = container.document.all["menuItem" + (menuCount -1)].style.pixelTop + container.document.all["menuItem" + (menuCount -1)].style.pixelHeight + proto.menuItemBorder;
+                l.style.fontSize = proto.fontSize;
+                l.style.backgroundColor = proto.menuItemBgColor;
+                l.style.visibility = "inherit";
+                l.saveColor = proto.menuItemBgColor;
+                l.menuHiliteBgColor = proto.menuHiliteBgColor;
+                l.action = container.menus[x].actions[i];
+                l.hilite = container.document.all["menuItemHilite" + menuCount];
+                l.focusItem = container.document.all["focusItem" + x];
+                l.focusItem.style.pixelTop = -30;
+                l.mouseover = l.Menu.mouseovers[x];
+                l.mouseout  = l.Menu.mouseouts[x];
+                var childItem = container.document.all["childMenu" + menuCount];
+                if (childItem) {
+                    l.childMenu = container.menus[x].items[i].menuLayer;
+                    childItem.style.pixelLeft = l.style.pixelWidth -11;
+                    childItem.style.pixelTop = (l.style.pixelHeight /2) -4;
+                    childItem.style.pixelWidth = 30 || 7;
+                    childItem.style.clip = "rect(0 7 7 3)";
+                    l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
+                }
+                var sep = container.document.all["menuSeparator" + menuCount];
+                if (sep) {
+                    sep.style.clip = "rect(0 " + (proto.menuItemWidth - 3) + " 1 0)";
+                    sep.style.backgroundColor = proto.bgColor;
+                    sep = container.document.all["menuSeparatorLite" + menuCount];
+                    sep.style.clip = "rect(1 " + (proto.menuItemWidth - 3) + " 2 0)";
+                    sep.style.backgroundColor = proto.menuLiteBgColor;
+                    l.style.pixelHeight = proto.menuItemHeight/2;
+                    l.isSeparator = true
+                }
+                menuCount++;
+            }
+            proto.menuHeight = (l.style.pixelTop + l.style.pixelHeight);
+            var lite = container.document.all["menuLite" + x];
+            lite.style.pixelHeight = proto.menuHeight +2;
+            lite.style.pixelWidth = proto.menuItemWidth + 2;
+            lite.style.backgroundColor = proto.menuLiteBgColor;
+            var body = container.document.all["menuFg" + x];
+            body.style.pixelHeight = proto.menuHeight + 1;
+            body.style.pixelWidth = proto.menuItemWidth + 1;
+            body.style.backgroundColor = proto.bgColor;
+            container.menus[x].menuLayer.style.pixelWidth  = proto.menuWidth || proto.menuItemWidth + (proto.menuBorder * 2) +2;
+            container.menus[x].menuLayer.style.pixelHeight = proto.menuHeight + (proto.menuBorder * 2) +2;
+            if (menu.Menu.enableTracker) {
+                menu.Menu.disableHide = true;
+                //setMenuTracker(menu.Menu);
+            }
+        }
+        container.document.all("menuContainer").style.backgroundColor = container.menus[0].menuContainerBgColor;
+        container.document.saveBgColor = container.document.bgColor;
+    }else if (document.getElementById) {
+        var menuCount = 0;
+        for (var x=0; x<container.menus.length; x++) {
+            var menu = document.getElementById("menuLayer" + x);
+            container.menus[x].menuLayer = menu;
+            container.menus[x].menuLayer.Menu = container.menus[x];
+            container.menus[x].menuLayer.Menu.container = menu;
+            proto = container.menus[x].prototypeStyles || this.prototypeStyles || container.menus[x];
+            proto.menuItemWidth = proto.menuItemWidth || 200;
+            menu.style.backgroundColor = proto.menuBorderBgColor;
+            var l = document.getElementById("menuItem" + menuCount)
+
+            for (var i=0; i<container.menus[x].items.length; i++) {
+                l = document.getElementById("menuItem" + menuCount);
+                l.Menu = container.menus[x];
+                proto = container.menus[x].prototypeStyles || this.prototypeStyles || container.menus[x];		
+                l.style.width = proto.menuItemWidth + "px";
+                l.style.height = proto.menuItemHeight + "px";
+                if (i>0) l.style.top = (parseInt(document.getElementById("menuItem" + (menuCount -1)).style.top,10) + parseInt(document.getElementById("menuItem" + (menuCount -1)).style.height,10) + proto.menuItemBorder) + "px";
+                l.style.fontSize = proto.fontSize;
+                l.style.backgroundColor = proto.menuItemBgColor;
+                l.style.visibility = "inherit";
+                l.saveColor = proto.menuItemBgColor;
+                l.menuHiliteBgColor = proto.menuHiliteBgColor;
+                l.action = container.menus[x].actions[i];
+                l.hilite = document.getElementById("menuItemHilite" + menuCount);
+                l.focusItem = document.getElementById("focusItem" + x);
+                l.focusItem.style.top = -30 + "px";
+				
+                l.mouseover = l.Menu.mouseovers[x];
+                l.mouseout  = l.Menu.mouseouts[x];
+                var childItem = document.getElementById("childMenu" + menuCount);
+                if (childItem) {
+                    l.childMenu = container.menus[x].items[i].menuLayer;
+                    childItem.style.left = (l.style.width -11) + "px";
+                    childItem.style.top = ((l.style.height /2) -4) + "px";
+                    childItem.style.width = (30 || 7) + "px";
+                    childItem.style.clip = "rect(0px 7px 7px 3px)";
+                    l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
+                }
+                var sep = document.getElementById("menuSeparator" + menuCount);
+                if (sep) {
+                    sep.style.clip = "rect(0 " + (proto.menuItemWidth - 3) + "px 1px 0)";
+                    sep.style.backgroundColor = proto.bgColor;
+                    sep = document.getElementById("menuSeparatorLite" + menuCount);
+                    sep.style.clip = "rect(1px " + (proto.menuItemWidth - 3) + "px 2px 0)";
+                    sep.style.backgroundColor = proto.menuLiteBgColor;
+                    l.style.height = (proto.menuItemHeight/2) + "px" ;
+                    l.isSeparator = true
+                }
+                menuCount++;
+            }
+            proto.menuHeight = (parseInt(l.style.top,10) + parseInt(l.style.height,10));
+            var lite = document.getElementById("menuLite" + x);
+            lite.style.height = (proto.menuHeight +2) + "px";
+            lite.style.width = (proto.menuItemWidth + 2) + "px";
+            lite.style.backgroundColor = proto.menuLiteBgColor;
+            var body = document.getElementById("menuFg" + x);
+            body.style.height = (proto.menuHeight + 1) + "px";
+            body.style.width = (proto.menuItemWidth + 1) + "px";
+            body.style.backgroundColor = proto.bgColor;
+
+            container.menus[x].menuLayer.style.width  = (proto.menuWidth || proto.menuItemWidth + (proto.menuBorder * 2) +2) + "px";
+            container.menus[x].menuLayer.style.height = (proto.menuHeight + (proto.menuBorder * 2) +2) + "px";
+            if (menu.Menu.enableTracker) {
+                menu.Menu.disableHide = true;
+                //setMenuTracker(menu.Menu);
+            }
+        }
+        document.getElementById("menuContainer").style.backgroundColor = container.menus[0].menuContainerBgColor;
+        container.saveBgColor = container.bgColor;
+    }	
+    window.wroteMenu = true;
+}
+
+function onMenuItemOver(e, l, a) {
+    l = l || this;
+    a = a || window.ActiveMenuItem;
+    if (document.layers) {
+        if (a) {
+            a.document.bgColor = a.saveColor;
+            if (a.hilite) a.hilite.visibility = "hidden";
+            if (a.childMenu) a.document.layers[1].document.images[0].src = a.icon;
+        } else {
+            a = new Object();
+        }
+        if (this.mouseover && this.id != a.id) {
+            if (this.mouseover.length > 4) {
+                var ext = this.mouseover.substring(this.mouseover.length-4);
+                if (ext == ".gif" || ext == ".jpg") {
+                    this.document.layers[1].document.images[0].src = this.mouseover;
+                } else {
+                    eval("" + this.mouseover);
+                }
+            }
+        }
+        if (l.hilite) {
+            l.document.bgColor = l.menuHiliteBgColor;
+            l.zIndex = 1;
+            l.hilite.visibility = "inherit";
+            l.hilite.zIndex = 2;
+            l.document.layers[1].zIndex = 1;
+            l.focusItem.zIndex = this.zIndex +2;
+        }
+        l.focusItem.top = this.top;
+        //l.Menu.hideChildMenu(l);
+    } else if (document.all && l.style && l.Menu) {
+        document.onmousedown=l.Menu.onMenuItemDown;
+        if (a) {
+            a.style.backgroundColor = a.saveColor;
+            if (a.hilite) a.hilite.style.visibility = "hidden";
+        } else {
+            a = new Object();
+		}
+        if (l.mouseover && l.id != a.id) {
+            if (l.mouseover.length > 4) {
+                var ext = l.mouseover.substring(l.mouseover.length-4);
+                if (ext == ".gif" || ext == ".jpg") {
+                    l.document.images[l.id + "Img"].src = l.mouseover;
+                } else {
+                    eval("" + l.mouseover);
+                }
+            }
+        }
+		if (l.isSeparator) return;
+        l.style.backgroundColor = l.menuHiliteBgColor;
+        if (l.hilite) {
+            l.style.backgroundColor = l.menuHiliteBgColor;
+            l.hilite.style.visibility = "inherit";
+        }
+        l.focusItem.style.pixelTop = l.style.pixelTop;
+        l.focusItem.style.zIndex = l.zIndex +1;
+        l.zIndex = 1;
+        //l.Menu.hideChildMenu(l);
+    } else if (document.getElementById){
+        document.onmousedown=l.Menu.onMenuItemDown;	
+        if (a) {
+	        a.style.backgroundColor = a.saveColor;
+    	    if (a.hilite) a.hilite.style.visibility = "hidden";
+        } else {
+            a = new Object();
+        }
+        if (this.mouseover && this.id != a.id) {
+            if (this.mouseover.length > 4) {
+                var ext = this.mouseover.substring(this.mouseover.length-4);
+                if (ext == ".gif" || ext == ".jpg") {
+                    document.images[l.id + "Img"].src = this.mouseover;
+                } else {
+                    eval("" + this.mouseover);
+                }
+            }
+        }
+        if (l.hilite) {
+	        l.style.backgroundColor = l.menuHiliteBgColor;
+            l.hilite.style.visibility = "inherit";
+        }
+        l.focusItem.style.top = l.style.top;
+        l.focusItem.style.zIndex = l.zIndex +1;
+        l.zIndex = 1;
+        //l.Menu.hideChildMenu(l);
+	}		
+    window.ActiveMenuItem = l;
+}
+
+function onMenuItemOut(e, l, a) {
+    if (!document.all && !document.layers && e.currentTarget.nodeType == 1 && e.currentTarget.tagName == 'DIV')
+      return true;
+    l = l || this;
+	a = a || window.ActiveMenuItem;
+    if (l.id.indexOf("focusItem")) {
+        if (a && l.top) {
+            l.top = -30;
+			if (a.mouseout && a.id != l.id) {
+				if (a.mouseout.length > 4) {
+					var ext = a.mouseout.substring(a.mouseout.length-4);
+					if (ext == ".gif" || ext == ".jpg") {
+						a.document.layers[1].document.images[0].src = a.mouseout;
+					} else {
+						eval("" + a.mouseout);
+					}
+				}
+			}
+        } else if (a && l.style) {
+            document.onmousedown=null;
+			if(window.event)
+              window.event.cancelBubble=true;
+			else
+			  e.cancelBubble=true;
+	        if (l.mouseout) {
+				if (l.mouseout.length > 4) {
+					var ext = l.mouseout.substring(l.mouseout.length-4);
+					if (ext == ".gif" || ext == ".jpg") {
+						l.document.images[l.id + "Img"].src = l.mouseout;
+					} else {
+						eval("" + l.mouseout);
+					}
+				}
+			}
+        }
+    }
+}
+
+function onMenuItemAction(e, l) {
+    l = window.ActiveMenuItem;
+    if (!l) return;
+//    if (!ActiveMenu.Menu.disableHide) hideActiveMenus(ActiveMenu.menuLayer);
+    if (l.action) {
+        eval("" + l.action);
+    }
+}
+
+function showMenu(menu, x, y, child) {
+    if (!window.wroteMenu) return;
+    if (document.layers) {
+        if (menu) {
+            var l = menu.menuLayer || menu;
+            if (typeof(menu) == "string") {
+                for (var n=0; n < menuContainers.length; n++) {
+                    l = menuContainers[n].menus[menu];
+                    for (var i=0; i<menuContainers[n].menus.length; i++) {
+                        if (menu == menuContainers[n].menus[i].label) l = menuContainers[n].menus[i].menuLayer;
+                        if (l) break;
+                    }
+                }
+				if (!l) return;
+            }
+            l.Menu.container.document.bgColor = null;
+            l.left = 1;
+            l.top = 1;
+            hideActiveMenus(l);
+            if (this.visibility) l = this;
+            window.ActiveMenu = l;
+            window.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);
+            setTimeout('if(window.ActiveMenu)window.ActiveMenu.Menu.setMouseTracker();', 300);
+        } else {
+            var l = child;
+        }
+        if (!l) return;
+        for (var i=0; i<l.layers.length; i++) {                
+            if (!l.layers[i].isHilite) 
+                l.layers[i].visibility = "inherit";
+            if (l.layers[i].document.layers.length > 0) 
+                showMenu(null, "relative", "relative", l.layers[i]);
+        }
+        if (l.parentLayer) {
+            if (x != "relative") 
+                l.parentLayer.left = x || window.pageX || 0;
+            if (l.parentLayer.left + l.clip.width > window.innerWidth) 
+                l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
+            if (y != "relative") 
+                l.parentLayer.top = y || window.pageY || 0;
+            if (l.parentLayer.isContainer) {
+                l.Menu.xOffset = window.pageXOffset;
+                l.Menu.yOffset = window.pageYOffset;
+                l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
+                l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
+                if (l.parentLayer.menuContainerBgColor) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
+            }
+        }
+        l.visibility = "inherit";
+        if (l.Menu) l.Menu.container.visibility = "inherit";
+    } else if (document.all) {
+        var l = menu.menuLayer || menu;
+        hideActiveMenus(l);
+        if (typeof(menu) == "string") {
+            l = document.all[menu];
+            for (var n=0; n < menuContainers.length; n++) {
+                l = menuContainers[n].menus[menu];
+                for (var i=0; i<menuContainers[n].menus.length; i++) {
+                    if (menu == menuContainers[n].menus[i].label) l = menuContainers[n].menus[i].menuLayer;
+                    if (l) break;
+                }
+            }
+        }
+        window.ActiveMenu = l;
+        l.style.visibility = "inherit";
+        if (x != "relative") 
+            l.style.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
+        if (y != "relative") 
+            l.style.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
+        l.Menu.xOffset = document.body.scrollLeft;
+        l.Menu.yOffset = document.body.scrollTop;
+    } else if (document.getElementById) {
+        var l = menu.menuLayer || menu;
+        hideActiveMenus(l);
+        if (typeof(menu) == "string") {
+            l = document.getElementById(menu);
+            for (var n=0; n < menuContainers.length; n++) {
+                l = menuContainers[n].menus[menu];
+                for (var i=0; i<menuContainers[n].menus.length; i++) {
+                    if (menu == menuContainers[n].menus[i].label) l = menuContainers[n].menus[i].menuLayer;
+                    if (l) break;
+                }
+            }
+        }
+        window.ActiveMenu = l;
+        l.style.visibility = "inherit";
+        if (x != "relative") 
+            l.style.left = (x || (window.pageX) || 0) + "px";
+        if (y != "relative") 
+            l.style.top = (y || (window.pageY) || 0) + "px";
+        l.Menu.xOffset = document.body.scrollLeft;
+        l.Menu.yOffset = document.body.scrollTop;
+    }
+	
+    if (menu) {
+        window.activeMenus[window.activeMenus.length] = l;
+    }
+}
+
+function hideMenu(e) {
+    if (!document.all && e.currentTarget && e.currentTarget.tagName && e.currentTarget.tagName == 'DIV')
+      return true;
+	  
+    var l = e || window.ActiveMenu;
+    if (!l) return true;
+    if (l.menuLayer) {
+        l = l.menuLayer;
+    } else if (this.visibility) {
+        l = this;
+    }
+    if (l.menuLayer) {
+        l = l.menuLayer;
+    }
+    var a = window.ActiveMenuItem;
+    document.saveMousemove = document.onmousemove;
+    document.onmousemove = mouseTracker;
+    if (a && document.layers) {
+        a.document.bgColor = a.saveColor;
+        a.focusItem.top = -30;
+        if (a.hilite) a.hilite.visibility = "hidden";
+        if (a.childMenu) a.document.layers[1].document.images[0].src = a.icon;
+        if (mDrag.oldX <= e.pageX+3 && mDrag.oldX >= e.pageX-3 && mDrag.oldY <= e.pageY+3 && mDrag.oldY >= e.pageY-3) {
+            if (a.action && window.ActiveMenu) setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 2);
+        }// else if (document.saveMousemove == mDrag.doMenuDrag) {
+         //   if (window.ActiveMenu) return true;
+        //}
+    } else if (window.ActiveMenu && document.all) {
+        document.onmousedown=null;
+        if (a) {
+            a.style.backgroundColor = a.saveColor;
+            if (a.hilite) a.hilite.style.visibility = "hidden";
+        }
+        //if (document.saveMousemove == mDrag.doMenuDrag) {
+        //    return true;
+        //}
+    } else if (window.ActiveMenu && document.getElementById) {
+        document.onmousedown=null;
+        if (a) {
+            a.style.backgroundColor = a.saveColor;
+            if (a.hilite) a.hilite.style.visibility = "hidden";
+        }
+        //if (document.saveMousemove == mDrag.doMenuDrag) {
+        //    return true;
+        //}
+	}		
+    if (window.ActiveMenu) {
+        if (window.ActiveMenu.Menu) {
+            if (window.ActiveMenu.Menu.disableHide) return true;
+            e = window.event || e;
+            if (!window.ActiveMenu.Menu.enableHideOnMouseOut && e.type == "mouseout") return true;
+        }
+    }
+    hideActiveMenus(l);
+    return true;
+}
+/*
+function hideChildMenu(menuLayer) {
+    var l = menuLayer || this;
+    for (var i=0; i < l.Menu.childMenus.length; i++) {
+        if (document.getElementById || document.all) {
+            l.Menu.childMenus[i].style.visibility = "hidden";
+        } else if (document.layers) {
+            l.Menu.childMenus[i].visibility = "hidden";
+        }
+        l.Menu.childMenus[i].Menu.hideChildMenu(l.Menu.childMenus[i]);
+    }
+    if (l.childMenu) {
+        if (document.layers) {
+            l.Menu.container.document.bgColor = null;
+            l.Menu.showMenu(null,null,null,l.childMenu.layers[0]);
+            l.childMenu.zIndex = l.parentLayer.zIndex +1;
+            l.childMenu.top = l.top + l.parentLayer.top + l.Menu.menuLayer.top;
+            if (l.childMenu.left + l.childMenu.clip.width > window.innerWidth) {
+                l.childMenu.left = l.parentLayer.left - l.childMenu.clip.width + l.Menu.menuLayer.top + 15;
+                l.Menu.container.clip.left -= l.childMenu.clip.width;
+            } else if (l.Menu.childMenuDirection == "left") {
+                l.childMenu.left = l.parentLayer.left - l.parentLayer.clip.width;
+                l.Menu.container.clip.left -= l.childMenu.clip.width;
+            } else {
+                l.childMenu.left = l.parentLayer.left + l.parentLayer.clip.width  + l.Menu.menuLayer.left -5;
+            }
+            l.Menu.container.clip.width += l.childMenu.clip.width +100;
+            l.Menu.container.clip.height += l.childMenu.clip.height;
+            l.document.layers[1].zIndex = 0;
+            l.document.layers[1].document.images[0].src = l.iconHilite;
+            l.childMenu.visibility = "inherit";
+        } else if (document.all) {
+            l.childMenu.style.zIndex = l.Menu.menuLayer.style.zIndex +1;
+            l.childMenu.style.pixelTop = l.style.pixelTop + l.Menu.menuLayer.style.pixelTop;
+            if (l.childMenu.style.pixelLeft + l.childMenu.style.pixelWidth > document.width) {
+                l.childMenu.style.pixelLeft = l.childMenu.style.pixelWidth + l.Menu.menuLayer.style.pixelTop + 15;
+            } else if (l.Menu.childMenuDirection == "left") {
+                //l.childMenu.style.pixelLeft = l.parentLayer.left - l.parentLayer.clip.width;
+            } else {
+                l.childMenu.style.pixelLeft = l.Menu.menuLayer.style.pixelWidth + l.Menu.menuLayer.style.pixelLeft -5;
+            }
+            l.childMenu.style.visibility = "inherit";
+        } else if (document.getElementById) {
+            l.childMenu.style.zIndex = l.Menu.menuLayer.style.zIndex +1;
+            l.childMenu.style.top = (parseInt(l.style.top,10) + parseInt(l.Menu.menuLayer.style.top, 10)) + "px";
+            if ( parseInt(l.childMenu.style.left) + parseInt(l.childMenu.style.width) > document.width) {
+                l.childMenu.style.left = (parseInt(l.childMenu.style.width,10) + parseInt(l.Menu.menuLayer.style.top,10) + 15) + "px";
+            } else if (l.Menu.childMenuDirection == "left") {
+                //l.childMenu.style.pixelLeft = l.parentLayer.left - l.parentLayer.clip.width;
+            } else {
+                l.childMenu.style.left = (parseInt(l.Menu.menuLayer.style.width,10) + parseInt(l.Menu.menuLayer.style.left,10) -5) + "px";
+            }
+            l.childMenu.style.visibility = "inherit";
+        }		
+		
+        if (!l.childMenu.disableHide) 
+            window.activeMenus[window.activeMenus.length] = l.childMenu;
+    }
+}
+*/
+function hideActiveMenus(l) {
+    if (!window.activeMenus) return;
+    for (var i=0; i < window.activeMenus.length; i++) {
+    if (!activeMenus[i]) return;
+   	    if (document.layers && activeMenus[i].visibility && activeMenus[i].Menu) {
+            activeMenus[i].visibility = "hidden";
+            activeMenus[i].Menu.container.visibility = "hidden";
+            activeMenus[i].Menu.container.clip.left = 0;
+        } else if (activeMenus[i].style) {
+            activeMenus[i].style.visibility = "hidden";
+        }
+    }
+    document.onmousemove = mouseTracker;
+    window.activeMenus.length = 0;
+}
+
+function mouseTracker(e) {
+    e = e || window.Event || window.event;
+    window.pageX = parseInt(e.pageX,10) || e.clientX;
+    window.pageY = parseInt(e.pageY,10) || e.clientY;
+}
+
+function setMouseTracker() {
+    if (document.captureEvents) {
+        document.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
+    }
+    document.onmousemove = this.mouseTracker;
+    document.onmouseup = this.hideMenu;
+}
+/*
+function setMenuTracker(menu) {
+    if (!window.menuTrackers) window.menuTrackers = new Array();
+    menuTrackers[menuTrackers.length] = menu;
+    window.menuTrackerID = setInterval('menuTracker()',10);
+}
+
+function menuTracker() {
+    for (var i=0; i < menuTrackers.length; i++) {
+        if (!isNaN(menuTrackers[i].xOffset) && document.layers) {
+            var off = parseInt((menuTrackers[i].xOffset - window.pageXOffset) / 10);
+            if (isNaN(off)) off = 0;
+            if (off < 0) {
+                menuTrackers[i].container.left += -off;
+                menuTrackers[i].xOffset += -off;
+            } else if (off > 0) {
+                menuTrackers[i].container.left += -off;
+                menuTrackers[i].xOffset += -off;
+            }
+        }
+        if (!isNaN(menuTrackers[i].yOffset) && document.layers) {
+            var off = parseInt((menuTrackers[i].yOffset - window.pageYOffset) / 10);
+            if (isNaN(off)) off = 0;
+            if (off < 0) {
+                menuTrackers[i].container.top += -off;
+                menuTrackers[i].yOffset += -off;
+            } else if (off > 0) {
+                menuTrackers[i].container.top += -off;
+                menuTrackers[i].yOffset += -off;
+            }
+        }
+        if (!isNaN(menuTrackers[i].xOffset) && document.body) {
+            var off = parseInt((menuTrackers[i].xOffset - document.body.scrollLeft) / 10);
+            if (isNaN(off)) off = 0;
+            if (off < 0) {
+                menuTrackers[i].menuLayer.style.pixelLeft += -off;
+                menuTrackers[i].xOffset += -off;
+            } else if (off > 0) {
+                menuTrackers[i].menuLayer.style.pixelLeft += -off;
+                menuTrackers[i].xOffset += -off;
+            }
+        }
+        if (!isNaN(menuTrackers[i].yOffset) && document.body) {
+            var off = parseInt((menuTrackers[i].yOffset - document.body.scrollTop) / 10);
+            if (isNaN(off)) off = 0;
+            if (off < 0) {
+                menuTrackers[i].menuLayer.style.pixelTop += -off;
+                menuTrackers[i].yOffset += -off;
+            } else if (off > 0) {
+                menuTrackers[i].menuLayer.style.pixelTop += -off;
+                menuTrackers[i].yOffset += -off;
+            }
+        }
+    }
+}
+*/
+function onMenuItemDown(e, l) {
+    l = l || window.ActiveMenuItem || this;
+    if (!l.Menu) {
+    } else {
+        if (document.layers) {
+            mDrag.dragLayer = l.Menu.container;
+            //mDrag.startMenuDrag(e);
+            document.captureEvents(Event.MOUSEMOVE);			
+        } else if (document.all) {
+            mDrag.dragLayer = l.Menu.container.style;
+            //mDrag.startMenuDrag(e);
+            window.event.cancelBubble=true;
+        } else if (document.getElementById) {
+            mDrag.dragLayer = l.Menu.container.style;
+            //mDrag.startMenuDrag(e);
+            document.captureEvents(Event.MOUSEMOVE);			
+        }
+        var x = !document.all? e.pageX : window.event.clientX;
+        var y = !document.all? e.pageY : window.event.clientY;
+    
+    }
+}
+/*
+function startMenuDrag(e) {
+    if (document.layers) {
+        if (e.which > 1) {
+            if (window.ActiveMenu) ActiveMenu.Menu.container.visibility = "hidden";
+            window.ActiveMenu = null;
+            return true;
+        }
+        document.captureEvents(Event.MOUSEMOVE);
+        var x = e.pageX;
+        var y = e.pageY;
+    } else if (document.all) {
+        var x = window.event.clientX;
+        var y = window.event.clientY;
+    } else if (document.getElementById) {
+        if (e.which > 1) {
+            if (window.ActiveMenu) ActiveMenu.Menu.container.visibility = "hidden";
+            window.ActiveMenu = null;
+            return true;
+        }
+        document.captureEvents(Event.MOUSEMOVE);
+        var x = e.pageX;
+        var y = e.pageY;
+    }
+	
+    mDrag.offX = x;
+    mDrag.offY = y;
+    mDrag.oldX = x;
+    mDrag.oldY = y;
+    if (!ActiveMenu.Menu.disableDrag) document.onmousemove = mDrag.doMenuDrag;
+    return false;
+}
+
+function doMenuDrag(e) {
+    if (document.layers) {
+        mDrag.dragLayer.moveBy(e.pageX-mDrag.offX,e.pageY-mDrag.offY);
+        mDrag.offX = e.pageX;
+        mDrag.offY = e.pageY;
+    } else if(document.all) {
+        mDrag.dragLayer.pixelLeft = window.event.offsetX;
+        mDrag.dragLayer.pixelTop  = window.event.offsetY;
+        return false; //for IE
+    } else if (document.getElementById){
+//    alert(mDrag.dragLayer.left)
+        mDrag.dragLayer.left = e.pageX + "px";
+        mDrag.dragLayer.top  = e.pageY  + "px";	
+	}
+}*/
Index: /tags/contactcenter/1.20/js/moo.fx.js
===================================================================
--- /tags/contactcenter/1.20/js/moo.fx.js	(revision 2)
+++ /tags/contactcenter/1.20/js/moo.fx.js	(revision 2)
@@ -0,0 +1,175 @@
+/*
+moo.fx, simple effects library built with prototype.js (http://prototype.conio.net).
+by Valerio Proietti (http://mad4milk.net) MIT-style LICENSE.
+for more info (http://moofx.mad4milk.net).
+10/24/2005
+v(1.0.2)
+*/
+var Class = {
+  create: function() {
+    return function() { 
+      this.initialize.apply(this, arguments);
+    }
+  }
+}
+
+Object.extend = function(destination, source) {
+  for (property in source) {
+    destination[property] = source[property];
+  }
+  return destination;
+}
+
+Function.prototype.bind = function(object) {
+  var __method = this;
+  return function() {
+    return __method.apply(object, arguments);
+  }
+}
+
+function $() {
+  var elements = new Array();
+
+  for (var i = 0; i < arguments.length; i++) {
+    var element = arguments[i];
+    if (typeof element == 'string')
+      element = document.getElementById(element);
+
+    if (arguments.length == 1) 
+      return element;
+
+    elements.push(element);
+  }
+
+  return elements;
+}
+
+
+if (!window.Element) {
+  var Element = new Object();
+}
+
+Object.extend(Element, {
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+  },
+
+  hasClassName: function(element, className) {
+    element = $(element);
+    if (!element)
+      return;
+    var a = element.className.split(' ');
+    for (var i = 0; i < a.length; i++) {
+      if (a[i] == className)
+        return true;
+    }
+    return false;
+  },
+
+  addClassName: function(element, className) {
+    element = $(element);
+    Element.removeClassName(element, className);
+    element.className += ' ' + className;
+  },
+  
+  removeClassName: function(element, className) {
+    element = $(element);
+    if (!element)
+      return;
+    var newClassName = '';
+    var a = element.className.split(' ');
+    for (var i = 0; i < a.length; i++) {
+      if (a[i] != className) {
+        if (i > 0)
+          newClassName += ' ';
+        newClassName += a[i];
+      }
+    }
+    element.className = newClassName;
+  },
+  
+  // removes whitespace-only text node children
+  cleanWhitespace: function(element) {
+    element = $(element);
+    for (var i = 0; i < element.childNodes.length; i++) {
+      var node = element.childNodes[i];
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) 
+        Element.remove(node);
+    }
+  }
+});
+//base
+var fx = new Object();
+fx.Base = function(){};
+fx.Base.prototype = {
+	setOptions: function(options) {
+	this.options = {
+		duration: 500,
+		onComplete: ''
+	}
+	Object.extend(this.options, options || {});
+	},
+
+	go: function() {
+		this.duration = this.options.duration;
+		this.startTime = (new Date).getTime();
+		this.timer = setInterval (this.step.bind(this), 13);
+	},
+
+	step: function() {
+		var time  = (new Date).getTime();
+		var Tpos   = (time - this.startTime) / (this.duration);
+		if (time >= this.duration+this.startTime) {
+			this.now = this.to;
+			clearInterval (this.timer);
+			this.timer = null;
+			if (this.options.onComplete) setTimeout(this.options.onComplete.bind(this), 10);
+		}
+		else {
+			this.now = ((-Math.cos(Tpos*Math.PI)/2) + 0.5) * (this.to-this.from) + this.from;
+			//this time-position, sinoidal transition thing is from script.aculo.us
+		}
+		this.increase();
+	},
+
+	custom: function(from, to) {
+		if (this.timer != null) return;
+		this.from = from;
+		this.to = to;
+		this.go();
+	},
+
+	hide: function() {
+		this.now = 0;
+		this.increase();
+	},
+
+	clearTimer: function() {
+		clearInterval(this.timer);
+		this.timer = null;
+	}
+}
+//fader
+fx.Opacity = Class.create();
+fx.Opacity.prototype = Object.extend(new fx.Base(), {
+	initialize: function(el, options) {
+		this.el = $(el);
+		this.now = 1;
+		this.increase();
+		this.setOptions(options);
+	},
+
+	increase: function() {
+		if (this.now == 1) this.now = 0.9999;
+		if (this.now > 0 && this.el.style.visibility == "hidden") this.el.style.visibility = "visible";
+		if (this.now == 0) this.el.style.visibility = "hidden";
+		if (window.ActiveXObject) this.el.style.filter = "alpha(opacity=" + this.now*100 + ")";
+		this.el.style.opacity = this.now;
+	},
+
+	toggle: function() {
+		if (this.now > 0) this.custom(1, 0);
+		else this.custom(0, 1);
+	}
+});
Index: /tags/contactcenter/1.20/js/ccQuickAddContact.js
===================================================================
--- /tags/contactcenter/1.20/js/ccQuickAddContact.js	(revision 285)
+++ /tags/contactcenter/1.20/js/ccQuickAddContact.js	(revision 285)
@@ -0,0 +1,188 @@
+	function cQuickAddContact ()
+	{
+		this.arrayWin = new Array();
+		this.el;
+		this._nFields = Element('ccQAnFields').value;
+	}
+
+	
+	cQuickAddContact.prototype.showList = function(id){
+		_this = this;
+		var handler = function (responseText) {
+			var contacts = unserialize(responseText);
+			var title = contacts['names_ordered'];			
+			el = document.createElement("DIV");									
+			el.style.visibility = "hidden";									
+			el.style.position = "absolute";
+			el.style.left = "0px";
+			el.style.top = "0px";
+			el.style.width = "0px";
+			wHeight = Element('ccQAWinHeight').value;
+			el.style.height = wHeight + 'px';
+			el.className = "div_cc_rectQuickAddContact";
+			el.id = id+':cc_rectQuickAddContact';																							
+			document.body.appendChild(el);																
+			el.innerHTML = "";								
+
+			var fieldsTop = 10;
+			var fieldsSpace = 30;
+			fields = new Array(Element('cc_qa_alias').value, Element('cc_qa_given_names').value, Element('cc_qa_family_names').value, Element('cc_qa_phone').value, Element('cc_qa_email').value);
+			
+			for (i=0; i<fields.length; i++) {
+				var contact = contacts[i] != null ? contacts[i] : '';
+				el.innerHTML += '<span id="ccQuickAddCT' + i + id + '" style="position: absolute; top: ' +  (fieldsTop+i*fieldsSpace) + 'px; left: 5px; width: 100px; text-align: right; border: 0px solid #999;">' + fields[i] + '</span>';
+				if (i == 0)
+				{
+					el.innerHTML += '<input id="ccQuickAddCI' + i + id + '" type="text" value="' + contact + '" maxlength="30" style="position: absolute; top: ' + (fieldsTop+i*fieldsSpace) + 'px; left: 110px; width: 135px;">';
+				}
+				else if (i == 4)
+				{
+					el.innerHTML += '<input id="ccQuickAddCI' + i + id + '" type="text" value="' + contact + '" maxlength="100" style="position: absolute; top: ' + (fieldsTop+i*fieldsSpace) + 'px; left: 110px; width: 135px;">';
+				}
+				else
+				{
+					el.innerHTML += '<input id="ccQuickAddCI' + i + id + '" type="text" value="' + contact + '" maxlength="50" style="position: absolute; top: ' + (fieldsTop+i*fieldsSpace) + 'px; left: 110px; width: 135px;">';
+				}				
+			}
+			
+			el.innerHTML +='<div id="ccQAFuncitons" style="border: 0px solid black; width: 220px; height: 20px">' +
+				'<input title="' + Element('cc_qa_save').value + '"  type="button" onclick="ccQuickAddContact.send(\'' + id + '\');" value="' + Element('cc_qa_save').value + '" style="position: absolute; top: ' + (fieldsTop+i*fieldsSpace) + 'px; left: 75px; width: 60px" />' +
+				'<input title="' + Element('cc_qa_close').value + '" type="button" onclick="ccQuickAddContact.fechar(\'' + id + '\');" value="' + Element('cc_qa_close').value + '" style="position: absolute; top: ' + (fieldsTop+i*fieldsSpace) + 'px; left: 140px; width: 60px" />' +
+				'</div>';
+			el.innerHTML +=	"<br>";
+								
+			_this.showWindow(el);
+		}
+		
+		div = document.getElementById(id+':cc_rectQuickAddContact');
+				
+		if(div)
+			this.showWindow(div);
+		else {
+			Connector.newRequest('get_catalog_add_contact', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_catalog_add_contact', 'POST', handler, 'id='+id);
+		}
+	}
+	
+	cQuickAddContact.prototype.showWindow = function (div)
+	{						
+		if(! this.arrayWin[div.id]) {
+
+			win = new dJSWin({			
+				id: 'ccQuickAddContact_'+div.id,
+				content_id: div.id,
+				width: '255px',
+				height: wHeight+'px',
+				title_color: '#3978d6',
+				bg_color: '#eee',
+				title: Element('ccQATitle').value,						
+				title_text_color: 'white',
+				button_x_img: Element('cc_phpgw_img_dir').value+'/winclose.gif',
+				border: true });
+			
+			this.arrayWin[div.id] = win;
+			win.draw();			
+		}
+		else {
+			win = this.arrayWin[div.id];
+		}			
+		win.open();
+	}
+	
+	cQuickAddContact.prototype.send = function (id)
+	{
+		var _this = this;
+		div = document.getElementById(id+':cc_rectQuickAddContact');
+		win = this.arrayWin[div.id];
+
+		var handler = function (responseText)
+		{
+			Element('cc_debug').innerHTML = responseText;
+
+			var data = unserialize(responseText);
+
+			if (!data || typeof(data) != 'object')
+			{
+				showMessage(Element('cc_msg_err_contacting_server').value);
+				return;
+			}
+			else if (data['status'] == 'alreadyExists')
+			{
+				showMessage(data['msg']);
+				return;
+			}
+			else if (data['status'] != 'ok')
+			{
+				return;
+			}
+			
+			win.close();
+
+			if (_this.afterSave)
+			{
+				switch (typeof(_this.afterSave))
+				{
+					case 'function':
+						_this.afterSave();
+						break;
+
+					case 'string':
+						eval(_this.afterSave);
+						break;
+				}
+			}
+		}
+	
+		var sdata = new Array();
+		
+		for (var f = 0; f < 5; f++){
+			sdata[f] = document.getElementById('ccQuickAddCI' + f + id).value;
+		}
+		
+		//Utiliza expressão regular para validar email
+		var reEmail = /^[A-Za-z\d_-]+(\.[A-Za-z\d_-]+)*@(([A-Za-z\d][A-Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/;
+
+		if(!reEmail.test(sdata[4])){
+			alert("O endereço de email '" + sdata[4] + "' não é válido!\n" +
+			"Por favor informe um endereço válido.");
+			return false;
+		}
+		
+		//Utiliza expressão regular para validar telefone
+		var rePhone = /^[0-9|(-)| |-]{0,15}$/;
+		
+		if (!rePhone.test(sdata[3])){
+			alert("O número de telefone '" + sdata[3] + "' não é valido! Utilize apenas números.\n" +
+			"Parenteses, traços ou espaços em branco podem ser usados como carácter separador.");
+			return false;
+		} 
+		
+		var sdata = 'add='+escape(serialize(sdata));
+
+		Connector.newRequest('cQuickAdd.Send', CC_url+'quick_add', 'POST', handler, sdata);
+	}
+	
+	cQuickAddContact.prototype.fechar = function(id) {
+	
+		div = document.getElementById(id+':cc_rectQuickAddContact');
+		win = this.arrayWin[div.id];
+		win.close();
+	}
+	
+	
+/* Build the Object */
+	var ccQuickAddContact ;
+	var cQuickAddContact_pre_load = document.body.onload;
+
+	if (is_ie)
+	{ 
+		document.body.onload = function (e) 
+		{ 
+			cQuickAddContact_pre_load();
+			ccQuickAddContact = new cQuickAddContact();
+			
+		};
+	}
+	else
+	{
+		ccQuickAddContact = new cQuickAddContact();
+	}
Index: /tags/contactcenter/1.20/js/cc_email_win.js
===================================================================
--- /tags/contactcenter/1.20/js/cc_email_win.js	(revision 2)
+++ /tags/contactcenter/1.20/js/cc_email_win.js	(revision 2)
@@ -0,0 +1,521 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*
+	 * ContactCenter API - Email Gathering Window
+	 */
+
+	function ccEmailWinClass(params)
+	{
+		if (typeof(params) != 'object')
+		{
+			return false;
+		}
+
+		this.Connector = new cConnector();
+		this.searching = false;
+		
+		var _this = this;
+		var search_params = new Array();
+		search_params['holder'] = Element('cc_email_search');
+		search_params['total_width'] = '550px';
+		search_params['input_width'] = '200px';
+		search_params['progress_top'] = '0px';
+		search_params['progress_left'] = '380px';
+		search_params['progress_color'] = '#3978d6';
+		search_params['progress_width'] = '250px';
+		search_params['conn_1_msg'] = Element('cc_loading_1').value;
+		search_params['conn_2_msg'] = Element('cc_loading_2').value;
+		search_params['conn_3_msg'] = Element('cc_loading_3').value;
+		search_params['button_text'] = Element('cc_email_search_text').value;
+		search_params['Connector'] = this.Connector;
+
+		var catalog_params = new Array();
+		catalog_params['name'] = 'ccEmailWin.catalogues';
+		catalog_params['id_destination'] = 'cc_email_catalogues';
+		
+		this.window = params['window'];
+		this.search = new ccSearchClass(search_params);
+		this.catalogues = new ccCatalogTree(catalog_params);
+
+		this.catalogues.afterSetCatalog = function() {_this._getAllEntries();};
+		this.catalogues.Connector = this.Connector;
+		
+		this.entries = Element('cc_email_win_entries');
+		this.to  = Element('cc_email_win_to');
+		this.cc  = Element('cc_email_win_cc');
+		this.cco = Element('cc_email_win_cco');
+
+		this.to_count  = 0;
+		this.cc_count  = 0;
+		this.cco_count = 0;
+
+		this.contents = new Array();
+
+		this.onOk = null;
+
+		this.entries.style.overflow = 'auto';
+
+		this._search_set();
+
+		this.window.buttons.xDIV.onclick = function() {_this.close();};
+	}
+
+	ccEmailWinClass.prototype.setContents = function(data)
+	{
+		if (typeof(data) != 'object')
+		{
+			return false;
+		}
+
+		this.clearAll();
+		
+		if (data['entries'])
+		{
+			for (var i in data['entries'])
+			{
+				this.entries = new Option(data['entries'][i], i);
+			}
+		}
+		
+		if (data['to'])
+		{
+			for (var i in data['to'])
+			{
+				this.to = new Option(data['to'][i], i);
+			}
+		}
+
+		if (data['cc'])
+		{
+			for (var i in data['cc'])
+			{
+				this.cc = new Option(data['cc'][i], i);
+			}
+		}
+
+		if (data['cco'])
+		{
+			for (var i in data['cco'])
+			{
+				this.cco = new Option(data['cco'][i], i);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.getContents = function()
+	{
+		var i;
+		
+		this.contents = new Array();
+		this.contents['entries'] = new Array();
+		this.contents['to'] = new Array();
+		this.contents['cc'] = new Array();
+		this.contents['cco'] = new Array();
+		
+		for (i = 0; i < this.entries.options.length; i++)
+		{
+			this.contents['entries'][this.contents['entries'].length] = this.entries.options[i].text;
+		}
+
+		for (i = 0; i < this.to.options.length; i++)
+		{
+			this.contents['to'][this.contents['to'].length] = this.to.options[i].text;
+		}
+
+		for (i = 0; i < this.cc.options.length; i++)
+		{
+			this.contents['cc'][this.contents['cc'].length] = this.cc.options[i].text;
+		}
+		
+		for (i = 0; i < this.cco.options.length; i++)
+		{
+			this.contents['cco'][this.contents['cco'].length] = this.cco.options[i].text;
+		}
+		
+		return this.contents;
+	}
+
+	ccEmailWinClass.prototype.open = function(search)
+	{
+		if (!search) {
+			this.search.DOMinput.value = '';
+			this.Connector.setVisible(true);
+			this.window.open();
+		} else {
+			this.search.DOMinput.value = search;
+			this.catalogues.select("0.2", search);
+			this.Connector.setVisible(true);
+			this.window.open();
+		}
+	}
+	
+	ccEmailWinClass.prototype.ok = function()
+	{
+		if (this.onOk)
+		{
+			this.onOk(this.getContents());
+		}
+
+		this.clearAll();
+		this.window.close();
+	}
+	
+	ccEmailWinClass.prototype.clearAll = function()
+	{
+//		this.clearEntries();
+		this.clearTo();
+		this.clearCC();
+		this.clearCCO();
+	}
+
+	ccEmailWinClass.prototype.clearEntries = function()
+	{
+		var length;
+
+		if (this.entries.options.length)
+		{
+			length = this.entries.options.length-1;
+			for (var i = length; i >= 0; i--)
+			{
+				this.entries.removeChild(this.entries.options[i]);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.clearTo = function()
+	{
+		var length;
+		
+		if (this.to.options.length)
+		{
+			length = this.to.options.length-1;
+			for (var i = length; i >= 0; i--)
+			{
+				this.to.removeChild(this.to.options[i]);
+			}
+		}
+	}
+	
+	ccEmailWinClass.prototype.clearCC = function()
+	{
+		var length;
+		
+		if (this.cc.options.length)
+		{
+			length = this.cc.options.length-1;
+			for (var i = length; i >= 0; i--)
+			{
+				this.cc.removeChild(this.cc.options[i]);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.clearCCO = function()
+	{
+		var length;
+		
+		if (this.cco.options.length)
+		{
+			length = this.cco.options.length-1;
+			for (var i = length; i >= 0; i--)
+			{
+				this.cco.removeChild(this.cco.options[i]);
+			}
+		}
+	}
+	
+	ccEmailWinClass.prototype.close = function()
+	{
+		this.Connector.setVisible(false);
+		//this.clearAll();
+		this.window.close();
+	}
+
+	ccEmailWinClass.prototype.entries_to = function()
+	{
+		var i;
+		var length = this.entries.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.entries.options[i].selected)
+			{
+				this.to.options[this.to.options.length] = new Option(this.entries.options[i].text, this.entries.options[i].value);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.entries_cc = function()
+	{
+		var i;
+		var length = this.entries.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.entries.options[i].selected)
+			{
+				this.cc.options[this.cc.options.length] = new Option(this.entries.options[i].text, this.entries.options[i].value);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.entries_cco = function()
+	{
+		var i;
+		var length = this.entries.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.entries.options[i].selected)
+			{
+				this.cco.options[this.cco.options.length] = new Option(this.entries.options[i].text, this.entries.options[i].value);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.to_entries = function()
+	{
+		var i;
+		var length = this.to.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.to.options[i].selected)
+			{
+				this.to.removeChild(this.to.options[i]);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.cc_entries = function()
+	{
+		var i;
+		var length = this.cc.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.cc.options[i].selected)
+			{
+				this.cc.removeChild(this.cc.options[i]);
+			}
+		}
+	}
+
+	ccEmailWinClass.prototype.cco_entries = function()
+	{
+		var i;
+		var length = this.cco.options.length-1;
+		for (i = length; i >= 0; i--)
+		{
+			if (this.cco.options[i].selected)
+			{
+				this.cco.removeChild(this.cco.options[i]);
+			}
+		}
+	}
+
+	/****************************************************************************\
+	 *                             Private Methods                              *
+	\****************************************************************************/
+
+	ccEmailWinClass.prototype._search_set = function()
+	{
+		var _this = this;
+		
+		this.search.onSearchFinish = function (result)
+		{
+			if (!result || typeof(result) != 'object')
+			{
+				_this.clearEntries();
+				_this.searching = false;
+				return false;
+			}
+
+			var sdata = new Array();
+			
+			sdata['ids'] = result;
+			sdata['fields'] = new Array()
+			sdata['fields']['names_ordered'] = true;
+			sdata['fields']['connections'] = true;
+			
+			var str_data = 'data='+serialize(sdata);
+
+			_this.Connector.newRequest('email_search', CC_url+'get_multiple_entries', 'POST', _this._getEntriesHandler(), str_data);
+		};
+	}
+	
+	ccEmailWinClass.prototype._getAllEntries = function(offset)
+	{
+		if (this.searching && !offset)
+		{
+			return false;
+		}
+/*
+		this.searching = true;
+		this.clearEntries();
+		this._search_set();
+		this.search.DOMinput.value = '*';
+		this.search.go();
+		this.search.DOMinput.value = '';
+*/
+		this.searching = true;
+		
+		var _this = this;
+		var str_data;
+		var sdata;
+		
+		sdata = new Array();
+		sdata['fields'] = new Array();
+		sdata['fields']['names_ordered'] = true;
+		sdata['fields']['connections'] = true;
+		sdata['maxlength'] = -1;
+	
+		if (offset)
+		{
+			sdata['offset'] = offset;
+		}
+		else
+		{
+			this.clearEntries();
+			sdata['new'] = true;
+		}
+		
+		str_data = 'data='+serialize(sdata);
+		
+		var handler = function(responseText)
+		{
+			Element('cc_debug').innerHTML = responseText;
+			var data = unserialize(responseText);
+			Element('cc_type_contact').value = data['typeContact'];
+
+			if (!data || typeof(data) != 'object')
+			{
+				showMessage(Element('cc_msg_err_contacting_server').value);
+				_this.searching = false;
+				return false;
+			}
+			
+			if (data['status'] != 'ok')
+			{
+				_this.search.DOMresult.innerHTML = data['msg'];
+				setTimeout(function(){_this.search.DOMresult.innerHTML = '';}, 1000);
+				_this.searching = false;
+				return false;
+			}
+
+			//_this._updateEntries(data['data']);
+			eval(data['data']);
+
+			if (!data['final'])
+			{
+				_this._getAllEntries(data['offset']);
+			}
+			else
+			{
+				_this.searching = false;
+			}
+		}
+
+		setTimeout(function(){_this.Connector.newRequest('email_search', CC_url+'get_all_entries', 'POST', handler, str_data);}, 50);
+	}
+
+	ccEmailWinClass.prototype._getEntriesHandler = function()
+	{
+		var _this = this;
+
+		var f = function (responseText)
+		{
+			Element('cc_debug').innerHTML = responseText;
+			var data = unserialize(responseText);
+			
+			if (!data)
+			{
+				//showMessage(Element('cc_msg_err_invalid_catalog').value);
+				//showMessage('Error getting user Info');
+				_this.searching = false;
+				return false;
+			}
+	
+			_this.clearEntries();
+	
+			if (data['status'] == 'empty')
+			{
+				//showMessage(data['msg']);
+				_this.searching = false;
+				return false;
+			}
+	
+			if (data['status'] != 'ok')
+			{
+				//showMessage(data['msg']);
+				_this.searching = false;
+				return false;
+			}
+	
+			//showMessage(data['msg']);
+	
+			_this._updateEntries(data['data']);
+
+			_this.searching = false;
+		};
+		
+		return f;
+	}
+
+	ccEmailWinClass.prototype._updateEntries = function (data)
+	{
+		var name = '';
+		var emails = new Array();
+		for (var i in data)
+		{
+			emails_count = 0;
+			for (var j in data[i])
+			{
+				if (j == 'names_ordered')
+				{
+					name = '"'+data[i][j]+'"';
+				}
+				else if (j == 'connections')
+				{
+					for (var k in data[i][j])
+					{
+						if (data[i][j][k]['id_type'] == Element('cc_email_id_type').value)
+						{
+							emails[emails.length] = ' <'+data[i][j][k]['connection_value']+'>';
+						}
+					}
+				}
+				else if (j == 'title')
+				{
+					name = '"'+data[i][j]+'"';
+				}
+				else if (j == 'short_name')
+				{
+							emails[emails.length] = ' ('+data[i][j]+')';
+				}
+			}
+
+			if (name != '' && emails.length)
+			{
+				for (var j in emails)
+				{
+					var scroll = this.entries.scrollTop;
+					this.entries.options[this.entries.options.length] = new Option(name+emails[j], i+'_'+j);
+					this.entries.scrollTop = scroll;
+				}
+			}
+			
+			name = '';
+			emails = new Array();
+		}
+	}
+
+	/****************************************************************************\
+	 *                        Auxiliar Functions                                *
+	\****************************************************************************/	
Index: /tags/contactcenter/1.20/js/cc_search.js
===================================================================
--- /tags/contactcenter/1.20/js/cc_search.js	(revision 285)
+++ /tags/contactcenter/1.20/js/cc_search.js	(revision 285)
@@ -0,0 +1,244 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*
+	 * ContactCenter API - Search for Entries Window
+	 */
+
+	function ccSearchClass(params)
+	{
+		if (!params || typeof(params) != 'object')
+		{
+			return false;
+		}
+
+		/* Attributes */
+		this.onSearchFinish = null;
+		this.onClose = null;
+		this.onOpen = null;
+
+		this.DOMholder = params['holder'];
+		this.DOMdiv = document.createElement('div');
+		this.DOMfields = document.createElement('select');
+		this.DOMinput = document.createElement('input');
+		this.DOMbtn = document.createElement('input');
+		this.DOMprogHold = document.createElement('div');
+		this.DOMresult = document.createElement('div');
+
+		this.Connector = params['Connector'];
+		this.Connector.setProgressContent(1, params['conn_1_msg']);
+		this.Connector.setProgressContent(2, params['conn_2_msg']);
+		this.Connector.setProgressContent(3, params['conn_3_msg']);
+		this.Connector.setProgressHolder(this.DOMprogHold);
+
+		/* Initialization */
+		var _this = this;
+		var spacer = document.createTextNode(' ');
+
+		this.DOMdiv.style.position = 'relative';
+		this.DOMdiv.style.display = 'inline';
+		this.DOMdiv.style.width    = params['total_width'] ? params['total_width'] : params['input_width'] ? parseInt(params['input_width'])+210 + 'px' : '300px';
+		//this.DOMdiv.style.height   = '25px';
+
+		this.DOMfields.style.width = '50px';
+		this.DOMfields.style.display = 'none';
+		this.DOMfields.style.position = 'absolute';
+		this.DOMfields.style.visibility = 'hidden';
+		//this.DOMfields.style.height = parseInt(this.DOMdiv.style.height)/2 + 'px';
+
+		this.DOMinput.type = 'text';
+		this.DOMinput.value = params['value'] ? params['value'] : '';
+		this.DOMinput.style.width = params['input_width'] ? params['input_width'] : '200px';
+		this.DOMinput.onkeypress = function (e) { 
+				if (is_ie)
+				{
+					if (window.event.keyCode == 13) _this.go();
+				}
+				else
+				{
+					if (e.which == 13) _this.go();
+				}
+			};
+		//this.DOMinput.style.height = parseInt(this.DOMdiv.style.height)/2 + 'px';
+
+		this.DOMbtn.type = 'button';
+		//this.DOMbtn.style.height = parseInt(this.DOMdiv.style.height)/2 + 'px';
+		this.DOMbtn.style.width = '60px';
+		this.DOMbtn.value = params['button_text'];
+		this.DOMbtn.onclick = function () {_this.go();};
+
+		this.DOMprogHold.style.position = 'absolute';
+		this.DOMprogHold.style.top = params['progress_top'] ? params['progress_top'] : '0px';
+		this.DOMprogHold.style.left = params['progress_left'] ? params['progress_left'] : '0px';
+		this.DOMprogHold.style.fontWeight = 'bold';
+		this.DOMprogHold.style.width = params['progress_width'] ? params['progress_width'] : '200px';
+
+		if (params['progress_color'])
+			this.DOMprogHold.style.color = params['progress_color'];
+		
+		this.DOMresult.style.position = 'absolute';
+		this.DOMresult.style.top = params['progress_top'] ? params['progress_top'] : '0px';
+		this.DOMresult.style.left = params['progress_left'] ? params['progress_left'] : '0px';
+		this.DOMresult.style.fontWeight = 'bold';
+		this.DOMresult.style.width = params['progress_width'] ? params['progress_width'] : '200px';
+
+		if (params['progress_color'])
+			this.DOMresult.style.color = params['progress_color'];
+
+		this.DOMholder.appendChild(this.DOMdiv);	
+		this.DOMdiv.appendChild(this.DOMfields);
+		this.DOMdiv.appendChild(this.DOMinput);
+		this.DOMdiv.appendChild(spacer);
+		this.DOMdiv.appendChild(this.DOMbtn);
+		this.DOMdiv.appendChild(this.DOMprogHold);
+		this.DOMdiv.appendChild(this.DOMresult);
+	}
+	
+	ccSearchClass.prototype.go = function()
+	{
+		var data = new Array();
+		
+		this.DOMresult.innerHTML = '';
+
+		//TODO: Make Generic!
+		var type = Element('cc_type_contact').value;
+		
+		data['fields']           = new Array();
+		
+		if (type == 'groups') {
+			data['fields']['id']     = 'group.id_group';			
+			data['fields']['search'] = 'group.title';
+		}		
+		else {			
+			data['fields']['id']     = 'contact.id_contact';		
+			data['fields']['search'] = 'contact.names_ordered';					
+		}
+		
+		data['search_for']       = this.DOMinput.value;
+		var search_for = data['search_for'].split(' ');
+		var greaterThan4 = false;
+
+		for (i = 0; i < search_for.length; i++)
+		{
+			if (search_for[i].length >= 4)
+			{
+				greaterThan4 = true;
+			}
+		}
+
+		if (!greaterThan4){
+			alert("Favor fazer a consulta com pelo menos 4 caracteres!");
+			return;
+		}
+
+		var _this = this;
+		
+		var handler = function (responseText)
+		{
+			var data = new Array();
+			data = unserialize(responseText);
+			
+			if( !data )
+				return false;
+
+			if( data[0] == 0 )
+			{
+				if (_this.onSearchFinish)
+					_this.onSearchFinish(null);
+				return false;
+			}
+			
+			if (data[3].length > 300)
+			{
+				alert("Mais de 300 resultados foram retornados! \n Favor refinar sua busca.");
+
+				if (_this.onSearchFinish)
+					_this.onSearchFinish(null);
+
+				return false;
+			}
+			
+			ccSearchUpdate();
+	
+			letter = 'search';
+
+			if ( letter != CC_actual_letter )
+			{
+				CC_actual_page = '1';
+			}
+			else
+			{
+				CC_actual_page = parseInt(data[1]);
+			}
+	
+			CC_actual_letter = letter;
+	
+			if (CC_max_cards[0] == 0)
+			{
+				if(CC_visual == 'cards')
+					drawCards(0);
+				else if(CC_visual == 'table')
+					drawTable(0);
+	
+				setPages(0,0);
+				return;
+			}
+	
+			if (data[0] == '0')
+			{
+				Element('cc_type_contact').value = data[1];
+				CC_npages = 0;
+				CC_actual_page = 1;
+				if(CC_visual == 'cards')
+					drawCards(0);
+				else if(CC_visual == 'table')
+					drawTable(0);
+				setPages(0,0);
+				return;
+			}
+			else
+			{
+				Element('cc_type_contact').value = data[10];
+			}
+	
+			if (typeof(data) != 'object')
+			{
+				showMessage(Element('cc_msg_err_contacting_server').value);
+				return;
+			}
+	
+			if (typeof(data[3]) == 'object')
+			{
+				CC_npages = parseInt(data[0]);
+				CC_actual_page = parseInt(data[1]);
+				if(CC_visual == 'cards')
+					drawCards(data[3].length, data[10]);
+				else if(CC_visual == 'table')
+					drawTable(data[3].length, data[10]);
+				resizeWindow();
+				populateCards(data, data[10]);
+				setPages(data[0], data[1]);
+			}
+			else if (data['error'])
+			{
+				showMessage(data['error']);
+			}
+			else
+			{
+				showMessage(Element('cc_msg_err_contacting_server').value);
+				return;
+			}
+		};
+		
+		this.Connector.newRequest('search', CC_url+'search&data='+serialize(data), 'GET', handler);
+	}
Index: /tags/contactcenter/1.20/js/ccAddGroup.js
===================================================================
--- /tags/contactcenter/1.20/js/ccAddGroup.js	(revision 294)
+++ /tags/contactcenter/1.20/js/ccAddGroup.js	(revision 294)
@@ -0,0 +1,265 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*
+	 * ContactCenter API - Add Group
+	 *
+	 * USAGE INSTRUCTIONS
+	 */
+
+	function cAddGroup ()
+	{
+		// Private
+		this._card;
+		this._button = new Array();		
+
+		// Public
+		this.window;
+		this.afterSave;
+		this.load;
+		
+		// Constructor
+		var wHeight = 0;
+		
+		// Elements
+		this.title = Element('title');
+		this.contact_in_list = Element('contact_in_list');
+		this.group_id = Element('group_id');
+				
+		ccAGWinHeight = 'ccAGWinHeightMO';
+
+		if (is_ie)
+			ccAGWinHeight = 'ccAGWinHeightIE';
+
+		wHeight = Element(ccAGWinHeight).value;
+
+		
+		this.window = new dJSWin({
+			id: 'ccAddGroup DOM',
+			content_id: 'ccAddGroupContent',
+			width: '700px',
+			height: wHeight+'px',
+			title_color: '#3978d6',
+			bg_color: '#eee',
+			title: Element('ccAGTitle').value,
+			title_text_color: 'white',
+			button_x_img: Element('cc_phpgw_img_dir').value+'/winclose.gif',
+			border: true });
+
+		this.window.draw();
+		
+	}
+
+	/*!
+		@method associateAsButton
+		@abstract Associates the button functions with the spacified DOM Element
+		@author Raphael Derosso Pereira
+
+		@param div DOMElement The HTML DOM element that will "host" the
+			plugin button.
+
+		@param func function The function that returns the data to be used
+			to pre-populate the quickAdd fields. The return format MUST be
+			an Array like:
+
+				var return_data = new Array();
+				return_data[0] = <value>;  // Value for the first field
+				return_data[1] = <value>;  // Value for the second field
+				...
+		
+	 */
+	cAddGroup.prototype.associateAsButton = function (div)
+	{
+		var _this = this;		
+		div.onclick = function() {
+					
+			if (_this.load)	{
+				switch (typeof(_this.load)) {
+				
+					case 'function':
+						_this.load();
+						break;
+
+					case 'string':
+						eval(_this.load);
+						break;
+				}
+			} 
+		};
+		
+	}
+		
+	/*!
+	
+		@method send
+		@abstract Sends data to server
+		@author Raphael Derosso Pereira
+
+	*/
+	cAddGroup.prototype.send = function ()
+	{
+		var _this = this;
+
+		var handler = function (responseText)
+		{
+			Element('cc_debug').innerHTML = responseText;
+			var data = unserialize(responseText);				
+			
+			if (!data || typeof(data) != 'object')
+			{
+				showMessage(Element('cc_msg_err_contacting_server').value);
+				return;
+			}
+
+			//showMessage(data['msg']);
+
+			if (data['status'] != 'ok')
+			{
+				return;
+			}
+
+			_this.clear();
+			_this.window.close();
+			
+			if (_this.afterSave)
+			{
+				switch (typeof(_this.afterSave))
+				{
+					case 'function':
+						_this.afterSave();
+						break;
+
+					case 'string':
+						eval(_this.afterSave);
+						break;
+				}
+			}
+		}
+
+		var sdata = new Array();
+		var empty = true;
+		
+		sdata[0] = this.title.value;
+		var contacts = new Array();				
+		
+		for (j =0; j < this.contact_in_list.length; j++)
+			contacts[j] = this.contact_in_list.options[j].value;			
+		
+		if(!this.title.value) {
+			alert(Element('cc_msg_fill_field_name').value);
+			this.title.focus();
+			return false;
+		}
+				
+		if(! contacts.length) {
+			alert(Element('cc_msg_add_contact_to_group').value);
+			return false;
+		}
+
+		sdata[1] = contacts;		
+		sdata[2] = this.group_id.value == 'undefined' ? 	sdata[2] = 0 : sdata[2]  = this.group_id.value; 						
+		var sdata = 'add='+escape(serialize(sdata));
+		Connector.newRequest('cAddGroup.Send', CC_url+'add_group', 'POST', handler, sdata);
+	}
+
+	/*!
+
+		@method clear
+		@abstract Clear all Plugin Fields
+		@author Raphael Derosso Pereira
+
+	*/
+	cAddGroup.prototype.clear = function (reload)
+	{
+		for (j =0; j < this.contact_in_list.options.length; j++) {
+			this.contact_in_list.options[j].selected = false;
+			this.contact_in_list.options[j--] = null;
+		}
+		
+		if(reload) {
+			if(Element("contact_list"))
+			for (j =0; j < Element("contact_list").options.length; j++) {
+					Element("contact_list").options[j].selected = false;
+					Element("contact_list").options[j--] = null;
+			}
+		}
+			
+		this.title.value = '';				
+	}
+	
+	/* Função para remover contato da lista */	
+	
+	cAddGroup.prototype.remUser = function(){
+		
+		select_in = this.contact_in_list;								
+
+		for(var i = 0;i < select_in.options.length; i++)				
+			if(select_in.options[i].selected)
+				select_in.options[i--] = null;
+	}	
+ 	
+	/* Função para adicionar contato na lista */	
+	cAddGroup.prototype.addUser = function(){
+
+		select = Element("contact_list");
+		select_in = this.contact_in_list;								
+		
+		for (i = 0 ; i < select.length ; i++) {				
+
+			if (select.options[i].selected) {
+				isSelected = false;
+
+				for(var j = 0;j < select_in.options.length; j++) {																			
+					if(select_in.options[j].value == select.options[i].value){
+						isSelected = true;						
+						break;	
+					}
+				}
+
+				if(!isSelected){
+
+					option = document.createElement('option');
+					option.value =select.options[i].value;
+					option.text = select.options[i].text;
+					option.selected = true;
+					select_in.options[select_in.options.length] = option;
+											
+				}
+												
+			}
+		}
+		
+		for (j =0; j < select.options.length; j++)
+			select .options[j].selected = false;		
+	} 	
+
+	/* Build the Object */
+	var ccAddGroup ;
+	var cAddGroup_pre_load = document.body.onload;
+	/* Se for IE, modifica a largura da coluna dos botoes.*/	
+	if(document.all)
+		document.getElementById('buttons').width = 140;	
+
+	if (is_ie)
+	{ 
+		document.body.onload = function (e) 
+		{ 
+			cAddGroup_pre_load();
+			ccAddGroup = new cAddGroup();
+			
+		};
+	}
+	else
+	{
+		ccAddGroup = new cAddGroup();
+	}
Index: /tags/contactcenter/1.20/js/cc.js
===================================================================
--- /tags/contactcenter/1.20/js/cc.js	(revision 294)
+++ /tags/contactcenter/1.20/js/cc.js	(revision 294)
@@ -0,0 +1,2506 @@
+  /******************************************************************************\
+  * eGroupWare - Contacts Center												*
+  * http://www.egroupware.org													*
+  * Written by:																	*
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>			*
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>									*
+  *  sponsored by Thyamad - http://www.thyamad.com								*
+  * -------------------------------------------------------------------------	*
+  *  This program is free software; you can redistribute it and/or modify it	*
+  *  under the terms of the GNU General Public License as published by the		*
+  *  Free Software Foundation; either version 2 of the License, or (at your		*
+  *  option) any later version.													*
+  \******************************************************************************/
+
+/***********************************************\
+*                      TODO                     *
+\***********************************************/
+
+/*
+ * function setHeightSpace ()
+ *
+ */
+
+/***********************************************\
+*                   CONSTANTS                   *
+\***********************************************/
+
+var CC_STATUS_FULL_ADD = 2;
+var CC_STATUS_QUICK_ADD = 1;
+
+var CC_card_image_width = 245;
+var CC_card_image_height = 130;
+var CC_card_extra = 16;
+
+
+/***********************************************\
+*               GLOBALS VARIABLES               *
+\***********************************************/
+
+var CC_visual = 'table';
+/* Cards Variables */
+var CC_actual_letter = 'a';
+var CC_last_letter = 'a';
+var CC_actual_page = 1;
+var CC_npages = 0;
+var CC_max_cards = new Array();
+var CC_conn_count=0;
+
+var CC_old_icon_w = 0;
+var CC_old_icon_h = 0;
+
+/* Tabs Variables */
+var CC_last_tab = 0;
+
+/* Pseudo-Semafores */
+var CC_tree_available = false;
+var CC_full_add_const = false;
+var CC_full_add_photo = false;
+	
+var CC_last_height = window.innerHeight;
+var CC_last_width = window.innerWidth;
+
+/* Contact Full Info */
+var CC_contact_full_info;
+var CC_br_index;
+
+/* Addresses Variables */
+var CC_addr_last_selected = 0;
+
+/* Connections Variables */
+var CC_conn_last_selected = 0;
+
+/***********************************************\
+ *           FULL ADD/EDIT FUNCTIONS           *
+\***********************************************/
+
+function createPhotoFrame()
+{
+	photo_frame = document.createElement('iframe');
+	document.body.appendChild(photo_frame);
+
+	if (is_ie)
+	{
+		photo_form  = photo_frame.contentWindow.document.createElement('form');
+		photo_input = photo_frame.contentWindow.document.createElement('input');
+	}
+	else
+	{
+		 photo_form  = photo_frame.contentDocument.createElement('form');
+		 photo_input = photo_frame.contentDocument.createElement('input');
+	}
+	
+	photo_frame.id = 'cc_photo_frame';
+	photo_frame.style.position = 'absolute';
+	//photo_frame.style.visibility = 'hidden';
+	photo_frame.style.top = '600px';
+	photo_frame.style.left = '0px';
+	
+	photo_form.id = 'cc_photo_form';
+	photo_form.method = 'POST';
+	photo_form.enctype = 'multipart/form-data';
+	
+	photo_input.id = 'cc_photo_input';
+	photo_input.type = 'file';
+	
+	if (is_ie)
+	{
+		photo_frame.contentWindow.document.body.appendChild(photo_form);
+	}
+	else
+	{
+		photo_frame.contentDocument.body.appendChild(photo_form);
+	}
+	photo_form.appendChild(photo_input);
+	
+}
+
+/********* Full Add Auxiliar Functions ****************/
+function selectOption (id, option)
+{
+	var obj = Element(id);
+	var max = obj.options.length;
+	
+	if (option == undefined)
+	{
+		obj.selectedIndex = 0;
+	}
+	else
+	{
+		for (var i = 0; i < max; i++)
+		{
+			if (obj.options[i].value == option)
+			{
+				obj.selectedIndex = i;
+				break;
+			}
+		}
+	}
+}
+
+function selectRadio (id, index)
+{
+	var obj = Element(id);
+	var max = obj.options.length;
+	for (var i = 0; i < max; i++)
+	{
+		i == index ? obj.options[i].checked = true : obj.options[i].checked = false;
+	}
+}
+
+function clearSelectBox(obj, startIndex)
+{
+	var nOptions = obj.options.length;
+
+	for (var i = nOptions - 1; i >= startIndex; i--)
+	{
+		obj.removeChild(obj.options[i]);
+	}
+}
+/********** Open/Close FullAdd *************/
+function openFullAdd(){
+	// Build the FullAdd Window.
+	if(!fullAddWin && !is_ie) 
+		__f();
+
+	resetFullAdd();
+	populateFullAddConst();
+	fullAddWin.open();
+	tabs._showTab('cc_contact_tab_0');
+	Element("cc_conn_type_1").checked = false;	
+	Element("cc_conn_type_2").checked = false;
+	Element("cc_conn_type_sel").disabled = true;
+	Element("cc_conn_type_sel").selectedIndex = 0;
+}
+
+function closeFullAdd(){
+	fullAddWin.close();
+}
+/********** New Contact *************/
+function newContact(){
+	openFullAdd();
+}
+/************ Edit Contact *************/
+function editContact (id){
+	openFullAdd();
+	populateFullEdit(id);
+}
+/************ Edit Group *************/
+function editGroup(id){
+	populateEditGroup(id);	
+}
+/*
+	Updates all the constant fields in the
+	full add window, like Prefixes, Suffixes,
+	Countries and Types
+*/
+function populateFullAddConst()
+{
+	CC_full_add_const = false;
+	
+	setTimeout('populateFullAddConstAsync()', 10);
+}
+
+function populateFullAddConstAsync()
+{
+	var handler = function(responseText)
+	{
+		//Element('cc_debug').innerHTML = responseText;		
+		var data = unserialize(responseText);
+		var i = 1;
+		var j;
+		
+		if (typeof(data) != 'object')
+		{
+			showMessage(Element('cc_msg_err_contacting_server').value);
+			return;
+		}
+		
+		/* Populate Prefixes */
+		for (j in data[0])
+		{
+			Element('cc_pd_prefix').options[i] = new Option(data[0][j], j);
+			i++;
+		}
+		
+		/* Populate Suffixes */
+		i = 1;
+		for (j in data[1])
+		{
+			Element('cc_pd_suffix').options[i] = new Option(data[1][j], j);
+			i++;
+		}
+
+		/* Populate Addresses Types */
+		i = 1;
+		for (j in data[2])
+		{
+			Element('cc_addr_types').options[i] = new Option(data[2][j], j);
+			i++;
+		}
+
+		/* Populate Countries */
+		i = 1;
+		for (j in data[3])
+		{
+			Element('cc_addr_countries').options[i] = new Option(data[3][j], j);
+			
+			if (j == 'BR' || j == 'br')
+			{
+				CC_br_index = i;
+			}
+			
+			i++;
+		}
+		
+		/* Populate Connection Types */
+		i = 1;
+		for (j in data[4])
+		{
+			Element('cc_conn_type').options[i] = new Option(data[4][j], j);
+			i++;
+		}
+		
+		/* Populate Relations Types */
+		i = 0;
+		for (j in data[5])
+		{
+			Element('cc_rels_type').options[i] = new Option(data[5][j], j);
+			i++;
+		}
+		
+		CC_full_add_const = true;
+
+	};
+
+	Connector.newRequest('populateFullAddConst', CC_url+'get_contact_full_add_const', 'GET', handler);
+}
+
+function populateFullEdit (id)
+{
+	var handler = function(responseText)
+	{
+		//Element('cc_debug').innerHTML = responseText;
+		var data = unserialize(responseText);
+
+		if (typeof(data) != 'object' || data['result'] != 'ok')
+		{
+			showMessage(Element('cc_msg_err_contacting_server').value);
+			return;
+		}
+
+		resetFullAdd();
+
+		CC_contact_full_info = data;
+		Element('cc_full_add_contact_id').value = data['cc_full_add_contact_id'];
+		populatePersonalData(data['personal']);
+		//populateRelations(data['relations']);
+	};
+
+	Connector.newRequest('populateFullEdit', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_full_data&id=' + id, 'GET', handler);
+}
+
+function populateEditGroup (id)
+{
+	var handler = function(responseText)
+	{			
+		var data = unserialize(responseText);
+
+		Element('group_id').value = data['id_group'];								
+		var options_contact_list = Element('span_contact_list');
+		var select_contact_list = '<select id="contact_list" multiple name="contact_list[]" style="width:280px" size="10">';
+		select_contact_list += data['contact_list'] + "</select>";
+		options_contact_list.innerHTML = select_contact_list;
+
+		if(data['id_group']) {
+		
+			if(data['contact_in_list']) {					
+				for(i = 0; i < data['contact_in_list'].length; i++) {				
+					option = document.createElement('option');
+					option.value = data['contact_in_list'][i]['id_connection'];
+					option.text = data['contact_in_list'][i]['names_ordered']+' ('+data['contact_in_list'][i]['connection_value']+')';				
+					Element('contact_in_list').options[Element('contact_in_list').options.length] = option;
+				}
+			}		
+			
+			Element('title').value =  data['title'];
+		}
+				
+		if (typeof(data) != 'object' || data['result'] != 'ok')
+		{
+			showMessage(Element('cc_msg_err_contacting_server').value);
+			return;
+		}
+		ccAddGroup.window.open();
+	};
+		
+	id = typeof(id) == 'undefined' ? id = 0 :  id;
+	
+	ccAddGroup.clear(true);			
+	Connector.newRequest('populateEditGroup', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_group&id='+id, 'GET', handler);
+}
+
+
+function resetFullAdd()
+{
+	/* Clear information container */
+	CC_contact_full_info = new Array();
+
+	/* Clear Fields */
+	Element('cc_full_add_form_personal').reset();
+	Element('cc_full_add_form_addrs').reset();
+
+	/* Personal Data */
+	Element('cc_full_add_contact_id').value = null;
+	Element('cc_pd_photo').src = 'templates/default/images/photo.png';
+
+	/* Addresses */
+	resetAddressFields();
+
+	/* Connections */
+	CC_conn_last_selected = '_NONE_';
+	Element("cc_phone_default").options.selectedIndex = '-1';
+	Element("cc_email_default").options.selectedIndex = '-1';
+	Element("div_cc_conn_is_default").style.display = 'none';
+	clearConn();
+}
+
+function postFullAdd()
+{
+	if (!checkFullAdd())
+	{
+		return false;
+	}
+	
+	/* First thing: Send Photo */
+	if (Element('cc_pd_select_photo').value != '' && !is_ie)
+	{
+		var nodes;
+		var form, frame, old_frame;
+
+		CC_full_add_photo = false;
+
+		old_frame = Element('cc_photo_frame');
+		if (!old_frame)
+		{
+			frame = document.createElement('iframe');
+		}
+		else
+		{
+			frame = old_frame;
+		}
+		
+		frame.id = 'cc_photo_frame';
+		frame.style.visibility = 'hidden';
+		frame.style.top = '0px';
+		frame.style.left = '0';
+		frame.style.position = 'absolute';
+		document.body.appendChild(frame);
+
+		form = frame.contentDocument.createElement('form');
+		
+		var id_contact = Element('cc_full_add_contact_id').value;
+		form.id = 'cc_form_photo';
+		form.method = 'POST';
+		form.enctype = 'multipart/form-data';
+		form.action = 'http://'+ document.domain + Element('cc_root_dir').value+'../index.php?menuaction=contactcenter.ui_data.data_manager&method=post_photo&id='+(id_contact != '' && id_contact != 'null' ? id_contact : '');
+		
+		var input_clone = Element('cc_pd_select_photo').cloneNode(false);
+		form.appendChild(input_clone);
+		
+		frame.contentDocument.body.appendChild(form);
+		form.submit();
+
+		CC_full_add_photo = true;
+	}
+	else if (Element('cc_pd_select_photo_t').value != '' && is_ie)
+	{
+		CC_full_add_photo = false;
+
+		var frame = Element('cc_photo_frame');
+		var form = frame.contentWindow.document.all['cc_photo_form'];
+		var id_contact = Element('cc_full_add_contact_id').value;
+		form.action = 'http://'+ document.domain + Element('cc_root_dir').value+'../index.php?menuaction=contactcenter.ui_data.data_manager&method=post_photo&id='+(id_contact != '' && id_contact != 'null' ? id_contact : '');
+
+		form.submit();
+
+		setTimeout('Element(\'cc_photo_frame\').src = \'cc_photo_frame.html\'', 1000);
+		CC_full_add_photo = true;
+	}
+
+	setTimeout('postFullAddInfo()', 100);
+}
+
+function postFullAddInfo()
+{
+	var handler = function (responseText)
+	{
+		var data = unserialize(responseText);
+
+		if (typeof(data) != 'object')
+		{
+			showMessage(Element('cc_msg_err_contacting_server').value);
+			return;
+		}
+
+		if (data['status'] != 'ok')
+		{
+			showMessage(data['msg']);
+			return;
+		}
+
+		fullAddWin.close();
+		updateCards();
+	};
+
+	Connector.newRequest('postFullAddInfo', CC_url+'post_full_add', 'POST', handler, getFullAddData());
+}
+
+function getFullAddData()
+{
+	var data = new Array();
+	var empty = true;
+	var replacer = '__##AND##__';
+	
+	data['commercialAnd'] = replacer;
+	
+	if (Element('cc_full_add_contact_id').value != '' && Element('cc_full_add_contact_id').value != 'null')
+	{
+		data['id_contact'] = replaceComAnd(Element('cc_full_add_contact_id').value, replacer);
+		data.length++;
+	}
+
+	/* Status: Full Added */
+	data['id_status'] = CC_STATUS_FULL_ADD;
+	
+	/* Personal Data */
+	data['alias']         = replaceComAnd(Element('cc_pd_alias').value, replacer);
+	data['id_prefix']     = replaceComAnd(Element('cc_pd_prefix').value, replacer);
+	data['given_names']   = replaceComAnd(Element('cc_pd_given_names').value, replacer);
+	data['family_names']  = replaceComAnd(Element('cc_pd_family_names').value, replacer);
+	data['names_ordered'] = replaceComAnd(data['given_names']+" "+data['family_names'], replacer);
+	data['id_suffix']     = replaceComAnd(Element('cc_pd_suffix').value, replacer);;
+	data['birthdate_0']   = replaceComAnd(Element('cc_pd_birthdate_0').value, replacer);
+	data['birthdate_1']   = replaceComAnd(Element('cc_pd_birthdate_1').value, replacer);
+	data['birthdate_2']   = replaceComAnd(Element('cc_pd_birthdate_2').value, replacer);
+//	data['sex']           = Element('cc_pd_sex').value == 1 ? 'M' : Element('cc_pd_sex').value == 2 ? 'F' : null;
+	data['pgp_key']       = replaceComAnd(Element('cc_pd_gpg_finger_print').value, replacer);
+	data['notes']         = replaceComAnd(Element('cc_pd_notes').value, replacer);
+
+	data.length += 14;
+
+	/* Addresses */
+	saveAddressFields();
+	data['addresses'] = CC_contact_full_info['addresses'];
+
+	/* Connection */
+	saveConnFields();
+
+	if (CC_contact_full_info['connections'])
+	{
+		var connNumber = 0;
+		for (var type in CC_contact_full_info['connections'])
+		{
+			if (type == 'length')
+			{
+				continue;
+			}
+
+			if (typeof(data['connections']) != 'object')
+			{
+				data['connections'] = new Array();
+			}
+			
+			for (var i in CC_contact_full_info['connections'][type])
+			{
+				if (i == 'length')
+				{
+					continue;
+				}
+
+				if (typeof(data['connections']['connection'+connNumber]) != 'object')
+				{
+					data['connections']['connection'+connNumber] = new Array(5);
+				}
+				
+				data['connections']['connection'+connNumber]['id_connection'] = CC_contact_full_info['connections'][type][i]['id'];
+				data['connections']['connection'+connNumber]['id_typeof_connection'] = type;
+				data['connections']['connection'+connNumber]['connection_name'] = CC_contact_full_info['connections'][type][i]['name'];
+				data['connections']['connection'+connNumber]['connection_value'] = CC_contact_full_info['connections'][type][i]['value'];
+				if(Element("cc_"+(type == 1 ? 'email' : 'phone')+"_default").value) {
+					if(Element("cc_"+(type == 1 ? 'email' : 'phone')+"_default").value == CC_contact_full_info['connections'][type][i]['name']){
+						data['connections']['connection'+connNumber]['connection_is_default']  = 'TRUE';
+					}
+					else 
+						data['connections']['connection'+connNumber]['connection_is_default']  = 'FALSE';
+				}
+
+//				data['connections']['connection'+connNumber].length = 5;
+				
+				empty = false;
+				connNumber++;
+				data['connections'].length++;
+			}
+
+		}
+		
+		if (!empty)
+		{
+			data.length++;
+			empty = true;
+		}
+	}
+	
+	if (CC_contact_full_info['removed_conns'])
+	{
+		empty = false;
+		
+		if (typeof(data['connections']) != 'object')
+		{
+			data['connections'] = new Array();
+			data.length++;
+		}
+
+		data['connections']['removed_conns'] = CC_contact_full_info['removed_conns'];
+		data['connections'].length++;
+	}
+
+	return 'data=' + escape(serialize(data));
+}
+
+function checkFullAdd()
+{
+	/* Check Personal Data */
+
+	if (Element('cc_pd_given_names').value == '')
+	{
+		showMessage(Element('cc_msg_err_empty_field').value + " => " + Element('cc_pd_given_names').name);
+		return false;
+	}
+
+	/* Check Addresses */
+
+	/* Check Connections */
+
+	saveConnFields();
+
+	var comp = /^[a-zA-Z\d(-)\.@_ -]{0,200}$/;
+	if (CC_contact_full_info['connections']){
+		for (var type in CC_contact_full_info['connections']){
+			for (var i in CC_contact_full_info['connections'][type]){
+				if((CC_contact_full_info['connections'][type][i]['value'].length < 4) ||
+					(!comp.test(CC_contact_full_info['connections'][type][i]['value']))){ 
+					showMessage('Endereço para conexão de ' + CC_contact_full_info['connections'][type][i]['name'] + ', não é válido');
+					return false;
+				}
+			}
+			var _options_default = Element("cc_"+(type == 1 ? 'email' : 'phone')+"_default");
+			if(_options_default.value == '-1') {
+				alert("É necessário escolher um "+ (type == 1 ? 'E-mail' : 'Telefone')+" como padrão!");
+				return false;
+			}
+		}
+		
+	}
+
+	/* Check Relations */
+
+	return true;
+}
+
+/********* Personal Data Functions *********/
+/* 
+ * data[0] => cc_pd_select_photo
+ * data[1] => cc_pd_alias
+ * data[2] => cc_pd_given_names
+ * data[3] => cc_pd_family_names
+ * data[4] => cc_pd_full_name
+ * data[5] => cc_pd_suffix
+ * data[6] => cc_pd_birthdate
+ * data[7] => cc_pd_sex SELECT
+ * data[8] => cc_pd_prefix
+ * data[9] => cc_pd_gpg_finger_print
+ * data[10] => cc_pd_notes
+ */
+
+function populatePersonalData (data)
+{
+	for (i in data)
+	{
+		switch(i)
+		{
+			case 'cc_pd_suffix':
+			case 'cc_pd_sex':
+			case 'cc_pd_prefix':
+				selectOption(i, data[i]);
+				break;
+
+			case 'cc_pd_photo':
+				if (data[i])
+				{
+					Element(i).src =  data[i] + '&'+ Math.random();
+				}
+				break;
+
+			default:
+				Element(i).value = data[i] == undefined ? '' : data[i];
+		}
+	}
+
+	return;
+}
+
+/********* End Personal Data Functions *********/
+
+
+/********* Addresses Functions *********/
+function resetAddressFields()
+{
+	Element('cc_addr_types').selectedIndex = 0;
+	
+	Element('cc_addr_countries').selectedIndex = 0;
+	Element('cc_addr_countries').disabled = true;
+	
+	Element('cc_addr_states').selectedIndex = 0;
+	Element('cc_addr_states').disabled = true;
+	Element('cc_addr_states_new').disabled = true;
+	Element('cc_addr_states_new').readonly = true;
+	Element('cc_addr_states_new').value = '';
+
+	Element('cc_addr_cities').selectedIndex = 0;
+	Element('cc_addr_cities').disabled = true;
+	Element('cc_addr_cities_new').disabled = true;
+	Element('cc_addr_cities_new').readonly = true;
+	Element('cc_addr_cities_new').value = '';
+
+	Element('cc_addr_id').value = '';
+
+	resetAddrFillingFields();
+}
+
+function resetAddrFillingFields()
+{
+	Element('cc_addr_1').value = '';
+	Element('cc_addr_2').value = '';
+	Element('cc_addr_other').value = '';
+	Element('cc_addr_complement').value = '';
+	Element('cc_addr_postal_code').value = '';
+	Element('cc_addr_po_box').value = '';
+	Element('cc_addr_is_default').checked = false;
+}
+
+function disableAddrFillingFields()
+{
+	Element('cc_addr_1').readonly = true;
+	Element('cc_addr_1').disabled = true;
+	Element('cc_addr_2').readonly = true;
+	Element('cc_addr_2').disabled = true;
+	Element('cc_addr_other').readonly = true;
+	Element('cc_addr_other').disabled = true;
+	Element('cc_addr_complement').readonly = true;
+	Element('cc_addr_complement').disabled = true;
+	Element('cc_addr_postal_code').readonly = true;
+	Element('cc_addr_postal_code').disabled = true;
+	Element('cc_addr_po_box').readonly = true;
+	Element('cc_addr_po_box').disabled = true;
+	Element('cc_addr_is_default').readonly = true;
+	Element('cc_addr_is_default').disabled = true;
+}
+
+function updateAddressFields()
+{
+	var type = Element('cc_addr_types');
+	var oldSelected = type.value;
+	
+	saveAddressFields();
+	
+	if (oldSelected == '_NONE_')
+	{
+		resetAddressFields();
+		return true;
+	}
+	
+	CC_addr_last_selected = type.selectedIndex;
+	
+	Element('cc_addr_countries').disabled = false;
+	
+	var data = CC_contact_full_info['addresses'];
+	var addrIndex  = 'address'+Element('cc_addr_types').value;
+	
+	if (typeof(data) != 'object' || typeof(data[addrIndex]) != 'object') 
+	{
+		resetAddressFields();
+		Element('cc_addr_countries').disabled = false;
+		Element('cc_addr_countries').selectedIndex = CC_br_index;
+		type.value = oldSelected;
+		updateAddrStates();
+		return true;
+	}
+	
+	var addrTypeID = Element('cc_addr_types').value;
+	
+	data = CC_contact_full_info['addresses'][addrIndex];
+	
+	Element('cc_addr_id').value          			 = data['id_address']		? data['id_address']			: '';
+	Element('cc_addr_1').value            			= data['address1']			? data['address1']				: '';
+	Element('cc_addr_2').value            			= data['address2']			? data['address2']				: '';
+	Element('cc_addr_complement').value   = data['complement']		? data['complement']		: '';
+	Element('cc_addr_other').value				= data['address_other']	? data['address_other']	: '';
+	Element('cc_addr_postal_code').value	= data['postal_code']		? data['postal_code']		: '';
+	Element('cc_addr_po_box').value       		= data['po_box'] 				? data['po_box']             	: '';
+	Element('cc_addr_is_default').checked 	= data['address_is_default'] == '1' ? true: false;
+
+	Element('cc_addr_countries').value    = data['id_country'];
+	updateAddrStates();
+}
+
+function updateAddrStates()
+{
+	var states = Element('cc_addr_states');
+	if (Element('cc_addr_countries').value == '_NONE_')
+	{
+		states.disabled = true;
+		states.selectedIndex = 0;
+		clearSelectBox(states, 4);
+		updateAddrCities();	
+		return;
+	}
+
+	updateAddrFillingFields();
+	populateStates();
+}
+
+function populateStates()
+{
+	var states = Element('cc_addr_states');
+	var cities = Element('cc_addr_cities');
+	var handler = function (responseText)
+	{
+		var data = unserialize(responseText);
+		
+		clearSelectBox(states, 1);
+			
+		if (typeof(data) != 'object')
+		{
+			showMessage(Element('cc_msg_err_contacting_server').value);
+	
+			return;
+		}
+
+		if (data['status'] == 'empty')
+		{
+			states.disabled = true;
+			cities.disabled = true;			
+			states.selectedIndex = 0;
+			cities.selectedIndex = 0;
+			return;
+		}
+		else if (data['status'] != 'ok')
+		{
+			showMessage(data['msg']);
+			states.disabled = true;
+			states.selectedIndex = 0;
+			updateAddrCities();
+			return;
+		}
+		states.disabled = false;
+		var i = 1;
+		for (var j in data['data'])
+		{
+			states.options[i] = new Option(data['data'][j], j);
+			i++;
+		}
+
+		states.disabled = false;
+		states.selectedIndex = 0;
+
+		data = CC_contact_full_info['addresses'];
+		var addrIndex = 'address'+Element('cc_addr_types').value;
+		if (data && data[addrIndex])
+		{
+			states.value = data[addrIndex]['id_state'];
+			if (states.value == '_NEW_')
+			{
+				if (CC_contact_full_info['addresses']['new_states'][addrIndex])
+				{
+					Element('cc_addr_states_new').value = CC_contact_full_info['addresses']['new_states'][addrIndex];
+				}
+				updateAddrNewStateOnMouseOut();
+			}
+			updateAddrCities();
+		}
+	};
+	
+	Connector.newRequest('populateStates', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_states&country='+Element('cc_addr_countries').value, 'GET', handler);
+}
+
+function updateAddrCities()
+{
+	var states = Element('cc_addr_states');
+	var cities = Element('cc_addr_cities');
+	var newState = Element('cc_addr_states_new');
+	var requestStr;
+
+	switch (states.value)
+	{
+		case '_NONE_':
+			newState.readonly = true;
+			newState.disabled = true;
+			newState.value = '';
+
+			cities.disabled = true;
+			cities.selectedIndex = 0;
+			updateAddrFillingFields();
+			return;
+
+		case '_NEW_':
+
+			newState.readonly = false;
+			newState.disabled = false;
+			updateAddrNewStateOnMouseOut();
+			
+			cities.disabled = false;
+			clearSelectBox(cities, 3);
+			cities.selectedIndex = 1;
+			updateAddrFillingFields();
+			return;
+
+		case '_SEP_': return;
+
+		case '_NOSTATE_':
+			clearSelectBox(cities, 3);
+			
+			cities.disabled = false;
+			cities.selectedIndex = 0;
+			
+			requestStr = 'country='+Element('cc_addr_countries').value;
+			break;
+		
+		default:
+			requestStr = 'country='+Element('cc_addr_countries').value+'&state='+states.value;
+	}
+
+	newState.readonly = true;
+	newState.disabled = true;
+	newState.value = '';
+
+	populateCities(requestStr);
+}
+
+function populateCities(requestStr)
+{
+	var cities = Element('cc_addr_cities');
+	
+	var handler = function (responseText)
+	{
+		var data = unserialize(responseText);
+		
+		clearSelectBox(cities, 1);
+		
+		if (typeof(data) != 'object')
+		{
+			showMessage(Element('cc_msg_err_contacting_server').value);
+			
+			return;
+		}
+
+		if (data['status'] == 'empty')
+		{
+			cities.disabled = true;
+			cities.selectedIndex = 0;
+			return;
+		}
+		else if (data['status'] != 'ok')
+		{
+			showMessage(data['msg']);
+			cities.disabled = true;
+			cities.selectedIndex = 0;
+			updateAddrFillingFields();
+			return;
+		}
+		cities.disabled = false;
+		var i = 1;
+		for (var j in data['data'])
+		{
+			cities.options[i] = new Option(data['data'][j], j);
+			i++;
+		}
+
+		cities.disabled = false;
+		cities.selectedIndex = 0;
+
+		data = CC_contact_full_info['addresses'];
+		var addrIndex = 'address'+Element('cc_addr_types').value;
+		if (data && data[addrIndex])
+		{
+			cities.value = data[addrIndex]['id_city'];
+
+			if (cities.value == '_NEW_')
+			{
+				if (CC_contact_full_info['addresses']['new_cities'][addrIndex])
+				{
+					Element('cc_addr_cities_new').value = CC_contact_full_info['addresses']['new_cities'][addrIndex];
+				}
+				updateAddrNewCityOnMouseOut();
+			}
+		}
+	};
+	
+	Connector.newRequest('populateCities', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_cities&'+requestStr, 'GET', handler);
+}
+
+function updateAddrNewStateOnMouseOver ()
+{
+	if (Element('cc_addr_states_new').value == Element('cc_msg_type_state').value && Element('cc_addr_states').selectedIndex == 1) 
+	{
+		Element('cc_addr_states_new').value = '';
+	}
+}
+
+function updateAddrNewStateOnMouseOut ()
+{
+	if (Element('cc_addr_states_new').value.length == 0 && Element('cc_addr_states').selectedIndex == 1) 
+	{
+		Element('cc_addr_states_new').value = Element('cc_msg_type_state').value;
+	}
+}
+
+function updateAddrFillingFields()
+{
+	var countries = Element('cc_addr_countries');
+	var cities = Element('cc_addr_cities');
+	var newCity = Element('cc_addr_cities_new');
+
+	if (countries.value == '_NONE_')
+	{
+		newCity.readonly = true;
+		newCity.disabled = true;
+		newCity.value = '';
+		disableAddrFillingFields();
+		return;
+	}
+	
+	Element('cc_addr_1').readonly = false;
+	Element('cc_addr_1').disabled = false;
+
+	Element('cc_addr_2').readonly = false;
+	Element('cc_addr_2').disabled = false;
+
+	Element('cc_addr_other').readonly = false;
+	Element('cc_addr_other').disabled = false;
+
+	Element('cc_addr_complement').readonly = false;
+	Element('cc_addr_complement').disabled = false;
+
+	Element('cc_addr_postal_code').readonly = false;
+	Element('cc_addr_postal_code').disabled = false;
+
+	Element('cc_addr_po_box').readonly = false;
+	Element('cc_addr_po_box').disabled = false;
+
+	Element('cc_addr_is_default').readonly = false;
+	Element('cc_addr_is_default').disabled = false;
+
+	switch (cities.value)
+	{
+		case '_NONE_':
+			newCity.readonly = true;
+			newCity.disabled = true;
+			newCity.value = '';
+
+			//resetAddrFillingFields();
+			
+			return;
+
+		case '_NEW_':
+
+			newCity.readonly = false;
+			newCity.disabled = false;
+			updateAddrNewCityOnMouseOut();
+			
+			break;
+
+		case '_SEP_': return;
+
+		default:
+			newCity.readonly = true;
+			newCity.disabled = true;
+			newCity.value = '';
+	}
+}
+
+function updateAddrNewCityOnMouseOver ()
+{
+	if (Element('cc_addr_cities_new').value == Element('cc_msg_type_city').value && Element('cc_addr_cities').selectedIndex == 1) 
+	{
+		Element('cc_addr_cities_new').value = '';
+	}
+}
+
+function updateAddrNewCityOnMouseOut ()
+{
+	if (Element('cc_addr_cities_new').value.length == 0 && Element('cc_addr_cities').selectedIndex == 1) 
+	{
+		Element('cc_addr_cities_new').value = Element('cc_msg_type_city').value;
+	}
+}
+
+function saveAddressFields ()
+{
+	var lastIndex = CC_addr_last_selected;
+
+	if (lastIndex == 0)
+	{
+		return true;
+	}
+	
+	var addrFields = new Array('cc_addr_1', 
+	                           'cc_addr_2', 
+							   'cc_addr_complement', 
+							   'cc_addr_other',
+							   'cc_addr_postal_code', 
+							   'cc_addr_po_box',
+							   'cc_addr_countries',
+							   'cc_addr_states',
+							   'cc_addr_cities');
+
+	var empty = true;
+	
+	for (var i = 0; i < 8; i++)
+	{
+		var field = Element(addrFields[i]);
+		if (field.value && field.value != '_NONE_' && field.value != '_SEP_')
+		{
+			empty = false;
+		}
+	}
+				
+	if (empty)
+	{
+		return true;
+	}
+
+	if (!CC_contact_full_info['addresses'])
+	{
+		CC_contact_full_info['addresses'] = new Array();
+	}
+
+	var addrInfo = CC_contact_full_info['addresses']['address'+Element('cc_addr_types').options[lastIndex].value];
+
+	if (!addrInfo)
+	{
+		addrInfo = new Array();
+	}
+
+	addrInfo['id_address'] = Element('cc_addr_id').value;
+
+	switch(Element('cc_addr_countries').value)
+	{
+		case '_SEP_':
+		case '_NONE_':
+			addrInfo['id_country'] = false;
+			break;
+
+		default:
+			addrInfo['id_country'] = Element('cc_addr_countries').value;
+		
+	}
+
+	switch(Element('cc_addr_states').value)
+	{
+		case '_SEP_':
+		case '_NONE_':
+		case '_NEW_':
+		case '_NOSTATE_':
+			addrInfo['id_state'] = false;
+			break;
+
+		default:
+			addrInfo['id_state'] = Element('cc_addr_states').value;
+		
+	}
+
+	switch(Element('cc_addr_cities').value)
+	{
+		case '_SEP_':
+		case '_NONE_':
+		case '_NEW_':
+			addrInfo['id_city'] = false;
+			break;
+
+		default:
+			addrInfo['id_city'] = Element('cc_addr_cities').value;
+		
+	}	
+
+	addrInfo['id_typeof_address']  = Element('cc_addr_types').options[lastIndex].value;
+	addrInfo['address1']           = Element('cc_addr_1').value ? Element('cc_addr_1').value : false;
+	addrInfo['address2']           = Element('cc_addr_2').value ? Element('cc_addr_2').value : false;
+	addrInfo['complement']         = Element('cc_addr_complement').value ? Element('cc_addr_complement').value : false;
+	addrInfo['address_other']      = Element('cc_addr_other').value ? Element('cc_addr_other').value : false;
+	addrInfo['postal_code']        = Element('cc_addr_postal_code').value ? Element('cc_addr_postal_code').value : false;
+	addrInfo['po_box']             = Element('cc_addr_po_box').value ? Element('cc_addr_po_box').value : false;
+	addrInfo['address_is_default'] = Element('cc_addr_is_default').checked ? '1' : '0';
+
+	CC_contact_full_info['addresses']['address'+Element('cc_addr_types').options[lastIndex].value] = addrInfo;
+
+	if (Element('cc_addr_cities').value == '_NEW_' && 
+	    Element('cc_msg_type_city').value !=  Element('cc_addr_cities_new').value &&
+		Element('cc_addr_cities_new').value != '')
+	{
+		var addrRootInfo = CC_contact_full_info['addresses']['new_cities'];
+		
+		if (!addrRootInfo)
+		{
+			addrRootInfo = new Array();
+		}
+		
+		var i = addrRootInfo.length;
+		addrRootInfo[addrInfo['id_typeof_address']] = new Array();
+		addrRootInfo[addrInfo['id_typeof_address']]['id_country'] = Element('cc_addr_countries').value;
+		addrRootInfo[addrInfo['id_typeof_address']]['id_state']   = Element('cc_addr_states').value.charAt(0) != '_' ? Element('cc_addr_states').value : null;
+		addrRootInfo[addrInfo['id_typeof_address']]['city_name']  = Element('cc_addr_cities_new').value;
+		CC_contact_full_info['addresses']['new_cities'] = addrRootInfo;
+	}
+
+	if (Element('cc_addr_states').value == '_NEW_' && 
+	    Element('cc_msg_type_state').value !=  Element('cc_addr_states_new').value && 
+		Element('cc_addr_states_new').value != '')
+	{
+		var addrRootInfo = CC_contact_full_info['addresses']['new_states'];
+		
+		if (!addrRootInfo)
+		{
+			addrRootInfo = new Array();
+		}
+		
+		var i = addrRootInfo.length;
+		addrRootInfo[addrInfo['id_typeof_address']] = new Array();
+		addrRootInfo[addrInfo['id_typeof_address']]['id_country'] = Element('cc_addr_countries').value;
+		addrRootInfo[addrInfo['id_typeof_address']]['state_name'] = Element('cc_addr_states_new').value;
+		CC_contact_full_info['addresses']['new_states'] = addrRootInfo;
+	}
+
+	return true;
+}
+
+
+/********* End Addresses Functions *********/
+
+
+
+/********* Begin Connections Functions ************/
+function connGetHTMLLine ()
+{
+	var _label = (CC_contact_full_info['connections']
+		&& typeof(CC_contact_full_info['connections'][CC_conn_last_selected])!= 'undefined'
+		&& typeof(CC_contact_full_info['connections'][CC_conn_last_selected][CC_conn_count]) != 'undefined'
+		? CC_contact_full_info['connections'][CC_conn_last_selected][CC_conn_count]['name']
+		: Element("cc_conn_type_sel").value);
+
+	var cc_conn_default = Element("cc_phone_default").style.display == '' ? Element("cc_phone_default") : Element("cc_email_default");
+	cc_conn_default.disabled = false;
+	var idx_conn = 0;
+	for(idx_conn; idx_conn < cc_conn_default.options.length; idx_conn++)
+		if(cc_conn_default.options[idx_conn].value == _label)
+			break;	
+	
+	if(idx_conn == cc_conn_default.options.length)
+		cc_conn_default.options[idx_conn] = new Option (_label,_label, false,false);
+			
+	if (!document.all)
+	{
+		return '<td style="position: absolute; left: 0; top: 0; z-index: -1; visibility: hidden"><input id="cc_conn_id_' + CC_conn_count + '" type="hidden" value="_NEW_"><input id="cc_conn_is_default_' + CC_conn_count + '" type="hidden" value="false"></td>'+
+		//'<td style="width: 30px;" align="right"><input name="cc_conn_is_default" id="cc_conn_is_default_'+ CC_conn_count +'" type="radio"></td>'+
+		'<td style="width: 10px;" align="right"><input id="cc_conn_name_'+CC_conn_count+'" type="hidden"><td style="width: 100px;" align="right"><span style="width: 150px;" id="cc_conn_label_'+CC_conn_count+'">'+_label+'</span></td>' +
+		'<td align="left"><input id="cc_conn_value_'+ CC_conn_count +'" style="width: 150px;" type="text">&nbsp;' +
+		'<img align="top" alt="X" src="templates/default/images/x.png" style="width:18px; height:18px" onclick="javascript:removeConnField(\'cc_conn_tr_' + CC_conn_count + '\')"></td>';
+	}
+	else
+	{
+		var tds = new Array();
+		var inputs = new Array();
+		var img = document.createElement('img');
+
+		for (var i = 0; i < 4; i++)
+		{
+			tds[i] = document.createElement('td');
+		}
+
+		tds[0].style.position = 'absolute';
+		tds[0].style.visibility = 'hidden';
+		tds[0].style.zIndex = '-1';
+
+		var remove_id = 'cc_conn_tr_'+CC_conn_count;
+		img.alt = 'X';
+		img.src = 'templates/default/images/x.png';
+		img.style.width = '18px';
+		img.style.height = '18px';
+		img.align = 'top';
+		img.onclick = function(e){ removeConnField(remove_id);};
+		
+		for (var i = 0; i < 3; i++)
+		{
+			inputs[i] = document.createElement('input');
+		}
+
+		inputs[0].id = 'cc_conn_id_'+CC_conn_count;
+		inputs[0].type = 'hidden';
+		inputs[0].value = '_NEW_';
+
+		inputs[1].id = 'cc_conn_name_'+CC_conn_count;
+		inputs[1].type = 'hidden';		
+
+		inputs[2].id = 'cc_conn_value_'+CC_conn_count;
+		inputs[2].type = 'text';
+		inputs[2].style.width = '150px';
+
+		var _span = document.createElement("SPAN");
+		_span.style.width = "150px";
+		_span.id = "cc_conn_label_"+CC_conn_count;
+		_span.innerHTML = _label;
+		tds[0].appendChild(inputs[0]);
+		tds[1].appendChild(inputs[1]);
+		tds[1].align = 'right';
+		tds[1].appendChild(_span);
+		tds[2].appendChild(inputs[2]);
+		tds[2].align = 'left';
+		tds[2].innerHTML +="&nbsp;";
+		tds[2].appendChild(img);
+
+		return tds;
+	}
+}
+
+function connAddNewLine ()
+{
+
+	var _emptyLine = (!CC_contact_full_info['connections']
+		|| typeof(CC_contact_full_info['connections'][CC_conn_last_selected]) == 'undefined'
+		|| typeof(CC_contact_full_info['connections'][CC_conn_last_selected][CC_conn_count]) == 'undefined');
+	
+	if(_emptyLine) {	
+		
+		if(Element("cc_conn_type_sel").value == '-1'){
+				return false;	
+		}
+		
+		for(k = 0; k < CC_conn_count; k++) {
+			if(Element("cc_conn_name_"+k) && Element("cc_conn_name_"+k).value != "" && Element("cc_conn_name_"+k).value == Element("cc_conn_type_sel").value) {
+				alert('Você já possui uma entrada para o tipo "'+Element("cc_conn_type_sel").value+'"!');
+				Element("cc_conn_type_sel").options.selectedIndex = 0;				
+				return false;
+			}
+		}
+	}	
+	if (!document.all)
+	{
+		var obj = addHTMLCode('cc_conn', 'cc_conn_tr_'+CC_conn_count, connGetHTMLLine(),'tr');
+	}
+	else
+	{
+		var tds = connGetHTMLLine();
+		var tr = document.createElement('tr');
+		var tbody = Element('cc_conn');
+
+		tr.id = 'cc_conn_tr_'+CC_conn_count;
+		tbody.appendChild(tr);
+
+		for (var i = 0; i < 4; i++)
+		{
+			tr.appendChild(tds[i]);
+		}
+	}
+	Element("cc_conn_name_"+CC_conn_count).value = Element("cc_conn_type_sel").value;
+	Element("cc_conn_type_sel").options.selectedIndex = 0;
+	CC_conn_count++;
+
+	return CC_conn_count;
+}
+
+function connRemoveLine(id)
+{	
+	var p = Element(id).parentNode;
+	var cc_conn_default = Element("cc_phone_default").style.display == '' ? Element("cc_phone_default") : Element("cc_email_default");
+	var _label = Element("cc_conn_label_"+(id.substring(11,13))).innerHTML;
+	for(var i = 0;i < cc_conn_default.options.length; i++) {
+		if(cc_conn_default.options[i].value == _label) {
+			cc_conn_default.options[i] = null;
+			break;
+		}
+	}
+	if(cc_conn_default.options.length == 1)
+		cc_conn_default.disabled = true;
+
+	removeHTMLCode(id);
+
+	return;
+	connRefreshClass(p.childNodes);
+}
+
+function connRefreshClass(Nodes)
+{
+	for (var i = 2; i < Nodes.length; i++)
+	{
+		Nodes.item(i).className = i % 2 ? 'row_on' : 'row_off';
+	}
+}
+
+function clearConn()
+{
+	var connParent = Element('cc_conn').childNodes;
+	var i;
+
+	for (i = connParent.length - 1; i >= 0; i--)
+	{
+		if (connParent[i].id)
+		{
+			connRemoveLine(connParent[i].id);
+		}
+	}
+	
+	CC_conn_count = 0;
+}
+
+function removeConnField(id)
+{
+	var count = id.substring(id.lastIndexOf('_')+1);
+	if (Element('cc_conn_id_'+count).value != '_NEW_')
+	{
+		if (typeof(CC_contact_full_info['removed_conns']) != 'object')
+		{
+			CC_contact_full_info['removed_conns'] = new Array();
+		}
+
+		CC_contact_full_info['removed_conns'][CC_contact_full_info['removed_conns'].length] = Element('cc_conn_id_'+count).value;
+	}
+
+	connRemoveLine(id);
+}
+
+function updateConnFields()
+{
+	
+	var connID;
+	var i;
+	var cc_conn_type_sel = Element("cc_conn_type_sel");
+	var cc_phone_default = Element("cc_phone_default");
+	var cc_email_default = Element("cc_email_default");
+	var div_cc_conn_is_default = Element("div_cc_conn_is_default");
+	var cc_conn_is_default = '';
+	var selected_index = '';
+	
+	cc_conn_type_sel.disabled = false;
+	div_cc_conn_is_default.style.display = "";
+	
+	for(var i = 0;i < cc_conn_type_sel.options.length; i++)
+		cc_conn_type_sel.options[i--] = null;	
+		
+	if(Element('cc_conn_type_1').checked) {
+	    var lang_new_email = Element('cc_msg_new_email').value;
+	    var lang_main = Element('cc_msg_main').value;
+	    var lang_alternative = Element('cc_msg_alternative').value;	
+	    cc_conn_type_sel[0] = new Option(lang_new_email,'-1');	
+	    cc_conn_type_sel[1] = new Option(lang_main,lang_main);
+	    cc_conn_type_sel[2] = new Option(lang_alternative,lang_alternative);	
+		connID = 1;
+		selected_index = cc_email_default.options.selectedIndex;
+		for(var i = 0;i < cc_email_default.options.length; i++) {
+			cc_email_default.options[i--] = null;
+		}
+
+		var lang_select_email = Element('cc_msg_select_email').value;
+		cc_email_default.options[0] = new Option(lang_select_email,'-1');		
+		cc_phone_default.style.display = 'none';
+		cc_email_default.style.display = '';			
+		cc_conn_is_default = cc_email_default;
+	}
+	else if(Element('cc_conn_type_2').checked) {
+	    var lang_new_telephone = Element('cc_msg_new_phone').value;
+	    var lang_home = Element('cc_msg_home').value;
+	    var lang_cellphone = Element('cc_msg_cellphone').value;
+	    var lang_work = Element('cc_msg_work').value;
+	    var lang_fax = Element('cc_msg_fax').value;
+	    var lang_pager = Element('cc_msg_pager').value;
+	    cc_conn_type_sel[0] = new Option(lang_new_telephone,'-1');	
+	    cc_conn_type_sel[1] = new Option(lang_home,lang_home);
+	    cc_conn_type_sel[2] = new Option(lang_cellphone,lang_cellphone);	
+	    cc_conn_type_sel[3] = new Option(lang_work,lang_work);
+	    cc_conn_type_sel[4] = new Option(lang_fax,lang_fax);
+	    cc_conn_type_sel[5] = new Option(lang_pager,lang_pager);
+
+		connID = 2;
+		selected_index = cc_phone_default.options.selectedIndex;
+		for(var i = 0;i < cc_phone_default.options.length; i++) {
+			cc_phone_default.options[i--] = null;
+		}
+
+		var lang_choose_phone = Element('cc_msg_choose_phone').value;		
+		cc_phone_default.options[0] = new Option(lang_choose_phone,'-1');
+		cc_email_default.style.display = 'none';
+		cc_phone_default.style.display = '';
+		cc_conn_is_default = cc_phone_default;
+	}
+			
+	Element("cc_conn_type_sel").options.selectedIndex = 0;
+	/* First save the data */
+	saveConnFields();
+
+	CC_conn_last_selected = connID;
+	
+	clearConn();
+	
+	if (connID == '_NONE_')
+	{	cc_conn_is_default.disabled = true;
+		return;
+	}
+	
+	/* If no data already available, return */
+	if (!CC_contact_full_info['connections'])
+	{
+		cc_conn_is_default.disabled = true;
+		return;
+	}
+	cc_conn_is_default.disabled = (!CC_contact_full_info['connections'][connID] || CC_contact_full_info['connections'][connID].length == 0);
+	/* Put the information that's already available */
+	for (i in CC_contact_full_info['connections'][connID])
+	{
+		var num = connAddNewLine();
+		Element('cc_conn_id_'+i).value = CC_contact_full_info['connections'][connID][i]['id'];
+		Element('cc_conn_name_'+i).value = CC_contact_full_info['connections'][connID][i]['name'];
+		Element('cc_conn_value_'+i).value = CC_contact_full_info['connections'][connID][i]['value'];
+
+		if(!selected_index || (selected_index == '-1' && CC_contact_full_info['connections'][connID][i]['is_default'])){
+			for(var j = 0;j < cc_conn_is_default.options.length; j++){
+				if(cc_conn_is_default.options[j].value == CC_contact_full_info['connections'][connID][i]['name']) {
+					selected_index = j;
+					break;
+				}
+			}
+		}
+	}	
+	if(cc_conn_is_default.options.length > selected_index)
+		cc_conn_is_default.options.selectedIndex = (selected_index == "-1" ? 0 : selected_index);
+}
+
+function saveConnFields()
+{
+	if (CC_conn_last_selected != 0 && CC_conn_last_selected != '_NONE_')
+	{
+		var nodes = Element('cc_conn').childNodes;
+		var k = 0;
+
+		if (typeof(CC_contact_full_info['connections']) != 'object' || CC_contact_full_info['connections'] == null)
+		{
+			CC_contact_full_info['connections'] = new Array();
+			CC_contact_full_info['connections'][CC_conn_last_selected] = new Array();
+		}
+		else if (typeof(CC_contact_full_info['connections'][CC_conn_last_selected]) != 'object')
+		{
+			CC_contact_full_info['connections'][CC_conn_last_selected] = new Array();
+		}
+		else 
+		{
+			delete CC_contact_full_info['connections'][CC_conn_last_selected];
+			CC_contact_full_info['connections'][CC_conn_last_selected] = new Array();
+		}
+
+		for (var i = 0; i < nodes.length; i++)
+		{
+			if (nodes[i].id)
+			{
+				var subNodes = nodes[i].childNodes;
+				var found = false;
+				
+				for (var j = 0; j < subNodes.length; j++)
+				{
+					if (subNodes[j].childNodes.length > 0 && 
+					    subNodes[j].childNodes[0].id)
+					{
+						/* Check for the Connection Info array */
+						if (typeof(CC_contact_full_info['connections'][CC_conn_last_selected][k]) != 'object')
+						{
+							CC_contact_full_info['connections'][CC_conn_last_selected][k] = new Array();
+						}
+						
+					    if (subNodes[j].childNodes[0].id.indexOf('cc_conn_name') != -1)
+						{
+							if (subNodes[j].childNodes[0].value)
+							{
+								CC_contact_full_info['connections'][CC_conn_last_selected][k]['name'] = subNodes[j].childNodes[0].value;
+							}
+							else
+							{
+								CC_contact_full_info['connections'][CC_conn_last_selected][k]['name'] = '';
+							}
+						}
+						else if (subNodes[j].childNodes[0].id.indexOf('cc_conn_value') != -1)
+						{
+							if (subNodes[j].childNodes[0].value)
+							{
+								CC_contact_full_info['connections'][CC_conn_last_selected][k]['value'] = subNodes[j].childNodes[0].value;
+							}
+							else
+							{
+								CC_contact_full_info['connections'][CC_conn_last_selected][k]['value'] = ''; 
+							}
+						}
+						else if (subNodes[j].childNodes[0].id.indexOf('cc_conn_id') != -1)
+						{
+							CC_contact_full_info['connections'][CC_conn_last_selected][k]['id'] = subNodes[j].childNodes[0].value;
+						}
+
+						found = true;
+					}
+				}
+				
+				if (found)
+				{
+					k++;
+				}
+			}
+		}
+
+		if (CC_contact_full_info['connections'].length == 0)
+		{
+			delete CC_contact_full_info['connections'];
+		}
+
+		if (CC_contact_full_info['connections'][CC_conn_last_selected].length == 0)
+		{
+			delete CC_contact_full_info['connections'][CC_conn_last_selected];
+		}
+		
+	}
+
+	return;
+}
+
+/***********************************************\
+*               VIEW CARDS FUNCTIONS            *
+\***********************************************/
+function removeAllEntries()
+{
+	var handler = function (responseText)
+	{
+		var data = unserialize(responseText);
+		if (typeof(data) != 'object') {
+			showMessage(Element('cc_msg_err_contacting_server').value);
+			return;
+		}
+		if (data['status'] != 'ok')	{
+			showMessage(data['msg']);
+			return;
+		}
+		setTimeout('updateCards()',80);
+	};
+	var number = randomString().toLowerCase();
+	var result = '';
+	
+	if(!is_ie)
+		result = prompt("Essa operação removerá TODOS os seus \ncontatos pessoais,  e  NÃO  PODERÁ  ser \ndesfeita. Digite o código abaixo:\n\tCódigo de confirmação: "+number);
+	else
+		result = prompt("Essa operação removerá TODOS os seus contatos pessoais,  e  NÃO  PODERÁ  ser desfeita. Digite o seguinte código de confirmação: "+number,"");
+
+	if(result) {
+		if(result.toLowerCase() == number)
+			Connector.newRequest('removeAllEntries', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=remove_all_entries', 'GET', handler);
+		else
+			alert('Código Incorreto');
+	}	
+}
+
+function removeEntry(id, type)
+{
+	var question = showMessage(type == 'groups' ? Element('cc_msg_group_remove_confirm').value: Element('cc_msg_card_remove_confirm').value, 'confirm');
+
+	if (!question)
+	{
+		return;
+	}
+	
+	var handler = function (responseText)
+	{
+		var data = unserialize(responseText);
+
+		if (typeof(data) != 'object')
+		{
+			showMessage(Element('cc_msg_err_contacting_server').value);
+			return;
+		}
+		
+		if (data['status'] != 'ok')
+		{
+			showMessage(data['msg']);
+			return;
+		}
+		
+		setTimeout('updateCards()',80);;
+	};
+		
+	typeArg = (type == 'groups' ? 'group' : 'entry');
+		
+	Connector.newRequest('removeEntry', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=remove_'+typeArg+'&remove=' + id, 'GET', handler);
+}
+
+function updateCards()
+{
+	setHeightSpace();
+	setMaxCards(getMaxCards());
+	showCards(getActualLetter(), getActualPage());
+}
+
+
+window.onresize = function ()
+{
+	updateCards();
+}
+
+
+function setHeightSpace ()
+{
+	/*
+	var w_height = 0;
+	var w_extra = 200;
+	
+	if (document.body.clientHeight)
+	{
+		w_height = parseInt(document.body.clientHeight);
+	}
+	else
+	{
+		w_height = 500;
+	}
+	if (w_height < 500)
+	{
+		w_height = 500;
+	}
+	Element('cc_card_space').style.height = (w_height - w_extra) + 'px';
+	*/
+}
+
+function selectLetter (letter_id)
+{
+	for (var i = 0; i < 28; i++)
+	{
+		if ( i == letter_id )
+		{
+			Element('cc_letter_' + i).className = 'letter_box_active';
+		}
+		else
+		{
+			Element('cc_letter_' + i).className = 'letter_box';
+		}
+	}
+}
+
+function clearLetterSelection()
+{
+	for (var i = 0; i < 28; i++)
+	{
+		Element('cc_letter_' + i).className = 'letter_box';
+	}
+}
+function getActualPage ()
+{
+	return CC_actual_page;
+}
+
+function getActualLetter ()
+{
+	return CC_actual_letter;
+}
+
+function getFirstPage ()
+{
+	return 1;
+}
+
+function getPreviousPage ()
+{
+	if ( CC_actual_page > 1 )
+	{
+		return CC_actual_page - 1;
+	}
+	else
+	{
+		return 1;
+	}
+}
+
+function getNextPage ()
+{
+	if ( CC_actual_page < CC_npages )
+	{
+		return CC_actual_page + 1;
+	}
+	else
+	{
+		return CC_npages;
+	}
+}
+
+function getLastPage ()
+{
+	return CC_npages;
+}
+
+function setPages (npages, actual_page, showing_page)
+{
+	var html_pages = '';
+	var n_lines = 0;
+	var page_count = 0;
+
+	if (CC_npages == 0)
+	{
+		html_pages = '';
+	}
+	else
+	{
+		var page = 1;
+		if (showing_page > 10 || (!showing_page && actual_page > 10))
+		{
+			var final_page = showing_page? showing_page-11 : actual_page-11;
+			if (final_page < 1)
+			{
+				final_page = 1;
+			}
+			
+			html_pages += '<a href="javascript:setPages('+npages+', '+ actual_page +', '+ final_page +')">...</a> ';
+
+			page = showing_page ? showing_page : actual_page;
+		}
+		
+		for (; page <= npages; page++)
+		{
+			if (page_count > 10)
+			{
+				html_pages += '<a href="javascript:setPages('+npages+', '+ actual_page +', '+ page +');">...</a>';
+				break;
+			}
+			if ( page == actual_page )
+			{
+				html_pages += '<b>'+page+'</b>';
+			}
+			else
+			{
+				html_pages += '<a href="javascript:showCards(\'' + CC_actual_letter + '\',' + page + ')">' + page + '</a>';
+			}
+			html_pages += '&nbsp;';
+			page_count++;
+		}
+	}
+
+	if (actual_page <= 1)
+	{
+		Element('cc_panel_arrow_first').onclick = '';
+		Element('cc_panel_arrow_previous').onclick = '';
+		Element('cc_panel_arrow_first').style.cursor = 'auto';
+		Element('cc_panel_arrow_previous').style.cursor = 'auto';
+	}
+	else
+	{
+		Element('cc_panel_arrow_first').onclick = function (event) { showCards(getActualLetter(), getFirstPage()); };
+		Element('cc_panel_arrow_previous').onclick = function (event) { showCards(getActualLetter(), getPreviousPage()); };
+		if (is_mozilla)
+		{
+			Element('cc_panel_arrow_first').style.cursor = 'pointer';
+			Element('cc_panel_arrow_previous').style.cursor = 'pointer';
+		}
+		Element('cc_panel_arrow_first').style.cursor = 'hand';
+		Element('cc_panel_arrow_previous').style.cursor = 'hand';
+	}
+
+	if (actual_page == CC_npages)
+	{
+		Element('cc_panel_arrow_next').onclick = '';
+		Element('cc_panel_arrow_last').onclick = '';
+		Element('cc_panel_arrow_next').style.cursor = 'auto';
+		Element('cc_panel_arrow_last').style.cursor = 'auto';
+	}
+	else
+	{
+		Element('cc_panel_arrow_next').onclick = function (event) { showCards(getActualLetter(), getNextPage()); };
+		Element('cc_panel_arrow_last').onclick = function (event) { showCards(getActualLetter(), getLastPage()); };
+		if (is_mozilla)
+		{
+			Element('cc_panel_arrow_next').style.cursor = 'pointer';
+			Element('cc_panel_arrow_last').style.cursor = 'pointer';
+		}
+		Element('cc_panel_arrow_next').style.cursor = 'hand';
+		Element('cc_panel_arrow_last').style.cursor = 'hand';
+	}
+	
+	Element('cc_panel_pages').innerHTML = html_pages;
+}
+
+function populateCards(data, type)
+{
+	if (data[3].length >= 100 )
+	{
+		alert("Critério de pesquisa muito abrangente, achados " + data[3].length + " resultados");
+		for (i = 0; i < (Math.sqrt(data[3].length)-1); i++)
+			for (j = 0; j < 3; j++)
+				document.getElementById("cc_card:"+j+":"+i).innerHTML = '';
+		return false;
+	}
+	
+	if(type == 'groups')
+		return populateGroupsInCards(data);
+	
+	var pos = 0;
+	var ncards = data[3].length;
+	
+	if (typeof(data[3]) == 'object' && ncards > 0)
+	{
+		for (var i = 0; i < CC_max_cards[1]; i++)
+		{
+			for (var j = 0; j < CC_max_cards[0]; j++)
+			{
+				id = 'cc_card:'+j+':'+i;
+			
+				for (var k = 0; k < data[2].length; k++)
+				{
+					if(!(ccTree.catalog_perms & 2))
+					{
+						switch(data[2][k])
+						{
+							case 'cc_mail' :
+
+								if(data[3][pos][k] === 'none')
+									data[3][pos][k] = '&nbsp';
+								break;
+							case 'cc_phone' :
+
+								if(data[3][pos][k] === 'none')
+									data[3][pos][k] = '&nbsp';
+								break;
+						}
+						
+					}
+					
+					
+					/*if(data[2][k] ==  'cc_mail' && data[3][pos][k] == 'none' && !(ccTree.catalog_perms & 2) ) {
+						Element(id).style.display = 'none';
+						continue;
+					}*/
+				
+					if(data[3][pos][k] != 'none')
+					{
+						switch (data[2][k])
+						{
+							case 'cc_name':
+								if (data[3][pos][k].length > 50)
+								{
+									Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], 50);
+									Element(id+':'+data[2][k]).title = data[3][pos][k];
+								}
+								else
+								{
+									Element(id+':'+data[2][k]).innerHTML = data[3][pos][k];
+								}
+								break;
+							
+							case 'cc_mail':
+								
+								if (data[3][pos][k].length > (CC_visual == 'table'  ? 50 : 20))
+								{
+									Element(id+':'+data[2][k]).innerHTML = data[5] + data[3][pos][k] + '\')">'+ adjustString(data[3][pos][k], (CC_visual == 'table'  ? 50 : 20))+'</span>';
+									Element(id+':'+data[2][k]).title = data[3][pos][k];
+								}
+								else
+								{
+									Element(id+':'+data[2][k]).innerHTML = data[5] + data[3][pos][k] + '\')">'+ data[3][pos][k]+'</span>';									
+								}
+								break;
+							
+							case 'cc_phone':
+								if (data[3][pos][k].length > 20)
+								{
+									Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], 20);
+									Element(id+':'+data[2][k]).title = data[3][pos][k];
+								}
+								else
+								{
+									Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], 20);
+								}
+								Element(id+':cc_phone').innerHTML = data[3][pos][k];
+								break;
+
+							case 'cc_title':
+								if (data[3][pos][k].length > 15)
+								{
+									Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], 15);
+									Element(id+':'+data[2][k]).title = data[3][pos][k];
+								}
+								else
+								{
+									Element(id+':'+data[2][k]).innerHTML = data[3][pos][k];
+								}
+								break;
+
+							case 'cc_id':
+								var id_contact = data[3][pos][k];
+								Element(id+':'+data[2][k]).value = data[3][pos][k];
+								Element(id+':cc_photo').src = '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_photo' + (data[4][pos] != 0 ? '&id='+data[3][pos][k] : '');
+								if(ccTree.catalog_perms == 1)
+									Element(id+':cc_icon_data').innerHTML =  '<span title="'+Element('cc_msg_copy_to_catalog').value+'" id="' + id + ':ccQuickAdd" onmouseout="window.status=\'\';" onclick="ccQuickAddContact.showList(\''+ Element(id+':cc_id').value + '\');return true;" style="cursor: pointer; cursor: hand; z-index: 1"><img src="templates/default/images/address-conduit-16.png" align="center"></span>';
+								break;
+
+							case 'cc_forwarding_address':
+								var contacts = data[3][pos][k];
+																
+								if( !contacts)
+									break;
+																																								
+								Element(id+':cc_icon_group').innerHTML =  '<span title="'+Element('cc_participants').value+'"  onmouseout="window.status=\'\';" onclick="ccListParticipants.showList(\''+ Element(id+':cc_id').value + '\');return true;" style="cursor: pointer; cursor: hand; z-index: 1"><img src="templates/default/images/people-mini.png" align="center">&nbsp;&nbsp;</span>';
+								break;
+
+							default:
+								if (data[3][pos][k].length > 10)
+								{
+									Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], 10);
+									Element(id+':'+data[2][k]).title = data[3][pos][k];
+								}
+								else
+								{
+									Element(id+':'+data[2][k]).innerHTML = data[3][pos][k];
+								}
+						}
+					}
+				}
+	
+				if (--ncards == 0)
+				{
+					j = CC_max_cards[0];
+					i = CC_max_cards[1];
+				}
+	
+				pos++;
+			}
+		}
+	}
+}
+
+function populateGroupsInCards(data)
+{	
+	var pos = 0;
+	var contacts = data[5];		
+	var ncards = data[3].length;
+	
+	if (typeof(data[3]) == 'object' && ncards > 0)
+	{
+		for (var i = 0; i < CC_max_cards[1]; i++)
+		{
+			for (var j = 0; j < CC_max_cards[0]; j++)
+			{
+				id = 'cc_card:'+j+':'+i;
+			
+				for (var k = 0; k < data[2].length; k++)
+				{
+				
+					if(data[3][pos][k] != 'none')
+					{	
+											
+						switch (data[2][k])
+						{							
+							case 'cc_title':
+								if (data[3][pos][k].length > 50)
+								{
+									Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], 50);
+									Element(id+':'+data[2][k]).title = data[3][pos][k];
+								}
+								else
+								{
+									Element(id+':'+data[2][k]).innerHTML = data[3][pos][k];
+								}
+								break;
+							
+							case 'cc_short_name':
+								if (data[3][pos][k].length > (CC_visual == 'table'  ? 50 : 20))
+								{
+									Element(id+':'+data[2][k]).innerHTML = data[5] + ''+data[3][pos][k] +'\')">'+adjustString(data[3][pos][k], (CC_visual == 'table'  ? 50 : 20))+'</span>';
+									Element(id+':'+data[2][k]).title = data[3][pos][k];
+								}
+								else
+								{
+									Element(id+':'+data[2][k]).innerHTML = data[5] + ''+data[3][pos][k] + '\')">'+data[3][pos][k]+'</span>';
+								}
+								break;
+							
+							case 'cc_contacts':
+
+								var id_group = data[3][pos][k-1];
+								var title = data[3][pos][k-3];
+								contacts = data[3][pos][k];
+								var contact = "";
+								var email = "";
+
+								for (var d = 0; d < contacts.length; d++) {																																					
+									contact += contacts[d]['names_ordered']+ ",";
+									email += contacts[d]['connection_value']+",";
+								}
+								
+								Element(id+':cc_participantes').innerHTML = '<span title="Ver Participantes" id="' + id + ':ccQuickAdd" onmouseout="window.status=\'\';" onclick="ccListParticipants.showList(\''+ Element(id+':cc_id').value+'value\', \''+contact+'\', \''+email+'\', \''+title+'\', \''+id_group+'\');return true;" style="cursor: pointer; cursor: hand; z-index: 1"><img title="Ver participantes" align="center" src="templates/default/images/people-mini.png">&nbsp;&nbsp</span>';
+																					
+								break;
+							
+							case 'cc_id':
+								var id_contact = data[3][pos][k];
+								Element(id+':'+data[2][k]).value = data[3][pos][k];
+								 							
+								break;
+								
+						}
+					}
+				}
+	
+				if (--ncards == 0)
+				{
+					j = CC_max_cards[0];
+					i = CC_max_cards[1];
+				}
+	
+				pos++;
+			}
+		}
+	}
+}
+
+function adjustString (str, max_chars)
+{
+	if (str.length > max_chars)
+	{
+		return str.substr(0,max_chars) + '...';
+	}
+	else
+	{
+		return str;
+	}
+}
+
+function setMaxCards (maxcards)
+{
+	CC_max_cards = maxcards;
+	ncards = maxcards[0] * maxcards[1];
+
+	var handler = function (responseText)
+	{
+		showMessage('ok');
+	};
+
+	Connector.newRequest('setMaxCards', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=set_n_cards&ncards=' + ncards, 'GET'); 
+}
+
+function getMaxCards ()
+{
+	var coord = new Array();
+	
+	//Element('cc_card_space').innerHTML = '';
+	//return;
+
+	card_space_width = parseInt(Element('cc_main').offsetWidth) - parseInt(Element('cc_left').offsetWidth) - parseInt(CC_card_extra);
+	//card_space_width = parseInt(is_ie ? document.body.offsetWidth : window.innerWidth) - parseInt(Element('cc_left').offsetWidth) - parseInt(CC_card_extra) - 40;
+	card_space_height = parseInt(Element('cc_card_space').offsetHeight) - parseInt(CC_card_extra);
+	
+	card_width = CC_card_image_width + CC_card_extra;
+	card_height = CC_card_image_height + CC_card_extra;
+
+	ncols = parseInt(card_space_width / card_width);
+	nlines = parseInt(card_space_height / card_height);
+	
+	coord[0] = ncols;
+	//coord[1] = nlines;
+	coord[1] = 10;
+
+	//alert( 'WIDTH: ' + card_space_width + ' / ' + card_width + ' = ' + card_space_width / card_width + "\n" +
+	//	'HEIGHT: ' + card_space_height + ' / ' + card_height + ' = ' + card_space_height / card_height );
+
+	return coord;
+}
+
+function getCardHTML (id, type)
+{
+		if(type != 'groups') {
+		
+			html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' +
+				'<div style="border: 0px solid #999; position: relative;">' +
+					'<img src="templates/default/images/card.png" border="0" width="' + CC_card_image_width +'" height="' + CC_card_image_height + '"i ondblclick="editContact(Element(\'' + id + ':cc_id\').value);">' + 
+						( ccTree.catalog_perms == 1 ?
+						'<span id="' + id + ':cc_icon_data" style="position: absolute; top: 35px; left: 222px; width: 18px; height: 18px; cursor: pointer; cursor: hand; z-index: 1"></span>':'') +
+						(ccTree.catalog_perms & 2 ?
+						'<img title="'+Element('cc_msg_card_edit').value+'" id="' + id + ':cc_card_edit" style="position: absolute; top: 35px; left: 222px; width: 18px; height: 18px; cursor: pointer; cursor: hand; z-index: 1" onclick="editContact(Element(\'' + id + ':cc_id\').value);" onmouseover="resizeIcon(\''+id+':cc_card_edit\',0)" onmouseout="resizeIcon(\''+id+':cc_card_edit\',1)" src="templates/default/images/cc_card_edit.png">' +
+						'<img title="'+Element('cc_msg_card_remove').value+'" id="' + id + ':cc_card_remove" style="position: absolute; top: 78px; left: 223px; width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value);" onmouseover="resizeIcon(\''+id+':cc_card_remove\',0)" onmouseout="resizeIcon(\''+id+':cc_card_remove\',1)" src="templates/default/images/cc_x.png">' : '') +
+						'<img id="' + id + ':cc_photo" style="position: absolute; top: 15px; left: 7px;" src="" border="0" ondblclick="editContact(Element(\'' + id + ':cc_id\').value);">' + 
+						'<span id="' + id + ':cc_company" style="position: absolute; top: 5px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 14px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_company_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_company_full\').style.visibility=\'hidden\'"></span>' +
+						'<span style="cursor: pointer; cursor: hand; z-index: 1;position: absolute; top: 100px; left: 35px"  valign="bottom" id="' + id + ':cc_icon_group">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>'+ 
+						'<span id="' + id + ':cc_name" style="position: absolute; top: 30px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 10px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_name_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_name_full\').style.visibility=\'hidden\'"></span>' + 
+						'<span id="' + id + ':cc_title" style="position: absolute; top: 60px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 12px; text-align: center; height: 10px;"></span>' + 
+						'<span id="' + id + ':cc_phone" style="position: absolute; top: 90px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 10px; text-align: center; height: 10px;"></span>' + 
+						'<span id="' + id + ':cc_mail" style="position: absolute; top: 105px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 10px; text-align: center; height: 10px;"></span>' + 
+						'<span id="' + id + ':cc_alias" style="position: absolute; top: 95px; left: 10px; width: 60px; border: 0px solid #999; font-weight: normal; font-size: 9px; text-align: center; height: 10px;"></span>' + 
+					'<input id="' + id + ':cc_id" type="hidden">' +
+				'</div>' + '</td>';
+		
+		} else {
+			html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' +
+            '<div style="border: 0px solid #999; position: relative;">' + 
+				'<img src="templates/default/images/card.png" border="0" width="' + CC_card_image_width +'" height="' + CC_card_image_height + '"i ondblclick="editContact(Element(\'' + id + ':cc_id\').value);">' +
+				'<img title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style="position: absolute; top: 35px; left: 222px; width: 18px; height: 18px; cursor: pointer; cursor: hand; z-index: 1" onclick="editGroup(Element(\'' + id + ':cc_id\').value);" onmouseover="resizeIcon(\''+id+':cc_card_edit\',0)" onmouseout="resizeIcon(\''+id+':cc_card_edit\',1)" src="templates/default/images/cc_card_edit.png">' +
+				'<img title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="position: absolute; top: 78px; left: 223px; width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" onmouseover="resizeIcon(\''+id+':cc_card_remove\',0)" onmouseout="resizeIcon(\''+id+':cc_card_remove\',1)" src="templates/default/images/cc_x.png">' + 
+				'<span id="' + id + ':cc_title" style="position: absolute; top: 30px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 10px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_name_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_name_full\').style.visibility=\'hidden\'"></span>' +
+				'<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1;position: absolute; top: 15px; left: 15px"></span>' +
+				'<span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML" id="' + id + ':cc_short_name" style="position: absolute; top: 105px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 10px; text-align: center; height: 10px;"></span>' +
+				'<input id="' + id + ':cc_id" type="hidden">' +
+			'</div>' + '</td>';
+		}
+	
+
+	return html_card;
+}
+
+function getTableHTML (id, type)
+{
+			var bg = "";
+			if(!is_ie)
+				bg = "this.style.background=\'\'";
+			else
+				bg = "this.style.background=\'#EEEEEE\'";
+						
+			if(type != 'groups') {
+			
+				html_card = '<tr  style="height:20px" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE"><td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;">' +					
+					'<span valign="bottom" id="' + id + ':cc_icon_group">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="' + id + ':cc_name"></span></td>' +
+					'<td style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_name\').innerHTML" id="' + id + ':cc_mail"></span></td>' +
+					'<td align="center" nowrap><span style="solid #999; font-weight: normal; font-size: 10px;height: 10px" id="' + id + ':cc_phone"></span></td>' +		
+					( ccTree.catalog_perms == 1 ?
+					'<td align="left"><span valign="bottom" id="' + id + ':cc_icon_data"></span></td>':'') +
+					'<td align="left" >'+
+					(ccTree.catalog_perms & 2 ?
+					'<img  title="'+Element('cc_msg_card_edit').value+'" id="' + id + ':cc_card_edit" style=" cursor: pointer; cursor: hand; z-index: 1;width: 18px; height: 18px;"  onclick="editContact(Element(\'' + id + ':cc_id\').value);" src="templates/default/images/cc_card_edit.png">' +
+					'&nbsp;&nbsp;|&nbsp;&nbsp;'+
+					'<img title="'+Element('cc_msg_card_remove').value+'" id="' + id + ':cc_card_remove" style="width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value);" src="templates/default/images/cc_x.png">' : '') +
+					'<input id="' + id + ':cc_id" type="hidden">'+
+					'<input type="hidden" id="' + id + ':cc_photo">' +
+					'<span id="' + id + ':cc_title" style="display:none"></span>' +
+					'<span id="' + id + ':cc_alias" style="display:none"></span>' +
+					// Esse campo é necessário se o contato possui dados no campo cc_company
+					'<span id="' + id + ':cc_company" style="display:none"></span>' +
+					'</td></tr>';
+			}
+			else {
+				html_card = '<tr width="40%" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE"><td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;">' +
+					'<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1"></span>' +
+					'<span id="' + id + ':cc_title"></span></td>' +
+					'<td width="40%" style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML"  id="' + id + ':cc_short_name"></span></td>' +
+					'<td align="left" width="55px">'+
+					'<img  title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style=" cursor: pointer; cursor: hand; z-index: 1;width: 18px; height: 18px;"  onclick="editGroup(Element(\'' + id + ':cc_id\').value);" src="templates/default/images/cc_card_edit.png">' +
+					'&nbsp;&nbsp;|&nbsp;&nbsp;'+
+					'<img  title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" src="templates/default/images/cc_x.png">'  +
+					'<input id="' + id + ':cc_id" type="hidden">'+										
+					'</td></tr>';
+			}
+
+	return html_card;
+}
+
+function drawTable(ncards, type)
+{
+	var pos;
+	
+	html_cards = '<div id="divScrollMain" style="overflow:auto;z-index:1"><table width="100%" border="0" cellpadding="0" cellspacing="3">';
+	
+	if (ncards > 0)
+	{
+
+		for (var i = 0; i < CC_max_cards[1]; i++)
+		{
+			html_cards += '';
+			for (var j = 0; j < CC_max_cards[0]; j++)
+			{
+				html_cards += getTableHTML('cc_card:' + j + ':' + i, type);
+				if (--ncards == 0)
+				{
+					j = CC_max_cards[0];
+					i = CC_max_cards[1];
+				}
+			}
+			html_cards += '';
+		}
+		if((ccTree.catalog_perms & 2) && type != 'groups')
+			html_cards += '<tr><td colspan=4 align="right"><button id="cc_button_tools" value="" type="button" onclick="javascript:removeAllEntries()">Remover Todos</button></td></tr>';
+	}	
+	else if (CC_max_cards != 0)
+	{
+		html_cards += '<tr><td  align="center">' + Element('cc_msg_no_cards').value + '</td></tr>';
+	}
+	else
+	{
+		html_cards += '<tr><td  align="center">' + Element('cc_msg_err_no_room').value + '</td></tr>';
+	}
+
+	html_cards += '</table></div>';
+
+	Element('cc_card_space').innerHTML = html_cards;
+}
+
+function drawCards(ncards, type)
+{
+	var pos;
+	html_cards = '<div id="divScrollMain" style="overflow:auto;z-index:1">';
+	html_cards += '<table  border="0" cellpadding="0" cellspacing="' + CC_card_extra + '">';
+	
+	if (ncards > 0)
+	{
+		for (var i = 0; i < CC_max_cards[1]; i++)
+		{
+			html_cards += '<tr>';
+			for (var j = 0; j < CC_max_cards[0]; j++)
+			{
+				html_cards += getCardHTML('cc_card:' + j + ':' + i, type);
+				if (--ncards == 0)
+				{
+					j = CC_max_cards[0];
+					i = CC_max_cards[1];
+				}
+			}
+			html_cards += '</tr>';
+		}
+		if((ccTree.catalog_perms & 2) && type != 'groups')
+			html_cards += '<tr><td colspan=3 align="right"><button id="cc_button_tools" value="" type="button" onclick="javascript:removeAllEntries()">Remover Todos</button></td></tr>';
+	}	
+	else if (CC_max_cards != 0)
+	{
+		html_cards += '<tr><td>' + Element('cc_msg_no_cards').value + '</td></tr>';
+	}
+	else
+	{
+		html_cards += '<tr><td>' + Element('cc_msg_err_no_room').value + '</td></tr>';
+	}
+
+	html_cards += '</table></div>';
+
+	Element('cc_card_space').innerHTML = html_cards;
+}
+
+function showCards (letter,page, ids)
+{
+	var data  = new Array();
+
+	if ( letter != CC_actual_letter )
+	{
+		CC_actual_page = '1';
+	}
+	else
+	{
+		CC_actual_page = page;
+	}
+
+	CC_actual_letter = letter;
+
+	if (CC_max_cards[0] == 0)
+	{
+
+		if(CC_visual == 'cards')
+			drawCards(0);
+		else if(CC_visual == 'table')
+			drawTable(0);
+			
+		setPages(0,0);
+		return;
+	}
+
+	var handler = function (responseText)
+	{
+		var data = new Array();
+		data = unserialize(responseText);
+		if (data[0] == '0')
+		{				
+			Element('cc_type_contact').value = data[1];			
+			CC_npages = 0;
+			CC_actual_page = 1;
+			if(CC_visual == 'cards')
+				drawCards(0);
+			else if(CC_visual == 'table')
+				drawTable(0);
+			setPages(0,0);
+			return;
+		}
+		else
+		Element('cc_type_contact').value = data[10];
+		
+//		Element('cc_debug').innerHTML = responseText;						
+		
+		if (typeof(data) != 'object')
+		{
+			showMessage(Element('cc_msg_err_contacting_server').value);
+			return;
+		}
+		
+		if (typeof(data[3]) == 'object')
+		{
+			CC_npages = parseInt(data[0]);
+			CC_actual_page = parseInt(data[1]);			
+			if(CC_visual == 'cards')
+				drawCards(data[3].length, data[10]);
+			else if(CC_visual == 'table')
+				drawTable(data[3].length, data[10]);
+			resizeWindow();
+			populateCards(data, data[10]);
+			setPages(data[0], data[1]);
+			
+		}
+		else
+		{
+			showMessage(Element('cc_msg_err_contacting_server').value);
+			return;
+		}
+	};
+
+	var info = "letter="+letter+"&page="+CC_actual_page+"&ids="+ids;
+	Connector.newRequest('showCards', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_cards_data', 'POST', handler, info);
+}
+
+function clearCards()
+{
+	clearLetterSelection();
+	setHeightSpace();
+	setMaxCards(getMaxCards());
+
+	if(CC_visual == 'cards')
+		drawCards(0);
+	else if(CC_visual == 'table')
+		drawTable(0);
+
+	setPages(0,0);
+	return;
+}
+
+/***********************************************\
+*        COMMON ENTRY FUNCTIONS                *
+\***********************************************/
+
+function ccChangeVisualization(type)
+{
+	var table_h = Element('cc_panel_table');
+	var cards_h = Element('cc_panel_cards');
+	
+	switch (type)
+	{
+		case 'cards':
+			cards_h.style.display = 'none';
+			table_h.style.display = 'inline';
+			break;
+
+		case 'table':
+			table_h.style.display = 'none';
+			cards_h.style.display = 'inline';
+			break;
+	}
+	
+	CC_visual = type;
+	showCards(getActualLetter(), getActualPage());
+}
+
+function ccSearchUpdate(ids)
+{
+	Element('cc_panel_letters').style.display = 'none';
+	Element('cc_panel_search').style.display  = 'inline';
+	
+	if(CC_visual == 'cards')
+		drawCards(0);
+	else if(CC_visual == 'table')
+		drawTable(0);
+
+	if (!ids)
+	{
+		ccSearchHide();
+		return;
+	}
+	
+	var sIds = serialize(ids);
+
+	if (CC_actual_letter != 'search')
+	{
+		CC_last_letter = CC_actual_letter;
+	}
+	showCards('search', '1', sIds);
+}
+
+function ccSearchHidePanel()
+{
+	Element('cc_panel_search').style.display  = 'none';
+	Element('cc_panel_letters').style.display = 'inline';
+	if (CC_actual_letter == 'search')
+	{
+		CC_actual_letter = CC_last_letter;
+	}
+}
+
+function ccSearchHide()
+{
+	Element('cc_panel_search').style.display  = 'none';
+	Element('cc_panel_letters').style.display = 'inline';
+	clearCards();
+	//showCards(CC_last_letter, '1');
+}
+
+/***********************************************\
+*               QUICK ADD FUNCTIONS             *
+\***********************************************/
+
+
+function resetQuickAdd ()
+{
+	Element('cc_qa_alias').value = '';
+	Element('cc_qa_given_names').value = '';
+	Element('cc_qa_family_names').value = '';
+	Element('cc_qa_phone').value = '';
+	Element('cc_qa_email').value = '';
+}
+
+function getQuickAdd ()
+{
+	var data = new Array();
+	data[0] = Element('cc_qa_alias').value;
+	data[1] = Element('cc_qa_given_names').value;
+	data[2] = Element('cc_qa_family_names').value;
+	data[3] = Element('cc_qa_phone').value;
+	data[4] = Element('cc_qa_email').value;
+	
+	return data;
+}
+
+function sendQuickAdd ()
+{
+	var data = getQuickAdd();
+	
+	var str = serialize(data);
+
+	if (!str)
+	{
+		return false;
+	}
+
+	var handler = function (responseText)
+	{
+		setTimeout('updateCards()',100);;
+	}
+
+	resetQuickAdd();
+
+	Connector.newRequest('quickAdd', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=quick_add', 'POST', handler, 'add='+escape(str));
+}
+
+function connectVoip (phoneUser, typePhone){
+	var handler_voip = function (responseText){
+		if(!responseText) {
+			alert("Erro conectando servidor VoIP.");
+		}
+		else{
+			data = unserialize(responseText);
+			alert("Requisitando chamada para o ramal: "+data);
+		}
+	}
+	Connector.newRequest('voip', "../../expressoMail1_2/controller.php?action=expressoMail1_2.functions.callVoipconnect&to="+phoneUser+"&typePhone="+typePhone, 'POST', handler_voip);
+	}
Index: /tags/contactcenter/1.20/js/ccQuickAdd-plugin.js
===================================================================
--- /tags/contactcenter/1.20/js/ccQuickAdd-plugin.js	(revision 2)
+++ /tags/contactcenter/1.20/js/ccQuickAdd-plugin.js	(revision 2)
@@ -0,0 +1,249 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*
+	 * ContactCenter API - Quick Add Plugin
+	 *
+	 *
+	 * USAGE INSTRUCTIONS
+	 *
+	 *  Just insert in your PHP code the following statement:
+	 * 
+	 *  $ccContents = ExecMethod('contactcenter.ui_api.get_quick_add_plugin');
+	 *
+	 *  and $ccContents becomes a valid HTML that inserts everything that is needed
+	 *  to use the JS Objects that Contact Center provides. Just remember that you
+	 *  need to insert it before your JS code, so all objects are instantiated 
+	 *  correctly.
+	 *
+	 * Provides Objects:
+	 *
+	 *	ccQuickAdd
+	 *
+	 * Provides Classes:
+	 *
+	 *  dJSWin, dTabsManager, dFTree
+	 *
+	 */
+
+	function cQuickAdd ()
+	{
+		// Private
+		this._card;
+		this._button = new Array();
+		this._fields;
+
+		// Public
+		this.window;
+		this.afterSave;
+		
+		// Constructor
+		var wHeight = 0;
+		this._nFields = Element('ccQAnFields').value;
+		this._fields = new Array();
+
+		for (var i = 0; i < this._nFields; i++)
+		{
+			this._fields[i] = Element('ccQuickAddI'+i);
+		}
+
+		//wHeight = (i+1)*25+5;
+		wHeight = Element('ccQAWinHeight').value;
+
+		
+		this.window = new dJSWin({
+			id: 'ccQuickAddDOM',
+			content_id: 'ccQuickAddContent',
+			width: '255px',
+			height: wHeight+'px',
+			title_color: '#3978d6',
+			bg_color: '#eee',
+			title: Element('ccQATitle').value,
+			title_text_color: 'white',
+			button_x_img: Element('cc_phpgw_img_dir').value+'/winclose.gif',
+			border: true });
+
+		this.window.draw();
+	}
+
+	/*!
+		@method associateAsButton
+		@abstract Associates the button functions with the spacified DOM Element
+		@author Raphael Derosso Pereira
+
+		@param div DOMElement The HTML DOM element that will "host" the
+			plugin button.
+
+		@param func function The function that returns the data to be used
+			to pre-populate the quickAdd fields. The return format MUST be
+			an Array like:
+
+				var return_data = new Array();
+				return_data[0] = <value>;  // Value for the first field
+				return_data[1] = <value>;  // Value for the second field
+				...
+		
+	 */
+	cQuickAdd.prototype.associateAsButton = function (div, func)
+	{
+		var _this = this;
+		
+		if (func)
+		{
+			div.onclick = function() { _this.window.open(); _this.setValues(func()); };
+		}
+		else
+		{
+			div.onclick = function() { _this.window.open(); };
+		}
+	}
+
+	/*!
+
+		@method setValues
+		@abstract Set the contents of the QuickAdd window with the specified
+			data
+		@author Raphael Derosso Pereira
+
+		@param data Array The data to be used
+
+	*/
+	cQuickAdd.prototype.setValues = function (data)
+	{
+		for (var i in data)
+		{ 
+			this._fields[i].value = data[i];
+		}
+
+		this.data = data;
+	}
+
+	/*!
+	
+		@method send
+		@abstract Sends data to server
+		@author Raphael Derosso Pereira
+
+	*/
+	cQuickAdd.prototype.send = function ()
+	{
+		var _this = this;
+		var handler = function (responseText)
+		{
+			Element('cc_debug').innerHTML = responseText;
+
+			var data = unserialize(responseText);
+
+			if (!data || typeof(data) != 'object')
+			{
+				showMessage(Element('cc_msg_err_contacting_server').value);
+				return;
+			}
+			else if (data['status'] == 'alreadyExists')
+			{
+				showMessage(data['msg']);
+				return;
+			}
+			else if (data['status'] != 'ok')
+			{
+				return;
+			}
+
+			_this.clear();
+			_this.window.close();
+
+			if (_this.afterSave)
+			{
+				switch (typeof(_this.afterSave))
+				{
+					case 'function':
+						_this.afterSave();
+						break;
+
+					case 'string':
+						eval(_this.afterSave);
+						break;
+				}
+			}
+		}
+
+		var sdata = new Array();
+		var empty = true;
+		
+		for (var i in this._fields)
+		{
+			sdata[i] = this._fields[i].value;
+			if (sdata[i] != '')
+			{
+				empty = false;
+			}
+		}
+
+		if (empty) return false;
+
+		//Utiliza expressão regular para validar email
+		var reEmail = /^[A-Za-z\d_-]+(\.[A-Za-z\d_-]+)*@(([A-Za-z\d][A-Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/;
+
+		if(!reEmail.test(this._fields[4].value)){
+			alert("O endereço de email '" + this._fields[4].value + "' não é válido!\n" +
+			"Por favor informe um endereço válido.");
+			return false;
+		}
+		
+		//Utiliza expressão regular para validar telefone
+		var rePhone = /^[0-9|(-)| |-]{0,15}$/;
+		
+		if (!rePhone.test(this._fields[3].value)){
+			alert("O número de telefone '" + this._fields[3].value + "' não é valido! Utilize apenas números.\n" +
+			"Parenteses, traços ou espaços em branco podem ser usados como carácter separador.");
+			return false;
+		} 
+		
+		var sdata = 'add='+escape(serialize(sdata));
+
+		Connector.newRequest('cQuickAdd.Send', CC_url+'quick_add', 'POST', handler, sdata);
+	}
+
+	/*!
+
+		@method clear
+		@abstract Clear all Plugin Fields
+		@author Raphael Derosso Pereira
+
+	*/
+	cQuickAdd.prototype.clear = function ()
+	{
+		for (var i in this._fields)
+		{
+			this._fields[i].value = '';
+		}
+	}
+
+
+	/* Build the Object */
+	var ccQuickAdd;
+	var cQuickAdd_pre_load = document.body.onload;
+
+	if (is_ie)
+	{ 
+		document.body.onload = function (e) 
+		{ 
+			cQuickAdd_pre_load();
+			ccQuickAdd = new cQuickAdd();
+			
+		};
+	}
+	else
+	{
+		ccQuickAdd = new cQuickAdd();
+	}
Index: /tags/contactcenter/1.20/js/cc_search_win.js
===================================================================
--- /tags/contactcenter/1.20/js/cc_search_win.js	(revision 2)
+++ /tags/contactcenter/1.20/js/cc_search_win.js	(revision 2)
@@ -0,0 +1,124 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/*
+	 * ContactCenter API - Search for Entries Window
+	 */
+
+	function ccSearchWinClass(params)
+	{
+		if (!params || typeof(params) != 'object')
+		{
+			return false;
+		}
+
+		this.window = params['window'];
+		this.catalogs_area = Element('cc_search_catalogues');
+		this.search_for = Element('cc_search_for');
+		//this.recursive = Element('cc_search_recursive');
+
+		this.onSearchFinish = null;
+		this.onClose = null;
+		this.onOpen = null;
+
+		/* Populate Catalogues */
+		this.catalogues = new ccCatalogTree({name: 'ccSearchWin.catalogues',
+		                                     id_destination: 'cc_search_catalogues'});
+	}
+	
+	ccSearchWinClass.prototype.open = function()
+	{
+		if (this.onOpen)
+		{
+			this.onOpen();
+		}
+
+		this.window.open();
+	}
+
+	ccSearchWinClass.prototype.close = function()
+	{
+		if (this.onClose)
+		{
+			this.onClose();
+		}
+		this.window.close();
+	}
+
+	ccSearchWinClass.prototype.go = function()
+	{
+		var data = new Array();
+
+		//TODO: Make Generic!
+		data['fields']           = new Array();
+		data['fields']['id']     = 'contact.id_contact';
+		data['fields']['search'] = 'contact.names_ordered';
+		data['search_for']       = this.search_for.value;
+		//data['recursive']        = this.recursive.checked ? true : false;
+		
+		var obj = httpRequestObj();
+		var win = this;
+
+		var handler = function ()
+		{
+			try
+			{
+				setLoadingState(obj.readyState);
+				if (obj.readyState == 4 && obj.status == 200)
+				{
+					Element('cc_debug').innerHTML = obj.responseText;
+					var data = unserialize(obj.responseText);
+					
+					if (!data || !data['status'])
+					{
+						showMessage('Error Contacting Server');
+						return false;
+					}
+
+					if (data['status'] == 'empty')
+					{
+						showMessage(data['msg']);
+						win.close();
+
+						if (win.onSearchFinish)
+						{
+							win.onSearchFinish(null);
+						}
+						return false;
+					}
+
+					if (data['status'] != 'ok')
+					{
+						showMessage(data['msg']);
+						return false;
+					}
+
+					//showMessage(data['msg']);
+					win.close();
+
+					if (win.onSearchFinish)
+					{
+						win.onSearchFinish(data['data']);
+					}
+				}
+			}
+			catch (e)
+			{
+				//showMessage(e);
+			}
+			
+		};
+
+		httpRequest(obj, CC_url+'search&data='+serialize(data), 'GET', handler);
+	}
Index: /tags/contactcenter/1.20/js/ccMain.js
===================================================================
--- /tags/contactcenter/1.20/js/ccMain.js	(revision 285)
+++ /tags/contactcenter/1.20/js/ccMain.js	(revision 285)
@@ -0,0 +1,238 @@
+var last_id = 0;	
+
+function openwindow(url){ 	
+	var window_features = 	"scrollbars=yes,resizable=yes,location=no,menubar=no," + 
+						"personalbar=no,status=no,titlebar=no,toolbar=no," + 
+						"screenX=0,screenY=0,top=0,left=0,width=" + 
+						screen.width + ",height=" + screen.height/5*3; 
+			
+	window.open(url,'', window_features); 
+}
+
+var Main_pre_load = document.body.onload;
+var ccSearch, ccTree;
+var Main_load = function () 
+	{ 	
+		Connector.setProgressBox(Element('cc_loading'), true);
+		Connector.setProgressHolder(Element('cc_loading_inner'));		
+		/* Associate the Quick Add Button with the Plugin */
+					
+
+		/* Create the Search Object */
+		var search_params = new Array();
+		search_params['holder'] = Element('cc_panel_search_call');
+		search_params['total_width'] = '280px';
+		search_params['input_width'] = '200px';
+		search_params['progress_top'] = '150px';
+		search_params['progress_left'] = '-260px';
+		search_params['progress_color'] = '#3978d6';
+		search_params['progress_width'] = '250px';
+		search_params['conn_1_msg'] = Element('cc_loading_1').value;
+		search_params['conn_2_msg'] = Element('cc_loading_2').value;
+		search_params['conn_3_msg'] = Element('cc_loading_3').value;
+		search_params['button_text'] = Element('cc_panel_search_text').value;
+		search_params['Connector'] = Connector;
+
+		ccSearch = new ccSearchClass(search_params);
+		ccSearch.DOMresult.style.visibility = 'hidden';
+		ccSearch.onSearchFinish = ccSearchUpdate;
+			
+		Connector.setProgressBox(Element('cc_loading'), true);
+		Connector.setProgressHolder(Element('cc_loading_inner'));
+
+		try
+		{
+			function ViewLdap(data)
+			{
+				if( boolData = eval(data) )
+				{
+					ccTree = new ccCatalogTree({name: 'ccTree', id_destination: 'cc_tree', afterSetCatalog: 'ccSearchHidePanel(); updateCards()'});
+					showCards('all',getActualPage());
+					selectLetter('27');
+				}	
+				else
+				{
+					ccTree = new ccCatalogTree({name: 'ccTree', id_destination: 'cc_tree', afterSetCatalog: 'ccSearchHidePanel(); clearCards();'});
+				}
+			}
+
+			Connector.newRequest('ViewLdap', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_visible_all_ldap', 'POST', ViewLdap);		
+			
+			ccTree.Connector = Connector;						
+		}
+		catch(e){}
+
+		/* Create the Tree Object */			
+		//ccTree = new ccCatalogTree({name: 'ccTree', id_destination: 'cc_tree', afterSetCatalog: 'ccSearchHidePanel(); updateCards()'});
+		//ccTree.Connector = Connector;						
+	}
+	var menuStarted = false;
+	function findPosY(obj)
+	{
+		var curtop = 0;
+		if (obj.offsetParent)
+		{
+			while (obj.offsetParent)
+			{
+				curtop += obj.offsetTop
+				obj = obj.offsetParent;
+			}
+		}
+		else if (obj.y)
+			curtop += obj.y;
+		return curtop;
+	}
+	var _timeout = '';
+	var menu = function () {
+		 
+	 if(! this.menuStarted)
+		this.menuStarted = true;
+		
+		submenu = [];
+		textmenu = [];
+			
+		textmenu[0] = ["cc_msg_contact_qa","cc_msg_contact_full","cc_msg_group"]
+		textmenu[1] = ["cc_quick_add", "cc_full_add", "cc_add_group"];		
+		function show(){
+			clearTimeout(_timeout);
+			button = document.getElementById("cc_button_new");
+				
+			this.style.top = 19 + findPosY(button) + "px"; 
+			this.style.visibility='visible'; 
+		}
+		function hide(){ _timeout = setTimeout("menu.style.visibility='hidden';",200); };
+			
+		if(document.getElementById) {
+			menu = document.getElementById("Layer1");
+				
+			for (i=0; i< textmenu[0].length; i++) {
+				textmenu[0][i] = "<span onclick= 'menu.onmouseout();'>" + document.getElementById(textmenu[0][i]).value + "</span><br>";
+				submenu[i] = document.createElement("DIV");				
+				submenu[i].innerHTML = textmenu[0][i];
+				submenu[i].id = textmenu[1][i];
+				submenu[i].onmouseover = function () {this.style.backgroundColor = 'LIGHTYELLOW';this.style.color = 'DARKBLUE';};
+				submenu[i].onmouseout   = function () {  this.style.backgroundColor = '#DCDCDC'; this.style.color = '#006699';};					
+				submenu[i].setAttribute("className", "special");
+				submenu[i].setAttribute("class", "special");
+				submenu[i].style.padding = "5px";					  
+				menu.appendChild(submenu[i]);
+			}			
+				
+			menu.onmouseover = show;
+			menu.onmouseout = hide;
+		}
+	 		
+		ccQuickAdd.associateAsButton(Element('cc_quick_add'));
+		ccAddGroup.associateAsButton(Element('cc_add_group'));
+		document.getElementById("cc_full_add").onclick= newContact;
+			 
+			
+		ccQuickAdd.afterSave = function ()
+		{
+			updateCards();
+		}			
+			
+		ccAddGroup.load = function () 
+		{				
+			editGroup();			
+		}
+			
+		ccAddGroup.afterSave = function ()
+		{
+			updateCards();
+		}
+			
+		return true;
+	}
+
+	if (is_ie)
+	{
+			
+		document.body.onload = function (e)
+		{ 			
+			Main_pre_load();								
+			Main_load();					
+								
+		}
+	}
+	else
+	{		
+		Main_load();	
+			
+	}	
+
+// BEGIN: FUNCTION RESIZE WINDOW
+var _showBar = showBar;
+var _hideBar = hideBar;
+
+function __showBar(){
+	_showBar();
+	resizeWindow();
+}
+
+function __hideBar(){
+	_hideBar();
+	resizeWindow();
+}
+showBar = __showBar;
+hideBar = __hideBar;
+	
+var _onResize	= window.onresize;
+window.onresize = resizeWindow;
+var defaultHeight = 0;
+function setDefaultHeight(){
+	
+	var bar = Element("toolbar");
+	var offset = 0;
+	if(bar.style.visibility != 'hidden') 
+		offset = (bar.offsetHeight ? bar.offsetHeight :  bar.clientHeight);	
+
+	var screenHeight = document.body.clientHeight ? document.body.clientHeight : document.body.offsetHeight;
+	defaultHeight = screenHeight - offset;	
+	Element("cc_tree").style.height 		= defaultHeight - 68;	
+	Element("cc_left_main").style.height 	= defaultHeight - 68;	
+}
+
+function resizeWindow(){
+	setDefaultHeight();
+	if(Element("divScrollMain"))
+		Element("divScrollMain").style.height 	= defaultHeight - 108;	
+	if (!is_ie)
+		Element('tableDivAppbox').width = '100%';
+}
+document.body.scroll="no";
+document.body.style.overflow ="hidden";
+setDefaultHeight();
+Element('cc_main').style.height = defaultHeight;
+var lang_warn_firefox = Element('cc_msg_warn_firefox');
+var lang_firefox_msg1 = Element('cc_msg_firefox_half1');
+var lang_firefox_msg2 = Element('cc_msg_firefox_half2');
+var lang_install_now = Element('cc_msg_install_now');
+var lang_install_new_firefox = Element('cc_msg_install_new_firefox');
+var lang_close = Element('cc_msg_close');
+function buildWarningMsg(_version) {
+	var screenWidth = document.body.clientWidth ? document.body.clientWidth: document.body.offsetWidth;
+	var _div = document.createElement("DIV");
+	_div.innerHTML += "<DIV id='warning_msg' style='background:LIGHTYELLOW;position:absolute;"+
+	"border:1px solid black;left:"+(screenWidth - 330)+";top:10px;width:300px;padding:10px;"+
+	(document.body.clientWidth ? "-moz-border-radius: 9px 9px 9px 9px;'>" : "")+
+	    "<font color='RED' size='2'>"+lang_warn_firefox +  "("+_version+")</font><BR>"+
+	    "<font color='black' size='2'><p style='text-align:justify'>&nbsp;"+lang_firefox_msg1+
+	    lang_firefox_msg2 + ".</p></font><div style='width:100%' align='center'>"+
+	    "<a title='"+lang_install_now+"' href='http://br.mozdev.org/firefox/download.html' target='_blank'>"+lang_install_new_firefox+ "</a>"+	
+	"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
+	    "<a title='"+lang_close+"' href='javascript:void(0)' onclick='javascript:myOpacity.toggle()'>"+lang_close+"</a></div>"+
+
+	"</DIV>";
+
+	document.body.appendChild(_div);
+
+	myOpacity = new fx.Opacity('warning_msg', {duration: 600});
+	document.getElementById("warning_msg").style.visibility = 'hidden';		
+	myOpacity.now = 0;
+	setTimeout("myOpacity.toggle()",3000);
+}
+// Verifica versão do Firefox
+var agt=navigator.userAgent.toLowerCase();
+if(agt.indexOf('firefox/1.0') != -1 && agt.indexOf('firefox/0.'))
+	buildWarningMsg(agt.substring(agt.indexOf('firefox/')+8,agt.indexOf('firefox/')+13));
Index: /tags/contactcenter/1.20/js/connector.js
===================================================================
--- /tags/contactcenter/1.20/js/connector.js	(revision 2)
+++ /tags/contactcenter/1.20/js/connector.js	(revision 2)
@@ -0,0 +1,313 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	function cConnector()
+	{
+		/* Public Attributes */
+		this.requests = new Array();
+		this.progressContents = new Array();
+		this.visible = false;
+
+		var _this = this;
+
+		/* Private Attributes */
+		this._progressBox = null;
+		this._progressHolder = document.createElement('span');
+		this._progressBlank   = null;
+
+		this._progressHolder.style.visibility = 'hidden';
+//		this._progressHolder.style.backgroundColor = '#db7e22';
+	}
+
+	cConnector.prototype.newRequest = function (id, target, method, handler, data)
+	{
+		var _this = this;
+		
+		if (this.requests[id] && this.requests[id] != null)
+		{
+			
+			//this.requests[id].abort();
+			//delete this.requests[id];
+			//this.requests[id] = null;
+			
+			//setTimeout(function() { _this.newRequest(id, target, method, handler, data); }, 100);
+
+			return;
+		}
+
+		var oxmlhttp = null;
+		
+		try
+		{ 
+			oxmlhttp = new XMLHttpRequest();
+			oxmlhttp.overrideMimeType('text/xml');
+		}
+		catch (e)
+		{ 
+			try
+			{
+				oxmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
+			}
+			catch (e1)
+			{ 
+				try
+				{
+					oxmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
+				}
+				catch (e2)
+				{
+					oxmlhttp = null;
+				}
+			}
+		}
+		
+		if (!oxmlhttp)
+		{
+			return false;
+		}
+		
+		this.requests[id] = oxmlhttp;
+
+		var _this = this;
+		
+		var sub_handler = function ()
+		{
+			try
+			{
+				_this._setProgressState(oxmlhttp.readyState);
+				
+				if (oxmlhttp.readyState == 4 )//&& oxmlhttp.channel.status == 0)
+				{
+					switch (oxmlhttp.status)
+					{
+						case 200:
+							if (typeof(handler) == 'function')
+							{
+								handler(oxmlhttp.responseText);
+							}
+							delete _this.requests[id];
+							_this.requests[id] = null;
+							break;
+
+						case 404:
+							alert('Page Not Found!');
+							break;
+
+						default:
+							//alert('Some problem while accessing the server. The status is '+oxmlhttp.status);
+					}
+				}
+			}
+			catch (e)
+			{
+				//showMessage(e);
+			}
+		}
+
+		try
+		{ 
+			if (method == '' || method == 'GET')
+			{
+				if (typeof(handler) == 'function')
+				{
+					oxmlhttp.onreadystatechange = sub_handler;
+				}
+				oxmlhttp.open("GET",target,true);
+				oxmlhttp.send(null);
+			}
+			else if (method == 'POST')
+			{
+				if (typeof(handler) == 'function')
+				{
+					oxmlhttp.onreadystatechange = sub_handler;
+				}
+				oxmlhttp.open("POST",target, true);
+				oxmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
+				oxmlhttp.send(data);
+				//oxmlhttp.setRequestHeader('Content-Type','multipart/form-data; boundary=-----------------------------1156053686807595044986274307');
+				//oxmlhttp.setRequestHeader('Accept', 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5');
+			}
+		}
+		catch(e)
+		{ 
+			//showMessage(e);
+		}
+		
+		return true;
+	}
+
+	cConnector.prototype.cancelRequest = function (id)
+	{
+		if (!this.requests[id])
+		{
+			return false;
+		}
+
+		this.requests[id].abort();
+	}
+
+	cConnector.prototype.setProgressContent = function (state, content)
+	{
+		switch (state)
+		{
+			case 0:
+			case 'UNINITIALIZED':
+				this.progressContents[0] = content;
+				break;
+
+			case 1:
+			case 'LOADING':
+				this.progressContents[1] = content;
+				break;
+
+			case 2:
+			case 'LOADED':
+				this.progressContents[2] = content;
+				break;
+
+			case 3:
+			case 'INTERACTIVE':
+				this.progressContents[3] = content;
+				break;
+
+			case 4:
+			case 'COMPLETED':
+				this.progressContents[4] = content;
+				break;
+
+			default:
+				throw('INVALID STATE!');
+		}
+	}
+
+	cConnector.prototype.setProgressHolder = function (holder)
+	{
+		var objHolder;
+		
+		if (typeof(holder) == 'string')
+		{
+			objHolder = Element(holder);
+		}
+		else if (typeof(holder) == 'object')
+		{
+			objHolder = holder;
+		}
+		else
+		{
+			return false;
+		}
+
+		objHolder.appendChild(this._progressHolder);
+	}
+
+	cConnector.prototype.setProgressBox = function (box, auto)
+	{
+		var objBox;
+
+		if (typeof(box) == 'string')
+		{
+			objBox = Element(box);
+		}
+		else if (typeof(box) == 'object')
+		{
+			objBox = box;
+		}
+		else
+		{
+			return false;
+		}
+
+		this._progressBox = objBox;
+		this._progressBoxAuto = auto ? true : false;
+	}
+
+	cConnector.prototype.setVisible = function (visible)
+	{
+		this.visible = visible;
+		if (!visible)
+		{
+			this._progressHolder.style.visibility = 'hidden';
+		}
+	}
+
+	/****************************************************************************\
+	 *                          Private Methods                                 *
+	\****************************************************************************/
+	
+	cConnector.prototype._setProgressState = function (state)
+	{
+		switch (state)
+		{
+			case 0:
+			case 4:
+				if (this._progressBox != null)
+				{
+					this._progressBox.style.visibility = 'hidden';
+					this._progressBox.style.zIndex = '-1';
+				
+					if (is_ie && this._progressBlank)
+						this._progressBlank.style.visibility = 'hidden';
+				}
+				
+				this._progressHolder.style.visibility = 'hidden';
+				this._progressHolder.style.zIndex = '-1';
+				
+				if (is_ie && this._progressBlank)
+					this._progressBlank.style.visibility = 'hidden';
+				
+				break;
+
+			default:
+				if (this.visible && Element('cc_connector_visible').value == 'true')
+				{
+					if (this._progressBox != null)
+					{
+						if (this._progressBoxAuto)
+						{
+							if (is_ie)
+							{
+								this._progressBox.style.top = parseInt(document.body.offsetHeight)/2 + 'px';
+								this._progressBox.style.left = parseInt(document.body.offsetWidth)/2 + 'px';
+								this._progressBlank = document.getElementById('divBlank');								
+								if(! this._progressBlank ) {
+									document.body.insertAdjacentHTML("beforeEnd", '<iframe id="divBlank" src="about:blank" style="position:absolute" scrolling="no" frameborder="0"></iframe>');
+									this._progressBlank = document.getElementById('divBlank');
+									this._progressBlank.style.top = parseInt(document.body.offsetHeight)/2 + 'px';
+									this._progressBlank.style.left = parseInt(document.body.offsetWidth)/2 + 'px';
+									this._progressBlank.style.height = "36px";
+									this._progressBlank.style.width = "130px";
+								}
+							}
+							else
+							{
+								this._progressBox.style.top = parseInt(window.innerHeight)/2 + parseInt(window.pageYOffset) - this._progressBox.style.height/2 + 'px';
+								this._progressBox.style.left = parseInt(window.innerWidth)/2 + parseInt(window.pageXOffset) - this._progressBox.style.width/2 + 'px';
+							}
+						}
+						this._progressBox.style.visibility = 'visible';
+						this._progressBox.style.zIndex = '1000';
+					}
+					
+					this._progressHolder.style.visibility = 'visible';
+					this._progressHolder.style.zIndex = '1000';
+					
+					this._progressHolder.innerHTML = this.progressContents[state] ? this.progressContents[state] : '';
+
+					if(is_ie) {
+						this._progressBlank.style.visibility = 'visible';
+						this._progressBlank .style.zIndex = '999';
+					}					
+					
+				}
+		}
+	}
Index: /tags/contactcenter/1.20/js/cc_table.js
===================================================================
--- /tags/contactcenter/1.20/js/cc_table.js	(revision 2)
+++ /tags/contactcenter/1.20/js/cc_table.js	(revision 2)
@@ -0,0 +1,89 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	/* ContactCenter Table - Provides visualization in Table Mode */
+
+	function ccEntriesTable (params)
+	{
+		this.table = newTable('ccTable_table');
+		this.columns = Array();
+		this.rows = Array();
+
+		this.actualIndex = 'a';
+		this.actualLetter = 1;
+
+		this.table.setSelectionVisible(true);
+
+		if (params['fields'])
+		{
+			for (var i in params['fields'])
+			{
+				this._addColumn(params['fields'][i]);
+			}
+		}
+	}
+
+	ccEntriesTable.prototype.showEntries = function (index, page, extra)
+	{
+		
+	}
+	
+	ccEntriesTable.prototype.addEntry = function ()
+	{
+	}
+
+	ccEntriesTable.prototype.removeSelectedEntries = function ()
+	{
+		var selected = this.table.getRowsBySelection();
+
+		for (var i in selected)
+		{
+		}
+	}
+
+	/****************************************************************************\
+	 *                          Private Methods                                 *
+	\****************************************************************************/
+	
+	// TODO: Check for errors
+	ccEntriesTable.prototype._addColumn = function (params)
+	{
+		var type;
+
+		switch (params['type'])
+		{
+			case 'number':
+				type = 'numericCompare';
+				break;
+
+			case 'text':
+				type = 'lexicalCompare';
+				break;
+		}
+		
+		this.columns[this.columns.length] = this.table.newTitle(params['caption'], type);
+	}
+
+	ccEntriesTable.prototype._addRow = function (params)
+	{
+		var row = this.table.newRow();
+		
+		row.table
+		for (var i in params)
+		{
+			row.newCell().addText(params[i]);
+		}
+		
+		this.rows[this.rows.length] = row;
+	}
+
Index: /tags/contactcenter/1.20/js/ccIEContacts.js
===================================================================
--- /tags/contactcenter/1.20/js/ccIEContacts.js	(revision 285)
+++ /tags/contactcenter/1.20/js/ccIEContacts.js	(revision 285)
@@ -0,0 +1,286 @@
+	function cIEContacts ()	{
+		this.win;
+		this.el;		
+		this.wWidth = 395;
+		this.wHeight = 255;
+	}
+	
+	cIEContacts.prototype.changeOptions = function(type){	
+		if(type == 'i') {
+			Element('export_span').style.display = 'none';
+			Element('import_span').style.display = '';
+		}
+		else{
+			Element('import_span').style.display = 'none';
+			Element('export_span').style.display = '';		
+		}	
+	}
+	
+	cIEContacts.prototype.showFailures = function(data){
+		if (data == 'undefined')
+			return;
+		if (data){
+			var lang_clean = Element('cc_msg_clean').value;
+			var info_box = document.getElementById('s_info2');
+			info_box.innerHTML = data;
+			info_box.style.visibility = '';
+			var cleanButton = document.createElement('input');
+			cleanButton.type='button';
+			cleanButton.value=lang_clean;
+			cleanButton.onclick= function() { ccIEContacts.cleanInfo() };
+			info_box.appendChild(cleanButton);
+			}
+	}
+
+	cIEContacts.prototype.cleanInfo = function(){
+	var info_box = document.getElementById('s_info2');
+	info_box.innerHTML = '';
+	}	
+	
+	cIEContacts.prototype.showList = function(){
+
+		if (!this.el){		
+			this.el = document.createElement("DIV");
+			this.el.style.visibility = "hidden";
+			this.el.style.position = "absolute";
+			this.el.style.left = "0px";
+			this.el.style.top = "0px";
+			this.el.style.width = this.wWidth	+ 'px';
+			this.el.style.height = this.wHeight + 'px';
+			if(is_ie) {
+				this.el.style.width = "430";
+				this.el.style.overflowY = "auto";	
+				this.el.style.overflowX = "hidden";
+			}													
+			else {									
+				this.el.style.overflow = "-moz-scrollbars-vertical";
+			}
+			this.el.id = 'cc_rectIEContacts';
+			document.body.appendChild(this.el);
+
+			var lang_import_contacts = Element('cc_msg_import_contacts').value;
+            var lang_close_win = Element('cc_msg_close_win').value
+            var lang_export_contacts = Element('cc_msg_export_contacts').value;
+            var lang_expresso_info_csv = Element('cc_msg_expresso_info_csv').value;
+            var lang_expresso_default = Element('cc_msg_expresso_default').value;
+            var lang_choose_contacts_file	= Element('cc_msg_choose_contacts_file').value;
+            var lang_msg_choose_type		= Element('cc_msg_choose_file_type').value;
+			var lang_msg_expresso_info_csv	= Element('cc_msg_expresso_info_csv').value;
+			var lang_msg_export_csv			= Element('cc_msg_export_csv').value;
+			var lang_msg_automatic = Element('cc_msg_automatic').value;
+            var lang_close = Element('cc_msg_close').value;
+			var lang_moz_tb = Element('cc_msg_moz_thunderbird').value;
+			var lang_outl_pt = Element('cc_msg_outlook_express_pt').value;
+			var lang_outl_en = Element('cc_msg_outlook_express_en').value;
+			var lang_outl2k_pt = Element('cc_msg_outlook_2k_pt').value;
+			var lang_outl2k_en = Element('cc_msg_outlook_2k_en').value;
+			var lang_expresso_default_csv = Element('cc_msg_expresso_default_csv').value;
+
+		
+			this.el.innerHTML = 
+			'<div align="left" id="divAppbox"><table width="100%" border=0>'+
+			'<tr><td style="border-bottom:1px solid black"><input onclick="javascript:ccIEContacts.changeOptions(this.value)" id="type" type="radio" name="type" value="i" style="border:0" checked>'+lang_import_contacts+
+			'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input onclick="javascript:ccIEContacts.changeOptions(this.value)" id="type" type="radio" name="type" style="border:0" value="e"/>'+lang_export_contacts+' <br></td></tr>'+
+			'</table>'+
+			'<table border=0 height="208px"  width="100%" id="import_span">'+
+			'<tr><td>'+
+			'<font color="DARKBLUE" size="2">'+lang_expresso_info_csv+'</font></td></tr>'+
+			'<tr><td height="75px" valign="top">'+
+			'<form name="formCSV" method="POST" enctype="multipart/form-data">'+ lang_msg_choose_type +
+			':&nbsp;<select id="typeImport"><option value="auto" selected>'+lang_msg_automatic+'</option>'+
+			'<option value="outlook">'+("Outlook Express")+'</option>'+
+			'<option value="outlook2000">'+("Outlook 2000")+'</option>'+
+			'<option value="thunderbird">'+("Mozilla Thunderbird")+'</option>'+
+			'<option value="expresso" selected>'+lang_expresso_default+'</option></select><br>'+
+			'<br>'+lang_choose_contacts_file+'<br><br>'+			
+			'<input id="import_file" type="file" name="import_file">'+
+			'</form></td></tr>'+
+			'<tr><td height="10px" align="center" nowrap><span style="visibility:hidden" id="s_info"></span></td></tr>'+
+			'<tr><td height="10px" align="center"></td></tr>'+
+			'<tr><td nowrap><center><input id="import_button" type="button" value='+lang_import_contacts+' onClick="javascript:ccIEContacts.importCSV(this)">&nbsp;&nbsp;&nbsp;&nbsp;'+
+			'<input type="button" value='+lang_close_win+' onClick="javascript:ccIEContacts.close()"></center></td></tr>'+
+			'<tr><td height="10px" align="center" nowrap><span style="visibility:hidden" id="s_info2"></span></td></tr></table>'+
+			'<table border=0  height="208px"  width="100%" style="display:none" id="export_span">'+
+			'<tr><td>'+						
+			'<font color="DARKBLUE" size="2">'+ lang_msg_expresso_info_csv+'</font></td></tr>'+
+			'<tr><td height="85px" valign="top">'+lang_msg_export_csv+'<br><br>'+
+			'<select id="typeExport">'+
+			'<option value="expresso" selected>'+lang_expresso_default_csv+'</option>'+
+			'<option value="outlook_pt-BR">'+lang_outl_pt+'</option>'+
+			'<option value="outlook_en">'+lang_outl_en+'</option>'+
+			'<option value="outlook2000_pt-BR">'+lang_outl2k_pt+'</option>'+
+			'<option value="outlook2000_en">'+lang_outl2k_en+'</option>'+
+			'<option value="thunderbird">'+lang_moz_tb+'</option>'+
+			'</select>'+			
+			'</td></tr>'+
+			'<tr><td align="center">&nbsp;</td></tr>'+
+			'<tr><td nowrap><center><input id="export_button" type="button" value='+lang_export_contacts+ ' onClick="javascript:ccIEContacts.exportCSV(this)">&nbsp;&nbsp;&nbsp;&nbsp;'+
+			'<input type="button" value='+lang_close_win+ ' onClick="javascript:ccIEContacts.close()"></center></td></tr>'+
+			'</table></div>';
+		}		
+		this.showWindow();
+	}
+	
+	cIEContacts.prototype.showWindow = function ()
+	{						
+		if(!this.win) {
+	
+				this.win = new dJSWin({			
+				id: 'ccIEContacts',
+				content_id: this.el.id,
+				width: (this.wWidth +(is_ie ? 41 : 0))  +'px',
+				height: this.wHeight +'px',
+				title_color: '#3978d6',
+				bg_color: '#eee',
+				title: Element('cc_msg_ie_personal').value, 
+				title_text_color: 'white',
+				button_x_img: '../phpgwapi/images/winclose.gif',
+				border: true });
+			
+			this.win.draw();			
+		}
+		
+		this.win.open();
+	}
+	
+	cIEContacts.prototype.importWriteStatus = function(args){
+
+		// array args
+		// args[0] - status (success, error ou importing)
+		// args[1] - numero de contatos novos;
+		// args[2] - numero de contatos falhos;
+		// args[3] - numero de contatos sobrescritos;
+		var form = document.formCSV;
+		var status = '';
+
+		var lang_import_fail = Element('cc_msg_import_fail').value;
+		var lang_importing = Element('cc_msg_importing_contacts').value;
+		var lang_import_finish = Element('cc_msg_import_finished').value;
+		var lang_new = Element('cc_msg_new').value;
+		var lang_failure = Element('cc_msg_failure').value;
+		var lang_exists = Element('cc_msg_exists').value;
+		var lang_show_more_info = Element('cc_msg_show_more_info').value;
+
+		var l_1		= '<font face="Verdana" size="1" color="GREEN">['+args[1]+lang_new+']</font>';
+		var l_2 	= '<font face="Verdana" size="1" color="RED">['+args[2]+lang_failure+']</font>';
+		var l_3		= '<font face="Verdana" size="1" color="DARKBLUE">['+args[3]+lang_exists+']</font>';
+		var l_4 	= '<br><a font face="Verdana" size="1" href="javascript:ccIEContacts.showFailures(\''+args[4]+'\')">'+lang_show_more_info+'</a>';
+		var l_error	= '<span style="height:15px;background:#cc4444">&nbsp;&nbsp;<font face="Verdana" size="1" color="WHITE">'+lang_import_fail+ '&nbsp;</font></span>';
+		var l_importing = '<span style="height:15px;background:rgb(250, 209, 99)">&nbsp;&nbsp;<font face="Verdana" size="1" color="DARKBLUE">'+lang_importing + '&nbsp;</font></span>';
+
+		if(args[0] == 'success') {
+
+			for(i = 1; i < 5; i++) {
+				status += "&nbsp;"+eval('l_'+i);
+			}
+			Element('s_info').innerHTML = '&nbsp;&nbsp;<font face="Verdana" size="1" color="BLACK"><b>'+lang_import_finish+'</b></font><br>&nbsp;'+status;
+		}
+		else 
+			Element('s_info').innerHTML = eval('l_'+args[0]);
+		
+		Element("s_info").style.visibility = '';
+
+		var recreate_fileupload = function () {
+			var import_file = document.createElement("INPUT");
+			import_file.type = "FILE";
+			import_file.name = "import_file";
+			import_file.id = "import_file";
+			form.appendChild(import_file);
+			Element('import_button').disabled = false;
+			form.style.visibility = '';
+		}				
+
+		if(args[0] != 'importing') {
+			recreate_fileupload();
+			setTimeout("Element('s_info').style.visibility = 'hidden'", 12000);
+		}
+	}
+	
+	cIEContacts.prototype.importCSV = function ()
+	{		
+		var lang_msg_invalid_csv = Element('cc_msg_invalid_csv').value;
+		var form = document.formCSV;
+		if ((form.import_file.value.length < 10) || 
+		(form.import_file.value.substring(form.import_file.value.length - 4, form.import_file.value.length).toLowerCase() != ".csv")){
+			alert(lang_msg_invalid_csv);
+			return;
+		}
+		
+		var _this = this;
+		Element('import_button').disabled = true;
+
+		var handler_import = function (responseText){
+			var args = new Array();
+
+			var data = unserialize(responseText);
+			if(data.error)
+				args[0] = 'error';
+			else {
+				args[0] = 'success';
+				args[1] = data._new ? data._new : 0;
+				args[2] = data._failure ? data._failure : 0;
+				args[3] = data._existing ? data._existing : 0;
+				args[4] = data._failure_status
+
+			}
+			_this.importWriteStatus(args);
+		}		
+
+		if(! (divUpload = Element('divUpload'))) {
+			divUpload		= document.createElement('DIV');		
+			divUpload.id	= 'divUpload';
+			document.body.appendChild(divUpload);
+		}
+
+		divUpload.innerHTML= '<iframe style="display:none;width:0px;height:0px" id="importCSVFile" name="importCSVFile"></iframe>';
+
+		var _onload = function(){
+			var typeImport = Element('typeImport').value;
+
+			Connector.newRequest('import_contacts','../index.php?menuaction=contactcenter.ui_data.data_manager&method=import_contacts&typeImport='+typeImport,'GET',handler_import);
+		}
+
+		if (Element('importCSVFile').attachEvent)
+			Element('importCSVFile').attachEvent("onload", _onload);
+		else
+			Element('importCSVFile').onload = _onload;
+					
+		form.action ="inc/cc_updown.php";
+		form.target ="importCSVFile";		
+		form.submit();
+
+		form.removeChild(form.import_file);
+		form.style.visibility = 'hidden';
+		this.importWriteStatus(new Array('importing'));
+
+	}
+	
+	cIEContacts.prototype.close = function() {
+		this.win.close();
+	}
+	
+	cIEContacts.prototype.exportCSV = function() {
+		var lang_export_error = Element('cc_msg_export_error');
+		var handler_export = function(data) {
+			if(!data){
+				alert(lang_export_error	);
+				return;
+			}				
+			
+			var div_download = document.getElementById("id_div_download");
+	
+			if (!div_download){
+				div_download = document.createElement("DIV");
+				div_download.id="id_div_download";
+				document.body.appendChild(div_download);
+			}		
+			div_download.innerHTML="<iframe style='display:none;width:0;height:0' name='attachment' src='inc/cc_updown.php?&file_name=expresso.csv&file_path="+data+"'></iframe>";
+			Element('export_button').disabled = false;
+		}		
+		var typeExport = Element("typeExport");
+		Element('export_button').disabled = true;
+		Connector.newRequest('export_contacts', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=export_contacts', 'POST', handler_export, 'typeExport='+typeExport.value);
+	}
+
+/* Build the Object */
+	var	ccIEContacts = new cIEContacts();
Index: /tags/contactcenter/1.20/js/ccListParticipants.js
===================================================================
--- /tags/contactcenter/1.20/js/ccListParticipants.js	(revision 24)
+++ /tags/contactcenter/1.20/js/ccListParticipants.js	(revision 24)
@@ -0,0 +1,161 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	function cListParticipants ()
+	{
+		this.arrayWin = new Array();
+		this.el;
+	}
+
+	
+cListParticipants.prototype.showList = function(id, contact, email, title){
+	_this = this;
+	
+	id = id;
+	
+	div = document.getElementById(id+':cc_rectParticipants');
+	var el = document.createElement("DIV");									
+	el.style.visibility = "hidden";									
+	el.style.position = "absolute";
+	el.style.left = "0px";
+	el.style.top = "0px";
+	el.style.width = "0px";
+	el.style.height = "0px";									
+	el.className = "div_cc_rectParticipants";
+	el.id = id+':cc_rectParticipants';
+	
+	if(is_ie) {
+		el.style.width= "auto";
+		el.style.overflowY = "auto";								
+		el.style.overflowX = "hidden";
+	}													
+		else {									
+		el.style.overflow = "-moz-scrollbars-vertical";
+	}
+		
+	if (title) {
+		document.body.appendChild(el);
+		var names = contact.split(",");
+		var email = email.split(",");
+		el.innerHTML = "";								
+		el.innerHTML = "<br>&nbsp;&nbsp;<b><font color='BLUE'>"+title+"</font></b>"+
+		"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<u>"+
+		Element('cc_participants').value+"</u>&nbsp;&nbsp;&nbsp;<br><br>";
+							
+		if(names.length) {
+			for (var d = 0; d < (names.length-1); d++) {																																					
+				el.innerHTML +=	
+				"<font color='DARKBLUE'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
+					"\"" + names[d]+ "\"" +
+					" &lt;"+email[d]+
+					"&gt;</font>&nbsp;&nbsp;&nbsp;<br>";																	
+			}
+		}
+		else {
+			el.innerHTML +=	"<font color='DARKBLUE'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
+				"&lt;"+Element('cc_empty').value+"&gt;&nbsp;&nbsp;</font><br>";		
+		}
+			
+		el.innerHTML +=	"<br>";
+		
+		if(div)
+			this.showWindow(div);
+		else						
+			_this.showWindow(el);
+	} else {
+			var handler = function (responseText) {
+				var contacts = unserialize(responseText);
+				var title = contacts.names_ordered;	
+				document.body.appendChild(el);				
+				el.innerHTML = "";	
+				el.innerHTML = "<br>&nbsp;&nbsp;<b><font color='BLUE' nowrap>"+title+"</font></b>"+
+				"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<u>"+
+				Element('cc_participants').value+"</u>&nbsp;&nbsp;&nbsp;<br><br>";				
+				if(contacts.size > 0) {
+						el.innerHTML +=	contacts.inner_html;
+				}
+				else {
+					el.innerHTML +=	"<font color='DARKBLUE'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
+					"&lt;"+Element('cc_empty').value+"&gt;&nbsp;&nbsp;</font><br>";		
+				}
+				el.innerHTML +=	"<br>";
+								
+				_this.showWindow(el);
+			}		
+				
+			if(div)
+				this.showWindow(div);
+			else
+				Connector.newRequest('get_catalog_participants_list', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_catalog_participants_list', 'POST', handler, 'id='+id);
+		}
+	}
+	
+	cListParticipants.prototype.showWindow = function (div)
+	{						
+		if(! div) {
+			alert('Essa lista não possui nenhum participante.');
+			return;
+		}
+							
+		if(! this.arrayWin[div.id]) {
+			div.style.width = "auto";
+			div.style.height = "250px";
+			var title = 'Listar Partipantes';		
+			var wHeight = div.offsetHeight + "px";
+			var wWidth =  div.offsetWidth   + "px";
+			if(is_ie) {
+				div.style.width = wWidth;
+			}			 
+			else {
+				div.style.width = div.offsetWidth - 5;
+			}
+
+			win = new dJSWin({			
+				id: 'ccListParticipants_'+div.id,
+				content_id: div.id,
+				width: wWidth,
+				height: wHeight,
+				title_color: '#3978d6',
+				bg_color: '#eee',
+				title: title,						
+				title_text_color: 'white',
+				button_x_img: Element('cc_phpgw_img_dir').value+'/winclose.gif',
+				border: true });
+			
+			this.arrayWin[div.id] = win;
+			win.draw();			
+		}
+		else {
+			win = this.arrayWin[div.id];
+		}			
+							
+		win.open();				
+	}
+	
+/* Build the Object */
+	var ccListParticipants ;
+	var cListParticipants_pre_load = document.body.onload;
+
+	if (is_ie)
+	{ 
+		document.body.onload = function (e) 
+		{ 
+			cListParticipants_pre_load();
+			ccListParticipants = new cListParticipants();
+			
+		};
+	}
+	else
+	{
+		ccListParticipants = new cListParticipants();
+	}
Index: /tags/contactcenter/1.20/js/ccAux.js
===================================================================
--- /tags/contactcenter/1.20/js/ccAux.js	(revision 119)
+++ /tags/contactcenter/1.20/js/ccAux.js	(revision 119)
@@ -0,0 +1,407 @@
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+/***********************************************\
+*               INITIALIZATION                  *
+\***********************************************/
+if (document.all)
+{
+	navigator.userAgent.toLowerCase().indexOf('msie 5') != -1 ? is_ie5 = true : is_ie5 = false;
+	is_ie = true;
+	is_moz1_6 = false;
+	is_mozilla = false;
+	is_ns4 = false;
+}
+else if (document.getElementById)
+{
+	navigator.userAgent.toLowerCase().match('mozilla.*rv[:]1\.6.*gecko') ? is_moz1_6 = true : is_moz1_6 = false;
+	is_ie = false;
+	is_ie5 = false;
+	is_mozilla = true;
+	is_ns4 = false;
+}
+else if (document.layers)
+{
+	is_ie = false;
+	is_ie5 = false
+	is_moz1_6 = false;
+	is_mozilla = false;
+	is_ns4 = true;
+}
+
+/***********************************************\
+ *                DATA FUNCTIONS               *
+\***********************************************/
+function randomString() {
+	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
+	var string_length = 4;
+	var randomstring = '';
+	for (var i=0; i<string_length; i++) {
+		var rnum = Math.floor(Math.random() * chars.length);
+		randomstring += chars.substring(rnum,rnum+1);
+	}
+	return randomstring;
+}
+
+function serialize(data)
+{
+	var f = function(data)
+	{
+		var str_data;
+
+		if (data == null || 
+			(typeof(data) == 'string' && data == ''))
+		{
+			str_data = 'N;';
+		}
+
+		else switch(typeof(data))
+		{
+			case 'object':
+				var arrayCount = 0;
+
+				str_data = '';
+
+				for (i in data)
+				{
+					if (i == 'length')
+					{
+						continue;
+					}
+					
+					arrayCount++;
+					switch (typeof(i))
+					{
+						case 'number':
+							str_data += 'i:' + i + ';' + serialize(data[i]);
+							break;
+
+						case 'string':
+							str_data += 's:' + i.length + ':"' + i + '";' + serialize(data[i]);
+							break;
+
+						default:
+							showMessage(Element('cc_msg_err_serialize_data_unknown').value);
+							break;
+					}
+				}
+
+				if (!arrayCount)
+				{
+					str_data = 'N;';	
+				}
+				else
+				{
+					str_data = 'a:' + arrayCount + ':{' + str_data + '}';
+				}
+				
+				break;
+		
+			case 'string':
+				str_data = 's:' + data.length + ':"' + data + '";';
+				break;
+				
+			case 'number':
+				str_data = 'i:' + data + ';';
+				break;
+
+			case 'boolean':
+				str_data = 'b:' + (data ? '1' : '0') + ';';
+				break;
+
+			default:
+				showMessage(Element('cc_msg_err_serialize_data_unknown').value);
+				return null;
+		}
+
+		return str_data;
+	}
+
+	var sdata = f(data);
+	return sdata;
+}
+
+function unserialize(str)
+{
+	var f = function (str)
+	{
+		switch (str.charAt(0))
+		{
+			case 'a':
+				
+				var data = new Array();
+				var n = parseInt( str.substring( str.indexOf(':')+1, str.indexOf(':',2) ) );
+				var arrayContent = str.substring(str.indexOf('{')+1, str.lastIndexOf('}'));
+			
+				for (var i = 0; i < n; i++)
+				{
+					var pos = 0;
+
+					/* Process Index */
+					var indexStr = arrayContent.substr(pos, arrayContent.indexOf(';')+1);
+					var index = unserialize(indexStr);
+					pos = arrayContent.indexOf(';', pos)+1;
+					
+					/* Process Content */
+					var part = null;
+					switch (arrayContent.charAt(pos))
+					{
+						case 'a':
+							var pos_ = matchBracket(arrayContent, arrayContent.indexOf('{', pos))+1;
+							part = arrayContent.substring(pos, pos_);
+							pos = pos_;
+							data[index] = unserialize(part);
+							break;
+					
+						case 's':
+							var pval = arrayContent.indexOf(':', pos+2);
+							var val  = parseInt(arrayContent.substring(pos+2, pval));
+							pos = pval + val + 4;
+							data[index] = arrayContent.substr(pval+2, val);
+							break;
+
+						default:
+							part = arrayContent.substring(pos, arrayContent.indexOf(';', pos)+1);
+							pos = arrayContent.indexOf(';', pos)+1;
+							data[index] = unserialize(part);
+							break;
+					}
+					arrayContent = arrayContent.substr(pos);
+				}
+				break;
+				
+			case 's':
+				var pos = str.indexOf(':', 2);
+				var val = parseInt(str.substring(2,pos));
+				var data = str.substr(pos+2, val);
+				str = str.substr(pos + 4 + val);
+				break;
+
+			case 'i':
+			case 'd':
+				var pos = str.indexOf(';');
+				var data = parseInt(str.substring(2,pos));
+				str = str.substr(pos + 1);
+				break;
+			
+			case 'N':
+				var data = null;
+				str = str.substr(str.indexOf(';') + 1);
+				break;
+
+			case 'b':
+				var data = str.charAt(2) == '1' ? true : false;
+				break;
+		}
+		
+		return data;
+	}
+
+	return f(str);
+}
+
+function matchBracket(strG, iniPosG)
+{
+	var f = function (str, iniPos)
+	{
+		var nOpen, nClose = iniPos;
+		
+		do 
+		{
+			nOpen = str.indexOf('{', nClose+1);
+			nClose = str.indexOf('}', nClose+1);
+
+			if (nOpen == -1)
+			{
+				return nClose;
+			}
+			
+			if (nOpen < nClose )
+			{
+				nClose = matchBracket(str, nOpen);
+			}
+			
+		} while (nOpen < nClose);
+
+		return nClose;
+	}
+
+	return f(strG, iniPosG);
+}
+
+/***********************************************\
+*               AUXILIAR FUNCTIONS              *
+\***********************************************/
+
+function resizeIcon(id, action)
+{
+	var element = Element(id);
+	
+	if (action == 0)
+	{
+		CC_old_icon_w = element.style.width;
+		CC_old_icon_h = element.style.height;
+
+		element.style.zIndex = parseInt(element.style.zIndex) + 1;
+		element.style.width = '36px';
+		element.style.height = '36px';
+		element.style.top = (parseInt(element.style.top) - parseInt(element.style.height)/2) + 'px';
+		element.style.left = (parseInt(element.style.left) - parseInt(element.style.width)/2) + 'px';
+	}
+	else if (action == 1)
+	{
+		element.style.zIndex = parseInt(element.style.zIndex) - 1;
+		element.style.top = (parseInt(element.style.top) + parseInt(element.style.height)/2) + 'px';
+		element.style.left = (parseInt(element.style.left) + parseInt(element.style.width)/2) + 'px';
+		element.style.width = CC_old_icon_w;
+		element.style.height = CC_old_icon_h;
+	}
+}
+
+function Element (element)
+{
+	/* IE OBJECTS */
+	if (document.all)
+	{
+		return document.all[element];
+	}
+	/* MOZILLA OBJECTS */
+	else if (document.getElementById)
+	{
+		return document.getElementById(element);
+	}
+	/* NS4 OBJECTS */
+	else if (document.layers)
+	{
+		return document.layers[element];
+	}
+}
+
+function removeHTMLCode(id)
+{
+	Element(id).parentNode.removeChild(Element(id));
+}
+
+function addHTMLCode(parent_id,child_id,child_code,surround_block_tag)
+{
+	var obj = document.createElement(surround_block_tag);
+	Element(parent_id).appendChild(obj);
+	obj.id = child_id;
+	obj.innerHTML = child_code;
+	return obj;
+}
+
+function addSlashes(code)
+{
+	for (var i = 0; i < code.length; i++)
+	{
+		switch(code.charAt(i))
+		{
+			case "'":
+			case '"':
+			case "\\":
+				code = code.substr(0, i) + "\\" + code.charAt(i) + code.substr(i+1);
+				i++;
+				break;
+		}
+	}
+
+	return code;
+}
+
+function htmlSpecialChars(str)
+{
+	// TODO: Not implemented!!!
+	var pos = 0;
+	
+	for (var i = 0; i < str.length; i++)
+	{
+		
+	}
+}
+
+function replaceComAnd(str, replacer)
+{
+	var oldPos = 0;
+	var pos = 0;
+	
+	while ((pos = str.indexOf('&', pos)) != -1)
+	{
+		str = str.substring(oldPos, pos) + replacer + str.substring(pos+1);
+	}
+
+	return str;
+}
+
+function ccTimeout(control, code, maxCalls, actualCall, singleTimeout)
+{
+	if (eval(control))
+	{
+		eval(code);
+		return true;
+	}
+
+	if (!actualCall)
+	{
+		actualCall = 1;
+	}
+
+	if (!maxCalls)
+	{
+		maxCalls = 100;
+	}
+
+	if (actualCall == maxCalls)
+	{
+		showMessage(Element('cc_msg_err_timeout').value);
+		return false;
+	}
+
+	if (!singleTimeout)
+	{
+		singleTimeout = 100;
+	}
+
+	setTimeout('ccTimeout(\''+control+'\',\''+addSlashes(code)+'\','+maxCalls+','+(actualCall+1)+','+singleTimeout+')', singleTimeout);
+}
+
+function showMessage(msg, type)
+{
+	// TODO: Replace alert with 'loading' style div with Ok button
+
+	switch(type)
+	{
+		case 'confirm':
+			return confirm(msg);
+
+		default:
+			alert(msg);
+			return;
+	}
+}
+
+/***********************************************\
+*                   CONSTANTS                   *
+\***********************************************/
+
+var CC_url = Element('cc_server_root').value+'/index.php?menuaction=contactcenter.ui_data.data_manager&method=';
+
+/***********************************************\
+*               GLOBALS VARIABLES               *
+\***********************************************/
+
+var CC_loading_div = null;
+var CC_loading_td  = null;
+var CC_loading     = false;
+var CC_loading_set = false;
Index: /tags/contactcenter/1.20/index.php
===================================================================
--- /tags/contactcenter/1.20/index.php	(revision 292)
+++ /tags/contactcenter/1.20/index.php	(revision 292)
@@ -0,0 +1,30 @@
+<?php
+  /***************************************************************************\
+  * eGroupWare - Contacts Center                                              *
+  * http://www.egroupware.org                                                 *
+  * Written by:                                                               *
+  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
+  *  - Jonas Goes <jqhcb@users.sourceforge.net>                               *
+  *  sponsored by Thyamad - http://www.thyamad.com                            *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+	$GLOBALS['phpgw_info'] = array();
+
+	$GLOBALS['phpgw_info']['flags'] = array(
+		'currentapp' => 'contactcenter',
+		'noheader'   => true,
+		//'nonavbar'   => true
+	);
+	include('../header.inc.php');
+	$_SESSION['phpgw_info']['user']['preferences']['contactcenter']['telephone_number'] = $GLOBALS['phpgw_info']['user']['telephonenumber'];
+	//Enable/Disable VoIP Service
+    $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['voip_enabled'] = false;
+	$obj = CreateObject('contactcenter.ui_data');
+	$obj->index();
+	$GLOBALS['phpgw']->common->phpgw_footer();
+?>
Index: /tags/contactcenter/1.20/templates/default/api_common.tpl
===================================================================
--- /tags/contactcenter/1.20/templates/default/api_common.tpl	(revision 2)
+++ /tags/contactcenter/1.20/templates/default/api_common.tpl	(revision 2)
@@ -0,0 +1,50 @@
+<!-- DEBUG -->
+<div id="cc_debug" style="display: none; position: absolute; top:0px; left: 1000px; width: 600px"></div>
+<!-- END DEBUG -->
+
+<!-- ContactCenter API Start -->
+<input id="cc_server_root" type="hidden" value="{cc_server_root}" />
+<input id="cc_phpgw_img_dir" type="hidden" value="{cc_phpgw_img_dir}" />
+<input id="cc_email_id_type" type="hidden" value="{cc_email_id_type}" />
+
+<!-- JS MESSAGES -->
+<input id="cc_msg_err_invalid_catalog" type="hidden" value="{cc_msg_err_invalid_catalog}" />
+<input id="cc_msg_err_contacting_server" type="hidden" value="{cc_msg_err_contacting_server}" />
+<input id="cc_msg_err_timeout" type="hidden" value="{cc_msg_err_timeout}" />
+<input id="cc_msg_err_serialize_data_unknown" type="hidden" value="{cc_msg_err_serialize_data_unknown}" />
+
+<input id="cc_msg_err_empty_field" type="hidden" value="{cc_msg_err_empty_field}" />
+<input id="cc_msg_type_state" type="hidden" value="{cc_msg_type_state}" />
+<input id="cc_msg_type_city" type="hidden" value="{cc_msg_type_city}" />
+<!-- END JS MESSAGES -->
+
+
+<input id="cc_connector_visible" type="hidden" value="{cc_connector_visible}" />
+<input id="cc_loading_1" type="hidden" value="{cc_loading_1}" />
+<input id="cc_loading_2" type="hidden" value="{cc_loading_2}" />
+<input id="cc_loading_3" type="hidden" value="{cc_loading_3}" />
+<input id="cc_loading_image" type="hidden" value="{cc_loading_image}" />
+
+<link rel="stylesheet" type="text/css" href="{cc_css}" />
+<link rel="stylesheet" type="text/css" href="{cc_dtree_css}" />
+<script type="text/javascript" src="{cc_js_aux}"></script>
+<script type="text/javascript" src="{cc_js_connector}"></script>
+<script type="text/javascript" src="{cc_js_wz_dragdrop}"></script>
+<script type="text/javascript" src="{cc_js_dtree}"></script>
+<script type="text/javascript" src="{cc_js_dtabs}"></script>
+<script type="text/javascript" src="{cc_js_djswin}"></script>
+<script type="text/javascript" src="{cc_js_catalog_tree}"></script>
+
+<div id="cc_loading" class="hidden">
+	<table class="loading" background="{cc_loading_image}"> 
+		<tr>
+			<td id="cc_loading_inner"></td>
+		</tr>
+	</table>
+</div>
+
+<script type="text/javascript">
+	var Connector = new cConnector();
+	Connector.setVisible(true);
+</script>
+<!-- ContactCenter API End -->
Index: /tags/contactcenter/1.20/templates/default/head.inc.php
===================================================================
--- /tags/contactcenter/1.20/templates/default/head.inc.php	(revision 2)
+++ /tags/contactcenter/1.20/templates/default/head.inc.php	(revision 2)
@@ -0,0 +1,89 @@
+<?php
+	/**************************************************************************\
+	* phpGroupWare                                                             *
+	* http://www.phpgroupware.org                                              *
+	* --------------------------------------------                             *
+	*  This program is free software; you can redistribute it and/or modify it *
+	*  under the terms of the GNU General Public License as published by the   *
+	*  Free Software Foundation; either version 2 of the License, or (at your  *
+	*  option) any later version.                                              *
+	\**************************************************************************/
+
+
+	if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time'])
+	{
+		$mtime = microtime(); 
+		$mtime = explode(' ',$mtime); 
+		$mtime = $mtime[1] + $mtime[0]; 
+		$GLOBALS['page_start_time'] = $mtime; 
+	}
+
+	// get used language code
+	$lang_code = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
+
+	$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="'
+		. $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="'
+		. $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
+
+	if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
+	{
+		$bodyheader .= '';
+	}
+
+	#_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']);
+	$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
+	if(!file_exists($theme_css))
+	{
+		$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
+	}
+
+	//pngfix defaults to yes
+	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_pngfix'])
+	{
+		$pngfix_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/js/pngfix.js';
+		$pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher --> 
+		<!--[if gte IE 5.5000]>
+		<script src="'.$pngfix_src.'" type="text/javascript">
+		</script>
+		<![endif]-->';
+	}
+
+	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'])
+	{
+		$slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/js/slidereffects.js';
+		$slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
+		</script>';
+	}
+	else
+	{
+		$simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/js/simple_show_hide.js';
+		$simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
+		</script>';
+	}
+
+	$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
+	$tpl->set_unknowns('remove');
+	$tpl->set_file(array('_head' => 'head.tpl'));
+	$tpl->set_block('_head','head');
+
+	$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
+	$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
+
+	$var = Array(
+		'img_icon'      => PHPGW_IMAGES_DIR . '/favicon.ico',
+		'img_shortcut'  => PHPGW_IMAGES_DIR . '/favicon.ico',
+		'pngfix'        => $pngfix,
+		'slider_effects'=> $slider_effects,
+		'simple_show_hide'=> $simple_show_hide,
+		'lang_code'=> $lang_code,
+		'charset'       => $GLOBALS['phpgw']->translation->charset(),
+		'font_family'   => $GLOBALS['phpgw_info']['theme']['font'],
+		'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
+		'body_tags'     => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
+		'theme_css'     => $theme_css,
+		'css'           => $GLOBALS['phpgw']->common->get_css(),
+		'java_script'   => $GLOBALS['phpgw']->common->get_java_script()	);
+	$tpl->set_var($var);
+	$tpl->pfp('out','head');
+	unset($tpl);
+?>
Index: /tags/contactcenter/1.20/templates/default/preferences.tpl
===================================================================
--- /tags/contactcenter/1.20/templates/default/preferences.tpl	(revision 2)
+++ /tags/contactcenter/1.20/templates/default/preferences.tpl	(revision 2)
@@ -0,0 +1,66 @@
+<!--
+	ContactCenter Preferences TPL File
+	Copyright (C) 2004 - Raphael Derosso Pereira 
+	(raphaelpereira@users.sourceforge.net)
+	
+	This file is licensed under the terms of th GNU GPL
+	version 2 or above
+-->
+
+<form method="POST" action="{form_action}">
+<div id="cc_pref_cards" style="width: 100%; border: 0px solid black">
+	<p align="center" style="font-weight: bold; font-size: medium; border: 0px solid black">{lang_Cards_Visualization_Preferences}</p>
+	<table align="center" style="width: 400px">
+		<tr class="th">
+			<td style="text-align: center; font-weight: bold">{lang_Option}</td>
+			<td style="text-align: center; font-weight: bold">{lang_Value}</td>
+		</tr>
+		<tr class="row_off">
+			<td>{lang_Default_Person_Email_Type}</td>
+			<td>
+				<select name="personCardEmail" style="width: 200px">
+					<option selected value="_NONE_">{lang_Choose_Email_Type...}</option>
+					{personCardEmail}
+				</select>
+			</td>
+		</tr>
+		<tr class="row_on">
+			<td>{lang_Default_Person_Telephone_Type}</td>
+			<td>
+				<select name="personCardPhone" style="width: 200px">
+					<option selected value="_NONE_">{lang_Choose_Telephone_Type...}</option>
+					{personCardPhone}
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td></td>
+			<td style="text-align: right;">
+				<input type="submit" name="save" value="{lang_Save}">
+				<input type="button" name="cancel" value="{lang_Cancel}" onclick="window.back()">
+			</td>
+		</tr>
+	</table>
+	<br>
+	<p align="center" style="font-weight: bold; font-size: medium; border: 0px solid black">{lang_Connector_Setup}</p>
+	<table align="center" style="width: 400px">
+		<tr class="th">
+			<td style="text-align: center; font-weight: bold; width: 200px">{lang_Option}</td>
+			<td style="text-align: center; font-weight: bold; width: 200px">{lang_Value}</td>
+		</tr>
+		<tr class="row_off">
+			<td>{lang_Display_Connector_Client-Server_Status_Information?}</td>
+			<td align="center">
+				<input type="checkbox" name="displayConnector" {displayConnector} />
+			</td>
+		</tr>
+		<tr>
+			<td></td>
+			<td style="text-align: right;">
+				<input type="submit" name="save" value="{lang_Save}">
+				<input type="button" name="cancel" value="{lang_Cancel}" onclick="window.back()">
+			</td>
+		</tr>
+	</table>
+</div>
+</form>
Index: /tags/contactcenter/1.20/templates/default/search_win.tpl
===================================================================
--- /tags/contactcenter/1.20/templates/default/search_win.tpl	(revision 2)
+++ /tags/contactcenter/1.20/templates/default/search_win.tpl	(revision 2)
@@ -0,0 +1,67 @@
+{cc_api}
+
+<script type="text/javascript" src="{cc_js_search_win}"></script>
+
+<div id="cc_search" style="position: absolute; width: 450px; height: 300px; visibility: hidden; z-index: 2; border: 1px solid #999; border-top: 0px;">
+	<input id="cc_search_title" type="hidden" value="{cc_search_title}">
+	<table border="0" width="450px" height="300px" style="background: #eee">
+		<tr valign="top">
+			<td style="width: 250px">
+				<table width="100%" border="0">
+					<tr>
+						<td align="left">{cc_search_catalogues}</td>
+					</tr>
+					<tr>
+						<td align="left"><div id="cc_search_catalogues" style="position: relative; width: 250px; height: 265px; border: 1px solid #999; overflow: auto;" class="row_on"></div></td>
+					</tr>
+				</table>
+			</td>
+			<td style="width: 200px">
+				<table width="100%" height="100%" border="0">
+					<tr>
+						<td align="left" colspan="2">{cc_search_for}</td>
+					</tr>
+					<tr>
+						<td align="left" colspan="2"><input id="cc_search_for" type="text" /></td>
+					</tr>
+					<tr height="100%" valign="bottom">
+						<td align="right" height="100%" valign="bottom"><input type="button" value="{cc_search_go}" style="width: 70px" onclick="javascript: ccSearchWin.go()" /></td>
+						<td align="right" height="100%" width="1%" valign="bottom"><input type="button" value="{cc_search_cancel}" style="width: 70px" onclick="javascript:ccSearchWin.close();" /></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+	</table>
+</div>
+
+<script type="text/javascript">
+	var searchWin_load = document.body.onload;
+	var ccSearchWin, ccSearchWindow;
+
+	var searchWin_load_f = function(e)
+	{
+		ccSearchWindow = new dJSWin({'id': 'cc_search_window',
+									 'content_id': 'cc_search',
+									 'win_class': 'row_off',
+									 'width': '452px',
+									 'height': '300px',
+									 'title_color': '#3978d6',
+									 'title': Element('cc_search_title').value,
+									 'title_text_color': 'white',
+									 'button_x_img': Element('cc_phpgw_img_dir').value+'/winclose.gif',
+									 'border': true});
+
+		ccSearchWindow.draw();
+		ccSearchWin = new ccSearchWinClass({'window': ccSearchWindow, 'tree': 'ccSearchTree'});
+	}
+
+	if (is_ie)
+	{
+		//document.body.onload = function(e) {setTimeout('searchWin_load_f()'); searchWin_load ? setTimeout('searchWin_load()', 10) : false;};
+		document.body.onload = function(e) {searchWin_load_f(); searchWin_load ? searchWin_load() : false;};
+	}
+	else
+	{
+		searchWin_load_f();
+	}
+</script>
Index: /tags/contactcenter/1.20/templates/default/email_win.tpl
===================================================================
--- /tags/contactcenter/1.20/templates/default/email_win.tpl	(revision 2)
+++ /tags/contactcenter/1.20/templates/default/email_win.tpl	(revision 2)
@@ -0,0 +1,143 @@
+{cc_api}
+
+<script type="text/javascript" src="{cc_js_search}"></script>
+<script type="text/javascript" src="{cc_js_email_win}"></script>
+<input id="cc_email_win_title" type="hidden" value="{cc_email_win_title}"/>
+<input id="cc_email_status" type="hidden" value="{cc_email_status}"/>
+<input id="cc_email_search_text" type="hidden" value="{cc_email_search_text}"/>
+<input id="cc_email_conn_1" type="hidden" value="{cc_email_conn_1}"/>
+<input id="cc_email_conn_2" type="hidden" value="{cc_email_conn_2}"/>
+<input id="cc_email_conn_3" type="hidden" value="{cc_email_conn_3}"/>
+
+<div id="cc_email_win" style="position: absolute; width: 720px;z-index:1; height: 350px; visibility: hidden;  border: 1px solid #999; border-top: 0px; background-color: #eee;">
+	<table border="0" width="100%" height="100%">
+		<tr>
+			<td>
+				<table>
+					<tr>
+						<td id="cc_email_search"></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<table border="0" width="100%">
+					<tr>
+						<td valign="top">
+							<table border="0">
+								<tr>
+									<td>{cc_label_catalogues}</td>
+								</tr>
+								<tr>
+									<td><div id="cc_email_catalogues" style=" position: relative; width: 300px; height: 110px; border: 1px solid #999; overflow:auto" class="row_on"></div>
+									</td>
+								</tr>
+								<tr>
+									<td>{cc_label_entries}</td>
+								</tr>
+								<tr>
+									<td><select id="cc_email_win_entries" style="width: 300px; height: 110px; overflow: auto;" multiple></select></td>
+								</tr>
+							</table>
+						</td>
+						<td valign="top">
+							<table border="0" width="100%" height="100%">
+								<tr>
+									<td></td>
+									<td>{cc_label_to}</td>
+								</tr>
+								<tr>
+									<td>
+										<table>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_to_add}" onclick="javascript:ccEmailWin.entries_to();"></td></tr>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_to_del}" onclick="javascript:ccEmailWin.to_entries();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_to" style="width: 280px; height: 65px;" multiple></select></td>
+								</tr>
+								<tr>
+									<td></td>
+									<td>{cc_label_cc}</td>
+								</tr>
+								<tr>
+									<td>
+										<table>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_cc_add}" onclick="javascript:ccEmailWin.entries_cc();"></td></tr>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_cc_del}" onclick="javascript:ccEmailWin.cc_entries();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_cc" style="width: 280px; height: 65px;" multiple></select></td>
+								</tr>
+								<tr>
+									<td></td>
+									<td>{cc_label_cco}</td>
+								</tr>
+								<tr>
+									<td>
+										<table>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_cco_add}" onclick="javascript:ccEmailWin.entries_cco();"></td></tr>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_cco_del}" onclick="javascript:ccEmailWin.cco_entries();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_cco" style="width: 280px; height: 65px;" multiple></select></td>
+								</tr>								
+							</table>
+						</td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td valign="top">
+				<table width="100%" border="0">
+					<tr align="center">
+						<td style="width: 523px">&nbsp;</td>
+						<td style="width: 35px"><input style="width: 70px;" type="button" value="{cc_btn_ok}" onclick="javascript:ccEmailWin.ok();"></td>
+						<td style="width: 35px"><input style="width: 70px;" type="button" value="{cc_btn_cancel}" onclick="javascript:ccEmailWin.close();"></td>
+						<td style="width: 7px"></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td id="cc_email_win_debug"></td>
+		</tr>
+	</table>
+</div>
+
+<!-- BOTTOM DETAILS-->
+<script type="text/javascript">
+	var emailWin_load = document.body.onload;
+	var ccEmailWin, ccEmailWindow;
+	
+	
+	var emailWin_load_f = function(e)
+	{
+		ccEmailWindow = new dJSWin({'id': 'cc_email_window',
+									'content_id': 'cc_email_win',
+									'win_class': 'row_off',
+									'width': '720px',
+									'height': '350px',
+									'title_color': '#3978d6',
+									'title': Element('cc_email_win_title').value,
+									'title_text_color': 'white',
+									'button_x_img': Element('cc_phpgw_img_dir').value+'/winclose.gif',
+									'border': true});
+
+		ccEmailWindow.draw();		
+		ccEmailWin = new ccEmailWinClass({'window': ccEmailWindow});
+		//ccEmailWin.open();
+	}
+
+	if (is_ie)
+	{		
+		document.body.onload = function(e) {emailWin_load ? emailWin_load() : false; emailWin_load_f()};
+	}
+	else
+	{
+		emailWin_load_f();
+	}
+
+</script>
+<!-- END BOTTOM DETAILS-->
Index: /tags/contactcenter/1.20/templates/default/quickAddPlugin.tpl
===================================================================
--- /tags/contactcenter/1.20/templates/default/quickAddPlugin.tpl	(revision 2)
+++ /tags/contactcenter/1.20/templates/default/quickAddPlugin.tpl	(revision 2)
@@ -0,0 +1,31 @@
+<!--
+
+	eGroupWare - Contact Center - Quick Add Plugin Interface Template
+	Copyright (C) 2004 - Raphael Derosso Pereira
+	(raphaelpereira@users.sourceforge.net)
+
+	This file is licensed under the terms of th GNU GPL
+	version 2 or above
+	
+-->
+
+{cc_api}
+
+<div id="ccQuickAddContent" style="position: absolute; visibility: hidden">
+	<input id="ccQAnFields" type="hidden" value="{ccQAnFields}" />
+	<input id="ccQATitle" type="hidden" value="{ccQATitle}" />
+	<input id="ccQAWinHeight" type="hidden" value="{ccQAWinHeight}" />
+	
+	<div style="border: 0px solid #999;">
+		
+		{ccQAFields}
+
+	</div>
+	<div id="ccQAFuncitons" style="border: 0px solid black; width: 220px; height: 20px">
+		<input title="{ccQASave}" type="button" onclick="ccQuickAdd.send();" value="{ccQASave}" style="position: absolute; top: {ccQAFunctionsTop}; left: 55px; width: 60px" />
+		<input title="{ccQAClear}" type="button" onclick="ccQuickAdd.clear();" value="{ccQAClear}" style="position: absolute; top: {ccQAFunctionsTop}; left: 120px; width: 60px" />
+		<input title="{ccQACancel}" type="button" onclick="ccQuickAdd.clear(); ccQuickAdd.window.close();" value="{ccQACancel}" style="position: absolute; top: {ccQAFunctionsTop}; left: 185px; width: 60px" />
+	</div>
+</div>
+
+<script type="text/javascript" src="{ccQAPluginFile}"></script>
Index: /tags/contactcenter/1.20/templates/default/addGroup.tpl
===================================================================
--- /tags/contactcenter/1.20/templates/default/addGroup.tpl	(revision 294)
+++ /tags/contactcenter/1.20/templates/default/addGroup.tpl	(revision 294)
@@ -0,0 +1,65 @@
+<!--
+
+	eGroupWare - Contact Center - Quick Add Plugin Interface Template
+	Copyright (C) 2004 - Raphael Derosso Pereira
+	(raphaelpereira@users.sourceforge.net)
+
+	This file is licensed under the terms of th GNU GPL
+	version 2 or above
+	
+-->
+{cc_api}
+
+<div align="center" id="ccAddGroupContent" style="position: absolute; visibility: hidden">
+	<input id="ccAGnFields" type="hidden" value="{ccAGnFields}" />
+	<input id="ccAGTitle" type="hidden" value="{ccAGTitle}" />
+	<input id="ccAGWinHeightIE" type="hidden" value="{ccAGWinHeightIE}" />
+	<input id="ccAGWinHeightMO" type="hidden" value="{ccAGWinHeightMO}" />
+	<input id="group_id" type="hidden">
+	<br>
+	<table border="0"  cellpadding="0" cellspacing="0" width="100%">
+		<tr height="30">
+			<td  width="17%" valign="center" align="right" nowrap>{txt_name}:</td>
+			<td  valign="center" align="left">&nbsp;&nbsp;{title}</td>
+		</tr>
+ 	</table>			
+	<br><br>			
+	<table border="0" cellpadding="0" cellspacing="0" width="95%">
+		<tr>
+			<td  align="right">
+				<table border="0" cellpadding="0" cellspacing="0">
+					<tr height="30" class="th">
+						<td  align="center">{txt_personal_contacts}</td>					
+					</tr>
+					<tr height="30" class="th">
+						<td  align="right"><span id='span_contact_list'/></td>
+					</tr>
+				</table>
+			</td>
+			<td id="buttons" width="95" align="center">
+				<button type="button" onClick="ccAddGroup.addUser()"><img src="../phpgwapi/templates/celepar/images/add.png" style="vertical-align: middle;" >&nbsp;{txt_add}</button>
+				<br><br>
+				<button type="button" onClick="ccAddGroup.remUser()"><img src="../phpgwapi/templates/celepar/images/rem.png" style="vertical-align: middle;" >&nbsp;{txt_rem}</button> 
+			</td>
+			<td  align="left">
+				<table border="0" cellpadding="0" cellspacing="0">
+					<tr height="30" class="th">
+						<td  align="center">{txt_contacts_in_list}</td>					
+					</tr>
+					<tr height="30" class="th">
+						<td  align="left"><select  id="contact_in_list" multiple name="contact_in_list[]" style="width:280px" size="10"></select></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td align="center" colspan="3">
+					<br>						
+					<input title="{ccAGSave}" type="button" onclick="ccAddGroup.send();" value="{ccAGSave}" />
+					<input title="{ccAGClear}" type="button" onclick="ccAddGroup.clear();" value="{ccAGClear}" />
+					<input title="{ccAGCancel}" type="button" onclick="ccAddGroup.clear(); ccAddGroup.window.close();" value="{ccAGCancel}"/>						
+			</td>
+		</tr>
+	</table>					
+</div>
+<script type="text/javascript" src="{ccAGFile}"></script>
Index: /tags/contactcenter/1.20/templates/default/config.tpl
===================================================================
--- /tags/contactcenter/1.20/templates/default/config.tpl	(revision 285)
+++ /tags/contactcenter/1.20/templates/default/config.tpl	(revision 285)
@@ -0,0 +1,119 @@
+<!-- BEGIN header -->
+<form method="POST" action="{action_url}">
+<table border="0" align="center">
+	<tr class="th">
+		<td colspan="2"><font color="{th_text}">&nbsp;<b>{title}</b></font></td>
+	</tr>
+	<tr>
+   		<td></td>
+	</tr>
+	<tr>
+		<td colspan="2"><b>{error}</b></td>
+	</tr>
+   <tr>
+   	<td></td>
+   </tr>
+<!-- END header -->
+<!-- BEGIN body -->
+	<tr class="th">
+		<td colspan="2" align="center"><b>{lang_ContactCenter_Global_Catalogue_Setup}</b></td>
+	</tr>
+	<tr>
+   		<td></td>
+	</tr>
+	<tr class="row_off">
+		<td>{lang_Select_where_your_Global_Catalogue_is}:</td>
+		<td>
+			<select name="newsettings[cc_global_source0]">
+				<option value="sql" {selected_cc_global_source0_sql}>SQL</option>
+				<option value="ldap" {selected_cc_global_source0_ldap}>LDAP</option>
+			</select>
+		</td>
+	</tr>
+	<tr class="row_on">
+		<td>{lang_Catalog_Name}:</td>
+		<td><input name="newsettings[cc_catalog_name]" value="{value_cc_catalog_name}" size="40" /></td>
+	</tr>
+	<tr class="row_off">
+		<td>{lang_LDAP_Host}:</td>
+		<td><input name="newsettings[cc_ldap_host0]" value="{value_cc_ldap_host0}" size="40" /></td>
+	</tr>
+	<tr class="row_on">
+		<td>{lang_LDAP_Context}:</td>
+		<td><input name="newsettings[cc_ldap_context0]" value="{value_cc_ldap_context0}" size="40" /></td>
+	</tr>
+	<tr class="row_off">
+		<td>{lang_Account_DN_to_be_used_when_browsing_LDAP}:</td>
+		<td><input name="newsettings[cc_ldap_browse_dn0]" value="{value_cc_ldap_browse_dn0}" size="40" /></td>
+	</tr>
+	<tr class="row_on">
+		<td>{lang_Password_for_the_account_above_(if_any)}:</td>
+		<td><input name="newsettings[cc_ldap_pw0]" type="password" value="" size="40" /></td>
+	</tr>
+	<tr class="row_off">
+		<td>Abrir Consulta Automática :</td>
+		<td>
+			<select name="newsettings[cc_ldap_query_automatic]">
+				<option value="true" {selected_cc_ldap_query_automatic_true}>Sim</option>	
+				<option value="false" {selected_cc_ldap_query_automatic_false}>Não</option>							
+			</select>
+		</td>
+	</tr>
+  
+  <!-- <tr class="row_on">
+  	<td>{lang_objectClass_to_be_used_as_a_Contact}:</td>
+  	<td>
+  		<select name="newsettings[cc_ldap_objectclass0]">
+			<option value="op_iop" {selected_cc_ldap_objectclass0}>organizationalPerson+inetOrgPerson</option>
+      		<option value="custom" {selected_cc_ldap_objectclass0}>{lang_Custom} {lang_(Not_implemented_yet)}</option>
+      	</select>
+  </tr>
+	<tr class="row_off">
+		<td>{lang_Custom_objectClass_name}:<br>
+			<span style="font-size: 10px;">{lang_(if_your_LDAP_contact_has_multiple_objectClass_attributes,_enter_just_one!)}</span></td>
+		<td><input name="newsettings[cc_ldap_custom_objectclass0]" type="text" value="{value_cc_ldap_custom_objectclass0}" size="40"></td>
+	</tr>
+	
+	<tr class="th"><td colspan="2" align="center"><b>{lang_Custom_LDAP_objectClass_Fields_association}</b></td></tr>
+	
+	<tr class="row_on" style="font-weight: bold;">
+	<td>{lang_ContactCenter_Field}</td><td>{lang_LDAP_field}</td>
+	</tr>
+	<tr class="row_off">
+		<td>{lang_Contact_Photo}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_photo0]" value="{value_cc_ldap_ass_photo0}"></td>
+	</tr>
+	<tr>
+		<td>{lang_Contact_Alias}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_alias0]" value="{value_cc_ldap_ass_alias0}"></td>
+	</tr>
+	<tr>
+		<td>{lang_Contact_Prefix}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_prefix0]" value="{value_cc_ldap_ass_prefix0}"></td>
+	</tr>
+	<tr>
+		<td>{lang_Contact_Given_Names}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_given0]" value="{value_cc_ldap_ass_given0}"></td>
+	</tr>
+	<tr>
+		<td>{lang_Contact_Family_Names}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_family0]" value="{value_cc_ldap_ass_family0}"></td>
+	</tr>
+	<tr>
+		<td>{lang_Contact_Full_Name}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_fulln0]" value="{value_cc_ldap_ass_fulln0}"></td>
+	</tr>-->
+<!-- END body -->
+<!-- BEGIN footer -->
+	<tr class="th">
+		<td colspan="2">&nbsp;</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center">
+			<input type="submit" name="submit" value="{lang_submit}">
+			<input type="submit" name="cancel" value="{lang_cancel}">
+		</td>
+	</tr>
+</table>
+</form>
+<!-- END footer -->
Index: /tags/contactcenter/1.20/templates/default/index.tpl
===================================================================
--- /tags/contactcenter/1.20/templates/default/index.tpl	(revision 285)
+++ /tags/contactcenter/1.20/templates/default/index.tpl	(revision 285)
@@ -0,0 +1,251 @@
+<link rel="stylesheet" type="text/css" href="{cc_css}">
+<style>	
+	.special{
+		cursor:pointer;
+		cursor:hand;
+		position:relative; 
+		top:0px; 
+		left:0px;
+		color: #006699; 
+		background-color:#DCDCDC;
+	}
+</style>
+<script src="js/cc.js" type="text/javascript"></script>
+<!-- JS MESSAGES -->
+<input id="cc_msg_no_cards" type="hidden" value="{cc_msg_no_cards}">
+<input id="cc_msg_err_no_room" type="hidden" value="{cc_msg_err_no_room}">
+<input id="cc_root_dir" type="hidden" value="{cc_root_dir}">
+<input id="cc_msg_card_new" type="hidden" value="{cc_msg_card_new}">
+<input id="cc_msg_card_edit" type="hidden" value="{cc_msg_card_edit}">
+<input id="cc_msg_group" type="hidden" value="{cc_msg_group}">
+<input id="cc_msg_contact_full" type="hidden" value="{cc_msg_contact_full}">
+<input id="cc_msg_contact_qa" type="hidden" value="{cc_msg_contact_qa}">
+<input id="cc_msg_card_remove" type="hidden" value="{cc_msg_card_remove}">
+<input id="cc_msg_card_remove_confirm" type="hidden" value="{cc_msg_card_remove_confirm}">
+<input id="cc_send_mail" type="hidden" value="{cc_send_mail}">
+<input id="cc_msg_group_edit" type="hidden" value="{cc_msg_group_edit}">	
+<input id="cc_msg_group_remove" type="hidden" value="{cc_msg_group_remove}">
+<input id="cc_msg_group_remove_confirm" type="hidden" value="{cc_msg_group_remove_confirm}">
+<input id="cc_panel_search_text" type="hidden" value="{cc_panel_search}" style="cursor: pointer; cursor: hand;" onclick="javascript:ccSearch()" />
+<input id="cc_msg_close_win" type="hidden" value="{cc_msg_close_win}">
+<input id="cc_msg_import_contacts" type="hidden" value="{cc_msg_import_contacts}">
+<input id="cc_msg_export_contacts" type="hidden" value="{cc_msg_export_contacts}">
+<input id="cc_msg_expresso_info_csv" type="hidden" value="{cc_msg_expresso_info_csv}">
+<input id="cc_msg_choose_file_type" type="hidden" value="{cc_msg_choose_file_type}">
+<input id="cc_msg_outlook_express" type="hidden" value="{cc_msg_outlook_express}">
+<input id="cc_msg_outlook2k" type="hidden" value="{cc_msg_outlook2k}">
+<input id="cc_msg_expresso_default" type="hidden" value="{cc_msg_expresso_default}">
+<input id="cc_msg_choose_contacts_file" type="hidden" value="{cc_msg_choose_contacts_file}">
+<input id="cc_msg_close" type="hidden" value="{cc_msg_close}">
+<input id="cc_msg_ie_personal" type="hidden" value="{cc_msg_ie_personal}">
+<input id="cc_msg_import_fail" type="hidden" value="{cc_msg_import_fail}">
+<input id="cc_msg_export_csv" type="hidden" value="{cc_msg_export_csv}">		   
+<input id="cc_msg_automatic" type="hidden" value="{cc_msg_automatic}">
+<input id="cc_msg_importing_contacts" type="hidden" value="{cc_msg_importing_contacts}">
+<input id="cc_msg_import_finished" type="hidden" value="{cc_msg_import_finished}">
+<input id="cc_msg_invalid_csv" type="hidden" value="{cc_msg_invalid_csv}">
+<input id="cc_msg_new" type="hidden" value="{cc_msg_new}">
+<input id="cc_msg_failure" type="hidden" value="{cc_msg_failure}">
+<input id="cc_msg_exists" type="hidden" value="{cc_msg_exists}">
+<input id="cc_msg_show_more_info" type="hidden" value="{cc_msg_show_more_info}">
+<input id="cc_msg_clean" type="hidden" value="{cc_msg_clean}">
+<input id="cc_msg_choose_valid_csv" type="hidden" value="{cc_msg_choose_valid_csv}">
+<input id="cc_msg_export_error" type="hidden" value="{cc_msg_export_error}">
+<input id="cc_msg_new_email" type="hidden" value="{cc_msg_new_email}">
+<input id="cc_msg_main" type="hidden" value="{cc_msg_main}">
+<input id="cc_msg_alternative" type="hidden" value="{cc_msg_alternative}">
+<input id="cc_msg_select_email" type="hidden" value="{cc_msg_select_email}">
+<input id="cc_msg_new_phone" type="hidden" value="{cc_msg_new_phone}">
+<input id="cc_msg_home" type="hidden" value="{cc_msg_home}">
+<input id="cc_msg_cellphone" type="hidden" value="{cc_msg_cellphone}">
+<input id="cc_msg_work" type="hidden" value="{cc_msg_work}">
+<input id="cc_msg_fax" type="hidden" value="{cc_msg_fax}">
+<input id="cc_msg_pager" type="hidden" value="{cc_msg_pager}">
+<input id="cc_msg_choose_phone" type="hidden" value="{cc_msg_choose_phone}">
+<input id="cc_msg_warn_firefox" type="hidden" value="{cc_msg_warn_firefox}">
+<input id="cc_msg_firefox_half1" type="hidden" value="{cc_msg_firefox_half1}">
+<input id="cc_msg_firefox_half2" type="hidden" value="{cc_msg_firefox_half2}">
+<input id="cc_msg_click_close" type="hidden" value="{cc_msg_click_close}">
+<input id="cc_msg_install_now" type="hidden" value="{cc_msg_install_now}">
+<input id="cc_msg_install_new_firefox" type="hidden" value="{cc_msg_install_new_firefox}">
+<input id="cc_msg_close" type="hidden" value="{cc_msg_close}">
+<input id="cc_msg_outlook_express_pt" type="hidden" value="{cc_msg_outlook_express_pt}">
+<input id="cc_msg_outlook_express_en" type="hidden" value="{cc_msg_outlook_express_en}">
+<input id="cc_msg_outlook_2k_pt" type="hidden" value="{cc_msg_outlook_2k_pt}">
+<input id="cc_msg_outlook_2k_en" type="hidden" value="{cc_msg_outlook_2k_en}">
+<input id="cc_msg_moz_thunderbird" type="hidden" value="{cc_msg_moz_thunderbird}">
+<input id="cc_msg_expresso_default_csv" type="hidden" value="{cc_msg_expresso_default_csv}">
+<input id="cc_msg_copy_to_catalog" type="hidden" value="{cc_msg_copy_to_catalog}">
+<input id="cc_msg_fill_field_name" type="hidden" value="{cc_msg_fill_field_name}">
+<input id="cc_msg_add_contact_to_group" type="hidden" value="{cc_msg_add_contact_to_group}">
+
+
+ <!-- END JS MESSAGES -->
+ <input id="cc_type_contact" 	type="hidden">
+ <input id="cc_participants" 	type="hidden"  value="{cc_participants}">
+ 
+ <input id="cc_qa_alias" 		type="hidden" value="{cc_qa_alias}">
+ <input id="cc_qa_given_names" 	type="hidden" value="{cc_qa_given_names}">
+ <input id="cc_qa_family_names" type="hidden" value="{cc_qa_family_names}">
+ <input id="cc_qa_phone" 		type="hidden" value="{cc_qa_phone}">
+ <input id="cc_qa_email"		type="hidden" value="{cc_qa_email}">
+ 
+ <input id="cc_qa_save" 		type="hidden" value="{cc_qa_save}">
+ <input id="cc_qa_close"		type="hidden" value="{cc_qa_close}">
+ 
+ <input id="cc_empty" 			type="hidden"  value="{cc_empty}">
+  <!-- VIEW CARDS -->
+<table id="cc_main" width="100%" border="0" style="border: 0px solid #999;" cellpadding="1" cellspacing="1">
+	<tr width="100%">
+		<td id="cc_left" width="150px" valign="top" style="border: 0px solid #999;" height="100%">
+			<table id="cc_left_main" width="100%" height="100%" cellpadding="1" cellspacing="1" border="0">
+				<!-- __TREE -->
+				<tr>
+					<td class="th" align="center" valign="top">{cc_catalogs}</td>
+				</tr>
+				<tr>
+					<td width="150px" height="100%" align="left" valign="top"> 
+						<div id="cc_tree" style="overflow:auto;position:relative; width: 150px;border: 0px solid #999;"></div>
+					</td>
+				</tr>
+				<!-- __END TREE -->
+			</table>
+		</td>
+		<td id="cc_right" width="100%" align="center" valign="top" style="border: 0px solid #999;" height="auto">
+			<table width="100%" border="0"  cellpadding="0" cellspacing="0">
+			<!-- ___PANEL -->
+			<!--	<tr>
+					<td align="center" colspan="5">
+						<table width="100%" border="0">
+							<tr valign="top">
+								<td id="show_view_cards_tab_0" class="tab_box_active" onclick="show_view_cards_tab(0);">{cc_view_name}</td>
+								<td id="show_view_cards_tab_1" class="tab_box" onclick="show_view_cards_tab(1);">{cc_view_company}</td>
+								<td id="show_view_cards_tab_2" class="tab_box" onclick="show_view_cards_tab(2);">{cc_view_location}</td>
+							</tr>
+						</table>
+					</td>
+				</tr>-->
+				<tr align="left">
+					<td align="left">															
+					<input id="cc_button_new" onMouseOver="if(!menuStarted) menu();menu.onmouseover()" onMouseOut="menu.onmouseout()"  value="{cc_btn_new}" type="button">					
+					<div id="cc_panel_search_call" style="display: inline"></div>
+					<div id="cc_panel_table" style="display: none; text-align: right">
+					<input type="button" value="{cc_panel_table}" class="tab_box" style="cursor: pointer; cursor: hand;" onclick="javascript: ccChangeVisualization('table')" />
+					</div>
+					<div id="cc_panel_cards" style="display: inline; text-align: right">
+					<input type="button" value="{cc_panel_cards}" class="tab_box" style="cursor: pointer; cursor: hand;" onclick="javascript: ccChangeVisualization('cards')" />					
+					</div>
+					</td>
+					<td align="right">
+					<input id="cc_button_tools" value="{cc_btn_import_export}" type="button" onclick="javascript:ccIEContacts.showList()">
+					</td>
+				</tr>
+				<tr>
+					<td align="center" colspan="2">
+					<div id="cc_panel_letters" style="display:inline">
+						<table width="100%" border="0">
+							<tr valign="top">
+								<td id="cc_letter_0" class="letter_box" onclick="showCards('number', getActualPage()); selectLetter(0);">123...</td>
+								<td id="cc_letter_1" class="letter_box_active" onclick="showCards('a', getActualPage()); selectLetter(1);">A</td>
+								<td id="cc_letter_2" class="letter_box" onclick="showCards('b', getActualPage()); selectLetter(2);">B</td>
+								<td id="cc_letter_3" class="letter_box" onclick="showCards('c', getActualPage()); selectLetter(3);">C</td>
+								<td id="cc_letter_4" class="letter_box" onclick="showCards('d', getActualPage()); selectLetter(4);">D</td>
+								<td id="cc_letter_5" class="letter_box" onclick="showCards('e', getActualPage()); selectLetter(5);">E</td>
+								<td id="cc_letter_6" class="letter_box" onclick="showCards('f', getActualPage()); selectLetter(6);">F</td>
+								<td id="cc_letter_7" class="letter_box" onclick="showCards('g', getActualPage()); selectLetter(7);">G</td>
+								<td id="cc_letter_8" class="letter_box" onclick="showCards('h', getActualPage()); selectLetter(8);">H</td>
+								<td id="cc_letter_9" class="letter_box" onclick="showCards('i', getActualPage()); selectLetter(9);">I</td>
+								<td id="cc_letter_10" class="letter_box" onclick="showCards('j', getActualPage()); selectLetter(10);">J</td>
+								<td id="cc_letter_11" class="letter_box" onclick="showCards('k', getActualPage()); selectLetter(11);">K</td>
+								<td id="cc_letter_12" class="letter_box" onclick="showCards('l', getActualPage()); selectLetter(12);">L</td>
+								<td id="cc_letter_13" class="letter_box" onclick="showCards('m', getActualPage()); selectLetter(13);">M</td>
+								<td id="cc_letter_14" class="letter_box" onclick="showCards('n', getActualPage()); selectLetter(14);">N</td>
+								<td id="cc_letter_15" class="letter_box" onclick="showCards('o', getActualPage()); selectLetter(15);">O</td>
+								<td id="cc_letter_16" class="letter_box" onclick="showCards('p', getActualPage()); selectLetter(16);">P</td>
+								<td id="cc_letter_17" class="letter_box" onclick="showCards('q', getActualPage()); selectLetter(17);">Q</td>
+								<td id="cc_letter_18" class="letter_box" onclick="showCards('r', getActualPage()); selectLetter(18);">R</td>
+								<td id="cc_letter_19" class="letter_box" onclick="showCards('s', getActualPage()); selectLetter(19);">S</td>
+								<td id="cc_letter_20" class="letter_box" onclick="showCards('t', getActualPage()); selectLetter(20);">T</td>
+								<td id="cc_letter_21" class="letter_box" onclick="showCards('u', getActualPage()); selectLetter(21);">U</td>
+								<td id="cc_letter_22" class="letter_box" onclick="showCards('v', getActualPage()); selectLetter(22);">V</td>
+								<td id="cc_letter_23" class="letter_box" onclick="showCards('w', getActualPage()); selectLetter(23);">W</td>
+								<td id="cc_letter_24" class="letter_box" onclick="showCards('x', getActualPage()); selectLetter(24);">X</td>
+								<td id="cc_letter_25" class="letter_box" onclick="showCards('y', getActualPage()); selectLetter(25);">Y</td>
+								<td id="cc_letter_26" class="letter_box" onclick="showCards('z', getActualPage()); selectLetter(26);">Z</td>
+								<td id="cc_letter_27" class="letter_box" onclick="showCards('all', getActualPage()); selectLetter(27);">{cc_all}</td>
+							</tr>
+						</table>
+					</div>
+					<div id="cc_panel_search" style="display: none">
+						<table width="100%" border="0">
+							<tr valign="top">
+								<td class="letter_box" colspan="2" style="width: 10%" onclick="ccSearchHide()">123ABC...</td>
+								<td class="letter_box_active" style="text-align: center; text-valign: middle">{cc_panel_search_found}</td>
+							</tr>
+						</table>
+					</div>
+					</td>
+				</tr>
+				<tr class="th">
+					<td colspan="2">
+						<table cellpadding="0" cellspacing="0" width="100%" border="0">
+							<tr>
+								<td>
+									<table bgcolor="#D3DCE3" cellspacing="0" cellpadding="0" border="0">
+										<tr>
+											<td align="left" valign="middle"><span id="cc_panel_arrow_first"><img src="templates/default/images/first-grey.png" border="0" alt="{cc_panel_first_page}" hspace="2" onclick="javascript:false"/></span></td>
+										</tr>
+									</table>
+								</td>
+								<td width="2%" align="right" valign="center">
+									<table bgcolor="#D3DCE3" cellspacing="0" cellpadding="0" border="0">
+										<tr>
+											<td align="left" valign="middle"><span id="cc_panel_arrow_previous"><img src="templates/default/images/left-grey.png" border="0" alt="{cc_panel_previous_page}" hspace="2" onclick="" /></span></td>
+										</tr>
+									</table>
+								</td>
+								<td align="center" bgcolor="#D3DCE3" valign="center" width="92%">
+									<table bgcolor="#D3DCE3" cellspacing="0" cellpadding="0" border="0">
+										<tr>
+											<td id="cc_panel_pages"></td>
+										</tr>
+									</table>
+								</td>
+								<td width="2%" align="left" valign="center">
+									<table bgcolor="#D3DCE3" cellspacing="0" cellpadding="0" border="0">
+										<tr>
+											<td align="left" valign="middle"><span id="cc_panel_arrow_next"><img src="templates/default/images/right-grey.png" border="0" alt="{cc_panel_next_page}" hspace="2" /></span></td>
+										</tr>
+									</table>
+								</td>
+								<td width="2%" align="right" valign="center">
+									<table bgcolor="#D3DCE3" cellspacing="0" cellpadding="0" border="0">
+										<tr>
+											<td align="left" valign="middle"><span id="cc_panel_arrow_last"><img src="templates/default/images/last-grey.png" border="0" alt="{cc_panel_last_page}" hspace="2" /></span></td>
+										</tr>
+									</table>			
+								</td>
+							</tr>
+						</table>
+					</td>
+				</tr>
+				<!-- ___END PANEL -->
+				<!-- __CARDS -->				
+				<tr>
+					<td style="border: 0px solid #666;" id="cc_card_space" width="100%" height="auto" valign="top" align="center" colspan="4"></td>
+				</tr>												
+				<!-- __END CARDS -->
+			</table>
+		</td>
+	</tr>
+</table>
+	<div id="Layer1" style="position:absolute; top:178px; left:183px;width:auto; padding:2px; z-index:100000; background-color:#F2F3ED; border:1px solid #999999;visibility:hidden"></div>
+	<div id="debug_layer" style="position:absolute;width:0px;height:0px;display:none"></div>
+<!-- _END VIEW CARDS -->
+<!-- BOTTOM DETAILS-->
+<script type="text/javascript" src="js/moo.fx.js"></script>
+<script type="text/javascript" src="js/ccListParticipants.js"></script>
+<script type="text/javascript" src="js/ccQuickAddContact.js"></script>
+<script type="text/javascript" src="js/ccIEContacts.js"></script>
+<script type="text/javascript" src="js/ccMain.js"></script>
+<!-- END BOTTOM DETAILS-->						
Index: /tags/contactcenter/1.20/templates/default/full_add.tpl
===================================================================
--- /tags/contactcenter/1.20/templates/default/full_add.tpl	(revision 285)
+++ /tags/contactcenter/1.20/templates/default/full_add.tpl	(revision 285)
@@ -0,0 +1,298 @@
+{cc_api}
+
+<!-- JS MESSAGES -->
+<!--input id="cc_msg_err_empty_field" type="hidden" value="{cc_msg_err_empty_field}"-->
+<!--input id="cc_msg_type_state" type="hidden" value="{cc_msg_type_state}"-->
+<!--input id="cc_msg_type_city" type="hidden" value="{cc_msg_type_city}"-->
+<!-- END JS MESSAGES -->
+
+
+<!-- WINDOW CONTACT -->
+<iframe id="cc_photo_frame" style="position: absolute; top: 0px; left: 0px; visibility:hidden"></iframe>
+<input id="cc_contact_title" type="hidden" value="{cc_contact_title}">
+<input id="cc_contact_personal" type="hidden" value="{cc_contact_personal}">
+<input id="cc_contact_addrs" type="hidden" value="{cc_contact_addrs}">
+<input id="cc_contact_conns" type="hidden" value="{emails_telephones}">
+<input id="cc_pd_full_name" name="{cc_pd_full_name}" type="hidden">
+<input id="cc_pd_sex" name="{cc_pd_sex}" type="hidden">
+<input id="cc_addr_other" name="{cc_addr_other}" type="hidden">
+<input id="cc_addr_po_box" name="{cc_addr_po_box}" type="hidden">
+<!-- _PERSONAL DATA -->
+<div id="cc_contact_tab_0" class="row_off div_cc_contact_tab" style="left:-498;top:-347;position: absolute;visibility: hidden;height:197px">
+	<form id="cc_full_add_form_personal">
+	<input id="cc_full_add_contact_id" type="text" style="display: none">
+	<table align="center" width="498px" height="197px" class="row_off" border="0">
+		<tr class="row_off">
+			<td align="right">{cc_pd_select_photo}:</td>
+			<td align="left" colspan="2">
+				<!-- Mozilla Method -->
+				<input id="cc_pd_select_photo" type="file" accept="image/gif,image/jpeg,image/png" name="cc_pd_photo" onchange="Element('cc_pd_photo').src = 'file://'+Element('cc_pd_select_photo').value">
+				<!-- IE Method -->
+				<input id="cc_pd_select_photo_t" type="text" name="cc_pd_select_photo_t" readonly>
+				<input id="cc_pd_select_photo_b" type="button" style="width: 60px" value="{cc_pd_select_photo_b}" onclick="Element('cc_photo_frame').contentWindow.document.all['cc_photo_input'].click();">
+			</td>
+			<td align="center" colspan="2" rowspan="3"><img id="cc_pd_photo" src="templates/default/images/photo.png" border="0" width="60px" height="80px"></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_pd_alias}:</td>
+			<td align="left" colspan="2"><input id="cc_pd_alias" name="{cc_pd_alias}" type="text" style="width:175px;z-index:-1" value="" maxlength=""></td>
+		</tr>
+		<tr style="display:none" class="row_off">
+			<td align="right">{cc_pd_prefix}:</td>
+			<td align="left" colspan="2"><select id="cc_pd_prefix" name="{cc_pd_prefix}" style="width: 175px;"><option value='0'>{cc_pd_choose_prefix}</option></select></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_pd_given_names}:</td>
+			<td align="left" colspan="2"><input id="cc_pd_given_names" name="{cc_pd_given_names}" type="text" style="width: 175px;" value="" maxlength=""></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_pd_family_names}:</td>
+			<td align="left"><input id="cc_pd_family_names" name="{cc_pd_family_names}" type="text" style="width: 175px;" value="" maxlength=""></td>
+			<td align="right">{cc_pd_birthdate}:</td>
+			<td align="left">
+				<input id="cc_pd_birthdate_0" style="text-align: center;" title="{cc_pd_birthdate_0}" name="{cc_pd_birthdate_0}" type="text" maxlength="{cc_pd_birth_size_0}" size="{cc_pd_birth_size_0}">
+				<input id="cc_pd_birthdate_1" style="text-align: center;" title="{cc_pd_birthdate_1}" name="{cc_pd_birthdate_1}" type="text" maxlength="{cc_pd_birth_size_1}" size="{cc_pd_birth_size_1}">
+				<input id="cc_pd_birthdate_2" style="text-align: center;" title="{cc_pd_birthdate_2}" name="{cc_pd_birthdate_2}" type="text" maxlength="{cc_pd_birth_size_2}" size="{cc_pd_birth_size_2}">
+			</td>
+		</tr>
+		<tr style="display:none" class="row_off">
+			<td align="right">{cc_pd_suffix}:</td>
+			<td align="left" colspan="3"><select id="cc_pd_suffix" name="{cc_pd_suffix}" style="width: 175px;"><option value="0">{cc_pd_choose_suffix}</option></select></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_pd_gpg_finger_print}:</td>
+			<td colspan="3" align="left"><input id="cc_pd_gpg_finger_print" name="{cc_pd_gpg_finger_print}" type="text" style="width: 350px;" value="" maxlength=""></td>
+		</tr>
+		<tr class="row_off">
+			<td align="right">{cc_pd_notes}:</td>
+			<td colspan="3" align="left"><textarea id="cc_pd_notes" name="{cc_pd_notes}" style="width: 350px; height: 60px;"></textarea></td>
+		</tr>
+	</table>
+	</form>
+</div>
+
+<!-- _ADDRESSES -->
+<div id="cc_contact_tab_1" class="row_off div_cc_contact_tab" style="position: absolute; visibility: hidden;height:197px;">
+	<form id="cc_full_add_form_addrs">
+	<table align="center" width="498px" height="197px" border="0">
+		<tr class="row_off">
+			<td align="right">{cc_addr_types}:</td>
+			<td align="left" colspan="3">
+				<select id="cc_addr_types" name="{cc_addr_types}" style="width: 200px;" onchange="updateAddressFields()">
+					<option value="_NONE_">{cc_addr_choose_types}</option>
+				</select>
+			</td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_addr_countries}:</td>
+			<td align="left" colspan="3">
+				<select id="cc_addr_countries" name="{cc_addr_countries}" style="width: 200px;" onchange="updateAddrStates()">
+					<option value="_NONE_">{cc_addr_choose_countries}</option>
+					{cc_addr_country_list}
+				</select>
+			</td>
+		</tr>
+		<tr class="row_off">
+			<td align="right">{cc_addr_states}:</td>
+			<td align="left" colspan="3">
+				<select id="cc_addr_states" name="{cc_addr_states}" style="width: 200px;" onchange="updateAddrCities();">
+					<option value="_NONE_">{cc_addr_choose_states}</option>
+				</select>
+				<input id="cc_addr_states_new" style="display:none;width: 150px;" type="text" onmouseover="updateAddrNewStateOnMouseOver();" onmouseout="updateAddrNewStateOnMouseOut();">
+			</td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_addr_cities}:</td>
+			<td align="left" colspan="3">
+				<select id="cc_addr_cities" style="width: 200px;" onchange="updateAddrFillingFields();">
+					<option value="_NONE_">{cc_addr_choose_cities}</option>
+				</select>
+				<input id="cc_addr_cities_new" style="display:none;width: 150px;" type="text" onmouseover="updateAddrNewCityOnMouseOver();" onmouseout="updateAddrNewCityOnMouseOut();">
+			</td>
+		</tr>
+		<tr class="row_off">
+			<td align="right">{cc_addr_1}:</td>
+			<td align="left"><input id="cc_addr_1" name="{cc_addr_1}" style="width: 200px;" type="text" name="" value=""></td>
+			<td align="right">{cc_addr_complement}:</td>
+			<td align="left"><input id="cc_addr_complement" name="{cc_addr_complement}" style="width: 100px;" type="text" name="" value=""></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_addr_2}:</td>
+			<td align="left"><input id="cc_addr_2" name="{cc_addr_2}" style="width: 200px;" type="text" name="" value=""></td>
+			<td align="right">{cc_addr_postal_code}:</td>
+			<td align="left"><input id="cc_addr_postal_code" name="{cc_addr_postal_code}"style="width: 70px;" type="text" name="" value=""></td>
+		</tr>
+		<tr class="row_off">
+			<td align="right">{cc_addr_is_default}:</td>
+			<td colspan="3" align="left"><input id="cc_addr_is_default" type="checkbox" name=""></td>
+		</tr>
+		<tr style="visibility: hidden; position: absolute;">
+			<td><input id="cc_addr_id" type="hidden"></td>
+		</tr>
+	</table>
+	</form>
+</div>
+
+<!-- _CONNECTIONS -->
+<div id="cc_contact_tab_2" class="row_off div_cc_contact_tab" style="position: absolute; visibility: hidden;height:247px;width:498px">
+	<table align="left" width="100%"  height="247px" border=0>
+	<tbody>
+		<tr class="th" width="100%" align="center" height="10px">
+			<td width="60px" noWrap><input type="radio"  name="cc_conn_type" id="cc_conn_type_1" value="Email" onclick="javascript:updateConnFields();">{email}</td>
+			<td width="60px" noWrap><input type="radio" name="cc_conn_type" id="cc_conn_type_2" value="Telefone" onclick="javascript:updateConnFields();">{telephone}</td>
+			<td width="*" align="left"><select style="width:160px" id="cc_conn_type_sel" onchange="javascript:connAddNewLine();"><option value="-1">{choose_email_telephone}</option></select></td>
+		</tr>
+		<tr class="row_off">			
+			<td valign="top" colspan="4" width="100%" style="border: 0px solid black" cellpadding="0" cellspacing="0">
+				<table align="left" width="100%" style="border: 0px solid black">
+				<tbody id="cc_conn">&nbsp;
+					<!-- Code inside here is inserted dynamically -->
+				</tbody>				
+				</table>
+			</td>
+		</tr>
+	</tbody>
+	<tbody>
+		<tr>
+			<td align="center" colspan="4">&nbsp;</td>
+		</tr>
+	</tbody>
+	</table>
+	<div style="z-index:10000;position: absolute;display:none; top: 170px; left: 78px;" id="div_cc_conn_is_default"> {cc_default} &nbsp;<select id="cc_email_default" name="cc_email_default" disabled style="display:none"></select><select id="cc_phone_default" name="cc_phone_default" disabled style="display:none"></select></div>
+</div>
+<!-- _BOTTOM BUTTONS -->
+<div align="center" id="cc_contact_tab_buttons" style="position: absolute; visibility: hidden; top: 250px; left: 0px; width: 498px; height: 32px; border: 0px solid black">	
+	<table class="row_off" align="center" width="498px" cellpadding="2" cellspacing="0" border="0">
+		<tr>
+			<td align="center">
+				<input id="cc_contact_save" style="width: 100px;" type="button" value="{cc_contact_save}" onclick="javascript:postFullAdd();">
+				<input id="cc_contact_reset" style="width: 100px;" type="button" value="{cc_contact_reset}" onclick="javascript:resetFullAdd();">
+				<input id="cc_contact_cancel" style="width: 100px;" type="button" value="{cc_contact_cancel}" onclick="javascript:closeFullAdd();">
+			</td>
+		</tr>
+	</table>
+</div>
+
+<script type="text/javascript">
+<!--
+//	Overloading some methods for fix cursor problem in Firefox.
+	if(!is_ie) { 
+		dJSWin.prototype.close = function() {		
+			dJSWin.state = 0;
+			dd.elements[this.title.id].hide();
+			if ( dd_div = document.getElementById('divScrollMain'))	
+				Element("divScrollMain").style.overflow = 'auto';	
+		}
+		dJSWin.prototype.open = function() {
+			this.moveTo(window.innerWidth/2 + window.pageXOffset - dd.elements[this.title.id].w/2,
+			    window.innerHeight/2 + window.pageYOffset - dd.elements[this.clientArea.id].h/2);
+			dd.elements[this.title.id].maximizeZ();
+			dd.elements[this.title.id].show();
+			if ( dd_div = document.getElementById('divScrollMain'))
+				dd_div.style.overflow = 'hidden';
+		}
+	}	
+		
+	var fullAdd_onload = document.body.onload;
+	var tabs;
+	var fullAddWin;
+	var photo_frame, photo_form, photo_input;	
+
+	__f = function(e)
+	{
+		
+		tabs = new dTabsManager({'id': 'cc_contact_tab', 'width': '500px'});
+		
+		tabs.addTab({'id': 'cc_contact_tab_0', 
+					 'name': Element('cc_contact_personal').value, 
+					 'selectedClass': 'tab_box_active', 
+					 'unselectedClass': 'tab_box'});
+					 
+		tabs.addTab({'id': 'cc_contact_tab_2', 
+					 'name': Element('cc_contact_conns').value, 
+					 'selectedClass': 'tab_box_active', 
+					 'unselectedClass': 'tab_box'});
+
+		tabs.addTab({'id': 'cc_contact_tab_1', 
+					 'name': Element('cc_contact_addrs').value, 
+					 'selectedClass': 'tab_box_active', 
+					 'unselectedClass': 'tab_box'});					 
+
+		fullAddWin = new dJSWin({'id': 'cc_full_add',
+		                         'content_id': 'cc_contact_tab',
+					 'win_class': 'row_off',
+					 'width': '500px',
+					 'height': '273px',
+					 'title_color': '#3978d6',
+					 'title': Element('cc_contact_title').value,
+					 'title_text_color': 'white',
+					 'button_x_img': Element('cc_phpgw_img_dir').value+'/winclose.gif',
+					 'include_contents': new Array('cc_contact_tab_0', 'cc_contact_tab_1', 'cc_contact_tab_2','cc_contact_tab_buttons'),
+					 'border': true});
+
+		fullAddWin.draw();		
+		 				
+		if (is_ie)
+		{
+			Element('cc_photo_frame').src = 'cc_photo_frame.html';
+			Element('cc_pd_select_photo').style.display='none';
+			fullAddWin.open();
+			tabs._showTab('cc_contact_tab_0');
+			fullAddWin.close();
+		}
+		else
+		{
+			Element('cc_pd_select_photo_t').style.display='none';
+			Element('cc_pd_select_photo_b').style.display='none';			
+		}
+		
+	};
+
+	if (is_ie) // || is_moz1_6)
+	{
+			
+		document.body.onload = function(e) { setTimeout('__f()', 10); fullAdd_onload ? setTimeout('fullAdd_onload()'): false;};
+	}
+	else
+	{
+//		__f();
+	}
+
+//-->
+</script>
+<!-- END WINDOW CONTACT -->
+
+
+
+
+
+
+
+
+
+
+<!-- RELATIONS 
+<div id="cc_contact_tab_3" class="row_off div_cc_contact_tab">
+	<table align="center" width="500px" height="100%" cellpadding="2" cellspacing="0" border="0">
+		<tr class="row_off">
+			<td align="right"><input style="width: 240px;" type="text"></td>
+			<td align="left"><input style="width: 150px;" type="button" value="{cc_btn_search}"></td>
+		</tr>
+		<tr class="row_on">
+			<td align="left">{cc_results}:</td>
+			<td align="left">{cc_is_my}:</td>
+		</tr>
+		<tr class="row_off">
+			<td align="right"><select style="width: 240px; height: 150px;" multiple></select></td>
+			<td align="left"><select id="cc_rels_type" style="width: 240px; height: 150px;" multiple></select></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right"><input style="width: 150px;" type="button" value="{cc_add_relation}"></td>
+			<td align="left"><input style="width: 150px;" type="button" value="{cc_del_relation}"></td>
+		</tr>
+		<tr class="row_off">
+			<td align="center" colspan="2"><select style="width: 480px; height: 120px;" multiple></select></td>
+		</tr>
+	</table>
+</div>
+-->
Index: /tags/contactcenter/1.20/templates/default/views.tpl
===================================================================
--- /tags/contactcenter/1.20/templates/default/views.tpl	(revision 2)
+++ /tags/contactcenter/1.20/templates/default/views.tpl	(revision 2)
@@ -0,0 +1,83 @@
+<!-- LAYER VIEWS -->
+<!--
+<div id="cc_layer_views" style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; visibility: hidden; z-index: 0; border: 0px solid #999;">
+<table width="100%" height="100%" border="0">
+	<tr>
+		<td align="center" valign="top">
+			<table id="" cellpadding="3" cellspacing="2" border="0">
+				<tr class="th">
+					<td>Stage 1: Edit Name</td>
+					<td>Select View</td>
+					<td colspan="2">Type Of Catalogue</td>
+				</tr>
+				<tr class="row_on">
+					<td><input style="width: 150px;" type="text" value=""></td>
+					<td><select style="width: 150px;"><option>Choose a View...</option></select></td>
+					<td colspan="2"><select style="width: 150px;"><option>Choose a Catalogue...</option></select></td>
+				</tr>
+				<tr class="th">
+					<td colspan="4">Stage 2: Criteria Of Search</td>
+				</tr>
+				<tr class="row_on">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Criteria...</option></select></td>
+					<td><input style="width: 150px;" type="text"></td>
+					<td>and</td>
+				</tr>
+				<tr class="row_off">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Criteria...</option></select></td>
+					<td><input style="width: 150px;" type="text"></td>
+					<td>and</td>
+				</tr>
+				<tr class="row_on">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Criteria...</option></select></td>
+					<td><input style="width: 150px;" type="text"></td>
+					<td>and</td>
+				</tr>
+				<tr class="row_off">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Criteria...</option></select></td>
+					<td colspan="2"><input style="width: 150px;" type="text"></td>
+				</tr>
+				<tr class="th">
+					<td colspan="4">Stage 3: Select Colums</td>
+				</tr>
+				<tr class="row_on">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td colspan="2"><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+				</tr>
+				<tr class="row_off">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td colspan="2"><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+				</tr>
+				<tr class="th">
+					<td colspan="4">Stage 4: Visibility</td>
+				</tr>
+				<tr class="row_on">
+					<td colspan="4"><label><input type="radio" id="radio_visibility_1" name="radio_visibility">This model of exhibition could be had access by all the users</label></td>
+				</tr>
+				<tr class="row_off">
+					<td colspan="4"><label><input type="radio" id="radio_visibility_2" name="radio_visibility" checked>This model of exhibition could be had access only by me</label></td>
+				</tr>
+				<tr class="th"><td colspan="4">&nbsp;</td></tr>
+				<tr>
+					<td align="left">
+						<input type="button" value="Save">
+					</td>
+					<td colspan="2"></td>
+					<td align="right">
+						<input type="button" value="Cancel" onclick="set_loading('show_layer(\'cc_layer_view_cards\')');">
+					</td>
+				</tr>
+			</table>
+		</tr>
+	</table>
+</div>
+-->
+<!-- LAYER VIEWS -->
+
+
Index: /tags/contactcenter/1.20/templates/default/contacts.tpl
===================================================================
--- /tags/contactcenter/1.20/templates/default/contacts.tpl	(revision 2)
+++ /tags/contactcenter/1.20/templates/default/contacts.tpl	(revision 2)
@@ -0,0 +1,132 @@
+<script type="text/javascript" src="{cc_js_contacts}"></script>
+<script type="text/javascript" src="{cc_js_wz_dragdrop}"></script>
+
+<div id="cc_email_win_title" style="position:absolute; width: 500px; height: 20px; visibility: hidden; z-index: 0; border: 1px solid #999; font-weight: bold; border-bottom: 0px;" class="th">
+	<table border="0" width="100%" height="100%" cellpadding="2" cellspacing="0">
+        <tr>
+			<td align="left" valign="top" width="99%">{cc_email_win_title}</td>
+			<td align="center" valign="top" width="1%">
+				<img id="cc_email_win_close" alt="{cc_search_close}" src="{phpgw_img_dir}/winclose.gif" width="16px" height="16px" onclick="dd.elements.cc_email_win_title.hide();" 
+				style="cursor: pointer; cursor: hand;">
+			</td>
+		</tr>
+	</table>																					
+</div>
+
+<div id="cc_email_win" style="position: absolute; width: 500px; height: 400px; visibility: hidden; z-index: 0; border: 1px solid #999; border-top: 0px; background-color: #eee;">
+	<table border="0" width="100%" height="100%">
+		<tr>
+			<td>
+				<table border="0">
+					<tr>
+						<td>{cc_label_catalogue_type}</td>
+						<td>{cc_label_ordinance_type}</td>
+					</tr>
+					<tr>
+						<td><select id="cc_email_win_catalogues" style="width: 200px;" onchange="javascript:catalogue_change();"><option>{cc_choose_catalogue}</option></select></td>
+						<td><select id="cc_email_win_ordinances" style="width: 200px;" onchange="javascript:ordinance_change();"><option>{cc_choose_ordinance}</option></select></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<table border="0" width="100%">
+					<tr>
+						<td valign="top">
+							<table border="0">
+								<tr>
+									<td>{cc_label_contacts}</td>
+								</tr>
+								<tr>
+									<td><select id="cc_email_win_contacts" style="width: 200px; height: 230px; overflow: auto;" multiple></select></td>
+								</tr>
+							</table>
+						</td>
+						<td valign="top">
+							<table border="0" width="100%" height="100%">
+								<tr>
+									<td></td>
+									<td>{cc_label_to}</td>
+								</tr>
+								<tr>
+									<td align="center" valign="middle">
+										<table border="0">
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_to_add}" onclick="javascript:contacts_to_to();"></td></tr>
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_to_del}" onclick="javascript:contacts_to_to();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_to" style="width: 200px; height: 60px;" multiple></select></td>
+								</tr>
+								<tr>
+									<td></td>
+									<td>{cc_label_cc}</td>
+								</tr>
+								<tr>
+									<td align="center">
+										<table valign="middle" border="0">
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_cc_add}" onclick="javascript:contacts_to_cc();"></td></tr>
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_cc_del}" onclick="javascript:contacts_to_cc();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_cc" style="width: 200px; height: 60px;" multiple></select></td>
+								</tr>
+								<tr>
+									<td></td>
+									<td>{cc_label_cco}</td>
+								</tr>
+								<tr>
+									<td align="center" valign="middle">
+										<table border="0">
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_cco_add}" onclick="javascript:contacts_to_cco();"></td></tr>
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_cco_del}" onclick="javascript:contacts_to_cco();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_cco" style="width: 200px; height: 60px;" multiple></select></td>
+								</tr>								
+							</table>
+						</td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<table width="100%" border="0">
+					<tr align="center">
+						<td width="10%"><input style="width: 70px;" type="button" value="{cc_btn_search}" onclick="javascript:search();"></td>
+						<td width="10%"><input style="width: 70px;" type="button" value="{cc_btn_new}" onclick="javascript:new_contact();"></td>
+						<td width="10%"><input style="width: 70px;" type="button" value="{cc_btn_details}" onclick="javascript:details();"></td>
+						<td width="50%">&nbsp;</td>
+						<td width="10%"><input style="width: 70px;" type="button" value="{cc_btn_ok}" onclick="javascript:ok();"></td>
+						<td width="10%"><input style="width: 70px;" type="button" value="{cc_btn_cancel}" onclick="javascript:cancel();"></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+	</table>
+</div>
+
+<div id="cc_email_win_shadow" style="position: absolute; width: 500px; height: 420px; visibility: hidden; z-index: 0; background-color: #666;">
+
+<!-- BOTTOM DETAILS-->
+<script type="text/javascript">
+  	SET_DHTML(	'cc_email_win'+NO_DRAG,
+				'cc_email_win_shadow'+NO_DRAG,
+				'cc_email_win_title'+CURSOR_MOVE);
+			
+	dd.elements.cc_email_win_title.addChild(dd.elements.cc_email_win);
+	dd.elements.cc_email_win_title.addChild(dd.elements.cc_email_win_shadow);
+
+	dd.elements.cc_email_win_title.moveTo(0,0);
+	dd.elements.cc_email_win.moveTo(0,20);
+	dd.elements.cc_email_win_shadow.moveTo(5,5);
+	dd.elements.cc_email_win_title.moveTo(window.innerWidth/2 - dd.elements.cc_email_win_title.w/2, window.innerHeight/2 - dd.elements.cc_email_win.h/2);
+
+	dd.elements.cc_email_win.setZ(2);
+	dd.elements.cc_email_win_title.setZ(2);
+	dd.elements.cc_email_win_shadow.setZ(1);
+
+	dd.elements.cc_email_win_title.show();
+</script>
+<!-- END BOTTOM DETAILS-->
