Index: anches/2.2/reports/docs/README.institutional_accounts.txt
===================================================================
--- /branches/2.2/reports/docs/README.institutional_accounts.txt	(revision 3471)
+++ 	(revision )
@@ -1,19 +1,0 @@
-
-
-On the file /etc/postfix/main.cf complete the above line:
-
-virtual_alias_maps = ..., ldap:institutionalAccounts
-
-
-And include block too:
-
-# Institutional Accounts
-institutionalAccounts_server_host   	= ldap://ldap.foo.com
-institutionalAccounts_version       	= 3
-institutionalAccounts_timeout       	= 10
-institutionalAccounts_chase_referral	= 0 
-institutionalAccounts_search_base   	= <YOUR_BASE_DN>
-institutionalAccounts_query_filter  	= (&(mail=%s)(phpgwAccountType=i)(objectClass=phpgwAccount)(accountStatus=active))
-institutionalAccounts_domain        	= hash:/etc/postfix/expresso-dominios
-institutionalAccounts_result_attribute  = mailForwardingAddress
-institutionalAccounts_bind      		= no
Index: anches/2.2/reports/docs/passos para instalacao do mudulo.txt
===================================================================
--- /branches/2.2/reports/docs/passos para instalacao do mudulo.txt	(revision 3666)
+++ 	(revision )
@@ -1,19 +1,0 @@
-PASSO A PASSO, PARA CONFIGURAR UM MODULO NO EXPRESSO ADMIN.
-
-1) CRIAR A ESTRUTURA SUGERIDA NO EXPRESSO.ORG
-
-2) NA PASTA SETUP, CRIAR O ARQUIVO setup.inc.php
-
-3) CONFIGURAR O ARQUIVO, POIS ESTE ARQUIVO SERA O INI DE SEU MODULO, APARECENDO NA INSTALAÇÃO DO SETUP DO EXPRESSO.
-
-4) CRIAR O ARQUIVO DE HOOK NA PASTA "inc", no nosso casso o hook_admin.inc.php
-
-5) criar o seu aplicativo no arquivo de hook do sistema na pasta "admin/inc/class.uiconfig.inc.php", casso precise de algo a mais para o seu modulo crirar um if no mesmo arquivo.
-
-6) crie suas frases para o dicionario de linguagens, na pasta setup do seu modulo, arquivo phpgw_pt-br.lang;
-
-7)executar o insert no banco, para o expresso admin ter permisão em seu modulo:"insert into phpgw_expressoadmin_apps (manager_lid,context,app) values ('expresso-admin','dc=mt,dc=gov,dc=br','reports')";
-
-8) No expresso entre com aconta do expresso-admin, e de permissão nos grupos de usuarios, para o seu modulo.
-
-
Index: anches/2.2/reports/docs/change_log.txt
===================================================================
--- /branches/2.2/reports/docs/change_log.txt	(revision 3471)
+++ 	(revision )
@@ -1,100 +1,0 @@
-Esse arquivo descreve todas as correções, alterações e novas implementações do 
-módulo ExpressoAdmin 1.2, e a partir da versão 12/02/2007 [1.2]
-Joao Alfredo Knopik Junior.
-
-02/07/2007 - [1.222]
-- Adicionado suporte ao espanhol.
-
-27/02/2007 - [1.21]
-- Implementada funcionalidade que permite renomeação de usuários (cyrus, ldap, etc);
-IMPORTANTE: Essa funcionalidade só irá funcionar para a versão 2.2 do Cyrus, que está no
-Repositorio STABLE (pacote imapd-2.2 ).
-
-
-05/03/2007 - [1.22]
-- O gerenciamento (adição, edição, exclusão) de Listas não estava logando suas operações. Agora
-está OK.
-
-06/03/2007
-- O gerenciamento (adição, edição, exclusão) de Grupos não estava logando suas operações. Agora
-está OK.
-
-13/03/2007
-- Criado as opções "Concatenar domínio default na sugestão do email" e "Usar restrições na criação dos grupos"
-nas configurações globais do módulo.
-- Renomeação permitida apenas para cyrus 2.2 ou superior.
-
-19/03/2007 - [1.221]
-- Corrigido bug que, ao salvar um usuário, apagava os seguintes atributos: telefone, mailalternataddress e 
-mailforwardingaddress.
-- Bugs relacionados a problemas de segurança. Um gerente poderia alterar um atributo, mesmo ele não tendo acesso,
-utilizando o DOM Inspector para modificar as propriedade disabled dos campos.
-
-20/03/2007
-- Melhorado Logs das ações realizados nos grupos.
-
-21/03/2007
-- Permitido criação de grupos inciados por "smb-" para grupos samba.
-
-29/03/2007
-- Corrigido bug que retirava aplicações de usuário e grupos se o gerente não tivesse
-acessa a esta aplicação.
-
-10/04/2007
-- Corrigido bug ao deletar um participante da lista de email, onde não se acha o email
-deste participante.
-
-26/04/2007
-- Criado nova função get_organizations() em class.functions.inc.php, com melhor performance.
-- Melhorado exibição de usuários e listas na adição/edição de listas de emails.
-	- Criado nova função get_available_users_and_maillist em class.ldap_functions.inc.php para isto.
-- Cria uma SCL para as listas no expresso. Com isto é possível "liberar" envio para listas para alguns usuários.
-
-02/05/2007
-- Implementado opção para restrição de nomes (logins) para listas.
-- Implementado restrição de criação de contas/listas/grupos com nomes
-de contas/grupos de sistemas. Ex: root, amanda, etc ...
-
-08/05/2007
-- Melhorado performance ao editar listas e grupos.
-
-22/05/2007 - [1.240]
-- Criado possibilidade de administrar diversos domínios samba
-
-29/05/2007
-- Ao renomear um usuário, seu sieve script também é renomeado.
-
-01/06/2007
-- Corrigido bug ao editar usuários sem nenhum grupo.
-- Retirado códigos de chamada a funão get_sectors (depreciada).
-- Criado acl view_user (pode apenas ver informações, sem editar).
-- Retirado códigos de chamada ao manage_wf_sectors (depreciado).
-
-04/06/2007
-- Permitido ocultar setores.
-
-14/06/2007
-- Melhorado exibição de grupos e listas na inclusão/edição de usuários
-(muito mais rápido agora).
-- Melhorado exibição dos domínios samba:
-	- deixa a opção desmarcado caso não existe nenhum sambaDomain na OU.
-	- Seleciona automaticamente o sambaDomain da OU.
-
-03/07/2007 - [1.240]
-- Corrigido problema na atualização do módulo usando o SETUP.
-
-09/08/2007
-- Corrigido bug ao adicionar email em grupos
-- Corrigido bug ao adicionar atributos samba a um usuários já existente.
-
-14/08/2007
-- Criado aba Informações Corporativas, com os campo employeeNumber, cpf, rg, rgUf
-- Melhorado classe user.inc.php.
-
-20/08/2007
-- Criado maneira de esconder abas de gerentes que não podem acessa-las.
-- Criado maneira de obter o nextID number de outro Banco de Dados.
-- Criado possibilidade de copiar um gerente.
-
-21/08/2007
-- Adicionado suporte para o gerente administrar 1 ou mais OU's.
Index: anches/2.2/reports/js/jscode/menu.js
===================================================================
--- /branches/2.2/reports/js/jscode/menu.js	(revision 3471)
+++ 	(revision )
@@ -1,877 +1,0 @@
-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: anches/2.2/reports/js/jscode/cc.js
===================================================================
--- /branches/2.2/reports/js/jscode/cc.js	(revision 3471)
+++ 	(revision )
@@ -1,2573 +1,0 @@
-  /******************************************************************************\
-  * 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,'bo_people_catalog');
-}
-function editSharedContact (id){
-	openFullAdd();
-	populateFullEdit(id,'bo_shared_people_manager');
-}
-/************ Edit Group *************/
-function editGroup(id){
-	populateEditGroup(id);	
-}
-
-function editSharedGroup(id,shared){
-	populateEditSharedGroup(id, shared);	
-}
-
-/*
-	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,catalog)
-{
-	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 + "&catalog="+catalog, 'GET', handler);
-}
-
-function populateEditGroup (id)
-{
-	populateEditSharedGroup(id,false);
-}
-
-function populateEditSharedGroup(id,shared) {
-	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']) {		
-			Element('title').value =  data['title'];
-			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;
-				}		
-			}
-		}
-				
-		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);				
-	if(!shared)
-		Connector.newRequest('populateEditGroup', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_group&id='+id, 'GET', handler);
-	else
-		Connector.newRequest('populateEditGroup', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_group&id='+id+'&shared_from='+shared, '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' || type == 'shared_groups')
-		return populateGroupsInCards(data,type);
-	
-	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];
-								}
-								if(data[3][pos][9])
-									Element(id+':'+data[2][k]).innerHTML += "<br><span style='margin-left:30px'><font size='-2' color='#808080'><i>"+data[3][pos][9]+"</i></font></span>";	
-								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 account_type = data[3][pos][k];
-															
-								if( !account_type)
-									break;
-																																																					
-								Element(id+':cc_icon_group').innerHTML =  '<span title="'+Element('cc_participants').value+'"  onmouseout="window.status=\'\';" onclick="ccListParticipants.showList(\''+ Element(id+':cc_id').value + '\',null,null,null,\''+account_type+'\');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 (type == "shared_contacts") {
-					if (data[3][pos][8] & 4) 
-						eval("document.getElementById(id + ':cc_card_edit').onclick = function(){editSharedContact(Element('"+id+"' + ':cc_id').value);};");
-					else 
-						document.getElementById(id + ':cc_card_edit').onclick = function(){
-							alert(Element('cc_msg_not_allowed').value);
-						};
-					if (data[3][pos][8] & 8) 
-						eval("document.getElementById(id + ':cc_card_remove').onclick = function(){removeEntry(Element('" + id + "' + ':cc_id').value);};");
-					else 
-						document.getElementById(id + ':cc_card_remove').onclick = function(){
-							alert(Element('cc_msg_not_allowed').value);
-						};
-				}
-				
-				
-				
-				if (--ncards == 0)
-				{
-					j = CC_max_cards[0];
-					i = CC_max_cards[1];
-				}
-	
-				pos++;
-			}
-		}
-	}
-}
-
-function populateGroupsInCards(data,type)
-{	
-	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];
-								}
-								if(data[3][pos][5])
-									Element(id+':'+data[2][k]).innerHTML += "<br><span style='margin-left:30px'><font size='-2' color='#808080'><i>"+data[3][pos][5]+"</i></font></span>";
-								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]+'::'+data[3][pos][6] +'\')">'+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][6] ? '::'+data[3][pos][6] : "") + '\')">'+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 (type == "shared_groups") {
-					
-					if (data[3][pos][4] & 4)
-						eval("document.getElementById(id + ':cc_card_edit').onclick = function(){editSharedGroup(Element('"+id+"' + ':cc_id').value,"+data[3][pos][7]+");};");
-					else 
-						document.getElementById(id + ':cc_card_edit').onclick = function(){	alert(Element('cc_msg_not_allowed').value); };
-										
-					if (data[3][pos][4] & 8) 
-						eval("document.getElementById(id + ':cc_card_remove').onclick = function(){removeEntry(Element('" + id + "' + ':cc_id').value,'groups');};");
-					else 
-						document.getElementById(id + ':cc_card_remove').onclick = function(){
-							alert(Element('cc_msg_not_allowed').value);
-						};
-				}				
-				
-				
-				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' || type == 'shared_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);">' +
-				'<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+'\'" 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>';
-		
-		}
-		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);">' + 
-						( 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>';
-		}
-	
-
-	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' || type == 'shared_groups') {
-				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+'\'"  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>';
-						
-			
-			}
-			else {
-				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+'\'" 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>';
-			}
-
-	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' && type !='shared_contacts' && type !='shared_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' && type !='shared_contacts' && type !='shared_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);
-	}
-
-function dataaqui(){
-	var mydate=new Date()
-	var year=mydate.getYear()
-	if (year < 1000)
-		year+=1900
-	var day=mydate.getDay()
-	var month=mydate.getMonth()+1
-	if (month<10)
-		month="0"+month
-	var daym=mydate.getDate()
-	if (daym<10)
-		daym="0"+daym
-	document.write("<small><font color='000000' face='Arial'><b>"+daym+"/"+month+"/"+year+"</b></font></small>")
-}
-
-	
Index: anches/2.2/reports/js/jscode/menujs.js
===================================================================
--- /branches/2.2/reports/js/jscode/menujs.js	(revision 3471)
+++ 	(revision )
@@ -1,22 +1,0 @@
-var Aberto = "";
-var Fechado = "";
-
-	function preload(){
-		if(document.images){
-			Aberto = new Image(10,7)
-			Fechado = new Image(10,7)
-			Aberto.src = "./templates/default/images/mais.png"
-			Fechado.src = "./templates/default/images/menos.png"	
-		}
-	}
-
-	function mostra(item,item2){
-		if (item.style.display=='none'){
-			item.style.display='';
-			item2.src=Fechado.src	
-		}else{
-			item.style.display='none'
-			item2.src=Aberto.src
-		}
-	}	
-preload();
Index: anches/2.2/reports/js/modal/css/modal_fx.css
===================================================================
--- /branches/2.2/reports/js/modal/css/modal_fx.css	(revision 3471)
+++ 	(revision )
@@ -1,160 +1,0 @@
-#lightbox{
-	background-color:#eee;
-	padding: 10px;
-	border-bottom: 2px solid #666;
-	border-right: 2px solid #666;
-}
-
-#lightboxCaption {
-	font-size: 1.8em;
-	text-align: center;
-	border-bottom: 2px solid #666;
-	
-	position: relative;
-	width: 100%;
-	height: auto;
-	top: 0;
-	right: 0;
-	bottom: auto;
-	left: 0;
-}
-
-#lightboxContent {
-	position:relative;
-	top:0pt;
-	left:0pt;
-	right:0pt;
-	width:auto;
-	overflow: auto;
-}
-
-#lightboxFoot {
-	border-top:2px solid #666666;
-	position:relative;
-	text-align:left;
-	top:0pt;
-	width:100%;
-}
-
-#keyboardMsg{ float: right; }
-
-#closeButton{ top: 5px; right: 5px; }
-
-#lightbox img{ border: none; clear: both;} 
-
-#overlay img{ border: none; }
-
-#overlay{
-	background: url(../images/overlay.png);
-}
-
-#divStatusBar{
-	height:22px;
-}
-
-.info_msg {
-	font-family: Arial, sans-serif, Helvetica, Verdana;
-	font-size: 13px;
-	border-width: 0px 0px 0px 0px;
-	padding: 1px 10px 0px 10px;	
-	border-style: inset inset inset inset;
-	border-color: gray gray gray gray;
-	background-color: rgb(250, 209, 99);
-	-moz-border-radius: 6px 6px 6px 6px;
-}
-
-.error_msg {
-	font-family: Arial, sans-serif, Helvetica, Verdana;
-	font-size: 13px;
-	font-weight: bold;
-	color: rgb(255, 255, 255);
-	background-color: rgb(240, 0, 0);
-	border-width: 0px 0px 0px 0px;
-	padding: 1px 10px 0px 10px;	
-	border-style: inset inset inset inset;
-	border-color: gray gray gray gray;
-	-moz-border-radius: 6px 6px 6px 6px;
-}
-
-/* NORMAL - yellow */
-/* superior esquerdo */
-.zIVQRb_normal {
-	background:transparent url(../images/rc_normal.png) no-repeat scroll 0pt 0pt;
-}
-
-/* superior direito */ 
-.Qrjz3e_normal {
-	background:transparent url(../images/rc_normal.png) no-repeat scroll -4px 0pt;
-}
- 
-/* inferior esquerdo */ 
-.Gbtri_normal {
-	background:transparent url(../images/rc_normal.png) no-repeat scroll 0pt -4px;
-}
-
-/* inferior direito */
-.gmNpMd_normal {
-	background:transparent url(../images/rc_normal.png) no-repeat scroll -4px -4px;
-}
-
-/* linha do meio, entre os cantos */
-.Ptde9b_normal {
-	background:#FFF1A8 none repeat scroll 0%;
-	color:#FFFFFF;
-}
-
-/* Conteudo */
-.m14Grb_normal {
-	color: black;
-	background: #FFF1A8;
-	font-size:80%;
-	font-weight:bold;
-	font-family: arial,sans-serif;
-	padding:0pt 5px;
-	text-align:center;
-}
-
-/* ERROR - red */
-/* superior esquerdo */
-.zIVQRb_error {
-	background:transparent url(../images/rc_error.png) no-repeat scroll 0pt 0pt;
-}
-
-/* superior direito */ 
-.Qrjz3e_error {
-	background:transparent url(../images/rc_error.png) no-repeat scroll -4px 0pt;
-}
- 
-/* inferior esquerdo */ 
-.Gbtri_error {
-	background:transparent url(../images/rc_error.png) no-repeat scroll 0pt -4px;
-}
-
-/* inferior direito */
-.gmNpMd_error {
-	background:transparent url(../images/rc_error.png) no-repeat scroll -4px -4px;
-}
-
-/* linha do meio, entre os cantos */
-.Ptde9b_error {
-	background:#CC0000 none repeat scroll 0%;
-	color:#FFFFFF;
-}
-
-/* Conteudo */
-.m14Grb_error {
-	color: white;
-	background: #cc0000;
-	font-size:80%;
-	font-weight:bold;
-	font-family: arial,sans-serif;
-	padding:0pt 5px;
-	text-align:center;
-}
-
-/* todas os cantos */
-.zIVQRb_error, .Qrjz3e_error, .Gbtri_error, .gmNpMd_error, .zIVQRb_normal, .Qrjz3e_normal, .Gbtri_normal, .gmNpMd_normal {
-	font-size:0pt;
-	height:4px;
-	width:4px;
-}
Index: anches/2.2/reports/js/modal/css/modal_ie.css
===================================================================
--- /branches/2.2/reports/js/modal/css/modal_ie.css	(revision 3471)
+++ 	(revision )
@@ -1,160 +1,0 @@
-#lightbox{
-	background-color:#eee;
-	padding: 10px;
-	border-bottom: 2px solid #666;
-	border-right: 2px solid #666;
-}
-
-#lightboxCaption {
-	font-size: 1.8em;
-	text-align: center;
-	border-bottom: 2px solid #666;
-	
-	position: relative;
-	width: 100%;
-	height: auto;
-	top: 0;
-	right: 0;
-	bottom: auto;
-	left: 0;
-}
-
-#lightboxContent {
-	position:relative;
-	top:0pt;
-	left:0pt;
-	right:0pt;
-	width:auto;
-	overflow: auto;
-}
-
-#lightboxFoot {
-	border-top:2px solid #666666;
-	position:relative;
-	text-align:left;
-	top:0pt;
-	width:100%;
-}
-
-#keyboardMsg{ float: right; }
-
-#closeButton{ top: 5px; right: 5px; }
-
-#lightbox img{ border: none; clear: both;} 
-
-#overlay img{ border: none; }
-
-#overlay{
-	filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/expresso/expressoAdmin1_2/js/modal/images/overlay.png', sizingMethod='scale');
-}
-
-#divStatusBar{
-	height:22px;
-}
-
-.info_msg {
-	font-family: Arial, sans-serif, Helvetica, Verdana;
-	font-size: 13px;
-	border-width: 0px 0px 0px 0px;
-	padding: 1px 10px 0px 10px;	
-	border-style: inset inset inset inset;
-	border-color: gray gray gray gray;
-	background-color: rgb(250, 209, 99);
-	-moz-border-radius: 6px 6px 6px 6px;
-}
-
-.error_msg {
-	font-family: Arial, sans-serif, Helvetica, Verdana;
-	font-size: 13px;
-	font-weight: bold;
-	color: rgb(255, 255, 255);
-	background-color: rgb(240, 0, 0);
-	border-width: 0px 0px 0px 0px;
-	padding: 1px 10px 0px 10px;	
-	border-style: inset inset inset inset;
-	border-color: gray gray gray gray;
-	-moz-border-radius: 6px 6px 6px 6px;
-}
-
-/* NORMAL - yellow */
-/* superior esquerdo */
-.zIVQRb_normal {
-	background:transparent url(../images/rc_normal.png) no-repeat scroll 0pt 0pt;
-}
-
-/* superior direito */ 
-.Qrjz3e_normal {
-	background:transparent url(../images/rc_normal.png) no-repeat scroll -4px 0pt;
-}
- 
-/* inferior esquerdo */ 
-.Gbtri_normal {
-	background:transparent url(../images/rc_normal.png) no-repeat scroll 0pt -4px;
-}
-
-/* inferior direito */
-.gmNpMd_normal {
-	background:transparent url(../images/rc_normal.png) no-repeat scroll -4px -4px;
-}
-
-/* linha do meio, entre os cantos */
-.Ptde9b_normal {
-	background:#FFF1A8 none repeat scroll 0%;
-	color:#FFFFFF;
-}
-
-/* Conteudo */
-.m14Grb_normal {
-	color: black;
-	background: #FFF1A8;
-	font-size:80%;
-	font-weight:bold;
-	font-family: arial,sans-serif;
-	padding:0pt 5px;
-	text-align:center;
-}
-
-/* ERROR - red */
-/* superior esquerdo */
-.zIVQRb_error {
-	background:transparent url(../images/rc_error.png) no-repeat scroll 0pt 0pt;
-}
-
-/* superior direito */ 
-.Qrjz3e_error {
-	background:transparent url(../images/rc_error.png) no-repeat scroll -4px 0pt;
-}
- 
-/* inferior esquerdo */ 
-.Gbtri_error {
-	background:transparent url(../images/rc_error.png) no-repeat scroll 0pt -4px;
-}
-
-/* inferior direito */
-.gmNpMd_error {
-	background:transparent url(../images/rc_error.png) no-repeat scroll -4px -4px;
-}
-
-/* linha do meio, entre os cantos */
-.Ptde9b_error {
-	background:#CC0000 none repeat scroll 0%;
-	color:#FFFFFF;
-}
-
-/* Conteudo */
-.m14Grb_error {
-	color: white;
-	background: #cc0000;
-	font-size:80%;
-	font-weight:bold;
-	font-family: arial,sans-serif;
-	padding:0pt 5px;
-	text-align:center;
-}
-
-/* todas os cantos */
-.zIVQRb_error, .Qrjz3e_error, .Gbtri_error, .gmNpMd_error, .zIVQRb_normal, .Qrjz3e_normal, .Gbtri_normal, .gmNpMd_normal {
-	font-size:0pt;
-	height:4px;
-	width:4px;
-}
Index: anches/2.2/reports/js/modal/inc/load_lang.php
===================================================================
--- /branches/2.2/reports/js/modal/inc/load_lang.php	(revision 3471)
+++ 	(revision )
@@ -1,29 +1,0 @@
-<?
-/*
-	$fn = './setup/phpgw_'.$_SESSION['phpgw_info']['expressoAdmin']['user']['preferences']['common']['lang'].'.lang';
-	
-	if (file_exists($fn))
-	{
-		$lang = array();
-		
-		$fp = fopen($fn,'r');
-		while ($data = fgets($fp,16000))
-		{
-			list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1));			
-			$lang[str_replace(" ", "_", (strtolower($message_id)) )] = $content;
-		}
-		fclose($fp);
-		
-		echo serialize($lang);
-	}		
-	exit;
-*/
-
-	$lang = array();
-	foreach($_SESSION['phpgw_info']['expressoAdmin']['lang'] as $message_id=>$content)
-	{
-		$lang[str_replace(" ", "_", (strtolower($message_id)) )] = $content;
-	}
-	echo serialize($lang);
-	exit;
-?>
Index: anches/2.2/reports/js/modal/modal.js
===================================================================
--- /branches/2.2/reports/js/modal/modal.js	(revision 3471)
+++ 	(revision )
@@ -1,293 +1,0 @@
-function modal(id, type)
-{
-	try{
-		//content = Element(id).innerHTML;
-		content = Element(id).cloneNode(true);
-		title   = Element(id + '_title').value;
-		width   = Element(id + '_width').value;
-		height  = Element(id + '_height').value;
-		close_action = Element(id + '_close_action').value;
-		create_action = Element(id + '_create_action').value;
-		save_action = Element(id + '_save_action').value;
-		onload_action = Element(id + '_onload_action').value
-	}
-	catch(e){}
-	
-	var objBody = document.getElementsByTagName("body").item(0);
-	
-	/* the Overlay */ // create overlay div and hardcode some functional styles
-	var objOverlay = document.createElement("div");
-	objOverlay.setAttribute('id','overlay');
-	objOverlay.style.position = 'absolute';
-	objOverlay.style.top = '0';
-	objOverlay.style.left = '0';
-	objOverlay.style.zIndex = '90';
- 	objOverlay.style.width = '100%';
-	
-	var arrayPageSize = getPageSize();
-	var arrayPageScroll = getPageScroll();
-
-	// set height of Overlay to take up whole page and insert. Show at the end of this function.
-	objOverlay.style.height = (arrayPageSize[1] + 'px');
-	objOverlay.style.display = 'none';
-	objBody.insertBefore(objOverlay, objBody.firstChild);
-
-
-	/* the div */ // create lightbox div, same note about styles as above
-	
-	var objLightbox = document.createElement("div");
-	objLightbox.setAttribute('id','lightbox');
-	
-	objLightbox.style.position = 'absolute';
-	objLightbox.style.display = 'none';
-	objLightbox.style.zIndex = '100';	
-
-	
-	var objLightbox_height = height;
-	var objLightbox_width = width;
-	
-	objLightbox.style.height = objLightbox_height + "px";
-	objLightbox.style.width = objLightbox_width + "px";
-	
-	var lightboxTop = ((arrayPageSize[3] - objLightbox_height) / 2);
-	var lightboxLeft = ((arrayPageSize[0] - objLightbox_width) / 2 );
-	
-	objLightbox.style.top = (lightboxTop < 0) ? "0px" : lightboxTop + "px";
-	objLightbox.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";
-	
-	objBody.insertBefore(objLightbox, objOverlay.nextSibling);
-		
-		
-	// create caption
-	var objCaption = document.createElement("div");
-	objCaption.setAttribute('id','lightboxCaption');
-	objCaption.innerHTML = title;
-	objLightbox.appendChild(objCaption);
-
-	// create warnings
-	var objWarning = document.createElement("div");
-	objWarning.setAttribute('id','lightboxWarning');
-	objWarning.style.height = '21px';
-	objLightbox.appendChild(objWarning);
-
-	// Create Content
-	var objContent = document.createElement("div");
-	objContent.setAttribute('id','lightboxContent');
-	objContent.style.height = (objLightbox_height - 65) + "px";
-	objContent.innerHTML = content.innerHTML;
-	objLightbox.appendChild(objContent);
-
-	// create foot
-	var objCaption = document.createElement("div");
-	objCaption.setAttribute('id','lightboxFoot');
-
-	var close_button = '<input type=button value="'+get_lang('close')+'" onClick='+close_action+'>';
-	if (type == 'create')
-		var create_save_button = '<input type=button value="'+get_lang('create')+'" onClick='+create_action+'>';
-	else if(type == 'save')
-		var create_save_button = '<input type=button value="'+get_lang('save')+'" onClick='+save_action+'>';
-	objCaption.innerHTML = '<table width=100% cellspacing="0" cellpadding="0"><tr><td align=left>'+close_button+'</td><td align=right>'+create_save_button+'</td></tr></table>'
-	
-	objLightbox.appendChild(objCaption);
-
-	if (onload_action)
-	{
-		eval(onload_action);
-	}
-
-	//Show the modal.
-	objOverlay.style.display = 'block';
-	objLightbox.style.display = '';
-}
-
-function close_lightbox()
-{
-	var objBody = document.getElementsByTagName("body").item(0);
-	var lightbox = document.getElementById('overlay');
-	lightbox_div = document.getElementById('lightbox');
-	objBody.removeChild(lightbox);
-	objBody.removeChild(lightbox_div);
-	return;
-}
-
-function getPageSize(){
-	
-	var xScroll, yScroll;
-	
-	if (window.innerHeight && window.scrollMaxY) {	
-		xScroll = document.body.scrollWidth;
-		yScroll = window.innerHeight + window.scrollMaxY;
-	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
-		xScroll = document.body.scrollWidth;
-		yScroll = document.body.scrollHeight;
-	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
-		xScroll = document.body.offsetWidth;
-		yScroll = document.body.offsetHeight;
-	}
-	
-	var windowWidth, windowHeight;
-	if (self.innerHeight) {	// all except Explorer
-		windowWidth = self.innerWidth;
-		windowHeight = self.innerHeight;
-	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
-		windowWidth = document.documentElement.clientWidth;
-		windowHeight = document.documentElement.clientHeight;
-	} else if (document.body) { // other Explorers
-		windowWidth = document.body.clientWidth;
-		windowHeight = document.body.clientHeight;
-	}	
-	
-	// for small pages with total height less then height of the viewport
-	if(yScroll < windowHeight){
-		pageHeight = windowHeight;
-	} else { 
-		pageHeight = yScroll;
-	}
-
-	// for small pages with total width less then width of the viewport
-	if(xScroll < windowWidth){	
-		pageWidth = windowWidth;
-	} else {
-		pageWidth = xScroll;
-	}
-	
-	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
-	return arrayPageSize;
-}
-
-function getPageScroll(){
-
-	var yScroll;
-
-	if (self.pageYOffset) {
-		yScroll = self.pageYOffset;
-	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
-		yScroll = document.documentElement.scrollTop;
-	} else if (document.body) {// all other Explorers
-		yScroll = document.body.scrollTop;
-	}
-
-	arrayPageScroll = new Array('',yScroll) 
-	return arrayPageScroll;
-}
-
-function Element(id)
-{
-	return document.getElementById(id);
-}
-
-function add_css(){
-	var headID = document.getElementsByTagName("head")[0];         
-	var cssNode = document.createElement('link');
-	cssNode.type = 'text/css';
-	cssNode.rel = 'stylesheet';
-	if (navigator.userAgent.toLowerCase().indexOf("msie") != -1)
-		cssNode.href = "./expressoAdmin1_2/js/modal/css/modal_ie.css";
-	else
-		cssNode.href = "./expressoAdmin1_2/js/modal/css/modal_fx.css";
-	
-	cssNode.media = 'screen';
-	headID.appendChild(cssNode);
-	return;
-}
-/*
-function load_lang(){
-	cExecute ('$this/js/modal/inc/load_lang', handler_load_lang);
-}
-
-var global_langs = new Array();
-function handler_load_lang(data)
-{
-	global_langs = eval(data);
-}
-
-function get_lang(key_raw)
-{
-	key = key_raw.replace(/ /g,"_");
-
-	try{
-		lang = eval("global_langs."+key.toLowerCase());
-		return lang;
-	}
-	catch(e){
-		return key_raw + '*';
-	}
-}*/
-
-function make_msg(msg, type)
-{
-	var html_msg = 
-	'<table cellspacing="0" cellpadding="0" border="0"><tbody>'+
-	'<tr><td class="zIVQRb_'+type+'"/><td class="Ptde9b_'+type+'"/><td class="Qrjz3e_'+type+'"/></tr>'+
-	'<tr><td class="Ptde9b_'+type+'"/><td class="m14Grb_'+type+'">' + msg + '</td><td class="Ptde9b_'+type+'"/></tr>' +
-	'<tr><td class="Gbtri_'+type+'"/><td class="Ptde9b_'+type+'"/><td class="gmNpMd_'+type+'"/></tr></tbody></table>';
-	return html_msg;
-}
-
-function write_msg(msg, type)
-{
-	try
-	{
-		clearTimeout(setTimeout_write_msg);
-	}
-	catch(e){}
-		
-	var objLightbox = Element("lightbox");
-	if (objLightbox != null)
-	{
-		var old_divStatusBar = Element("lightboxWarning");
-		var bgColor = "#EEEEEE";
-	}
-	else
-	{
-		var old_divStatusBar = Element("divStatusBar");
-		var bgColor = "#f7f8fa";
-	}
-	
-	var msg_div = Element('em_div_write_msg');
-	if(!msg_div) {
-		msg_div = document.createElement('DIV');
-		msg_div.id = 'em_div_write_msg';
-		//msg_div.style.height = '2px';
-		msg_div.style.background = bgColor;
-		msg_div.style.display = 'none';
-		msg_div.align = "center";
-		msg_div.valign = "middle";
-	}
-	
-	msg_div.innerHTML = make_msg(msg, type);
-	
-	clean_msg();
-	old_divStatusBar.parentNode.insertBefore(msg_div,old_divStatusBar);
-	
-	old_divStatusBar.style.display = 'none';
-	msg_div.style.display = '';
-	
-	setTimeout_write_msg = setTimeout("clean_msg();", 4000);
-}
-
-function clean_msg()
-{
-	var msg_div = Element('em_div_write_msg');
-	if ( (msg_div) && (msg_div.style.display != 'none') )
-	{
-		// Msg esta em outra tela. Precisa apaga-la.
-		/*
-		if ( (Element("lightbox") != null) && (msg_div.nextSibling.id == 'lightboxWarning') ) {}
-		else if ( (Element("lightbox") == null) && (msg_div.nextSibling.id == 'divStatusBar') ) {}
-		else
-		{*/
-			msg_div.style.display = 'none';
-			msg_div.nextSibling.style.display = '';
-//		}
-	}
-}
-
-if (document.all)
-{
-	navigator.userAgent.toLowerCase().indexOf('msie 5') != -1 ? is_ie5 = true : is_ie5 = false;
-	is_ie = true;
-}
-
-add_css();
-//load_lang();
