Index: /trunk/phpgwapi/templates/azul
===================================================================
--- /trunk/phpgwapi/templates/azul	(revision 1154)
+++ /trunk/phpgwapi/templates/azul	(revision 1154)
@@ -0,0 +1,1 @@
+link default
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 2)
@@ -0,0 +1,50 @@
+<!-- DEBUG -->
+<div id="cc_debug" style="display: none; position: absolute; top:0px; left: 1000px; width: 600px"></div>
+<!-- END DEBUG -->
+
+<!-- ContactCenter API Start -->
+<input id="cc_server_root" type="hidden" value="{cc_server_root}" />
+<input id="cc_phpgw_img_dir" type="hidden" value="{cc_phpgw_img_dir}" />
+<input id="cc_email_id_type" type="hidden" value="{cc_email_id_type}" />
+
+<!-- JS MESSAGES -->
+<input id="cc_msg_err_invalid_catalog" type="hidden" value="{cc_msg_err_invalid_catalog}" />
+<input id="cc_msg_err_contacting_server" type="hidden" value="{cc_msg_err_contacting_server}" />
+<input id="cc_msg_err_timeout" type="hidden" value="{cc_msg_err_timeout}" />
+<input id="cc_msg_err_serialize_data_unknown" type="hidden" value="{cc_msg_err_serialize_data_unknown}" />
+
+<input id="cc_msg_err_empty_field" type="hidden" value="{cc_msg_err_empty_field}" />
+<input id="cc_msg_type_state" type="hidden" value="{cc_msg_type_state}" />
+<input id="cc_msg_type_city" type="hidden" value="{cc_msg_type_city}" />
+<!-- END JS MESSAGES -->
+
+
+<input id="cc_connector_visible" type="hidden" value="{cc_connector_visible}" />
+<input id="cc_loading_1" type="hidden" value="{cc_loading_1}" />
+<input id="cc_loading_2" type="hidden" value="{cc_loading_2}" />
+<input id="cc_loading_3" type="hidden" value="{cc_loading_3}" />
+<input id="cc_loading_image" type="hidden" value="{cc_loading_image}" />
+
+<link rel="stylesheet" type="text/css" href="{cc_css}" />
+<link rel="stylesheet" type="text/css" href="{cc_dtree_css}" />
+<script type="text/javascript" src="{cc_js_aux}"></script>
+<script type="text/javascript" src="{cc_js_connector}"></script>
+<script type="text/javascript" src="{cc_js_wz_dragdrop}"></script>
+<script type="text/javascript" src="{cc_js_dtree}"></script>
+<script type="text/javascript" src="{cc_js_dtabs}"></script>
+<script type="text/javascript" src="{cc_js_djswin}"></script>
+<script type="text/javascript" src="{cc_js_catalog_tree}"></script>
+
+<div id="cc_loading" class="hidden">
+	<table class="loading" background="{cc_loading_image}"> 
+		<tr>
+			<td id="cc_loading_inner"></td>
+		</tr>
+	</table>
+</div>
+
+<script type="text/javascript">
+	var Connector = new cConnector();
+	Connector.setVisible(true);
+</script>
+<!-- ContactCenter API End -->
Index: /trunk/contactcenter/templates/classic/head.inc.php
===================================================================
--- /trunk/contactcenter/templates/classic/head.inc.php	(revision 2)
+++ /trunk/contactcenter/templates/classic/head.inc.php	(revision 2)
@@ -0,0 +1,89 @@
+<?php
+	/**************************************************************************\
+	* phpGroupWare                                                             *
+	* http://www.phpgroupware.org                                              *
+	* --------------------------------------------                             *
+	*  This program is free software; you can redistribute it and/or modify it *
+	*  under the terms of the GNU General Public License as published by the   *
+	*  Free Software Foundation; either version 2 of the License, or (at your  *
+	*  option) any later version.                                              *
+	\**************************************************************************/
+
+
+	if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time'])
+	{
+		$mtime = microtime(); 
+		$mtime = explode(' ',$mtime); 
+		$mtime = $mtime[1] + $mtime[0]; 
+		$GLOBALS['page_start_time'] = $mtime; 
+	}
+
+	// get used language code
+	$lang_code = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
+
+	$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="'
+		. $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="'
+		. $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
+
+	if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
+	{
+		$bodyheader .= '';
+	}
+
+	#_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']);
+	$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
+	if(!file_exists($theme_css))
+	{
+		$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
+	}
+
+	//pngfix defaults to yes
+	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_pngfix'])
+	{
+		$pngfix_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/js/pngfix.js';
+		$pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher --> 
+		<!--[if gte IE 5.5000]>
+		<script src="'.$pngfix_src.'" type="text/javascript">
+		</script>
+		<![endif]-->';
+	}
+
+	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'])
+	{
+		$slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/js/slidereffects.js';
+		$slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
+		</script>';
+	}
+	else
+	{
+		$simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/js/simple_show_hide.js';
+		$simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
+		</script>';
+	}
+
+	$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
+	$tpl->set_unknowns('remove');
+	$tpl->set_file(array('_head' => 'head.tpl'));
+	$tpl->set_block('_head','head');
+
+	$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
+	$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
+
+	$var = Array(
+		'img_icon'      => PHPGW_IMAGES_DIR . '/favicon.ico',
+		'img_shortcut'  => PHPGW_IMAGES_DIR . '/favicon.ico',
+		'pngfix'        => $pngfix,
+		'slider_effects'=> $slider_effects,
+		'simple_show_hide'=> $simple_show_hide,
+		'lang_code'=> $lang_code,
+		'charset'       => $GLOBALS['phpgw']->translation->charset(),
+		'font_family'   => $GLOBALS['phpgw_info']['theme']['font'],
+		'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
+		'body_tags'     => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
+		'theme_css'     => $theme_css,
+		'css'           => $GLOBALS['phpgw']->common->get_css(),
+		'java_script'   => $GLOBALS['phpgw']->common->get_java_script()	);
+	$tpl->set_var($var);
+	$tpl->pfp('out','head');
+	unset($tpl);
+?>
Index: /trunk/contactcenter/templates/classic/preferences.tpl
===================================================================
--- /trunk/contactcenter/templates/classic/preferences.tpl	(revision 2)
+++ /trunk/contactcenter/templates/classic/preferences.tpl	(revision 2)
@@ -0,0 +1,66 @@
+<!--
+	ContactCenter Preferences TPL File
+	Copyright (C) 2004 - Raphael Derosso Pereira 
+	(raphaelpereira@users.sourceforge.net)
+	
+	This file is licensed under the terms of th GNU GPL
+	version 2 or above
+-->
+
+<form method="POST" action="{form_action}">
+<div id="cc_pref_cards" style="width: 100%; border: 0px solid black">
+	<p align="center" style="font-weight: bold; font-size: medium; border: 0px solid black">{lang_Cards_Visualization_Preferences}</p>
+	<table align="center" style="width: 400px">
+		<tr class="th">
+			<td style="text-align: center; font-weight: bold">{lang_Option}</td>
+			<td style="text-align: center; font-weight: bold">{lang_Value}</td>
+		</tr>
+		<tr class="row_off">
+			<td>{lang_Default_Person_Email_Type}</td>
+			<td>
+				<select name="personCardEmail" style="width: 200px">
+					<option selected value="_NONE_">{lang_Choose_Email_Type...}</option>
+					{personCardEmail}
+				</select>
+			</td>
+		</tr>
+		<tr class="row_on">
+			<td>{lang_Default_Person_Telephone_Type}</td>
+			<td>
+				<select name="personCardPhone" style="width: 200px">
+					<option selected value="_NONE_">{lang_Choose_Telephone_Type...}</option>
+					{personCardPhone}
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td></td>
+			<td style="text-align: right;">
+				<input type="submit" name="save" value="{lang_Save}">
+				<input type="button" name="cancel" value="{lang_Cancel}" onclick="window.back()">
+			</td>
+		</tr>
+	</table>
+	<br>
+	<p align="center" style="font-weight: bold; font-size: medium; border: 0px solid black">{lang_Connector_Setup}</p>
+	<table align="center" style="width: 400px">
+		<tr class="th">
+			<td style="text-align: center; font-weight: bold; width: 200px">{lang_Option}</td>
+			<td style="text-align: center; font-weight: bold; width: 200px">{lang_Value}</td>
+		</tr>
+		<tr class="row_off">
+			<td>{lang_Display_Connector_Client-Server_Status_Information?}</td>
+			<td align="center">
+				<input type="checkbox" name="displayConnector" {displayConnector} />
+			</td>
+		</tr>
+		<tr>
+			<td></td>
+			<td style="text-align: right;">
+				<input type="submit" name="save" value="{lang_Save}">
+				<input type="button" name="cancel" value="{lang_Cancel}" onclick="window.back()">
+			</td>
+		</tr>
+	</table>
+</div>
+</form>
Index: /trunk/contactcenter/templates/classic/search_win.tpl
===================================================================
--- /trunk/contactcenter/templates/classic/search_win.tpl	(revision 2)
+++ /trunk/contactcenter/templates/classic/search_win.tpl	(revision 2)
@@ -0,0 +1,67 @@
+{cc_api}
+
+<script type="text/javascript" src="{cc_js_search_win}"></script>
+
+<div id="cc_search" style="position: absolute; width: 450px; height: 300px; visibility: hidden; z-index: 2; border: 1px solid #999; border-top: 0px;">
+	<input id="cc_search_title" type="hidden" value="{cc_search_title}">
+	<table border="0" width="450px" height="300px" style="background: #eee">
+		<tr valign="top">
+			<td style="width: 250px">
+				<table width="100%" border="0">
+					<tr>
+						<td align="left">{cc_search_catalogues}</td>
+					</tr>
+					<tr>
+						<td align="left"><div id="cc_search_catalogues" style="position: relative; width: 250px; height: 265px; border: 1px solid #999; overflow: auto;" class="row_on"></div></td>
+					</tr>
+				</table>
+			</td>
+			<td style="width: 200px">
+				<table width="100%" height="100%" border="0">
+					<tr>
+						<td align="left" colspan="2">{cc_search_for}</td>
+					</tr>
+					<tr>
+						<td align="left" colspan="2"><input id="cc_search_for" type="text" /></td>
+					</tr>
+					<tr height="100%" valign="bottom">
+						<td align="right" height="100%" valign="bottom"><input type="button" value="{cc_search_go}" style="width: 70px" onclick="javascript: ccSearchWin.go()" /></td>
+						<td align="right" height="100%" width="1%" valign="bottom"><input type="button" value="{cc_search_cancel}" style="width: 70px" onclick="javascript:ccSearchWin.close();" /></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+	</table>
+</div>
+
+<script type="text/javascript">
+	var searchWin_load = document.body.onload;
+	var ccSearchWin, ccSearchWindow;
+
+	var searchWin_load_f = function(e)
+	{
+		ccSearchWindow = new dJSWin({'id': 'cc_search_window',
+									 'content_id': 'cc_search',
+									 'win_class': 'row_off',
+									 'width': '452px',
+									 'height': '300px',
+									 'title_color': '#3978d6',
+									 'title': Element('cc_search_title').value,
+									 'title_text_color': 'white',
+									 'button_x_img': Element('cc_phpgw_img_dir').value+'/winclose.gif',
+									 'border': true});
+
+		ccSearchWindow.draw();
+		ccSearchWin = new ccSearchWinClass({'window': ccSearchWindow, 'tree': 'ccSearchTree'});
+	}
+
+	if (is_ie)
+	{
+		//document.body.onload = function(e) {setTimeout('searchWin_load_f()'); searchWin_load ? setTimeout('searchWin_load()', 10) : false;};
+		document.body.onload = function(e) {searchWin_load_f(); searchWin_load ? searchWin_load() : false;};
+	}
+	else
+	{
+		searchWin_load_f();
+	}
+</script>
Index: /trunk/contactcenter/templates/classic/email_win.tpl
===================================================================
--- /trunk/contactcenter/templates/classic/email_win.tpl	(revision 2)
+++ /trunk/contactcenter/templates/classic/email_win.tpl	(revision 2)
@@ -0,0 +1,143 @@
+{cc_api}
+
+<script type="text/javascript" src="{cc_js_search}"></script>
+<script type="text/javascript" src="{cc_js_email_win}"></script>
+<input id="cc_email_win_title" type="hidden" value="{cc_email_win_title}"/>
+<input id="cc_email_status" type="hidden" value="{cc_email_status}"/>
+<input id="cc_email_search_text" type="hidden" value="{cc_email_search_text}"/>
+<input id="cc_email_conn_1" type="hidden" value="{cc_email_conn_1}"/>
+<input id="cc_email_conn_2" type="hidden" value="{cc_email_conn_2}"/>
+<input id="cc_email_conn_3" type="hidden" value="{cc_email_conn_3}"/>
+
+<div id="cc_email_win" style="position: absolute; width: 720px;z-index:1; height: 350px; visibility: hidden;  border: 1px solid #999; border-top: 0px; background-color: #eee;">
+	<table border="0" width="100%" height="100%">
+		<tr>
+			<td>
+				<table>
+					<tr>
+						<td id="cc_email_search"></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<table border="0" width="100%">
+					<tr>
+						<td valign="top">
+							<table border="0">
+								<tr>
+									<td>{cc_label_catalogues}</td>
+								</tr>
+								<tr>
+									<td><div id="cc_email_catalogues" style=" position: relative; width: 300px; height: 110px; border: 1px solid #999; overflow:auto" class="row_on"></div>
+									</td>
+								</tr>
+								<tr>
+									<td>{cc_label_entries}</td>
+								</tr>
+								<tr>
+									<td><select id="cc_email_win_entries" style="width: 300px; height: 110px; overflow: auto;" multiple></select></td>
+								</tr>
+							</table>
+						</td>
+						<td valign="top">
+							<table border="0" width="100%" height="100%">
+								<tr>
+									<td></td>
+									<td>{cc_label_to}</td>
+								</tr>
+								<tr>
+									<td>
+										<table>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_to_add}" onclick="javascript:ccEmailWin.entries_to();"></td></tr>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_to_del}" onclick="javascript:ccEmailWin.to_entries();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_to" style="width: 280px; height: 65px;" multiple></select></td>
+								</tr>
+								<tr>
+									<td></td>
+									<td>{cc_label_cc}</td>
+								</tr>
+								<tr>
+									<td>
+										<table>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_cc_add}" onclick="javascript:ccEmailWin.entries_cc();"></td></tr>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_cc_del}" onclick="javascript:ccEmailWin.cc_entries();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_cc" style="width: 280px; height: 65px;" multiple></select></td>
+								</tr>
+								<tr>
+									<td></td>
+									<td>{cc_label_cco}</td>
+								</tr>
+								<tr>
+									<td>
+										<table>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_cco_add}" onclick="javascript:ccEmailWin.entries_cco();"></td></tr>
+											<tr><td><input style="width: 90px;" type="button" value="{cc_btn_cco_del}" onclick="javascript:ccEmailWin.cco_entries();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_cco" style="width: 280px; height: 65px;" multiple></select></td>
+								</tr>								
+							</table>
+						</td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td valign="top">
+				<table width="100%" border="0">
+					<tr align="center">
+						<td style="width: 523px">&nbsp;</td>
+						<td style="width: 35px"><input style="width: 70px;" type="button" value="{cc_btn_ok}" onclick="javascript:ccEmailWin.ok();"></td>
+						<td style="width: 35px"><input style="width: 70px;" type="button" value="{cc_btn_cancel}" onclick="javascript:ccEmailWin.close();"></td>
+						<td style="width: 7px"></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td id="cc_email_win_debug"></td>
+		</tr>
+	</table>
+</div>
+
+<!-- BOTTOM DETAILS-->
+<script type="text/javascript">
+	var emailWin_load = document.body.onload;
+	var ccEmailWin, ccEmailWindow;
+	
+	
+	var emailWin_load_f = function(e)
+	{
+		ccEmailWindow = new dJSWin({'id': 'cc_email_window',
+									'content_id': 'cc_email_win',
+									'win_class': 'row_off',
+									'width': '720px',
+									'height': '350px',
+									'title_color': '#3978d6',
+									'title': Element('cc_email_win_title').value,
+									'title_text_color': 'white',
+									'button_x_img': Element('cc_phpgw_img_dir').value+'/winclose.gif',
+									'border': true});
+
+		ccEmailWindow.draw();		
+		ccEmailWin = new ccEmailWinClass({'window': ccEmailWindow});
+		//ccEmailWin.open();
+	}
+
+	if (is_ie)
+	{		
+		document.body.onload = function(e) {emailWin_load ? emailWin_load() : false; emailWin_load_f()};
+	}
+	else
+	{
+		emailWin_load_f();
+	}
+
+</script>
+<!-- END BOTTOM DETAILS-->
Index: /trunk/contactcenter/templates/classic/quickAddPlugin.tpl
===================================================================
--- /trunk/contactcenter/templates/classic/quickAddPlugin.tpl	(revision 2)
+++ /trunk/contactcenter/templates/classic/quickAddPlugin.tpl	(revision 2)
@@ -0,0 +1,31 @@
+<!--
+
+	eGroupWare - Contact Center - Quick Add Plugin Interface Template
+	Copyright (C) 2004 - Raphael Derosso Pereira
+	(raphaelpereira@users.sourceforge.net)
+
+	This file is licensed under the terms of th GNU GPL
+	version 2 or above
+	
+-->
+
+{cc_api}
+
+<div id="ccQuickAddContent" style="position: absolute; visibility: hidden">
+	<input id="ccQAnFields" type="hidden" value="{ccQAnFields}" />
+	<input id="ccQATitle" type="hidden" value="{ccQATitle}" />
+	<input id="ccQAWinHeight" type="hidden" value="{ccQAWinHeight}" />
+	
+	<div style="border: 0px solid #999;">
+		
+		{ccQAFields}
+
+	</div>
+	<div id="ccQAFuncitons" style="border: 0px solid black; width: 220px; height: 20px">
+		<input title="{ccQASave}" type="button" onclick="ccQuickAdd.send();" value="{ccQASave}" style="position: absolute; top: {ccQAFunctionsTop}; left: 55px; width: 60px" />
+		<input title="{ccQAClear}" type="button" onclick="ccQuickAdd.clear();" value="{ccQAClear}" style="position: absolute; top: {ccQAFunctionsTop}; left: 120px; width: 60px" />
+		<input title="{ccQACancel}" type="button" onclick="ccQuickAdd.clear(); ccQuickAdd.window.close();" value="{ccQACancel}" style="position: absolute; top: {ccQAFunctionsTop}; left: 185px; width: 60px" />
+	</div>
+</div>
+
+<script type="text/javascript" src="{ccQAPluginFile}"></script>
Index: /trunk/contactcenter/templates/classic/addGroup.tpl
===================================================================
--- /trunk/contactcenter/templates/classic/addGroup.tpl	(revision 294)
+++ /trunk/contactcenter/templates/classic/addGroup.tpl	(revision 294)
@@ -0,0 +1,65 @@
+<!--
+
+	eGroupWare - Contact Center - Quick Add Plugin Interface Template
+	Copyright (C) 2004 - Raphael Derosso Pereira
+	(raphaelpereira@users.sourceforge.net)
+
+	This file is licensed under the terms of th GNU GPL
+	version 2 or above
+	
+-->
+{cc_api}
+
+<div align="center" id="ccAddGroupContent" style="position: absolute; visibility: hidden">
+	<input id="ccAGnFields" type="hidden" value="{ccAGnFields}" />
+	<input id="ccAGTitle" type="hidden" value="{ccAGTitle}" />
+	<input id="ccAGWinHeightIE" type="hidden" value="{ccAGWinHeightIE}" />
+	<input id="ccAGWinHeightMO" type="hidden" value="{ccAGWinHeightMO}" />
+	<input id="group_id" type="hidden">
+	<br>
+	<table border="0"  cellpadding="0" cellspacing="0" width="100%">
+		<tr height="30">
+			<td  width="17%" valign="center" align="right" nowrap>{txt_name}:</td>
+			<td  valign="center" align="left">&nbsp;&nbsp;{title}</td>
+		</tr>
+ 	</table>			
+	<br><br>			
+	<table border="0" cellpadding="0" cellspacing="0" width="95%">
+		<tr>
+			<td  align="right">
+				<table border="0" cellpadding="0" cellspacing="0">
+					<tr height="30" class="th">
+						<td  align="center">{txt_personal_contacts}</td>					
+					</tr>
+					<tr height="30" class="th">
+						<td  align="right"><span id='span_contact_list'/></td>
+					</tr>
+				</table>
+			</td>
+			<td id="buttons" width="95" align="center">
+				<button type="button" onClick="ccAddGroup.addUser()"><img src="../phpgwapi/templates/celepar/images/add.png" style="vertical-align: middle;" >&nbsp;{txt_add}</button>
+				<br><br>
+				<button type="button" onClick="ccAddGroup.remUser()"><img src="../phpgwapi/templates/celepar/images/rem.png" style="vertical-align: middle;" >&nbsp;{txt_rem}</button> 
+			</td>
+			<td  align="left">
+				<table border="0" cellpadding="0" cellspacing="0">
+					<tr height="30" class="th">
+						<td  align="center">{txt_contacts_in_list}</td>					
+					</tr>
+					<tr height="30" class="th">
+						<td  align="left"><select  id="contact_in_list" multiple name="contact_in_list[]" style="width:280px" size="10"></select></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td align="center" colspan="3">
+					<br>						
+					<input title="{ccAGSave}" type="button" onclick="ccAddGroup.send();" value="{ccAGSave}" />
+					<input title="{ccAGClear}" type="button" onclick="ccAddGroup.clear();" value="{ccAGClear}" />
+					<input title="{ccAGCancel}" type="button" onclick="ccAddGroup.clear(); ccAddGroup.window.close();" value="{ccAGCancel}"/>						
+			</td>
+		</tr>
+	</table>					
+</div>
+<script type="text/javascript" src="{ccAGFile}"></script>
Index: /trunk/contactcenter/templates/classic/config.tpl
===================================================================
--- /trunk/contactcenter/templates/classic/config.tpl	(revision 285)
+++ /trunk/contactcenter/templates/classic/config.tpl	(revision 285)
@@ -0,0 +1,119 @@
+<!-- BEGIN header -->
+<form method="POST" action="{action_url}">
+<table border="0" align="center">
+	<tr class="th">
+		<td colspan="2"><font color="{th_text}">&nbsp;<b>{title}</b></font></td>
+	</tr>
+	<tr>
+   		<td></td>
+	</tr>
+	<tr>
+		<td colspan="2"><b>{error}</b></td>
+	</tr>
+   <tr>
+   	<td></td>
+   </tr>
+<!-- END header -->
+<!-- BEGIN body -->
+	<tr class="th">
+		<td colspan="2" align="center"><b>{lang_ContactCenter_Global_Catalogue_Setup}</b></td>
+	</tr>
+	<tr>
+   		<td></td>
+	</tr>
+	<tr class="row_off">
+		<td>{lang_Select_where_your_Global_Catalogue_is}:</td>
+		<td>
+			<select name="newsettings[cc_global_source0]">
+				<option value="sql" {selected_cc_global_source0_sql}>SQL</option>
+				<option value="ldap" {selected_cc_global_source0_ldap}>LDAP</option>
+			</select>
+		</td>
+	</tr>
+	<tr class="row_on">
+		<td>{lang_Catalog_Name}:</td>
+		<td><input name="newsettings[cc_catalog_name]" value="{value_cc_catalog_name}" size="40" /></td>
+	</tr>
+	<tr class="row_off">
+		<td>{lang_LDAP_Host}:</td>
+		<td><input name="newsettings[cc_ldap_host0]" value="{value_cc_ldap_host0}" size="40" /></td>
+	</tr>
+	<tr class="row_on">
+		<td>{lang_LDAP_Context}:</td>
+		<td><input name="newsettings[cc_ldap_context0]" value="{value_cc_ldap_context0}" size="40" /></td>
+	</tr>
+	<tr class="row_off">
+		<td>{lang_Account_DN_to_be_used_when_browsing_LDAP}:</td>
+		<td><input name="newsettings[cc_ldap_browse_dn0]" value="{value_cc_ldap_browse_dn0}" size="40" /></td>
+	</tr>
+	<tr class="row_on">
+		<td>{lang_Password_for_the_account_above_(if_any)}:</td>
+		<td><input name="newsettings[cc_ldap_pw0]" type="password" value="" size="40" /></td>
+	</tr>
+	<tr class="row_off">
+		<td>Abrir Consulta Automática :</td>
+		<td>
+			<select name="newsettings[cc_ldap_query_automatic]">
+				<option value="true" {selected_cc_ldap_query_automatic_true}>Sim</option>	
+				<option value="false" {selected_cc_ldap_query_automatic_false}>Não</option>							
+			</select>
+		</td>
+	</tr>
+  
+  <!-- <tr class="row_on">
+  	<td>{lang_objectClass_to_be_used_as_a_Contact}:</td>
+  	<td>
+  		<select name="newsettings[cc_ldap_objectclass0]">
+			<option value="op_iop" {selected_cc_ldap_objectclass0}>organizationalPerson+inetOrgPerson</option>
+      		<option value="custom" {selected_cc_ldap_objectclass0}>{lang_Custom} {lang_(Not_implemented_yet)}</option>
+      	</select>
+  </tr>
+	<tr class="row_off">
+		<td>{lang_Custom_objectClass_name}:<br>
+			<span style="font-size: 10px;">{lang_(if_your_LDAP_contact_has_multiple_objectClass_attributes,_enter_just_one!)}</span></td>
+		<td><input name="newsettings[cc_ldap_custom_objectclass0]" type="text" value="{value_cc_ldap_custom_objectclass0}" size="40"></td>
+	</tr>
+	
+	<tr class="th"><td colspan="2" align="center"><b>{lang_Custom_LDAP_objectClass_Fields_association}</b></td></tr>
+	
+	<tr class="row_on" style="font-weight: bold;">
+	<td>{lang_ContactCenter_Field}</td><td>{lang_LDAP_field}</td>
+	</tr>
+	<tr class="row_off">
+		<td>{lang_Contact_Photo}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_photo0]" value="{value_cc_ldap_ass_photo0}"></td>
+	</tr>
+	<tr>
+		<td>{lang_Contact_Alias}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_alias0]" value="{value_cc_ldap_ass_alias0}"></td>
+	</tr>
+	<tr>
+		<td>{lang_Contact_Prefix}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_prefix0]" value="{value_cc_ldap_ass_prefix0}"></td>
+	</tr>
+	<tr>
+		<td>{lang_Contact_Given_Names}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_given0]" value="{value_cc_ldap_ass_given0}"></td>
+	</tr>
+	<tr>
+		<td>{lang_Contact_Family_Names}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_family0]" value="{value_cc_ldap_ass_family0}"></td>
+	</tr>
+	<tr>
+		<td>{lang_Contact_Full_Name}:</td>
+		<td><input type="text" size="40" name="newsettings[cc_ldap_ass_fulln0]" value="{value_cc_ldap_ass_fulln0}"></td>
+	</tr>-->
+<!-- END body -->
+<!-- BEGIN footer -->
+	<tr class="th">
+		<td colspan="2">&nbsp;</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center">
+			<input type="submit" name="submit" value="{lang_submit}">
+			<input type="submit" name="cancel" value="{lang_cancel}">
+		</td>
+	</tr>
+</table>
+</form>
+<!-- END footer -->
Index: /trunk/contactcenter/templates/classic/index.tpl
===================================================================
--- /trunk/contactcenter/templates/classic/index.tpl	(revision 752)
+++ /trunk/contactcenter/templates/classic/index.tpl	(revision 752)
@@ -0,0 +1,253 @@
+<link rel="stylesheet" type="text/css" href="{cc_css}">
+<style>	
+	.special{
+		cursor:pointer;
+		cursor:hand;
+		position:relative; 
+		top:0px; 
+		left:0px;
+		color: #006699; 
+		background-color:#DCDCDC;
+	}
+</style>
+<script src="js/cc.js" type="text/javascript"></script>
+<!-- JS MESSAGES -->
+<input id="cc_msg_not_allowed" type="hidden" value="{cc_msg_not_allowed}">
+<input id="cc_msg_unavailable" type="hidden" value="{cc_msg_unavailable}">
+<input id="cc_msg_no_cards" type="hidden" value="{cc_msg_no_cards}">
+<input id="cc_msg_err_no_room" type="hidden" value="{cc_msg_err_no_room}">
+<input id="cc_root_dir" type="hidden" value="{cc_root_dir}">
+<input id="cc_msg_card_new" type="hidden" value="{cc_msg_card_new}">
+<input id="cc_msg_card_edit" type="hidden" value="{cc_msg_card_edit}">
+<input id="cc_msg_group" type="hidden" value="{cc_msg_group}">
+<input id="cc_msg_contact_full" type="hidden" value="{cc_msg_contact_full}">
+<input id="cc_msg_contact_qa" type="hidden" value="{cc_msg_contact_qa}">
+<input id="cc_msg_card_remove" type="hidden" value="{cc_msg_card_remove}">
+<input id="cc_msg_card_remove_confirm" type="hidden" value="{cc_msg_card_remove_confirm}">
+<input id="cc_send_mail" type="hidden" value="{cc_send_mail}">
+<input id="cc_msg_group_edit" type="hidden" value="{cc_msg_group_edit}">	
+<input id="cc_msg_group_remove" type="hidden" value="{cc_msg_group_remove}">
+<input id="cc_msg_group_remove_confirm" type="hidden" value="{cc_msg_group_remove_confirm}">
+<input id="cc_panel_search_text" type="hidden" value="{cc_panel_search}" style="cursor: pointer; cursor: hand;" onclick="javascript:ccSearch()" />
+<input id="cc_msg_close_win" type="hidden" value="{cc_msg_close_win}">
+<input id="cc_msg_import_contacts" type="hidden" value="{cc_msg_import_contacts}">
+<input id="cc_msg_export_contacts" type="hidden" value="{cc_msg_export_contacts}">
+<input id="cc_msg_expresso_info_csv" type="hidden" value="{cc_msg_expresso_info_csv}">
+<input id="cc_msg_choose_file_type" type="hidden" value="{cc_msg_choose_file_type}">
+<input id="cc_msg_outlook_express" type="hidden" value="{cc_msg_outlook_express}">
+<input id="cc_msg_outlook2k" type="hidden" value="{cc_msg_outlook2k}">
+<input id="cc_msg_expresso_default" type="hidden" value="{cc_msg_expresso_default}">
+<input id="cc_msg_choose_contacts_file" type="hidden" value="{cc_msg_choose_contacts_file}">
+<input id="cc_msg_close" type="hidden" value="{cc_msg_close}">
+<input id="cc_msg_ie_personal" type="hidden" value="{cc_msg_ie_personal}">
+<input id="cc_msg_import_fail" type="hidden" value="{cc_msg_import_fail}">
+<input id="cc_msg_export_csv" type="hidden" value="{cc_msg_export_csv}">		   
+<input id="cc_msg_automatic" type="hidden" value="{cc_msg_automatic}">
+<input id="cc_msg_importing_contacts" type="hidden" value="{cc_msg_importing_contacts}">
+<input id="cc_msg_import_finished" type="hidden" value="{cc_msg_import_finished}">
+<input id="cc_msg_invalid_csv" type="hidden" value="{cc_msg_invalid_csv}">
+<input id="cc_msg_new" type="hidden" value="{cc_msg_new}">
+<input id="cc_msg_failure" type="hidden" value="{cc_msg_failure}">
+<input id="cc_msg_exists" type="hidden" value="{cc_msg_exists}">
+<input id="cc_msg_show_more_info" type="hidden" value="{cc_msg_show_more_info}">
+<input id="cc_msg_clean" type="hidden" value="{cc_msg_clean}">
+<input id="cc_msg_choose_valid_csv" type="hidden" value="{cc_msg_choose_valid_csv}">
+<input id="cc_msg_export_error" type="hidden" value="{cc_msg_export_error}">
+<input id="cc_msg_new_email" type="hidden" value="{cc_msg_new_email}">
+<input id="cc_msg_main" type="hidden" value="{cc_msg_main}">
+<input id="cc_msg_alternative" type="hidden" value="{cc_msg_alternative}">
+<input id="cc_msg_select_email" type="hidden" value="{cc_msg_select_email}">
+<input id="cc_msg_new_phone" type="hidden" value="{cc_msg_new_phone}">
+<input id="cc_msg_home" type="hidden" value="{cc_msg_home}">
+<input id="cc_msg_cellphone" type="hidden" value="{cc_msg_cellphone}">
+<input id="cc_msg_work" type="hidden" value="{cc_msg_work}">
+<input id="cc_msg_fax" type="hidden" value="{cc_msg_fax}">
+<input id="cc_msg_pager" type="hidden" value="{cc_msg_pager}">
+<input id="cc_msg_choose_phone" type="hidden" value="{cc_msg_choose_phone}">
+<input id="cc_msg_warn_firefox" type="hidden" value="{cc_msg_warn_firefox}">
+<input id="cc_msg_firefox_half1" type="hidden" value="{cc_msg_firefox_half1}">
+<input id="cc_msg_firefox_half2" type="hidden" value="{cc_msg_firefox_half2}">
+<input id="cc_msg_click_close" type="hidden" value="{cc_msg_click_close}">
+<input id="cc_msg_install_now" type="hidden" value="{cc_msg_install_now}">
+<input id="cc_msg_install_new_firefox" type="hidden" value="{cc_msg_install_new_firefox}">
+<input id="cc_msg_close" type="hidden" value="{cc_msg_close}">
+<input id="cc_msg_outlook_express_pt" type="hidden" value="{cc_msg_outlook_express_pt}">
+<input id="cc_msg_outlook_express_en" type="hidden" value="{cc_msg_outlook_express_en}">
+<input id="cc_msg_outlook_2k_pt" type="hidden" value="{cc_msg_outlook_2k_pt}">
+<input id="cc_msg_outlook_2k_en" type="hidden" value="{cc_msg_outlook_2k_en}">
+<input id="cc_msg_moz_thunderbird" type="hidden" value="{cc_msg_moz_thunderbird}">
+<input id="cc_msg_expresso_default_csv" type="hidden" value="{cc_msg_expresso_default_csv}">
+<input id="cc_msg_copy_to_catalog" type="hidden" value="{cc_msg_copy_to_catalog}">
+<input id="cc_msg_fill_field_name" type="hidden" value="{cc_msg_fill_field_name}">
+<input id="cc_msg_add_contact_to_group" type="hidden" value="{cc_msg_add_contact_to_group}">
+
+
+ <!-- END JS MESSAGES -->
+ <input id="cc_type_contact" 	type="hidden">
+ <input id="cc_participants" 	type="hidden"  value="{cc_participants}">
+ 
+ <input id="cc_qa_alias" 		type="hidden" value="{cc_qa_alias}">
+ <input id="cc_qa_given_names" 	type="hidden" value="{cc_qa_given_names}">
+ <input id="cc_qa_family_names" type="hidden" value="{cc_qa_family_names}">
+ <input id="cc_qa_phone" 		type="hidden" value="{cc_qa_phone}">
+ <input id="cc_qa_email"		type="hidden" value="{cc_qa_email}">
+ 
+ <input id="cc_qa_save" 		type="hidden" value="{cc_qa_save}">
+ <input id="cc_qa_close"		type="hidden" value="{cc_qa_close}">
+ 
+ <input id="cc_empty" 			type="hidden"  value="{cc_empty}">
+  <!-- VIEW CARDS -->
+<table id="cc_main" width="100%" border="0" style="border: 0px solid #999;" cellpadding="1" cellspacing="1">
+	<tr width="100%">
+		<td id="cc_left" width="150px" valign="top" style="border: 0px solid #999;" height="100%">
+			<table id="cc_left_main" width="100%" height="100%" cellpadding="1" cellspacing="1" border="0">
+				<!-- __TREE -->
+				<tr>
+					<td class="th" align="center" valign="top">{cc_catalogs}</td>
+				</tr>
+				<tr>
+					<td width="150px" height="100%" align="left" valign="top"> 
+						<div id="cc_tree" style="overflow:auto;position:relative; width: 150px;border: 0px solid #999;"></div>
+					</td>
+				</tr>
+				<!-- __END TREE -->
+			</table>
+		</td>
+		<td id="cc_right" width="100%" align="center" valign="top" style="border: 0px solid #999;" height="auto">
+			<table width="100%" border="0"  cellpadding="0" cellspacing="0">
+			<!-- ___PANEL -->
+			<!--	<tr>
+					<td align="center" colspan="5">
+						<table width="100%" border="0">
+							<tr valign="top">
+								<td id="show_view_cards_tab_0" class="tab_box_active" onclick="show_view_cards_tab(0);">{cc_view_name}</td>
+								<td id="show_view_cards_tab_1" class="tab_box" onclick="show_view_cards_tab(1);">{cc_view_company}</td>
+								<td id="show_view_cards_tab_2" class="tab_box" onclick="show_view_cards_tab(2);">{cc_view_location}</td>
+							</tr>
+						</table>
+					</td>
+				</tr>-->
+				<tr align="left">
+					<td align="left">															
+					<input id="cc_button_new" onMouseOver="if(!menuStarted) menu();menu.onmouseover()" onMouseOut="menu.onmouseout()"  value="{cc_btn_new}" type="button">					
+					<div id="cc_panel_search_call" style="display: inline"></div>
+					<div id="cc_panel_table" style="display: none; text-align: right">
+					<input type="button" value="{cc_panel_table}" class="tab_box" style="cursor: pointer; cursor: hand;" onclick="javascript: ccChangeVisualization('table')" />
+					</div>
+					<div id="cc_panel_cards" style="display: inline; text-align: right">
+					<input type="button" value="{cc_panel_cards}" class="tab_box" style="cursor: pointer; cursor: hand;" onclick="javascript: ccChangeVisualization('cards')" />					
+					</div>
+					</td>
+					<td align="right">
+					<input id="cc_button_tools" value="{cc_btn_import_export}" type="button" onclick="javascript:ccIEContacts.showList()">
+					</td>
+				</tr>
+				<tr>
+					<td align="center" colspan="2">
+					<div id="cc_panel_letters" style="display:inline">
+						<table width="100%" border="0">
+							<tr valign="top">
+								<td id="cc_letter_0" class="letter_box" onclick="showCards('number', getActualPage()); selectLetter(0);">123...</td>
+								<td id="cc_letter_1" class="letter_box_active" onclick="showCards('a', getActualPage()); selectLetter(1);">A</td>
+								<td id="cc_letter_2" class="letter_box" onclick="showCards('b', getActualPage()); selectLetter(2);">B</td>
+								<td id="cc_letter_3" class="letter_box" onclick="showCards('c', getActualPage()); selectLetter(3);">C</td>
+								<td id="cc_letter_4" class="letter_box" onclick="showCards('d', getActualPage()); selectLetter(4);">D</td>
+								<td id="cc_letter_5" class="letter_box" onclick="showCards('e', getActualPage()); selectLetter(5);">E</td>
+								<td id="cc_letter_6" class="letter_box" onclick="showCards('f', getActualPage()); selectLetter(6);">F</td>
+								<td id="cc_letter_7" class="letter_box" onclick="showCards('g', getActualPage()); selectLetter(7);">G</td>
+								<td id="cc_letter_8" class="letter_box" onclick="showCards('h', getActualPage()); selectLetter(8);">H</td>
+								<td id="cc_letter_9" class="letter_box" onclick="showCards('i', getActualPage()); selectLetter(9);">I</td>
+								<td id="cc_letter_10" class="letter_box" onclick="showCards('j', getActualPage()); selectLetter(10);">J</td>
+								<td id="cc_letter_11" class="letter_box" onclick="showCards('k', getActualPage()); selectLetter(11);">K</td>
+								<td id="cc_letter_12" class="letter_box" onclick="showCards('l', getActualPage()); selectLetter(12);">L</td>
+								<td id="cc_letter_13" class="letter_box" onclick="showCards('m', getActualPage()); selectLetter(13);">M</td>
+								<td id="cc_letter_14" class="letter_box" onclick="showCards('n', getActualPage()); selectLetter(14);">N</td>
+								<td id="cc_letter_15" class="letter_box" onclick="showCards('o', getActualPage()); selectLetter(15);">O</td>
+								<td id="cc_letter_16" class="letter_box" onclick="showCards('p', getActualPage()); selectLetter(16);">P</td>
+								<td id="cc_letter_17" class="letter_box" onclick="showCards('q', getActualPage()); selectLetter(17);">Q</td>
+								<td id="cc_letter_18" class="letter_box" onclick="showCards('r', getActualPage()); selectLetter(18);">R</td>
+								<td id="cc_letter_19" class="letter_box" onclick="showCards('s', getActualPage()); selectLetter(19);">S</td>
+								<td id="cc_letter_20" class="letter_box" onclick="showCards('t', getActualPage()); selectLetter(20);">T</td>
+								<td id="cc_letter_21" class="letter_box" onclick="showCards('u', getActualPage()); selectLetter(21);">U</td>
+								<td id="cc_letter_22" class="letter_box" onclick="showCards('v', getActualPage()); selectLetter(22);">V</td>
+								<td id="cc_letter_23" class="letter_box" onclick="showCards('w', getActualPage()); selectLetter(23);">W</td>
+								<td id="cc_letter_24" class="letter_box" onclick="showCards('x', getActualPage()); selectLetter(24);">X</td>
+								<td id="cc_letter_25" class="letter_box" onclick="showCards('y', getActualPage()); selectLetter(25);">Y</td>
+								<td id="cc_letter_26" class="letter_box" onclick="showCards('z', getActualPage()); selectLetter(26);">Z</td>
+								<td id="cc_letter_27" class="letter_box" onclick="showCards('all', getActualPage()); selectLetter(27);">{cc_all}</td>
+							</tr>
+						</table>
+					</div>
+					<div id="cc_panel_search" style="display: none">
+						<table width="100%" border="0">
+							<tr valign="top">
+								<td class="letter_box" colspan="2" style="width: 10%" onclick="ccSearchHide()">123ABC...</td>
+								<td class="letter_box_active" style="text-align: center; text-valign: middle">{cc_panel_search_found}</td>
+							</tr>
+						</table>
+					</div>
+					</td>
+				</tr>
+				<tr class="th">
+					<td colspan="2">
+						<table cellpadding="0" cellspacing="0" width="100%" border="0">
+							<tr>
+								<td>
+									<table bgcolor="#D3DCE3" cellspacing="0" cellpadding="0" border="0">
+										<tr>
+											<td align="left" valign="middle"><span id="cc_panel_arrow_first"><img src="templates/default/images/first-grey.png" border="0" alt="{cc_panel_first_page}" hspace="2" onclick="javascript:false"/></span></td>
+										</tr>
+									</table>
+								</td>
+								<td width="2%" align="right" valign="center">
+									<table bgcolor="#D3DCE3" cellspacing="0" cellpadding="0" border="0">
+										<tr>
+											<td align="left" valign="middle"><span id="cc_panel_arrow_previous"><img src="templates/default/images/left-grey.png" border="0" alt="{cc_panel_previous_page}" hspace="2" onclick="" /></span></td>
+										</tr>
+									</table>
+								</td>
+								<td align="center" bgcolor="#D3DCE3" valign="center" width="92%">
+									<table bgcolor="#D3DCE3" cellspacing="0" cellpadding="0" border="0">
+										<tr>
+											<td id="cc_panel_pages"></td>
+										</tr>
+									</table>
+								</td>
+								<td width="2%" align="left" valign="center">
+									<table bgcolor="#D3DCE3" cellspacing="0" cellpadding="0" border="0">
+										<tr>
+											<td align="left" valign="middle"><span id="cc_panel_arrow_next"><img src="templates/default/images/right-grey.png" border="0" alt="{cc_panel_next_page}" hspace="2" /></span></td>
+										</tr>
+									</table>
+								</td>
+								<td width="2%" align="right" valign="center">
+									<table bgcolor="#D3DCE3" cellspacing="0" cellpadding="0" border="0">
+										<tr>
+											<td align="left" valign="middle"><span id="cc_panel_arrow_last"><img src="templates/default/images/last-grey.png" border="0" alt="{cc_panel_last_page}" hspace="2" /></span></td>
+										</tr>
+									</table>			
+								</td>
+							</tr>
+						</table>
+					</td>
+				</tr>
+				<!-- ___END PANEL -->
+				<!-- __CARDS -->				
+				<tr>
+					<td style="border: 0px solid #666;" id="cc_card_space" width="100%" height="auto" valign="top" align="center" colspan="4"></td>
+				</tr>												
+				<!-- __END CARDS -->
+			</table>
+		</td>
+	</tr>
+</table>
+	<div id="Layer1" style="position:absolute; top:178px; left:183px;width:auto; padding:2px; z-index:100000; background-color:#F2F3ED; border:1px solid #999999;visibility:hidden"></div>
+	<div id="debug_layer" style="position:absolute;width:0px;height:0px;display:none"></div>
+<!-- _END VIEW CARDS -->
+<!-- BOTTOM DETAILS-->
+<script type="text/javascript" src="js/moo.fx.js"></script>
+<script type="text/javascript" src="js/ccListParticipants.js"></script>
+<script type="text/javascript" src="js/ccQuickAddContact.js"></script>
+<script type="text/javascript" src="js/ccIEContacts.js"></script>
+<script type="text/javascript" src="js/ccMain.js"></script>
+<!-- END BOTTOM DETAILS-->						
Index: /trunk/contactcenter/templates/classic/full_add.tpl
===================================================================
--- /trunk/contactcenter/templates/classic/full_add.tpl	(revision 575)
+++ /trunk/contactcenter/templates/classic/full_add.tpl	(revision 575)
@@ -0,0 +1,298 @@
+{cc_api}
+
+<!-- JS MESSAGES -->
+<!--input id="cc_msg_err_empty_field" type="hidden" value="{cc_msg_err_empty_field}"-->
+<!--input id="cc_msg_type_state" type="hidden" value="{cc_msg_type_state}"-->
+<!--input id="cc_msg_type_city" type="hidden" value="{cc_msg_type_city}"-->
+<!-- END JS MESSAGES -->
+
+
+<!-- WINDOW CONTACT -->
+<iframe id="cc_photo_frame" style="position: absolute; top: 0px; left: 0px; visibility:hidden"></iframe>
+<input id="cc_contact_title" type="hidden" value="{cc_contact_title}">
+<input id="cc_contact_personal" type="hidden" value="{cc_contact_personal}">
+<input id="cc_contact_addrs" type="hidden" value="{cc_contact_addrs}">
+<input id="cc_contact_conns" type="hidden" value="{emails_telephones}">
+<input id="cc_pd_full_name" name="{cc_pd_full_name}" type="hidden">
+<input id="cc_pd_sex" name="{cc_pd_sex}" type="hidden">
+<input id="cc_addr_other" name="{cc_addr_other}" type="hidden">
+<input id="cc_addr_po_box" name="{cc_addr_po_box}" type="hidden">
+<!-- _PERSONAL DATA -->
+<div id="cc_contact_tab_0" class="row_off div_cc_contact_tab" style="left:-498;top:-347;position: absolute;visibility: hidden;height:197px">
+	<form id="cc_full_add_form_personal">
+	<input id="cc_full_add_contact_id" type="text" style="display: none">
+	<table align="center" width="498px" height="197px" class="row_off" border="0">
+		<tr class="row_off">
+			<td align="right">{cc_pd_select_photo}:</td>
+			<td align="left" colspan="2">
+				<!-- Mozilla Method -->
+				<input id="cc_pd_select_photo" type="file" accept="image/gif,image/jpeg,image/png" name="cc_pd_photo" onchange="Element('cc_pd_photo').src = 'file://'+Element('cc_pd_select_photo').value">
+				<!-- IE Method -->
+				<input id="cc_pd_select_photo_t" type="text" name="cc_pd_select_photo_t" readonly>
+				<input id="cc_pd_select_photo_b" type="button" style="width: 60px" value="{cc_pd_select_photo_b}" onclick="Element('cc_photo_frame').contentWindow.document.all['cc_photo_input'].click();">
+			</td>
+			<td align="center" colspan="2" rowspan="3"><img id="cc_pd_photo" src="templates/default/images/photo.png" border="0" width="60px" height="80px"></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_pd_alias}:</td>
+			<td align="left" colspan="2"><input id="cc_pd_alias" name="{cc_pd_alias}" type="text" style="width:175px;z-index:-1" value="" maxlength=""></td>
+		</tr>
+		<tr style="display:none" class="row_off">
+			<td align="right">{cc_pd_prefix}:</td>
+			<td align="left" colspan="2"><select id="cc_pd_prefix" name="{cc_pd_prefix}" style="width: 175px;"><option value='0'>{cc_pd_choose_prefix}</option></select></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_pd_given_names}:</td>
+			<td align="left" colspan="2"><input id="cc_pd_given_names" name="{cc_pd_given_names}" type="text" style="width: 175px;" value="" maxlength=""></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_pd_family_names}:</td>
+			<td align="left"><input id="cc_pd_family_names" name="{cc_pd_family_names}" type="text" style="width: 175px;" value="" maxlength=""></td>
+			<td align="right">{cc_pd_birthdate}:</td>
+			<td align="left">
+				<input id="cc_pd_birthdate_0" style="text-align: center;" title="{cc_pd_birthdate_0}" name="{cc_pd_birthdate_0}" type="text" maxlength="{cc_pd_birth_size_0}" size="{cc_pd_birth_size_0}">
+				<input id="cc_pd_birthdate_1" style="text-align: center;" title="{cc_pd_birthdate_1}" name="{cc_pd_birthdate_1}" type="text" maxlength="{cc_pd_birth_size_1}" size="{cc_pd_birth_size_1}">
+				<input id="cc_pd_birthdate_2" style="text-align: center;" title="{cc_pd_birthdate_2}" name="{cc_pd_birthdate_2}" type="text" maxlength="{cc_pd_birth_size_2}" size="{cc_pd_birth_size_2}">
+			</td>
+		</tr>
+		<tr style="display:none" class="row_off">
+			<td align="right">{cc_pd_suffix}:</td>
+			<td align="left" colspan="3"><select id="cc_pd_suffix" name="{cc_pd_suffix}" style="width: 175px;"><option value="0">{cc_pd_choose_suffix}</option></select></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_pd_gpg_finger_print}:</td>
+			<td colspan="3" align="left"><input id="cc_pd_gpg_finger_print" name="{cc_pd_gpg_finger_print}" type="text" style="width: 350px;" value="" maxlength=""></td>
+		</tr>
+		<tr class="row_off">
+			<td align="right">{cc_pd_notes}:</td>
+			<td colspan="3" align="left"><textarea id="cc_pd_notes" name="{cc_pd_notes}" style="width: 350px; height: 60px;"></textarea></td>
+		</tr>
+	</table>
+	</form>
+</div>
+
+<!-- _ADDRESSES -->
+<div id="cc_contact_tab_1" class="row_off div_cc_contact_tab" style="position: absolute; visibility: hidden;height:197px;">
+	<form id="cc_full_add_form_addrs">
+	<table align="center" width="498px" height="197px" border="0">
+		<tr class="row_off">
+			<td align="right">{cc_addr_types}:</td>
+			<td align="left" colspan="3">
+				<select id="cc_addr_types" name="{cc_addr_types}" style="width: 200px;" onchange="updateAddressFields()">
+					<option value="_NONE_">{cc_addr_choose_types}</option>
+				</select>
+			</td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_addr_countries}:</td>
+			<td align="left" colspan="3">
+				<select id="cc_addr_countries" name="{cc_addr_countries}" style="width: 200px;" onchange="updateAddrStates()">
+					<option value="_NONE_">{cc_addr_choose_countries}</option>
+					{cc_addr_country_list}
+				</select>
+			</td>
+		</tr>
+		<tr class="row_off">
+			<td align="right">{cc_addr_states}:</td>
+			<td align="left" colspan="3">
+				<select id="cc_addr_states" name="{cc_addr_states}" style="width: 200px;" onchange="updateAddrCities();">
+					<option value="_NONE_">{cc_addr_choose_states}</option>
+				</select>
+				<input id="cc_addr_states_new" style="display:none;width: 150px;" type="text" onmouseover="updateAddrNewStateOnMouseOver();" onmouseout="updateAddrNewStateOnMouseOut();">
+			</td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_addr_cities}:</td>
+			<td align="left" colspan="3">
+				<select id="cc_addr_cities" style="width: 200px;" onchange="updateAddrFillingFields();">
+					<option value="_NONE_">{cc_addr_choose_cities}</option>
+				</select>
+				<input id="cc_addr_cities_new" style="display:none;width: 150px;" type="text" onmouseover="updateAddrNewCityOnMouseOver();" onmouseout="updateAddrNewCityOnMouseOut();">
+			</td>
+		</tr>
+		<tr class="row_off">
+			<td align="right">{cc_addr_1}:</td>
+			<td align="left"><input id="cc_addr_1" name="{cc_addr_1}" style="width: 200px;" type="text" name="" value=""></td>
+			<td align="right">{cc_addr_complement}:</td>
+			<td align="left"><input id="cc_addr_complement" name="{cc_addr_complement}" style="width: 100px;" type="text" name="" value=""></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right">{cc_addr_2}:</td>
+			<td align="left"><input id="cc_addr_2" name="{cc_addr_2}" style="width: 200px;" type="text" name="" value=""></td>
+			<td align="right">{cc_addr_postal_code}:</td>
+			<td align="left"><input id="cc_addr_postal_code" name="{cc_addr_postal_code}"style="width: 70px;" type="text" name="" value=""></td>
+		</tr>
+		<tr class="row_off">
+			<td align="right">{cc_addr_is_default}:</td>
+			<td colspan="3" align="left"><input id="cc_addr_is_default" type="checkbox" name=""></td>
+		</tr>
+		<tr style="visibility: hidden; position: absolute;">
+			<td><input id="cc_addr_id" type="hidden"></td>
+		</tr>
+	</table>
+	</form>
+</div>
+
+<!-- _CONNECTIONS -->
+<div id="cc_contact_tab_2" class="row_off div_cc_contact_tab" style="position: absolute; visibility: hidden;height:247px;width:498px">
+	<table align="left" width="100%"  height="247px" border=0>
+	<tbody>
+		<tr class="th" width="100%" align="center" height="10px">
+			<td width="60px" noWrap><input type="radio"  name="cc_conn_type" id="cc_conn_type_1" value="Email" onclick="javascript:updateConnFields();">{email}</td>
+			<td width="60px" noWrap><input type="radio" name="cc_conn_type" id="cc_conn_type_2" value="Telefone" onclick="javascript:updateConnFields();">{telephone}</td>
+			<td width="*" align="left"><select style="width:160px" id="cc_conn_type_sel" onchange="javascript:connAddNewLine();"><option value="-1">{choose_email_telephone}</option></select></td>
+		</tr>
+		<tr class="row_off">			
+			<td valign="top" colspan="4" width="100%" style="border: 0px solid black" cellpadding="0" cellspacing="0">
+				<table align="left" width="100%" style="border: 0px solid black">
+				<tbody id="cc_conn">&nbsp;
+					<!-- Code inside here is inserted dynamically -->
+				</tbody>				
+				</table>
+			</td>
+		</tr>
+	</tbody>
+	<tbody>
+		<tr>
+			<td align="center" colspan="4">&nbsp;</td>
+		</tr>
+	</tbody>
+	</table>
+	<div style="z-index:10000;position: absolute;display:none; top: 170px; left: 78px;" id="div_cc_conn_is_default"> {cc_default} &nbsp;<select id="cc_email_default" name="cc_email_default" disabled style="display:none"></select><select id="cc_phone_default" name="cc_phone_default" disabled style="display:none"></select></div>
+</div>
+<!-- _BOTTOM BUTTONS -->
+<div align="center" id="cc_contact_tab_buttons" style="position: absolute; visibility: hidden; top: 250px; left: 0px; width: 498px; height: 32px; border: 0px solid black">	
+	<table class="row_off" align="center" width="498px" cellpadding="2" cellspacing="0" border="0">
+		<tr>
+			<td align="center">
+				<input id="cc_contact_save" style="width: 100px;" type="button" value="{cc_contact_save}" onclick="javascript:postFullAdd();">
+				<input id="cc_contact_reset" style="width: 100px;" type="button" value="{cc_contact_reset}" onclick="javascript:resetFullAdd();">
+				<input id="cc_contact_cancel" style="width: 100px;" type="button" value="{cc_contact_cancel}" onclick="javascript:closeFullAdd();">
+			</td>
+		</tr>
+	</table>
+</div>
+
+<script type="text/javascript">
+<!--
+//	Overloading some methods for fix cursor problem in Firefox.
+	if(!is_ie) { 
+		dJSWin.prototype.close = function() {		
+			dJSWin.state = 0;
+			dd.elements[this.title.id].hide();
+			if ( dd_div = document.getElementById('divScrollMain'))	
+				Element("divScrollMain").style.overflow = 'auto';	
+		}
+		dJSWin.prototype.open = function() {
+			this.moveTo(window.innerWidth/2 + window.pageXOffset - dd.elements[this.title.id].w/2,
+			    window.innerHeight/2 + window.pageYOffset - dd.elements[this.clientArea.id].h/2);
+			dd.elements[this.title.id].maximizeZ();
+			dd.elements[this.title.id].show();
+			if ( dd_div = document.getElementById('divScrollMain'))
+				dd_div.style.overflow = 'hidden';
+		}
+	}	
+		
+	var fullAdd_onload = document.body.onload;
+	var tabs;
+	var fullAddWin;
+	var photo_frame, photo_form, photo_input;	
+
+	__f = function(e)
+	{
+		
+		tabs = new dTabsManager({'id': 'cc_contact_tab', 'width': '500px'});
+		
+		tabs.addTab({'id': 'cc_contact_tab_0', 
+					 'name': Element('cc_contact_personal').value, 
+					 'selectedClass': 'tab_box_active', 
+					 'unselectedClass': 'tab_box'});
+					 
+		tabs.addTab({'id': 'cc_contact_tab_2', 
+					 'name': Element('cc_contact_conns').value, 
+					 'selectedClass': 'tab_box_active', 
+					 'unselectedClass': 'tab_box'});
+
+		tabs.addTab({'id': 'cc_contact_tab_1', 
+					 'name': Element('cc_contact_addrs').value, 
+					 'selectedClass': 'tab_box_active', 
+					 'unselectedClass': 'tab_box'});					 
+
+		fullAddWin = new dJSWin({'id': 'cc_full_add_window',
+		                         'content_id': 'cc_contact_tab',
+					 'win_class': 'row_off',
+					 'width': '500px',
+					 'height': '273px',
+					 'title_color': '#3978d6',
+					 'title': Element('cc_contact_title').value,
+					 'title_text_color': 'white',
+					 'button_x_img': Element('cc_phpgw_img_dir').value+'/winclose.gif',
+					 'include_contents': new Array('cc_contact_tab_0', 'cc_contact_tab_1', 'cc_contact_tab_2','cc_contact_tab_buttons'),
+					 'border': true});
+
+		fullAddWin.draw();
+
+		if (is_ie)
+		{
+			Element('cc_photo_frame').src = 'cc_photo_frame.html';
+			Element('cc_pd_select_photo').style.display='none';
+			fullAddWin.open();
+			tabs._showTab('cc_contact_tab_0');
+			fullAddWin.close();
+		}
+		else
+		{
+			Element('cc_pd_select_photo_t').style.display='none';
+			Element('cc_pd_select_photo_b').style.display='none';			
+		}
+		
+	};
+
+	if (is_ie) // || is_moz1_6)
+	{
+			
+		document.body.onload = function(e) { setTimeout('__f()', 10); fullAdd_onload ? setTimeout('fullAdd_onload()'): false;};
+	}
+	else
+	{
+//		__f();
+	}
+
+//-->
+</script>
+<!-- END WINDOW CONTACT -->
+
+
+
+
+
+
+
+
+
+
+<!-- RELATIONS 
+<div id="cc_contact_tab_3" class="row_off div_cc_contact_tab">
+	<table align="center" width="500px" height="100%" cellpadding="2" cellspacing="0" border="0">
+		<tr class="row_off">
+			<td align="right"><input style="width: 240px;" type="text"></td>
+			<td align="left"><input style="width: 150px;" type="button" value="{cc_btn_search}"></td>
+		</tr>
+		<tr class="row_on">
+			<td align="left">{cc_results}:</td>
+			<td align="left">{cc_is_my}:</td>
+		</tr>
+		<tr class="row_off">
+			<td align="right"><select style="width: 240px; height: 150px;" multiple></select></td>
+			<td align="left"><select id="cc_rels_type" style="width: 240px; height: 150px;" multiple></select></td>
+		</tr>
+		<tr class="row_on">
+			<td align="right"><input style="width: 150px;" type="button" value="{cc_add_relation}"></td>
+			<td align="left"><input style="width: 150px;" type="button" value="{cc_del_relation}"></td>
+		</tr>
+		<tr class="row_off">
+			<td align="center" colspan="2"><select style="width: 480px; height: 120px;" multiple></select></td>
+		</tr>
+	</table>
+</div>
+-->
Index: /trunk/contactcenter/templates/classic/views.tpl
===================================================================
--- /trunk/contactcenter/templates/classic/views.tpl	(revision 2)
+++ /trunk/contactcenter/templates/classic/views.tpl	(revision 2)
@@ -0,0 +1,83 @@
+<!-- LAYER VIEWS -->
+<!--
+<div id="cc_layer_views" style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; visibility: hidden; z-index: 0; border: 0px solid #999;">
+<table width="100%" height="100%" border="0">
+	<tr>
+		<td align="center" valign="top">
+			<table id="" cellpadding="3" cellspacing="2" border="0">
+				<tr class="th">
+					<td>Stage 1: Edit Name</td>
+					<td>Select View</td>
+					<td colspan="2">Type Of Catalogue</td>
+				</tr>
+				<tr class="row_on">
+					<td><input style="width: 150px;" type="text" value=""></td>
+					<td><select style="width: 150px;"><option>Choose a View...</option></select></td>
+					<td colspan="2"><select style="width: 150px;"><option>Choose a Catalogue...</option></select></td>
+				</tr>
+				<tr class="th">
+					<td colspan="4">Stage 2: Criteria Of Search</td>
+				</tr>
+				<tr class="row_on">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Criteria...</option></select></td>
+					<td><input style="width: 150px;" type="text"></td>
+					<td>and</td>
+				</tr>
+				<tr class="row_off">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Criteria...</option></select></td>
+					<td><input style="width: 150px;" type="text"></td>
+					<td>and</td>
+				</tr>
+				<tr class="row_on">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Criteria...</option></select></td>
+					<td><input style="width: 150px;" type="text"></td>
+					<td>and</td>
+				</tr>
+				<tr class="row_off">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Criteria...</option></select></td>
+					<td colspan="2"><input style="width: 150px;" type="text"></td>
+				</tr>
+				<tr class="th">
+					<td colspan="4">Stage 3: Select Colums</td>
+				</tr>
+				<tr class="row_on">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td colspan="2"><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+				</tr>
+				<tr class="row_off">
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+					<td colspan="2"><select style="width: 150px;"><option>Choose a Field...</option></select></td>
+				</tr>
+				<tr class="th">
+					<td colspan="4">Stage 4: Visibility</td>
+				</tr>
+				<tr class="row_on">
+					<td colspan="4"><label><input type="radio" id="radio_visibility_1" name="radio_visibility">This model of exhibition could be had access by all the users</label></td>
+				</tr>
+				<tr class="row_off">
+					<td colspan="4"><label><input type="radio" id="radio_visibility_2" name="radio_visibility" checked>This model of exhibition could be had access only by me</label></td>
+				</tr>
+				<tr class="th"><td colspan="4">&nbsp;</td></tr>
+				<tr>
+					<td align="left">
+						<input type="button" value="Save">
+					</td>
+					<td colspan="2"></td>
+					<td align="right">
+						<input type="button" value="Cancel" onclick="set_loading('show_layer(\'cc_layer_view_cards\')');">
+					</td>
+				</tr>
+			</table>
+		</tr>
+	</table>
+</div>
+-->
+<!-- LAYER VIEWS -->
+
+
Index: /trunk/contactcenter/templates/classic/contacts.tpl
===================================================================
--- /trunk/contactcenter/templates/classic/contacts.tpl	(revision 2)
+++ /trunk/contactcenter/templates/classic/contacts.tpl	(revision 2)
@@ -0,0 +1,132 @@
+<script type="text/javascript" src="{cc_js_contacts}"></script>
+<script type="text/javascript" src="{cc_js_wz_dragdrop}"></script>
+
+<div id="cc_email_win_title" style="position:absolute; width: 500px; height: 20px; visibility: hidden; z-index: 0; border: 1px solid #999; font-weight: bold; border-bottom: 0px;" class="th">
+	<table border="0" width="100%" height="100%" cellpadding="2" cellspacing="0">
+        <tr>
+			<td align="left" valign="top" width="99%">{cc_email_win_title}</td>
+			<td align="center" valign="top" width="1%">
+				<img id="cc_email_win_close" alt="{cc_search_close}" src="{phpgw_img_dir}/winclose.gif" width="16px" height="16px" onclick="dd.elements.cc_email_win_title.hide();" 
+				style="cursor: pointer; cursor: hand;">
+			</td>
+		</tr>
+	</table>																					
+</div>
+
+<div id="cc_email_win" style="position: absolute; width: 500px; height: 400px; visibility: hidden; z-index: 0; border: 1px solid #999; border-top: 0px; background-color: #eee;">
+	<table border="0" width="100%" height="100%">
+		<tr>
+			<td>
+				<table border="0">
+					<tr>
+						<td>{cc_label_catalogue_type}</td>
+						<td>{cc_label_ordinance_type}</td>
+					</tr>
+					<tr>
+						<td><select id="cc_email_win_catalogues" style="width: 200px;" onchange="javascript:catalogue_change();"><option>{cc_choose_catalogue}</option></select></td>
+						<td><select id="cc_email_win_ordinances" style="width: 200px;" onchange="javascript:ordinance_change();"><option>{cc_choose_ordinance}</option></select></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<table border="0" width="100%">
+					<tr>
+						<td valign="top">
+							<table border="0">
+								<tr>
+									<td>{cc_label_contacts}</td>
+								</tr>
+								<tr>
+									<td><select id="cc_email_win_contacts" style="width: 200px; height: 230px; overflow: auto;" multiple></select></td>
+								</tr>
+							</table>
+						</td>
+						<td valign="top">
+							<table border="0" width="100%" height="100%">
+								<tr>
+									<td></td>
+									<td>{cc_label_to}</td>
+								</tr>
+								<tr>
+									<td align="center" valign="middle">
+										<table border="0">
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_to_add}" onclick="javascript:contacts_to_to();"></td></tr>
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_to_del}" onclick="javascript:contacts_to_to();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_to" style="width: 200px; height: 60px;" multiple></select></td>
+								</tr>
+								<tr>
+									<td></td>
+									<td>{cc_label_cc}</td>
+								</tr>
+								<tr>
+									<td align="center">
+										<table valign="middle" border="0">
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_cc_add}" onclick="javascript:contacts_to_cc();"></td></tr>
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_cc_del}" onclick="javascript:contacts_to_cc();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_cc" style="width: 200px; height: 60px;" multiple></select></td>
+								</tr>
+								<tr>
+									<td></td>
+									<td>{cc_label_cco}</td>
+								</tr>
+								<tr>
+									<td align="center" valign="middle">
+										<table border="0">
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_cco_add}" onclick="javascript:contacts_to_cco();"></td></tr>
+											<tr><td><input style="width: 60px;" type="button" value="{cc_btn_cco_del}" onclick="javascript:contacts_to_cco();"></td></tr>
+										</table>
+									</td>
+									<td><select id="cc_email_win_cco" style="width: 200px; height: 60px;" multiple></select></td>
+								</tr>								
+							</table>
+						</td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<table width="100%" border="0">
+					<tr align="center">
+						<td width="10%"><input style="width: 70px;" type="button" value="{cc_btn_search}" onclick="javascript:search();"></td>
+						<td width="10%"><input style="width: 70px;" type="button" value="{cc_btn_new}" onclick="javascript:new_contact();"></td>
+						<td width="10%"><input style="width: 70px;" type="button" value="{cc_btn_details}" onclick="javascript:details();"></td>
+						<td width="50%">&nbsp;</td>
+						<td width="10%"><input style="width: 70px;" type="button" value="{cc_btn_ok}" onclick="javascript:ok();"></td>
+						<td width="10%"><input style="width: 70px;" type="button" value="{cc_btn_cancel}" onclick="javascript:cancel();"></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+	</table>
+</div>
+
+<div id="cc_email_win_shadow" style="position: absolute; width: 500px; height: 420px; visibility: hidden; z-index: 0; background-color: #666;">
+
+<!-- BOTTOM DETAILS-->
+<script type="text/javascript">
+  	SET_DHTML(	'cc_email_win'+NO_DRAG,
+				'cc_email_win_shadow'+NO_DRAG,
+				'cc_email_win_title'+CURSOR_MOVE);
+			
+	dd.elements.cc_email_win_title.addChild(dd.elements.cc_email_win);
+	dd.elements.cc_email_win_title.addChild(dd.elements.cc_email_win_shadow);
+
+	dd.elements.cc_email_win_title.moveTo(0,0);
+	dd.elements.cc_email_win.moveTo(0,20);
+	dd.elements.cc_email_win_shadow.moveTo(5,5);
+	dd.elements.cc_email_win_title.moveTo(window.innerWidth/2 - dd.elements.cc_email_win_title.w/2, window.innerHeight/2 - dd.elements.cc_email_win.h/2);
+
+	dd.elements.cc_email_win.setZ(2);
+	dd.elements.cc_email_win_title.setZ(2);
+	dd.elements.cc_email_win_shadow.setZ(1);
+
+	dd.elements.cc_email_win_title.show();
+</script>
+<!-- END BOTTOM DETAILS-->
Index: /trunk/preferences/templates/classic/preference_acl_row.tpl
===================================================================
--- /trunk/preferences/templates/classic/preference_acl_row.tpl	(revision 2)
+++ /trunk/preferences/templates/classic/preference_acl_row.tpl	(revision 2)
@@ -0,0 +1,2 @@
+   <option value="{id}">{user}</option>
+	
Index: /trunk/preferences/templates/classic/listUsers.php
===================================================================
--- /trunk/preferences/templates/classic/listUsers.php	(revision 2)
+++ /trunk/preferences/templates/classic/listUsers.php	(revision 2)
@@ -0,0 +1,142 @@
+<?php			
+	
+	$GLOBALS['phpgw_info']['flags'] = array(
+		'noheader' => True,
+		'nonavbar' => True,
+		'currentapp' => 'preferences'		
+	);
+	
+	include('../../../header.inc.php');
+	include('../../../phpgwapi/templates/celepar/head.inc.php');
+	
+	$acl_app =  $_SESSION['acl_app'];
+	$owner	 =  $_SESSION['owner'];
+	
+	$GLOBALS['phpgw_info']['flags']['currentapp'] = $acl_app;
+	
+	if(!@is_object($GLOBALS['phpgw']->js))	{
+		$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
+	}
+	
+	$GLOBALS['phpgw']->js->validate_file('jscode','scripts','preferences');
+	$GLOBALS['phpgw']->common->phpgw_header();	
+	
+	
+	$t = &$GLOBALS['phpgw']->template;						
+	// seta o Template
+	$t->set_file(array('addUser_t' => '../../../preferences/templates/celepar/listUsers.tpl'));
+	
+	$obj_account = CreateObject('phpgwapi.accounts',$this->bo->owner);
+
+	$post_select_organization = $_POST['select_organization'];
+	$post_select_sector = $_POST['select_sector'];
+	$change_organization = $_POST['change_organization'];
+	
+	$obj_org_sector = CreateObject('phpgwapi.sector_search_ldap');
+	if ((!$post_select_organization) && (!$post_select_sector)) //primeira vez
+	{
+		$user_org = $obj_account->get_organization($GLOBALS['phpgw_info']['user']['account_dn']);
+		$user_sector = $obj_account->get_sector($GLOBALS['phpgw_info']['user']['account_dn']);
+		$user_context = $obj_account->get_context($GLOBALS['phpgw_info']['user']['account_dn']);
+		
+		$organizations_info = $obj_org_sector->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']);
+		@asort($organizations_info);
+		@reset($organizations_info);					
+		$sectors_info = $obj_org_sector->sector_search('ou='.$user_org.','.$GLOBALS['phpgw_info']['server']['ldap_context']);
+	}
+	else //mudou uma das combos
+	{
+		$user_org = $post_select_organization;
+		$user_sector = $post_select_sector;
+		if ($change_organization == "True")
+			$user_context = 'ou='.$user_org.','.$GLOBALS['phpgw_info']['server']['ldap_context'];
+		else
+			$user_context = $post_select_sector;
+		$organizations_info = $obj_org_sector->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']);
+		@asort($organizations_info);
+		@reset($organizations_info);					
+		$sectors_info = $obj_org_sector->sector_search('ou='.$user_org.','.$GLOBALS['phpgw_info']['server']['ldap_context']);
+	}
+		
+	foreach($organizations_info as $organization)
+	{
+		$combo_organization .= '<option value="' . $organization . '"'; 	
+		
+		if (!$post_select_organization)
+		{
+			if($organization == $user_org)
+			{
+				$combo_organization .= ' selected';
+			}
+		}
+		else
+		{
+			if($organization == $post_select_organization)
+			{
+				$combo_organization .= ' selected';
+			}
+		}	
+		$combo_organization .= '>' .$organization.'</option>'."\n";
+	}
+	
+	$combo_sector .= '<option value="ou='.$user_org.','.$GLOBALS['phpgw_info']['server']['ldap_context'].'"> --------- </option>'."\n";
+	foreach($sectors_info as $sector)
+	{
+		$combo_sector .= '<option value="' . $sector->sector_context . '"';
+
+		if (!$post_select_sector)
+		{
+			if($sector->sector_name == $user_sector)
+				$combo_sector .= ' selected';
+		}
+		else
+		{
+			if($sector->sector_context == $post_select_sector)
+				$combo_sector .= ' selected';
+		}
+		$combo_sector .= '>' .$sector->sector_name.'</option>'."\n";
+	}			
+	
+	// Monta lista de Grupos e Usuários
+	$users = Array();
+	$groups = Array();
+
+	$ds = $GLOBALS['phpgw']->common->ldapConnect();
+    if ($ds) 
+    {
+		$sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=u))"));
+		$info = ldap_get_entries($ds, $sr);
+		for ($i=0; $i<$info["count"]; $i++)
+			$users[$uids=$info[$i]["uidnumber"][0]] = Array('name'	=>	$uids=$info[$i]["cn"][0], 'type'	=>	u);
+	}
+	ldap_close($ds);
+    	
+	@asort($users);
+	@reset($users);	
+	@asort($groups);
+	@reset($groups);
+
+	$options ='';
+
+	foreach($users as $id => $user_array) {
+		if($owner != $id){
+			$newId = 'u_'.$acl_app.'['.$id;			
+			$options .= '<option  value="'.$newId.'">'.utf8_decode($user_array['name']).$array_app.'</option>'."\n";
+		}
+	}
+
+	$t->set_var ('lang_Organization',lang('Organization'));
+	$t->set_var ('lang_Sector',lang('Sector'));
+	$t->set_var ('lang_Calendar',lang('Calendar'));
+	$t->set_var ('lang_Add_Participants',lang('Add Participants'));
+	$t->set_var ('lang_to_Search',lang('to Search'));
+	$t->set_var ('lang_Close',lang('Close'));
+	$t->set_var ('lang_Add',lang('Add'));
+	
+	$t->set_var('options',$options);
+	$t->set_var('combo_organization', $combo_organization);
+	$t->set_var('combo_sector', $combo_sector);
+	$t->parse('out','addUser_t',true);
+	$t->p('out');
+	$GLOBALS['phpgw']->common->phpgw_exit();	
+?>
Index: /trunk/preferences/templates/classic/preference_acl_hidden.tpl
===================================================================
--- /trunk/preferences/templates/classic/preference_acl_hidden.tpl	(revision 2)
+++ /trunk/preferences/templates/classic/preference_acl_hidden.tpl	(revision 2)
@@ -0,0 +1,5 @@
+<input type="hidden" name="{read}"    id='{read}'    value="Y" {read_selected}/>
+<input type="hidden" name="{add}"     id='{add}'     value="Y" {add_selected}/>
+<input type="hidden" name="{edit}"    id='{edit}'    value="Y" {edit_selected}/>
+<input type="hidden" name="{delete}"  id='{delete}'  value="Y" {delete_selected}/>
+<input type="hidden" name="{private}" id='{private}' value="Y" {private_selected}/>   
Index: /trunk/preferences/templates/classic/listUsers.tpl
===================================================================
--- /trunk/preferences/templates/classic/listUsers.tpl	(revision 2)
+++ /trunk/preferences/templates/classic/listUsers.tpl	(revision 2)
@@ -0,0 +1,59 @@
+<html>
+	<head>
+		<title>{lang_Add_Participants}</title>
+	</head>
+	<body>
+		<form name="formAddUser" method="POST">	
+		 <center>	
+		  <table cellspacing="3" cellpadding="3">														
+		   <tr>
+			 <td>
+			  <div id="divAppboxHeader">{lang_Add_Participants}</div>
+			  <div id="divAppbox">
+			   <table border=0>
+				<tr><td>{lang_Organization}:</td></tr>
+				<tr><td><select name="select_organization" onchange="formAddUser.change_organization.value='True';formAddUser.submit()">.{combo_organization}.</select></td></tr>
+				<tr><td>{lang_Sector}:</td></tr>
+				<tr><td><select name="select_sector" onchange="formAddUser.submit()">.{combo_sector}.</select></td></tr>
+				<input type="hidden" name="change_organization" value="False">
+				<tr>
+				 <td>
+				  <select name="user_values" multiple style="width:250px" size="18" id="user_list_in">
+				  {options}
+				  </select>					
+				 </td>
+			    </tr>
+				<tr><td>&nbsp;</td>	</tr>
+				<tr>
+				 <td>   			
+				  <center>{lang_to_Search}:&nbsp;<input type="text" name="query" onkeyup="optionFinder(this)"></center>   			
+				 </td>
+				</tr>				
+				<tr><td>&nbsp;</td>	</tr>
+				<tr>
+				 <td>
+				  <center>
+				   <input type="button" class="button" value="Adicionar e Retornar" onClick="javascript:adicionaLista()">
+				   <input type="button" value="Cancelar" onClick="javascript:window.close()">
+				  </center>
+				 </td>
+				</tr>		
+			   </table>
+			  </div>
+			 </td>	
+			</tr>
+		   </table>
+		  </center>				
+		 </form>
+	</body>
+</html>
+<script language="Javascript1.3">
+//Variaveis Locais 
+ var select = document.getElementById('user_list_in');
+ var users = new Array();
+ //Inicializacao			
+ for(var i = 0; i < select.options.length; i++) {				
+	 option = new Option(select.options[i].text,select.options[i].value);	 
+	 users[i] = option;	 				
+ }					
+</script>
Index: /trunk/preferences/templates/classic/preference_acl.tpl
===================================================================
--- /trunk/preferences/templates/classic/preference_acl.tpl	(revision 641)
+++ /trunk/preferences/templates/classic/preference_acl.tpl	(revision 641)
@@ -0,0 +1,80 @@
+{errors}
+{title}
+<script src='phpgwapi/templates/celepar/js/listUsers.js' type='text/javascript'></script>
+<form method="POST" action="{action_url}" name="formAcl">
+<center>
+<table border="0"
+	<tr>
+		<td width="10%"></td>
+		<td  width="55%"><center><strong>Lista de Usu&aacute;rios</strong></center></td>		
+		<td  width="35%">
+			<strong>Atributos</strong>
+		</td>
+	</tr>
+	
+	<tr>
+		<td></td>
+		<td>
+			<center>
+				<select id="user_list" name="user_values" style="width:250px" size="10" onChange="javascript:execAction('LOAD')" onClick="javascript:execAction('LOAD')">{row}</select>
+			</center>
+		</td>			
+		<td valign = 'top'> 
+			<table border="0">
+				<tr>
+					<td><input type="checkbox" name="checkAttr" value="Y" onclick="javascript:execAction('SAVE')"></td>
+					<td>Ler</td>
+				</tr>
+				<tr {add_invisible}>
+					<td><input type="checkbox" name="checkAttr" value="Y" onclick="javascript:execAction('SAVE')"></td>
+					<td>Adicionar</td>
+				</tr>
+				<tr>													
+					<td><input type="checkbox" name="checkAttr" value="Y" onclick="javascript:execAction('SAVE')"></td>
+					<td>Editar</td>				
+				</tr>
+				<tr>					
+					<td><input type="checkbox" name="checkAttr" value="Y" onclick="javascript:execAction('SAVE')"></td>
+					<td>Excluir</td>
+				</tr>
+				
+				<tr {private_invisible}>
+					<td><input type="checkbox" name="checkAttr" value="Y" onclick="javascript:execAction('SAVE')"></td>
+					<td>Restritos</td>
+				</tr>
+				
+			</table>
+			
+		</td>
+	</tr>
+	
+	<tr>
+		<td></td>
+		<td width="40%" id="tdHiddens">
+			&nbsp;
+		</td>
+	</tr>
+	<tr>
+		<td></td>
+	<td>
+		{common_hidden_vars_form}
+		{hiddens}
+ 			<input type="hidden" name="processed" value="{processed}">
+ 		<center>
+ 			<input type="submit" name="submit" value="{submit_lang}">
+			<input type="button" value="Adicionar" onclick="openListUsers(340,533,'preferences')">
+			<input type="button" value="Remover" onclick="javascript:remUserAcl()">
+			<input type="button" value="Cancelar" onclick="javascript:history.back()">
+ 		</center>
+	</td>
+	</tr>
+	
+</table>
+</center>
+</form>
+<script language="Javascript1.3">
+if(!document.formAcl.user_values.length)
+	for(j = 0; j < document.formAcl.checkAttr.length; j++)
+		document.formAcl.checkAttr[j].disabled = true;
+
+</script>
Index: /trunk/calendar/templates/classic/month_day.tpl
===================================================================
--- /trunk/calendar/templates/classic/month_day.tpl	(revision 27)
+++ /trunk/calendar/templates/classic/month_day.tpl	(revision 27)
@@ -0,0 +1,21 @@
+
+<!-- BEGIN m_w_table -->
+
+<table id="calendar_m_w_table" class="calendar_m_w_table" border="0" width="100%">
+	<! from month_header.tpl -->
+	{row}
+</table>
+<!-- END m_w_table -->
+
+<!-- BEGIN month_daily -->
+<span class="screen_only">[ </span><span class="calendar_m_w_table_daynumber" >{day_number}</span><span class="screen_only"> ]</span>{new_event_link}<br />
+    {daily_events}
+<!-- END month_daily -->
+
+<!-- BEGIN day_event -->
+{events}
+<!-- END day_event -->
+
+<!-- BEGIN event -->
+{day_events}
+<!-- END event -->
Index: /trunk/calendar/templates/classic/app_print.css
===================================================================
--- /trunk/calendar/templates/classic/app_print.css	(revision 766)
+++ /trunk/calendar/templates/classic/app_print.css	(revision 766)
@@ -0,0 +1,294 @@
+/* Este documento é um css somente para impressão do calendário no papel!
+O seu efeito não aparece na tela  */
+
+.calendar_print_main {
+	text-align:center;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 8px;
+	color: #000066;
+	background-color: #F7F7F7;
+	border: 1px solid #CCCCCC;
+	margin: 5px;
+	padding: 5px;
+	height: 700px;
+	width: 600px;
+}
+.button {
+	display: none;
+}
+
+
+.to_continue
+{
+	font-size: 9px;
+}
+
+A.minicalendar 
+{ 
+	color: #000000; 
+	font-size: 9px;
+	
+}
+
+A.bminicalendar 
+{ 
+	color: #336699; 
+	font-style: italic;
+	font-weight: bold;
+	font-size: 9px; 
+}
+
+A.minicalendargrey 
+{ 
+	color: #999999; 
+	font-size: 10px;
+	font-weight: bold;
+}
+
+A.bminicalendargrey 
+{ 
+	color: #336699; 
+	font-style: italic; 
+	font-size:10px; 
+}
+
+A.minicalhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #000000; 
+	font-size: 10px; 
+}
+
+A.bminicalhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #336699; 
+	font-size: 10px; 
+}
+
+A.minicalgreyhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #999999; 
+	font-size: 10px; 
+}
+
+A.bminicalgreyhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #999999; 
+	font-size: 10px; 
+}
+
+
+.event-on
+{ 
+	background: #D3DCE3;
+	border: #E8F0F0 1px solid;
+}
+
+.event-off
+{ 
+	background: #E8F0F0;
+	border: #D3DCE3 1px solid;
+}
+
+.event-holiday
+{
+	font-size: 100%;
+	background: #dac0c0;
+	color:#000000;
+	vertical-align: middle;
+}
+
+.time
+{
+	background: #D3DCE3;
+	color:#000000;
+	font-size: 10px;
+	font-weight: bold;
+	vertical-align: middle;
+	width: 5.2%;
+	text-align: right;
+	padding-right: 5px;
+	line-height: 11px;
+	border: #E8F0F0 1px solid;
+}
+
+
+.planner-cell
+{
+	cursor: pointer;
+	cursor: hand;
+	border: thin solid black;
+}
+
+/* common */
+.calendar_link_print
+{
+	text-align: center;
+	font-size: 10px;
+}
+
+//Mini Calendar
+
+.calendar_minical_table
+{
+	width: 180px;
+	font-weight: bold;
+}
+
+.calendar_minical_daytable
+{
+	width: 100%;
+}
+
+.calendar_minical_dayname
+{
+	font-size: 9px;
+	text-align: right;
+}
+
+.calendar_minical_hrule
+{
+	width: 96%;
+}
+
+/* Header */
+.calendar_dropbuttons
+{
+	align: center;
+	text-align: center;
+	vertical-align: bottom;
+	font-weight: bold;
+	font-size: 8px;
+}
+
+.calendar-weekidentifier
+{
+	font-size:16px;
+	font-weight: bold;
+	text-align: center;
+}
+
+.calendar_header
+{
+	font-size: 16px;
+	font-weight: bold;
+	text-align: center;
+}
+
+.calendar_dayview_table_header
+{
+	font-size: 13px;
+	font-weight: bold;
+	text-align: center;
+}
+
+.calendar_dayview_todo_header
+{
+	margin: 0px; 
+	padding: 2px;
+	font-weight: bold;
+}
+
+/* week view */
+.calendar_week_identifier_table
+{
+	border: 0px solid black;
+	width: 100%;
+}
+
+.calendar_week_identifier
+{
+	font-size: 13px;
+	text-align: center;
+	font-weight: bold;
+}
+
+.calendar_weekview_daytitle
+{
+	font-weight: bold;
+	font-size: 12px;
+	background: #D3DCE3;
+}
+
+.calendar_m_w_table
+{
+	table-layout:fixed;
+	overflow:hidden;
+	height: 90%;
+	width: 100%;
+	border: 0px #000000 solid;
+}
+
+.calendar_m_w_tablecell
+{
+	overflow:hidden;
+	vertical-align: top;
+	padding-left: 4px;
+	padding-right: 4px;
+	padding-bottom: 6px;
+	border: 1px solid #000000;
+}
+
+.screen_only
+{
+	display:none;
+}
+
+.calendar_m_w_table_daynumber
+{
+	font-weight: bold;
+	font-family: Arial;
+	font-size: 10px;
+	vertical-align: top;
+	background-color: #778899;
+	border: 1px solid #000000;
+	margin: 1px;
+	padding: 1px;
+}
+
+A.event_entry
+{
+	font-size:10px;
+}
+
+/* month view */
+
+.calendar_month_identifier
+{
+	font-size:18px;
+	font-weight: bold;
+}
+
+.calendar_user_identifier
+{
+	font-size:12px;
+	color: #009999;
+	font-weight: bold;
+}
+
+.calendar_week_minical_table
+{
+	width:100%;
+	border: 0px solid #000000
+}
+
+.calendar_weekinfo
+{
+	color: #000000;
+	padding-left: 2px;
+	padding-right: 2px;
+	font-size: 10px;
+	font-weight: bold;
+	font-style: italic;
+}
Index: /trunk/calendar/templates/classic/edit.tpl
===================================================================
--- /trunk/calendar/templates/classic/edit.tpl	(revision 663)
+++ /trunk/calendar/templates/classic/edit.tpl	(revision 663)
@@ -0,0 +1,61 @@
+<!-- BEGIN edit_entry -->
+<style type="text/css">
+div#tipDiv {
+  position:absolute; visibility:hidden; left:0; top:0; z-index:10000;
+  background-color:#EFEFEF; border:1px solid #337;
+  width:220px; padding:3px;
+  color:#000; font-size:11px; line-height:1.2;
+  cursor: default;
+}
+</style>
+<script language="JavaScript">
+	self.name="first_Window";
+	function accounts_popup()
+	{
+		Window1=window.open('{accounts_link}',"Search","width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes");
+	}
+</script>
+<center>
+<font color="#000000" face="{font}">
+
+<form action="{action_url}" method="post" name="app_form">
+{common_hidden}
+<table id="editFormTable" border="0" width="90%">
+ <tr>
+  <td colspan="2">
+   <center><font size="+1"><b id="formStatus">{errormsg}</b></font></center>
+  </td>
+ </tr>
+{row}
+ <tr>
+  <td>
+  <table><tr valign="top">
+  <td>
+  <div style="padding-top:15px; padding-right: 2px">
+  	<script language="JavaScript">
+		var alert_field = '{alert_msg}';
+	</script>
+  	<input id="submit_button" style="font-size:10px" type="submit" value="{submit_button}" onClick="return submitValues(alert_field);"></div></form>
+  </td>
+  <td>{cancel_button}</td>
+  </tr></table>
+  </td>
+  <td align="right">{delete_button}</td>
+ </tr>
+</table>
+</font>
+</center>
+<!-- END edit_entry -->
+<!-- BEGIN list -->
+ <tr bgcolor="{tr_color}">
+  <td valign="top" width="25%">&nbsp;<b>{field}:</b></td>
+  <td valign="top" width="75%">{data}</td>
+ </tr>
+<!-- END list -->
+<!-- BEGIN hr -->
+ <tr bgcolor="{tr_color}">
+  <td colspan="2">
+   {hr_text}
+  </td>
+ </tr>
+<!-- END hr -->
Index: /trunk/calendar/templates/classic/listUsers.php
===================================================================
--- /trunk/calendar/templates/classic/listUsers.php	(revision 2)
+++ /trunk/calendar/templates/classic/listUsers.php	(revision 2)
@@ -0,0 +1,167 @@
+<?php			
+	
+	$GLOBALS['phpgw_info']['flags'] = array(
+		'noheader' => True,
+		'nonavbar' => True,
+		'currentapp' => 'calendar'		
+	);
+	
+	include('../../../header.inc.php');
+	include('../../../phpgwapi/templates/celepar/head.inc.php');
+
+	$owner = $GLOBALS['_GET']['owner'];
+	
+	if(!@is_object($GLOBALS['phpgw']->js))	{
+		$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
+	}
+	
+	$GLOBALS['phpgw']->js->validate_file('jscode','scripts','preferences');		
+	$t = &$GLOBALS['phpgw']->template;						
+	// seta o Template
+	$t->set_file(array('addUser_t' => '../../../calendar/templates/celepar/listUsers.tpl'));
+	
+	$obj_account = CreateObject('phpgwapi.accounts',$this->bo->owner);
+
+	$post_select_organization = $_POST['select_organization'];
+	$post_select_sector = $_POST['select_sector'];
+	$change_organization = $_POST['change_organization'];
+	
+	$obj_org_sector = CreateObject('phpgwapi.sector_search_ldap');
+	if ((!$post_select_organization) && (!$post_select_sector)) //primeira vez
+	{
+		$user_org = $obj_account->get_organization($GLOBALS['phpgw_info']['user']['account_dn']);
+		$user_sector = $obj_account->get_sector($GLOBALS['phpgw_info']['user']['account_dn']);
+		$user_context = $obj_account->get_context($GLOBALS['phpgw_info']['user']['account_dn']);
+		
+		$organizations_info = $obj_org_sector->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']);
+		@asort($organizations_info);
+		@reset($organizations_info);					
+		$sectors_info = $obj_org_sector->sector_search('ou='.$user_org.','.$GLOBALS['phpgw_info']['server']['ldap_context']);
+	}
+	else //mudou uma das combos
+	{
+		$user_org = $post_select_organization;
+		$user_sector = $post_select_sector;
+		if ($change_organization == "True")
+			$user_context = 'ou='.$user_org.','.$GLOBALS['phpgw_info']['server']['ldap_context'];
+		else
+			$user_context = $post_select_sector;
+		$organizations_info = $obj_org_sector->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']);
+		@asort($organizations_info);
+		@reset($organizations_info);					
+		$sectors_info = $obj_org_sector->sector_search('ou='.$user_org.','.$GLOBALS['phpgw_info']['server']['ldap_context']);
+	}
+		
+	foreach($organizations_info as $organization)
+	{
+		$combo_organization .= '<option value="' . $organization . '"'; 	
+		
+		if (!$post_select_organization)
+		{
+			if(strtolower($organization) == strtolower($user_org))
+			{
+				$combo_organization .= ' selected';
+			}
+		}
+		else
+		{
+			if(strtolower($organization) == strtolower($post_select_organization))
+			{
+				$combo_organization .= ' selected';
+			}
+		}	
+		$combo_organization .= '>' .$organization.'</option>'."\n";
+	}
+	
+	$combo_sector .= '<option value="ou='.$user_org.','.$GLOBALS['phpgw_info']['server']['ldap_context'].'"> --------- </option>'."\n";
+	foreach($sectors_info as $sector)
+	{
+		if ($sector->sector_level == 1)
+		{
+			$sector->sector_name = '- '.$sector->sector_name;
+		}
+		else
+		{
+			$sector_space = '';
+			for ($i=1; $i < $sector->sector_level; $i++)
+				$sector_space = '---'.$sector_space;
+			$sector->sector_name = $sector_space.' '.$sector->sector_name;
+		}
+	
+		$combo_sector .= '<option value="' . $sector->sector_context . '"';
+
+		if (!$post_select_sector)
+		{
+			if($sector->sector_name == $user_sector)
+				$combo_sector .= ' selected';
+		}
+		else
+		{
+			if($sector->sector_context == $post_select_sector)
+				$combo_sector .= ' selected';
+		}
+		$combo_sector .= '>' .$sector->sector_name.'</option>'."\n";
+	}			
+	
+	// Monta lista de Grupos e Usuários
+	$users = Array();
+	$groups = Array();
+
+	$ds = $GLOBALS['phpgw']->common->ldapConnect();
+    if ($ds) 
+    {
+		$sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=g))"));
+		$info = ldap_get_entries($ds, $sr);
+		for ($i=0; $i<$info["count"]; $i++)
+			$groups[$uids=$info[$i]["gidnumber"][0]] = Array('name'	=>	$uids=$info[$i]["cn"][0], 'type'	=>	g);
+
+		$sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=u)(!(cn=lista*)))"));
+		$info = ldap_get_entries($ds, $sr);
+		for ($i=0; $i<$info["count"]; $i++)
+		{
+			if ($info[$i]["phpgwaccountvisible"][0] == '-1')
+				continue;
+			$users[$uids=$info[$i]["uidnumber"][0]] = Array('name'	=>	$uids=$info[$i]["cn"][0], 'type'	=>	u);
+		}
+	}
+	ldap_close($ds);
+    	
+	@asort($users);
+	@reset($users);	
+	@asort($groups);
+	@reset($groups);
+
+	$options ='';
+	if(count($groups))
+		$options .= '<option  value="-1" disabled>--------------------&nbsp;&nbsp;&nbsp;&nbsp;Grupos&nbsp;&nbsp;&nbsp;&nbsp;------------------- </option>'."\n";
+		
+	foreach($groups as $id => $user_array) {
+			$newId = $id.'U';
+			$options .= '<option  value="'.$newId.'">'.utf8_decode($user_array['name']).$array_app.'</option>'."\n";
+	}
+	
+	if(count($users))
+		$options .= '<option  value="-1" disabled>-------------------&nbsp;&nbsp;&nbsp;&nbsp;Usuários&nbsp;&nbsp;&nbsp;&nbsp;------------------ </option>'."\n";
+	
+	foreach($users as $id => $user_array) {
+		if($owner != $id){
+			$newId = $id.'U';
+			$options .= '<option  value="'.$newId.'">'.utf8_decode($user_array['name']).$array_app.'</option>'."\n";
+		}
+	}
+
+	$t->set_var ('lang_Organization',lang('Organization'));
+	$t->set_var ('lang_Sector',lang('Sector'));
+	$t->set_var ('lang_Calendar',lang('Calendar'));
+	$t->set_var ('lang_Add_Participants',lang('Add Participants'));
+	$t->set_var ('lang_to_Search',lang('to Search'));
+	$t->set_var ('lang_Close',lang('Close'));
+	$t->set_var ('lang_Add',lang('Add'));
+	
+	$t->set_var('options',$options);
+	$t->set_var('combo_organization', $combo_organization);
+	$t->set_var('combo_sector', $combo_sector);
+	$t->parse('out','addUser_t',true);
+	$t->p('out');
+	$GLOBALS['phpgw']->common->phpgw_exit();	
+?>
Index: /trunk/calendar/templates/classic/header.inc.php
===================================================================
--- /trunk/calendar/templates/classic/header.inc.php	(revision 27)
+++ /trunk/calendar/templates/classic/header.inc.php	(revision 27)
@@ -0,0 +1,229 @@
+<?php
+  /**************************************************************************\
+  * eGroupWare                                                               *
+  * http://www.egroupware.org                                                *
+  * --------------------------------------------                             *
+  *  This program is free software; you can redistribute it and/or modify it *
+  *  under the terms of the GNU General Public License as published by the   *
+  *  Free Software Foundation; either version 2 of the License, or (at your  *
+  *  option) any later version.                                              *
+  \**************************************************************************/
+
+
+	function add_col(&$tpl,$str)
+	{
+		$tpl->set_var('str',$str);
+		$tpl->parse('header_column','head_col',True);
+	}
+
+	function add_image_ahref($link,$image,$alt)
+	{
+		return '<a href="'.$link.'"><img src="'.$GLOBALS['phpgw']->common->image('calendar',$image).'" alt="'.$alt.'" title="'.$alt.'" border="0"></a>';
+	}
+
+	$refer = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
+	$referrer = $refer[2];
+
+	$templates = Array(
+		'head_tpl'	=> 'head.tpl',
+		'form_button_dropdown'	=> 'form_button_dropdown.tpl',
+		'form_button_script'	=> 'form_button_script.tpl'
+	);
+	$tpl->set_file($templates);
+	$tpl->set_block('head_tpl','head','head');
+	$tpl->set_block('head_tpl','head_table','head_table');
+	$tpl->set_block('head_tpl','head_col','head_col');
+	$tpl->set_block('form_button_script','form_button');
+
+	if(floor(phpversion()) >= 4)
+	{
+		$tpl->set_var('cols',8);
+	}
+	else
+	{
+		$tpl->set_var('cols',7);
+	}
+
+	$today = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
+
+	$col_width = 12;
+
+	add_col($tpl,'  <td width="2%">&nbsp;</td>');
+
+	add_col($tpl,'  <td width="2%">'.add_image_ahref($this->page('day','&date='.$today),'today',lang('Today')).'</td>');
+
+	add_col($tpl,'  <td width="2%" align="left">'.add_image_ahref($this->page('week','&date='.$today),'week',lang('This week')).'</td>');
+
+	add_col($tpl,'  <td width="2%" align="left">'.add_image_ahref($this->page('month','&date='.$today),'month',lang('This month')).'</td>');
+
+	add_col($tpl,'  <td width="2%" align="left">'.add_image_ahref($this->page('year','&date='.$today),'year',lang('This Year')).'</td>');
+
+	if(floor(phpversion()) >= 4)
+	{
+		add_col($tpl,'  <td width="2%" align="left">'.add_image_ahref($this->page('planner','&date='.$today),'planner',lang('Planner')).'</td>');
+		$col_width += 2;
+	}
+
+	//add_col($tpl,'  <td width="2%" align="left">'.add_image_ahref($this->page('matrixselect'),'view',lang('Daily Matrix View')).'</td>');
+
+	add_col($tpl,'  <td width="'.(100 - $col_width).'%" align="left"'.(floor(phpversion()) < 4?' colspan="2"':'').'>&nbsp;</td>');
+
+	$tpl->parse('row','head_table',True);
+
+	$tpl->set_var('header_column','');
+	$tpl->set_var('cols',$cols);
+
+	if($referrer!='view')
+	{
+		$remainder = 72;
+		
+		$date = (isset($GLOBALS['date'])?$GLOBALS['date']:'');
+		$date = (isset($GLOBALS['HTTP_GET_VARS']['date'])?$GLOBALS['HTTP_GET_VARS']['date']:$date);
+		$date = ($date=='' && isset($GLOBALS['HTTP_POST_VARS']['date'])?$GLOBALS['HTTP_POST_VARS']['date']:$date);
+
+		$base_hidden_vars = '<input type="hidden" name="from" value="'.$GLOBALS['HTTP_GET_VARS']['menuaction'].'">'."\n";
+		if(isset($GLOBALS['HTTP_GET_VARS']['cal_id']) && $GLOBALS['HTTP_GET_VARS']['cal_id'] != 0)
+		{
+			$base_hidden_vars .= '    <input type="hidden" name="cal_id" value="'.$GLOBALS['HTTP_GET_VARS']['cal_id'].'">'."\n";
+		}
+		if(isset($GLOBALS['HTTP_POST_VARS']['keywords']) && $GLOBALS['HTTP_POST_VARS']['keywords'])
+		{
+			$base_hidden_vars .= '    <input type="hidden" name="keywords" value="'.$GLOBALS['HTTP_POST_VARS']['keywords'].'">'."\n";
+		}
+		if(isset($GLOBALS['HTTP_POST_VARS']['matrixtype']) && $GLOBALS['HTTP_POST_VARS']['matrixtype'])
+		{
+			$base_hidden_vars .= '    <input type="hidden" name="matrixtype" value="'.$GLOBALS['HTTP_POST_VARS']['matrixtype'].'">'."\n";
+		}
+		if($date)
+		{
+			$base_hidden_vars .= '    <input type="hidden" name="date" value="'.$date.'">'."\n";
+		}
+		$base_hidden_vars .= '    <input type="hidden" name="month" value="'.$this->bo->month.'">'."\n";
+		$base_hidden_vars .= '    <input type="hidden" name="day" value="'.$this->bo->day.'">'."\n";
+		$base_hidden_vars .= '    <input type="hidden" name="year" value="'.$this->bo->year.'">'."\n";
+		
+		if(isset($GLOBALS['HTTP_POST_VARS']['participants']) && $GLOBALS['HTTP_POST_VARS']['participants'])
+		{
+			for ($i=0;$i<count($GLOBALS['HTTP_POST_VARS']['participants']);$i++)
+			{
+				$base_hidden_vars .= '    <input type="hidden" name="participants[]" value="'.$GLOBALS['HTTP_POST_VARS']['participants'][$i].'">'."\n";
+			}
+		}
+
+		$var = Array(
+			'form_width' => '28',
+			'form_link'	=> $this->page($referrer),
+			'form_name'	=> 'cat_id',
+			'title'	=> lang('Category'),
+			'hidden_vars'	=> $base_hidden_vars,
+			'form_options'	=> '<option value="0">'.lang('All').'</option>'.$this->cat->formated_list('select','all',$this->bo->cat_id,'True'),
+			'button_value'	=> lang('Go!')
+		);
+		$tpl->set_var($var);
+		$tpl->set_var('str',$tpl->fp('out','form_button_dropdown'));
+		$tpl->parse('header_column','head_col',True);
+
+		if($GLOBALS['HTTP_GET_VARS']['menuaction'] == 'calendar.uicalendar.planner')
+		{
+			$remainder -= 28;
+			print_debug('Sort By',$this->bo->sortby);
+
+			$form_options = '<option value="user"'.($this->bo->sortby=='user'?' selected':'').'>'.lang('User').'</option>'."\n";
+			$form_options .= '     <option value="category"'.((!isset($this->bo->sortby) || !$this->bo->sortby) || $this->bo->sortby=='category'?' selected':'').'>'.lang('Category').'</option>'."\n";
+		
+			$var = Array(
+				'form_width' => '28',
+				'form_link'	=> $this->page($referrer),
+				'form_name'	=> 'sortby',
+				'title'	=> lang('Sort By'),
+				'hidden_vars'	=> $base_hidden_vars,
+				'form_options'	=> $form_options,
+				'button_value'	=> lang('Go!')
+			);
+			$tpl->set_var($var);
+			$tpl->set_var('str',$tpl->fp('out','form_button_dropdown'));
+			$tpl->parse('header_column','head_col',True);
+		}
+
+		if($this->bo->check_perms(PHPGW_ACL_PRIVATE))
+		{
+			$remainder -= 28;
+			$form_options = '<option value=" all "'.($this->bo->filter==' all '?' selected':'').'>'.lang('All').'</option>'."\n";
+			$form_options .= '     <option value=" private "'.((!isset($this->bo->filter) || !$this->bo->filter) || $this->bo->filter==' private '?' selected':'').'>'.lang('Private Only').'</option>'."\n";
+		
+			$var = Array(
+				'form_width' => '28',
+				'form_link'	=> $this->page($referrer),
+				'form_name'	=> 'filter',
+				'title'	=> lang('Filter'),
+				'hidden_vars'	=> $base_hidden_vars,
+				'form_options'	=> $form_options,
+				'button_value'	=> lang('Go!')
+			);
+			$tpl->set_var($var);
+			$tpl->set_var('str',$tpl->fp('out','form_button_dropdown'));
+			$tpl->parse('header_column','head_col',True);
+		}
+//aqui !!
+
+		if((!isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) || !$GLOBALS['phpgw_info']['server']['deny_user_grants_access']) && count($this->bo->grants) > 0)
+		{
+			$form_options = '';
+			
+			$drop_down = $this->bo->list_cals(); //hehe
+			
+			foreach($drop_down as $key => $grant)
+			{					
+				if(!strstr(($grant['value']),'g_')) 
+					$form_options .= '    <option value="'.$grant['value'].'"'.($grant['grantor']==$this->bo->owner?' selected':'').'>'.$grant['name'].'</option>'."\n";
+			}
+		
+			$var = Array(
+				'form_width' => $remainder,
+				'form_link'	=> $this->page($referrer),
+				'form_name'	=> 'owner',
+				'title'	=> lang('User'),
+				'hidden_vars'	=> $base_hidden_vars,
+				'form_options'	=> $form_options,
+				'button_value'	=> lang('Go!')
+			);
+			$tpl->set_var($var);
+			$tpl->set_var('str',$tpl->fp('out','form_button_dropdown'));
+			$tpl->parse('header_column','head_col',True);
+		}
+	}
+
+	$hidden_vars = '    <input type="hidden" name="from" value="'.$GLOBALS['HTTP_GET_VARS']['menuaction'].'">'."\n";
+	if(isset($GLOBALS['HTTP_GET_VARS']['date']) && $GLOBALS['HTTP_GET_VARS']['date'])
+	{
+		$hidden_vars .= '    <input type="hidden" name="date" value="'.$GLOBALS['HTTP_GET_VARS']['date'].'">'."\n";
+	}
+	$hidden_vars .= '    <input type="hidden" name="month" value="'.$this->bo->month.'">'."\n";
+	$hidden_vars .= '    <input type="hidden" name="day" value="'.$this->bo->day.'">'."\n";
+	$hidden_vars .= '    <input type="hidden" name="year" value="'.$this->bo->year.'">'."\n";
+	if(isset($this->bo->filter) && $this->bo->filter)
+	{
+		$hidden_vars .= '    <input type="hidden" name="filter" value="'.$this->bo->filter.'">'."\n";
+	}
+	if(isset($this->bo->sortby) && $this->bo->sortby)
+	{
+		$hidden_vars .= '    <input type="hidden" name="sortby" value="'.$this->bo->sortby.'">'."\n";
+	}
+	if(isset($this->bo->num_months) && $this->bo->num_months)
+	{
+		$hidden_vars .= '    <input type="hidden" name="num_months" value="'.$this->bo->num_months.'">'."\n";
+	}
+	$hidden_vars .= '    <input name="keywords"'.($GLOBALS['HTTP_POST_VARS']['keywords']?' value="'.$GLOBALS['HTTP_POST_VARS']['keywords'].'"':'').'>';
+
+	$var = Array(
+		'action_url_button'	=> $this->page('search'),
+		'action_text_button'	=> lang('Search'),
+		'action_confirm_button'	=> '',
+		'action_extra_field'	=> $hidden_vars
+	);
+	$tpl->set_var($var);
+	$button = $tpl->fp('out','form_button');
+	$tpl->set_var('str','<td align="right" valign="bottom">'.$button.'</td>');
+	$tpl->parse('header_column','head_col',True);
+	$tpl->parse('row','head_table',True);
+?>
Index: /trunk/calendar/templates/classic/week.tpl
===================================================================
--- /trunk/calendar/templates/classic/week.tpl	(revision 931)
+++ /trunk/calendar/templates/classic/week.tpl	(revision 931)
@@ -0,0 +1,3 @@
+{week_display}
+<!-- from month_day.tpl -->
+<p align="center">{printer_friendly}</p>
Index: /trunk/calendar/templates/classic/month_header.tpl
===================================================================
--- /trunk/calendar/templates/classic/month_header.tpl	(revision 2)
+++ /trunk/calendar/templates/classic/month_header.tpl	(revision 2)
@@ -0,0 +1,12 @@
+<!-- BEGIN monthly_header -->
+<tr class="calendar_m_w_table_header" colspan="{cols}" width="{col_width}%">
+{column_header}</tr>
+<!-- END monthly_header -->
+
+<!-- BEGIN column_title -->
+<th bGCOLOR="#D3DCE3" width="14.28%">{col_title}</th>
+<!-- END column_title -->
+
+<!-- BEGIN month_column -->
+<td class="calendar_m_w_tablecell" colspan="1" width="{col_width}%"{extra}>{column_data}</td>
+<!-- END month_column -->
Index: /trunk/calendar/templates/classic/confirm.tpl
===================================================================
--- /trunk/calendar/templates/classic/confirm.tpl	(revision 2)
+++ /trunk/calendar/templates/classic/confirm.tpl	(revision 2)
@@ -0,0 +1,31 @@
+<!-- BEGIN list -->
+<html>
+<head>
+<title> .: Expresso :. </title>
+<link href='/phpgwapi/templates/celepar/login.css' rel='stylesheet' type='text/css'>
+</head>
+<body class='body'>
+<br>
+<center>
+<table border='0' cellpading='0' cellspacing='0'>
+	<tr>
+		<td class='td'><b><font face='Verdana, Arial, Helvetica, sans-serif'>{notify_message}</font></b></td>
+	</tr>
+	<tr>
+</table>
+</center>
+<br>
+<center>
+<table border='0' cellpading='0' cellspacing='0'>
+<tr>
+	<td>
+		<form>
+		<input type='submit' value='Ok' onclick='javascript:window.close()'>
+		</form>
+	</td>
+</tr>
+</table>
+</center>
+</body>
+</html>
+<!-- END list -->
Index: /trunk/calendar/templates/classic/listUsers.tpl
===================================================================
--- /trunk/calendar/templates/classic/listUsers.tpl	(revision 2)
+++ /trunk/calendar/templates/classic/listUsers.tpl	(revision 2)
@@ -0,0 +1,50 @@
+<html>
+	<head>
+		<title>{lang_Add_Participants}</title>
+	</head>
+	<body>
+		<form name="formAddUser" method="POST">	
+		 <center>	
+		  <table cellspacing="3" cellpadding="3">														
+		   <tr>
+			 <td>
+			  <div id="divAppboxHeader">{lang_Add_Participants}</div>
+			  <div id="divAppbox">
+			   <table border=0>
+				<tr><td>{lang_Organization}:</td></tr>
+				<tr><td><select name="select_organization" onchange="formAddUser.change_organization.value='True';formAddUser.submit()">.{combo_organization}.</select></td></tr>
+				<tr><td>{lang_Sector}:</td></tr>
+				<tr><td><select name="select_sector" onchange="formAddUser.submit()">.{combo_sector}.</select></td></tr>
+				<input type="hidden" name="change_organization" value="False">
+				<tr>
+				 <td>
+				  <select name="user_values" multiple style="width:250px" size="18" id="user_list_in">
+				  {options}
+				  </select>					
+				 </td>
+			    </tr>
+			    <tr><td align ="center"><font color="red"><span id="wait">&nbsp;</span></font></td></tr>				
+				<tr>
+				 <td>   			
+				  <center><font color="blue">{lang_to_Search}:</font>&nbsp;<input type="text" id="query" autocomplete="off" name="query" onkeyup="javascript:optionFinderTimeout(this)"></center>   			
+				 </td>
+				</tr>				
+				<tr><td>&nbsp;</td>	</tr>
+				<tr>
+				 <td>
+				  <center>
+				   <input type="button" class="button" value={lang_Add} onClick="javascript:adicionaListaCalendar()">
+				   <input type="button" value={lang_Close} onClick="javascript:window.close()">
+				  </center>
+				 </td>
+				</tr>		
+			   </table>
+			  </div>
+			 </td>	
+			</tr>
+		   </table>
+		  </center>				
+		 </form>
+	</body>
+</html>
+<script src="js/edit.js" type="text/javascript"></script>
Index: /trunk/calendar/templates/classic/month_day_print.tpl
===================================================================
--- /trunk/calendar/templates/classic/month_day_print.tpl	(revision 766)
+++ /trunk/calendar/templates/classic/month_day_print.tpl	(revision 766)
@@ -0,0 +1,26 @@
+
+<!-- BEGIN m_w_table -->
+
+<table id="calendar_m_w_table" class="calendar_m_w_table" border="0" width="100%">
+	<!-- from month_header.tpl -->
+	{row}
+</table>
+<!-- END m_w_table -->
+
+
+<table>
+<!-- BEGIN month_daily -->
+<tr><td style="font-size: 10px; font-weight: bold; text-decoration: underline;" width="10px">{day_number}</td>
+<td>{daily_events}</td>
+<!-- END month_daily -->
+
+<!-- BEGIN day_event -->
+
+<td>{events}</td>
+<!-- END day_event -->
+
+<!-- BEGIN event -->
+<td>{day_events}</td></tr>
+<!-- END event -->
+<br />
+</table>
Index: /trunk/calendar/templates/classic/event_link.tpl
===================================================================
--- /trunk/calendar/templates/classic/event_link.tpl	(revision 766)
+++ /trunk/calendar/templates/classic/event_link.tpl	(revision 766)
@@ -0,0 +1,41 @@
+
+<!-- BEGIN link_event_pict -->
+{picture}
+<!-- END link_event_pict -->
+
+<!-- BEGIN link_event_open -->
+<table>
+
+<!--<div id="calendar_event_entry" style="overflow:hidden;">-->
+<!--<a class="event_entry" href="{link_link}" onMouseOver="window.status='{lang_view}'; return true;" onMouseOut="window.status=''; return true;" title="{desc} {location}"><br />--><br />
+<!-- END link_event_open -->
+
+<!-- BEGIN event_pict -->
+<!--<img src="{pic_image}" width="{width}" height="{height}" title="{title}" border="0" />-->
+<!-- END event_pict -->
+
+<!-- BEGIN link_event_text_old -->
+<!--<nobr>&nbsp;{time}&nbsp;</nobr> {title}&nbsp;{users_status}: <i>{desc}</i>({location}) -->
+<!-- END link_event_text_old -->
+
+<!-- BEGIN link_event_text -->
+	<tr style="font-size: 10px;background: #dddddd;">
+		<td valign="top" style="color: black; font-size: 11px;">
+			<span>
+				{time}
+			</span>
+		</td>
+		<td style="font-size: 11px; border: #E8F0F0 1px solid;" colspan="3">
+			<span><b>{title}</b></span>
+			<br />
+			<span><i>{desc}</i></span>
+			<span>{location}</span>
+			<br />
+		</td>
+	</tr>
+<!-- END link_event_text -->
+
+<!-- BEGIN link_event_close -->
+<!--</a></div><br />-->
+</table>
+<!-- END link_event_close -->
Index: /trunk/calendar/templates/classic/footer.tpl
===================================================================
--- /trunk/calendar/templates/classic/footer.tpl	(revision 924)
+++ /trunk/calendar/templates/classic/footer.tpl	(revision 924)
@@ -0,0 +1,64 @@
+<!-- BEGIN footer_table -->
+       <hr clear="all">
+       <font size="-1">
+       <table border="0" width="100%" cellpadding="0" cellspacing="0">
+        <tr>
+{table_row}
+	</tr>
+       </table>
+<!-- END footer_table -->
+<!-- BEGIN footer_row -->
+         <td valign="top" width="30%">
+          <font size="-1">
+           <form action="{action_url}" method="post" name="{form_name}">
+            <B>{label}:</B>
+			{hidden_vars}
+            <select name="{form_label}" onchange="{form_onchange}">
+	     {row}
+	    </select>
+	    <input type="hidden" name="user" value="{user}">
+	    <input type="hidden" name="dia_ini" value="{dia_ini}">
+            <noscript><input type="submit" value="{go}"></noscript>
+	   </form>
+	  </font>
+	 </td>
+<!-- END footer_row -->
+<!-- BEGIN blank_row -->
+         <td>
+         {b_row}
+         </td>
+         <td>
+         {b_row2}
+         </td>
+<!-- END blank_row -->
+
+<!-- BEGIN num_dias -->
+<td valign="top" width="30%">
+ <font size="-1">
+    <form action="{acao}" method="post" name="{formname}">
+    <span style="display: {display}" >
+ 
+	<label>
+		<b>{num_dias_label}:</b>
+	</label>
+	<select name="{num_dias_name}" onchange="{formonchange}"/>
+		{row_qtd}
+	</select>
+	<br />
+	<span style="font-size: 9px;">
+		{tip}
+	</span>
+	<br /> <br />
+    </span>
+<span style="display: {display}">
+	<b>{day_ini_label}:</b>
+	<select name="{day_ini_name}" onchange="{formonchange}">
+	{row_ini}
+	</select>
+	</span>
+<input type="hidden" name="user" value="{user}">
+	<noscript><input type="submit" value="{go}"></noscript>
+     </form>
+ </font>
+</td>
+<!-- END num_dias -->
Index: /trunk/calendar/templates/classic/publicView.php
===================================================================
--- /trunk/calendar/templates/classic/publicView.php	(revision 2)
+++ /trunk/calendar/templates/classic/publicView.php	(revision 2)
@@ -0,0 +1,89 @@
+<?php 	
+	$user = $_POST['user'] ? $_POST['user'] : 
+		($_GET['user'] ? $_GET['user']: '');
+	
+	if($user) {
+		$organization = $_POST['organization'] ? $_POST['organization'] : 
+		($_GET['organization'] ? $_GET['organization']: '');
+		
+		if($organization)
+			$arg1 = $organization."-".$user;
+		else
+			$arg1 = $user;
+		
+		$params = "&account_name=".$arg1;
+	}
+	else
+		$params = '';
+?>
+<html>
+	<head><title>Visualizar Agenda</title>
+	<head>
+	<style type="text/css">
+		.grid_right{
+		border-style: groove;
+		border-width: 0px;
+		border-right-width: 1px;		
+		border-color: BLACK;		
+		}
+		.grid_top{
+		border-style: groove;
+		border-width: 0px;
+		border-top-width: 1px;		
+		border-color: BLACK;		
+		}
+	</style>
+	<LINK href="../../../phpgwapi/templates/celepar/css/celepar.css" type=text/css rel=StyleSheet>
+	<script language="Javascript">
+		function validate(){
+			if(document.login.user.value =="")	{
+				alert('Você deve digitar um nome no campo Usuário.');
+				document.login.user.focus();
+				return false;
+			}
+			
+			return true;
+		}
+	</script>
+	</head>
+	<body>
+	  <div align="center" valign="center">
+		<table cellspacing="0" cellpadding="5" width="100%" height="100%">			
+			<tr><td width="10%" valign="center"  class="grid_right"><br>
+				<table border="0" cellpadding="0" cellspacing="0" class="login" height="100%" width="100%">
+					<tr>
+						<td valign="top">
+	  					<FORM name="login" method="post" action="publicView.php" onSubmit="javascript:return validate()">
+							<table border="0" cellpadding="0" cellspacing="0" class="tableLogin">
+								<tr>
+									<td width="66" class="loginLabel" align="center"><b>Organização</b><br><input type="text" value="<?=$organization?>" name="organization" size="15"></td>
+								</tr>
+								<tr>									
+									<td>&nbsp;</td>
+								</tr>
+								<tr>
+									<td width="136" align="center" class="loginLabel"><b>Usuário</b><br><input name="user" size="15" value="<?=$user?>"></td>
+								</tr>
+								<tr>									
+									<td height="16">&nbsp;</td>
+								</tr>
+								<tr>
+									<td width="135" colspan="2" align="center">						
+									<input type="submit" value="Visualizar" name="submitit" class=button >
+									</td>
+									</tr>
+							</table>
+							</FORM>
+						</td>
+					</tr>
+				</table>								
+			</td>
+				<td width="90%" valign="top">
+					<iframe  width="100%" height="95%" src="../../../index.php?menuaction=calendar.uipublicview.publicView<?=$params?>"
+						marginwidth="0" marginheight="0"  topmargin="0" leftmargin="0" frameborder="0" scrolling="auto" noresize>
+					</iframe>
+			</td></tr>
+		</table>
+	  </div>
+	</body>
+</html>
Index: /trunk/calendar/templates/classic/month_print.tpl
===================================================================
--- /trunk/calendar/templates/classic/month_print.tpl	(revision 766)
+++ /trunk/calendar/templates/classic/month_print.tpl	(revision 766)
@@ -0,0 +1,26 @@
+{printer_friendly}
+<table class="calendar_index_table" id="calendar_index_table"  width="100%" cols="5">
+	<tr>
+		<td align="left" width="33%">
+			<span class="calendar_user_identifier">
+					{username}
+			</span>
+		</td>
+		<td align="center" width="33%">
+			<span class="calendar_month_identifier">
+				{month_identifier}
+			</span>
+		</td>
+		<td align="right" style="width: 33%; font-size: 14px;">
+			<span class="calendar_user_identifier">
+				<p>Agenda de Eventos</p>
+			</span>
+		</td>
+	</tr>
+</table>
+{large_month}
+<p>
+<p>
+<div class="calendar_link_print">
+	{print}
+</div>
Index: /trunk/calendar/templates/classic/head.tpl
===================================================================
--- /trunk/calendar/templates/classic/head.tpl	(revision 2)
+++ /trunk/calendar/templates/classic/head.tpl	(revision 2)
@@ -0,0 +1,25 @@
+<!-- BEGIN head -->
+<script language="Javascript">
+function openwindow(url)
+{ 
+	
+	var window_features = 	"scrollbars=yes,resizable=yes,location=no,menubar=no," + 
+							"personalbar=no,status=no,titlebar=no,toolbar=no," + 
+							"screenX=screen.width/3,screenY=screen.height/3,top=screen.height/3,left=screen.width/3,width=" + 
+							screen.width/4*3 + ",height=" + screen.height/8*3; 
+	
+	self.open(url,'', window_features); 
+}
+</script>
+{row}<br />
+<!-- END head -->
+<!-- BEGIN head_table -->
+<table id="calendar_head_table" class="calendar_head_table" border="0" width="100%" cols="{cols}" cellpadding="0" cellspacing="0">
+	<tr>
+		{header_column}
+	</tr>
+</table>
+<!-- END head_table -->
+<!-- BEGIN head_col -->
+{str}
+<!-- END head_col -->
Index: /trunk/calendar/templates/classic/body_email.tpl
===================================================================
--- /trunk/calendar/templates/classic/body_email.tpl	(revision 2)
+++ /trunk/calendar/templates/classic/body_email.tpl	(revision 2)
@@ -0,0 +1,32 @@
+<html>
+<head>
+<meta http-equiv="Content-Language" content="en" />
+<meta name="GENERATOR" content="PHPEclipse 1.0" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>title</title>
+</head>
+<body bgcolor="#FFFFFF" text="#000000" link="#FF9966" vlink="#FF9966" alink="#FFCC99">
+<!-- BEGIN list -->
+<b><p align='left'>{subject}</p></b>
+<br>
+<table border='0' cellpadding='0' cellspacing='0' width='100%'>
+<tr><td width='30%' valign='top'><b>{var1} ::</b></td><td>{vardata1}</td></tr>	
+<tr><td width='30%' valign='top'><b>{var2} ::</b></td><td>{vardata2}</td></tr>
+<tr><td width='30%' valign='top'><b>{var3} ::</b></td><td>{vardata3}</td></tr>
+<tr><td width='30%' valign='top'><b>{var4} ::</b></td><td>{vardata4}</td></tr>
+<tr><td width='25%' valign='top'><b>{var8} ::</b></td><td>{vardata8}</td></tr>
+<tr><td width='25%' valign='top'><b>{var5} ::</b></td><td>{vardata6}</td></tr>
+</table>
+<br>
+<hr size='1' width='100%'>
+<table border='0' cellpadding='4' cellspacing='4' width='100%'>
+<tr>
+<td width='2%' align='left'>{varbuttom}</td>
+<td width='2%' align='left' valign='top'>{varbuttom1}</td>
+<td width='2%' align='left' valign='top'>{varbuttom2}</td>
+<td width='94%' align='left' valign='top'>{varbuttom3}</td>
+</tr>
+</table>
+<!-- END list -->
+</body>
+</html>
Index: /trunk/calendar/templates/classic/config.tpl
===================================================================
--- /trunk/calendar/templates/classic/config.tpl	(revision 1124)
+++ /trunk/calendar/templates/classic/config.tpl	(revision 1124)
@@ -0,0 +1,107 @@
+<!-- BEGIN header -->
+<script type="text/javascript">
+
+function disableMinNum(valor){
+  if( valor == "True" ){
+	document.getElementById("minNum").disabled = true;
+	document.getElementById("minNum").value = 0;
+  }
+  else if (valor == "False"){
+	document.getElementById("minNum").disabled = false;
+  }
+}
+</script>
+<form name="adminForm" method="POST" action="{action_url}" onSubmit="return minValue()">
+<table border="0" align="center">
+   <tr bgcolor="{th_bg}">
+    <td colspan="2"><font color="{th_text}">&nbsp;<b>{title}</b></font></td>
+   </tr>
+<!-- END header -->
+
+<!-- BEGIN body -->
+   <tr bgcolor="{row_on}">
+    <td colspan="2">&nbsp;</td>
+   </tr>
+   <tr bgcolor="{row_off}">
+    <td colspan="2"><b>{lang_Calendar_settings}</b></td>
+   </tr>
+   <tr bgcolor="{row_on}">
+    <td>{lang_Do_you_wish_to_autoload_calendar_holidays_files_dynamically?}</td>
+    <td>
+     <select name="newsettings[auto_load_holidays]">
+      <option value=""{selected_auto_load_holidays_False}>{lang_No}</option>
+      <option value="True"{selected_auto_load_holidays_True}>{lang_Yes}</option>
+     </select>
+    </td>
+   </tr>
+   <tr bgcolor="{row_off}">
+    <td>{lang_Location_to_autoload_from}:</td>
+    <td>
+     <select name="newsettings[holidays_url_path]">
+      <option value="localhost"{selected_holidays_url_path_localhost}>localhost</option>
+      <option value="http://www.phpgroupware.org/cal"{selected_holidays_url_path_http://www.phpgroupware.org/cal}>www.phpgroupware.org</option>
+     </select>
+    </td>
+   <tr bgcolor="{row_on}">
+    <td colspan="2">&nbsp;</td>
+   </tr>    
+   </tr>
+    <tr bgcolor="{row_off}">
+    <td colspan="2"><b>{lang_ExpressoMail_Plugin_Calendar}</b></td>
+   </tr>
+   <tr bgcolor="{row_on}">
+    <td>{lang_Select_module_version_expressoMail_(if_available)}</td>
+    <td>
+     <select name="newsettings[cal_expressoMail]">
+      <option value="False"{selected_cal_expressoMail_False}>{lang_dont_use_any_plugin}</option>
+      <option value="1.0"{selected_cal_expressoMail_1.0}>Expresso 1.0</option>
+      <option value="1.2"{selected_cal_expressoMail_1.2}>Expresso 1.2</option>
+     </select>
+    </td>
+   </tr>
+    <tr bgcolor="{row_off}">
+    <td>{lang_Select_type_tree_view}</td>
+    <td>
+     <select name="newsettings[cal_type_tree_participants]">
+      <option value="3" {selected_cal_type_tree_participants_3}>{lang_all_levels}</option>
+      <option value="2" {selected_cal_type_tree_participants_2}>{lang_first_level_with_recursive_search}</option>
+      <option value="1" {selected_cal_type_tree_participants_1}>{lang_all_levels_with_not_recursive_search}</option>      
+     </select>
+    </td>
+   </tr>
+   
+   <tr bgcolor="{row_on}">
+     <td>{lang_Do_you_wish_enable_autosearch?}</td>
+     <td>
+       <select id="autoSearch" name="newsettings[auto_search]" onchange="disableMinNum(this.value)">
+        <option value="False"{selected_auto_search_False}>{lang_No}</option>
+        <option value="True"{selected_auto_search_True}>{lang_Yes}</option>
+       </select>
+     </td>
+   </tr>
+   
+   <tr bgcolor="{row_off}">
+       <td>{lang_Minimum_number_of_characters_to_start_the_search_for_participants}</td>
+       <td>
+          <input type="text" id="minNum" value="{value_min_num_characters}" name="newsettings[min_num_characters]    " size=2 maxlength=2 />
+       </td>
+   </tr>
+
+   <script> disableMinNum(document.getElementById("autoSearch").value); </script>
+<!-- END body -->
+
+<!-- BEGIN footer -->
+  <tr bgcolor="{th_bg}">
+    <td colspan="2">
+&nbsp;
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" align="center">
+      <input type="submit" name="submit" value="{lang_submit}">
+      <input type="submit" name="cancel" value="{lang_cancel}">
+     </td>
+  </tr>
+</table>
+</form>
+<!-- END footer -->
Index: /trunk/calendar/templates/classic/grant_group_access.tpl
===================================================================
--- /trunk/calendar/templates/classic/grant_group_access.tpl	(revision 421)
+++ /trunk/calendar/templates/classic/grant_group_access.tpl	(revision 421)
@@ -0,0 +1,65 @@
+<div align="center" style="width:100%">
+<input type="hidden" id="txt_loading" value="{lang_Loading}">
+<input type="hidden" id="txt_searching" value="{lang_Searching}">
+<input type="hidden" id="txt_users" value="{lang_Users}">
+<input type="hidden" id="txt_groups" value="{lang_Groups}">
+<input type="hidden" id="txt_confirm" value="{lang_confirm}">
+<input type="hidden" id="txt_success" value="{lang_success}">
+<input type="hidden" id="txt_exist" value="{lang_exist}">
+<input type="hidden" id="txt_nouser" value="{lang_nouser}">
+<input type="hidden" id="txt_nogroup" value="{lang_nogroup}">
+<input type="hidden" id="txt_nopermissiontype" value="{lang_nopermissiontype}">
+<input type="hidden" id="txt_typemoreletters" value="{lang_typemoreletters}">
+<input type="hidden" id="template_set" value="{template_set}">
+<table width="80%" border="0">
+<tr>
+<td align='center' valign="bottom"><br><b>{lang_User_to_grant_access}</b><br>
+	<font color="red"><span id="cal_span_searching1">&nbsp;</span></font>
+	<br>{lang_Search_for}: <input type="text" id="cal_input_searchUser1" name="cal_input_searchUser1" value="" size=30 autocomplete="off" onkeyup="javascript:search_object(this,'cal_span_searching1','user','u')"/>
+	<br><br>
+	<select id="user" style="width: 300px" size="13"></select>
+</td>
+<td width="20px" valign="middle" align="left"><br><br><br><br>
+<button type="button" onClick="javascript:add_user();"><img src="{template_set}/images/add.png" style="vertical-align: middle;" >{lang_Add}</button>
+<br><br><b>{lang_access_type}</b><br>
+<input type="checkbox" id="right_L" value="L"/>{lang_read}<br>
+<input type="checkbox" id="right_A" value="A"/>{lang_add}<br>
+<input type="checkbox" id="right_E" value="E"/>{lang_edit}<br>
+<input type="checkbox" id="right_R" value="R"/>{lang_delete}<br>
+<input type="checkbox" id="right_P" value="P"/>{lang_private}
+</td>
+<td align='center' valign="bottom"><br><b>{lang_Group_to_share_calendar}</b><br>
+	<font color="red"><span id="cal_span_searching2">&nbsp;</span></font>
+	<br>{lang_Search_for}:	<input type="text" id="cal_input_searchUser2" name="cal_input_searchUser2" value="" size=30 autocomplete="off" onkeyup="javascript:search_object(this,'cal_span_searching2','group','g')"/><br><br>
+	<select id="group" style="width: 300px" size="13"></select>
+</td>
+</tr>
+	<tr height="20px"></tr>
+	<tr bgcolor="{tr_color}" style="font-size:0.8em">
+		<th align="left" width="25%" nowrap>&nbsp;{lang_granted_user}</th>
+		<th align="center" width="1%">{lang_access_type}</th>
+		<th align="left" width="40%" nowrap>&nbsp;{lang_shared_group}</th>
+		<th width="1%">&nbsp;</th>
+	</tr>
+<tbody id='tbody_list' >
+<!-- BEGIN list -->
+	<tr id='{select}' bgcolor="{tr_color_header}">
+		<td>
+			<b>&nbsp;&nbsp;{granted_user}</b>
+		</td>
+		<td align="center">
+			{access_type}
+		</td>		
+		<td>
+			&nbsp;&nbsp;{shared_group}
+		</td>
+		<td align="center">
+			<button  title="{lang_Remove}" type="button" onClick="javascript:remove_user('{select}');"><img alt="{lang_Remove}" src="{template_set}/images/delete.png" style="vertical-align: middle;"/></button>
+		</td>
+	</tr>
+<!-- END list -->
+</tbody>
+</table>
+<br><br>
+</div>
+{scripts}
Index: /trunk/calendar/templates/classic/app.css
===================================================================
--- /trunk/calendar/templates/classic/app.css	(revision 766)
+++ /trunk/calendar/templates/classic/app.css	(revision 766)
@@ -0,0 +1,290 @@
+/* CSS Document */
+.calendar_print_main {
+	text-align:center;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 8px;
+	color: #000066;
+	background-color: #F7F7F7;
+	border: 1px solid #CCCCCC;
+	margin: 5px;
+	padding: 5px;
+	height: 156px;
+	width: 480px;
+}
+
+.button
+{
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 14px;
+	color: 006699;
+	background-color: #D4D0C8;
+	border: 2px solid #666666;
+}
+
+.to_continue
+{
+	font-size: 9px;
+}
+
+A.minicalendar 
+{ 
+	color: #000000; 
+	font-size: 9px;
+	
+}
+
+A.bminicalendar 
+{ 
+	color: #336699; 
+	font-style: italic;
+	font-weight: bold;
+	font-size: 9px; 
+}
+
+A.minicalendargrey 
+{ 
+	color: #999999; 
+	font-size: 10px;
+	font-weight: bold;
+}
+
+A.bminicalendargrey 
+{ 
+	color: #336699; 
+	font-style: italic; 
+	font-size:10px; 
+}
+
+A.minicalhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #000000; 
+	font-size: 10px; 
+}
+
+A.bminicalhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #336699; 
+	font-size: 10px; 
+}
+
+A.minicalgreyhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #999999; 
+	font-size: 10px; 
+}
+
+A.bminicalgreyhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #999999; 
+	font-size: 10px; 
+}
+
+
+.event-on
+{ 
+	background: #D3DCE3;
+	border: #E8F0F0 1px solid;
+}
+
+.event-off
+{ 
+	background: #E8F0F0;
+	border: #D3DCE3 1px solid;
+}
+
+.event-holiday
+{
+	font-size: 100%;
+	background: #dac0c0;
+	color:#000000;
+	vertical-align: middle;
+}
+
+.time
+{
+	background: #D3DCE3;
+	color:#000000;
+	font-size: 10px;
+	font-weight: bold;
+	vertical-align: middle;
+	width: 5.2%;
+	text-align: right;
+	padding-right: 5px;
+	line-height: 11px;
+	border: #E8F0F0 1px solid;
+}
+
+
+.planner-cell
+{
+	cursor: pointer;
+	cursor: hand;
+	border: thin solid black;
+}
+
+/* common */
+.calendar_link_print
+{
+	text-align: center;
+	font-size: 10px;
+}
+
+//Mini Calendar
+
+.calendar_minical_table
+{
+	width: 180px;
+	font-weight: bold;
+}
+
+.calendar_minical_daytable
+{
+	width: 100%;
+}
+
+.calendar_minical_dayname
+{
+	font-size: 9px;
+	text-align: right;
+}
+
+.calendar_minical_hrule
+{
+	width: 96%;
+}
+
+/* Header */
+.calendar_dropbuttons
+{
+	align: center;
+	text-align: center;
+	vertical-align: bottom;
+	font-weight: bold;
+	font-size: 8px;
+}
+
+.calendar-weekidentifier
+{
+	font-size:16px;
+	font-weight: bold;
+	text-align: center;
+}
+
+.calendar_header
+{
+	font-size: 16px;
+	font-weight: bold;
+	text-align: center;
+}
+
+.calendar_dayview_table_header
+{
+	font-size: 13px;
+	font-weight: bold;
+	text-align: center;
+}
+
+.calendar_dayview_todo_header
+{
+	margin: 0px; 
+	padding: 2px;
+	font-weight: bold;
+}
+
+/* week view */
+.calendar_week_identifier_table
+{
+	border: 0px solid black;
+	width: 100%;
+}
+
+.calendar_week_identifier
+{
+	font-size: 13px;
+	text-align: center;
+	font-weight: bold;
+}
+
+.calendar_weekview_daytitle
+{
+	font-weight: bold;
+	font-size: 12px;
+	background: #D3DCE3;
+}
+
+.calendar_m_w_table
+{
+	table-layout:fixed;
+	overflow:hidden;
+	height: 90%;
+	width: 100%;
+	border: 0px #000000 solid;
+}
+
+.calendar_m_w_tablecell
+{
+	overflow:hidden;
+	vertical-align: top;
+	padding-left: 4px;
+	padding-right: 4px;
+	padding-bottom: 6px;
+}
+
+.screen_only
+{
+	font-size: 10px;
+}
+
+.calendar_m_w_table_daynumber
+{
+	font-weight: bold;
+	font-size: 10px;
+}
+
+A.event_entry
+{
+	font-size:10px;
+}
+
+/* month view */
+
+.calendar_month_identifier
+{
+	font-size:14px;
+	font-weight: bold;
+}
+
+.calendar_user_identifier
+{
+	font-size:12px;
+	color: #009999;
+	font-weight: bold;
+}
+
+.calendar_week_minical_table
+{
+	width:100%;
+	border: 0px solid #000000
+}
+
+.calendar_weekinfo
+{
+	color: #000000;
+	padding-left: 2px;
+	padding-right: 2px;
+	font-size: 10px;
+	font-weight: bold;
+	font-style: italic;
+}
Index: /trunk/calendar/templates/classic/publicView.tpl
===================================================================
--- /trunk/calendar/templates/classic/publicView.tpl	(revision 2)
+++ /trunk/calendar/templates/classic/publicView.tpl	(revision 2)
@@ -0,0 +1,2 @@
+{week_display}
+</div>
Index: /trunk/calendar/templates/classic/view.tpl
===================================================================
--- /trunk/calendar/templates/classic/view.tpl	(revision 2)
+++ /trunk/calendar/templates/classic/view.tpl	(revision 2)
@@ -0,0 +1,46 @@
+
+<!-- BEGIN view_event -->
+<center>
+<table id="calendar_view_event" border="0" width="90%">
+	{row}
+	<tr>
+		<td>
+			<table id="calendar_viewevent_button_left" cellspacing="5">
+				<tr>
+					{button_left}
+				</tr>
+			</table>
+		</td>
+	   <td align="center">
+			<table id="calendar_viewevent_button_center" cellspacing="5">
+				<tr>
+					{button_center}
+				</tr>
+			</table>
+		</td>
+		<td align="right">
+			<table id="calendar_viewevent_button_right" cellspacing="5">
+				<tr>
+					{button_right}
+				</tr>
+			</table>
+		</td>
+	</tr>
+</table>
+</center>
+<!-- END view_event -->
+
+<!-- BEGIN list -->
+	<tr bgcolor="{tr_color}">
+		<td valign="top" width="30%">&nbsp;<b>{field}:</b></td>
+		<td colspan="2" valign="top" width="70%">{data}</td>
+	</tr>
+<!-- END list -->
+
+<!-- BEGIN hr -->
+	<tr>
+		<td colspan="3" bgcolor="{th_bg}" align="center">
+			<b>{hr_text}</b>
+		</td>
+	</tr>
+<!-- END hr -->
Index: /trunk/calendar/templates/classic/day.tpl
===================================================================
--- /trunk/calendar/templates/classic/day.tpl	(revision 2)
+++ /trunk/calendar/templates/classic/day.tpl	(revision 2)
@@ -0,0 +1,39 @@
+<!-- BEGIN day -->
+{printer_friendly}
+<table id="calendar_dayview_table" class="calendar_dayview_table" border="0" width="100%">
+	<tr>
+		<td valign="top" width="70%">
+			<table id="calendar_dayview1" border="0" width=100%>
+				<tr>
+					<td class="calendar_dayview_table_header">
+      					{date}&nbsp;<span class="calendar_user_identifier">:&nbsp;{username}&nbsp;:</span>
+						<br />
+     				</td>
+    			</tr>
+				{day_events}
+   			</table>
+   			<p align="center">{print}</p>
+  		</td>
+ 		 <td align="center" valign="top">
+  			 <table id="calendar_dayview2" width="100%">
+    			<tr>
+     				<td align="center">
+						{small_calendar}
+     				</td>
+    			</tr>
+
+   			</table>
+  		</td>
+ 	</tr>
+</table>
+<!-- END day -->
+
+<!-- BEGIN day_event -->
+	<tr>
+		<td>
+
+			{daily_events}
+
+		</td>
+	</tr>
+<!-- END day_event -->
Index: /trunk/calendar/templates/classic/js/edit_exmail.js
===================================================================
--- /trunk/calendar/templates/classic/js/edit_exmail.js	(revision 1125)
+++ /trunk/calendar/templates/classic/js/edit_exmail.js	(revision 1125)
@@ -0,0 +1,389 @@
+/******************************************************************************\
+|**************************   CALENDAR MODULE   *******************************|
+|********** INCLUDE PARTICIPANTS - PLUGIN USING AJAX EXPRESSOMAIL COMPONENT  **|
+\******************************************************************************/
+var contacts = '';
+var array_lang = new Array();
+var finderTimeout = '';
+// onUnload edit message
+if(!document.all)
+{
+	var beforeunload = window.onbeforeunload;
+	window.onbeforeunload = function()
+	{
+		if ( typeof beforeunload == 'function' )
+			beforeunload();
+	};
+}
+	
+// Verifica versão do Firefox
+var agt = navigator.userAgent.toLowerCase();
+var is_firefox_0 = agt.indexOf('firefox/1.0') != -1 && agt.indexOf('firefox/0.') ? true : false;
+ 
+function get_available_users(filter,autoSearch)
+//function get_available_users(path,context,type)
+{
+	text= document.getElementById("cal_input_searchUser");
+	
+	var handler_get_available_users = function(data)
+	{	
+		select_available_users = document.getElementById('user_list_in');
+		
+		for(var i=0; i<select_available_users.options.length; i++){
+			select_available_users.options[i] = null;
+			i--;
+		}
+		var options = '###';
+		if (data) {
+			if(data.groups && data.groups.length > 0) {
+				data.groups = '<option  value="-1" disabled>------------------- '+document.getElementById("txt_groups").value+' ------------------ </option>' + data.groups;
+			}
+			
+			if(data.users && data.users.length > 0) {
+				data.users = '<option  value="-1" disabled>------------------- '+document.getElementById("txt_users").value+' ------------------ </option>' + data.users;
+			}
+			options +=  data.groups && data.groups.length > 0 ? data.groups : '';
+			options +=  data.users  && data.users.length  > 0 ? data.users  : '';
+			
+			if(is_firefox_0)
+				fixBugInnerSelect(select_available_users,options);
+			else
+				select_available_users.innerHTML = options;
+
+			select_available_users.outerHTML = select_available_users.outerHTML;
+			select_available_users.disabled = false;
+			select_available_users_clone = document.getElementById('user_list_in').cloneNode(true);
+			//document.getElementById('cal_input_searchUser').value = '';
+		}
+	}	
+		context = document.getElementById('combo_org').value;
+		cExecute ('expressoMail1_2'+'.ldap_functions.search_users&filter='+filter+'&context='+context+'&type=search', handler_get_available_users);
+		
+		if((autoSearch == 'True') && (!text.value)){
+	                var search = " ";
+	                get_available_users(search);
+	        }
+		//cExecute (path+'.ldap_functions.get_available_users&context='+context+'&type='+type, handler_get_available_users);
+}
+
+function optionFinderTimeout(obj,numMin){
+		var oWait = document.getElementById("cal_span_searching");
+		clearTimeout(finderTimeout);
+		if (obj.value.length >= numMin){				
+			oWait.innerHTML = 'Buscando...';
+			finderTimeout = setTimeout("optionFinder('"+obj.id+"','"+numMin+"')",500);
+		}else {
+			oWait.innerHTML = 'Mínimo de '+numMin+' letras para pesquisa';
+			var select_available_users_tmp = document.getElementById('user_list_in');
+			for(var i = 0;i < select_available_users_tmp.options.length; i++)
+			select_available_users_tmp.options[i--] = null;
+		}
+}
+	
+function optionFinder(id,numMin){
+	
+		var oWait = document.getElementById("cal_span_searching");
+		var oText = document.getElementById(id);
+			
+		if (oText.value.length < numMin) {
+				oWait.innerHTML = '';
+				var select_available_users_tmp = document.getElementById('user_list_in');
+				for(var i = 0;i < select_available_users_tmp.options.length; i++)
+					select_available_users_tmp.options[i--] = null;
+		}
+		
+		if (oText.value.length >= numMin) {
+			get_available_users(oText.value);
+		
+			var select_available_users_tmp = document.getElementById('user_list_in');
+			for(var i = 0;i < select_available_users_tmp.options.length; i++)
+				select_available_users_tmp.options[i--] = null;
+			var RegExp_name = new RegExp("\\b"+oText.value, "i");
+	
+			oWait.innerHTML = '&nbsp;';
+		}
+}
+	function autoOptionFinder(){
+		var oWait = document.getElementById("cal_span_searching");
+                var oText = document.getElementById(id);
+		var select_available_users_tmp = document.getElementById('user_list_in');
+                for(var i = 0;i < select_available_users_tmp.options.length; i++)
+                	select_available_users_tmp.options[i--] = null;
+		var RegExp_name = new RegExp("\\b   ", "i");
+		oWait.innerHTML = '&nbsp;';
+	}
+
+function add_user()
+{
+	var select_available_users = document.getElementById('user_list_in');
+	var select_users = document.getElementById('user_list');
+	var count_available_users = select_available_users.length;
+	var count_users = select_users.options.length;
+	var new_options = '';
+	
+	for (i = 0 ; i < count_available_users ; i++) {
+		if (select_available_users.options[i].selected)	{
+			if(document.all) {
+				if ( (select_users.innerHTML.indexOf('value='+select_available_users.options[i].value)) == '-1' ) {
+					new_options +=  '<option value='
+								+ select_available_users.options[i].value
+								+ '>'
+								+ select_available_users.options[i].text
+								+ '</option>';
+				}
+			}
+			else if ( (select_users.innerHTML.indexOf('value="'+select_available_users.options[i].value+'"')) == '-1' ) {
+					new_options +=  '<option value='
+								+ select_available_users.options[i].value
+								+ '>'
+								+ select_available_users.options[i].text
+								+ '</option>';
+			}
+		}
+	}
+
+	if (new_options != '') {
+
+		if(is_firefox_0)
+			fixBugInnerSelect(select_users,'###' + new_options + select_users.innerHTML);
+		else
+			select_users.innerHTML = '###' + new_options + select_users.innerHTML;
+
+		select_users.outerHTML = select_users.outerHTML;
+	}
+}
+
+function remove_user(){
+	select_users = document.getElementById('user_list');
+	
+	for(var i = 0;i < select_users.options.length; i++)
+		if(select_users.options[i].selected)
+			select_users.options[i--] = null;
+}
+
+function submitValues(){
+	var typeField = document.getElementById('cal[type]');
+	if (typeField && typeField.value == 'hourAppointment') {
+		if(document.getElementsByName('categories[]')[0].value == ""){
+			alert(alert_msg);
+			return false;
+		}
+	}
+	var select_in = document.getElementById('user_list');
+	for(i = 0; i < select_in.length; i++)
+	 	select_in.options[i].selected = true;
+}	
+
+function Element(id){
+	return document.getElementById(id);
+}
+
+function loadScript(scriptPath){
+
+	if(!connector)
+		throw new Error("Error : Connector is not loaded.");
+		
+  	if (document.getElementById('uploadscript_'+scriptPath)) {
+  		return;
+   	}
+  	
+	connector.oxmlhttp.open("GET", scriptPath, false);
+    connector.oxmlhttp.setRequestHeader('Content-Type','text/plain');
+	connector.oxmlhttp.send(null);
+	if(connector.oxmlhttp.status != 0 && connector.oxmlhttp.status != 200 || 	connector.oxmlhttp.status == 0 && connector.oxmlhttp.responseText.length == 0)
+		throw new Error("Error " + connector.oxmlhttp.status + "("+connector.oxmlhttp.statusText+") when loading script file '"+scriptPath+"'");
+	
+	var head = document.getElementsByTagName("head")[0];
+	var script = document.createElement("SCRIPT");
+	script.id = 'uploadscript_'+scriptPath;
+	script.type = 'text/javascript';		
+	script.text = connector.oxmlhttp.responseText;
+	head.appendChild(script);
+	return;	
+}
+
+function showExParticipants(el,path){
+	Element('tbl_ext_participants').style.display='';
+	el.style.display='none';
+	loadScript(path+"/js/DropDownContacts.js");
+	loadScript(path+"/js/common_functions.js");
+	loadScript(path+"/js/QuickCatalogSearch.js");
+	loadScript("calendar/templates/celepar/js/over_fn_exmail.js");
+	if(!contacts)
+		cExecute (path+'.db_functions.get_dropdown_contacts', save_contacts);
+}
+
+function hideExParticipants(el,path){
+	Element('a_ext_participants').style.display = '';
+	Element('tbl_ext_participants').style.display ='none';
+}
+
+function save_contacts(data){
+	contacts = data;	
+	var input_to = Element("ex_participants");
+	input_to.style.width = "100%";
+	input_to.setAttribute("wrap","soft");	
+	input_to.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); search_contacts('onfocus', this.id);};
+	input_to.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);};
+	if (!is_ie)
+	{
+		input_to.rows = 2;
+		input_to.onkeypress = function (e)
+		{
+			if ((e.keyCode) == 120) //F9
+			{
+				emQuickSearch(input_to);
+			}
+			else 
+			{ 
+				if (((e.keyCode == 13) || ((e.keyCode == 38)||(e.keyCode == 40))) && (document.getElementById('tipDiv').style.visibility!='hidden'))
+				{
+					e.preventDefault();
+					search_contacts(e.keyCode,this.id);
+				}
+			}
+		}
+		input_to.onkeyup = function (e)
+		{
+			if ((e.keyCode != 13) && (e.keyCode != 38) && (e.keyCode != 40))
+			{
+				search_contacts(e.keyCode,this.id);
+			}
+		}
+	}
+	else
+	{
+		input_to.rows = 3;
+		input_to.onkeyup = function (e)
+		{
+			if ((window.event.keyCode) == 120) //F9
+			{
+				emQuickSearch(input_to);
+			}
+			else 
+			{ 
+				search_contacts(window.event.keyCode,this.id);
+			}	
+		}
+	}
+}
+
+function fixBugInnerSelect(objeto,innerHTML){
+/******
+* select_innerHTML - altera o innerHTML de um select independente se é FF ou IE
+* Corrige o problema de não ser possível usar o innerHTML no IE corretamente
+* Veja o problema em: http://support.microsoft.com/default.aspx?scid=kb;en-us;276228
+* Use a vontade mas coloque meu nome nos créditos. Dúvidas, me mande um email.
+* Versão: 1.0 - 06/04/2006
+* Autor: Micox - Náiron José C. Guimarães - micoxjcg@yahoo.com.br
+* Parametros:
+* objeto(tipo object): o select a ser alterado
+* innerHTML(tipo string): o novo valor do innerHTML
+*******/
+    objeto.innerHTML = ""
+    var selTemp = document.createElement("micoxselect")
+    var opt;
+    selTemp.id="micoxselect1"
+    document.body.appendChild(selTemp)
+    selTemp = document.getElementById("micoxselect1")
+    selTemp.style.display="none"
+    if(innerHTML.toLowerCase().indexOf("<option")<0){//se não é option eu converto
+        innerHTML = "<option>" + innerHTML + "</option>"
+    }
+    innerHTML = innerHTML.replace(/<option/g,"<span").replace(/<\/option/g,"</span")
+    selTemp.innerHTML = innerHTML
+    for(var i=0;i<selTemp.childNodes.length;i++){
+        if(selTemp.childNodes[i].tagName){
+            opt = document.createElement("OPTION")
+            for(var j=0;j<selTemp.childNodes[i].attributes.length;j++){
+                opt.setAttributeNode(selTemp.childNodes[i].attributes[j].cloneNode(true))
+            }
+            opt.value = selTemp.childNodes[i].getAttribute("value")
+            opt.text = selTemp.childNodes[i].innerHTML
+            if(document.all){ //IEca
+                objeto.add(opt)
+            }else{
+                objeto.appendChild(opt)
+            }                    
+        }    
+    }
+    document.body.removeChild(selTemp)
+    selTemp = null
+}
+
+function changeViewMode(eltype){
+	var chValue = eltype;
+	switch (chValue){
+		case 'hourAppointment':
+			var names=new Array('title','priority','location','alarmhours','alarmminutes','recur_type','rpt_use_end','recur_interval','rpt_label');
+			for (var i=0; i < names.length; i++)
+			{
+				var Field = document.getElementsByName('cal['+names[i]+']');
+				if (Field[0])
+					Field[0].parentNode.parentNode.style.display = "none";
+			}
+
+			Field = document.getElementsByName('participants[]');
+			Field[0].parentNode.parentNode.style.display = "none";
+			Field[1].parentNode.parentNode.style.display = "none";
+			Field = document.getElementById('txt_loading');
+			Field.parentNode.parentNode.style.display = "none";
+			Field = document.getElementsByName('cal[rpt_day][]');
+			Field[0].parentNode.parentNode.style.display = "none";
+			break;
+		case 'privateHiddenFields':
+			var names=new Array('title','priority','location','alarmhours','alarmminutes','recur_type','rpt_use_end','recur_interval','rpt_label');
+			for (var i=0; i < names.length; i++)
+			{
+				var Field = document.getElementsByName('cal['+names[i]+']');
+				if (Field[0])
+					Field[0].parentNode.parentNode.style.display = "";
+			}
+			Field = document.getElementsByName('participants[]');
+			Field[0].parentNode.parentNode.style.display = "none";
+			Field[1].parentNode.parentNode.style.display = "none";
+			Field = document.getElementById('txt_loading');
+			Field.parentNode.parentNode.style.display = "none";
+			Field = document.getElementsByName('cal[rpt_day][]');
+			Field[0].parentNode.parentNode.style.display = "";
+			break;
+		default:
+			var names=new Array('title','priority','location','alarmhours','alarmminutes','recur_type','rpt_use_end','recur_interval','rpt_label');
+			for (var i=0; i < names.length; i++)
+			{
+				var Field = document.getElementsByName('cal['+names[i]+']');
+				if (Field[0])
+					Field[0].parentNode.parentNode.style.display = "";
+			}
+			Field = document.getElementsByName('participants[]');
+			Field[0].parentNode.parentNode.style.display = "";
+			Field[1].parentNode.parentNode.style.display = "";
+			Field = document.getElementById('txt_loading');
+			Field.parentNode.parentNode.style.display = "";
+			Field = document.getElementsByName('cal[rpt_day][]');
+			Field[0].parentNode.parentNode.style.display = "";
+			break;
+	}
+
+}
+function updateTitleField(select){
+	var typeField = document.getElementsByName('cal[type]');
+	if (typeField[0].value != 'hourAppointment')
+		return;
+	var titleField = document.getElementsByName('cal[title]');
+	var optionsArray = select.childNodes;
+	titleField[0].value = '';
+	for(option in optionsArray)
+		if (optionsArray[option].selected)
+			titleField[0].value += optionsArray[option].text + ' ';
+}
+
+var __onLoad = window.onload;
+window.onload = function(){ 
+	__onLoad();
+	var cal_type = document.getElementById('cal[type]').value;
+	changeViewMode(cal_type);
+	if(cal_type == 'hourAppointment'){
+		clearTimeout(timeout_get_available_users);
+	}
+};
Index: /trunk/calendar/templates/classic/js/edit.js
===================================================================
--- /trunk/calendar/templates/classic/js/edit.js	(revision 638)
+++ /trunk/calendar/templates/classic/js/edit.js	(revision 638)
@@ -0,0 +1,101 @@
+/******************************************************************************\
+|**************************   MODULO   AGENDA   *******************************|
+|********** SCRIPT REFERENTE A CAIXA DE INCLUSAO DE PARTICIPANTES  ************|
+\******************************************************************************/
+
+// Variaveis Locais 
+	var select_in  = document.getElementById('user_list');
+	var select_out  = document.getElementById('user_list_in');	
+	var users_out = select_out.cloneNode(true);
+	var finderTimeout = '';
+																		
+// Funcoes				
+	function showExParticipants(el,path){
+		document.getElementById('tbl_ext_participants').style.display='';
+		el.style.display='none';
+	}
+	
+	function hideExParticipants(el,path){
+		document.getElementById('a_ext_participants').style.display = '';
+		document.getElementById('tbl_ext_participants').style.display ='none';
+	}
+							
+	function optionFinderTimeout(obj){
+
+		clearTimeout(finderTimeout);	
+		var oWait = document.getElementById("wait");
+		oWait.innerHTML = 'Buscando...';
+		finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500);
+	}
+	function optionFinder(id) {	
+		var oWait = document.getElementById("wait");
+		var oText = document.getElementById(id);
+		for(var i = 0;i < select_out.options.length; i++)				
+			select_out.options[i--] = null;
+																							
+		for(i = 0; i < users_out.length; i++){																							
+			if(users_out[i].text.substring(0 ,oText.value.length).toUpperCase() == oText.value.toUpperCase()) {
+				sel = select_out.options;						
+				option = new Option(users_out[i].text,users_out[i].value);				
+				sel[sel.length] = option;
+			}
+		}
+		oWait.innerHTML = '&nbsp;';
+	}			
+									
+	function rem()
+	{
+		for(var i = 0;i < select_in.options.length; i++)				
+			if(select_in.options[i].selected)
+				select_in.options[i--] = null;																	
+	}
+													 									
+	function submitValues(alert_msg){
+		var typeField = document.getElementById('cal[type]');
+		if (typeField && typeField.value == 'hourAppointment')
+			if(document.getElementsByName('categories[]')[0].value == ""){
+				alert(alert_msg);
+				return false;
+				}
+		for(i = 0; i < select_in.length; i++)
+		 	select_in.options[i].selected = true;
+	}
+	
+	
+	
+	function openListUsers(newWidth,newHeight, owner){					
+		newScreenX  = screen.width - newWidth;		
+		newScreenY  = 0;		
+		window.open('calendar/templates/celepar/listUsers.php?owner='+owner,"","width="+newWidth+",height="+newHeight+",screenX="+newScreenX+",left="+newScreenX+",screenY="+newScreenY+",top="+newScreenY+",toolbar=no,scrollbars=yes,resizable=no");
+	}
+
+ 	function adicionaListaCalendar() 
+ 	{
+		var select = window.document.getElementById('user_list_in');
+		var selectOpener = window.opener.document.getElementById('user_list');
+		for (i = 0 ; i < select.length ; i++) {				
+
+			if (select.options[i].selected) {
+				isSelected = false;
+
+				for(var j = 0;j < selectOpener.options.length; j++) {																			
+					if(selectOpener.options[j].value == select.options[i].value){
+						isSelected = true;						
+						break;	
+					}
+				}
+
+				if(!isSelected){
+
+					option = window.opener.document.createElement('option');
+					option.value =select.options[i].value;
+					option.text = select.options[i].text;
+					selectOpener.options[selectOpener.options.length] = option;	
+				}
+				
+			}
+		}
+		selectOpener.options[selectOpener.options.length-1].selected = true;
+ 	}
+	
+// Fim        
Index: /trunk/calendar/templates/classic/js/search.js
===================================================================
--- /trunk/calendar/templates/classic/js/search.js	(revision 421)
+++ /trunk/calendar/templates/classic/js/search.js	(revision 421)
@@ -0,0 +1,108 @@
+var searchTimeout;
+
+function lang(key){
+	return document.getElementById("txt_"+key).value;
+}
+
+function remove_user(id){
+	if(!confirm(lang("confirm")))
+		return true;	
+	var handler_rem_user = function(data){
+		if(data) {
+			var tr = document.getElementById(id);
+			tr.parentNode.removeChild(tr);
+		}
+	}	
+	cExecute ('calendar.uigroup_access.rem_user&id='+id, handler_rem_user);
+}
+function add_user(){
+	var select_users = document.getElementById("user");
+	var select_groups = document.getElementById("group");
+	var a_rights = new Array("L","A","E","R","P");
+	var rights = '';
+	for(var z = 0; z < a_rights.length; z++){
+		var check = document.getElementById("right_"+a_rights[z]);
+		if(check.checked){
+			rights += check.value;
+		}
+	}
+	if(!select_users.value){
+		alert(lang("nouser"));
+		return;
+	}
+	else if(!select_groups.value){
+		alert(lang("nogroup"));
+		return;
+	}
+	else if(!rights){
+		alert(lang("nopermissiontype"));
+		return;
+	}
+	
+	var str = select_users.value+";"+select_groups.value;
+	var handler_add_user = function(data){
+		
+		if(data){
+			var t = document.getElementById('tbody_list');
+			var tr = document.createElement("TR");
+			tr.bgColor = "#DCDCDC";
+			var td1 = document.createElement("TD");
+			var td2 = document.createElement("TD");
+			var td3 = document.createElement("TD");
+			var td4 = document.createElement("TD");
+			tr.id = str;
+			td1.innerHTML = "<b>&nbsp;&nbsp;"+select_users[select_users.selectedIndex].text+"</b>";
+			td2.innerHTML = rights;
+			td2.align = "center";
+			td3.innerHTML = "&nbsp;&nbsp;"+select_groups[select_groups.selectedIndex].text;
+			td4.innerHTML = "<button  title='remove' type='button' onClick='javascript:remove_user(\""+str+"\");'><img src='"+document.getElementById("template_set").value+"/images/delete.png' style='vertical-align: middle;'/></button>";
+			tr.appendChild(td1);
+			tr.appendChild(td2);
+			tr.appendChild(td3);
+			tr.appendChild(td4);
+			t.appendChild(tr);
+			alert(lang("success"));
+		}
+		else{
+			alert(lang("exist"));
+		}
+	}
+	cExecute ('calendar.uigroup_access.add_user&id='+str+"&rights="+rights, handler_add_user);
+	return true;
+		
+}
+function search_object(input, id_span, id_select, type)
+{
+	clearTimeout(searchTimeout);	
+	var spam = document.getElementById(id_span);
+	if (input.value.length <= 3){
+		spam.innerHTML = lang("typemoreletters").replace("X",4 - input.value.length);
+	}else{
+		spam.innerHTML = lang("searching")+'...';
+		searchTimeout = setTimeout("search_ldap('"+input.id+"','"+id_span+"','"+id_select+"','"+type+"')",750);
+	}
+}
+
+function search_ldap(id_input, id_span, id_select, type)
+{
+	var search = document.getElementById(id_input).value;
+	
+	var handler_search_user = function(data)
+	{
+		var spam = document.getElementById(id_span);
+		select_available_users = document.getElementById(id_select);
+		if (data.status == 'false')
+		{
+			spam.innerHTML = data.msg;
+			// Necessario, pois o IE6 tem um bug que retira o primeiro options se o innerHTML estiver vazio.
+			select_available_users.innerHTML = '#';
+			select_available_users.outerHTML = select_available_users.outerHTML;
+			return;
+		}	
+		spam.innerHTML = '';
+		// Necessario, pois o IE6 tem um bug que retira o primeiro options se o innerHTML estiver vazio.
+		select_available_users.innerHTML = '#' + data;
+		select_available_users.outerHTML = select_available_users.outerHTML;
+	}
+	cExecute ('calendar.uigroup_access.search_user&search='+search+"&type="+type, handler_search_user);
+}
Index: /trunk/calendar/templates/classic/js/over_fn_exmail.js
===================================================================
--- /trunk/calendar/templates/classic/js/over_fn_exmail.js	(revision 637)
+++ /trunk/calendar/templates/classic/js/over_fn_exmail.js	(revision 637)
@@ -0,0 +1,163 @@
+/******************************************************************************\
+|**************************   CALENDAR MODULE   *******************************|
+|********** PLUGIN USING AJAX EXPRESSOMAIL COMPONENT - OVERWRITE FUNCTIONS   **|
+\******************************************************************************/
+
+/******************************************************************************\
+|** Function      : emQuickSearch *********************************************|
+|** Original File : <expressoMail_module>/js/common_functions.js **************|
+\******************************************************************************/
+window.onresize = function(){};
+function emQuickSearch(el){
+
+	var emailList = el.value;
+	var field = el.id;
+	var ex_participants = Element("ex_participants");
+	var quickSearchKeyBegin;
+	var quickSearchKeyEnd;
+	
+	var handler_emQuickSearch = function(data){
+		window_DropDownContacts = Element('tipDiv');
+		if (window_DropDownContacts.style.visibility != 'hidden'){
+			window_DropDownContacts.style.visibility = 'hidden';
+		}
+		
+		if ((!data.status) && (data.error == "many results")){
+			alert(get_lang('More than %1 results. Please, try to refine your search.',200));
+			return false;
+		}
+			
+		if (data.length > 0){
+			QuickCatalogSearch.showList(data, quickSearchKeyBegin, quickSearchKeyEnd);
+		}
+		else
+			alert(get_lang('None result was found.'));
+		return true;
+	}
+	ex_participants.focus(); 				//mecessary for IE.
+	var i = getPosition(ex_participants); //inputBox.selectionStart;
+	var j = --i;
+
+    while ((j >= 0) && (emailList.charAt(j) != ',')){j--};
+    quickSearchKeyBegin = ++j;
+
+    while ((i <= emailList.length) && (emailList.charAt(i) != ',')){i++};
+    quickSearchKeyEnd = i;
+
+    var search_for = trim(emailList.substring(quickSearchKeyBegin, quickSearchKeyEnd));
+
+	if (search_for.length < 4){
+		alert(get_lang('Your search argument must be longer than 4 characters.'));
+		return false;
+	}
+	
+	cExecute ("expressoMail1_2.ldap_functions.quicksearch&search_for="+search_for+"&field="+field, handler_emQuickSearch);
+}
+
+/******************************************************************************\
+|** Function      : emQuickCatalogSearch.prototype.transfer_result ************|
+|** Original File : <expressoMail_module>/js/QuickCatalogSearch.js ************|
+\******************************************************************************/
+emQuickCatalogSearch.prototype.transfer_result = function (field, ID, begin, end){
+	cm = document.getElementById('select_QuickCatalogSearch');
+	option_selected = cm.options[cm.selectedIndex].value + ", ";
+	emailList = Element("ex_participants").value;		
+	new_emailList = emailList.substring(0, begin) + option_selected + emailList.substring((parseInt(end) + 2), emailList.length);
+	document.getElementById("ex_participants").value = new_emailList;
+	if(is_ie)
+		Element("i_blank").style.display = "none";
+	document.getElementById("ex_participants").focus();
+	this.arrayWin['window_QuickCatalogSearch'].close();
+}
+
+/******************************************************************************\
+|** Function      : emQuickCatalogSearch.prototype.close_QuickSearch_window ***|
+|** Original File : <expressoMail_module>/js/QuickCatalogSearch.js ************|
+\******************************************************************************/
+emQuickCatalogSearch.prototype.close_QuickSearch_window = function (field, ID){
+	if(is_ie)
+		Element("i_blank").style.display = "none";
+	document.getElementById("ex_participants").focus();
+	this.arrayWin['window_QuickCatalogSearch'].close();
+}
+
+/******************************************************************************\
+|** Function      : emQuickCatalogSearch.prototype.showWindow *****************|
+|** Original File : <expressoMail_module>/js/QuickCatalogSearch.js ************|
+\******************************************************************************/
+emQuickCatalogSearch.prototype.showWindow = function (div)
+{
+	if(! div) {
+		alert(get_lang('The list has no participant.'));
+		return;
+	}
+						
+	if(! this.arrayWin[div.id]) {
+		div.style.width = "700px";
+		div.style.height = "230px";
+		var title = get_lang('The results were found in the Global Catalog')+':';
+		var wHeight = div.offsetHeight + "px";
+		var wWidth =  div.offsetWidth   + "px";
+		div.style.width = div.offsetWidth - 5;
+
+		win = new dJSWin({			
+			id: 'QuickCatalogSearch_'+div.id,
+			content_id: div.id,
+			width: wWidth,
+			height: wHeight,
+			y:'300px',
+			top: '300px',
+			title_color: '#3978d6',
+			bg_color: '#eee',
+			title: title,						
+			title_text_color: 'white',
+			button_x_img: 'phpgwapi/images/winclose.gif',
+			border: true });
+		
+		this.arrayWin[div.id] = win;
+		win.draw();
+	}
+	else {
+		win = this.arrayWin[div.id];
+	}
+
+	if(is_ie) {	
+		var _IFrame = Element("i_blank");
+		if(_IFrame){
+    		_IFrame.style.display  = '' ;		
+		}
+		else {
+			_IFrame = document.body.appendChild(document.createElement('iframe'));
+			_IFrame.src = 'about:blank' ;
+		    _IFrame.frameBorder		= '0';
+		    _IFrame.scrolling		= 'no' ;
+		    _IFrame.style.left		= findPosX(div)  + document.body.scrollLeft -5;
+			_IFrame.style.top		= findPosY(div)  + document.body.scrollTop  -20;
+		    _IFrame.width			= 610;
+   		    _IFrame.style.border	= 0;
+			_IFrame.height			= 285;
+			_IFrame.border			= 0;
+			_IFrame.id				= "i_blank";
+		    _IFrame.style.position	= 'absolute';
+	   	    _IFrame.style.zIndex	= '5';
+    		_IFrame.style.display  = '' ;
+		}
+	}
+
+	win.open();
+	document.getElementById('select_QuickCatalogSearch').focus();
+}	
+
+
+/******************************************************************************\
+|** Function      :  DRAG *****************************************************|
+|** Original File : phpgwapi/js/wz_dragdrop/wz_dragdrop.js ********************|
+\******************************************************************************/
+var over_fn_DRAG = DRAG;
+DRAG = function (event){
+
+		if(is_ie)
+			return false;
+		else
+			over_fn_DRAG(event);
+}		
Index: /trunk/calendar/templates/default/listUsers.php
===================================================================
--- /trunk/calendar/templates/default/listUsers.php	(revision 1154)
+++ /trunk/calendar/templates/default/listUsers.php	(revision 1154)
@@ -0,0 +1,1 @@
+link ../celepar/listUsers.php
Index: /trunk/calendar/templates/default/listUsers.tpl
===================================================================
--- /trunk/calendar/templates/default/listUsers.tpl	(revision 1154)
+++ /trunk/calendar/templates/default/listUsers.tpl	(revision 1154)
@@ -0,0 +1,1 @@
+link ../celepar/listUsers.tpl
Index: /trunk/calendar/templates/default/confirm.tpl
===================================================================
--- /trunk/calendar/templates/default/confirm.tpl	(revision 1154)
+++ /trunk/calendar/templates/default/confirm.tpl	(revision 1154)
@@ -0,0 +1,1 @@
+link ../celepar/confirm.tpl
Index: /trunk/calendar/templates/default/footer.tpl
===================================================================
--- /trunk/calendar/templates/default/footer.tpl	(revision 855)
+++ /trunk/calendar/templates/default/footer.tpl	(revision 1154)
@@ -17,6 +17,6 @@
 	     {row}
 	    </select>
-			<input type="hidden" name="user" value="{user}">
-			<input type="hidden" name="dia_ini" value="{dia_ini}">
+	    <input type="hidden" name="user" value="{user}">
+	    <input type="hidden" name="dia_ini" value="{dia_ini}">
             <noscript><input type="submit" value="{go}"></noscript>
 	   </form>
@@ -32,32 +32,33 @@
          </td>
 <!-- END blank_row -->
+
 <!-- BEGIN num_dias -->
-	<td valign="top" width="30%">
-		<font size="-1">
-			<form action="{acao}" method="post" name="{formname}">
-			<span style="display: {display}" >
-				<label>
-					<b>{num_dias_label}:</b>
-				</label>
-				<select name="{num_dias_name}" onchange="{formonchange}"/>
-					{row_qtd}
-				</select>
-				<br />
-				<span style="font-size: 9px;">
-					{tip}
-				</span>
-				<br />
-				<br />
-			</span>
-			<span style="display: {display}">
-				<b>{day_ini_label}:</b>
-				<select name="{day_ini_name}" onchange="{formonchange}">
-					{row_ini}
-				</select>
-			</span>
-			<input type="hidden" name="user" value="{user}">
-				<noscript><input type="submit" value="{go}"></noscript>
-
-			</form></font>
-	</td>
+<td valign="top" width="30%">
+ <font size="-1">
+    <form action="{acao}" method="post" name="{formname}">
+    <span style="display: {display}" >
+ 
+	<label>
+		<b>{num_dias_label}:</b>
+	</label>
+	<select name="{num_dias_name}" onchange="{formonchange}"/>
+		{row_qtd}
+	</select>
+	<br />
+	<span style="font-size: 9px;">
+		{tip}
+	</span>
+	<br /> <br />
+    </span>
+<span style="display: {display}">
+	<b>{day_ini_label}:</b>
+	<select name="{day_ini_name}" onchange="{formonchange}">
+	{row_ini}
+	</select>
+	</span>
+<input type="hidden" name="user" value="{user}">
+	<noscript><input type="submit" value="{go}"></noscript>
+     </form>
+ </font>
+</td>
 <!-- END num_dias -->
Index: /trunk/calendar/templates/default/navbar.png
===================================================================
--- /trunk/calendar/templates/default/navbar.png	(revision 1154)
+++ /trunk/calendar/templates/default/navbar.png	(revision 1154)
@@ -0,0 +1,1 @@
+link ../celepar/navbar.png
Index: /trunk/calendar/templates/default/publicView.php
===================================================================
--- /trunk/calendar/templates/default/publicView.php	(revision 1154)
+++ /trunk/calendar/templates/default/publicView.php	(revision 1154)
@@ -0,0 +1,1 @@
+link ../celepar/publicView.php
Index: /trunk/calendar/templates/default/grant_group_access.tpl
===================================================================
--- /trunk/calendar/templates/default/grant_group_access.tpl	(revision 1154)
+++ /trunk/calendar/templates/default/grant_group_access.tpl	(revision 1154)
@@ -0,0 +1,1 @@
+link ../celepar/grant_group_access.tpl
Index: /trunk/calendar/templates/default/publicView.tpl
===================================================================
--- /trunk/calendar/templates/default/publicView.tpl	(revision 1154)
+++ /trunk/calendar/templates/default/publicView.tpl	(revision 1154)
@@ -0,0 +1,1 @@
+link ../celepar/publicView.tpl
Index: /trunk/calendar/templates/default/js/edit_exmail.js
===================================================================
--- /trunk/calendar/templates/default/js/edit_exmail.js	(revision 1154)
+++ /trunk/calendar/templates/default/js/edit_exmail.js	(revision 1154)
@@ -0,0 +1,1 @@
+link ../../celepar/js/edit_exmail.js
Index: /trunk/calendar/templates/default/js/edit.js
===================================================================
--- /trunk/calendar/templates/default/js/edit.js	(revision 1154)
+++ /trunk/calendar/templates/default/js/edit.js	(revision 1154)
@@ -0,0 +1,1 @@
+link ../../celepar/js/edit.js
Index: /trunk/calendar/templates/default/js/search.js
===================================================================
--- /trunk/calendar/templates/default/js/search.js	(revision 1154)
+++ /trunk/calendar/templates/default/js/search.js	(revision 1154)
@@ -0,0 +1,1 @@
+link ../../celepar/js/search.js
Index: /trunk/calendar/templates/default/js/over_fn_exmail.js
===================================================================
--- /trunk/calendar/templates/default/js/over_fn_exmail.js	(revision 1154)
+++ /trunk/calendar/templates/default/js/over_fn_exmail.js	(revision 1154)
@@ -0,0 +1,1 @@
+link ../../celepar/js/over_fn_exmail.js
Index: /trunk/calendar/templates/default/edit.tpl
===================================================================
--- /trunk/calendar/templates/default/edit.tpl	(revision 855)
+++ /trunk/calendar/templates/default/edit.tpl	(revision 1154)
@@ -21,5 +21,5 @@
 <form action="{action_url}" method="post" name="app_form">
 {common_hidden}
-<table id="editFormTable" border="0" width="90%">
+<table id="editFormTable" border="0" width="90%"   class="prefTable">
  <tr>
   <td colspan="2">
Index: /trunk/calendar/templates/default/config.tpl
===================================================================
--- /trunk/calendar/templates/default/config.tpl	(revision 855)
+++ /trunk/calendar/templates/default/config.tpl	(revision 1154)
@@ -1,4 +1,16 @@
 <!-- BEGIN header -->
-<form method="POST" action="{action_url}">
+<script type="text/javascript">
+
+function disableMinNum(valor){
+  if( valor == "True" ){
+	document.getElementById("minNum").disabled = true;
+	document.getElementById("minNum").value = 0;
+  }
+  else if (valor == "False"){
+	document.getElementById("minNum").disabled = false;
+  }
+}
+</script>
+<form name="adminForm" method="POST" action="{action_url}" onSubmit="return minValue()">
 <table border="0" align="center">
    <tr bgcolor="{th_bg}">
@@ -51,5 +63,6 @@
     <td>{lang_Select_type_tree_view}</td>
     <td>
-     <select name="newsettings[cal_type_tree_participants]">      
+     <select name="newsettings[cal_type_tree_participants]">
+      <option value="3" {selected_cal_type_tree_participants_3}>{lang_all_levels}</option>
       <option value="2" {selected_cal_type_tree_participants_2}>{lang_first_level_with_recursive_search}</option>
       <option value="1" {selected_cal_type_tree_participants_1}>{lang_all_levels_with_not_recursive_search}</option>      
@@ -57,4 +70,23 @@
     </td>
    </tr>
+   
+   <tr bgcolor="{row_on}">
+     <td>{lang_Do_you_wish_enable_autosearch?}</td>
+     <td>
+       <select id="autoSearch" name="newsettings[auto_search]" onchange="disableMinNum(this.value)">
+        <option value="False"{selected_auto_search_False}>{lang_No}</option>
+        <option value="True"{selected_auto_search_True}>{lang_Yes}</option>
+       </select>
+     </td>
+   </tr>
+   
+   <tr bgcolor="{row_off}">
+       <td>{lang_Minimum_number_of_characters_to_start_the_search_for_participants}</td>
+       <td>
+          <input type="text" id="minNum" value="{value_min_num_characters}" name="newsettings[min_num_characters]    " size=2 maxlength=2 />
+       </td>
+   </tr>
+
+   <script> disableMinNum(document.getElementById("autoSearch").value); </script>
 <!-- END body -->
 
@@ -69,5 +101,5 @@
       <input type="submit" name="submit" value="{lang_submit}">
       <input type="submit" name="cancel" value="{lang_cancel}">
-    </td>
+     </td>
   </tr>
 </table>
