Index: trunk/phpgwapi/inc/class.common.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.common.inc.php	(revision 2439)
+++ trunk/phpgwapi/inc/class.common.inc.php	(revision 2473)
@@ -1230,4 +1230,6 @@
 			$GLOBALS['phpgw']->js->validate_file('expressoAjax','expressoAjax');
 
+			$GLOBALS['phpgw']->js->validate_file('wz_dragdrop','wz_dragdrop');
+
 			echo "<script type='text/javascript'>var URL_SERVER = '".$GLOBALS['phpgw_info']['server']['webserver_url']."';</script>";
 			echo $GLOBALS['phpgw']->js->get_script_links();
@@ -1236,4 +1238,9 @@
 
 			$GLOBALS['phpgw']->js->unset_script_link('phpgwapi','expressoAjax');
+
+			// TODO
+			// Esse javascript serÃ¡ carregado sempre pois causa grandes
+			// problemas em diversos mÃ³dulos. Algum dia serÃ¡ substituido.
+			$GLOBALS['phpgw']->js->unset_script_link('phpgwapi','wz_dragdrop');
 
 			if (!@$GLOBALS['phpgw_info']['flags']['nonavbar'] && !@$GLOBALS['phpgw_info']['flags']['navbar_target'])
Index: trunk/phpgwapi/js/tools/xlink.js
===================================================================
--- trunk/phpgwapi/js/tools/xlink.js	(revision 2470)
+++ trunk/phpgwapi/js/tools/xlink.js	(revision 2473)
@@ -16,4 +16,5 @@
 		var a = ( action.indexOf( 'admin/' ) > 0 || action.indexOf( '=admin.' ) > 0 );
 		a = ( a || action.indexOf( 'home' ) > 0 );
+		a = ( a || action.indexOf( 'contactcenter' ) > 0 );
 		a = ( a || action.indexOf( 'expressoAdmin1_2' ) > 0 );
 		a = ( a || action.indexOf( 'abberit_messenger' ) > 0 );
@@ -48,6 +49,12 @@
 	XEvents.add( window, 'onload', function( )
 	{
+		var _center = document.createElement( 'center' );
+		_center.appendChild( _loading );
+
 		_container = document.getElementById( 'divAppbox' );
+		_loading = _center;
+
 		document.getElementsByTagName( 'body' ).item( 0 ).style.overflowY = 'scroll';
+
 		var links = document.getElementsByTagName( 'a' );
 		for ( var i = 0; i < links.length; i++ )
Index: trunk/contactcenter/inc/class.ui_api.inc.php
===================================================================
--- trunk/contactcenter/inc/class.ui_api.inc.php	(revision 1612)
+++ trunk/contactcenter/inc/class.ui_api.inc.php	(revision 2473)
@@ -62,9 +62,12 @@
 			$template->set_var('cc_js_aux', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/ccAux.js');
 			$template->set_var('cc_js_connector', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/connector.js');
-			$template->set_var('cc_js_wz_dragdrop', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/js/wz_dragdrop/wz_dragdrop.js');
-			$template->set_var('cc_js_dtree', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/js/dftree/dftree.js');
-			$template->set_var('cc_js_dtabs', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/js/dTabs/dTabs.js');
-			$template->set_var('cc_js_djswin', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/js/dJSWin/dJSWin.js');
 			$template->set_var('cc_js_catalog_tree', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/contactcenter/js/cc_tree.js');
+
+			$GLOBALS['phpgw']->js->validate_file( 'dftree', 'dftree', 'phpgwapi' );
+			$GLOBALS['phpgw']->js->validate_file( 'dTabs', 'dTabs', 'phpgwapi' );
+			$GLOBALS['phpgw']->js->validate_file( 'dJSWin', 'dJSWin', 'phpgwapi' );
+
+			//$GLOBALS['phpgw']->js->validate_file( '', '', '' );
+
 			
 			$template->parse('out','api');
Index: trunk/contactcenter/inc/class.ui_data.inc.php
===================================================================
--- trunk/contactcenter/inc/class.ui_data.inc.php	(revision 2410)
+++ trunk/contactcenter/inc/class.ui_data.inc.php	(revision 2473)
@@ -101,8 +101,10 @@
 
 //			$GLOBALS['phpgw']->js->set_onload('setTimeout(\'updateCards()\',1000)');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$GLOBALS['phpgw']->template->set_file(array('index' => 'index.tpl'));
 			$GLOBALS['phpgw']->template->set_var('cc_root_dir', $GLOBALS['phpgw_info']['server']['webserver_url'].'/contactcenter/');
+
+			$GLOBALS['phpgw']->template->set_var( 'url', $GLOBALS[ 'phpgw' ] -> link( '/contactcenter' ) );
 
 			/* Quick Add */
@@ -263,4 +265,5 @@
 			$main .= $GLOBALS['phpgw']->template->get_var('out');
 
+			echo $GLOBALS['phpgw']->common->get_java_script( );
 			echo $main;
 		}
@@ -384,5 +387,5 @@
 
 				case 'email_win':
-					$GLOBALS['phpgw']->common->phpgw_header();
+					//$GLOBALS['phpgw']->common->phpgw_header();
 					$api = CreateObject('contactcenter.ui_api');
 					$win = $api->get_email_win();
Index: trunk/contactcenter/js/ccQuickAddContact.js
===================================================================
--- trunk/contactcenter/js/ccQuickAddContact.js	(revision 1612)
+++ trunk/contactcenter/js/ccQuickAddContact.js	(revision 2473)
@@ -61,5 +61,5 @@
 			this.showWindow(div);
 		else {
-			Connector.newRequest('get_catalog_add_contact', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_catalog_add_contact', 'POST', handler, 'id='+id);
+			Connector.newRequest('get_catalog_add_contact', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=get_catalog_add_contact', 'POST', handler, 'id='+id);
 		}
 	}
Index: trunk/contactcenter/js/cc.js
===================================================================
--- trunk/contactcenter/js/cc.js	(revision 2171)
+++ trunk/contactcenter/js/cc.js	(revision 2473)
@@ -293,5 +293,5 @@
 
         };
-	Connector.newRequest('populateSharingSelect', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_cards_data', 'POST', handler);
+	Connector.newRequest('populateSharingSelect', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=get_cards_data', 'POST', handler);
 }
 
@@ -398,5 +398,5 @@
 		//populateRelations(data['relations']);
 	};
-	Connector.newRequest('populateFullEdit', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_full_data&id=' + id + "&catalog="+catalog, 'GET', handler);
+	Connector.newRequest('populateFullEdit', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=get_full_data&id=' + id + "&catalog="+catalog, 'GET', handler);
 }
 
@@ -443,7 +443,7 @@
 	ccAddGroup.clear(true);			
 	if(!shared)
-		Connector.newRequest('populateEditGroup', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_group&id='+id, 'GET', handler);
+		Connector.newRequest('populateEditGroup', URL_SERVER + '/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);
+		Connector.newRequest('populateEditGroup', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=get_group&id='+id+'&shared_from='+shared, 'GET', handler);
 }
 
@@ -1006,5 +1006,5 @@
 	};
 
-	Connector.newRequest('populateStates', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_states&country='+Element('cc_addr_countries').value, 'GET', handler);
+	Connector.newRequest('populateStates', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=get_states&country='+Element('cc_addr_countries').value, 'GET', handler);
 }
 
@@ -1121,5 +1121,5 @@
 	};
 
-	Connector.newRequest('populateCities', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_cities&'+requestStr, 'GET', handler);
+	Connector.newRequest('populateCities', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=get_cities&'+requestStr, 'GET', handler);
 }
 
@@ -1799,5 +1799,5 @@
 	if(result) {
 		if(result.toLowerCase() == number)
-			Connector.newRequest('removeAllEntries', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=remove_all_entries', 'GET', handler);
+			Connector.newRequest('removeAllEntries', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=remove_all_entries', 'GET', handler);
 		else
 			alert('Código Incorreto');
@@ -1835,5 +1835,5 @@
 	typeArg = (type == 'groups' ? 'group' : 'entry');
 
-	Connector.newRequest('removeEntry', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=remove_'+typeArg+'&remove=' + id, 'GET', handler);
+	Connector.newRequest('removeEntry', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=remove_'+typeArg+'&remove=' + id, 'GET', handler);
 }
 
@@ -2362,5 +2362,5 @@
 	};
 
-	Connector.newRequest('setMaxCards', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=set_n_cards&ncards=' + ncards, 'GET');
+	Connector.newRequest('setMaxCards', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=set_n_cards&ncards=' + ncards, 'GET');
 }
 
@@ -2681,5 +2681,5 @@
 
 	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);
+	Connector.newRequest('showCards', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=get_cards_data', 'POST', handler, info);
 }
 
@@ -2831,5 +2831,5 @@
 	resetQuickAdd();
 
-	Connector.newRequest('quickAdd', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=quick_add', 'POST', handler, 'add='+escape(str));
+	Connector.newRequest('quickAdd', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=quick_add', 'POST', handler, 'add='+escape(str));
 }
 
@@ -2845,4 +2845,4 @@
         }
 	}
-	Connector.newRequest('voip', "../../expressoMail1_2/controller.php?action=expressoMail1_2.functions.callVoipconnect&to="+phoneUser+"&typePhone="+typePhone, 'POST', handler_voip);
-	}
+	Connector.newRequest('voip', URL_SERVER + "/expressoMail1_2/controller.php?action=expressoMail1_2.functions.callVoipconnect&to="+phoneUser+"&typePhone="+typePhone, 'POST', handler_voip);
+	}
Index: trunk/contactcenter/js/ccMain.js
===================================================================
--- trunk/contactcenter/js/ccMain.js	(revision 1721)
+++ trunk/contactcenter/js/ccMain.js	(revision 2473)
@@ -57,5 +57,5 @@
 			}
 
-			Connector.newRequest('ViewLdap', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_visible_all_ldap', 'GET', ViewLdap);		
+			Connector.newRequest('ViewLdap', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=get_visible_all_ldap', 'GET', ViewLdap);		
 			
 			ccTree.Connector = Connector;						
Index: trunk/contactcenter/js/connector.js
===================================================================
--- trunk/contactcenter/js/connector.js	(revision 2)
+++ trunk/contactcenter/js/connector.js	(revision 2473)
@@ -51,5 +51,5 @@
 		{ 
 			oxmlhttp = new XMLHttpRequest();
-			oxmlhttp.overrideMimeType('text/xml');
+			oxmlhttp.overrideMimeType('text/plain');
 		}
 		catch (e)
@@ -117,4 +117,5 @@
 		try
 		{ 
+			target += '&BackgroundRequest=' + Date.parse( new Date );
 			if (method == '' || method == 'GET')
 			{
Index: trunk/contactcenter/js/ccIEContacts.js
===================================================================
--- trunk/contactcenter/js/ccIEContacts.js	(revision 285)
+++ trunk/contactcenter/js/ccIEContacts.js	(revision 2473)
@@ -238,5 +238,5 @@
 			var typeImport = Element('typeImport').value;
 
-			Connector.newRequest('import_contacts','../index.php?menuaction=contactcenter.ui_data.data_manager&method=import_contacts&typeImport='+typeImport,'GET',handler_import);
+			Connector.newRequest('import_contacts', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=import_contacts&typeImport='+typeImport,'GET',handler_import);
 		}
 
@@ -280,5 +280,5 @@
 		var typeExport = Element("typeExport");
 		Element('export_button').disabled = true;
-		Connector.newRequest('export_contacts', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=export_contacts', 'POST', handler_export, 'typeExport='+typeExport.value);
+		Connector.newRequest('export_contacts', URL_SERVER + '/index.php?menuaction=contactcenter.ui_data.data_manager&method=export_contacts', 'POST', handler_export, 'typeExport='+typeExport.value);
 	}
 
Index: trunk/contactcenter/index.php
===================================================================
--- trunk/contactcenter/index.php	(revision 1598)
+++ trunk/contactcenter/index.php	(revision 2473)
@@ -17,6 +17,6 @@
 
 	$GLOBALS['phpgw_info']['flags'] = array(
-		'currentapp' => 'contactcenter',
-		'noheader'   => true,
+		'currentapp' => 'contactcenter'
+		//'noheader'   => true,
 		//'nonavbar'   => true
 	);
Index: trunk/contactcenter/templates/classic/api_common.tpl
===================================================================
--- trunk/contactcenter/templates/classic/api_common.tpl	(revision 2)
+++ trunk/contactcenter/templates/classic/api_common.tpl	(revision 2473)
@@ -30,8 +30,4 @@
 <script type="text/javascript" src="{cc_js_aux}"></script>
 <script type="text/javascript" src="{cc_js_connector}"></script>
-<script type="text/javascript" src="{cc_js_wz_dragdrop}"></script>
-<script type="text/javascript" src="{cc_js_dtree}"></script>
-<script type="text/javascript" src="{cc_js_dtabs}"></script>
-<script type="text/javascript" src="{cc_js_djswin}"></script>
 <script type="text/javascript" src="{cc_js_catalog_tree}"></script>
 
Index: trunk/contactcenter/templates/classic/index.tpl
===================================================================
--- trunk/contactcenter/templates/classic/index.tpl	(revision 1690)
+++ trunk/contactcenter/templates/classic/index.tpl	(revision 2473)
@@ -11,5 +11,5 @@
 	}
 </style>
-<script src="js/cc.js" type="text/javascript"></script>
+<script src="{url}/js/cc.js" type="text/javascript"></script>
 <!-- JS MESSAGES -->
 <input id="cc_msg_name_mandatory" type="hidden" value="{cc_msg_name_mandatory}">
@@ -252,8 +252,8 @@
 <!-- _END VIEW CARDS -->
 <!-- BOTTOM DETAILS-->
-<script type="text/javascript" src="js/moo.fx.js"></script>
-<script type="text/javascript" src="js/ccListParticipants.js"></script>
-<script type="text/javascript" src="js/ccQuickAddContact.js"></script>
-<script type="text/javascript" src="js/ccIEContacts.js"></script>
-<script type="text/javascript" src="js/ccMain.js"></script>
+<script type="text/javascript" src="{url}/js/moo.fx.js"></script>
+<script type="text/javascript" src="{url}/js/ccListParticipants.js"></script>
+<script type="text/javascript" src="{url}/js/ccQuickAddContact.js"></script>
+<script type="text/javascript" src="{url}/js/ccIEContacts.js"></script>
+<script type="text/javascript" src="{url}/js/ccMain.js"></script>
 <!-- END BOTTOM DETAILS-->						
Index: trunk/contactcenter/templates/default/api_common.tpl
===================================================================
--- trunk/contactcenter/templates/default/api_common.tpl	(revision 1496)
+++ trunk/contactcenter/templates/default/api_common.tpl	(revision 2473)
@@ -38,8 +38,4 @@
 <script type="text/javascript" src="{cc_js_aux}"></script>
 <script type="text/javascript" src="{cc_js_connector}"></script>
-<script type="text/javascript" src="{cc_js_wz_dragdrop}"></script>
-<script type="text/javascript" src="{cc_js_dtree}"></script>
-<script type="text/javascript" src="{cc_js_dtabs}"></script>
-<script type="text/javascript" src="{cc_js_djswin}"></script>
 <script type="text/javascript" src="{cc_js_catalog_tree}"></script>
 <script type="text/javascript">
Index: trunk/contactcenter/templates/default/index.tpl
===================================================================
--- trunk/contactcenter/templates/default/index.tpl	(revision 1690)
+++ trunk/contactcenter/templates/default/index.tpl	(revision 2473)
@@ -11,5 +11,5 @@
 	}
 </style>
-<script src="js/cc.js" type="text/javascript"></script>
+<script src="{url}/js/cc.js" type="text/javascript"></script>
 <!-- JS MESSAGES -->
 <input id="cc_msg_name_mandatory" type="hidden" value="{cc_msg_name_mandatory}">
@@ -254,8 +254,8 @@
 <!-- _END VIEW CARDS -->
 <!-- BOTTOM DETAILS-->
-<script type="text/javascript" src="js/moo.fx.js"></script>
-<script type="text/javascript" src="js/ccListParticipants.js"></script>
-<script type="text/javascript" src="js/ccQuickAddContact.js"></script>
-<script type="text/javascript" src="js/ccIEContacts.js"></script>
-<script type="text/javascript" src="js/ccMain.js"></script>
+<script type="text/javascript" src="{url}/js/moo.fx.js"></script>
+<script type="text/javascript" src="{url}/js/ccListParticipants.js"></script>
+<script type="text/javascript" src="{url}/js/ccQuickAddContact.js"></script>
+<script type="text/javascript" src="{url}/js/ccIEContacts.js"></script>
+<script type="text/javascript" src="{url}/js/ccMain.js"></script>
 <!-- END BOTTOM DETAILS-->						
