Merged pi-engdev branch with pi.New payables and receivables flow.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Wed, 31 Mar 2010 18:09:01 +0200
changeset 6883 ac47c1cf8454
parent 6882 e740caf5b844 (current diff)
parent 6819 9b38a35f182b (diff)
child 6884 fc18da8fb8f7
child 6912 38c773f35773
Merged pi-engdev branch with pi.New payables and receivables flow.
src-db/database/model/triggers/C_ORDERLINE_TRG3.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_REF_LIST.xml
src-db/database/sourcedata/AD_TAB.xml
src-db/database/sourcedata/AD_TABLE.xml
src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
src/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.fo
src/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.xml
web/js/dojotoolkit/dijit/themes/lucid/form/images/bottom_shadow.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/bottom_shadow2.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_arrow.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_arrow_hover.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_back_full.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_back_full_arrow.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_bottom_grad.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_bottom_grad_h.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_bottom_grad_s.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_bottom_grad_s_small.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_focus_line.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad_h.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad_h_small.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad_s.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad_s_small.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad_small.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/calendar_forward_arrow.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/checkbox_states.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/drop_top_grad.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/error_checked.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/icon_drop_down_h.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/input_alert.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/new_back.png
web/js/dojotoolkit/dijit/themes/lucid/form/images/radio_button_states.png
web/js/dojotoolkit/dijit/themes/lucid/images/calendar_back.gif
web/js/dojotoolkit/dijit/themes/lucid/images/calendar_back.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/accordion_back.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/accordion_down.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/editor.gif
web/js/dojotoolkit/dijit/themes/lucid/layout/images/focus.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/splitterH.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/splitterV.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabClose.gif
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabCloseHover.gif
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabCloseHover.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabStripMenuButton.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabStripSlideButtonLeft.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabStripSlideButtonRight.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_back_lucid_left.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_back_lucid_right.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_bottom.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_bottom_back.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_bottom_focus.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_bottom_top.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_close_icon.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_close_icon_hover.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_close_icon_selected.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_container_border.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_shadow.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_back.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_back_bottom.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_bottom_grad.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_bottom_grad_h.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_bottom_grad_s.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_grad.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_grad_focus.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_grad_h.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_grad_s.png
web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_whitegrad_left.png
--- a/build.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/build.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -98,6 +98,7 @@
   <property name="calculate.core.revision" value="true"/>
   <property name="stopOnWadError" value="false"/>
   <property name="friendlyWarnings" value="false"/>
+  <property name="checkTranslationConsistency" value="true"/>
 
   <available file=".hg" property="is.hg" />
 
--- a/config/Openbravo.properties.template	Wed Mar 31 16:29:56 2010 +0200
+++ b/config/Openbravo.properties.template	Wed Mar 31 18:09:01 2010 +0200
@@ -10,7 +10,7 @@
 # * under the License. 
 # * The Original Code is Openbravo ERP. 
 # * The Initial Developer of the Original Code is Openbravo SLU 
-# * All portions are Copyright (C) 2007-2009 Openbravo SLU 
+# * All portions are Copyright (C) 2007-2010 Openbravo SLU 
 # * All Rights Reserved. 
 # * Contributor(s):  ______________________________________.
 # ************************************************************************
@@ -144,3 +144,14 @@
 # defined by this property, note the value should be the complete path 
 # including the file name and extension.
 # hibernate.hbm.file=/tmp/hibernate.hbm.xml
+
+
+###################
+# Log in security #
+###################
+
+# If these properties are set, after log in trail failed the response time 
+# will be delayed, and the user can be blocked.
+login.trial.delay.increment=0
+login.trial.delay.max=0
+login.trial.user.lock=0
--- a/referencedata/sampledata/Accounting_Test.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/referencedata/sampledata/Accounting_Test.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -70,6 +70,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000020">
     <id>1000020</id>
@@ -104,6 +105,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADSequence id="1000099">
     <id>1000099</id>
--- a/referencedata/sampledata/SmallBazaar.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/referencedata/sampledata/SmallBazaar.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -130,6 +130,7 @@
     <defaultOrganization id="1000000"/>
     <defaultRole id="1000002"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000001">
     <id>1000001</id>
@@ -164,6 +165,7 @@
     <defaultOrganization id="1000000"/>
     <defaultRole id="1000001"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000002">
     <id>1000002</id>
@@ -198,6 +200,7 @@
     <defaultOrganization id="1000000"/>
     <defaultRole id="1000003"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000003">
     <id>1000003</id>
@@ -232,6 +235,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000004">
     <id>1000004</id>
@@ -266,6 +270,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000005">
     <id>1000005</id>
@@ -300,6 +305,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000006">
     <id>1000006</id>
@@ -334,6 +340,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000007">
     <id>1000007</id>
@@ -368,6 +375,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000008">
     <id>1000008</id>
@@ -402,6 +410,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000009">
     <id>1000009</id>
@@ -436,6 +445,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000010">
     <id>1000010</id>
@@ -470,6 +480,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000011">
     <id>1000011</id>
@@ -504,6 +515,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000013">
     <id>1000013</id>
@@ -538,6 +550,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000015">
     <id>1000015</id>
@@ -572,6 +585,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000017">
     <id>1000017</id>
@@ -606,6 +620,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADUser id="1000018">
     <id>1000018</id>
@@ -640,6 +655,7 @@
     <defaultOrganization xsi:nil="true"/>
     <defaultRole xsi:nil="true"/>
     <defaultWarehouse xsi:nil="true"/>
+    <locked>false</locked>
   </ADUser>
   <ADSequence id="1000000">
     <id>1000000</id>
--- a/src-db/database/build.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/build.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -140,7 +140,7 @@
       <taskdef name="exportdatabase" classname="org.openbravo.ddlutils.task.ExportDatabase">
         <classpath refid="runtime-classpath" />
       </taskdef>
-      <exportdatabase driver="${bbdd.driver}" url="${bbdd.owner.url}" user="${bbdd.user}" password="${bbdd.password}" excludeobjects="com.openbravo.db.OpenbravoExcludeFilter" model="model" moduledir="${base.modules}" verbosity="${bbdd.verbosity}" output="sourcedata" codeRevision="${code.revision}" userId="0" adminMode="true" propertiesFile="${base.config}/Openbravo.properties" force="${force}" validateModel="${validate.model}" testAPI="${isMinorVersion}" datasetList="AD,ADRD" rd="${rd}" />
+      <exportdatabase driver="${bbdd.driver}" url="${bbdd.owner.url}" user="${bbdd.user}" password="${bbdd.password}" excludeobjects="com.openbravo.db.OpenbravoExcludeFilter" model="model" moduledir="${base.modules}" verbosity="${bbdd.verbosity}" output="sourcedata" codeRevision="${code.revision}" userId="0" adminMode="true" propertiesFile="${base.config}/Openbravo.properties" force="${force}" validateModel="${validate.model}" testAPI="${isMinorVersion}" datasetList="AD,ADRD" rd="${rd}" checkTranslationConsistency="${checkTranslationConsistency}"/>
       <antcall target="update.dbupdate.timestamp" />
   </target>
 
Binary file src-db/database/lib/dbsourcemanager.jar has changed
--- a/src-db/database/model/functions/A_ASSET_POST.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/model/functions/A_ASSET_POST.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -19,7 +19,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2001-2009 Openbravo SLU
+* All portions are Copyright (C) 2001-2010 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -181,7 +181,7 @@
           IF(NOT FINISH_PROCESS) THEN
             if v_AMORTIZATIONCALCTYPE='PE' then
               v_PercentageGeneral:=v_AMORTIZATIONPERCENTAGE;
-              v_UseLifeYears:=trunc(100/v_PercentageGeneral) ;
+              v_UseLifeYears:=ceil(100/v_PercentageGeneral) ;
             else
               --  v_PercentageGeneral := 100 / v_USELIFEYEARS;
               v_PercentageGeneral:=((v_AMORTIZATIONVALUEAMT-v_DEPRECIATEDPREVIOUSAMT-v_depreciatedPlan) *100/v_AMORTIZATIONVALUEAMT) /(v_USELIFEYEARS-v_DepreciatedLines) ;
--- a/src-db/database/model/functions/C_SETTLEMENT_POST.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/model/functions/C_SETTLEMENT_POST.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -19,7 +19,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2001-2009 Openbravo SLU
+* All portions are Copyright (C) 2001-2010 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -315,10 +315,12 @@
 	AND c.ISMANUAL = 'Y'
 	AND c.ISPAID = 'N'
 	AND NOT EXISTS (SELECT 1 FROM C_DEBT_PAYMENT D
-		WHERE C.C_SETTLEMENT_CANCEL_ID = D.C_SETTLEMENT_CANCEL_ID
-		AND C.ISRECEIPT = D.ISRECEIPT
-		AND C.AMOUNT = AMOUNT*-1
-		AND d.ISPAID = 'N');
+                        WHERE C.C_SETTLEMENT_CANCEL_ID = D.C_SETTLEMENT_CANCEL_ID
+                          AND ((C.ISRECEIPT = D.ISRECEIPT
+                          AND C_Currency_Round(C_Currency_Convert((C.AMOUNT-C.WRITEOFFAMT), C.C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL) = C_Currency_Round(C_Currency_Convert(((AMOUNT-WRITEOFFAMT)*-1), D.C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL))
+                            OR (C.ISRECEIPT <> D.ISRECEIPT
+                          AND C_Currency_Round(C_Currency_Convert((C.AMOUNT-C.WRITEOFFAMT), C.C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL) = C_Currency_Round(C_Currency_Convert((AMOUNT-WRITEOFFAMT), D.C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)))
+                          AND d.ISPAID = 'N');
 	IF v_Aux>0 THEN
 	   RAISE_APPLICATION_ERROR(-20000, '@ManualDebtpayment@'||' "'||v_column_identifier||'" '||'@CanNotBeSplit@') ;
 	   END IF;
@@ -377,7 +379,7 @@
       v_ResultStr:='CheckingAmounts';
       --Calculating the non-paid amount to cancel
       SELECT COALESCE(SUM(C_Currency_Round(  C_Currency_Convert((Amount-WriteOffAmt), C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0),
-      COALESCE(SUM(C_Currency_Round(  C_Currency_Convert((coalesce(WithHoldingAmount,0)), C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0)
+      COALESCE(SUM(C_Currency_Round(  C_Currency_Convert((coalesce(case when (Amount-WriteOffAmt=0) then 0 else WithHoldingAmount end,0)), C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0)
       INTO v_CanceledNotChargeAmt,v_CanceledNotChargeAmt_WH
       FROM C_Debt_Payment_V
       WHERE C_Settlement_Cancel_ID=v_Record_ID
--- a/src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -286,14 +286,6 @@
           --DBMS_OUTPUT.PUT_LINE('Qty=' || ProductQty);
           v_QtyOnHand:=v_ProductQty;
         END IF;
-        IF(CUR_PL_Post.PRODUCTIONTYPE='-' AND CUR_PL_Post.IsStocked<>'N' AND v_QtyOnHand-CUR_PL_Post.MovementQty<0) THEN
-          SELECT '@NotEnoughStocked@: ' || NAME
-          INTO v_Message
-          FROM M_PRODUCT
-          WHERE M_Product_ID=CUR_PL_Post.M_Product_ID;
-          RAISE_APPLICATION_ERROR(-20000, v_Message);
-          FINISH_PROCESS:=TRUE;
-        END IF;
         -- Create Transaction Entry
         v_ResultStr:='CreateTransaction';
         Ad_Sequence_Next('M_Transaction', v_Org_ID, v_NextNo) ;
@@ -317,11 +309,10 @@
           ;
         IF(CUR_PL_Post.IsStocked<>'N') THEN
           M_Check_Stock(CUR_PL_Post.M_Product_ID, v_Client_ID, v_Org_ID, v_Result, v_Message) ;
-        END IF;
-        IF (v_Result=0) THEN
-          v_Message:=v_Message || ' @Inline@ ' || CUR_PL_Post.line;
-          RAISE_APPLICATION_ERROR(-20000, v_Message);
-          FINISH_PROCESS:=TRUE;
+          IF (v_Result=0) THEN
+            v_Message:=v_Message || ' @Inline@ ' || CUR_PL_Post.line;
+            RAISE_APPLICATION_ERROR(-20000, v_Message);
+          END IF;
         END IF;
       END LOOP;
     END IF; --FINISH_PROCESS
--- a/src-db/database/model/tables/AD_SESSION.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/model/tables/AD_SESSION.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -61,6 +61,14 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="USERNAME" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="LOGIN_STATUS" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="AD_SESSION_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/AD_USER.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/model/tables/AD_USER.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -145,6 +145,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="ISLOCKED" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_ORG" name="AD_USER_AD_ORGTRX">
         <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
@@ -192,5 +196,6 @@
         <unique-column name="USERNAME"/>
       </unique>
       <check name="AD_USER_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="AD_USER_ISLOCKED_CHECK"><![CDATA[ISLOCKED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/C_BP_VENDOR_ACCT.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/model/tables/C_BP_VENDOR_ACCT.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -81,7 +81,6 @@
       <unique name="C_BP_VENDOR_ACCT_ACCTSCHEMA_UN">
         <unique-column name="C_ACCTSCHEMA_ID"/>
         <unique-column name="C_BPARTNER_ID"/>
-        <unique-column name="AD_ORG_ID"/>
         <unique-column name="STATUS"/>
       </unique>
       <check name="C_BP_VENDOR_ACC_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/triggers/AD_PROCESS_REQUEST_TRG.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/model/triggers/AD_PROCESS_REQUEST_TRG.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="TRIGGER AD_PROCESS_REQUEST_TRG">
-    <trigger name="AD_PROCESS_REQUEST_TRG" table="AD_PROCESS_REQUEST" fires="before" insert="false" update="false" delete="true" foreach="row">
+    <trigger name="AD_PROCESS_REQUEST_TRG" table="AD_PROCESS_REQUEST" fires="before" insert="true" update="true" delete="true" foreach="row">
       <body><![CDATA[
 
 /*************************************************************************
@@ -15,7 +15,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2001-2008 Openbravo SLU
+* All portions are Copyright (C) 2001-2010 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -26,10 +26,39 @@
     IF AD_isTriggerEnabled()='N' THEN RETURN;
     END IF;
 
+IF (INSERTING OR UPDATING) THEN
 
-IF (:OLD.STATUS = 'Scheduled') THEN
-  RAISE_APPLICATION_ERROR(-20630,'Unable to delete Process Request whilst still scheduled.');
+  IF (:NEW.TIMING_OPTION = 'S') THEN -- SCHEDULE
+
+    IF(:NEW.FREQUENCY = '1' AND (:NEW.SECONDLY_INTERVAL IS NULL OR :NEW.SECONDLY_INTERVAL < 1)) THEN -- SECONDLY
+      RAISE_APPLICATION_ERROR(-20000,'@InvalidProcessRequest@');
+    END IF;
+
+    IF(:NEW.FREQUENCY = '2' AND (:NEW.MINUTELY_INTERVAL IS NULL OR :NEW.MINUTELY_INTERVAL < 1)) THEN -- MINUTELY
+      RAISE_APPLICATION_ERROR(-20000,'@InvalidProcessRequest@');
+    END IF;
+
+    IF(:NEW.FREQUENCY = '3' AND (:NEW.HOURLY_INTERVAL IS NULL OR :NEW.HOURLY_INTERVAL < 1)) THEN -- HOURLY
+      RAISE_APPLICATION_ERROR(-20000,'@InvalidProcessRequest@');
+    END IF;
+
+    IF (:NEW.FREQUENCY = '4' AND (:NEW.DAILY_INTERVAL IS NULL OR :NEW.DAILY_INTERVAL < 1)) THEN -- DAILY
+      RAISE_APPLICATION_ERROR(-20000,'@InvalidProcessRequest@');
+    END IF;
+
+    IF(:NEW.FINISHES = 'Y' AND (:NEW.FINISHES_DATE IS NULL OR :NEW.FINISHES_TIME IS NULL)) THEN
+      RAISE_APPLICATION_ERROR(-20000,'@InvalidProcessRequest@');
+    END IF;
+
+  END IF;
 END IF;
+
+IF (DELETING) THEN
+  IF (:OLD.STATUS = 'Scheduled') THEN
+    RAISE_APPLICATION_ERROR(-20000,'@20630@');
+  END IF;
+END IF;
+
 END AD_PROCESS_REQUEST_TRG
 ]]></body>
     </trigger>
--- a/src-db/database/model/triggers/C_BPARTNER_TRG.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/model/triggers/C_BPARTNER_TRG.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="TRIGGER C_BPARTNER_TRG">
-    <trigger name="C_BPARTNER_TRG" table="C_BPARTNER" fires="after" insert="true" update="true" delete="true" foreach="row">
+    <trigger name="C_BPARTNER_TRG" table="C_BPARTNER" fires="after" insert="true" update="true" delete="false" foreach="row">
       <body><![CDATA[
   /*************************************************************************
   * The contents of this file are subject to the Compiere Public
@@ -17,7 +17,7 @@
   * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
   * All Rights Reserved.
   * Contributor(s): Openbravo SLU
-  * Contributions are Copyright (C) 2001-2008 Openbravo, S.L.U.
+  * Contributions are Copyright (C) 2001-2010 Openbravo, S.L.U.
   *
   * Specifically, this derivative work is based upon the following Compiere
   * file and version.
@@ -267,8 +267,6 @@
      WHERE C_BPARTNER_ID = :new.C_BPartner_ID;
      UPDATE C_BP_EMPLOYEE_ACCT SET AD_ORG_ID = :new.AD_Org_ID
      WHERE C_BPARTNER_ID = :new.C_BPartner_ID;
-  ELSIF (DELETING) THEN
-     DELETE FROM AD_TreeNodeBP WHERE AD_Client_ID = :old.AD_Client_ID AND Node_ID = :old.C_BPartner_ID;
   END IF;
 EXCEPTION
  WHEN NO_DATA_FOUND THEN
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/triggers/C_BPARTNER_TRG2.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+  <database name="TRIGGER C_BPARTNER_TRG2">
+    <trigger name="C_BPARTNER_TRG2" table="C_BPARTNER" fires="before" insert="false" update="false" delete="true" foreach="row">
+      <body><![CDATA[
+  /*************************************************************************
+  * The contents of this file are subject to the Compiere Public
+  * License 1.1 ("License"); You may not use this file except in
+  * compliance with the License. You may obtain a copy of the License in
+  * the legal folder of your Openbravo installation.
+  * Software distributed under the License is distributed on an
+  * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+  * implied. See the License for the specific language governing rights
+  * and limitations under the License.
+  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
+  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
+  * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
+  * All Rights Reserved.
+  * Contributor(s): Openbravo SLU
+  * Contributions are Copyright (C) 2001-2010 Openbravo, S.L.U.
+  *
+  * Specifically, this derivative work is based upon the following Compiere
+  * file and version.
+  *************************************************************************
+  * $Id: C_BPartner_Trg2.sql,v 1.4 2002/10/23 03:16:57 jjanke Exp $
+  ***
+  * Title: Business Partner delete necord
+  * Description:
+  ************************************************************************/
+    
+BEGIN
+    
+	IF AD_isTriggerEnabled()='N' THEN RETURN;
+	END IF;
+ 
+	DELETE FROM AD_TreeNodeBP WHERE AD_Client_ID = :old.AD_Client_ID AND Node_ID = :old.C_BPartner_ID;
+     
+END C_BPARTNER_TRG2
+]]></body>
+    </trigger>
+  </database>
--- a/src-db/database/model/triggers/C_INVOICELINETAX_TRG.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/model/triggers/C_INVOICELINETAX_TRG.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -59,11 +59,13 @@
     SELECT COUNT(C_TAX_ID) INTO v_Count
     FROM C_INVOICETAX
     WHERE C_INVOICE_ID = :NEW.C_Invoice_ID
-    AND C_TAX_ID = :NEW.C_TAX_ID;
+    AND C_TAX_ID = :NEW.C_TAX_ID
+    AND Recalculate = 'Y';
     IF(v_Count>0) THEN
       UPDATE C_INVOICETAX SET TAXAMT = (CASE WHEN v_DocTaxAmount='D' THEN ROUND((TAXBASEAMT + :NEW.TAXBASEAMT) * v_Rate/100, v_Prec) ELSE (TAXAMT + :NEW.TAXAMT) END), TAXBASEAMT=TAXBASEAMT + :NEW.TAXBASEAMT
       WHERE C_INVOICE_ID = :NEW.C_Invoice_ID
-      AND C_TAX_ID = :NEW.C_TAX_ID;
+      AND C_TAX_ID = :NEW.C_TAX_ID
+      AND Recalculate = 'Y';
     ELSE
       SELECT COALESCE(MAX(LINE),0) + 10
       INTO v_LineNo
@@ -73,17 +75,18 @@
       INTO C_INVOICETAX (
       C_InvoiceTax_ID, C_Invoice_ID, C_Tax_ID, AD_Client_ID, AD_Org_ID,
       IsActive, Created, CreatedBy, Updated,
-      UpdatedBy, TaxBaseAmt, TaxAmt, Line)
+      UpdatedBy, TaxBaseAmt, TaxAmt, Line, Recalculate)
       VALUES (
       GET_UUID(), :NEW.C_Invoice_ID, :NEW.C_TAX_ID, :NEW.AD_CLIENT_ID, :NEW.AD_ORG_ID,
       'Y', now(), :NEW.UPDATEDBY, now(),
-      :NEW.UPDATEDBY, :NEW.TAXBASEAMT, :NEW.TAXAMT, v_LineNo);
+      :NEW.UPDATEDBY, :NEW.TAXBASEAMT, :NEW.TAXAMT, v_LineNo, 'Y');
     END IF;
   ELSE
     
     UPDATE C_INVOICETAX SET TAXAMT = (CASE WHEN v_DocTaxAmount='D' THEN ROUND((TAXBASEAMT - :OLD.TAXBASEAMT) * v_Rate/100, v_Prec) ELSE (TAXAMT - :OLD.TAXAMT) END), TAXBASEAMT=TAXBASEAMT - :OLD.TAXBASEAMT
     WHERE C_INVOICE_ID = :OLD.C_Invoice_ID
-    AND C_TAX_ID = :OLD.C_TAX_ID;
+    AND C_TAX_ID = :OLD.C_TAX_ID
+    AND Recalculate = 'Y';
     
     DELETE FROM C_INVOICETAX 
     WHERE C_INVOICE_ID = :OLD.C_Invoice_ID
--- a/src-db/database/model/triggers/C_ORDERLINE_TRG.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/model/triggers/C_ORDERLINE_TRG.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -122,6 +122,9 @@
   :new.LineNetAmt := ROUND(:new.QtyOrdered*:new.PriceActual, v_Prec);-- Modified by I.Ciordia
   :new.FreightAmt := ROUND(:new.FreightAmt, v_Prec);
   :new.ChargeAmt := ROUND(:new.ChargeAmt, v_Prec);
+  IF (round(to_number(:NEW.QTYORDERED) * to_number(:NEW.PRICEACTUAL),v_Prec) != to_number(:NEW.LINENETAMT)) THEN
+      RAISE_APPLICATION_ERROR(-20000, '@LineAmountNotCorrect@') ;
+    END IF;
  END IF;
 
 
--- a/src-db/database/model/triggers/C_ORDERLINE_TRG3.xml	Wed Mar 31 16:29:56 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-  <database name="TRIGGER C_ORDERLINE_TRG3">
-    <trigger name="C_ORDERLINE_TRG3" table="C_ORDERLINE" fires="before" insert="true" update="true" delete="false" foreach="row">
-      <body><![CDATA[
-
-/*************************************************************************
-* The contents of this file are subject to the Openbravo  Public  License
-* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
-* Version 1.1  with a permitted attribution clause; you may not  use this
-* file except in compliance with the License. You  may  obtain  a copy of
-* the License at http://www.openbravo.com/legal/license.html
-* Software distributed under the License  is  distributed  on  an "AS IS"
-* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-* License for the specific  language  governing  rights  and  limitations
-* under the License.
-* The Original Code is Openbravo ERP.
-* The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2010 Openbravo SLU
-* All Rights Reserved.
-* Contributor(s):  ______________________________________.
-************************************************************************/
-  V_PRECISION NUMBER;
-BEGIN
-  IF AD_isTriggerEnabled()='N' THEN RETURN;
-  END IF;
-
-  IF(INSERTING OR UPDATING) THEN
-    SELECT C.STDPRECISION INTO V_PRECISION FROM C_CURRENCY C
-    WHERE C.C_CURRENCY_ID=:NEW.C_CURRENCY_ID;
-  
-    IF (round(to_number(:NEW.QTYORDERED) * to_number(:NEW.PRICEACTUAL),V_PRECISION) != to_number(:NEW.LINENETAMT)) THEN
-      RAISE_APPLICATION_ERROR(-20000, '@LineAmountNotCorrect@') ;
-    END IF;
-  END IF;
-  END C_ORDERLINE_TRG3
-]]></body>
-    </trigger>
-  </database>
--- a/src-db/database/model/triggers/M_PRODUCT_TRG.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/model/triggers/M_PRODUCT_TRG.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="TRIGGER M_PRODUCT_TRG">
-    <trigger name="M_PRODUCT_TRG" table="M_PRODUCT" fires="after" insert="true" update="true" delete="true" foreach="row">
+    <trigger name="M_PRODUCT_TRG" table="M_PRODUCT" fires="after" insert="true" update="true" delete="false" foreach="row">
       <body><![CDATA[
 /*************************************************************************
   * The contents of this file are subject to the Compiere Public
@@ -190,9 +190,6 @@
          :new.IsActive, :new.Created, :new.CreatedBy, :new.Updated, :new.UpdatedBy,
          v_xTree_ID, :new.M_Product_ID,
          v_xParent_ID, (CASE :new.IsSummary WHEN 'Y' THEN 100 ELSE 999 END));    -- Summary Nodes first
-         
- ELSIF (DELETING) THEN
-    DELETE FROM AD_TreeNodePR WHERE AD_Client_ID = :old.AD_Client_ID AND Node_ID = :old.M_Product_ID;
  END IF;
  IF (INSERTING OR UPDATING) THEN
     -- Checks on the attribute set value
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/triggers/M_PRODUCT_TRG2.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+  <database name="TRIGGER M_PRODUCT_TRG2">
+    <trigger name="M_PRODUCT_TRG2" table="M_PRODUCT" fires="before" insert="false" update="false" delete="true" foreach="row">
+      <body><![CDATA[
+/*************************************************************************
+  * The contents of this file are subject to the Compiere Public
+  * License 1.1 ("License"); You may not use this file except in
+  * compliance with the License. You may obtain a copy of the License in
+  * the legal folder of your Openbravo installation.
+  * Software distributed under the License is distributed on an
+  * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+  * implied. See the License for the specific language governing rights
+  * and limitations under the License.
+  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
+  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
+  * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
+  * All Rights Reserved.
+  * Contributor(s): Openbravo SLU
+  * Contributions are Copyright (C) 2001-2010 Openbravo, S.L.U.
+  *
+  * Specifically, this derivative work is based upon the following Compiere
+  * file and version.
+  *************************************************************************/
+ 			
+BEGIN
+    IF AD_isTriggerEnabled()='N' THEN RETURN;
+    END IF;
+
+    DELETE FROM AD_TreeNodePR WHERE AD_Client_ID = :old.AD_Client_ID AND Node_ID = :old.M_Product_ID;
+
+END M_PRODUCT_TRG2
+]]></body>
+    </trigger>
+  </database>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -58812,7 +58812,7 @@
 <!--3792-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--3792-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--3792-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--3792-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--3792-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--3792-->  <READONLYLOGIC><![CDATA[@Processed@='Y']]></READONLYLOGIC>
 <!--3792-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--3792-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -60318,6 +60318,7 @@
 <!--3848-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--3848-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--3848-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--3848-->  <AD_CALLOUT_ID><![CDATA[127]]></AD_CALLOUT_ID>
 <!--3848-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--3848-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--3848-->  <POSITION><![CDATA[23]]></POSITION>
@@ -79442,7 +79443,7 @@
 <!--5090-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--5090-->  <ISPARENT><![CDATA[Y]]></ISPARENT>
 <!--5090-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--5090-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--5090-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--5090-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--5090-->  <SEQNO><![CDATA[2]]></SEQNO>
 <!--5090-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -99054,10 +99055,10 @@
 <!--6523-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--6523-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
 <!--6523-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
-<!--6523-->  <SEQNO><![CDATA[0]]></SEQNO>
+<!--6523-->  <SEQNO><![CDATA[2]]></SEQNO>
 <!--6523-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
 <!--6523-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--6523-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--6523-->  <ISSELECTIONCOLUMN><![CDATA[Y]]></ISSELECTIONCOLUMN>
 <!--6523-->  <AD_ELEMENT_ID><![CDATA[454]]></AD_ELEMENT_ID>
 <!--6523-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--6523-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
@@ -99085,10 +99086,10 @@
 <!--6524-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--6524-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
 <!--6524-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
-<!--6524-->  <SEQNO><![CDATA[0]]></SEQNO>
+<!--6524-->  <SEQNO><![CDATA[3]]></SEQNO>
 <!--6524-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
 <!--6524-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--6524-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--6524-->  <ISSELECTIONCOLUMN><![CDATA[Y]]></ISSELECTIONCOLUMN>
 <!--6524-->  <AD_ELEMENT_ID><![CDATA[1297]]></AD_ELEMENT_ID>
 <!--6524-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--6524-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
@@ -254132,6 +254133,7 @@
 <!--573D452F04D9243FE040007F01012792-->  <AD_TABLE_ID><![CDATA[82D4EDCF39AE44FB9B24E95A1B18B21C]]></AD_TABLE_ID>
 <!--573D452F04D9243FE040007F01012792-->  <AD_REFERENCE_ID><![CDATA[24]]></AD_REFERENCE_ID>
 <!--573D452F04D9243FE040007F01012792-->  <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH>
+<!--573D452F04D9243FE040007F01012792-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT to_char(now(),'HH24:MI:SS') AS def FROM dual]]></DEFAULTVALUE>
 <!--573D452F04D9243FE040007F01012792-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--573D452F04D9243FE040007F01012792-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--573D452F04D9243FE040007F01012792-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
@@ -254163,6 +254165,7 @@
 <!--573D452F04DA243FE040007F01012792-->  <AD_TABLE_ID><![CDATA[82D4EDCF39AE44FB9B24E95A1B18B21C]]></AD_TABLE_ID>
 <!--573D452F04DA243FE040007F01012792-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
 <!--573D452F04DA243FE040007F01012792-->  <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH>
+<!--573D452F04DA243FE040007F01012792-->  <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE>
 <!--573D452F04DA243FE040007F01012792-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--573D452F04DA243FE040007F01012792-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--573D452F04DA243FE040007F01012792-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
@@ -254320,6 +254323,7 @@
 <!--573D452F04DF243FE040007F01012792-->  <AD_TABLE_ID><![CDATA[82D4EDCF39AE44FB9B24E95A1B18B21C]]></AD_TABLE_ID>
 <!--573D452F04DF243FE040007F01012792-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
 <!--573D452F04DF243FE040007F01012792-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--573D452F04DF243FE040007F01012792-->  <DEFAULTVALUE><![CDATA[1]]></DEFAULTVALUE>
 <!--573D452F04DF243FE040007F01012792-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--573D452F04DF243FE040007F01012792-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--573D452F04DF243FE040007F01012792-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
@@ -276172,6 +276176,69 @@
 <!--8032E178607750D5E040007F01004282-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--8032E178607750D5E040007F01004282--></AD_COLUMN>
 
+<!--8042A0FD1B992CC9E040007F01012535--><AD_COLUMN>
+<!--8042A0FD1B992CC9E040007F01012535-->  <AD_COLUMN_ID><![CDATA[8042A0FD1B992CC9E040007F01012535]]></AD_COLUMN_ID>
+<!--8042A0FD1B992CC9E040007F01012535-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8042A0FD1B992CC9E040007F01012535-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8042A0FD1B992CC9E040007F01012535-->  <NAME><![CDATA[Username]]></NAME>
+<!--8042A0FD1B992CC9E040007F01012535-->  <DESCRIPTION><![CDATA[User Name]]></DESCRIPTION>
+<!--8042A0FD1B992CC9E040007F01012535-->  <HELP><![CDATA[Name that identifies the user in the System]]></HELP>
+<!--8042A0FD1B992CC9E040007F01012535-->  <COLUMNNAME><![CDATA[Username]]></COLUMNNAME>
+<!--8042A0FD1B992CC9E040007F01012535-->  <AD_TABLE_ID><![CDATA[566]]></AD_TABLE_ID>
+<!--8042A0FD1B992CC9E040007F01012535-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--8042A0FD1B992CC9E040007F01012535-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--8042A0FD1B992CC9E040007F01012535-->  <SEQNO><![CDATA[41]]></SEQNO>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--8042A0FD1B992CC9E040007F01012535-->  <AD_ELEMENT_ID><![CDATA[1903]]></AD_ELEMENT_ID>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--8042A0FD1B992CC9E040007F01012535-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--8042A0FD1B992CC9E040007F01012535-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8042A0FD1B992CC9E040007F01012535-->  <POSITION><![CDATA[16]]></POSITION>
+<!--8042A0FD1B992CC9E040007F01012535-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--8042A0FD1B992CC9E040007F01012535--></AD_COLUMN>
+
+<!--8042A0FD1B9A2CC9E040007F01012535--><AD_COLUMN>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <AD_COLUMN_ID><![CDATA[8042A0FD1B9A2CC9E040007F01012535]]></AD_COLUMN_ID>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <NAME><![CDATA[Login Status]]></NAME>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <DESCRIPTION><![CDATA[Login Status]]></DESCRIPTION>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <HELP><![CDATA[Maintains the status for the log in. It determines whether there was any error in the log in.]]></HELP>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <COLUMNNAME><![CDATA[Login_Status]]></COLUMNNAME>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <AD_TABLE_ID><![CDATA[566]]></AD_TABLE_ID>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <AD_REFERENCE_VALUE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_VALUE_ID>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <SEQNO><![CDATA[51]]></SEQNO>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <AD_ELEMENT_ID><![CDATA[8042A0FD1B9B2CC9E040007F01012535]]></AD_ELEMENT_ID>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <POSITION><![CDATA[17]]></POSITION>
+<!--8042A0FD1B9A2CC9E040007F01012535-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--8042A0FD1B9A2CC9E040007F01012535--></AD_COLUMN>
+
 <!--804880D7B0EA1126E040007F01004F9E--><AD_COLUMN>
 <!--804880D7B0EA1126E040007F01004F9E-->  <AD_COLUMN_ID><![CDATA[804880D7B0EA1126E040007F01004F9E]]></AD_COLUMN_ID>
 <!--804880D7B0EA1126E040007F01004F9E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -276711,6 +276778,38 @@
 <!--8055D7355E4EEA87E040007F01001969-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--8055D7355E4EEA87E040007F01001969--></AD_COLUMN>
 
+<!--805819299877F9F3E040007F0101799C--><AD_COLUMN>
+<!--805819299877F9F3E040007F0101799C-->  <AD_COLUMN_ID><![CDATA[805819299877F9F3E040007F0101799C]]></AD_COLUMN_ID>
+<!--805819299877F9F3E040007F0101799C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--805819299877F9F3E040007F0101799C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--805819299877F9F3E040007F0101799C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--805819299877F9F3E040007F0101799C-->  <NAME><![CDATA[Locked]]></NAME>
+<!--805819299877F9F3E040007F0101799C-->  <DESCRIPTION><![CDATA[The user is locked and cannot log in the application]]></DESCRIPTION>
+<!--805819299877F9F3E040007F0101799C-->  <HELP><![CDATA[The user is locked and cannot log in the application. This field can be manually set or automatically if login.trial.user.lock property is configured in Openbravo.properties file and there has been that number of failed log in attempts.]]></HELP>
+<!--805819299877F9F3E040007F0101799C-->  <COLUMNNAME><![CDATA[IsLocked]]></COLUMNNAME>
+<!--805819299877F9F3E040007F0101799C-->  <AD_TABLE_ID><![CDATA[114]]></AD_TABLE_ID>
+<!--805819299877F9F3E040007F0101799C-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--805819299877F9F3E040007F0101799C-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--805819299877F9F3E040007F0101799C-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--805819299877F9F3E040007F0101799C-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--805819299877F9F3E040007F0101799C-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--805819299877F9F3E040007F0101799C-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--805819299877F9F3E040007F0101799C-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--805819299877F9F3E040007F0101799C-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--805819299877F9F3E040007F0101799C-->  <SEQNO><![CDATA[91]]></SEQNO>
+<!--805819299877F9F3E040007F0101799C-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--805819299877F9F3E040007F0101799C-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--805819299877F9F3E040007F0101799C-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--805819299877F9F3E040007F0101799C-->  <AD_ELEMENT_ID><![CDATA[80582217C7460114E040007F0101799A]]></AD_ELEMENT_ID>
+<!--805819299877F9F3E040007F0101799C-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--805819299877F9F3E040007F0101799C-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--805819299877F9F3E040007F0101799C-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--805819299877F9F3E040007F0101799C-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--805819299877F9F3E040007F0101799C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--805819299877F9F3E040007F0101799C-->  <POSITION><![CDATA[37]]></POSITION>
+<!--805819299877F9F3E040007F0101799C-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--805819299877F9F3E040007F0101799C--></AD_COLUMN>
+
 <!--806D2B35941824D9E040007F01010159--><AD_COLUMN>
 <!--806D2B35941824D9E040007F01010159-->  <AD_COLUMN_ID><![CDATA[806D2B35941824D9E040007F01010159]]></AD_COLUMN_ID>
 <!--806D2B35941824D9E040007F01010159-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -25339,8 +25339,8 @@
 <!--79957912A877C7D8E040007F010156EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--79957912A877C7D8E040007F010156EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--79957912A877C7D8E040007F010156EE-->  <COLUMNNAME><![CDATA[Model_Impl]]></COLUMNNAME>
-<!--79957912A877C7D8E040007F010156EE-->  <NAME><![CDATA[Model Implememtation]]></NAME>
-<!--79957912A877C7D8E040007F010156EE-->  <PRINTNAME><![CDATA[Model Implememtation]]></PRINTNAME>
+<!--79957912A877C7D8E040007F010156EE-->  <NAME><![CDATA[Model Implementation]]></NAME>
+<!--79957912A877C7D8E040007F010156EE-->  <PRINTNAME><![CDATA[Model Implementation]]></PRINTNAME>
 <!--79957912A877C7D8E040007F010156EE-->  <DESCRIPTION><![CDATA[Java class implementing Model.]]></DESCRIPTION>
 <!--79957912A877C7D8E040007F010156EE-->  <HELP><![CDATA[Java class implementing Model. It is the java class used to generate DAL classes.]]></HELP>
 <!--79957912A877C7D8E040007F010156EE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
@@ -25744,6 +25744,19 @@
 <!--80302FCC505A11DEAC4E001CC0B8EF99-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--80302FCC505A11DEAC4E001CC0B8EF99--></AD_ELEMENT>
 
+<!--8042A0FD1B9B2CC9E040007F01012535--><AD_ELEMENT>
+<!--8042A0FD1B9B2CC9E040007F01012535-->  <AD_ELEMENT_ID><![CDATA[8042A0FD1B9B2CC9E040007F01012535]]></AD_ELEMENT_ID>
+<!--8042A0FD1B9B2CC9E040007F01012535-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8042A0FD1B9B2CC9E040007F01012535-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8042A0FD1B9B2CC9E040007F01012535-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8042A0FD1B9B2CC9E040007F01012535-->  <COLUMNNAME><![CDATA[Login_Status]]></COLUMNNAME>
+<!--8042A0FD1B9B2CC9E040007F01012535-->  <NAME><![CDATA[Login Status]]></NAME>
+<!--8042A0FD1B9B2CC9E040007F01012535-->  <PRINTNAME><![CDATA[Login Status]]></PRINTNAME>
+<!--8042A0FD1B9B2CC9E040007F01012535-->  <DESCRIPTION><![CDATA[Login Status]]></DESCRIPTION>
+<!--8042A0FD1B9B2CC9E040007F01012535-->  <HELP><![CDATA[Maintains the status for the log in. It determines whether there was any error in the log in.]]></HELP>
+<!--8042A0FD1B9B2CC9E040007F01012535-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8042A0FD1B9B2CC9E040007F01012535--></AD_ELEMENT>
+
 <!--8055D7355E4FEA87E040007F01001969--><AD_ELEMENT>
 <!--8055D7355E4FEA87E040007F01001969-->  <AD_ELEMENT_ID><![CDATA[8055D7355E4FEA87E040007F01001969]]></AD_ELEMENT_ID>
 <!--8055D7355E4FEA87E040007F01001969-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -25757,6 +25770,19 @@
 <!--8055D7355E4FEA87E040007F01001969-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--8055D7355E4FEA87E040007F01001969--></AD_ELEMENT>
 
+<!--80582217C7460114E040007F0101799A--><AD_ELEMENT>
+<!--80582217C7460114E040007F0101799A-->  <AD_ELEMENT_ID><![CDATA[80582217C7460114E040007F0101799A]]></AD_ELEMENT_ID>
+<!--80582217C7460114E040007F0101799A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--80582217C7460114E040007F0101799A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--80582217C7460114E040007F0101799A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--80582217C7460114E040007F0101799A-->  <COLUMNNAME><![CDATA[IsLocked]]></COLUMNNAME>
+<!--80582217C7460114E040007F0101799A-->  <NAME><![CDATA[Locked]]></NAME>
+<!--80582217C7460114E040007F0101799A-->  <PRINTNAME><![CDATA[Locked]]></PRINTNAME>
+<!--80582217C7460114E040007F0101799A-->  <DESCRIPTION><![CDATA[The user is locked and cannot log in the application]]></DESCRIPTION>
+<!--80582217C7460114E040007F0101799A-->  <HELP><![CDATA[The user is locked and cannot log in the application. This field can be manually set or automatically if login.trial.user.lock property is configured in Openbravo.properties file and there has been that number of failed log in attempts.]]></HELP>
+<!--80582217C7460114E040007F0101799A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--80582217C7460114E040007F0101799A--></AD_ELEMENT>
+
 <!--806D37F8190C78CBE040007F0101020F--><AD_ELEMENT>
 <!--806D37F8190C78CBE040007F0101020F-->  <AD_ELEMENT_ID><![CDATA[806D37F8190C78CBE040007F0101020F]]></AD_ELEMENT_ID>
 <!--806D37F8190C78CBE040007F0101020F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -52138,7 +52138,7 @@
 <!--4261-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4261-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--4261-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--4261-->  <SEQNO><![CDATA[210]]></SEQNO>
+<!--4261-->  <SEQNO><![CDATA[220]]></SEQNO>
 <!--4261-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--4261-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--4261-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -55689,7 +55689,7 @@
 <!--4550-->  <AD_COLUMN_ID><![CDATA[5685]]></AD_COLUMN_ID>
 <!--4550-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4550-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
-<!--4550-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4550-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4550-->  <SEQNO><![CDATA[20]]></SEQNO>
 <!--4550-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--4550-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -55712,7 +55712,7 @@
 <!--4551-->  <AD_COLUMN_ID><![CDATA[5686]]></AD_COLUMN_ID>
 <!--4551-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4551-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
-<!--4551-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4551-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4551-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--4551-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--4551-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -55737,7 +55737,7 @@
 <!--4552-->  <AD_COLUMN_ID><![CDATA[5687]]></AD_COLUMN_ID>
 <!--4552-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4552-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
-<!--4552-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4552-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4552-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--4552-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--4552-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -55899,7 +55899,7 @@
 <!--4561-->  <AD_COLUMN_ID><![CDATA[5803]]></AD_COLUMN_ID>
 <!--4561-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4561-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
-<!--4561-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4561-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4561-->  <SEQNO><![CDATA[10]]></SEQNO>
 <!--4561-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--4561-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -55922,7 +55922,7 @@
 <!--4562-->  <AD_COLUMN_ID><![CDATA[5804]]></AD_COLUMN_ID>
 <!--4562-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4562-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
-<!--4562-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4562-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4562-->  <SEQNO><![CDATA[20]]></SEQNO>
 <!--4562-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--4562-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -55969,7 +55969,7 @@
 <!--4564-->  <AD_COLUMN_ID><![CDATA[5810]]></AD_COLUMN_ID>
 <!--4564-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4564-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
-<!--4564-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4564-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4564-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--4564-->  <SORTNO><![CDATA[1]]></SORTNO>
 <!--4564-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
@@ -55993,7 +55993,7 @@
 <!--4565-->  <AD_COLUMN_ID><![CDATA[5811]]></AD_COLUMN_ID>
 <!--4565-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4565-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
-<!--4565-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4565-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4565-->  <SEQNO><![CDATA[50]]></SEQNO>
 <!--4565-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--4565-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -56016,7 +56016,7 @@
 <!--4566-->  <AD_COLUMN_ID><![CDATA[5812]]></AD_COLUMN_ID>
 <!--4566-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4566-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
-<!--4566-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4566-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4566-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--4566-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--4566-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -56943,7 +56943,7 @@
 <!--4610-->  <AD_COLUMN_ID><![CDATA[5828]]></AD_COLUMN_ID>
 <!--4610-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4610-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
-<!--4610-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4610-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4610-->  <SEQNO><![CDATA[20]]></SEQNO>
 <!--4610-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--4610-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -56966,7 +56966,7 @@
 <!--4611-->  <AD_COLUMN_ID><![CDATA[5829]]></AD_COLUMN_ID>
 <!--4611-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4611-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
-<!--4611-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4611-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4611-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--4611-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--4611-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -56991,7 +56991,7 @@
 <!--4612-->  <AD_COLUMN_ID><![CDATA[5830]]></AD_COLUMN_ID>
 <!--4612-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4612-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
-<!--4612-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4612-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4612-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--4612-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--4612-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -57037,7 +57037,7 @@
 <!--4614-->  <AD_COLUMN_ID><![CDATA[5836]]></AD_COLUMN_ID>
 <!--4614-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4614-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
-<!--4614-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4614-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4614-->  <SEQNO><![CDATA[50]]></SEQNO>
 <!--4614-->  <SORTNO><![CDATA[1]]></SORTNO>
 <!--4614-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
@@ -57107,7 +57107,7 @@
 <!--4617-->  <AD_COLUMN_ID><![CDATA[5839]]></AD_COLUMN_ID>
 <!--4617-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--4617-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
-<!--4617-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4617-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--4617-->  <SEQNO><![CDATA[90]]></SEQNO>
 <!--4617-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--4617-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -71180,7 +71180,7 @@
 <!--5883-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--5883-->  <DISPLAYLENGTH><![CDATA[20]]></DISPLAYLENGTH>
 <!--5883-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--5883-->  <SEQNO><![CDATA[190]]></SEQNO>
+<!--5883-->  <SEQNO><![CDATA[200]]></SEQNO>
 <!--5883-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--5883-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--5883-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -71205,7 +71205,7 @@
 <!--5884-->  <DISPLAYLOGIC><![CDATA[@AD_USER_ID@ ! '' | @#autosave@='Y']]></DISPLAYLOGIC>
 <!--5884-->  <DISPLAYLENGTH><![CDATA[20]]></DISPLAYLENGTH>
 <!--5884-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--5884-->  <SEQNO><![CDATA[200]]></SEQNO>
+<!--5884-->  <SEQNO><![CDATA[210]]></SEQNO>
 <!--5884-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--5884-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--5884-->  <ISENCRYPTED><![CDATA[Y]]></ISENCRYPTED>
@@ -79098,7 +79098,7 @@
 <!--6430-->  <AD_FIELDGROUP_ID><![CDATA[103]]></AD_FIELDGROUP_ID>
 <!--6430-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6430-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
-<!--6430-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--6430-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--6430-->  <SEQNO><![CDATA[180]]></SEQNO>
 <!--6430-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--6430-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -79122,7 +79122,7 @@
 <!--6431-->  <AD_FIELDGROUP_ID><![CDATA[103]]></AD_FIELDGROUP_ID>
 <!--6431-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6431-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
-<!--6431-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--6431-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--6431-->  <SEQNO><![CDATA[190]]></SEQNO>
 <!--6431-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--6431-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -80735,7 +80735,7 @@
 <!--6511-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6511-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--6511-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--6511-->  <SEQNO><![CDATA[240]]></SEQNO>
+<!--6511-->  <SEQNO><![CDATA[230]]></SEQNO>
 <!--6511-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--6511-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--6511-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -80759,7 +80759,7 @@
 <!--6513-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6513-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--6513-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--6513-->  <SEQNO><![CDATA[250]]></SEQNO>
+<!--6513-->  <SEQNO><![CDATA[240]]></SEQNO>
 <!--6513-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--6513-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--6513-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -80782,7 +80782,7 @@
 <!--6514-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6514-->  <DISPLAYLENGTH><![CDATA[20]]></DISPLAYLENGTH>
 <!--6514-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--6514-->  <SEQNO><![CDATA[170]]></SEQNO>
+<!--6514-->  <SEQNO><![CDATA[180]]></SEQNO>
 <!--6514-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--6514-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--6514-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -80805,7 +80805,7 @@
 <!--6515-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6515-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--6515-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--6515-->  <SEQNO><![CDATA[150]]></SEQNO>
+<!--6515-->  <SEQNO><![CDATA[160]]></SEQNO>
 <!--6515-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--6515-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--6515-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -80851,7 +80851,7 @@
 <!--6517-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6517-->  <DISPLAYLENGTH><![CDATA[30]]></DISPLAYLENGTH>
 <!--6517-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--6517-->  <SEQNO><![CDATA[160]]></SEQNO>
+<!--6517-->  <SEQNO><![CDATA[170]]></SEQNO>
 <!--6517-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--6517-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--6517-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -80874,7 +80874,7 @@
 <!--6518-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6518-->  <DISPLAYLENGTH><![CDATA[30]]></DISPLAYLENGTH>
 <!--6518-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--6518-->  <SEQNO><![CDATA[180]]></SEQNO>
+<!--6518-->  <SEQNO><![CDATA[190]]></SEQNO>
 <!--6518-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--6518-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--6518-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -80898,7 +80898,7 @@
 <!--6519-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6519-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--6519-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--6519-->  <SEQNO><![CDATA[270]]></SEQNO>
+<!--6519-->  <SEQNO><![CDATA[260]]></SEQNO>
 <!--6519-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--6519-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--6519-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -80922,7 +80922,7 @@
 <!--6520-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6520-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--6520-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--6520-->  <SEQNO><![CDATA[260]]></SEQNO>
+<!--6520-->  <SEQNO><![CDATA[250]]></SEQNO>
 <!--6520-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--6520-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--6520-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -80945,7 +80945,7 @@
 <!--6521-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6521-->  <DISPLAYLENGTH><![CDATA[30]]></DISPLAYLENGTH>
 <!--6521-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--6521-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--6521-->  <SEQNO><![CDATA[150]]></SEQNO>
 <!--6521-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--6521-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--6521-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -85967,7 +85967,7 @@
 <!--6837-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6837-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--6837-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--6837-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--6837-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--6837-->  <SORTNO><![CDATA[1]]></SORTNO>
 <!--6837-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--6837-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -172376,7 +172376,7 @@
 <!--804207-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--804207-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--804207-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--804207-->  <SEQNO><![CDATA[300]]></SEQNO>
+<!--804207-->  <SEQNO><![CDATA[290]]></SEQNO>
 <!--804207-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--804207-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--804207-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -172399,7 +172399,7 @@
 <!--804208-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--804208-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--804208-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--804208-->  <SEQNO><![CDATA[310]]></SEQNO>
+<!--804208-->  <SEQNO><![CDATA[300]]></SEQNO>
 <!--804208-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--804208-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--804208-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -172422,7 +172422,7 @@
 <!--804209-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--804209-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--804209-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--804209-->  <SEQNO><![CDATA[290]]></SEQNO>
+<!--804209-->  <SEQNO><![CDATA[280]]></SEQNO>
 <!--804209-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--804209-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--804209-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -172445,7 +172445,7 @@
 <!--804210-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--804210-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--804210-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--804210-->  <SEQNO><![CDATA[280]]></SEQNO>
+<!--804210-->  <SEQNO><![CDATA[270]]></SEQNO>
 <!--804210-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--804210-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--804210-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -172468,7 +172468,7 @@
 <!--804211-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--804211-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--804211-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--804211-->  <SEQNO><![CDATA[320]]></SEQNO>
+<!--804211-->  <SEQNO><![CDATA[310]]></SEQNO>
 <!--804211-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--804211-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--804211-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -174778,12 +174778,13 @@
 <!--1002100118-->  <AD_COLUMN_ID><![CDATA[5089]]></AD_COLUMN_ID>
 <!--1002100118-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--1002100118-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
-<!--1002100118-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1002100118-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--1002100118-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--1002100118-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--1002100118-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--1002100118-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1002100118-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--1002100118-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--1002100118-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--1002100118-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1002100118--></AD_FIELD>
 
@@ -174801,7 +174802,7 @@
 <!--1002100119-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--1002100119-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
 <!--1002100119-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1002100119-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--1002100119-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--1002100119-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--1002100119-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1002100119-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -174864,10 +174865,9 @@
 <!--1002100122-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--1002100122-->  <AD_TAB_ID><![CDATA[1002100005]]></AD_TAB_ID>
 <!--1002100122-->  <AD_COLUMN_ID><![CDATA[5094]]></AD_COLUMN_ID>
-<!--1002100122-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--1002100122-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--1002100122-->  <DISPLAYLENGTH><![CDATA[19]]></DISPLAYLENGTH>
 <!--1002100122-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1002100122-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--1002100122-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--1002100122-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1002100122-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -174889,6 +174889,7 @@
 <!--1002100123-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--1002100123-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--1002100123-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--1002100123-->  <SEQNO><![CDATA[50]]></SEQNO>
 <!--1002100123-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--1002100123-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1002100123-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -174912,7 +174913,7 @@
 <!--1002100124-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--1002100124-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--1002100124-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1002100124-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--1002100124-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--1002100124-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--1002100124-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1002100124-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -184826,7 +184827,6 @@
 <!--521F8231195B6C29E040007F01001B31-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--521F8231195B6C29E040007F01001B31-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--521F8231195B6C29E040007F01001B31-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--521F8231195B6C29E040007F01001B31-->  <SEQNO><![CDATA[0]]></SEQNO>
 <!--521F8231195B6C29E040007F01001B31-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--521F8231195B6C29E040007F01001B31-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--521F8231195B6C29E040007F01001B31-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -188901,7 +188901,7 @@
 <!--5814736D56B34AD3A6F89D5023FAF575-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
 <!--5814736D56B34AD3A6F89D5023FAF575-->  <AD_TAB_ID><![CDATA[290]]></AD_TAB_ID>
 <!--5814736D56B34AD3A6F89D5023FAF575-->  <AD_COLUMN_ID><![CDATA[E3C846A54D624CDDA1BE548D738B7C3E]]></AD_COLUMN_ID>
-<!--5814736D56B34AD3A6F89D5023FAF575-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--5814736D56B34AD3A6F89D5023FAF575-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--5814736D56B34AD3A6F89D5023FAF575-->  <DISPLAYLOGIC><![CDATA[@Processed@='Y']]></DISPLAYLOGIC>
 <!--5814736D56B34AD3A6F89D5023FAF575-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--5814736D56B34AD3A6F89D5023FAF575-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
@@ -193781,7 +193781,7 @@
 <!--766E946AA3738787E040007F010131F4-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--766E946AA3738787E040007F010131F4-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--766E946AA3738787E040007F010131F4-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--766E946AA3738787E040007F010131F4-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--766E946AA3738787E040007F010131F4-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--766E946AA3738787E040007F010131F4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--766E946AA3738787E040007F010131F4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--766E946AA3738787E040007F010131F4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -193790,29 +193790,6 @@
 <!--766E946AA3738787E040007F010131F4-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--766E946AA3738787E040007F010131F4--></AD_FIELD>
 
-<!--7693B3D758076F59E040007F01012A25--><AD_FIELD>
-<!--7693B3D758076F59E040007F01012A25-->  <AD_FIELD_ID><![CDATA[7693B3D758076F59E040007F01012A25]]></AD_FIELD_ID>
-<!--7693B3D758076F59E040007F01012A25-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--7693B3D758076F59E040007F01012A25-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--7693B3D758076F59E040007F01012A25-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--7693B3D758076F59E040007F01012A25-->  <NAME><![CDATA[User]]></NAME>
-<!--7693B3D758076F59E040007F01012A25-->  <DESCRIPTION><![CDATA[The user who logged into the application]]></DESCRIPTION>
-<!--7693B3D758076F59E040007F01012A25-->  <HELP><![CDATA[The user who logged into the application.]]></HELP>
-<!--7693B3D758076F59E040007F01012A25-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
-<!--7693B3D758076F59E040007F01012A25-->  <AD_TAB_ID><![CDATA[475]]></AD_TAB_ID>
-<!--7693B3D758076F59E040007F01012A25-->  <AD_COLUMN_ID><![CDATA[8577]]></AD_COLUMN_ID>
-<!--7693B3D758076F59E040007F01012A25-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--7693B3D758076F59E040007F01012A25-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
-<!--7693B3D758076F59E040007F01012A25-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--7693B3D758076F59E040007F01012A25-->  <SEQNO><![CDATA[10]]></SEQNO>
-<!--7693B3D758076F59E040007F01012A25-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
-<!--7693B3D758076F59E040007F01012A25-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
-<!--7693B3D758076F59E040007F01012A25-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--7693B3D758076F59E040007F01012A25-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
-<!--7693B3D758076F59E040007F01012A25-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
-<!--7693B3D758076F59E040007F01012A25-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--7693B3D758076F59E040007F01012A25--></AD_FIELD>
-
 <!--770167C23FAA77C5E040007F0101517B--><AD_FIELD>
 <!--770167C23FAA77C5E040007F0101517B-->  <AD_FIELD_ID><![CDATA[770167C23FAA77C5E040007F0101517B]]></AD_FIELD_ID>
 <!--770167C23FAA77C5E040007F0101517B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -193911,7 +193888,7 @@
 <!--7994C59E1CDE1F99E040007F01015756-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--7994C59E1CDE1F99E040007F01015756-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--7994C59E1CDE1F99E040007F01015756-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--7994C59E1CDE1F99E040007F01015756-->  <NAME><![CDATA[Model Implememtation]]></NAME>
+<!--7994C59E1CDE1F99E040007F01015756-->  <NAME><![CDATA[Model Implementation]]></NAME>
 <!--7994C59E1CDE1F99E040007F01015756-->  <DESCRIPTION><![CDATA[Java class implementing Model.]]></DESCRIPTION>
 <!--7994C59E1CDE1F99E040007F01015756-->  <HELP><![CDATA[Java class implementing Model. It is the java class used to generate DAL classes.]]></HELP>
 <!--7994C59E1CDE1F99E040007F01015756-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
@@ -196144,7 +196121,7 @@
 <!--7FDC7A18D86B83EAE040007F01012E08-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--7FDC7A18D86B83EAE040007F01012E08-->  <DISPLAYLENGTH><![CDATA[19]]></DISPLAYLENGTH>
 <!--7FDC7A18D86B83EAE040007F01012E08-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--7FDC7A18D86B83EAE040007F01012E08-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--7FDC7A18D86B83EAE040007F01012E08-->  <SEQNO><![CDATA[70]]></SEQNO>
 <!--7FDC7A18D86B83EAE040007F01012E08-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--7FDC7A18D86B83EAE040007F01012E08-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--7FDC7A18D86B83EAE040007F01012E08-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -196590,6 +196567,52 @@
 <!--8032E178607A50D5E040007F01004282-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--8032E178607A50D5E040007F01004282--></AD_FIELD>
 
+<!--8046279CCA5C981BE040007F01013FDA--><AD_FIELD>
+<!--8046279CCA5C981BE040007F01013FDA-->  <AD_FIELD_ID><![CDATA[8046279CCA5C981BE040007F01013FDA]]></AD_FIELD_ID>
+<!--8046279CCA5C981BE040007F01013FDA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8046279CCA5C981BE040007F01013FDA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8046279CCA5C981BE040007F01013FDA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8046279CCA5C981BE040007F01013FDA-->  <NAME><![CDATA[Login Status]]></NAME>
+<!--8046279CCA5C981BE040007F01013FDA-->  <DESCRIPTION><![CDATA[Login Status]]></DESCRIPTION>
+<!--8046279CCA5C981BE040007F01013FDA-->  <HELP><![CDATA[Maintains the status for the log in. It determines whether there was any error in the log in.]]></HELP>
+<!--8046279CCA5C981BE040007F01013FDA-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--8046279CCA5C981BE040007F01013FDA-->  <AD_TAB_ID><![CDATA[475]]></AD_TAB_ID>
+<!--8046279CCA5C981BE040007F01013FDA-->  <AD_COLUMN_ID><![CDATA[8042A0FD1B9A2CC9E040007F01012535]]></AD_COLUMN_ID>
+<!--8046279CCA5C981BE040007F01013FDA-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--8046279CCA5C981BE040007F01013FDA-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--8046279CCA5C981BE040007F01013FDA-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--8046279CCA5C981BE040007F01013FDA-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--8046279CCA5C981BE040007F01013FDA-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--8046279CCA5C981BE040007F01013FDA-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--8046279CCA5C981BE040007F01013FDA-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8046279CCA5C981BE040007F01013FDA-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--8046279CCA5C981BE040007F01013FDA-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--8046279CCA5C981BE040007F01013FDA-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8046279CCA5C981BE040007F01013FDA--></AD_FIELD>
+
+<!--8046279CCA5D981BE040007F01013FDA--><AD_FIELD>
+<!--8046279CCA5D981BE040007F01013FDA-->  <AD_FIELD_ID><![CDATA[8046279CCA5D981BE040007F01013FDA]]></AD_FIELD_ID>
+<!--8046279CCA5D981BE040007F01013FDA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8046279CCA5D981BE040007F01013FDA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8046279CCA5D981BE040007F01013FDA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8046279CCA5D981BE040007F01013FDA-->  <NAME><![CDATA[Username]]></NAME>
+<!--8046279CCA5D981BE040007F01013FDA-->  <DESCRIPTION><![CDATA[User Name]]></DESCRIPTION>
+<!--8046279CCA5D981BE040007F01013FDA-->  <HELP><![CDATA[Name that identifies the user in the System]]></HELP>
+<!--8046279CCA5D981BE040007F01013FDA-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--8046279CCA5D981BE040007F01013FDA-->  <AD_TAB_ID><![CDATA[475]]></AD_TAB_ID>
+<!--8046279CCA5D981BE040007F01013FDA-->  <AD_COLUMN_ID><![CDATA[8042A0FD1B992CC9E040007F01012535]]></AD_COLUMN_ID>
+<!--8046279CCA5D981BE040007F01013FDA-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--8046279CCA5D981BE040007F01013FDA-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--8046279CCA5D981BE040007F01013FDA-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--8046279CCA5D981BE040007F01013FDA-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--8046279CCA5D981BE040007F01013FDA-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--8046279CCA5D981BE040007F01013FDA-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--8046279CCA5D981BE040007F01013FDA-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8046279CCA5D981BE040007F01013FDA-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--8046279CCA5D981BE040007F01013FDA-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--8046279CCA5D981BE040007F01013FDA-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8046279CCA5D981BE040007F01013FDA--></AD_FIELD>
+
 <!--804882C210BE3922E040007F01004FC0--><AD_FIELD>
 <!--804882C210BE3922E040007F01004FC0-->  <AD_FIELD_ID><![CDATA[804882C210BE3922E040007F01004FC0]]></AD_FIELD_ID>
 <!--804882C210BE3922E040007F01004FC0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -196869,6 +196892,29 @@
 <!--804882C210C93922E040007F01004FC0-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--804882C210C93922E040007F01004FC0--></AD_FIELD>
 
+<!--80582217C7470114E040007F0101799A--><AD_FIELD>
+<!--80582217C7470114E040007F0101799A-->  <AD_FIELD_ID><![CDATA[80582217C7470114E040007F0101799A]]></AD_FIELD_ID>
+<!--80582217C7470114E040007F0101799A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--80582217C7470114E040007F0101799A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--80582217C7470114E040007F0101799A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--80582217C7470114E040007F0101799A-->  <NAME><![CDATA[Locked]]></NAME>
+<!--80582217C7470114E040007F0101799A-->  <DESCRIPTION><![CDATA[The user is locked and cannot log in the application]]></DESCRIPTION>
+<!--80582217C7470114E040007F0101799A-->  <HELP><![CDATA[The user is locked and cannot log in the application. This field can be manually set or automatically if login.trial.user.lock property is configured in Openbravo.properties file and there has been that number of failed log in attempts.]]></HELP>
+<!--80582217C7470114E040007F0101799A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--80582217C7470114E040007F0101799A-->  <AD_TAB_ID><![CDATA[118]]></AD_TAB_ID>
+<!--80582217C7470114E040007F0101799A-->  <AD_COLUMN_ID><![CDATA[805819299877F9F3E040007F0101799C]]></AD_COLUMN_ID>
+<!--80582217C7470114E040007F0101799A-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--80582217C7470114E040007F0101799A-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--80582217C7470114E040007F0101799A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--80582217C7470114E040007F0101799A-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--80582217C7470114E040007F0101799A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--80582217C7470114E040007F0101799A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--80582217C7470114E040007F0101799A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--80582217C7470114E040007F0101799A-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--80582217C7470114E040007F0101799A-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--80582217C7470114E040007F0101799A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--80582217C7470114E040007F0101799A--></AD_FIELD>
+
 <!--806D37F8190E78CBE040007F0101020F--><AD_FIELD>
 <!--806D37F8190E78CBE040007F0101020F-->  <AD_FIELD_ID><![CDATA[806D37F8190E78CBE040007F0101020F]]></AD_FIELD_ID>
 <!--806D37F8190E78CBE040007F0101020F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -198754,7 +198800,7 @@
 <!--83424218E05542989EF92FD3E5B5181A-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
 <!--83424218E05542989EF92FD3E5B5181A-->  <AD_TAB_ID><![CDATA[263]]></AD_TAB_ID>
 <!--83424218E05542989EF92FD3E5B5181A-->  <AD_COLUMN_ID><![CDATA[E3C846A54D624CDDA1BE548D738B7C3E]]></AD_COLUMN_ID>
-<!--83424218E05542989EF92FD3E5B5181A-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--83424218E05542989EF92FD3E5B5181A-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--83424218E05542989EF92FD3E5B5181A-->  <DISPLAYLOGIC><![CDATA[@Processed@='Y']]></DISPLAYLOGIC>
 <!--83424218E05542989EF92FD3E5B5181A-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--83424218E05542989EF92FD3E5B5181A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -29978,6 +29978,17 @@
 <!--1E4DFEDC675F4BD8AFA6A8D707D77FFF-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1E4DFEDC675F4BD8AFA6A8D707D77FFF--></AD_MESSAGE>
 
+<!--1EC11EDD0953422B9B4E8B54690CE345--><AD_MESSAGE>
+<!--1EC11EDD0953422B9B4E8B54690CE345-->  <AD_MESSAGE_ID><![CDATA[1EC11EDD0953422B9B4E8B54690CE345]]></AD_MESSAGE_ID>
+<!--1EC11EDD0953422B9B4E8B54690CE345-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1EC11EDD0953422B9B4E8B54690CE345-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1EC11EDD0953422B9B4E8B54690CE345-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1EC11EDD0953422B9B4E8B54690CE345-->  <VALUE><![CDATA[LOCKED_USER_TITLE]]></VALUE>
+<!--1EC11EDD0953422B9B4E8B54690CE345-->  <MSGTEXT><![CDATA[User is locked]]></MSGTEXT>
+<!--1EC11EDD0953422B9B4E8B54690CE345-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--1EC11EDD0953422B9B4E8B54690CE345-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1EC11EDD0953422B9B4E8B54690CE345--></AD_MESSAGE>
+
 <!--1FBA26D3CE3F4C52B5B1EB2AA7E1C8D6--><AD_MESSAGE>
 <!--1FBA26D3CE3F4C52B5B1EB2AA7E1C8D6-->  <AD_MESSAGE_ID><![CDATA[1FBA26D3CE3F4C52B5B1EB2AA7E1C8D6]]></AD_MESSAGE_ID>
 <!--1FBA26D3CE3F4C52B5B1EB2AA7E1C8D6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -32357,6 +32368,18 @@
 <!--D4208AC7E8B348D08F0D621DB273F257-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--D4208AC7E8B348D08F0D621DB273F257--></AD_MESSAGE>
 
+<!--D5D4200451F9430E976CECEAB7A248C1--><AD_MESSAGE>
+<!--D5D4200451F9430E976CECEAB7A248C1-->  <AD_MESSAGE_ID><![CDATA[D5D4200451F9430E976CECEAB7A248C1]]></AD_MESSAGE_ID>
+<!--D5D4200451F9430E976CECEAB7A248C1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D5D4200451F9430E976CECEAB7A248C1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D5D4200451F9430E976CECEAB7A248C1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D5D4200451F9430E976CECEAB7A248C1-->  <VALUE><![CDATA[LOCKED_USER_MSG]]></VALUE>
+<!--D5D4200451F9430E976CECEAB7A248C1-->  <MSGTEXT><![CDATA[user is locked. 
+Ask System Administrator to unlock it.]]></MSGTEXT>
+<!--D5D4200451F9430E976CECEAB7A248C1-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--D5D4200451F9430E976CECEAB7A248C1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D5D4200451F9430E976CECEAB7A248C1--></AD_MESSAGE>
+
 <!--D62BB9614B02490C848F8731B62BE1FB--><AD_MESSAGE>
 <!--D62BB9614B02490C848F8731B62BE1FB-->  <AD_MESSAGE_ID><![CDATA[D62BB9614B02490C848F8731B62BE1FB]]></AD_MESSAGE_ID>
 <!--D62BB9614B02490C848F8731B62BE1FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -32802,6 +32825,17 @@
 <!--F75693A7ED5E4BF1A53744DF2150A6A4-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--F75693A7ED5E4BF1A53744DF2150A6A4--></AD_MESSAGE>
 
+<!--F7A6AFA7E34D4A0099E7A7E8021C5ECB--><AD_MESSAGE>
+<!--F7A6AFA7E34D4A0099E7A7E8021C5ECB-->  <AD_MESSAGE_ID><![CDATA[F7A6AFA7E34D4A0099E7A7E8021C5ECB]]></AD_MESSAGE_ID>
+<!--F7A6AFA7E34D4A0099E7A7E8021C5ECB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F7A6AFA7E34D4A0099E7A7E8021C5ECB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F7A6AFA7E34D4A0099E7A7E8021C5ECB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F7A6AFA7E34D4A0099E7A7E8021C5ECB-->  <VALUE><![CDATA[InvalidProcessRequest]]></VALUE>
+<!--F7A6AFA7E34D4A0099E7A7E8021C5ECB-->  <MSGTEXT><![CDATA[The Process Request details you have entered are invalid. Please make sure the process frequency and interval are correct.]]></MSGTEXT>
+<!--F7A6AFA7E34D4A0099E7A7E8021C5ECB-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--F7A6AFA7E34D4A0099E7A7E8021C5ECB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--F7A6AFA7E34D4A0099E7A7E8021C5ECB--></AD_MESSAGE>
+
 <!--F7A7B276D3F04AE78F8B50CE462B0F89--><AD_MESSAGE>
 <!--F7A7B276D3F04AE78F8B50CE462B0F89-->  <AD_MESSAGE_ID><![CDATA[F7A7B276D3F04AE78F8B50CE462B0F89]]></AD_MESSAGE_ID>
 <!--F7A7B276D3F04AE78F8B50CE462B0F89-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -26040,6 +26040,16 @@
 <!--AFEFA3ECE5E543C8BFCB049F0208577F-->  <ISDEFAULT><![CDATA[N]]></ISDEFAULT>
 <!--AFEFA3ECE5E543C8BFCB049F0208577F--></AD_MODEL_OBJECT_MAPPING>
 
+<!--B037C4FDF05E41B3BD6C8F95534089B8--><AD_MODEL_OBJECT_MAPPING>
+<!--B037C4FDF05E41B3BD6C8F95534089B8-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[B037C4FDF05E41B3BD6C8F95534089B8]]></AD_MODEL_OBJECT_MAPPING_ID>
+<!--B037C4FDF05E41B3BD6C8F95534089B8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B037C4FDF05E41B3BD6C8F95534089B8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B037C4FDF05E41B3BD6C8F95534089B8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B037C4FDF05E41B3BD6C8F95534089B8-->  <AD_MODEL_OBJECT_ID><![CDATA[801706]]></AD_MODEL_OBJECT_ID>
+<!--B037C4FDF05E41B3BD6C8F95534089B8-->  <MAPPINGNAME><![CDATA[/ad_reports/ReportSalesOrderJR.pdf]]></MAPPINGNAME>
+<!--B037C4FDF05E41B3BD6C8F95534089B8-->  <ISDEFAULT><![CDATA[N]]></ISDEFAULT>
+<!--B037C4FDF05E41B3BD6C8F95534089B8--></AD_MODEL_OBJECT_MAPPING>
+
 <!--B078EEC9AD7441798ED63AA8251E4EF2--><AD_MODEL_OBJECT_MAPPING>
 <!--B078EEC9AD7441798ED63AA8251E4EF2-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[B078EEC9AD7441798ED63AA8251E4EF2]]></AD_MODEL_OBJECT_MAPPING_ID>
 <!--B078EEC9AD7441798ED63AA8251E4EF2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -4694,6 +4694,20 @@
 <!--7DB6D4792CDC4ED297C70A4F4282A52E-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--7DB6D4792CDC4ED297C70A4F4282A52E--></AD_REFERENCE>
 
+<!--86086D70DDBC42B09E2BEB51D25C159F--><AD_REFERENCE>
+<!--86086D70DDBC42B09E2BEB51D25C159F-->  <AD_REFERENCE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_ID>
+<!--86086D70DDBC42B09E2BEB51D25C159F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--86086D70DDBC42B09E2BEB51D25C159F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--86086D70DDBC42B09E2BEB51D25C159F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--86086D70DDBC42B09E2BEB51D25C159F-->  <NAME><![CDATA[Session Login Status]]></NAME>
+<!--86086D70DDBC42B09E2BEB51D25C159F-->  <DESCRIPTION><![CDATA[Session Login Status]]></DESCRIPTION>
+<!--86086D70DDBC42B09E2BEB51D25C159F-->  <HELP><![CDATA[Status of the session login.]]></HELP>
+<!--86086D70DDBC42B09E2BEB51D25C159F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--86086D70DDBC42B09E2BEB51D25C159F-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--86086D70DDBC42B09E2BEB51D25C159F-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
+<!--86086D70DDBC42B09E2BEB51D25C159F-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--86086D70DDBC42B09E2BEB51D25C159F--></AD_REFERENCE>
+
 <!--865D46B9A1C148D1A119F2F0F7F55589--><AD_REFERENCE>
 <!--865D46B9A1C148D1A119F2F0F7F55589-->  <AD_REFERENCE_ID><![CDATA[865D46B9A1C148D1A119F2F0F7F55589]]></AD_REFERENCE_ID>
 <!--865D46B9A1C148D1A119F2F0F7F55589-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -8183,6 +8183,17 @@
 <!--1005900001-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1005900001--></AD_REF_LIST>
 
+<!--01920B83AE144535BF95CDB43012A76D--><AD_REF_LIST>
+<!--01920B83AE144535BF95CDB43012A76D-->  <AD_REF_LIST_ID><![CDATA[01920B83AE144535BF95CDB43012A76D]]></AD_REF_LIST_ID>
+<!--01920B83AE144535BF95CDB43012A76D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--01920B83AE144535BF95CDB43012A76D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--01920B83AE144535BF95CDB43012A76D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--01920B83AE144535BF95CDB43012A76D-->  <VALUE><![CDATA[LU]]></VALUE>
+<!--01920B83AE144535BF95CDB43012A76D-->  <NAME><![CDATA[Locked User]]></NAME>
+<!--01920B83AE144535BF95CDB43012A76D-->  <AD_REFERENCE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_ID>
+<!--01920B83AE144535BF95CDB43012A76D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--01920B83AE144535BF95CDB43012A76D--></AD_REF_LIST>
+
 <!--02DF846DDB7C4B4E8C2E483B38A977B7--><AD_REF_LIST>
 <!--02DF846DDB7C4B4E8C2E483B38A977B7-->  <AD_REF_LIST_ID><![CDATA[02DF846DDB7C4B4E8C2E483B38A977B7]]></AD_REF_LIST_ID>
 <!--02DF846DDB7C4B4E8C2E483B38A977B7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8216,6 +8227,18 @@
 <!--0441FC8D3AF44718987A572F5B92AA28-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--0441FC8D3AF44718987A572F5B92AA28--></AD_REF_LIST>
 
+<!--06F962562D694CEC88B00D4247A2315A--><AD_REF_LIST>
+<!--06F962562D694CEC88B00D4247A2315A-->  <AD_REF_LIST_ID><![CDATA[06F962562D694CEC88B00D4247A2315A]]></AD_REF_LIST_ID>
+<!--06F962562D694CEC88B00D4247A2315A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--06F962562D694CEC88B00D4247A2315A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--06F962562D694CEC88B00D4247A2315A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--06F962562D694CEC88B00D4247A2315A-->  <VALUE><![CDATA[S]]></VALUE>
+<!--06F962562D694CEC88B00D4247A2315A-->  <NAME><![CDATA[Successfull]]></NAME>
+<!--06F962562D694CEC88B00D4247A2315A-->  <DESCRIPTION><![CDATA[Sesion logged in successfully]]></DESCRIPTION>
+<!--06F962562D694CEC88B00D4247A2315A-->  <AD_REFERENCE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_ID>
+<!--06F962562D694CEC88B00D4247A2315A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--06F962562D694CEC88B00D4247A2315A--></AD_REF_LIST>
+
 <!--0908AC3BA88A4445AB7E56E029937498--><AD_REF_LIST>
 <!--0908AC3BA88A4445AB7E56E029937498-->  <AD_REF_LIST_ID><![CDATA[0908AC3BA88A4445AB7E56E029937498]]></AD_REF_LIST_ID>
 <!--0908AC3BA88A4445AB7E56E029937498-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8378,6 +8401,18 @@
 <!--19CE2DD159684FCF84E1B1963AF59A14-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--19CE2DD159684FCF84E1B1963AF59A14--></AD_REF_LIST>
 
+<!--1A22A021C5A54D36BC909FFF02CBB00F--><AD_REF_LIST>
+<!--1A22A021C5A54D36BC909FFF02CBB00F-->  <AD_REF_LIST_ID><![CDATA[1A22A021C5A54D36BC909FFF02CBB00F]]></AD_REF_LIST_ID>
+<!--1A22A021C5A54D36BC909FFF02CBB00F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1A22A021C5A54D36BC909FFF02CBB00F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1A22A021C5A54D36BC909FFF02CBB00F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1A22A021C5A54D36BC909FFF02CBB00F-->  <VALUE><![CDATA[WS]]></VALUE>
+<!--1A22A021C5A54D36BC909FFF02CBB00F-->  <NAME><![CDATA[Web Service]]></NAME>
+<!--1A22A021C5A54D36BC909FFF02CBB00F-->  <DESCRIPTION><![CDATA[Web Service Login]]></DESCRIPTION>
+<!--1A22A021C5A54D36BC909FFF02CBB00F-->  <AD_REFERENCE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_ID>
+<!--1A22A021C5A54D36BC909FFF02CBB00F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1A22A021C5A54D36BC909FFF02CBB00F--></AD_REF_LIST>
+
 <!--1A544C8E801C464BA7ECACF28C155688--><AD_REF_LIST>
 <!--1A544C8E801C464BA7ECACF28C155688-->  <AD_REF_LIST_ID><![CDATA[1A544C8E801C464BA7ECACF28C155688]]></AD_REF_LIST_ID>
 <!--1A544C8E801C464BA7ECACF28C155688-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8690,6 +8725,17 @@
 <!--49CC7B0012EA4A379F8CE95F481A3F8D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--49CC7B0012EA4A379F8CE95F481A3F8D--></AD_REF_LIST>
 
+<!--4B320699808A4088930E96843DCBAF6D--><AD_REF_LIST>
+<!--4B320699808A4088930E96843DCBAF6D-->  <AD_REF_LIST_ID><![CDATA[4B320699808A4088930E96843DCBAF6D]]></AD_REF_LIST_ID>
+<!--4B320699808A4088930E96843DCBAF6D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4B320699808A4088930E96843DCBAF6D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4B320699808A4088930E96843DCBAF6D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4B320699808A4088930E96843DCBAF6D-->  <VALUE><![CDATA[LBF]]></VALUE>
+<!--4B320699808A4088930E96843DCBAF6D-->  <NAME><![CDATA[Last build failed]]></NAME>
+<!--4B320699808A4088930E96843DCBAF6D-->  <AD_REFERENCE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_ID>
+<!--4B320699808A4088930E96843DCBAF6D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4B320699808A4088930E96843DCBAF6D--></AD_REF_LIST>
+
 <!--4C6B4B638FC74B72AD5646519F92AB57--><AD_REF_LIST>
 <!--4C6B4B638FC74B72AD5646519F92AB57-->  <AD_REF_LIST_ID><![CDATA[4C6B4B638FC74B72AD5646519F92AB57]]></AD_REF_LIST_ID>
 <!--4C6B4B638FC74B72AD5646519F92AB57-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8734,6 +8780,17 @@
 <!--4E7D6FB11DDD4EE3B5E2C2ABCA8335B9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--4E7D6FB11DDD4EE3B5E2C2ABCA8335B9--></AD_REF_LIST>
 
+<!--52FADEF40F2344519D2BFB50489714A9--><AD_REF_LIST>
+<!--52FADEF40F2344519D2BFB50489714A9-->  <AD_REF_LIST_ID><![CDATA[52FADEF40F2344519D2BFB50489714A9]]></AD_REF_LIST_ID>
+<!--52FADEF40F2344519D2BFB50489714A9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--52FADEF40F2344519D2BFB50489714A9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--52FADEF40F2344519D2BFB50489714A9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--52FADEF40F2344519D2BFB50489714A9-->  <VALUE><![CDATA[RT]]></VALUE>
+<!--52FADEF40F2344519D2BFB50489714A9-->  <NAME><![CDATA[Restart Tomcat]]></NAME>
+<!--52FADEF40F2344519D2BFB50489714A9-->  <AD_REFERENCE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_ID>
+<!--52FADEF40F2344519D2BFB50489714A9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--52FADEF40F2344519D2BFB50489714A9--></AD_REF_LIST>
+
 <!--53520BEBA6F946C58811734D0CA11FD0--><AD_REF_LIST>
 <!--53520BEBA6F946C58811734D0CA11FD0-->  <AD_REF_LIST_ID><![CDATA[53520BEBA6F946C58811734D0CA11FD0]]></AD_REF_LIST_ID>
 <!--53520BEBA6F946C58811734D0CA11FD0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8779,6 +8836,29 @@
 <!--5795507EA4AB4B8FB01439F0E541BFC5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--5795507EA4AB4B8FB01439F0E541BFC5--></AD_REF_LIST>
 
+<!--583922F2AC314424871BF117D3E3576B--><AD_REF_LIST>
+<!--583922F2AC314424871BF117D3E3576B-->  <AD_REF_LIST_ID><![CDATA[583922F2AC314424871BF117D3E3576B]]></AD_REF_LIST_ID>
+<!--583922F2AC314424871BF117D3E3576B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--583922F2AC314424871BF117D3E3576B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--583922F2AC314424871BF117D3E3576B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--583922F2AC314424871BF117D3E3576B-->  <VALUE><![CDATA[SUR]]></VALUE>
+<!--583922F2AC314424871BF117D3E3576B-->  <NAME><![CDATA[Soft Concurrent Users Reached]]></NAME>
+<!--583922F2AC314424871BF117D3E3576B-->  <DESCRIPTION><![CDATA[Reached the number of soft concurrent users]]></DESCRIPTION>
+<!--583922F2AC314424871BF117D3E3576B-->  <AD_REFERENCE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_ID>
+<!--583922F2AC314424871BF117D3E3576B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--583922F2AC314424871BF117D3E3576B--></AD_REF_LIST>
+
+<!--58771B4E363B468DA6FEE4592A71EA9E--><AD_REF_LIST>
+<!--58771B4E363B468DA6FEE4592A71EA9E-->  <AD_REF_LIST_ID><![CDATA[58771B4E363B468DA6FEE4592A71EA9E]]></AD_REF_LIST_ID>
+<!--58771B4E363B468DA6FEE4592A71EA9E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--58771B4E363B468DA6FEE4592A71EA9E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--58771B4E363B468DA6FEE4592A71EA9E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--58771B4E363B468DA6FEE4592A71EA9E-->  <VALUE><![CDATA[IOBPS]]></VALUE>
+<!--58771B4E363B468DA6FEE4592A71EA9E-->  <NAME><![CDATA[Inacctive OBPS Instance]]></NAME>
+<!--58771B4E363B468DA6FEE4592A71EA9E-->  <AD_REFERENCE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_ID>
+<!--58771B4E363B468DA6FEE4592A71EA9E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--58771B4E363B468DA6FEE4592A71EA9E--></AD_REF_LIST>
+
 <!--58C4EA36C2C54A7AB20B9D9AC886F548--><AD_REF_LIST>
 <!--58C4EA36C2C54A7AB20B9D9AC886F548-->  <AD_REF_LIST_ID><![CDATA[58C4EA36C2C54A7AB20B9D9AC886F548]]></AD_REF_LIST_ID>
 <!--58C4EA36C2C54A7AB20B9D9AC886F548-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -9052,6 +9132,18 @@
 <!--866681D848B942EB814C0C70AF0BE2F6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--866681D848B942EB814C0C70AF0BE2F6--></AD_REF_LIST>
 
+<!--88EDCB912A6445A4BE6EEA28952212E9--><AD_REF_LIST>
+<!--88EDCB912A6445A4BE6EEA28952212E9-->  <AD_REF_LIST_ID><![CDATA[88EDCB912A6445A4BE6EEA28952212E9]]></AD_REF_LIST_ID>
+<!--88EDCB912A6445A4BE6EEA28952212E9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--88EDCB912A6445A4BE6EEA28952212E9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--88EDCB912A6445A4BE6EEA28952212E9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--88EDCB912A6445A4BE6EEA28952212E9-->  <VALUE><![CDATA[CUR]]></VALUE>
+<!--88EDCB912A6445A4BE6EEA28952212E9-->  <NAME><![CDATA[Concurrent Users Limit Reached]]></NAME>
+<!--88EDCB912A6445A4BE6EEA28952212E9-->  <DESCRIPTION><![CDATA[Reached number of maximum concurrent users in the instance]]></DESCRIPTION>
+<!--88EDCB912A6445A4BE6EEA28952212E9-->  <AD_REFERENCE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_ID>
+<!--88EDCB912A6445A4BE6EEA28952212E9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--88EDCB912A6445A4BE6EEA28952212E9--></AD_REF_LIST>
+
 <!--8994D37F5F7E41188519A09F9BAFAD91--><AD_REF_LIST>
 <!--8994D37F5F7E41188519A09F9BAFAD91-->  <AD_REF_LIST_ID><![CDATA[8994D37F5F7E41188519A09F9BAFAD91]]></AD_REF_LIST_ID>
 <!--8994D37F5F7E41188519A09F9BAFAD91-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -9415,6 +9507,18 @@
 <!--B9AFFC82A5AF4D7CABCA5F7C16C726FE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--B9AFFC82A5AF4D7CABCA5F7C16C726FE--></AD_REF_LIST>
 
+<!--BA7EB4B59E204625B9EDE4E7ABF27C10--><AD_REF_LIST>
+<!--BA7EB4B59E204625B9EDE4E7ABF27C10-->  <AD_REF_LIST_ID><![CDATA[BA7EB4B59E204625B9EDE4E7ABF27C10]]></AD_REF_LIST_ID>
+<!--BA7EB4B59E204625B9EDE4E7ABF27C10-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--BA7EB4B59E204625B9EDE4E7ABF27C10-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--BA7EB4B59E204625B9EDE4E7ABF27C10-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--BA7EB4B59E204625B9EDE4E7ABF27C10-->  <VALUE><![CDATA[F]]></VALUE>
+<!--BA7EB4B59E204625B9EDE4E7ABF27C10-->  <NAME><![CDATA[User/password fail]]></NAME>
+<!--BA7EB4B59E204625B9EDE4E7ABF27C10-->  <DESCRIPTION><![CDATA[User and/or password was not correct]]></DESCRIPTION>
+<!--BA7EB4B59E204625B9EDE4E7ABF27C10-->  <AD_REFERENCE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_ID>
+<!--BA7EB4B59E204625B9EDE4E7ABF27C10-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--BA7EB4B59E204625B9EDE4E7ABF27C10--></AD_REF_LIST>
+
 <!--BAEC82DAD19F4E5C939926722B7D49E0--><AD_REF_LIST>
 <!--BAEC82DAD19F4E5C939926722B7D49E0-->  <AD_REF_LIST_ID><![CDATA[BAEC82DAD19F4E5C939926722B7D49E0]]></AD_REF_LIST_ID>
 <!--BAEC82DAD19F4E5C939926722B7D49E0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -9734,6 +9838,17 @@
 <!--E249380AE2814BC7B0E5B8F267F387AC-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--E249380AE2814BC7B0E5B8F267F387AC--></AD_REF_LIST>
 
+<!--E2B06CEADF4F4528BDB55A1FA694CBEB--><AD_REF_LIST>
+<!--E2B06CEADF4F4528BDB55A1FA694CBEB-->  <AD_REF_LIST_ID><![CDATA[E2B06CEADF4F4528BDB55A1FA694CBEB]]></AD_REF_LIST_ID>
+<!--E2B06CEADF4F4528BDB55A1FA694CBEB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E2B06CEADF4F4528BDB55A1FA694CBEB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E2B06CEADF4F4528BDB55A1FA694CBEB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E2B06CEADF4F4528BDB55A1FA694CBEB-->  <VALUE><![CDATA[ME]]></VALUE>
+<!--E2B06CEADF4F4528BDB55A1FA694CBEB-->  <NAME><![CDATA[Commercial module expired]]></NAME>
+<!--E2B06CEADF4F4528BDB55A1FA694CBEB-->  <AD_REFERENCE_ID><![CDATA[86086D70DDBC42B09E2BEB51D25C159F]]></AD_REFERENCE_ID>
+<!--E2B06CEADF4F4528BDB55A1FA694CBEB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--E2B06CEADF4F4528BDB55A1FA694CBEB--></AD_REF_LIST>
+
 <!--E5AF9D4589E84811B46A59D8F753226E--><AD_REF_LIST>
 <!--E5AF9D4589E84811B46A59D8F753226E-->  <AD_REF_LIST_ID><![CDATA[E5AF9D4589E84811B46A59D8F753226E]]></AD_REF_LIST_ID>
 <!--E5AF9D4589E84811B46A59D8F753226E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_TAB.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/sourcedata/AD_TAB.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -4425,7 +4425,7 @@
 <!--362-->  <PROCESSING><![CDATA[N]]></PROCESSING>
 <!--362-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
 <!--362-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--362-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
+<!--362-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--362--></AD_TAB>
 
 <!--363--><AD_TAB>
@@ -4448,7 +4448,7 @@
 <!--363-->  <PROCESSING><![CDATA[N]]></PROCESSING>
 <!--363-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
 <!--363-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--363-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
+<!--363-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--363--></AD_TAB>
 
 <!--364--><AD_TAB>
@@ -4495,7 +4495,7 @@
 <!--365-->  <PROCESSING><![CDATA[N]]></PROCESSING>
 <!--365-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
 <!--365-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--365-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
+<!--365-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--365--></AD_TAB>
 
 <!--378--><AD_TAB>
--- a/src-db/database/sourcedata/AD_TABLE.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/sourcedata/AD_TABLE.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -296,8 +296,7 @@
 <!--114-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--114-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--114-->  <NAME><![CDATA[ADUser]]></NAME>
-<!--114-->  <DESCRIPTION><![CDATA[User
-Maintain User within the system - Internal or Business Partner Contact]]></DESCRIPTION>
+<!--114-->  <DESCRIPTION><![CDATA[User<BR>Maintain User within the system - Internal or Business Partner Contact]]></DESCRIPTION>
 <!--114-->  <HELP><![CDATA[The User Tab defines the log in for Users who have access to the system.
 The User identifies a unique user in the system. This could be an internal user or a business partner contact]]></HELP>
 <!--114-->  <TABLENAME><![CDATA[AD_User]]></TABLENAME>
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -3080,38 +3080,6 @@
 <!--803443-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--803443--></AD_TEXTINTERFACES>
 
-<!--803452--><AD_TEXTINTERFACES>
-<!--803452-->  <AD_TEXTINTERFACES_ID><![CDATA[803452]]></AD_TEXTINTERFACES_ID>
-<!--803452-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--803452-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--803452-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--803452-->  <TEXT><![CDATA[Account code]]></TEXT>
-<!--803452-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--803452-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--803452--></AD_TEXTINTERFACES>
-
-<!--803455--><AD_TEXTINTERFACES>
-<!--803455-->  <AD_TEXTINTERFACES_ID><![CDATA[803455]]></AD_TEXTINTERFACES_ID>
-<!--803455-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--803455-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--803455-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--803455-->  <TEXT><![CDATA[Debt period]]></TEXT>
-<!--803455-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.fo]]></FILENAME>
-<!--803455-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--803455-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--803455--></AD_TEXTINTERFACES>
-
-<!--803456--><AD_TEXTINTERFACES>
-<!--803456-->  <AD_TEXTINTERFACES_ID><![CDATA[803456]]></AD_TEXTINTERFACES_ID>
-<!--803456-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--803456-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--803456-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--803456-->  <TEXT><![CDATA[Credit period]]></TEXT>
-<!--803456-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.fo]]></FILENAME>
-<!--803456-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--803456-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--803456--></AD_TEXTINTERFACES>
-
 <!--803476--><AD_TEXTINTERFACES>
 <!--803476-->  <AD_TEXTINTERFACES_ID><![CDATA[803476]]></AD_TEXTINTERFACES_ID>
 <!--803476-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4355,17 +4323,6 @@
 <!--804423-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--804423--></AD_TEXTINTERFACES>
 
-<!--804448--><AD_TEXTINTERFACES>
-<!--804448-->  <AD_TEXTINTERFACES_ID><![CDATA[804448]]></AD_TEXTINTERFACES_ID>
-<!--804448-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--804448-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--804448-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--804448-->  <TEXT><![CDATA[Business Partner:  ]]></TEXT>
-<!--804448-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.fo]]></FILENAME>
-<!--804448-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--804448-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--804448--></AD_TEXTINTERFACES>
-
 <!--804849--><AD_TEXTINTERFACES>
 <!--804849-->  <AD_TEXTINTERFACES_ID><![CDATA[804849]]></AD_TEXTINTERFACES_ID>
 <!--804849-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -6223,17 +6180,6 @@
 <!--806458-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--806458--></AD_TEXTINTERFACES>
 
-<!--806461--><AD_TEXTINTERFACES>
-<!--806461-->  <AD_TEXTINTERFACES_ID><![CDATA[806461]]></AD_TEXTINTERFACES_ID>
-<!--806461-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--806461-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--806461-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--806461-->  <TEXT><![CDATA[Serial No.]]></TEXT>
-<!--806461-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.html]]></FILENAME>
-<!--806461-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--806461-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--806461--></AD_TEXTINTERFACES>
-
 <!--806462--><AD_TEXTINTERFACES>
 <!--806462-->  <AD_TEXTINTERFACES_ID><![CDATA[806462]]></AD_TEXTINTERFACES_ID>
 <!--806462-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -20651,50 +20597,6 @@
 <!--7CFC4A52410F4B3D95DC8CB809F3B5DD-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7CFC4A52410F4B3D95DC8CB809F3B5DD--></AD_TEXTINTERFACES>
 
-<!--7F741BD03FD811DEAF7D17E49A046835--><AD_TEXTINTERFACES>
-<!--7F741BD03FD811DEAF7D17E49A046835-->  <AD_TEXTINTERFACES_ID><![CDATA[7F741BD03FD811DEAF7D17E49A046835]]></AD_TEXTINTERFACES_ID>
-<!--7F741BD03FD811DEAF7D17E49A046835-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--7F741BD03FD811DEAF7D17E49A046835-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--7F741BD03FD811DEAF7D17E49A046835-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--7F741BD03FD811DEAF7D17E49A046835-->  <TEXT><![CDATA[TRIAL BALANCE REPORT]]></TEXT>
-<!--7F741BD03FD811DEAF7D17E49A046835-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.fo]]></FILENAME>
-<!--7F741BD03FD811DEAF7D17E49A046835-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--7F741BD03FD811DEAF7D17E49A046835-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--7F741BD03FD811DEAF7D17E49A046835--></AD_TEXTINTERFACES>
-
-<!--7F76A2423FD811DEA58D9B03FA0B9696--><AD_TEXTINTERFACES>
-<!--7F76A2423FD811DEA58D9B03FA0B9696-->  <AD_TEXTINTERFACES_ID><![CDATA[7F76A2423FD811DEA58D9B03FA0B9696]]></AD_TEXTINTERFACES_ID>
-<!--7F76A2423FD811DEA58D9B03FA0B9696-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--7F76A2423FD811DEA58D9B03FA0B9696-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--7F76A2423FD811DEA58D9B03FA0B9696-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--7F76A2423FD811DEA58D9B03FA0B9696-->  <TEXT><![CDATA[Organization:  ]]></TEXT>
-<!--7F76A2423FD811DEA58D9B03FA0B9696-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.fo]]></FILENAME>
-<!--7F76A2423FD811DEA58D9B03FA0B9696-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--7F76A2423FD811DEA58D9B03FA0B9696-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--7F76A2423FD811DEA58D9B03FA0B9696--></AD_TEXTINTERFACES>
-
-<!--7F7AB9AE3FD811DEB0A9B7C320C67DD8--><AD_TEXTINTERFACES>
-<!--7F7AB9AE3FD811DEB0A9B7C320C67DD8-->  <AD_TEXTINTERFACES_ID><![CDATA[7F7AB9AE3FD811DEB0A9B7C320C67DD8]]></AD_TEXTINTERFACES_ID>
-<!--7F7AB9AE3FD811DEB0A9B7C320C67DD8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--7F7AB9AE3FD811DEB0A9B7C320C67DD8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--7F7AB9AE3FD811DEB0A9B7C320C67DD8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--7F7AB9AE3FD811DEB0A9B7C320C67DD8-->  <TEXT><![CDATA[  Accounting schema:  ]]></TEXT>
-<!--7F7AB9AE3FD811DEB0A9B7C320C67DD8-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.fo]]></FILENAME>
-<!--7F7AB9AE3FD811DEB0A9B7C320C67DD8-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--7F7AB9AE3FD811DEB0A9B7C320C67DD8-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--7F7AB9AE3FD811DEB0A9B7C320C67DD8--></AD_TEXTINTERFACES>
-
-<!--7F8238AA3FD811DEAA542360C0C6A322--><AD_TEXTINTERFACES>
-<!--7F8238AA3FD811DEAA542360C0C6A322-->  <AD_TEXTINTERFACES_ID><![CDATA[7F8238AA3FD811DEAA542360C0C6A322]]></AD_TEXTINTERFACES_ID>
-<!--7F8238AA3FD811DEAA542360C0C6A322-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--7F8238AA3FD811DEAA542360C0C6A322-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--7F8238AA3FD811DEAA542360C0C6A322-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--7F8238AA3FD811DEAA542360C0C6A322-->  <TEXT><![CDATA[ADD AND KEEP GOING...]]></TEXT>
-<!--7F8238AA3FD811DEAA542360C0C6A322-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.fo]]></FILENAME>
-<!--7F8238AA3FD811DEAA542360C0C6A322-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--7F8238AA3FD811DEAA542360C0C6A322-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--7F8238AA3FD811DEAA542360C0C6A322--></AD_TEXTINTERFACES>
-
 <!--7FF3469B9A49B90AE040007F01007549--><AD_TEXTINTERFACES>
 <!--7FF3469B9A49B90AE040007F01007549-->  <AD_TEXTINTERFACES_ID><![CDATA[7FF3469B9A49B90AE040007F01007549]]></AD_TEXTINTERFACES_ID>
 <!--7FF3469B9A49B90AE040007F01007549-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -20728,6 +20630,17 @@
 <!--819A66AA424F4169949E75C372C9938C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--819A66AA424F4169949E75C372C9938C--></AD_TEXTINTERFACES>
 
+<!--829E2B2EFCBA3DFBE040007F01013C0D--><AD_TEXTINTERFACES>
+<!--829E2B2EFCBA3DFBE040007F01013C0D-->  <AD_TEXTINTERFACES_ID><![CDATA[829E2B2EFCBA3DFBE040007F01013C0D]]></AD_TEXTINTERFACES_ID>
+<!--829E2B2EFCBA3DFBE040007F01013C0D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--829E2B2EFCBA3DFBE040007F01013C0D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--829E2B2EFCBA3DFBE040007F01013C0D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--829E2B2EFCBA3DFBE040007F01013C0D-->  <TEXT><![CDATA[Serial No / Attribute.]]></TEXT>
+<!--829E2B2EFCBA3DFBE040007F01013C0D-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.html]]></FILENAME>
+<!--829E2B2EFCBA3DFBE040007F01013C0D-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--829E2B2EFCBA3DFBE040007F01013C0D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--829E2B2EFCBA3DFBE040007F01013C0D--></AD_TEXTINTERFACES>
+
 <!--83138086E1BB4553A01995EE567C1BF5--><AD_TEXTINTERFACES>
 <!--83138086E1BB4553A01995EE567C1BF5-->  <AD_TEXTINTERFACES_ID><![CDATA[83138086E1BB4553A01995EE567C1BF5]]></AD_TEXTINTERFACES_ID>
 <!--83138086E1BB4553A01995EE567C1BF5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/referencedData/AD_USER.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-db/database/sourcedata/referencedData/AD_USER.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -8,6 +8,7 @@
 <!--0-->  <NAME><![CDATA[System]]></NAME>
 <!--0-->  <SUPERVISOR_ID><![CDATA[100]]></SUPERVISOR_ID>
 <!--0-->  <USERNAME><![CDATA[System]]></USERNAME>
+<!--0-->  <ISLOCKED><![CDATA[N]]></ISLOCKED>
 <!--0--></AD_USER>
 
 <!--100--><AD_USER>
@@ -20,6 +21,7 @@
 <!--100-->  <EMAILUSER><![CDATA[info]]></EMAILUSER>
 <!--100-->  <FIRSTNAME><![CDATA[Openbravo]]></FIRSTNAME>
 <!--100-->  <USERNAME><![CDATA[Openbravo]]></USERNAME>
+<!--100-->  <ISLOCKED><![CDATA[N]]></ISLOCKED>
 <!--100--></AD_USER>
 
 </data>
--- a/src-test/org/openbravo/test/dal/IssuesTest.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-test/org/openbravo/test/dal/IssuesTest.java	Wed Mar 31 18:09:01 2010 +0200
@@ -23,10 +23,12 @@
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.log4j.Logger;
 import org.hibernate.criterion.Expression;
+import org.openbravo.base.model.Reference;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.structure.IdentifierProvider;
 import org.openbravo.dal.core.OBContext;
@@ -44,6 +46,9 @@
 import org.openbravo.model.common.businesspartner.Location;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.invoice.InvoiceLine;
+import org.openbravo.model.common.order.Order;
+import org.openbravo.model.common.plm.Product;
+import org.openbravo.service.db.CallStoredProcedure;
 import org.openbravo.test.base.BaseTest;
 
 /**
@@ -66,6 +71,12 @@
  * - https://issues.openbravo.com/view.php?id=12106: record identifier returned from dal uses ' ' as
  * separator of columns, but normal pl-version uses ' - '
  * 
+ * - https://issues.openbravo.com/view.php?id=12702: Cycle in parent reference references then DAL
+ * throws stack over flow error
+ * 
+ * - https://issues.openbravo.com/view.php?id=12853: OBQuery count not working with a query with
+ * aliases
+ * 
  * @author mtaal
  * @author iperdomo
  */
@@ -74,10 +85,56 @@
   private static final Logger log = Logger.getLogger(IssuesTest.class);
 
   /**
+   * Tests https://issues.openbravo.com/view.php?id=12702
+   */
+  public void test12702() {
+    final Reference ref1 = new Reference();
+    final Reference ref2 = new Reference();
+    ref2.setModelImpl("ref2");
+    ref1.setParentReference(ref2);
+    ref2.setParentReference(ref1);
+    ref2.setBaseReference(true);
+    assertEquals("ref2", ref1.getModelImplementationClassName());
+    ref1.setBaseReference(true);
+    assertEquals(null, ref1.getModelImplementationClassName());
+    ref1.setBaseReference(false);
+    ref2.setBaseReference(false);
+    assertEquals(null, ref1.getModelImplementationClassName());
+  }
+
+  /**
    * Tests issue: https://issues.openbravo.com/view.php?id=12106
    */
   public void test12106() {
     setSystemAdministratorContext();
+    {
+      final List<Object> params = new ArrayList<Object>();
+      final String orderId = "1000001";
+      params.add("C_ORDER");
+      params.add(orderId);
+      params.add("en_US");
+      final String sqlIdentifier = (String) CallStoredProcedure.getInstance().call(
+          "AD_COLUMN_IDENTIFIER", params, null);
+      final Order order = OBDal.getInstance().get(Order.class, orderId);
+      final String dalIdentifier = IdentifierProvider.getInstance().getIdentifier(order);
+
+      // assert equals disabled for now as apparently in oracle the date returned is one day before
+      // postgress and java, at least in the testcase we have
+      // assertEquals(sqlIdentifier, dalIdentifier);
+    }
+    {
+      final List<Object> params = new ArrayList<Object>();
+      final String id = "1000000";
+      params.add("M_PRODUCT");
+      params.add(id);
+      params.add("en_US");
+      final String sqlIdentifier = (String) CallStoredProcedure.getInstance().call(
+          "AD_COLUMN_IDENTIFIER", params, null);
+      final String dalIdentifier = IdentifierProvider.getInstance().getIdentifier(
+          OBDal.getInstance().get(Product.class, id));
+      assertEquals(sqlIdentifier, dalIdentifier);
+    }
+
     final List<Module> modules = OBDal.getInstance().createCriteria(Module.class).list();
     for (Module module : modules) {
       assertTrue(module.getIdentifier().contains(IdentifierProvider.SEPARATOR));
@@ -224,4 +281,16 @@
     Location bpLoc = OBProvider.getInstance().get(Location.class);
     assertTrue(bpLoc.isActive());
   }
+
+  /**
+   * Tests issue: https://issues.openbravo.com/view.php?id=12853
+   */
+  public void test12853() {
+    setSystemAdministratorContext();
+    final OBQuery<Product> products = OBDal.getInstance().createQuery(Product.class,
+        " as e where e.name is not null");
+    products.setFilterOnReadableOrganization(false);
+    products.setFilterOnReadableClients(false);
+    assertTrue(products.count() > 0);
+  }
 }
\ No newline at end of file
--- a/src-test/org/openbravo/test/expression/EvaluationTest.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-test/org/openbravo/test/expression/EvaluationTest.java	Wed Mar 31 18:09:01 2010 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2010 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -29,6 +29,8 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.ad.datamodel.Table;
 import org.openbravo.model.ad.system.Client;
+import org.openbravo.model.common.order.Order;
+import org.openbravo.model.common.order.OrderLine;
 import org.openbravo.test.base.BaseTest;
 
 /**
@@ -67,4 +69,36 @@
     }
     assertTrue(found);
   }
+
+  /**
+   * Tests https://issues.openbravo.com/view.php?id=12575 It is neccessary to create a testcase for
+   * Transient Condition
+   */
+  public void testOrderEvaluation() {
+    setBigBazaarUserContext();
+    addReadWriteAccess(Order.class);
+    addReadWriteAccess(OrderLine.class);
+
+    final String script = "var orderLines = orderLineList.toArray();"
+        + "function compute() {for (var i = 0; i < orderLines.length; i++) {return orderLines[i].getLineNo() > 0;}; return false;};"
+        + "compute();";
+
+    final List<Order> orders = OBDal.getInstance().createCriteria(Order.class).list();
+    int cnt = 0;
+    for (final Order o : orders) {
+      if ((cnt % 2) == 0) {
+        o.getOrderLineList().clear();
+      }
+      final Boolean result = Evaluator.getInstance().evaluateBoolean(o, script);
+      Boolean check = false;
+      for (OrderLine ol : o.getOrderLineList()) {
+        check |= ol.getLineNo() > 0;
+      }
+      assertEquals(result, check);
+      cnt++;
+    }
+    assertTrue(cnt > 0);
+    // prevent orders really to be updated
+    OBDal.getInstance().rollbackAndClose();
+  }
 }
\ No newline at end of file
--- a/src-test/org/openbravo/test/system/SystemValidatorTest.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-test/org/openbravo/test/system/SystemValidatorTest.java	Wed Mar 31 18:09:01 2010 +0200
@@ -70,6 +70,10 @@
     setSystemAdministratorContext();
     for (Module module : OBDal.getInstance().createQuery(Module.class, "").list()) {
       final DatabaseValidator databaseValidator = new DatabaseValidator();
+      if (module.getModuleDBPrefixList().isEmpty()) {
+        // ignore these ones
+        continue;
+      }
       databaseValidator.setDatabase(createDatabaseObject(module));
       databaseValidator.setValidateModule(module);
       final SystemValidationResult result = databaseValidator.validate();
--- a/src-wad/src/org/openbravo/wad/ComboReloads.javaxml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-wad/src/org/openbravo/wad/ComboReloads.javaxml	Wed Mar 31 18:09:01 2010 +0200
@@ -63,7 +63,7 @@
     <FIELDS_TMP id="sectionDetail">
       if (CalloutHelper.commandInCommandList(command, <FIELD_TMP id="fieldColumnsName">"xx"</FIELD_TMP>)) {
         if (!isFirst) resultado.append(", \n");
-        comboTableData = new ComboTableData(vars, this, "<FIELD_TMP id="fieldReference1">17</FIELD_TMP>", "<FIELD_TMP id="fieldColumnName1">name</FIELD_TMP>", "<FIELD_TMP id="fieldReferenceValue1">name</FIELD_TMP>", "<FIELD_TMP id="fieldValidation1">name</FIELD_TMP>", <FIELD_TMP id="fieldOrgCode">xxorgcode</FIELD_TMP>, Utility.getContext(this, vars, "#User_Client", windowId), 0);
+        comboTableData = new ComboTableData(vars, this, "<FIELD_TMP id="fieldReference1">17</FIELD_TMP>", "<FIELD_TMP id="fieldColumnName1">name</FIELD_TMP>", "<FIELD_TMP id="fieldReferenceValue1">name</FIELD_TMP>", "<FIELD_TMP id="fieldValidation1">name</FIELD_TMP>", <FIELD_TMP id="fieldOrgCode">xxorgcode</FIELD_TMP>, <FIELD_TMP id="fieldClientCode">xxclientcode</FIELD_TMP>, 0);
         if (calledFromSearch) {
           comboTableData.fillParametersFromSearch("", windowId);
           resultField = "inpParam<FIELD_TMP id="fieldColumnName1">name</FIELD_TMP>";
--- a/src-wad/src/org/openbravo/wad/ComboReloads.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-wad/src/org/openbravo/wad/ComboReloads.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -33,6 +33,7 @@
   <FIELD id="fieldMethod2">htmltexttrl</FIELD>
   <FIELD id="fieldSelectFields1">xmltext</FIELD>
   <FIELD id="fieldOrgCode">orgcode</FIELD>
+  <FIELD id="fieldClientCode">clientcode</FIELD>
   <FIELD id="fieldSelectFields2">xmltexttrl</FIELD>
   <FIELD id="fieldReference1">reference</FIELD>
   <FIELD id="fieldColumnName1">name</FIELD>
--- a/src-wad/src/org/openbravo/wad/Fields_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-wad/src/org/openbravo/wad/Fields_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2009 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -36,7 +36,7 @@
         isParent, '' as ACCESSLEVEL, ad_field.isreadonly, '' as issecondarykey, ad_field.showInRelation, ad_field.isEncrypted,
         ad_field.SORTNO, ad_column.istranslated, '' as id, '' as htmltext, '' as htmltexttrl, '' as xmltexttrl, '' as tablenametrl, 
         0 AS NOWRAP, ad_column.isEncrypted AS isColumnEncrypted, ad_column.isDesencryptable, ad_reference_value_id, ad_column.ad_val_rule_id, '' AS isjasper, ad_field.isactive, '' as AD_Tab_ID, '' as parent_tab_name, '' as orgcode,
-        '' as tableModule, '' as columnModule
+        '' as tableModule, '' as columnModule, '' as clientcode
       FROM ad_column left join ad_element on ad_column.ad_element_id = ad_element.ad_element_id,
            ad_field,  ad_table
       WHERE ad_field.ad_column_id = ad_column.ad_column_id 
--- a/src-wad/src/org/openbravo/wad/Wad.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src-wad/src/org/openbravo/wad/Wad.java	Wed Mar 31 18:09:01 2010 +0200
@@ -2964,8 +2964,17 @@
             else
               data[i].orgcode = "Utility.getReferenceableOrg(this, vars, parentOrg, windowId, "
                   + accesslevel + ")";
-          } else
+          } else {
             data[i].orgcode = "Utility.getReferenceableOrg(vars, vars.getStringParameter(\"inpadOrgId\"))";
+          }
+
+          // Do not add client 0 for client combo, but do it for the rest of combos
+          if (data[i].name.equalsIgnoreCase("AD_Client_ID")) {
+            data[i].clientcode = "Utility.getContext(this, vars, \"#User_Client\", windowId, "
+                + accesslevel + ")";
+          } else {
+            data[i].clientcode = "Utility.getContext(this, vars, \"#User_Client\", windowId)";
+          }
 
           if (data[i].reference.equals("17")) { // List
             data[i].tablename = "List";
--- a/src/org/openbravo/base/model/Reference.hbm.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/base/model/Reference.hbm.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -30,6 +30,7 @@
 		<property name="name" not-null="true"/>
         <property name="modelImpl" column="model_impl"/>
         <many-to-one name="parentReference" column="parentreference_id"/>
+        <property name="baseReference" type="org.openbravo.base.session.OBYesNoType" not-null="true" column="isbasereference"/>               
         		
 		<property name="updated"/>
 		
--- a/src/org/openbravo/base/model/Reference.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/base/model/Reference.java	Wed Mar 31 18:09:01 2010 +0200
@@ -109,6 +109,15 @@
   private String modelImpl;
   private DomainType domainType;
   private Reference parentReference;
+  private boolean baseReference;
+
+  public boolean isBaseReference() {
+    return baseReference;
+  }
+
+  public void setBaseReference(boolean baseReference) {
+    this.baseReference = baseReference;
+  }
 
   public boolean isPrimitive() {
     return getDomainType() instanceof PrimitiveDomainType;
@@ -143,7 +152,9 @@
    * @return the modelImpl or if not set, the value set in the parent.
    */
   public String getModelImplementationClassName() {
-    if (getModelImpl() == null && getParentReference() != null) {
+    // only call the parent if the parent is a base reference and this is not a basereference
+    if (getModelImpl() == null && !isBaseReference() && getParentReference() != null
+        && getParentReference().isBaseReference()) {
       return getParentReference().getModelImplementationClassName();
     }
     return getModelImpl();
--- a/src/org/openbravo/base/secureApp/Advise.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/base/secureApp/Advise.html	Wed Mar 31 18:09:01 2010 +0200
@@ -15,12 +15,31 @@
 <title>Warning</title>
 <link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
 <link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS"/>
+<script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script>
 <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
+<script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
 <script language="JavaScript" type="text/javascript" id="paramDirectory">
 var baseDirectory = "../../../../../web/";
 </script>
+<script language="JavaScript" type="text/javascript">
+  function onLoadDo(){
+    this.windowTables = new Array(
+      new windowTableId('client')
+    );
+    setWindowTableParentElement();
+    enableShortcuts('edition');
+    setBrowserAutoComplete(false);
+    resizeArea();
+    updateMenuIcon('buttonMenu');
+    setWindowElementFocus('firstElement');
+  }
+
+  function onResizeDo(){
+    resizeArea(true);
+  }
+</script>
 </head>
-<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="resizeArea();" onresize="resizeArea(true);">
+<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="onLoadDo();" onresize="onResizeDo();">
 <form name="form1" method="post" action="" >
   <table height="100%" border="0" cellpadding="0" cellspacing="0" id="main">
     <tr>
@@ -75,7 +94,7 @@
           <table cellpadding="0" cellspacing="0" class="Main_ContentPane_NavBar" id="tdtopNavButtons">
             <tr class="Main_NavBar_bg">
               <td class="Main_NavBar_LeftButton_cell">
-                  <a href="#" id="botonAtras" onclick="history.back();return false;" onmouseover="window.status='Back';return true;" onmouseout="window.status='';return true;"  target="_parent"> 
+                  <a href="#" id="buttonBack" onclick="goToPreviousPage();return false;" onmouseover="window.status='Back';return true;" onmouseout="window.status='';return true;"  target="_parent"> 
                     <img src="../../../../../web/images/blank.gif" class="Main_NavBar_LeftButton_Icon Main_NavBar_LeftButton_Icon_back" border="0" />
                   </a>
               </td>
@@ -205,7 +224,7 @@
                     <td colspan="6" align="center" class="Button_CenterAlign_ContentCell">
                       <button type="button" 
                         class="ButtonLink" 
-                        onclick="history.back();return false;" 
+                        onclick="goToPreviousPage();return false;" 
                         onfocus="buttonEvent('onfocus', this); window.status='Back'; return true;" 
                         onblur="buttonEvent('onblur', this);" 
                         onkeyup="buttonEvent('onkeyup', this);" 
--- a/src/org/openbravo/base/secureApp/Error.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/base/secureApp/Error.html	Wed Mar 31 18:09:01 2010 +0200
@@ -17,16 +17,27 @@
 <link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
 <link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS"/>
 <script language="JavaScript" type="text/javascript" src="../../../../../web/js/callOut.js"></script>
+<script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script>
 <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
+<script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
 <script language="JavaScript" type="text/javascript" id="paramDirectory">
 var baseDirectory = "../../../../../web/";
 </script>
+
 <script language="JavaScript" type="text/javascript">
-  function onLoadDo() {
-    try{
+  function onLoadDo(){
+    this.windowTables = new Array(
+      new windowTableId('client')
+    );
+    setWindowTableParentElement();
+    enableShortcuts('edition');
+    setBrowserAutoComplete(false);
+    try {
       setgWaitingCallOut(false);
-    }catch(e){}
+    } catch(e) {}
     resizeArea();
+    updateMenuIcon('buttonMenu');
+    setWindowElementFocus('firstElement');
   }
 
   function onResizeDo(){
@@ -90,7 +101,7 @@
           <table cellpadding="0" cellspacing="0" class="Main_ContentPane_NavBar" id="tdtopNavButtons">
             <tr class="Main_NavBar_bg">
               <td class="Main_NavBar_LeftButton_cell">
-                  <a href="#" id="botonAtras" onclick="history.back();return false;" onmouseover="window.status='Back';return true;" onmouseout="window.status='';return true;"  target="_parent"> 
+                  <a href="#" id="buttonBack" onclick="goToPreviousPage();return false;" onmouseover="window.status='Back';return true;" onmouseout="window.status='';return true;"  target="_parent"> 
                     <img src="../../../../../web/images/blank.gif" class="Main_NavBar_LeftButton_Icon Main_NavBar_LeftButton_Icon_back" border="0" />
                   </a>
               </td>
@@ -219,7 +230,7 @@
                     <td colspan="6" align="center" class="Button_CenterAlign_ContentCell">
                       <button type="button" 
                         class="ButtonLink" 
-                        onclick="history.back();return false;" 
+                        onclick="goToPreviousPage();return false;" 
                         onfocus="buttonEvent('onfocus', this); window.status='Back'; return true;" 
                         onblur="buttonEvent('onblur', this);" 
                         onkeyup="buttonEvent('onkeyup', this);" 
--- a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java	Wed Mar 31 18:09:01 2010 +0200
@@ -84,8 +84,11 @@
   private String servletClass = this.getClass().getName();
 
   private class Variables extends VariablesHistory {
+    private String loggingIn;
+
     public Variables(HttpServletRequest request) {
       super(request);
+      loggingIn = getSessionValue("#loggingIn");
     }
 
     public void updateHistory(HttpServletRequest request) {
@@ -105,6 +108,10 @@
       final String sufix = getCurrentHistoryIndex();
       setSessionValue("reqHistory.command" + sufix, strCommand);
     }
+
+    public boolean isLoggingIn() {
+      return loggingIn == null || loggingIn.equals("") || loggingIn.equals("Y");
+    }
   }
 
   @Override
@@ -163,6 +170,7 @@
   public void service(HttpServletRequest request, HttpServletResponse response) throws IOException,
       ServletException {
     Variables variables = new Variables(request);
+
     // VariablesSecureApp vars = new VariablesSecureApp(request);
 
     // bdErrorGeneral(response, "Error", "No access");
@@ -202,7 +210,8 @@
 
       boolean loggedOK = false;
 
-      if (!variables.getDBSession().equals("")) {
+      if (!variables.isLoggingIn()) {
+        // log in process is completed, check whether the session in db is still active
         loggedOK = SeguridadData.loggedOK(this, variables.getDBSession());
         if (!loggedOK) {
           logout(request, response);
@@ -309,8 +318,9 @@
             logout(request, response);
             return;
           }
-        } else
+        } else {
           variables.updateHistory(request);
+        }
       }
       if (log4j.isDebugEnabled()) {
         log4j.debug("Call to HttpBaseServlet.service");
@@ -389,7 +399,9 @@
               // the hash of the post data
               if (!hash.equals(vars1.getPostDataHash())) {
                 request.setAttribute("autosave", true);
-                if (vars1.getCommand().indexOf("BUTTON") != -1)
+                if (vars1.getCommand().indexOf("BUTTON") != -1
+                    || !vars1.getStringParameter("inpProcessId").equals(""))
+                  // Adding pop-up window attribute to close the window on failed auto-save
                   request.setAttribute("popupWindow", true);
                 // forward request
                 if (!forwardRequest(request, response)) {
@@ -1037,9 +1049,20 @@
       String strOrganizacion) throws ServletException {
     final SessionLogin sl = new SessionLogin(request, strCliente, strOrganizacion, vars
         .getSessionValue("#AD_User_ID"));
+
+    // session_ID should have been created in LoginHandler
+    String sessionId = vars.getDBSession();
     sl.setServerUrl(strDireccion);
-    sl.save(this);
-    vars.setSessionValue("#AD_Session_ID", sl.getSessionID());
+    sl.setSessionID(sessionId);
+
+    if (sessionId == null || sessionId.equals("")) {
+      sl.setStatus("S");
+      sl.save();
+      vars.setSessionValue("#AD_Session_ID", sl.getSessionID());
+    }
+
+    // Logging process is finish, remove logging flag
+    vars.setSessionValue("#loggingIn", "N");
   }
 
   protected void renderJR(VariablesSecureApp variables, HttpServletResponse response,
--- a/src/org/openbravo/base/secureApp/LoginHandler.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/base/secureApp/LoginHandler.java	Wed Mar 31 18:09:01 2010 +0200
@@ -18,12 +18,15 @@
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
 
 import org.openbravo.base.HttpBaseServlet;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.erpCommon.obps.ActivationKey;
+import org.openbravo.erpCommon.security.SessionLogin;
 import org.openbravo.erpCommon.utility.Utility;
+import org.openbravo.model.ad.access.Session;
 import org.openbravo.model.ad.module.Module;
 import org.openbravo.model.ad.system.Client;
 import org.openbravo.model.ad.system.SystemInformation;
@@ -51,31 +54,82 @@
     // Empty session
     req.getSession(true).setAttribute("#Authenticated_user", null);
 
-    if (vars.getStringParameter("user").equals("")) {
-      res.sendRedirect(res.encodeRedirectURL(strDireccion + "/security/Login_F1.html"));
-    } else {
-      final String strUser = vars.getRequiredStringParameter("user");
-      final String strPass = vars.getStringParameter("password");
-      final String strUserAuth = LoginUtils.getValidUserId(myPool, strUser, strPass);
+    final String strUser = vars.getStringParameter("user");
 
-      if (strUserAuth != null) {
-        req.getSession(true).setAttribute("#Authenticated_user", strUserAuth);
-        checkLicenseAndGo(res, vars, strUserAuth);
+    OBContext.enableAsAdminContext();
+    try {
+      Client systemClient = OBDal.getInstance().get(Client.class, "0");
+
+      String language = systemClient.getLanguage().getLanguage();
+
+      if (strUser.equals("")) {
+        res.sendRedirect(res.encodeRedirectURL(strDireccion + "/security/Login_F1.html"));
       } else {
-        Client systemClient = OBDal.getInstance().get(Client.class, "0");
+        final String strPass = vars.getStringParameter("password");
+        final String strUserAuth = LoginUtils.getValidUserId(myPool, strUser, strPass);
 
-        String failureTitle = Utility.messageBD(this, "IDENTIFICATION_FAILURE_TITLE", systemClient
-            .getLanguage().getLanguage());
-        String failureMessage = Utility.messageBD(this, "IDENTIFICATION_FAILURE_MSG", systemClient
-            .getLanguage().getLanguage());
+        String sessionId = createDBSession(req, strUser, strUserAuth);
+        if (strUserAuth != null) {
+          HttpSession session = req.getSession(true);
+          session.setAttribute("#Authenticated_user", strUserAuth);
+          session.setAttribute("#AD_SESSION_ID", sessionId);
+          // #logginigIn attribute is used in HttpSecureAppServlet to determine whether the logging
+          // process is complete or not. At this stage is not complete, we only have a user ID, but
+          // no the rest of session info: client, org, role...
+          session.setAttribute("#LOGGINGIN", "Y");
+          log4j.debug("Correct user/password. Username: " + strUser + " - Session ID:" + sessionId);
+          checkLicenseAndGo(res, vars, strUserAuth, sessionId);
+        } else {
+          // strUserAuth can be null because a failed user/password or because the user is locked
+          String failureTitle;
+          String failureMessage;
+          if (LoginUtils.checkUserPassword(myPool, strUser, strPass) == null) {
+            log4j
+                .debug("Failed user/password. Username: " + strUser + " - Session ID:" + sessionId);
+            failureTitle = Utility.messageBD(this, "IDENTIFICATION_FAILURE_TITLE", language);
+            failureMessage = Utility.messageBD(this, "IDENTIFICATION_FAILURE_MSG", language);
+          } else {
+            failureTitle = Utility.messageBD(this, "LOCKED_USER_TITLE", language);
+            failureMessage = strUser + " " + Utility.messageBD(this, "LOCKED_USER_MSG", language);
+            log4j.debug(strUser + " is locked cannot activate session ID " + sessionId);
+            updateDBSession(sessionId, false, "LU");
+          }
+          goToRetry(res, vars, failureMessage, failureTitle, "Error", "../security/Login_FS.html");
+        }
+      }
+    } finally {
+      OBContext.resetAsAdminContext();
+    }
+  }
 
-        goToRetry(res, vars, failureMessage, failureTitle, "Error", "../security/Login_FS.html");
+  /**
+   * Stores session in DB. If the user is valid, it is inserted in the createdBy column, if not user
+   * 0 is used.
+   */
+  private String createDBSession(HttpServletRequest req, String strUser, String strUserAuth) {
+    try {
+      String usr = strUserAuth == null ? "0" : strUserAuth;
+
+      final SessionLogin sl = new SessionLogin(req, "0", "0", usr);
+
+      if (strUserAuth == null) {
+        sl.setStatus("F");
+      } else {
+        sl.setStatus("S");
       }
+
+      sl.setUserName(strUser);
+      sl.setServerUrl(strDireccion);
+      sl.save();
+      return sl.getSessionID();
+    } catch (Exception e) {
+      log4j.error("Error creating DB session", e);
+      return null;
     }
   }
 
   private void checkLicenseAndGo(HttpServletResponse res, VariablesSecureApp vars,
-      String strUserAuth) throws IOException {
+      String strUserAuth, String sessionId) throws IOException {
     OBContext.enableAsAdminContext();
     try {
       ActivationKey ak = new ActivationKey();
@@ -98,12 +152,14 @@
       // We check if there is a Openbravo Professional Subscription restriction in the license,
       // or if the last rebuild didn't go well. If any of these are true, then the user is
       // allowed to login only as system administrator
-      switch (ak.checkOPSLimitations(vars.getDBSession())) {
+      switch (ak.checkOPSLimitations(sessionId)) {
       case NUMBER_OF_CONCURRENT_USERS_REACHED:
         String msg = Utility.messageBD(myPool, "NUMBER_OF_CONCURRENT_USERS_REACHED", vars
             .getLanguage());
         String title = Utility.messageBD(myPool, "NUMBER_OF_CONCURRENT_USERS_REACHED_TITLE", vars
             .getLanguage());
+        log4j.warn("Concurrent Users Reached - Session: " + sessionId);
+        updateDBSession(sessionId, msgType.equals("Warning"), "CUR");
         goToRetry(res, vars, msg, title, msgType, action);
         return;
       case NUMBER_OF_SOFT_USERS_REACHED:
@@ -111,21 +167,28 @@
         title = Utility.messageBD(myPool, "NUMBER_OF_SOFT_USERS_REACHED_TITLE", vars.getLanguage());
         action = "../security/Menu.html";
         msgType = "Warning";
+        log4j.warn("Soft Users Reached - Session: " + sessionId);
+        updateDBSession(sessionId, true, "SUR");
         goToRetry(res, vars, msg, title, msgType, action);
         return;
       case OPS_INSTANCE_NOT_ACTIVE:
         msg = Utility.messageBD(myPool, "OPS_INSTANCE_NOT_ACTIVE", vars.getLanguage());
         title = Utility.messageBD(myPool, "OPS_INSTANCE_NOT_ACTIVE_TITLE", vars.getLanguage());
+        log4j.warn("Innactive OBPS instance - Session: " + sessionId);
+        updateDBSession(sessionId, msgType.equals("Warning"), "IOBPS");
         goToRetry(res, vars, msg, title, msgType, action);
         return;
       case MODULE_EXPIRED:
         msg = Utility.messageBD(myPool, "OPS_MODULE_EXPIRED", vars.getLanguage());
         title = Utility.messageBD(myPool, "OPS_MODULE_EXPIRED_TITLE", vars.getLanguage());
         StringBuffer expiredMoudules = new StringBuffer();
+        log4j.warn("Expired modules - Session: " + sessionId);
         for (Module module : ak.getExpiredInstalledModules()) {
           expiredMoudules.append("<br/>").append(module.getName());
+          log4j.warn("  module:" + module.getName());
         }
         msg += expiredMoudules.toString();
+        updateDBSession(sessionId, msgType.equals("Warning"), "ME");
         goToRetry(res, vars, msg, title, msgType, action);
         return;
       }
@@ -139,13 +202,30 @@
           || sysInfo.getSystemStatus().equals("RB50")) {
         String msg = Utility.messageBD(myPool, "TOMCAT_NOT_RESTARTED", vars.getLanguage());
         String title = Utility.messageBD(myPool, "TOMCAT_NOT_RESTARTED_TITLE", vars.getLanguage());
+        log4j.warn("Tomcat not restarted");
+        updateDBSession(sessionId, true, "RT");
         goToRetry(res, vars, msg, title, "Warning", "../security/Menu.html");
       } else {
         String msg = Utility.messageBD(myPool, "LAST_BUILD_FAILED", vars.getLanguage());
         String title = Utility.messageBD(myPool, "LAST_BUILD_FAILED_TITLE", vars.getLanguage());
+        updateDBSession(sessionId, msgType.equals("Warning"), "LBF");
         goToRetry(res, vars, msg, title, msgType, action);
       }
+    } finally {
+      OBContext.resetAsAdminContext();
+    }
 
+  }
+
+  private void updateDBSession(String sessionId, boolean sessionActive, String status) {
+    try {
+      OBContext.enableAsAdminContext();
+      Session session = OBDal.getInstance().get(Session.class, sessionId);
+      session.setSessionActive(sessionActive);
+      session.setLoginStatus(status);
+      OBDal.getInstance().flush();
+    } catch (Exception e) {
+      log4j.error("Error updating session in DB", e);
     } finally {
       OBContext.resetAsAdminContext();
     }
@@ -194,4 +274,5 @@
   public String getServletInfo() {
     return "User-login control Servlet";
   } // end of getServletInfo() method
+
 }
--- a/src/org/openbravo/base/secureApp/LoginUtils.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/base/secureApp/LoginUtils.java	Wed Mar 31 18:09:01 2010 +0200
@@ -34,6 +34,8 @@
    * Returns a userId which matches the login and password. If no user is found then null is
    * returned. The combination of login and password is used to find the user.
    * 
+   * Blocking users is taking into account
+   * 
    * Note that only active users are returned.
    * 
    * @param connectionProvider
@@ -43,17 +45,43 @@
    *          the login
    * @param unHashedPassword
    *          the password, the unhashed password as it is entered by the user.
-   * @return the user id or null if no user could be found.
+   * @return the user id or null if no user could be found or the user is locked.
    * @see FormatUtilities#sha1Base64(String)
    */
   public static String getValidUserId(ConnectionProvider connectionProvider, String login,
       String unHashedPassword) {
     try {
+      // Deley response and check for locked user
+      UserLock lockSettings = new UserLock(login);
+      lockSettings.delayResponse();
+      if (lockSettings.isLockedUser()) {
+        return null;
+      }
+
+      final String userId = checkUserPassword(connectionProvider, login, unHashedPassword);
+      if (userId == null) {
+        lockSettings.addFail();
+      }
+      return userId;
+    } catch (final Exception e) {
+      throw new OBException(e);
+    }
+  }
+
+  /**
+   * Similar to {@link LoginUtils#getValidUserId(ConnectionProvider, String, String)} but not
+   * blocking user accounts.
+   * 
+   */
+  public static String checkUserPassword(ConnectionProvider connectionProvider, String login,
+      String unHashedPassword) {
+    try {
       final String hashedPassword = FormatUtilities.sha1Base64(unHashedPassword);
       final String userId = SeguridadData.valido(connectionProvider, login, hashedPassword);
       if (userId.equals("-1")) {
         return null;
       }
+
       return userId;
     } catch (final Exception e) {
       throw new OBException(e);
@@ -224,4 +252,5 @@
 
     return true;
   }
+
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/base/secureApp/UserLock.java	Wed Mar 31 18:09:01 2010 +0200
@@ -0,0 +1,192 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2010 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.base.secureApp;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.apache.log4j.Logger;
+import org.hibernate.Query;
+import org.hibernate.criterion.Expression;
+import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBCriteria;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.ad.access.User;
+
+/**
+ * Utility class to manage user locking and time delays
+ * 
+ */
+public class UserLock {
+  private static Logger log4j = Logger.getLogger(UserLock.class);
+  private int delay;
+  private int lockAfterTrials;
+
+  private String userName;
+  private int numberOfFails;
+  private User user;
+
+  public UserLock(String userName) {
+    // Read Openbravo.properties for locking configuration. If it's properly configured, it tries
+    // to read from the properties file in the source directory not to force to deploy the file to
+    // change configuration.
+    String sourcePath = OBPropertiesProvider.getInstance().getOpenbravoProperties().getProperty(
+        "source.path", null);
+    Properties obProp;
+    if (sourcePath != null && new File(sourcePath + "/config/Openbravo.properties").exists()) {
+      try {
+        InputStream obPropFile = new FileInputStream(new File(sourcePath
+            + "/config/Openbravo.properties"));
+        obProp = new Properties();
+        obProp.load(obPropFile);
+      } catch (Exception e) {
+        log4j.error("Error reading properties", e);
+        obProp = OBPropertiesProvider.getInstance().getOpenbravoProperties();
+      }
+    } else {
+      obProp = OBPropertiesProvider.getInstance().getOpenbravoProperties();
+    }
+    String propInc = obProp.getProperty("login.trial.delay.increment", "0");
+    String propMax = obProp.getProperty("login.trial.delay.max", "0");
+    String propLock = obProp.getProperty("login.trial.user.lock", "0");
+    if (propInc.equals("")) {
+      propInc = "0";
+    }
+    if (propMax.equals("")) {
+      propMax = "0";
+    }
+    if (propLock.equals("")) {
+      propLock = "0";
+    }
+    int delayInc;
+    int delayMax;
+    try {
+      delayInc = Integer.parseInt(propInc);
+    } catch (NumberFormatException e) {
+      log4j.error("Could not set login.trial.delay.increment property " + propInc, e);
+      delayInc = 0;
+    }
+    try {
+      delayMax = Integer.parseInt(propMax);
+    } catch (NumberFormatException e) {
+      log4j.error("Could not set login.trial.delay.max property " + propMax, e);
+      delayMax = 0;
+    }
+    try {
+      lockAfterTrials = Integer.parseInt(propLock);
+    } catch (NumberFormatException e) {
+      log4j.error("Could not set login.trial.user.lock property" + propMax, e);
+      lockAfterTrials = 0;
+    }
+
+    this.userName = userName;
+    setUser();
+    // Count how many times this user has failed without success
+    StringBuilder hql = new StringBuilder();
+    hql.append("select count(*)");
+    hql.append("  from ADSession s ");
+    hql.append(" where s.loginStatus='F'");
+    hql.append("   and s.username = :name");
+    hql.append("   and s.creationDate > (select coalesce(max(s1.creationDate), s.creationDate-1)");
+    hql.append("                           from ADSession s1");
+    hql.append("                          where s1.username = s.username");
+    hql.append("                            and s1.loginStatus!='F')");
+    Query q = OBDal.getInstance().getSession().createQuery(hql.toString());
+    q.setParameter("name", userName);
+
+    numberOfFails = ((Long) q.list().get(0)).intValue();
+    if (numberOfFails == 0) {
+      delay = 0;
+      return;
+    }
+
+    delay = delayInc * numberOfFails;
+    if (delayMax > 0 && delay > delayMax) {
+      delay = delayMax;
+    }
+
+  }
+
+  private void setUser() {
+    OBContext.enableAsAdminContext();
+    try {
+      OBCriteria<User> obCriteria = OBDal.getInstance().createCriteria(User.class);
+      obCriteria.add(Expression.eq(User.PROPERTY_USERNAME, userName));
+      obCriteria.setFilterOnReadableClients(false);
+      obCriteria.setFilterOnReadableOrganization(false);
+
+      user = (User) obCriteria.uniqueResult();
+    } finally {
+      OBContext.resetAsAdminContext();
+    }
+  }
+
+  /**
+   * A new failed login attempt, increments the count of fails and blocks the user if needed
+   */
+  public void addFail() {
+    numberOfFails++;
+    boolean lockUser = (lockAfterTrials != 0) && (numberOfFails > lockAfterTrials);
+    log4j.debug("lock: " + lockUser + " -lock after:" + lockAfterTrials + "- fails:"
+        + numberOfFails + " - user:" + user);
+    if (lockUser) {
+      // Try to lock the user in database
+      delay = 0;
+      if (user != null) {
+        try {
+          OBContext.setAdminContext();
+
+          user.setLocked(true);
+          OBDal.getInstance().flush();
+          log4j.warn(userName + " is locked after " + numberOfFails + " failed logins.");
+          return;
+        } finally {
+          OBContext.resetAsAdminContext();
+        }
+      }
+    }
+  }
+
+  public boolean isLockedUser() {
+    if (lockAfterTrials == 0) {
+      return false;
+    }
+    return user != null && user.isLocked();
+  }
+
+  /**
+   * Delays the response of checking in case it is configured in Openbravo.properties
+   * (login.trial.delay.increment and login.trial.delay.max), and the current username has login
+   * attempts failed.
+   */
+  public void delayResponse() {
+    if (delay > 0) {
+      log4j.debug("Delaying response " + delay + " seconds because of the previous login failed.");
+      try {
+        Thread.sleep(delay * 1000);
+      } catch (InterruptedException e) {
+        log4j.error("Error delaying login response", e);
+      }
+    }
+  }
+}
--- a/src/org/openbravo/base/secureApp/VariablesHistory.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/base/secureApp/VariablesHistory.java	Wed Mar 31 18:09:01 2010 +0200
@@ -23,6 +23,7 @@
   private String role;
   private String language;
   private String dbSessionID;
+
   private static Logger log4j = Logger.getLogger(VariablesHistory.class);
 
   public VariablesHistory(HttpServletRequest request) {
@@ -107,4 +108,5 @@
   String getDBSession() {
     return dbSessionID;
   }
+
 }
--- a/src/org/openbravo/base/structure/IdentifierProvider.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/base/structure/IdentifierProvider.java	Wed Mar 31 18:09:01 2010 +0200
@@ -19,6 +19,8 @@
 
 package org.openbravo.base.structure;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 
 import org.openbravo.base.model.Entity;
@@ -26,6 +28,7 @@
 import org.openbravo.base.model.Property;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.provider.OBSingleton;
+import org.openbravo.base.session.OBPropertiesProvider;
 
 /**
  * Provides the identifier/title of an object using the {@link Entity#getIdentifierProperties()
@@ -53,6 +56,9 @@
     IdentifierProvider.instance = instance;
   }
 
+  private SimpleDateFormat dateFormat = null;
+  private SimpleDateFormat dateTimeFormat = null;
+
   /**
    * Returns the identifier of the object. The identifier is computed using the identifier
    * properties of the Entity of the object.
@@ -79,7 +85,13 @@
       if (sb.length() > 0) {
         sb.append(SEPARATOR);
       }
-      final Object value = dob.get(identifier.getName());
+      final Property property = ((BaseOBObject) dob).getEntity().getProperty(identifier.getName());
+      Object value = dob.get(identifier.getName());
+
+      // TODO: add number formatting...
+      if (property.isDate() || property.isDatetime()) {
+        value = formatDate(property, (Date) value);
+      }
 
       if (value instanceof Identifiable && identifyDeep) {
         sb.append(getIdentifier(value, false));
@@ -96,4 +108,23 @@
   protected String getSeparator() {
     return SEPARATOR;
   }
+
+  private synchronized String formatDate(Property property, Date date) {
+    if (date == null) {
+      return "";
+    }
+    if (dateFormat == null) {
+      final String dateFormatString = OBPropertiesProvider.getInstance().getOpenbravoProperties()
+          .getProperty("dateFormat.java");
+      final String dateTimeFormatString = OBPropertiesProvider.getInstance()
+          .getOpenbravoProperties().getProperty("dateTimeFormat.java");
+      dateFormat = new SimpleDateFormat(dateFormatString);
+      dateTimeFormat = new SimpleDateFormat(dateTimeFormatString);
+    }
+    if (property.isDatetime()) {
+      return dateTimeFormat.format(date);
+    } else {
+      return dateFormat.format(date);
+    }
+  }
 }
\ No newline at end of file
--- a/src/org/openbravo/dal/core/DalUtil.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/dal/core/DalUtil.java	Wed Mar 31 18:09:01 2010 +0200
@@ -108,7 +108,7 @@
       // NOTE disabled for now, there is one special case: AD_Column.IDENTIFIER
       // which is NOT HANDLED
       if (part.equals(IDENTIFIER_PART_PATH)) {
-        return bob.getIdentifier();
+        return currentBob.getIdentifier();
       }
       final Entity currentEntity = currentBob.getEntity();
       if (!currentEntity.hasProperty(part)) {
--- a/src/org/openbravo/dal/service/OBQuery.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/dal/service/OBQuery.java	Wed Mar 31 18:09:01 2010 +0200
@@ -52,6 +52,8 @@
 public class OBQuery<E extends BaseOBObject> {
   private static final Logger log = Logger.getLogger(OBQuery.class);
 
+  private static final String FROM = " from ";
+
   private String whereAndOrderBy;
   private Entity entity;
   private List<Object> parameters;
@@ -134,8 +136,13 @@
    * @return the number of objects in the database taking into account the where and orderby clause
    */
   public int count() {
-    final Query qry = getSession().createQuery(
-        "select count(*) " + stripOrderBy(createQueryString()));
+    // add a space because the FROM constant also starts with a space
+    String qryStr = " " + stripOrderBy(createQueryString());
+    if (qryStr.toLowerCase().contains(FROM)) {
+      final int index = qryStr.indexOf(FROM) + FROM.length();
+      qryStr = qryStr.substring(index);
+    }
+    final Query qry = getSession().createQuery("select count(*) " + FROM + qryStr);
     setParameters(qry);
     return ((Number) qry.uniqueResult()).intValue();
   }
@@ -204,7 +211,7 @@
       // strip the as
       final String strippedWhereClause = whereClause.toLowerCase().trim().substring(2).trim();
       // get the next space
-      final int index = strippedWhereClause.indexOf(" ");
+      final int index = strippedWhereClause.trim().indexOf(" ");
       alias = strippedWhereClause.substring(0, index);
       prefix = alias + ".";
     }
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Bank.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Bank.html	Wed Mar 31 18:09:01 2010 +0200
@@ -168,7 +168,7 @@
       setWindowTableParentElement();
       enableShortcuts('popup');
       setBrowserAutoComplete(false);
-
+      disableProposedAmount();
       try {
         onloadFunctions();
       } catch (e) {}
@@ -180,6 +180,25 @@
     function onResizeDo(){
      resizeAreaCreateFrom();
     }
+
+    function disableProposedAmount(){
+		var settlementTableRow = document.getElementById("tableId");
+		for(var j=3;j<settlementTableRow.rows.length;j++){
+			var settlementRows = settlementTableRow.rows[j];
+			if(settlementRows.cells[9]!=null && settlementRows.cells[9]!='undefined'){
+				var manualSettlement=settlementRows.cells[9];
+				var proposedAmount=settlementRows.cells[7]; 
+				if(manualSettlement!="undefined" && manualSettlement.firstChild!=null){
+					var value=manualSettlement.firstChild.nodeValue;
+					if(value=='Y'){
+					     proposedAmount.firstChild.setAttribute('disabled','disabled');
+				    }
+				}
+			}
+		
+		}
+
+	    }
   </script>
 </head>
 <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="onLoadDo();" onresize="onResizeDo();">
@@ -615,7 +634,7 @@
     <tr>
       <td>
         <div class="Popup_ContentPane_Client" style="overflow: auto; display: none;" id="client_middle">
-          <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;">
+          <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;" id="tableId">
 
             <tr class="DataGrid_Body_Row">
               <th width="3%" class="DataGrid_Header_LineNoCell DataGrid_Body_Cell_CheckBox"><span class="Checkbox_container_NOT_Focused"><input type="checkbox" name="inpTodos" onclick="markAllPersonal(document.frmMain.inpcPaymentId, this.checked);return true;"></input></span></th>
@@ -655,6 +674,7 @@
                 <td class="DataGrid_Body_Cell" style="border-bottom-width:3px"><input class="dojoValidateValid" name="inpplanneddatexx" type="text" id="inpterplanneddate" maxlength="10" size="9" value="" onkeyup="autoCompleteDate(this);return true;"></td>
                 <td class="DataGrid_Body_Cell" style="border-bottom-width:3px"><input class="dojoValidateValid" name="inpproposedxx" type="text" id="parameterProposed" maxlength="8" value="" outputformat="euroEdition" onfocus="numberInputEvent('onfocus', this);" onblur="numberInputEvent('onblur', this);" onkeydown="numberInputEvent('onkeydown', this, event);" onchange="numberInputEvent('onchange', this);"></td>
                 <td class="DataGrid_Body_Cell" style="border-bottom-width:3px"><input class="dojoValidateValid" name="inpcostxx" type="text" id="parameterCost" maxlength="8" value="" outputformat="euroEdition" onfocus="numberInputEvent('onfocus', this);" onblur="numberInputEvent('onblur', this);" onkeydown="numberInputEvent('onkeydown', this, event);" onchange="numberInputEvent('onchange', this);"></td>
+                <td id="isManual" style="visibility: hidden;" >xx</td>
               </tr>
 
             </div>
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Bank.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Bank.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -92,6 +92,7 @@
 <FIELD id="fieldCPaymentId" attribute="value">cDebtPaymentId</FIELD>
 <FIELD id="fieldPrice" attribute="name" replace="xx">cDebtPaymentId</FIELD>
 <FIELD id="fieldPrice" attribute="value">amount2</FIELD>
+<FIELD id="isManual">IsManual</FIELD>
 <FIELD id="inpterplanneddate" attribute="name" replace="xx">cDebtPaymentId</FIELD>
 <FIELD id="parameterCost" attribute="name" replace="xx">cDebtPaymentId</FIELD>
 <FIELD id="parameterProposed" attribute="name" replace="xx">cDebtPaymentId</FIELD>
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Bank_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Bank_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -47,7 +47,8 @@
         p.Amount as p_amount, p.WriteOffAmt as p_woamount,
         p.C_Currency_ID,c.ISO_Code AS CURRENCY,
         o.Name AS Org,
-        p.IsReceipt AS IsReceipt
+        p.IsReceipt AS IsReceipt,
+        p.IsManual AS IsManual
         FROM C_DEBT_Payment_v p,
          C_Currency c,  AD_Org o
         where p.C_Currency_ID=c.C_Currency_ID
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_ShipmentPO.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_ShipmentPO.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -84,6 +84,7 @@
 		<FIELD id="M_Product_ID_ATR" attribute="name" replace="yyyy">id</FIELD>
 		<FIELD id="M_AttributeSetInstance_ID" attribute="name" replace="xxx">id</FIELD>
 		<FIELD id="M_AttributeSetInstance_ID_R" attribute="name" replace="xxx">id</FIELD>
+        <FIELD id="M_AttributeSetInstance_ID_R" attribute="value">ATTRIBUTESETINSTANCENAME</FIELD>
 		<FIELD id="M_Product_ID" attribute="name" replace="zzzz">id</FIELD>
 		<FIELD id="M_Product_ID" attribute="value" >mProductId</FIELD>
 		<FIELD id="fieldAttributeseinstance" attribute="onclick" replace="uuu">id</FIELD>
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -37,6 +37,9 @@
         (SELECT C_UOM.C_UOM_ID FROM M_PRODUCT_UOM, C_UOM WHERE M_PRODUCT_UOM_ID = l.M_PRODUCT_UOM_ID AND M_PRODUCT_UOM.C_UOM_ID = C_UOM.C_UOM_ID)        
         AND C_UOM_CONVERSION.C_UOM_TO_ID = l.C_UOM_ID),1)) 
         as SECQTY, l.M_PRODUCT_UOM_ID as SEC_PRODUCT_UOM_ID,
+        (SELECT M_ATTRIBUTEVALUE.NAME FROM M_ATTRIBUTESETINSTANCE, M_ATTRIBUTEINSTANCE, M_ATTRIBUTEVALUE WHERE l.M_ATTRIBUTESETINSTANCE_ID = M_ATTRIBUTESETINSTANCE.M_ATTRIBUTESETINSTANCE_ID 
+        AND M_ATTRIBUTEINSTANCE.M_ATTRIBUTESETINSTANCE_ID = M_ATTRIBUTESETINSTANCE.M_ATTRIBUTESETINSTANCE_ID
+        AND M_ATTRIBUTEINSTANCE.M_ATTRIBUTEVALUE_ID = M_ATTRIBUTEVALUE.M_ATTRIBUTEVALUE_ID ) as ATTRIBUTESETINSTANCENAME,
         (SELECT C_UOM.NAME FROM M_PRODUCT_UOM, C_UOM WHERE M_PRODUCT_UOM_ID = l.M_PRODUCT_UOM_ID AND M_PRODUCT_UOM.C_UOM_ID = C_UOM.C_UOM_ID) as SECUOMSYMBOL,
         COALESCE(l.M_PRODUCT_UOM_ID,null,'0') as HAVESEC,'' as HAVESECUOM,'' AS LOCATOR
         FROM C_ORDERLINE l left join  M_MATCHPO m on l.C_OrderLine_ID=m.C_OrderLine_ID
@@ -51,7 +54,7 @@
         AND l.M_Product_ID=p.M_Product_ID
         AND l.C_Order_ID = ? 
         GROUP BY o.C_ORDER_ID, o.DocumentNo, o.DateOrdered, o.GrandTotal, l.QtyOrdered,l.qtydelivered, 
-        l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID, l.ad_org_id, l.DESCRIPTION, l.QUANTITYORDER, l.M_PRODUCT_UOM_ID
+        l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID, l.ad_org_id, l.DESCRIPTION, l.QUANTITYORDER, l.M_PRODUCT_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID
         HAVING (l.QtyOrdered-SUM(COALESCE(m.Qty,0))) <> 0
         ORDER BY NAME, l.Line
       ]]>
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java	Wed Mar 31 18:09:01 2010 +0200
@@ -59,10 +59,11 @@
       String strPriceList = vars.getNumericParameter("inppricelist");
       String strPriceStd = vars.getNumericParameter("inppricestd");
       String strLineNetAmt = vars.getStringParameter("inplinenetamt");
+      String strTaxId = vars.getStringParameter("inpcTaxId");
 
       try {
         printPage(response, vars, strChanged, strQtyInvoice, strPriceActual, strInvoiceId,
-            strProduct, strPriceLimit, strTabId, strPriceList, strPriceStd, strLineNetAmt);
+            strProduct, strPriceLimit, strTabId, strPriceList, strPriceStd, strLineNetAmt, strTaxId);
       } catch (ServletException ex) {
         pageErrorCallOut(response);
       }
@@ -73,7 +74,7 @@
   void printPage(HttpServletResponse response, VariablesSecureApp vars, String strChanged,
       String strQtyInvoice, String strPriceActual, String strInvoiceId, String strProduct,
       String strPriceLimit, String strTabId, String strPriceList, String strPriceStd,
-      String strLineNetAmt) throws IOException, ServletException {
+      String strLineNetAmt, String strTaxId) throws IOException, ServletException {
     if (log4j.isDebugEnabled())
       log4j.debug("Output: dataSheet");
     XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
@@ -89,12 +90,19 @@
     int StdPrecision = Integer.valueOf(strPrecision).intValue();
     int PricePrecision = Integer.valueOf(strPricePrecision).intValue();
 
+    SLInvoiceTaxAmtData[] dataTax = SLInvoiceTaxAmtData.select(this, strTaxId, strInvoiceId);
+    BigDecimal taxRate = (dataTax[0].rate.equals("") ? new BigDecimal(1) : new BigDecimal(
+        dataTax[0].rate));
+    Integer taxScale = new Integer(dataTax[0].priceprecision);
+
     if (log4j.isDebugEnabled())
       log4j.debug("strPriceActual: " + strPriceActual);
     if (log4j.isDebugEnabled())
       log4j.debug("strPriceLimit: " + strPriceLimit);
     if (log4j.isDebugEnabled())
       log4j.debug("strLineNetAmt: " + strLineNetAmt);
+    if (log4j.isDebugEnabled())
+      log4j.debug("taxRate: " + taxRate);
 
     BigDecimal qtyInvoice, priceActual, LineNetAmt, priceLimit, priceStd;
 
@@ -157,9 +165,13 @@
             + FormatUtilities.replaceJS(Utility.messageBD(this, "UnderLimitPrice", vars
                 .getLanguage())) + "\"), ");
     }
+    BigDecimal taxAmt = ((LineNetAmt.multiply(taxRate)).divide(new BigDecimal("100"), 12,
+        BigDecimal.ROUND_HALF_EVEN)).setScale(taxScale, BigDecimal.ROUND_HALF_UP);
+
     if (!strChanged.equals("inplinenetamt") || LineNetAmt.compareTo(BigDecimal.ZERO) == 0)
       resultado.append("new Array(\"inplinenetamt\", " + LineNetAmt.toString() + "),");
     resultado.append("new Array(\"inptaxbaseamt\", " + LineNetAmt.toString() + "),");
+    resultado.append("new Array(\"inptaxamt\", " + taxAmt.toPlainString() + "),");
     resultado.append("new Array(\"inppriceactual\", " + priceActual.toString() + ")");
     resultado.append(");");
     xmlDocument.setParameter("array", resultado.toString());
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java	Wed Mar 31 18:09:01 2010 +0200
@@ -204,7 +204,7 @@
     } else if (strChanged.equals("inpqtyordered")) { // calculate Actual
       if ("Y".equals(cancelPriceAd)) {
         priceActual = priceStd;
-        resultado.append("new Array(\"inppriceactual\", \"" + priceActual.toString() + "\"),");
+        resultado.append("new Array(\"inppriceactual\", " + priceActual.toString() + "),");
       } else {
         priceActual = new BigDecimal(SLOrderProductData.getOffersPrice(this,
             dataOrder[0].dateordered, dataOrder[0].cBpartnerId, strProduct, priceStd.toString(),
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java	Wed Mar 31 18:09:01 2010 +0200
@@ -138,13 +138,13 @@
     resultado.append("var respuesta = new Array(");
     resultado.append("new Array(\"inpcUomId\", \"" + strUOM + "\"),");
     resultado.append("new Array(\"inppricelist\", "
-        + (strPriceList.equals("") ? "\"0\"" : strPriceList) + "),");
+        + (strPriceList.equals("") ? "0" : strPriceList) + "),");
     resultado.append("new Array(\"inppricelimit\", "
-        + (strPriceLimit.equals("") ? "\"0\"" : strPriceLimit) + "),");
+        + (strPriceLimit.equals("") ? "0" : strPriceLimit) + "),");
     resultado.append("new Array(\"inppricestd\", "
-        + (strPriceStd.equals("") ? "\"0\"" : strPriceStd) + "),");
+        + (strPriceStd.equals("") ? "0" : strPriceStd) + "),");
     resultado.append("new Array(\"inppriceactual\", "
-        + (strPriceActual.equals("") ? "\"0\"" : strPriceActual) + "),");
+        + (strPriceActual.equals("") ? "0" : strPriceActual) + "),");
     resultado.append("new Array(\"inpcCurrencyId\", "
         + (strCurrency.equals("") ? "\"\"" : strCurrency) + "),");
     resultado.append("new Array(\"inpdiscount\", " + discount.toString() + "),");
--- a/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java	Wed Mar 31 18:09:01 2010 +0200
@@ -312,31 +312,9 @@
         // New docLine created to assign C_Tax_ID value to the entry
         DocLine docLine = new DocLine(DocumentType, Record_ID, "");
         docLine.m_C_Tax_ID = m_taxes[i].m_C_Tax_ID;
-        if (m_taxes[i].m_isTaxUndeductable) {
-          DocInvoiceData[] data = null;
-          data = DocInvoiceData.selectProductAcct(conn, as.getC_AcctSchema_ID(),
-              m_taxes[i].m_C_Tax_ID, Record_ID);
-          for (int j = 0; j < data.length; j++) {
-            /*
-             * Sales has tax exempt for public/Not Tax Deductable organization, so amount will be
-             * zero. Sales tax will be product revenue account for commercial/Not Tax deductable
-             * configuration
-             */
-            fact.createLine(docLine, Account.getAccount(conn, data[j].pRevenueAcct),
-                this.C_Currency_ID, "", data[j].taxamt, Fact_Acct_Group_ID, nextSeqNo(SeqNo),
-                DocumentType, conn);
-          }
-        } else {
-          if (m_taxes[i].m_isTaxDeductable) {
-            fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxLiability, as, conn),
-                this.C_Currency_ID, "", m_taxes[i].getAmount(), Fact_Acct_Group_ID,
-                nextSeqNo(SeqNo), DocumentType, conn);
-          } else {// If Tax rate is not configured with any parameter
-            fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxDue, as, conn),
-                this.C_Currency_ID, "", m_taxes[i].m_amount, Fact_Acct_Group_ID, nextSeqNo(SeqNo),
-                DocumentType, conn);
-          }
-        }
+        fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxDue, as, conn),
+            C_Currency_ID, "", m_taxes[i].m_amount, Fact_Acct_Group_ID, nextSeqNo(SeqNo),
+            DocumentType, conn);
       }
       // Revenue CR
       if (p_lines != null && p_lines.length > 0) {
@@ -388,39 +366,10 @@
         // New docLine created to assign C_Tax_ID value to the entry
         DocLine docLine = new DocLine(DocumentType, Record_ID, "");
         docLine.m_C_Tax_ID = m_taxes[i].m_C_Tax_ID;
-        if (m_taxes[i].m_isTaxUndeductable) {
-          DocInvoiceData[] data = null;
-          data = DocInvoiceData.selectProductAcct(conn, as.getC_AcctSchema_ID(),
-              m_taxes[i].m_C_Tax_ID, Record_ID);
-          for (int j = 0; j < data.length; j++) {
-            /*
-             * Sales has tax exempt for public/Not Tax Deductable organization, so amount will be
-             * zero. Sales tax will be product revenue account for commercial/Not Tax deductable
-             * configuration
-             */
-            fact.createLine(docLine, Account.getAccount(conn, data[j].pRevenueAcct),
-                this.C_Currency_ID, data[j].taxamt, "", Fact_Acct_Group_ID, nextSeqNo(SeqNo),
-                DocumentType, conn);
-          }
-        } else {
-          if (m_taxes[i].m_isTaxDeductable) {
-            fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxLiability, as, conn),
-                this.C_Currency_ID, m_taxes[i].getAmount(), "", Fact_Acct_Group_ID,
-                nextSeqNo(SeqNo), DocumentType, conn);
-          } else {// If Tax rate is not configured with any parameter
-            fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxDue, as, conn),
-                this.C_Currency_ID, m_taxes[i].getAmount(), "", Fact_Acct_Group_ID,
-                nextSeqNo(SeqNo), DocumentType, conn);
-          }
-        }
+        fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxDue, as, conn),
+            this.C_Currency_ID, m_taxes[i].getAmount(), "", Fact_Acct_Group_ID, nextSeqNo(SeqNo),
+            DocumentType, conn);
       }
-      /*
-       * 
-       * 
-       * } else { fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxDue, as, conn),
-       * this.C_Currency_ID, m_taxes[i].getAmount(), "", Fact_Acct_Group_ID, nextSeqNo(SeqNo),
-       * DocumentType, conn); } }
-       */
       // Revenue CR
       for (int i = 0; p_lines != null && i < p_lines.length; i++)
         fact.createLine(p_lines[i], ((DocLine_Invoice) p_lines[i]).getAccount(
@@ -487,15 +436,9 @@
           }
 
         } else {
-          if (m_taxes[i].m_isTaxDeductable) {
-            fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxLiability, as, conn),
-                this.C_Currency_ID, m_taxes[i].getAmount(), "", Fact_Acct_Group_ID,
-                nextSeqNo(SeqNo), DocumentType, conn);
-          } else {// If Tax rate is not configured with any parameter
-            fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxCredit, as, conn),
-                this.C_Currency_ID, m_taxes[i].getAmount(), "", Fact_Acct_Group_ID,
-                nextSeqNo(SeqNo), DocumentType, conn);
-          }
+          fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxCredit, as, conn),
+              this.C_Currency_ID, m_taxes[i].getAmount(), "", Fact_Acct_Group_ID, nextSeqNo(SeqNo),
+              DocumentType, conn);
         }
       }
       // Expense DR
@@ -558,15 +501,9 @@
           }
 
         } else {
-          if (m_taxes[i].m_isTaxDeductable) {
-            fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxLiability, as, conn),
-                this.C_Currency_ID, "", m_taxes[i].getAmount(), Fact_Acct_Group_ID,
-                nextSeqNo(SeqNo), DocumentType, conn);
-          } else {// If Tax rate is not configured with any parameter
-            fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxCredit, as, conn),
-                this.C_Currency_ID, "", m_taxes[i].getAmount(), Fact_Acct_Group_ID,
-                nextSeqNo(SeqNo), DocumentType, conn);
-          }
+          fact.createLine(docLine, m_taxes[i].getAccount(DocTax.ACCTTYPE_TaxCredit, as, conn),
+              this.C_Currency_ID, "", m_taxes[i].getAmount(), Fact_Acct_Group_ID, nextSeqNo(SeqNo),
+              DocumentType, conn);
         }
       }
       // Expense CR
--- a/src/org/openbravo/erpCommon/ad_forms/DocLinePayment_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocLinePayment_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -12,7 +12,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2008 Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -26,7 +26,7 @@
       SELECT  DP.ISMANUAL, DP.ISRECEIPT,DP.AD_ORG_ID, DP.C_BPARTNER_ID, DP.DESCRIPTION, DP.C_DEBT_PAYMENT_ID,
       DP.AMOUNT, DP.WRITEOFFAMT, DP.ISPAID, DP.C_SETTLEMENT_CANCEL_ID, DP.C_SETTLEMENT_GENERATE_ID, DP.C_PROJECT_ID,
       '' AS DEBIT_ACCT, '' AS CREDIT_ACCT, '' AS C_GLITEM_ID, ISDIRECTPOSTING, DP.WithHoldingAmount,DP.C_INVOICE_ID,
-      CASE WHEN DP.C_SETTLEMENT_CANCEL_ID = ST.C_SETTLEMENT_ID AND DP.ISPAID = 'Y' THEN C_WITHHOLDING_ID ELSE NULL END AS C_WITHHOLDING_ID,
+      CASE WHEN (DP.C_SETTLEMENT_CANCEL_ID = ST.C_SETTLEMENT_ID AND (DP.ISPAID = 'Y' or amount = writeoffamt)) THEN C_WITHHOLDING_ID ELSE NULL END AS C_WITHHOLDING_ID,
 			TRUNC(COALESCE((SELECT O.DATEACCT
 				          FROM C_ORDER O
 								WHERE DP.C_ORDER_ID = O.C_ORDER_ID),
--- a/src/org/openbravo/erpCommon/ad_forms/DocPayment.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocPayment.java	Wed Mar 31 18:09:01 2010 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2009 Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -289,8 +289,16 @@
           DocPaymentData[] data = DocPaymentData.selectManual(conn, as.m_C_AcctSchema_ID,
               line.Line_ID);
           for (int j = 0; data != null && j < data.length; j++) {
-            String amountdebit = data[j].amountdebit;
-            String amountcredit = data[j].amountcredit;
+            String amountdebit = convertAmount(data[j].amountdebit, line.isReceipt.equals("Y"),
+                DateAcct, line.conversionDate, line.C_Currency_ID_From, as.m_C_Currency_ID, line,
+                as, fact, Fact_Acct_Group_ID, conn);
+            String amountcredit = convertAmount(data[j].amountcredit, line.isReceipt.equals("Y"),
+                DateAcct, line.conversionDate, line.C_Currency_ID_From, as.m_C_Currency_ID, line,
+                as, fact, Fact_Acct_Group_ID, conn);
+            amountdebit = getConvertedAmt(amountdebit, as.m_C_Currency_ID, C_Currency_ID, DateAcct,
+                "", AD_Client_ID, AD_Org_ID, conn);
+            amountcredit = getConvertedAmt(amountcredit, as.m_C_Currency_ID, C_Currency_ID,
+                DateAcct, "", AD_Client_ID, AD_Org_ID, conn);
             if (log4j.isDebugEnabled())
               log4j.debug("DocPayment - createFact - Conceptos - AmountDebit: " + amountdebit
                   + " - AmountCredit: " + amountcredit);
@@ -298,11 +306,19 @@
             DocLine_Payment lineAux = DocLine_Payment.clone(line);
             lineAux.setM_C_WithHolding_ID(data[j].cWithholdingId);
             lineAux.setM_C_Tax_ID(data[j].cTaxId);
-            fact.createLine(lineAux, new Account(conn,
-                (lineAux.isReceipt.equals("Y") ? data[j].creditAcct : data[j].debitAcct)),
-                line.C_Currency_ID_From, (amountdebit.equals("0") ? "" : amountdebit),
-                (amountcredit.equals("0") ? "" : amountcredit), Fact_Acct_Group_ID,
-                nextSeqNo(SeqNo), DocumentType, conn);
+
+            if (data[j].statusInitial.equals(data[j].status)) {
+              fact.createLine(lineAux, new Account(conn,
+                  (lineAux.isReceipt.equals("Y") ? data[j].creditAcct : data[j].debitAcct)),
+                  C_Currency_ID, (amountdebit.equals("0") ? "" : amountdebit), (amountcredit
+                      .equals("0") ? "" : amountcredit), Fact_Acct_Group_ID, nextSeqNo(SeqNo),
+                  DocumentType, conn);
+            } else {
+              fact.createLine(lineAux, getAccountBPartner(lineAux.m_C_BPartner_ID, as,
+                  lineAux.isReceipt.equals("Y"), lineAux.dpStatus, conn), C_Currency_ID,
+                  (amountdebit.equals("0") ? "" : amountdebit), (amountcredit.equals("0") ? ""
+                      : amountcredit), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
+            }
           }
         }
       } // END debt-payment conditions
@@ -321,7 +337,7 @@
 
       // 6* PPA - Bank in transit default, paid DPs, (non manual and
       // manual non direct posting)
-      if (line.isPaid.equals("Y")
+      if ((line.isPaid.equals("Y") || new BigDecimal(line.Amount).compareTo(new BigDecimal(line.WriteOffAmt))==0)
           && ((line.C_Settlement_Cancel_ID == null || line.C_Settlement_Cancel_ID.equals("")) || (line.C_Settlement_Cancel_ID
               .equals(Record_ID)))) {
         BigDecimal finalLineAmt = new BigDecimal(line.Amount);
@@ -337,38 +353,42 @@
               .equals("Y") ? sWithHoldAmt : ""), (line.isReceipt.equals("Y") ? "" : sWithHoldAmt),
               Fact_Acct_Group_ID, "999999", DocumentType, conn);
         }
-        if (line.WriteOffAmt != null && !line.WriteOffAmt.equals("")
-            && !line.WriteOffAmt.equals("0"))
-          finalLineAmt = finalLineAmt.subtract(new BigDecimal(line.WriteOffAmt));
-        String finalAmtTo = "";
-        String strcCurrencyId = "";
-        if (line.isManual.equals("N")) {
-          finalAmtTo = getConvertedAmt(finalLineAmt.toString(), line.C_Currency_ID_From,
-              C_Currency_ID, DateAcct, "", AD_Client_ID, AD_Org_ID, conn);
-          strcCurrencyId = C_Currency_ID;
-        } else { // For manual payment with direct posting = 'N' (no posting occurred at payment
-          // creation so no conversion, for currency gain-loss, is needed)
-          finalAmtTo = finalLineAmt.toString();
-          strcCurrencyId = line.C_Currency_ID_From;
-        }
-        finalLineAmt = new BigDecimal(finalAmtTo);
-        if (finalLineAmt.compareTo(new BigDecimal("0.00")) != 0) {
-          if (line.C_BANKSTATEMENTLINE_ID != null && !line.C_BANKSTATEMENTLINE_ID.equals("")) {
-            fact.createLine(line,
-                getAccountBankStatementLine(line.C_BANKSTATEMENTLINE_ID, as, conn), strcCurrencyId,
-                (line.isReceipt.equals("Y") ? finalAmtTo : ""), (line.isReceipt.equals("Y") ? ""
-                    : finalAmtTo), Fact_Acct_Group_ID, "999999", DocumentType, conn);
-          }// else if(line.C_CASHLINE_ID!=null &&
-          // !line.C_CASHLINE_ID.equals("")) fact.createLine(line,
-          // getAccountCashLine(line.C_CASHLINE_ID,
-          // as,conn),strcCurrencyId,
-          // (line.isReceipt.equals("Y")?finalAmtTo:""),(line.isReceipt.equals("Y")?"":finalAmtTo),
-          // Fact_Acct_Group_ID, "999999", DocumentType,conn);
-          else
-            fact.createLine(line, getAccount(AcctServer.ACCTTYPE_BankInTransitDefault, as, conn),
-                strcCurrencyId, (line.isReceipt.equals("Y") ? finalAmtTo : ""), (line.isReceipt
-                    .equals("Y") ? "" : finalAmtTo), Fact_Acct_Group_ID, "999999", DocumentType,
-                conn);
+        if (line.isPaid.equals("Y")
+            && ((line.C_Settlement_Cancel_ID == null || line.C_Settlement_Cancel_ID.equals("")) || (line.C_Settlement_Cancel_ID
+                .equals(Record_ID)))) {
+          if (line.WriteOffAmt != null && !line.WriteOffAmt.equals("")
+              && !line.WriteOffAmt.equals("0"))
+            finalLineAmt = finalLineAmt.subtract(new BigDecimal(line.WriteOffAmt));
+          String finalAmtTo = "";
+          String strcCurrencyId = "";
+          if (line.isManual.equals("N")) {
+            finalAmtTo = getConvertedAmt(finalLineAmt.toString(), line.C_Currency_ID_From,
+                C_Currency_ID, DateAcct, "", AD_Client_ID, AD_Org_ID, conn);
+            strcCurrencyId = C_Currency_ID;
+          } else { // For manual payment with direct posting = 'N' (no posting occurred at payment
+            // creation so no conversion, for currency gain-loss, is needed)
+            finalAmtTo = finalLineAmt.toString();
+            strcCurrencyId = line.C_Currency_ID_From;
+          }
+          finalLineAmt = new BigDecimal(finalAmtTo);
+          if (finalLineAmt.compareTo(new BigDecimal("0.00")) != 0) {
+            if (line.C_BANKSTATEMENTLINE_ID != null && !line.C_BANKSTATEMENTLINE_ID.equals("")) {
+              fact.createLine(line, getAccountBankStatementLine(line.C_BANKSTATEMENTLINE_ID, as,
+                  conn), strcCurrencyId, (line.isReceipt.equals("Y") ? finalAmtTo : ""),
+                  (line.isReceipt.equals("Y") ? "" : finalAmtTo), Fact_Acct_Group_ID, "999999",
+                  DocumentType, conn);
+            }// else if(line.C_CASHLINE_ID!=null &&
+            // !line.C_CASHLINE_ID.equals("")) fact.createLine(line,
+            // getAccountCashLine(line.C_CASHLINE_ID,
+            // as,conn),strcCurrencyId,
+            // (line.isReceipt.equals("Y")?finalAmtTo:""),(line.isReceipt.equals("Y")?"":finalAmtTo),
+            // Fact_Acct_Group_ID, "999999", DocumentType,conn);
+            else
+              fact.createLine(line, getAccount(AcctServer.ACCTTYPE_BankInTransitDefault, as, conn),
+                  strcCurrencyId, (line.isReceipt.equals("Y") ? finalAmtTo : ""), (line.isReceipt
+                      .equals("Y") ? "" : finalAmtTo), Fact_Acct_Group_ID, "999999", DocumentType,
+                  conn);
+          }
         }
       }
     } // END of the C_Debt_Payment loop
--- a/src/org/openbravo/erpCommon/ad_forms/DocPayment_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocPayment_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -28,7 +28,7 @@
         '' AS PROCESSING, '' AS PROCESSED, '' AS POSTED, '' AS C_PROJECT_ID, '' AS C_CAMPAIGN_ID, '' AS C_ACTIVITY_ID,
         '' AS USER1_ID, '' AS USER2_ID, '' AS CREATEFROM, '' AS C_CURRENCY_ID, '' AS CANCELEDNOTCHARGEAMT, '' AS GENERATEDAMT,
         '' AS CHARGEDAMT, '' AS DESCRIPTION, '' AS CREATEFILE, '' AS DATEACCT, '' AS SETTLEMENTTYPE, '' AS CREDIT_ACCT, '' AS DEBIT_ACCT,
-        '' AS AMOUNTDEBIT, '' AS AMOUNTCREDIT, '' AS AMOUNT, '' AS C_TAX_ID, '' AS C_WITHHOLDING_ID
+        '' AS AMOUNTDEBIT, '' AS AMOUNTCREDIT, '' AS AMOUNT, '' AS C_TAX_ID, '' AS C_WITHHOLDING_ID, '' AS STATUS, '' AS STATUS_INITIAL
         FROM DUAL
      ]]>
      </Sql>
@@ -148,7 +148,7 @@
     <Sql>
       <![CDATA[
         SELECT B.AMOUNTCREDIT AS AMOUNTCREDIT, B.AMOUNTDEBIT AS AMOUNTDEBIT, GA.Glitem_Credit_Acct AS CREDIT_ACCT, GA.Glitem_Debit_Acct AS DEBIT_ACCT,
-        G.C_TAX_ID, G.C_WITHHOLDING_ID
+        G.C_TAX_ID, G.C_WITHHOLDING_ID, D.STATUS, D.STATUS_INITIAL
         FROM C_DEBT_PAYMENT D, C_DEBT_PAYMENT_BALANCING B, C_GLITEM G, C_Glitem_Acct GA
         WHERE D.C_DEBT_PAYMENT_ID = B.C_DEBT_PAYMENT_ID
         AND B.C_GLITEM_ID = G.C_GLITEM_ID
--- a/src/org/openbravo/erpCommon/ad_forms/GenerateInvoicesmanual.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/GenerateInvoicesmanual.html	Wed Mar 31 18:09:01 2010 +0200
@@ -64,7 +64,7 @@
     showJSMessage(1);
     return false;
     }
-    setProcessingMode('window',true);
+    setProcessingMode('window', true);
   } else if (action=="FIND") {
     if (frm.inpadOrgId.value==null || frm.inpadOrgId.value=="") {
     setWindowElementFocus(frm.inpadOrgId);
@@ -78,6 +78,7 @@
 	<script language="JavaScript" type="text/javascript">
 	
   function onLoadDo(){
+     setProcessingMode('window', false);
 		 this.windowTables = new Array(
 		  new windowTableId('client', 'buttonSearch'),
 		  new windowTableId('tdbottomButtons', 'buttonProcess')
@@ -432,18 +433,18 @@
                   <td></td>
                   <td class="Button_LeftAlign_ContentCell">
                     <div>
-                      <button type="button" 
-                        id="buttonProcess" 
+                      <button type="button"
+                        id="buttonProcess"
                         class="ButtonLink" 
-                        onclick="submitCommandForm('GENERATE', true, null, null, null, true);return false;" 
-                        onfocus="buttonEvent('onfocus', this); window.status='Process'; return true;" 
-                        onblur="buttonEvent('onblur', this);" 
-                        onkeyup="buttonEvent('onkeyup', this);" 
-                        onkeydown="buttonEvent('onkeydown', this);" 
-                        onkeypress="buttonEvent('onkeypress', this);" 
-                        onmouseup="buttonEvent('onmouseup', this);" 
-                        onmousedown="buttonEvent('onmousedown', this);" 
-                        onmouseover="buttonEvent('onmouseover', this); window.status='Process'; return true;" 
+                        onclick="submitCommandForm('GENERATE', true, null, null, null, true);return false;"
+                        onfocus="buttonEvent('onfocus', this); window.status='Process'; return true;"
+                        onblur="buttonEvent('onblur', this);"
+                        onkeyup="buttonEvent('onkeyup', this);"
+                        onkeydown="buttonEvent('onkeydown', this);"
+                        onkeypress="buttonEvent('onkeypress', this);"
+                        onmouseup="buttonEvent('onmouseup', this);"
+                        onmousedown="buttonEvent('onmousedown', this);"
+                        onmouseover="buttonEvent('onmouseover', this); window.status='Process'; return true;"
                         onmouseout="buttonEvent('onmouseout', this);">
                         <table class="Button">
                           <tr>
--- a/src/org/openbravo/erpCommon/ad_forms/InstanceManagement.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/InstanceManagement.html	Wed Mar 31 18:09:01 2010 +0200
@@ -110,7 +110,7 @@
               <span class="tabTitle">
                 <div class="tabTitle_background">
                   <span class="tabTitle_elements_container">
-                    <span class="tabTitle_elements_text">Instance Activation</span>
+                    <span class="tabTitle_elements_text" id="tabTitle_text">Instance Activation</span>
                     <span class="tabTitle_elements_separator"><div class="tabTitle_elements_separator_icon"></div></span>
                     <span class="tabTitle_elements_image"><div class="tabTitle_elements_image_normal_icon" id="TabStatusIcon"></div></span>
                   </span>
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagementAdd.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagementAdd.html	Wed Mar 31 18:09:01 2010 +0200
@@ -130,7 +130,7 @@
               <span class="tabTitle">
                 <div class="tabTitle_background">
                   <span class="tabTitle_elements_container">
-                    <span class="tabTitle_elements_text">Module Manager</span>
+                    <span class="tabTitle_elements_text" id="tabTitle_text">Module Manager</span>
                     <span class="tabTitle_elements_separator"><div class="tabTitle_elements_separator_icon"></div></span>
                     <span class="tabTitle_elements_image"><div class="tabTitle_elements_image_normal_icon" id="TabStatusIcon"></div></span>
                   </span>
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagementHistory.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagementHistory.html	Wed Mar 31 18:09:01 2010 +0200
@@ -123,7 +123,7 @@
               <span class="tabTitle">
                 <div class="tabTitle_background">
                   <span class="tabTitle_elements_container">
-                    <span class="tabTitle_elements_text">Module Manager</span>
+                    <span class="tabTitle_elements_text" id="tabTitle_text">Module Manager</span>
                     <span class="tabTitle_elements_separator"><div class="tabTitle_elements_separator_icon"></div></span>
                     <span class="tabTitle_elements_image"><div class="tabTitle_elements_image_normal_icon" id="TabStatusIcon"></div></span>
                   </span>
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagementInstalled.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagementInstalled.html	Wed Mar 31 18:09:01 2010 +0200
@@ -167,7 +167,7 @@
               <span class="tabTitle">
                 <div class="tabTitle_background">
                   <span class="tabTitle_elements_container">
-                    <span class="tabTitle_elements_text">Module Manager</span>
+                    <span class="tabTitle_elements_text" id="tabTitle_text">Module Manager</span>
                     <span class="tabTitle_elements_separator"><div class="tabTitle_elements_separator_icon"></div></span>
                     <span class="tabTitle_elements_image"><div class="tabTitle_elements_image_normal_icon" id="TabStatusIcon"></div></span>
                   </span>
--- a/src/org/openbravo/erpCommon/ad_forms/ShowSessionPreferences.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ShowSessionPreferences.html	Wed Mar 31 18:09:01 2010 +0200
@@ -99,7 +99,7 @@
 		  <span class="tabTitle">
 		    <div class="tabTitle_background">
 		      <span class="tabTitle_elements_container">
-		        <span class="tabTitle_elements_text">Show Session - Preferences</span>
+		        <span class="tabTitle_elements_text" id="tabTitle_text">Show Session - Preferences</span>
 		        <span class="tabTitle_elements_separator"><div class="tabTitle_elements_separator_icon"></div></span>
 		        <span class="tabTitle_elements_image"><div class="tabTitle_elements_image_normal_icon" id="TabStatusIcon"></div></span>
 		      </span>
--- a/src/org/openbravo/erpCommon/ad_forms/ShowSessionVariables.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ShowSessionVariables.html	Wed Mar 31 18:09:01 2010 +0200
@@ -117,7 +117,7 @@
 		  <span class="tabTitle">
 		    <div class="tabTitle_background">
 		      <span class="tabTitle_elements_container">
-		        <span class="tabTitle_elements_text">Show Session - Session Variables</span>
+		        <span class="tabTitle_elements_text" id="tabTitle_text">Show Session - Session Variables</span>
 		        <span class="tabTitle_elements_separator"><div class="tabTitle_elements_separator_icon"></div></span>
 		        <span class="tabTitle_elements_image"><div class="tabTitle_elements_image_normal_icon" id="TabStatusIcon"></div></span>
 		      </span>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java	Wed Mar 31 18:09:01 2010 +0200
@@ -292,13 +292,13 @@
         strcelementvaluetodes = "";
         vars.setSessionValue("inpElementValueIdTo_DES", strcelementvaluetodes);
       }
-      data = ReportGeneralLedgerData.select(this, rowNum, strGroupByText, strGroupBy, vars.getLanguage(),strDateFrom,
-          toDatePlusOne, strAllaccounts, strcelementvaluefrom, strcelementvalueto, Utility
-              .getContext(this, vars, "#AccessibleOrgTree", "ReportGeneralLedger"), Utility
-              .getContext(this, vars, "#User_Client", "ReportGeneralLedger"), strHide,
-          strcAcctSchemaId, strDateFrom, toDatePlusOne, strOrgFamily, strcBpartnerId,
-          strmProductId, strcProjectId, strAmtFrom, strAmtTo, null, null, null, pgLimit, oraLimit1,
-          oraLimit2);
+      data = ReportGeneralLedgerData.select(this, rowNum, strGroupByText, strGroupBy, vars
+          .getLanguage(), strDateFrom, toDatePlusOne, strAllaccounts, strcelementvaluefrom,
+          strcelementvalueto, Utility.getContext(this, vars, "#AccessibleOrgTree",
+              "ReportGeneralLedger"), Utility.getContext(this, vars, "#User_Client",
+              "ReportGeneralLedger"), strHide, strcAcctSchemaId, strDateFrom, toDatePlusOne,
+          strOrgFamily, strcBpartnerId, strmProductId, strcProjectId, strAmtFrom, strAmtTo, null,
+          null, null, pgLimit, oraLimit1, oraLimit2);
       if (log4j.isDebugEnabled())
         log4j.debug("RecordNo: " + initRecordNumber);
       // In case this is not the first screen to show, initial balance may need to include amounts
@@ -306,13 +306,14 @@
 
       ReportGeneralLedgerData[] dataTotal = null;
       if (data != null && data.length > 1) {
-        dataTotal = ReportGeneralLedgerData.select(this, rowNum, strGroupByText, strGroupBy,
-            vars.getLanguage(),strDateFrom, toDatePlusOne, strAllaccounts, strcelementvaluefrom, strcelementvalueto,
-            Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportGeneralLedger"), Utility
-                .getContext(this, vars, "#User_Client", "ReportGeneralLedger"), strHide,
-            strcAcctSchemaId, strYearInitialDate, DateTimeData.nDaysAfter(this, data[0].dateacct,
-                "1"), strOrgFamily, strcBpartnerId, strmProductId, strcProjectId, strAmtFrom,
-            strAmtTo, data[0].id, data[0].dateacctnumber + data[0].factAcctGroupId,
+        dataTotal = ReportGeneralLedgerData.select(this, rowNum, strGroupByText, strGroupBy, vars
+            .getLanguage(), strDateFrom, toDatePlusOne, strAllaccounts, strcelementvaluefrom,
+            strcelementvalueto, Utility.getContext(this, vars, "#AccessibleOrgTree",
+                "ReportGeneralLedger"), Utility.getContext(this, vars, "#User_Client",
+                "ReportGeneralLedger"), strHide, strcAcctSchemaId, strYearInitialDate, DateTimeData
+                .nDaysAfter(this, data[0].dateacct, "1"), strOrgFamily, strcBpartnerId,
+            strmProductId, strcProjectId, strAmtFrom, strAmtTo, data[0].id, data[0].dateacctnumber
+                + data[0].factAcctGroupId + data[0].description + data[0].isdebit,
             data[0].groupbyid, null, null, null);
       }
       // Now dataTotal is covered adding debit and credit amounts
@@ -504,12 +505,13 @@
           strcelementvalueto = strcelementvaluefrom;
         strAllaccounts = "N";
       }
-      data = ReportGeneralLedgerData.select(this, "0", strGroupByText, strGroupBy,vars.getLanguage(), strDateFrom,
-          toDatePlusOne, strAllaccounts, strcelementvaluefrom, strcelementvalueto, Utility
-              .getContext(this, vars, "#AccessibleOrgTree", "ReportGeneralLedger"), Utility
-              .getContext(this, vars, "#User_Client", "ReportGeneralLedger"), strHide,
-          strcAcctSchemaId, strDateFrom, toDatePlusOne, strOrgFamily, strcBpartnerId,
-          strmProductId, strcProjectId, strAmtFrom, strAmtTo, null, null, null, null, null, null);
+      data = ReportGeneralLedgerData.select(this, "0", strGroupByText, strGroupBy, vars
+          .getLanguage(), strDateFrom, toDatePlusOne, strAllaccounts, strcelementvaluefrom,
+          strcelementvalueto, Utility.getContext(this, vars, "#AccessibleOrgTree",
+              "ReportGeneralLedger"), Utility.getContext(this, vars, "#User_Client",
+              "ReportGeneralLedger"), strHide, strcAcctSchemaId, strDateFrom, toDatePlusOne,
+          strOrgFamily, strcBpartnerId, strmProductId, strcProjectId, strAmtFrom, strAmtTo, null,
+          null, null, null, null, null);
     }
     if (data == null || data.length == 0) {
       advisePopUp(request, response, "WARNING", Utility.messageBD(this, "NoDataFound", vars
@@ -599,13 +601,12 @@
           strcelementvalueto = strcelementvaluefrom;
         strAllaccounts = "N";
       }
-      data = ReportGeneralLedgerData.selectXLS(this, vars
-              .getLanguage(), strDateFrom, toDatePlusOne, strAllaccounts,
-          strcelementvaluefrom, strcelementvalueto, Utility.getContext(this, vars,
-              "#AccessibleOrgTree", "ReportGeneralLedger"), Utility.getContext(this, vars,
-              "#User_Client", "ReportGeneralLedger"), strHide, strcAcctSchemaId, strDateFrom,
-          toDatePlusOne, strOrgFamily, strcBpartnerId, strmProductId, strcProjectId, strAmtFrom,
-          strAmtTo);
+      data = ReportGeneralLedgerData.selectXLS(this, vars.getLanguage(), strDateFrom,
+          toDatePlusOne, strAllaccounts, strcelementvaluefrom, strcelementvalueto, Utility
+              .getContext(this, vars, "#AccessibleOrgTree", "ReportGeneralLedger"), Utility
+              .getContext(this, vars, "#User_Client", "ReportGeneralLedger"), strHide,
+          strcAcctSchemaId, strDateFrom, toDatePlusOne, strOrgFamily, strcBpartnerId,
+          strmProductId, strcProjectId, strAmtFrom, strAmtTo);
     }
     if (data == null || data.length == 0) {
       advisePopUp(request, response, "WARNING", Utility.messageBD(this, "NoDataFound", vars
--- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -30,7 +30,7 @@
           SELECT VALUE, NAME, DATEACCT,
               SUM(AMTACCTDR) AS AMTACCTDR, SUM(AMTACCTCR) AS AMTACCTCR, (SUM(AMTACCTDR)-SUM(AMTACCTCR)) AS TOTAL,
               FACT_ACCT_GROUP_ID, ID, groupbyid, groupbyname,
-              DESCRIPTION,
+              DESCRIPTION, ISDEBIT,
               0 AS TOTALACCTDR, 0 AS TOTALACCTCR, 0 AS TOTALACCTSUB,
               0 AS PREVIOUSDEBIT, 0 AS PREVIOUSCREDIT, 0 AS PREVIOUSTOTAL,
               0 AS FINALDEBIT, 0 AS FINALCREDIT, 0 AS FINALTOTAL,
@@ -46,9 +46,9 @@
                   WHEN 'Project' THEN c_project.c_project_id
                   ELSE '' END AS groupbyid,
                 CASE ?
-                  WHEN 'BPartner' THEN to_char(c_bpartner.name)
-                  WHEN 'Product' THEN to_char(m_product.name)
-                  WHEN 'Project' THEN AD_COLUMN_IDENTIFIER('C_Project',c_project.c_project_id, ?)
+                  WHEN 'BPartner' THEN (case AD_COLUMN_IDENTIFIER('C_Bpartner',c_bpartner.c_bpartner_id, ?) when '**' then '' else AD_COLUMN_IDENTIFIER('C_Bpartner',c_bpartner.c_bpartner_id, ?) end)
+                  WHEN 'Product' THEN (case  AD_COLUMN_IDENTIFIER('M_Product',m_product.m_product_id, ?) when '**' then '' else AD_COLUMN_IDENTIFIER('M_Product',m_product.m_product_id, ?) end)
+                  WHEN 'Project' THEN (case  AD_COLUMN_IDENTIFIER('C_Project',c_project.c_project_id, ?) when '**' then '' else AD_COLUMN_IDENTIFIER('C_Project',c_project.c_project_id, ?) end)
                   ELSE '' END AS groupbyname,
                 CASE WHEN AMTACCTDR <> 0 THEN 'Y' ELSE 'N' END AS ISDEBIT
             FROM FACT_ACCT
@@ -81,7 +81,7 @@
             ORDER  BY groupbyname, groupbyid, VALUE, NAME, ID, DATEACCT,  FACT_ACCT_GROUP_ID, DESCRIPTION, ISDEBIT
           ) C
         ) B WHERE 1=1
-      ) A ORDER BY  groupbyname, groupbyid, VALUE, DATEACCT, FACT_ACCT_GROUP_ID
+      ) A ORDER BY  groupbyname, groupbyid, VALUE, DATEACCT, FACT_ACCT_GROUP_ID, DESCRIPTION, ISDEBIT
       ]]></Sql>
     <Field name="rownum" value="count"/>
     <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
@@ -89,6 +89,11 @@
     <Parameter name="groupby"/>
     <Parameter name="groupby"/>
     <Parameter name="adLanguage"/>
+    <Parameter name="adLanguage"/>
+    <Parameter name="adLanguage"/>
+    <Parameter name="adLanguage"/>
+    <Parameter name="adLanguage"/>
+    <Parameter name="adLanguage"/>
     <Parameter name="parDateFrom" optional="true" after="where 5=5"><![CDATA[AND DATEACCT >= TO_DATE(?) ]]></Parameter>
     <Parameter name="parDateTo" optional="true" after="where 5=5"><![CDATA[AND DATEACCT < TO_DATE(?) ]]></Parameter>
     <Parameter name="allaccounts"/>
@@ -107,7 +112,7 @@
     <Parameter name="paramAmtFrom" optional="true" after="3=3"><![CDATA[ AND (FACT_ACCT.AMTACCTDR + FACT_ACCT.AMTACCTCR)>=TO_NUMBER(?) ]]></Parameter>
     <Parameter name="paramAmtTo" optional="true" after="3=3"><![CDATA[ AND (FACT_ACCT.AMTACCTDR + FACT_ACCT.AMTACCTCR)<=TO_NUMBER(?) ]]></Parameter>
     <Parameter name="accountId" optional="true" after="WHERE 6=6"><![CDATA[AND ID = ? ]]></Parameter>
-    <Parameter name="factAcctId" optional="true" after="WHERE 6=6"><![CDATA[and to_char(DATEACCT,'J')||FACT_ACCT_GROUP_ID < ? ]]></Parameter>
+    <Parameter name="factAcctId" optional="true" after="WHERE 6=6"><![CDATA[and to_char(DATEACCT,'J')||FACT_ACCT_GROUP_ID||DESCRIPTION||ISDEBIT < ? ]]></Parameter>
     <Parameter name="cBPartner" optional="true" after="WHERE 6=6"><![CDATA[AND groupbyid = ? ]]></Parameter>
     <Parameter name="pgLimit" type="argument" optional="true" after=",  FACT_ACCT_GROUP_ID, DESCRIPTION, ISDEBIT"><![CDATA[ LIMIT ]]></Parameter>
     <Parameter name="oraLimit1" type="argument" optional="true" after=") C"><![CDATA[ WHERE ROWNUM <= ]]></Parameter>
@@ -127,7 +132,7 @@
             DATEACCT, AMTACCTDR, AMTACCTCR,
             FACT_ACCT_GROUP_ID, FACT_ACCT.ACCOUNT_ID AS ID, FACT_ACCT.DESCRIPTION,
             c_bpartner.c_bpartner_id as bpid, m_product.m_product_id as pdid, c_project.c_project_id as pjid,
-            c_bpartner.name as bpname, m_product.name as pdname, AD_COLUMN_IDENTIFIER('C_Project',c_project.c_project_id, ?) as pjname,
+            (case AD_COLUMN_IDENTIFIER('C_Bpartner',c_bpartner.c_bpartner_id, ?) when '**' then '' else AD_COLUMN_IDENTIFIER('C_Bpartner',c_bpartner.c_bpartner_id, ?) end) as bpname, (case AD_COLUMN_IDENTIFIER('M_Product',m_product.m_product_id, ?) when '**' then '' else AD_COLUMN_IDENTIFIER('M_Product',m_product.m_product_id, ?) end) as pdname, (case AD_COLUMN_IDENTIFIER('C_Project',c_project.c_project_id, ?) when '**' then '' else AD_COLUMN_IDENTIFIER('C_Project',c_project.c_project_id, ?) end)  as pjname,
             CASE WHEN AMTACCTDR <> 0 THEN 'Y' ELSE 'N' END AS ISDEBIT
         FROM FACT_ACCT
           LEFT JOIN C_BPARTNER ON FACT_ACCT.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
@@ -160,6 +165,11 @@
       ]]></Sql>
     <Field name="rownum" value="count"/>
     <Parameter name="adLanguage"/>
+    <Parameter name="adLanguage"/>
+    <Parameter name="adLanguage"/>
+    <Parameter name="adLanguage"/>
+    <Parameter name="adLanguage"/>
+    <Parameter name="adLanguage"/>
     <Parameter name="parDateFrom" optional="true" after="where 5=5"><![CDATA[AND DATEACCT >= TO_DATE(?) ]]></Parameter>
     <Parameter name="parDateTo" optional="true" after="where 5=5"><![CDATA[AND DATEACCT < TO_DATE(?) ]]></Parameter>
     <Parameter name="allaccounts"/>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportGuaranteeDate_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportGuaranteeDate_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -47,7 +47,7 @@
      ]]></Sql>
     <Parameter name="adUserClient" type="replace" optional="true" after="AND S.AD_CLIENT_ID IN (" text="'1'"/>
     <Parameter name="adOrgClient" type="replace" optional="true" after="AND S.AD_ORG_ID IN (" text="'1'"/>
-    <Parameter name="parDate" optional="true" after="AND 1=1"><![CDATA[ AND COALESCE(M_ATTRIBUTESETINSTANCE.GUARANTEEDATE, TO_DATE('31/12/9999')) <= to_date(?)]]></Parameter>
+    <Parameter name="parDate" optional="true" after="AND 1=1"><![CDATA[ AND COALESCE(M_ATTRIBUTESETINSTANCE.GUARANTEEDATE, TO_DATE('31/12/9999')) < to_date(?)]]></Parameter>
     <Parameter name="cBpartner" optional="true" after="AND 1=1"><![CDATA[ AND C_BPARTNER.C_BPARTNER_ID = ?]]></Parameter>
     <Parameter name="mWarehouse" optional="true" after="AND 1=1"><![CDATA[ AND M_WAREHOUSE.M_WAREHOUSE_ID = ?]]></Parameter>
   </SqlMethod>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJRFilter.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJRFilter.html	Wed Mar 31 18:09:01 2010 +0200
@@ -368,12 +368,6 @@
                   <td class="TitleCell"><span class="LabelText">Less Than</span></td>
                   <td class="TextBox_ContentCell"> <input dojoType="openbravo:RealNumberTextbox" greaterThan="paramMayor" class="TextBox_OneCell_width" type="text" name="inpMenor" maxlength="10" id="paramMenor" value="" outputformat="euroEdition"></input><script>djConfig.searchIds.push("paramMenor");</script>
                   </td>
-                  <td class="TitleCell"><span class="LabelText">Currency</span></td>
-                  <td class="Combo_ContentCell">
-  		     		<select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
-     		      	<option value=""><div id="reportC_Currency_ID"></div></option>
-   		     		</select>
-		   		  </td>
                 </tr>
                 <tr>
                   <td colspan="6">
@@ -845,7 +839,7 @@
                         </button>
                       </div>
                     </td>
-                    <td class="Button_LeftAlign_ContentCell" colspan="2">
+                    <td class="Button_LeftAlign_ContentCell" colspan="0">
                       <div>
                         <button type="button" 
                           class="ButtonLink" 
@@ -869,9 +863,12 @@
                         </button>
                       </div>
                     </td>
-                    <td class="ContentCell"></input>
-                    </td>
-                    <td class="ContentCell"></td>
+                    <td class="TitleCell"><span class="LabelText">Currency</span></td>
+                  <td class="Combo_ContentCell">
+  		     		<select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
+     		      	<option value=""><div id="reportC_Currency_ID"></div></option>
+   		     		</select>
+		   		  </td>
                   </tr>
 
 </table>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesFilterJR.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesFilterJR.html	Wed Mar 31 18:09:01 2010 +0200
@@ -365,12 +365,6 @@
                   <td class="TitleCell"><span class="LabelText">Less Than</span></td>
                   <td class="TextBox_ContentCell"> <input dojoType="openbravo:RealNumberTextbox" greaterThan="paramMayor" class="TextBox_OneCell_width" type="text" name="inpMenor" maxlength="10" id="paramMenor" value="" outputformat="euroEdition"></input><script>djConfig.searchIds.push("paramMenor");</script>
                   </td>
-                  <td class="TitleCell"><span class="LabelText">Currency</span></td>
-                  <td class="Combo_ContentCell">
-                  	<select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
-                    <option value=""><div id="reportC_Currency_ID"></div></option>
-                    </select>
-                  </td>    
                 </tr>
                 <tr>
                   <td colspan="6">
@@ -798,7 +792,7 @@
                         </button>
                       </div>
                     </td>
-                    <td class="Button_LeftAlign_ContentCell" colspan="2">
+                    <td class="Button_LeftAlign_ContentCell" colspan="0">
                       <div>
                         <button type="button" 
                           class="ButtonLink" 
@@ -822,9 +816,12 @@
                         </button>
                       </div>
                     </td>
-                    <td class="ContentCell"></input>
-                    </td>
-                    <td class="ContentCell"></td>
+                    <td class="TitleCell"><span class="LabelText">Currency</span></td>
+                  	<td class="Combo_ContentCell">
+                  	<select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
+                    <option value=""><div id="reportC_Currency_ID"></div></option>
+                    </select>
+                  </td> 
                   </tr>
 
               </table>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesFilterJR.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesFilterJR.html	Wed Mar 31 18:09:01 2010 +0200
@@ -366,12 +366,6 @@
                   <td class="TitleCell"><span class="LabelText">Less than</span></td>
                   <td class="TextBox_ContentCell"> <input dojoType="openbravo:RealNumberTextbox" greaterThan="paramMayor" class="TextBox_OneCell_width" type="text" name="inpMenor" maxlength="10" id="paramMenor" value="" outputformat="qtyEdition"></input><script>djConfig.searchIds.push("paramMenor");</script>
                   </td>
-                  <td class="TitleCell"><span class="LabelText">Currency</span></td>
-                  <td class="Combo_ContentCell">
-                    <select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
-                    <option value=""><div id="reportC_Currency_ID"></div></option>
-                    </select>
-                  </td> 
                 </tr>
                 <tr>
                   <td colspan="6">
@@ -793,7 +787,7 @@
                         </button>
                       </div>
                     </td>
-                    <td class="Button_LeftAlign_ContentCell" colspan="2">
+                    <td class="Button_LeftAlign_ContentCell" colspan="0">
                       <div>
                         <button type="button" 
                           class="ButtonLink" 
@@ -817,9 +811,12 @@
                         </button>
                       </div>
                     </td>
-                    <td class="ContentCell"></input>
-                    </td>
-                    <td class="ContentCell"></td>
+                  <td class="TitleCell"><span class="LabelText">Currency</span></td>
+                  <td class="Combo_ContentCell">
+                    <select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
+                    <option value=""><div id="reportC_Currency_ID"></div></option>
+                    </select>
+                  </td> 
                   </tr>
 
 </table>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportPricelist.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportPricelist.java	Wed Mar 31 18:09:01 2010 +0200
@@ -143,7 +143,7 @@
 
     try {
       ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", "MProductId_IN",
-          "null", "", Utility.getContext(this, vars, "#AccessibleOrgTree", ""), Utility.getContext(
+          "", "", Utility.getContext(this, vars, "#AccessibleOrgTree", ""), Utility.getContext(
               this, vars, "#User_Client", ""), 0);
       Utility.fillSQLParameters(this, vars, null, comboTableData, "", strmProductId);
       xmlDocument.setData("reportMProductId_IN", "liststructure", comboTableData.select(false));
--- a/src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesFilterJR.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesFilterJR.html	Wed Mar 31 18:09:01 2010 +0200
@@ -366,12 +366,6 @@
                   <td class="TitleCell"><span class="LabelText">Less Than</span></td>
                   <td class="TextBox_ContentCell"> <input dojoType="openbravo:RealNumberTextbox" greaterThan="paramMayor" class="TextBox_OneCell_width" type="text" name="inpMenor" maxlength="10" id="paramMenor" value="" outputformat="euroEdition"></input><script>djConfig.searchIds.push("paramMenor");</script>
                   </td>
-                  <td class="TitleCell"><span class="LabelText">Currency</span></td>
-                  <td class="Combo_ContentCell">
-                  	<select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
-                    <option value=""><div id="reportC_Currency_ID"></div></option>
-                    </select>
-                  </td>                  
                 </tr>
                 <tr>
                   <td colspan="6">
@@ -806,7 +800,7 @@
                       </button>
                     </div>
                   </td>
-                  <td class="Button_LeftAlign_ContentCell" colspan="2">
+                  <td class="Button_LeftAlign_ContentCell" colspan="0">
                     <div>
                       <button type="button" 
                         class="ButtonLink" 
@@ -830,9 +824,12 @@
                       </button>
                     </div>
                   </td>
-                  <td class="ContentCell"></input>
-                  </td>
-                  <td class="ContentCell"></td>
+                  <td class="TitleCell"><span class="LabelText">Currency</span></td>
+                  <td class="Combo_ContentCell">
+                  	<select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
+                    <option value=""><div id="reportC_Currency_ID"></div></option>
+                    </select>
+                  </td> 
                 </tr>
 
               </table>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalysesFilter.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalysesFilter.html	Wed Mar 31 18:09:01 2010 +0200
@@ -377,12 +377,6 @@
                   <td class="TitleCell"><span class="LabelText">Less Than</span></td>
                   <td class="TextBox_ContentCell"> <input dojoType="openbravo:RealNumberTextbox" greaterThan="paramMayor" class="TextBox_OneCell_width" type="text" name="inpMenor" maxlength="10" id="paramMenor" value="" outputformat="euroEdition"></input><script>djConfig.searchIds.push("paramMenor");</script>
                   </td>
-                  <td class="TitleCell"><span class="LabelText">Currency</span></td>
-                  <td class="Combo_ContentCell">
-  		     		<select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
-     		      	<option value=""><div id="reportC_Currency_ID"></div></option>
-   		     		</select>
-		   		  </td>
                 </tr>
                 <tr>
                   <td class="TitleCell"><span class="LabelText">Ratio Greater Than</span></td>
@@ -822,7 +816,7 @@
                         </button>
                       </div>
                     </td>
-                    <td class="Button_LeftAlign_ContentCell" colspan="2">
+                    <td class="Button_LeftAlign_ContentCell" colspan="0">
                       <div>
                         <button type="button" 
                           class="ButtonLink" 
@@ -846,9 +840,12 @@
                         </button>
                       </div>
                     </td>
-                    <td class="ContentCell"></input>
-                    </td>
-                    <td class="ContentCell"></td>
+                    <td class="TitleCell"><span class="LabelText">Currency</span></td>
+                  <td class="Combo_ContentCell">
+  		     		<select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
+     		      	<option value=""><div id="reportC_Currency_ID"></div></option>
+   		     		</select>
+		   		  </td>
                   </tr>
 
 </table>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJRFilter.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJRFilter.html	Wed Mar 31 18:09:01 2010 +0200
@@ -369,12 +369,6 @@
                   <td class="TitleCell"><span class="LabelText">Less Than</span></td>
                   <td class="TextBox_ContentCell"> <input dojoType="openbravo:RealNumberTextbox" greaterThan="paramMayor" class="TextBox_OneCell_width" type="text" name="inpMenor" maxlength="10" id="paramMenor" value="" outputformat="euroEdition"></input><script>djConfig.searchIds.push("paramMenor");</script>
                   </td>
-                  <td class="TitleCell"><span class="LabelText">Currency</span></td>
-                  <td class="Combo_ContentCell">
-  		     <select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
-     		       <option value=""><div id="reportC_Currency_ID"></div></option>
-   		     </select>
-		   </td>
                 </tr>
                 <tr>
                   <td colspan="6">
@@ -813,7 +807,7 @@
                         </button>
                       </div>
                     </td>
-                    <td class="Button_LeftAlign_ContentCell" colspan="2">
+                    <td class="Button_LeftAlign_ContentCell" colspan="0">
                       <div>
                         <button type="button" 
                           class="ButtonLink" 
@@ -837,9 +831,12 @@
                         </button>
                       </div>
                     </td>
-                    <td class="ContentCell"></input>
-                    </td>
-                    <td class="ContentCell"></td>
+                    <td class="TitleCell"><span class="LabelText">Currency</span></td>
+                  <td class="Combo_ContentCell">
+		  		     <select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
+		     		       <option value=""><div id="reportC_Currency_ID"></div></option>
+		   		     </select>
+		   		</td>
                   </tr>
 
 </table>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJRFilter.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJRFilter.html	Wed Mar 31 18:09:01 2010 +0200
@@ -377,12 +377,6 @@
                   <td class="TitleCell"><span class="LabelText">Less Than</span></td>
                   <td class="TextBox_ContentCell"> <input dojoType="openbravo:RealNumberTextbox" greaterThan="paramMayor" class="TextBox_OneCell_width" type="text" name="inpMenor" maxlength="10" id="paramMenor" value="" outputformat="euroEdition"></input><script>djConfig.searchIds.push("paramMenor");</script>
                   </td>
-                   <td class="TitleCell"><span class="LabelText">Currency</span></td>
-                  <td class="Combo_ContentCell">
-  		     		<select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
-     		      	<option value=""><div id="reportC_Currency_ID"></div></option>
-   		     		</select>
-		   		  </td>
                 </tr>
                 <tr>
                   <td colspan="6">
@@ -813,7 +807,7 @@
                         </button>
                       </div>
                     </td>
-                    <td class="Button_LeftAlign_ContentCell" colspan="2">
+                    <td class="Button_LeftAlign_ContentCell" colspan="0">
                       <div>
                         <button type="button" 
                           class="ButtonLink" 
@@ -837,9 +831,12 @@
                         </button>
                       </div>
                     </td>
-                    <td class="ContentCell"></input>
-                    </td>
-                    <td class="ContentCell"></td>
+                    <td class="TitleCell"><span class="LabelText">Currency</span></td>
+                  <td class="Combo_ContentCell">
+  		     		<select name="inpCurrencyId" id="inpCurrencyId" class="ComboKey Combo_OneCell_width" required="true">
+     		      	<option value=""><div id="reportC_Currency_ID"></div></option>
+   		     		</select>
+		   		  </td>
                   </tr>
 
 </table>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.fo	Wed Mar 31 16:29:56 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,263 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2009 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
-	<fo:layout-master-set>
-		<fo:simple-page-master master-name="first" margin-left="1cm" page-height="29.7cm" page-width="21cm" margin-top="0.8cm" margin-right="1cm" margin-bottom="0.25cm">
-			<fo:region-before extent="3cm"/>
-			<fo:region-body margin-left="0cm" margin-right="0cm" margin-bottom="1cm" margin-top="3cm"/>
-		</fo:simple-page-master>
-	</fo:layout-master-set>
-	<fo:page-sequence master-reference="first">
-		<fo:static-content flow-name="xsl-region-before">
-			<fo:table>
-				<fo:table-column column-width="15.5cm"/>
-				<fo:table-column column-width="3.5cm"/>
-				<fo:table-body>
-					<fo:table-row>
-						<fo:table-cell border-bottom-width="0.5pt" border-bottom-style="solid" number-columns-spanned="2">
-							<fo:block font-size="14pt" text-align="center" padding-bottom="4pt" font-weight="bold">TRIAL BALANCE REPORT</fo:block>
-						</fo:table-cell>
-					</fo:table-row>
-					<fo:table-row>
-						<fo:table-cell>
-							<fo:block font-size="10pt" text-align="left" padding-top="2pt">
-								<fo:inline font-weight="bold">Enterprise:&#160;&#160;</fo:inline>
-								<fo:inline id="fieldCompanyName">xx</fo:inline>
-                                <fo:inline font-weight="bold">Organization:&#160;&#160;</fo:inline>
-                                <fo:inline id="fieldOrgName">xx</fo:inline>
-							</fo:block>
-						</fo:table-cell>
-						<fo:table-cell>
-							<fo:block font-size="10pt" text-align="left" padding-top="2pt">
-								<fo:inline font-weight="bold">Date:&#160;&#160;</fo:inline>
-								<fo:inline id="fieldDate">xx</fo:inline>
-							</fo:block>
-						</fo:table-cell>
-					</fo:table-row>
-					<fo:table-row>
-						<fo:table-cell number-columns-spanned="2">
-							<fo:block font-size="10pt" text-align="left" padding-top="2pt">
-								<fo:inline font-weight="bold">Conditions:&#160;&#160;</fo:inline>
-								<fo:inline>Period:&#160;&#160;</fo:inline>
-								<fo:inline id="fieldPeriod">xx</fo:inline>
-                                <fo:inline>&#160;&#160;Accounting schema:&#160;&#160;</fo:inline>
-                                <fo:inline id="fieldAccountingSchema">xx</fo:inline>
-							</fo:block>
-						</fo:table-cell>
-					</fo:table-row>
-					<fo:table-row>
-						<fo:table-cell number-columns-spanned="2">
-							<fo:block font-size="10pt" text-align="left" padding-top="2pt" font-weight="bold" id="fieldAccounting">xx</fo:block>
-						</fo:table-cell>
-					</fo:table-row>
-				</fo:table-body>
-			</fo:table>
-		</fo:static-content>
-    
-    <fo:flow font-size="8pt" flow-name="xsl-region-body" font-family="Helvetica">
-    <DIVFO id="sectionNoBP">      
-        <fo:table space-before.optimum="20pt" table-layout="fixed" id="selEliminar">
-          <fo:table-column column-width="2.5cm"/>
-          <fo:table-column column-width="6.5cm"/>
-          <fo:table-column column-width="2.5cm"/>
-          <fo:table-column column-width="2.5cm"/>
-          <fo:table-column column-width="2.5cm"/>
-          <fo:table-column column-width="2.5cm"/>
-          <fo:table-header>
-            <fo:table-row>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Account code</fo:block>
-              </fo:table-cell>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Description</fo:block>
-              </fo:table-cell>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Initial balance</fo:block>
-              </fo:table-cell>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Debt period</fo:block>
-              </fo:table-cell>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Credit period</fo:block>
-              </fo:table-cell>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Final balance</fo:block>
-              </fo:table-cell>
-            </fo:table-row>
-          </fo:table-header>
-          <fo:table-body>
-            <DIVFO id="sectionDetail">
-              <fo:table-row>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block padding-top="2pt" text-align="center" id="fieldAccount"/>
-                </fo:table-cell>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block font-size="8pt" padding-top="2pt" start-indent="2pt" text-align="left" id="fieldDescription"/>
-                </fo:table-cell>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block padding-top="2pt" end-indent="2pt" text-align="end" id="fieldSaldoInicial"/>
-                </fo:table-cell>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block padding-top="2pt" end-indent="2pt" text-align="end" id="fieldAmtacctdr"/>
-                </fo:table-cell>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block padding-top="2pt" end-indent="2pt" text-align="end" id="fieldAmtacctcr"/>
-                </fo:table-cell>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block padding-top="2pt" end-indent="2pt" text-align="end" id="fieldSaldoFinal"/>
-                </fo:table-cell>
-              </fo:table-row>
-            </DIVFO>
-            <fo:table-row>
-              <fo:table-cell number-columns-spanned="6">
-                <fo:block>&#160;</fo:block>
-              </fo:table-cell>
-            </fo:table-row>
-            <fo:table-row>
-              <fo:table-cell number-columns-spanned="6">
-                <fo:block>&#160;</fo:block>
-              </fo:table-cell>
-            </fo:table-row>
-            <fo:table-row>
-              <fo:table-cell number-columns-spanned="2">
-                <fo:block font-weight="bold" text-align="end" end-indent="2pt" padding-top="2pt">ADD AND KEEP GOING...</fo:block>
-              </fo:table-cell>
-              <fo:table-cell>
-                <fo:block font-weight="bold" text-align="end" end-indent="2pt" padding-top="2pt" id="fieldTotalSaldoInicial"/>
-              </fo:table-cell>
-              <fo:table-cell>
-                <fo:block font-weight="bold" text-align="end" end-indent="2pt" padding-top="2pt" id="fieldTotalAmtacctdr"/>
-              </fo:table-cell>
-              <fo:table-cell>
-                <fo:block font-weight="bold" text-align="end" end-indent="2pt" padding-top="2pt" id="fieldTotalAmtacctcr"/>
-              </fo:table-cell>
-              <fo:table-cell>
-                <fo:block font-weight="bold" text-align="end" end-indent="2pt" padding-top="2pt" id="fieldTotalSaldoFinal"/>
-              </fo:table-cell>
-            </fo:table-row>
-          </fo:table-body>
-        </fo:table>
-      <!--/fo:flow-->
-    </DIVFO>
-    
-    <DIVFO id="sectionBP">
-      <!--fo:flow font-size="8pt" flow-name="xsl-region-body" font-family="Helvetica"-->
-        <fo:table space-before.optimum="20pt" table-layout="fixed">
-           <fo:table-column column-width="19cm"/>
-           <fo:table-body>
-            <fo:table-row>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-              
-               <fo:block text-align="left" padding-top="2pt">
-								<fo:inline font-weight="bold">Business Partner:&#160;&#160;</fo:inline>
-								<fo:inline id="fieldPartner">xx</fo:inline>
-							</fo:block>
-               
-              </fo:table-cell>
-            </fo:table-row>
-          </fo:table-body>
-        </fo:table>
-      
-        <fo:table space-before.optimum="0pt" table-layout="fixed"><!-- id="selEliminar2"-->
-          <fo:table-column column-width="2.5cm"/>
-          <fo:table-column column-width="6.5cm"/>
-          <fo:table-column column-width="2.5cm"/>
-          <fo:table-column column-width="2.5cm"/>
-          <fo:table-column column-width="2.5cm"/>
-          <fo:table-column column-width="2.5cm"/>
-          <fo:table-header>
-            <fo:table-row>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Account code</fo:block>
-              </fo:table-cell>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Description</fo:block>
-              </fo:table-cell>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Initial balance</fo:block>
-              </fo:table-cell>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Debt period</fo:block>
-              </fo:table-cell>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Credit period</fo:block>
-              </fo:table-cell>
-              <fo:table-cell border-style="solid" border-width="0.5pt">
-                <fo:block font-weight="bold" padding-top="2pt" start-indent="2pt">Final balance</fo:block>
-              </fo:table-cell>
-            </fo:table-row>
-          </fo:table-header>
-          <fo:table-body>
-            <DIVFO id="sectionDetail2">
-              <fo:table-row>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block padding-top="2pt" text-align="center" id="fieldAccount2"/>
-                </fo:table-cell>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block font-size="8pt" padding-top="2pt" start-indent="2pt" text-align="left" id="fieldDescription2"/>
-                </fo:table-cell>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block padding-top="2pt" end-indent="2pt" text-align="end" id="fieldSaldoInicial2"/>
-                </fo:table-cell>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block padding-top="2pt" end-indent="2pt" text-align="end" id="fieldAmtacctdr2"/>
-                </fo:table-cell>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block padding-top="2pt" end-indent="2pt" text-align="end" id="fieldAmtacctcr2"/>
-                </fo:table-cell>
-                <fo:table-cell border-style="solid" border-width="0.5pt">
-                  <fo:block padding-top="2pt" end-indent="2pt" text-align="end" id="fieldSaldoFinal2"/>
-                </fo:table-cell>
-              </fo:table-row>
-            </DIVFO>
-            <fo:table-row>
-              <fo:table-cell number-columns-spanned="6">
-                <fo:block>&#160;</fo:block>
-              </fo:table-cell>
-            </fo:table-row>
-            <fo:table-row>
-              <fo:table-cell number-columns-spanned="6">
-                <fo:block>&#160;</fo:block>
-              </fo:table-cell>
-            </fo:table-row>
-            <fo:table-row>
-              <fo:table-cell number-columns-spanned="2">
-                <fo:block font-weight="bold" text-align="end" end-indent="2pt" padding-top="2pt">ADD AND KEEP GOING...</fo:block>
-              </fo:table-cell>
-              <fo:table-cell>
-                <fo:block font-weight="bold" text-align="end" end-indent="2pt" padding-top="2pt" id="fieldTotalSaldoInicial2"/>
-              </fo:table-cell>
-              <fo:table-cell>
-                <fo:block font-weight="bold" text-align="end" end-indent="2pt" padding-top="2pt" id="fieldTotalAmtacctdr2"/>
-              </fo:table-cell>
-              <fo:table-cell>
-                <fo:block font-weight="bold" text-align="end" end-indent="2pt" padding-top="2pt" id="fieldTotalAmtacctcr2"/>
-              </fo:table-cell>
-              <fo:table-cell>
-                <fo:block font-weight="bold" text-align="end" end-indent="2pt" padding-top="2pt" id="fieldTotalSaldoFinal2"/>
-              </fo:table-cell>
-            </fo:table-row>
-          </fo:table-body>
-        </fo:table>
-      
-    </DIVFO>
-    </fo:flow>
-	</fo:page-sequence>
-</fo:root>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.xml	Wed Mar 31 16:29:56 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*************************************************************************
-* The contents of this file are subject to the Openbravo  Public  License
-* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
-* Version 1.1  with a permitted attribution clause; you may not  use this
-* file except in compliance with the License. You  may  obtain  a copy of
-* the License at http://www.openbravo.com/legal/license.html 
-* Software distributed under the License  is  distributed  on  an "AS IS"
-* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-* License for the specific  language  governing  rights  and  limitations
-* under the License. 
-* The Original Code is Openbravo ERP. 
-* The Initial Developer of the Original Code is Openbravo SLU 
-* All portions are Copyright (C) 2001-2009 Openbravo SLU 
-* All Rights Reserved. 
-* Contributor(s):  ______________________________________.
-************************************************************************
--->
-<REPORT>
-  <template file="ReportTrialBalancePDF.fo"/>
-  <!--PARAMETER id="paramDirectory" name="directory" default=""/>
-<PARAMETER id="paramLanguage" name="paramLanguage" default=""/>
-<PARAMETER id="paramDateFrom" name="dateFrom" attribute="value"/>
-<PARAMETER id="paramDateTo" name="dateTo" attribute="value"/>
-<PARAMETER id="parameterReg" name="constantReg" default="-1"/>
-<PARAMETER id="paramReg" name="Reg" boolean="checked" withId="parameterReg"/>
-<PARAMETER id="parameterClose" name="constantClose" default="-1"/>
-<PARAMETER id="paramClose" name="Close" boolean="checked" withId="parameterClose"/>
-<PARAMETER id="parameterOnly" name="constantOnly" default="-1"/>
-<PARAMETER id="paramOnly" name="Only" boolean="checked" withId="parameterOnly"/>
-<PARAMETER id="paramAD_ORGID" name="adOrgId"/>
-<PARAMETER id="paramLevel" name="Level"/-->
-  <PARAMETER id="fieldCompanyName" name="companyName" replaceCharacters="fo"/>
-  <PARAMETER id="fieldOrgName" name="orgName" replaceCharacters="fo"/>
-  <PARAMETER id="fieldDate" name="date" replaceCharacters="fo"/>
-  <PARAMETER id="fieldPeriod" name="period" replaceCharacters="fo"/>
-  <PARAMETER id="fieldAccountingSchema" name="accountingSchema" replaceCharacters="fo"/>
-  <PARAMETER id="fieldAccounting" name="accounting" replaceCharacters="fo"/>
-  <structure name="structure1">
-    <FIELD id="fieldAccount" replaceCharacters="fo">accountId</FIELD>
-    <FIELD id="fieldDescription" replaceCharacters="fo">name</FIELD>
-    <FIELD id="fieldAmtacctdr" format="euroInform">amtacctdr</FIELD>
-    <FIELD id="fieldAmtacctcr" format="euroInform">amtacctcr</FIELD>
-    <FIELD id="fieldSaldoInicial" format="euroInform">saldoInicial</FIELD>
-    <FIELD id="fieldSaldoFinal" format="euroInform">saldoFinal</FIELD>
-    <FIELD id="fieldId" attribute="onclick" replace="xx">id</FIELD>
-    <!--SUBREPORT id="reportAD_ORGID" name="reportAD_ORGID" report="org/openbravo/erpCommon/reference/List">
-    <ARGUMENT name="parameterListSelected" withId="paramAD_ORGID"/></SUBREPORT>
-
-  <SUBREPORT id="reportLevel" name="reportLevel" report="org/openbravo/erpCommon/reference/List">
-    <ARGUMENT name="parameterListSelected" withId="paramLevel"/></SUBREPORT-->
-  <FUNCTION id="fieldTotalAmtacctdr" name="SUM" format="euroInform">amtacctdr</FUNCTION>
-  <FUNCTION id="fieldTotalAmtacctcr" name="SUM" format="euroInform">amtacctcr</FUNCTION>
-  <FUNCTION id="fieldTotalSaldoInicial" name="SUM" format="euroInform">saldoInicial</FUNCTION>
-  <FUNCTION id="fieldTotalSaldoFinal" name="SUM" format="euroInform">saldoFinal</FUNCTION>
-  <DISCARD id="discard"/>
-  <!--SECTION id="sectionDiscard"/-->
-  <SECTION id="sectionDetail"/>
-</structure>
-
-
-<structure name="structure2">
-  <FIELD id="fieldPartner" replaceCharacters="fo">bp</FIELD>
-  <FIELD id="fieldAccount2" replaceCharacters="fo">accountId</FIELD>
-  <FIELD id="fieldDescription2" replaceCharacters="fo">name</FIELD>
-  <FIELD id="fieldAmtacctdr2" format="euroInform">amtacctdr</FIELD>
-  <FIELD id="fieldAmtacctcr2" format="euroInform">amtacctcr</FIELD>
-  <FIELD id="fieldSaldoInicial2" format="euroInform">saldoInicial</FIELD>
-  <FIELD id="fieldSaldoFinal2" format="euroInform">saldoFinal</FIELD>
-  <FIELD id="fieldId2" attribute="onclick" replace="xx">id</FIELD>
-
-  <FUNCTION id="fieldTotalAmtacctdr2" name="SUM" format="euroInform">amtacctdr</FUNCTION>
-  <FUNCTION id="fieldTotalAmtacctcr2" name="SUM" format="euroInform">amtacctcr</FUNCTION>
-  <FUNCTION id="fieldTotalSaldoInicial2" name="SUM" format="euroInform">saldoInicial</FUNCTION>
-  <FUNCTION id="fieldTotalSaldoFinal2" name="SUM" format="euroInform">saldoFinal</FUNCTION>
-  <SECTION id="sectionDetail2"/>
-  <SECTION id="sectionBP" field="bp"/>
-</structure>
-</REPORT>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.html	Wed Mar 31 18:09:01 2010 +0200
@@ -352,7 +352,7 @@
                       </tr>
                       <tr class="DataGrid_Body_Row">
                         <th class="DataGrid_Header_Cell" width="40%">Product</th>
-                        <th class="DataGrid_Header_Cell" width="20%">Serial No.</th>
+                        <th class="DataGrid_Header_Cell" width="20%">Serial No / Attribute.</th>
                         <th class="DataGrid_Header_Cell" width="20%">Unit</th>
                         <th class="DataGrid_Header_Cell" width="20%" style="text-align:right;">Quantity</th>
                       </tr>
--- a/src/org/openbravo/erpCommon/businessUtility/WindowTabs.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/businessUtility/WindowTabs.java	Wed Mar 31 18:09:01 2010 +0200
@@ -315,7 +315,7 @@
       if (isFirst)
         text.append("      <span class=\"tabTitle_elements_container\">\n");
       if (isFirst)
-        text.append("        <span class=\"tabTitle_elements_text\">").append(this.Title).append(
+        text.append("        <span class=\"tabTitle_elements_text\" id=\"tabTitle_text\">").append(this.Title).append(
             "</span>\n");
       if (isFirst)
         text
@@ -422,7 +422,7 @@
     if (!hasParent)
       text.append("      <span class=\"tabTitle_elements_container\">\n");
     if (!hasParent)
-      text.append("        <span class=\"tabTitle_elements_text\">").append(this.Title).append(
+      text.append("        <span class=\"tabTitle_elements_text\" id=\"tabTitle_text\">").append(this.Title).append(
           "</span>\n");
     if (!hasParent)
       text
--- a/src/org/openbravo/erpCommon/obps/ActivationKey.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/obps/ActivationKey.java	Wed Mar 31 18:09:01 2010 +0200
@@ -347,13 +347,13 @@
         int activeSessions = 0;
         try {
           activeSessions = getActiveSessions(currentSession);
-          log4j.info("Active sessions: " + activeSessions);
+          log4j.debug("Active sessions: " + activeSessions);
           if (activeSessions >= maxUsers || (softUsers != null && activeSessions >= softUsers)) {
             // Before raising concurrent users error, clean the session with ping timeout and try it
             // again
-            if (deactivateTimeOutSessions()) {
+            if (deactivateTimeOutSessions(currentSession)) {
               activeSessions = getActiveSessions(currentSession);
-              log4j.info("Active sessions after timeout cleanup: " + activeSessions);
+              log4j.debug("Active sessions after timeout cleanup: " + activeSessions);
             }
           }
         } catch (Exception e) {
@@ -386,7 +386,7 @@
    * <p/>
    * PING_TIMEOUT_SECS is hardcoded to 120s, pings are hardcoded in front-end to 50s.
    */
-  private boolean deactivateTimeOutSessions() {
+  private boolean deactivateTimeOutSessions(String currentSessionId) {
     // Last valid ping time is current time substract timeout seconds
     Calendar cal = Calendar.getInstance();
     cal.add(Calendar.SECOND, (-1) * PING_TIMEOUT_SECS);
@@ -398,6 +398,7 @@
     obCriteria.add(Expression.and(Expression.eq(Session.PROPERTY_SESSIONACTIVE, true), Expression
         .or(Expression.isNull(Session.PROPERTY_LASTPING), Expression.lt(Session.PROPERTY_LASTPING,
             lastValidPingTime))));
+    obCriteria.add(Expression.ne(Session.PROPERTY_ID, currentSessionId));
 
     boolean sessionDeactivated = false;
     for (Session expiredSession : obCriteria.list()) {
--- a/src/org/openbravo/erpCommon/security/Login.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/security/Login.java	Wed Mar 31 18:09:01 2010 +0200
@@ -99,6 +99,11 @@
       xmlDocument.setParameter("frame1", strDetalle);
     }
 
+    String jsConstants = "\nvar isMenuHide = false; \n var isRTL = " + "RTL".equals(textDirection)
+        + "; \n var menuWidth = '25%';\n var isMenuBlock = false;\n";
+
+    xmlDocument.setParameter("jsConstants", jsConstants);
+    xmlDocument.setParameter("framesetMenu", "25");
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();
     out.println(xmlDocument.print());
--- a/src/org/openbravo/erpCommon/security/Login_F1.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/security/Login_F1.html	Wed Mar 31 18:09:01 2010 +0200
@@ -90,7 +90,7 @@
       clearForm();
     } catch (e) {}
     setWindowElementFocus('firstElement');
-    if ((!revisionControl('6687')) || (isOpsInstance() != isOpsInstanceCached())) {
+    if ((!revisionControl('6815')) || (isOpsInstance() != isOpsInstanceCached())) {
       alert(cacheMsg);
     }
 
--- a/src/org/openbravo/erpCommon/security/Login_FS.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/security/Login_FS.html	Wed Mar 31 18:09:01 2010 +0200
@@ -21,7 +21,8 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>Openbravo</title>
 <link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
-<script language="JavaScript" type="text/javascript">
+<script type="text/javascript" id="jsConstants">
+  // WARNING: This variables come modified from the backend
   var isMenuHide = false;
   var isMenuBlock = false;
   var isRTL = false;
--- a/src/org/openbravo/erpCommon/security/Login_FS.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/security/Login_FS.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -10,16 +10,18 @@
  * Software distributed under the License  is  distributed  on  an "AS IS"
  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
 -->
 <REPORT>
 	<template file="Login_FS.html"/>
+    <PARAMETER id="jsConstants" name="jsConstants" default="" />
+    <PARAMETER id="framesetMenu" name="framesetMenu" attribute="cols" replace="25" />
 	<PARAMETER id="paramFrame1" name="frame1" attribute="src"/>
 	<PARAMETER id="paramFrameMenu" name="frameMenu" attribute="src"/>
 	<PARAMETER id="paramFrameMenuLoading" name="frameMenuLoading" attribute="src"/>
--- a/src/org/openbravo/erpCommon/security/Login_FS_RTL.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/security/Login_FS_RTL.html	Wed Mar 31 18:09:01 2010 +0200
@@ -21,7 +21,8 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>Openbravo</title>
 <link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
-<script language="JavaScript" type="text/javascript">
+<script type="text/javascript" id="jsConstants">
+  // WARNING: This variables come modified from the backend
   var isMenuHide = false;
   var isRTL = true;
   var menuWidth = '25%';
--- a/src/org/openbravo/erpCommon/security/Login_FS_RTL.xml	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/security/Login_FS_RTL.xml	Wed Mar 31 18:09:01 2010 +0200
@@ -10,16 +10,18 @@
  * Software distributed under the License  is  distributed  on  an "AS IS"
  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
 -->
 <REPORT>
 	<template file="Login_FS_RTL.html"/>
+    <PARAMETER id="jsConstants" name="jsConstants" default="" />
+    <PARAMETER id="framesetMenu" name="framesetMenu" attribute="cols" replace="25" />
 	<PARAMETER id="paramFrame1" name="frame1" attribute="src"/>
 	<PARAMETER id="paramFrameMenu" name="frameMenu" attribute="src"/>
 	<PARAMETER id="paramFrameMenuLoading" name="frameMenuLoading" attribute="src"/>
--- a/src/org/openbravo/erpCommon/security/Menu.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/security/Menu.java	Wed Mar 31 18:09:01 2010 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2009 Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -44,6 +44,9 @@
 
 public class Menu extends HttpSecureAppServlet {
   private static final long serialVersionUID = 1L;
+  private static String[] hideMenuValues = { "", "true", "false" };
+  private static ValueListFilter menuFilter = new ValueListFilter(Menu.hideMenuValues);
+  private static String DEFAULT_MENU_WIDTH = "25"; // Percentage of the page width used by the menu
 
   /** Creates a new instance of Menu */
   public Menu() {
@@ -55,15 +58,25 @@
     VariablesSecureApp vars = new VariablesSecureApp(request);
     String targetmenu = getTargetMenu(vars, queryString);
 
+    String hideMenu = vars.getStringParameter("hideMenu", menuFilter);
+
     String textDirection = vars.getSessionValue("#TextDirection", "LTR");
-    printPageFrameIdentificacion(response, "../utility/VerticalMenu.html",
-        (targetmenu.equals("") ? "../utility/Home.html" : targetmenu),
-        "../utility/VerticalMenu.html?Command=LOADING", textDirection);
+
+    String menuLoadingURL = "../utility/VerticalMenu.html?Command=LOADING";
+    String menuURL = "../utility/VerticalMenu.html";
+
+    if ("true".equals(hideMenu)) {
+      menuLoadingURL = "about:blank";
+      menuURL += "?Command=HIDE";
+    }
+
+    printPageFrameIdentificacion(response, menuURL, (targetmenu.equals("") ? "../utility/Home.html"
+        : targetmenu), menuLoadingURL, textDirection, hideMenu);
   }
 
   private void printPageFrameIdentificacion(HttpServletResponse response, String strMenu,
-      String strDetalle, String strMenuLoading, String textDirection) throws IOException,
-      ServletException {
+      String strDetalle, String strMenuLoading, String textDirection, String hideMenu)
+      throws IOException, ServletException {
     XmlDocument xmlDocument;
     if (textDirection.equals("RTL")) {
       xmlDocument = xmlEngine.readXmlTemplate("org/openbravo/erpCommon/security/Login_FS_RTL")
@@ -72,6 +85,15 @@
       xmlDocument = xmlEngine.readXmlTemplate("org/openbravo/erpCommon/security/Login_FS")
           .createXmlDocument();
     }
+
+    String menuWidth = "true".equals(hideMenu) ? "0" : DEFAULT_MENU_WIDTH;
+
+    String jsConstants = "\nvar isMenuHide = " + "true".equals(hideMenu) + "; \n var isRTL = "
+        + "RTL".equals(textDirection) + "; \n var menuWidth = '" + menuWidth
+        + "%';\n var isMenuBlock = " + "true".equals(hideMenu) + ";\n";
+
+    xmlDocument.setParameter("jsConstants", jsConstants);
+    xmlDocument.setParameter("framesetMenu", menuWidth);
     xmlDocument.setParameter("frameMenuLoading", strMenuLoading);
     xmlDocument.setParameter("frameMenu", strMenu);
     xmlDocument.setParameter("frame1", strDetalle);
@@ -106,23 +128,29 @@
 
     try { // Trying to deep-link
 
-      OBContext.setAdminContext();
+      OBContext.enableAsAdminContext();
 
       final String tabId = vars.getStringParameter("tabId", IsIDFilter.instance);
-      final String windowId = vars.getStringParameter("windowId", IsIDFilter.instance);
+      String windowId = vars.getStringParameter("windowId", IsIDFilter.instance);
       final String recordId = vars.getStringParameter("recordId", IsIDFilter.instance);
       String viewType = "RELATION";
 
-      if (tabId.equals("") || windowId.equals("")) {
+      if (tabId.equals("")) {
         return "";
       }
 
       final Tab tab = OBDal.getInstance().get(Tab.class, tabId);
-      final Window window = OBDal.getInstance().get(Window.class, windowId);
 
-      if (!tab.getWindow().equals(window)) {
-        log4j.error("Invalid deep-link URL: tab doesn't belong to window");
-        return "";
+      if (!windowId.equals("")) {
+        final Window window = OBDal.getInstance().get(Window.class, windowId);
+
+        if (!tab.getWindow().equals(window)) {
+          log4j.error("Invalid deep-link URL: tab " + tabId + " doesn't belong to window "
+              + windowId);
+          return "";
+        }
+      } else {
+        windowId = tab.getWindow().getId();
       }
 
       if (tab.getTabLevel() > 0 && recordId.equals("")) {
--- a/src/org/openbravo/erpCommon/security/SessionLogin.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/security/SessionLogin.java	Wed Mar 31 18:09:01 2010 +0200
@@ -20,13 +20,21 @@
 
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.util.Date;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.log4j.Logger;
+import org.openbravo.base.provider.OBProvider;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.erpCommon.utility.SequenceIdData;
+import org.openbravo.model.ad.access.Session;
+import org.openbravo.model.ad.access.User;
+import org.openbravo.model.ad.system.Client;
+import org.openbravo.model.common.enterprise.Organization;
 
 public class SessionLogin {
   static Logger log4j = Logger.getLogger(SessionLogin.class);
@@ -40,6 +48,8 @@
   protected String remoteHost;
   protected String processed = "N";
   protected String serverUrl;
+  private String username;
+  private String status;
 
   public SessionLogin(String ad_client_id, String ad_org_id, String ad_user_id)
       throws ServletException {
@@ -94,21 +104,75 @@
           + " - Remote Host: " + getRemoteHost());
   }
 
-  public int save(ConnectionProvider conn) throws ServletException {
+  public int save() throws ServletException {
     if (getSessionID().equals("")) {
       String key = SequenceIdData.getUUID();
       SessionListener.addSession(key);
       if (key == null || key.equals(""))
         throw new ServletException("SessionLogin.save() - key creation failed");
       setSessionID(key);
-      return SessionLoginData.insert(conn, getSessionID(), getClient(), getOrg(), getIsActive(),
-          getUser(), getWebSession(), getRemoteAddr(), getRemoteHost(), getProcessed(), serverUrl);
-    } else
-      return SessionLoginData.update(conn, getIsActive(), getUser(), getWebSession(),
-          getRemoteAddr(), getRemoteHost(), getProcessed(), getSessionID());
+    }
+    try {
+      OBContext.enableAsAdminContext();
+      Session session = OBProvider.getInstance().get(Session.class);
+
+      session.setCreationDate(new Date());
+      session.setUpdated(new Date());
+      session.setClient(OBDal.getInstance().get(Client.class, getClient()));
+      session.setOrganization(OBDal.getInstance().get(Organization.class, getOrg()));
+      session.setActive(getIsActive());
+      User user1 = OBDal.getInstance().get(User.class, getUser());
+      session.setCreatedBy(user1);
+      session.setUpdatedBy(user1);
+      session.setWebSession(getWebSession());
+      session.setRemoteAddress(getRemoteAddr());
+      session.setRemoteHost(getRemoteHost());
+      session.setProcessed(getProcessed());
+      session.setServerUrl(serverUrl);
+      // save inactive session for failed and webservice logins
+      boolean sessionActive = !status.equals("F") && !status.equals("WS");
+      session.setSessionActive(sessionActive);
+      session.setLoginStatus(status);
+      session.setUsername(username);
+      OBDal.getInstance().save(session);
+      OBDal.getInstance().flush();
+      setSessionID(session.getId());
+      return 1;
+    } catch (Exception e) {
+      log4j.error("Error saving session in DB", e);
+      return 0;
+    } finally {
+      OBContext.resetAsAdminContext();
+    }
   }
 
-  private void setSessionID(String newValue) {
+  /**
+   * @deprecated use save() instead
+   */
+  public int save(ConnectionProvider conn) throws ServletException {
+    return save();
+  }
+
+  public void update(ConnectionProvider conn) throws ServletException {
+    try {
+      OBContext.enableAsAdminContext();
+      Session session = OBDal.getInstance().get(Session.class, getSessionID());
+      session.setActive(getIsActive());
+      User user1 = OBDal.getInstance().get(User.class, getUser());
+      session.setUpdatedBy(user1);
+      session.setWebSession(getWebSession());
+      session.setRemoteAddress(getRemoteAddr());
+      session.setRemoteHost(getRemoteHost());
+      session.setProcessed(getProcessed());
+      OBDal.getInstance().flush();
+    } catch (Exception e) {
+      log4j.error("Error updating session in DB", e);
+    } finally {
+      OBContext.resetAsAdminContext();
+    }
+  }
+
+  public void setSessionID(String newValue) {
     this.sessionID = (newValue == null) ? "" : newValue;
   }
 
@@ -136,8 +200,8 @@
     this.isactive = (newValue == null) ? "Y" : newValue;
   }
 
-  private String getIsActive() {
-    return (this.isactive);
+  private boolean getIsActive() {
+    return (this.isactive.equals("Y"));
   }
 
   private void setUser(String newValue) {
@@ -176,7 +240,15 @@
     this.processed = (newValue == null) ? "" : newValue;
   }
 
-  private String getProcessed() {
-    return ((this.processed == null) ? "" : this.processed);
+  private boolean getProcessed() {
+    return ((this.processed == null) ? false : this.processed.equals("Y"));
+  }
+
+  public void setUserName(String strUser) {
+    username = strUser;
+  }
+
+  public void setStatus(String status) {
+    this.status = status;
   }
 }
--- a/src/org/openbravo/erpCommon/security/SessionLogin_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/security/SessionLogin_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -12,16 +12,12 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2009 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
 -->
 
-
-
-
-
 <SqlClass name="SessionLoginData" package="org.openbravo.erpCommon.security">
    <SqlClassComment></SqlClassComment>
    <SqlMethod name="select" type="preparedStatement" return="multiple">
@@ -31,41 +27,6 @@
       </Sql>
       <Field name="supportContact" value=""/>
    </SqlMethod>
-   <SqlMethod name="insert" type="preparedStatement" return="rowCount">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        INSERT INTO AD_SESSION (AD_SESSION_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, 
-        WEBSESSION, REMOTE_ADDR, REMOTE_HOST, PROCESSED, SESSION_ACTIVE, SERVER_URL) 
-        VALUES (?, ?, ?, ?, now(), ?, now(), ?, 
-        ?, ?, ?, ?, 'Y',?)
-      </Sql>
-      <Parameter name="adSessionId"/>
-      <Parameter name="adClientId"/>
-      <Parameter name="adOrgId"/>
-      <Parameter name="isactive"/>
-      <Parameter name="adUserId"/>
-      <Parameter name="adUserId"/>
-      <Parameter name="websession"/>
-      <Parameter name="remoteAddr"/>
-      <Parameter name="remoteHost"/>
-      <Parameter name="processed"/>
-      <Parameter name="serverURL"/>
-   </SqlMethod>
-   <SqlMethod name="update" type="preparedStatement" return="rowCount">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        UPDATE AD_SESSION SET ISACTIVE = ?, UPDATED = now(), UPDATEDBY = ?, 
-        WEBSESSION = ?, REMOTE_ADDR = ?, REMOTE_HOST = ?, PROCESSED = ? 
-        WHERE AD_SESSION_ID = ?
-      </Sql>
-      <Parameter name="isactive"/>
-      <Parameter name="adUserId"/>
-      <Parameter name="websession"/>
-      <Parameter name="remoteAddr"/>
-      <Parameter name="remoteHost"/>
-      <Parameter name="processed"/>
-      <Parameter name="adSessionId"/>
-   </SqlMethod>
    
     <SqlMethod name="deactivate" type="preparedStatement" return="rowCount">
     <Sql><![CDATA[
--- a/src/org/openbravo/erpCommon/utility/VerticalMenu.html	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/utility/VerticalMenu.html	Wed Mar 31 18:09:01 2010 +0200
@@ -179,10 +179,8 @@
 
       function getAppUrlFromMenu() {
         var url = window.location.href;
-        url = url.replace("/utility/VerticalMenu.html","");
-        if (url.lastIndexOf("#") == url.length - 1) {
-          url = url.substring(0, url.length - 1);
-        }
+        var pos = url.lastIndexOf("/utility/VerticalMenu.html");
+        url = url.substring(0, pos);
         return url;
       }
 
--- a/src/org/openbravo/erpCommon/utility/VerticalMenu.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/utility/VerticalMenu.java	Wed Mar 31 18:09:01 2010 +0200
@@ -65,6 +65,8 @@
       printPageAlert(response, vars);
     } else if (vars.commandIn("LOADING")) {
       printPageLoadingMenu(response, vars);
+    } else if (vars.commandIn("HIDE")) {
+      printPageHideMenu(response, vars);
     } else
       throw new ServletException();
   }
@@ -156,6 +158,30 @@
     out.close();
   }
 
+  private void printPageHideMenu(HttpServletResponse response, VariablesSecureApp vars)
+      throws IOException, ServletException {
+    if (log4j.isDebugEnabled())
+      log4j.debug("Output: Vertical Menu's screen");
+
+    final XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
+        "org/openbravo/erpCommon/utility/VerticalMenu").createXmlDocument();
+
+    xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
+    xmlDocument.setParameter("theme", vars.getTheme());
+    xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";");
+    xmlDocument.setParameter("autosave", "var autosave = "
+        + (vars.getSessionValue("#Autosave").equals("")
+            || vars.getSessionValue("#Autosave").equalsIgnoreCase("N") ? "false" : "true") + ";");
+
+    xmlDocument.setParameter("menu", "");
+    xmlDocument.setParameter("userName", MenuData.getUserName(this, vars.getUser()));
+
+    response.setContentType("text/html; charset=UTF-8");
+    final PrintWriter out = response.getWriter();
+    out.println(xmlDocument.print());
+    out.close();
+  }
+
   private void printPageLoadingMenu(HttpServletResponse response, VariablesSecureApp vars)
       throws IOException, ServletException {
     final XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
--- a/src/org/openbravo/erpCommon/utility/WindowTreeChecks_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/utility/WindowTreeChecks_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2009 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -52,13 +52,15 @@
         <Parameter name="node"/>        
    </SqlMethod>
    
-      <SqlMethod name="isMenuItemInDev" type="preparedStatement" return="boolean">
+    <SqlMethod name="isMenuItemInDev" type="preparedStatement" return="boolean">
       <Sql>
         SELECT COUNT(*)
-          FROM AD_MENU M, AD_MODULE O
-         WHERE AD_MENU_ID = ?
-           AND O.AD_MODULE_ID = M.AD_MODULE_ID
-           AND O.ISINDEVELOPMENT='Y'
+          FROM AD_MENU M, AD_MODULE O, AD_MODULE t
+         WHERE (AD_MENU_ID = ?
+                AND O.AD_MODULE_ID = M.AD_MODULE_ID
+                AND O.ISINDEVELOPMENT='Y')
+            OR (t.type='T'
+                AND t.isindevelopment='Y')
       </Sql>
       <Parameter name="nodeId"/>  
    </SqlMethod>
--- a/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -28,7 +28,10 @@
       <SqlMethodComment></SqlMethodComment>
       <Sql>
         SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo,tb.IsActive, m.AD_Menu_ID AS ID, m.Name,m.Description,m.IsSummary,
-        m.Action, m.AD_Window_ID, m.AD_Process_ID, m.AD_Form_ID, m.AD_Workflow_ID, m.AD_Task_ID, Mo.ISINDEVELOPMENT, 
+        m.Action, m.AD_Window_ID, m.AD_Process_ID, m.AD_Form_ID, m.AD_Workflow_ID, m.AD_Task_ID, 
+        (case when (select count(*) from ad_module where type='T' and isindevelopment='Y')=0 
+               then Mo.ISINDEVELOPMENT 
+               else 'Y' end) as isInDevelopment, 
         '' as IsReady, '' as AD_OrgType_ID
         FROM AD_TreeNode tn left join AD_TreeBar tb on tn.AD_Tree_ID=tb.AD_Tree_ID 
                                                   AND tn.Node_ID=tb.Node_ID 
@@ -51,7 +54,10 @@
       <Sql>
         SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo,tb.IsActive, m.AD_Menu_ID AS ID, 
                COALESCE (t.Name, m.Name) as name,t.Description,m.IsSummary,
-        m.Action, m.AD_Window_ID, m.AD_Process_ID, m.AD_Form_ID, m.AD_Workflow_ID, m.AD_Task_ID, Mo.ISINDEVELOPMENT
+        m.Action, m.AD_Window_ID, m.AD_Process_ID, m.AD_Form_ID, m.AD_Workflow_ID, m.AD_Task_ID,
+        (case when (select count(*) from ad_module where type='T' and isindevelopment='Y')=0 
+               then Mo.ISINDEVELOPMENT 
+               else 'Y' end) as isInDevelopment
         FROM AD_TreeNode tn left join AD_TreeBar tb on tn.AD_Tree_ID=tb.AD_Tree_ID  
                                                       AND tn.Node_ID=tb.Node_ID
                                                       AND tb.AD_User_ID  = ? , 
--- a/src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesImpl.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesImpl.java	Wed Mar 31 18:09:01 2010 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2009 Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -30,7 +30,9 @@
 import org.apache.axis.transport.http.HTTPConstants;
 import org.apache.log4j.Logger;
 import org.openbravo.base.ConnectionProviderContextListener;
+import org.openbravo.base.secureApp.UserLock;
 import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.security.SessionLogin;
 import org.openbravo.erpCommon.utility.SequenceIdData;
 
 public class ExternalSalesImpl implements ExternalSales {
@@ -50,13 +52,45 @@
     initPool();
   }
 
+  /**
+   * Check access and block user if needed
+   */
   private boolean access(String username, String password) {
     try {
-      return !ExternalSalesOrderData.access(pool, username, password).equals("0");
+      UserLock lockSettings = new UserLock(username);
+      lockSettings.delayResponse();
+      if (lockSettings.isLockedUser()) {
+        return false;
+      }
+      String strUserAuth = ExternalSalesOrderData.access(pool, username, password);
+      boolean hasAccess = strUserAuth != null && !strUserAuth.isEmpty();
+      createDBSession(username, strUserAuth);
+      if (strUserAuth == null) {
+        lockSettings.addFail();
+      }
+
+      return hasAccess;
     } catch (Exception e) {
       return false;
     }
+  }
 
+  private void createDBSession(String strUser, String strUserAuth) {
+    try {
+      String usr = strUserAuth == null ? "0" : strUserAuth;
+
+      final SessionLogin sl = new SessionLogin("0", "0", usr);
+
+      if (strUserAuth == null) {
+        sl.setStatus("F");
+      } else {
+        sl.setStatus("WS");
+      }
+      sl.setUserName(strUser);
+      sl.save();
+    } catch (Exception e) {
+      log4j.error("Error creating DB session", e);
+    }
   }
 
   public Product[] getProductsCatalog(String ClientID, String organizationId, String salesChannel,
--- a/src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesOrder_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesOrder_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -135,7 +135,7 @@
     <SqlMethodComment></SqlMethodComment>
     <Sql>
       <![CDATA[
-         SELECT COUNT(*) AS ACC
+         SELECT u.ad_user_id AS ACC
 				   FROM AD_USER       U, 
 					      AD_USER_ROLES R,
 								AD_TASK_ACCESS A,
--- a/src/org/openbravo/erpCommon/ws/services/WebServiceImpl.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ws/services/WebServiceImpl.java	Wed Mar 31 18:09:01 2010 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2010 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -26,7 +26,9 @@
 import org.apache.axis.transport.http.HTTPConstants;
 import org.apache.log4j.Logger;
 import org.openbravo.base.ConnectionProviderContextListener;
+import org.openbravo.base.secureApp.UserLock;
 import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.security.SessionLogin;
 
 public class WebServiceImpl implements WebService {
   protected static ConnectionProvider pool;
@@ -36,14 +38,47 @@
     initPool();
   }
 
+  /**
+   * Check access and block user if needed
+   */
   private boolean access(String username, String password) {
     try {
-      return !WebServicesData.hasAccess(pool, username, password).equals("0");
+      UserLock lockSettings = new UserLock(username);
+      lockSettings.delayResponse();
+      if (lockSettings.isLockedUser()) {
+        return false;
+      }
+      String strUserAuth = WebServicesData.hasAccess(pool, username, password);
+      boolean hasAccess = strUserAuth != null && !strUserAuth.isEmpty();
+      createDBSession(username, strUserAuth);
+      if (strUserAuth == null) {
+        lockSettings.addFail();
+      }
+
+      return hasAccess;
     } catch (Exception e) {
       return false;
     }
   }
 
+  private void createDBSession(String strUser, String strUserAuth) {
+    try {
+      String usr = strUserAuth == null ? "0" : strUserAuth;
+
+      final SessionLogin sl = new SessionLogin("0", "0", usr);
+
+      if (strUserAuth == null) {
+        sl.setStatus("F");
+      } else {
+        sl.setStatus("WS");
+      }
+      sl.setUserName(strUser);
+      sl.save();
+    } catch (Exception e) {
+      log4j.error("Error creating DB session", e);
+    }
+  }
+
   public Customer[] getCustomers(String clientId, String username, String password) {
     Customer[] customers = null;
     if (!access(username, password)) {
--- a/src/org/openbravo/erpCommon/ws/services/WebServices_data.xsql	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/erpCommon/ws/services/WebServices_data.xsql	Wed Mar 31 18:09:01 2010 +0200
@@ -24,7 +24,7 @@
     <SqlMethodComment></SqlMethodComment>
 	    <Sql>
 	      <![CDATA[
-	         SELECT COUNT(*) AS AUTH
+	         SELECT AD_USER_ID AS AUTH
 		       FROM AD_USER  U						      
 			  WHERE U.USERNAME = ? 
 	            AND U.PASSWORD = ?				
--- a/src/org/openbravo/service/web/BaseWebServiceServlet.java	Wed Mar 31 16:29:56 2010 +0200
+++ b/src/org/openbravo/service/web/BaseWebServiceServlet.java	Wed Mar 31 18:09:01 2010 +0200
@@ -29,11 +29,13 @@
 
 import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Logger;
+import org.openbravo.base.HttpBaseUtils;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.exception.OBSecurityException;
 import org.openbravo.base.secureApp.LoginUtils;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.core.SessionHandler;
+import org.openbravo.erpCommon.security.SessionLogin;
 import org.openbravo.service.db.DalConnectionProvider;
 
 /**
@@ -123,6 +125,7 @@
     } else { // use basic authentication
       userId = doBasicAuthentication(request);
     }
+
     if (userId != null) {
       OBContext.setOBContext(UserContextCache.getInstance().getCreateOBContext(userId));
       OBContext.setOBContextInSession(request, OBContext.getOBContext());
@@ -132,6 +135,26 @@
     }
   }
 
+  private void createDBSession(HttpServletRequest req, String strUser, String strUserAuth) {
+    try {
+      String usr = strUserAuth == null ? "0" : strUserAuth;
+
+      final SessionLogin sl = new SessionLogin(req, "0", "0", usr);
+
+      if (strUserAuth == null) {
+        sl.setStatus("F");
+      } else {
+        sl.setStatus("S");
+      }
+
+      sl.setUserName(strUser);
+      sl.setServerUrl(HttpBaseUtils.getLocalAddress(req));
+      sl.save();
+    } catch (Exception e) {
+      log.error("Error creating DB session", e);
+    }
+  }
+
   protected String doBasicAuthentication(HttpServletRequest request) {
     try {
       final String auth = request.getHeader("Authorization");
@@ -153,7 +176,9 @@
       }
       final String login = decodedUserPass.substring(0, index);
       final String password = decodedUserPass.substring(index + 1);
-      return LoginUtils.getValidUserId(new DalConnectionProvider(), login, password);
+      String userId = LoginUtils.getValidUserId(new DalConnectionProvider(), login, password);
+      createDBSession(request, login, userId);
+      return userId;
     } catch (final Exception e) {
       throw new OBException(e);
     }
--- a/web/js/appStatus.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/appStatus.js	Wed Mar 31 18:09:01 2010 +0200
@@ -304,16 +304,12 @@
 
 function processingModeCode(target, display) {
   var string = '';
-  string += "<div class=\"" + target + "_Status_Processing_Container\" id=\"Processing_Container\"";
-  if (display==false) string += " style=\"display: none\"";
-  string += ">\n";
   string += "  <div class=\"" + target + "_Status_Processing_Elements_Container\" id=\"Processing_Container_Logo\">\n";
   string += "    <div class=\"" + target + "_Status_Processing_logo\">\n";
-  string += "      <div class=\"" + target + "_Status_Processing_logo_dimension\"></div>";
+  string += "      <div class=\"" + target + "_Status_Processing_logo_dimension\"></div>\n";
   string += "    </div>\n";
   string += "    <div class=\"" + target + "_Status_Processing_text\">Processing...</div>\n";
   string += "  </div>\n";
-  string += "</div>\n";
   return string;
 }
 
@@ -321,31 +317,66 @@
   if (logo != false) {
     logo = true;
   }
+  var divContainer = "";
   if (target=='popup') {
     var popup_code = document.getElementsByTagName('BODY')[0].innerHTML;
     isKeyboardLocked=value;
     if (document.getElementById('Processing_Container')) {
-      document.getElementById('Processing_Container').style.display = (value?"":"none");
+      if (value == true) {
+        document.getElementById('Processing_Container').className = "Popup_Status_Processing_Container";
+      } else {
+        document.getElementById('Processing_Container').className = "Popup_Status_Processing_Container_hidden";
+      }
     } else {
-      document.getElementsByTagName('BODY')[0].innerHTML = processingModeCode('Popup', value) + popup_code;
+      divContainer = document.createElement("div");
+      divContainer.id = "Processing_Container";
+      if (value == true) {
+        divContainer.className = "Popup_Status_Processing_Container";
+      } else {
+        divContainer.className = "Popup_Status_Processing_Container_hidden";
+      }
+      document.getElementsByTagName("body").item(0).insertBefore(divContainer, getObjChild(document.getElementsByTagName("body").item(0)));
+      document.getElementById('Processing_Container').innerHTML = processingModeCode('Popup', value);
     }
     document.getElementById('Processing_Container_Logo').style.display = (logo?"":"none");
   } else {
     var frame_menu = getFrame('frameMenu');
     var frame_window = getFrame('appFrame');
-    var menu_code = frame_menu.document.getElementsByTagName('BODY')[0].innerHTML;
-    var window_code = frame_window.document.getElementsByTagName('BODY')[0].innerHTML;
     isKeyboardLocked=value;
     if (frame_window.document.getElementById('Processing_Container')) {
-      frame_window.document.getElementById('Processing_Container').style.display = (value?"":"none");
+      if (value == true) {
+        frame_window.document.getElementById('Processing_Container').className = "Main_Status_Processing_Container";
+      } else {
+        frame_window.document.getElementById('Processing_Container').className = "Main_Status_Processing_Container_hidden";
+      }
     } else {
-      frame_window.document.getElementsByTagName('BODY')[0].innerHTML = processingModeCode('Main', value) + window_code;
+      divContainer = document.createElement("div");
+      divContainer.id = "Processing_Container";
+      if (value == true) {
+        divContainer.className = "Main_Status_Processing_Container";
+      } else {
+        divContainer.className = "Main_Status_Processing_Container_hidden";
+      }
+      frame_window.document.getElementsByTagName("body").item(0).insertBefore(divContainer, getObjChild(frame_window.document.getElementsByTagName("body").item(0)));
+      frame_window.document.getElementById('Processing_Container').innerHTML = processingModeCode('Main', value);
     }
     frame_window.document.getElementById('Processing_Container_Logo').style.display = (logo?"":"none");
     if (frame_menu.document.getElementById('Processing_Container')) {
-      frame_menu.document.getElementById('Processing_Container').style.display = (value?"":"none");
+      if (value == true) {
+        frame_menu.document.getElementById('Processing_Container').className = "Menu_Status_Processing_Container";
+      } else {
+        frame_menu.document.getElementById('Processing_Container').className = "Menu_Status_Processing_Container_hidden";
+      }
     } else {
-      frame_menu.document.getElementsByTagName('BODY')[0].innerHTML = processingModeCode('Menu', value) + menu_code;
+      divContainer = document.createElement("div");
+      divContainer.id = "Processing_Container";
+      if (value == true) {
+        divContainer.className = "Menu_Status_Processing_Container";
+      } else {
+        divContainer.className = "Menu_Status_Processing_Container_hidden";
+      }
+      frame_menu.document.getElementsByTagName("body").item(0).insertBefore(divContainer, getObjChild(frame_menu.document.getElementsByTagName("body").item(0)));
+      frame_menu.document.getElementById('Processing_Container').innerHTML = processingModeCode('Menu', value);
     }
   }
 }
--- a/web/js/dojotoolkit/dijit/Calendar.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/Calendar.js	Wed Mar 31 18:09:01 2010 +0200
@@ -224,7 +224,7 @@
 		goToToday: function(){
 			// summary:
 			//      Sets calendar's value to today's date
-			this.attr('value', this.dateClassObj());
+			this.attr('value', new this.dateClassObj());
 		},
 
 		constructor: function(/*Object*/args){
--- a/web/js/dojotoolkit/dijit/_editor/RichText.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/_editor/RichText.js	Wed Mar 31 18:09:01 2010 +0200
@@ -1305,7 +1305,7 @@
 					isvalid=true;
 					var tg = first.tagName ? first.tagName.toLowerCase() : "";
 					// Collapse before childless tags.
-					if(/br|input|img|base|meta|area|basefont/.test(tg)){
+					if(/br|input|img|base|meta|area|basefont|hr|link/.test(tg)){
 						this._sCall("selectElement", [ first ]);
 					}else{
 						// Collapse inside tags with children.
--- a/web/js/dojotoolkit/dijit/_editor/range.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/_editor/range.js	Wed Mar 31 18:09:01 2010 +0200
@@ -74,12 +74,13 @@
 	return node;
 }
 
-dijit.range.getCommonAncestor = function(n1,n2){
+dijit.range.getCommonAncestor = function(n1,n2,root){
+	root = root||n1.ownerDocument.body;
 	var getAncestors = function(n){
 		var as=[];
 		while(n){
 			as.unshift(n);
-			if(n.nodeName!='BODY'){
+			if(n !== root){
 				n = n.parentNode;
 			}else{
 				break;
--- a/web/js/dojotoolkit/dijit/form/ComboBox.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/form/ComboBox.js	Wed Mar 31 18:09:01 2010 +0200
@@ -116,7 +116,7 @@
 		//		Defaults to true.
 		hasDownArrow: true,
 
-		templateString: dojo.cache("dijit.form", "templates/ComboBox.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachPoint=\"comboNode\" waiRole=\"combobox\" tabIndex=\"-1\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"downArrowNode\" waiRole=\"presentation\"\n\t\t\tdojoAttachEvent=\"onmousedown:_onArrowMouseDown\"\n\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\n\t\t></div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input ${nameAttrSetting} type=\"text\" autocomplete=\"off\" class='dijitReset'\n\t\t\tdojoAttachEvent=\"onkeypress:_onKeyPress,compositionend\"\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" waiRole=\"textbox\" waiState=\"haspopup-true,autocomplete-list\"\n\t\t/></div\n\t></div\n></div>\n"),
+		templateString: dojo.cache("dijit.form", "templates/ComboBox.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachPoint=\"comboNode\" waiRole=\"combobox\" tabIndex=\"-1\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"downArrowNode\" waiRole=\"presentation\"\n\t\t\tdojoAttachEvent=\"onmousedown:_onArrowMouseDown\"\n\t\t\t><div class=\"dijitArrowButtonInner\">&nbsp;</div\n\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\n\t\t></div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input ${nameAttrSetting} type=\"text\" autocomplete=\"off\" class='dijitReset'\n\t\t\tdojoAttachEvent=\"onkeypress:_onKeyPress,compositionend\"\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" waiRole=\"textbox\" waiState=\"haspopup-true,autocomplete-list\"\n\t\t/></div\n\t></div\n></div>\n"),
 
 		baseClass:"dijitTextBox dijitComboBox",
 
--- a/web/js/dojotoolkit/dijit/form/TextBox.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/form/TextBox.js	Wed Mar 31 18:09:01 2010 +0200
@@ -42,7 +42,7 @@
 		//		If true, all text will be selected when focused with mouse
 		selectOnClick: false,
 
-		templateString: dojo.cache("dijit.form", "templates/TextBox.html", "<input class=\"dijit dijitReset dijitLeft\" dojoAttachPoint='textbox,focusNode'\n\tautocomplete=\"off\" type=\"${type}\" ${nameAttrSetting}\n\t/>\n"),
+		templateString: dojo.cache("dijit.form", "templates/TextBox.html", "<div class=\"dijit dijitReset dijitInline dijitLeft\" id=\"widget_${id}\" waiRole=\"presentation\"\n\t><div class=\"dijitReset dijitInputField\"\n\t\t><input class=\"dijitReset\" dojoAttachPoint='textbox,focusNode' autocomplete=\"off\"\n\t\t${nameAttrSetting} type='${type}'\n\t/></div\n></div>\n"),
 		baseClass: "dijitTextBox",
 
 		attributeMap: dojo.delegate(dijit.form._FormValueWidget.prototype.attributeMap, {
@@ -206,6 +206,15 @@
 		postCreate: function(){
 			// setting the value here is needed since value="" in the template causes "undefined"
 			// and setting in the DOM (instead of the JS object) helps with form reset actions
+			if(dojo.isIE){ // IE INPUT tag fontFamily has to be set directly using STYLE
+				var s = dojo.getComputedStyle(this.focusNode);
+				if(s){
+					var ff = s.fontFamily;
+					if(ff){
+						this.focusNode.style.fontFamily = ff;
+					}
+				}
+			}
 			this.textbox.setAttribute("value", this.textbox.value); // DOM and JS values shuld be the same
 			this.inherited(arguments);
 			if(dojo.isMoz || dojo.isOpera){
--- a/web/js/dojotoolkit/dijit/form/ValidationTextBox.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/form/ValidationTextBox.js	Wed Mar 31 18:09:01 2010 +0200
@@ -259,19 +259,6 @@
 			this._refreshState();
 		},
 
-		postCreate: function(){
-			if(dojo.isIE){ // IE INPUT tag fontFamily has to be set directly using STYLE
-				var s = dojo.getComputedStyle(this.focusNode);
-				if(s){
-					var ff = s.fontFamily;
-					if(ff){
-						this.focusNode.style.fontFamily = ff;
-					}
-				}
-			}
-			this.inherited(arguments);
-		},
-
 		reset:function(){
 			// Overrides dijit.form.TextBox.reset() by also
 			// hiding errors about partial matches
--- a/web/js/dojotoolkit/dijit/form/_Spinner.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/form/_Spinner.js	Wed Mar 31 18:09:01 2010 +0200
@@ -39,7 +39,7 @@
 		//	  Adjust the value by this much when spinning using the PgUp/Dn keys
 		largeDelta: 10,
 
-		templateString: dojo.cache("dijit.form", "templates/Spinner.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\" waiRole=\"presentation\"\n\t><div class=\"dijitInputLayoutContainer\"\n\t\t><div class=\"dijitReset dijitSpinnerButtonContainer\"\n\t\t\t>&nbsp;<div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\n\t\t\t\tdojoAttachPoint=\"upArrowNode\"\n\t\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t\t><div class=\"dijitArrowButtonChar\">&#9650;</div\n\t\t\t></div\n\t\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\n\t\t\t\tdojoAttachPoint=\"downArrowNode\"\n\t\t\t\t><div class=\"dijitArrowButtonInner\">&thinsp;</div\n\t\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\n\t\t\t></div\n\t\t></div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input class='dijitReset' dojoAttachPoint=\"textbox,focusNode\" type=\"${type}\" dojoAttachEvent=\"onkeypress:_onKeyPress\"\n\t\t\t\twaiRole=\"spinbutton\" autocomplete=\"off\" ${nameAttrSetting}\n\t\t/></div\n\t></div\n></div>\n"),
+		templateString: dojo.cache("dijit.form", "templates/Spinner.html", "<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\" waiRole=\"presentation\"\n\t><div class=\"dijitInputLayoutContainer\"\n\t\t><div class=\"dijitReset dijitSpinnerButtonContainer\"\n\t\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\n\t\t\t\tdojoAttachPoint=\"upArrowNode\"\n\t\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t\t><div class=\"dijitArrowButtonInnerHalfHeight\"></div\n\t\t\t\t></div\n\t\t\t\t><div class=\"dijitArrowButtonChar\">&#9650;</div\n\t\t\t></div\n\t\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\n\t\t\t\tdojoAttachPoint=\"downArrowNode\"\n\t\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t\t><div class=\"dijitArrowButtonInnerHalfHeight\"></div\n\t\t\t\t></div\n\t\t\t\t><div class=\"dijitArrowButtonChar\">&#9660;</div\n\t\t\t></div\n\t\t>&nbsp;</div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><BR></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input class='dijitReset' dojoAttachPoint=\"textbox,focusNode\" type=\"${type}\" dojoAttachEvent=\"onkeypress:_onKeyPress\"\n\t\t\t\twaiRole=\"spinbutton\" autocomplete=\"off\" ${nameAttrSetting}\n\t\t/></div\n\t></div\n></div>\n"),
 
 		baseClass: "dijitTextBox dijitSpinner",
 
@@ -118,27 +118,6 @@
 			this._connects.push(dijit.typematic.addListener(this.downArrowNode, this.textbox, {charOrCode:dojo.keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false}, this, "_typematicCallback", this.timeoutChangeRate, this.defaultTimeout));
 			this._connects.push(dijit.typematic.addListener(this.upArrowNode, this.textbox, {charOrCode:dojo.keys.PAGE_UP,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false}, this, "_typematicCallback", this.timeoutChangeRate, this.defaultTimeout));
 			this._connects.push(dijit.typematic.addListener(this.downArrowNode, this.textbox, {charOrCode:dojo.keys.PAGE_DOWN,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false}, this, "_typematicCallback", this.timeoutChangeRate, this.defaultTimeout));
-			if(dojo.isIE){
-				var _this = this;
-				(function resize(){
-					var sz = _this.upArrowNode.parentNode.offsetHeight;
-					if(sz){
-						_this.upArrowNode.style.height = sz >> 1;
-						_this.downArrowNode.style.height = sz - (sz >> 1);
-						_this.focusNode.parentNode.style.height = sz;
-					}
-				})();
-				this.connect(this.domNode, "onresize",
-					function(){ setTimeout(
-						function(){
-							resize();
-							// cause IE to rerender when spinner is moved from hidden to visible
-							_this._setStateClass();
-						}, 0);
-					}
-				);
-				this._layoutHackIE7();
-			}
 		}
 });
 
--- a/web/js/dojotoolkit/dijit/layout/ScrollingTabController.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/layout/ScrollingTabController.js	Wed Mar 31 18:09:01 2010 +0200
@@ -83,10 +83,12 @@
 		this.inherited(arguments);
 		var menuItem;
 		if(this.useMenu){
+			var containerId = this.containerId;
 			menuItem = new dijit.MenuItem({
 				label: page.title,
 				onClick: dojo.hitch(this, function(){
-					this.onSelectChild(page);
+					var container = dijit.byId(containerId);
+					container.selectChild(page);
 				})
 			});
 			this._menuChildren[page.id] = menuItem;
--- a/web/js/dojotoolkit/dijit/themes/dijit.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/dijit.css	Wed Mar 31 18:09:01 2010 +0200
@@ -47,14 +47,9 @@
 	position: relative;			/* to support setting width/height, see #2033 */
 }
 
-
-.dj_ie INPUT.dijitTextBox,
 .dj_ie .dijitInputField INPUT {
 	font-size: 100%;
-}
-
-.dj_ie .dijitInputField INPUT { /* try to get rid of IE implicit margin around INPUT */
-	margin: -1px 0 !important;
+	float: left; /* removes hidden top/bottom margin */
 }
 
 .dijitInlineTable {
@@ -196,11 +191,15 @@
 	display: none !important;
 }
 .dijitButtonNode .dijitArrowButtonInner {
-	background:no-repeat center;
+	background: no-repeat center;
 	width: 16px;
+	margin: 0px;
+	height: 100%;
+	direction: ltr; /* needed by IE/RTL */
 }
 .dijitComboBox .dijitArrowButtonInner {
 	display: block;
+	overflow: hidden;
 }
 
 /* In high contrast mode, display the check symbol */
@@ -323,19 +322,21 @@
 	position: absolute;
 	right: 0;
 	float: none;
-}
-.dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
-	position: absolute;
 	height: 50%;
+	width: 100%;
+	bottom: auto;
+	left: 0;
+	right: auto;
 }
 .dijitSpinner .dijitInputLayoutContainer .dijitDownArrowButton {
-	top: auto;
-	bottom: 0;
+	top: 50%;
 	border-top-width: 1px !important;
 }
 .dijitSpinner .dijitInputLayoutContainer .dijitUpArrowButton {
 	top: 0;
-	bottom: auto;
+}
+.dijitSpinner INPUT {
+	float:right; /* removes IE fake margins */
 }
 
 TABLE.dijitComboButton {
@@ -381,6 +382,9 @@
 	vertical-align: middle;
 	#vertical-align: auto;
 }
+.dijitSpinner {
+	position: relative; /* fix IE problem where arrows are disconnected from textbox in themetester */
+}
 
 .dijitTimeTextBox {
 	width: 8em;
@@ -962,10 +966,6 @@
 	vertical-align: middle;
 }
 
-.dijitCalendarDisabledDate {
-	color:gray !important;
-}
-
 .dijitCalendarIncrementControl,
 .dijitCalendarDateTemplate,
 .dijitCalendarMonthLabel,
@@ -974,10 +974,9 @@
 	cursor: pointer;
 }
 
-.dijitCalendarPreviousMonthDisabled,
-.dijitCalendarCurrentMonthDisabled,
-.dijitCalendarNextMonthDisabled,
 .dijitCalendarDisabledDate {
+	color: gray;
+	text-decoration: line-through;
 	cursor: default;
 }
 
@@ -1734,10 +1733,6 @@
 .dijit_a11y .dijitArrowButtonChar {
 	display:inline !important;
 }
-.dijitInputLayoutContainer {
-	position: relative;
-	overflow: hidden;
-}
 
 /* Spinner again: TODO: combine this with above spinner section */
 .dijitSpinnerButtonContainer {
@@ -1746,26 +1741,29 @@
 	position: relative;
 	overflow: hidden;
 }
-.dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
-	height: 50%;
-	width: 16px;
-	overflow: hidden;
+.dijitComboBox DIV.dijitDownArrowButton {
+	padding: 0px;
 }
-.dijitSpinner .dijitInputLayoutContainer .dijitArrowButtonInner {
-	overflow: hidden;
-	line-height: 50%;
+.dj_iequirks .dijitComboBox .dijitDownArrowButton,
+.dj_iequirks .dijitSpinnerButtonContainer {
+	padding: 1px 0px;
+}
+.dijitSpinner .dijitArrowButtonInner {
+	margin: auto;
+}
+.dj_ie .dijitSpinner .dijitArrowButtonInnerHalfHeight {
+	zoom: 50%; /* emulate height:50% */
+	padding: 1px 0;
 }
 .dijit_a11y .dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
 	width: 100%;
 }
 .dijit_a11y .dijitSpinner .dijitArrowButton .dijitArrowButtonChar {
-	font-size: 0.4em;
+	font-size: 0.5em;
 	vertical-align: top;
 }
 .dijit_a11y .dijitSpinnerButtonContainer {
 	width: 0.5em;
-	margin-left: 2px;
-	overflow: visible;
 }
 .dijit_a11y .dijitSpinnerButtonContainer .dijitButtonNode {
 	border-width: 1px 0px 0px 1px;
@@ -1787,9 +1785,6 @@
 .dijitSelect .dijitButtonNode {
 	text-align: left;
 }
-.dijitRtl .dijitSelect .dijitButtonNode {
-	text-align: right;
-}
 .dijitToolbar .dijitSelect {
 	margin: 0;
 }
@@ -1811,6 +1806,7 @@
 }
 .dijitSelect .dijitArrowButton {
 	width: 16px;
+	padding: 0px 4px;
 }
 
 .dijitSelectMenu .dijitMenuItemIcon {
@@ -1866,7 +1862,6 @@
 .dj_webkit .dijitSpinnerDisabled INPUT {
 	color: #eee;
 }
-.dj_webkit INPUT.dijitTextBoxDisabled,
 .dj_webkit TEXTAREA.dijitTextAreaDisabled {
 	color: #333; /* because WebKit lightens disabled input/textarea no matter what color you specify */
 }
@@ -1885,3 +1880,4 @@
 	cursor: default;
 }
 
+
--- a/web/js/dojotoolkit/dijit/themes/dijit_rtl.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/dijit_rtl.css	Wed Mar 31 18:09:01 2010 +0200
@@ -1,44 +1,35 @@
-/* TextBox */
-
-.dj_gecko-rtl .dijitInputField {
-	direction: ltr; /* Firefox needs this - probably a bug */
-}
-.dj_gecko-rtl .dijitInputField * {
-	direction: rtl; /* Firefox needs dijitInputField to be ltr, so fix the contained tags */
-}
-
 /* Menu */
 
 .dijitRtl .dijitMenuItem {
 	text-align: right;
 }
 
-/* ComboBox and Spinner */
+/* Button */
+
+.dj_iequirks-rtl .dijitComboButton BUTTON {
+	/* workaround bug where label invisible (themeTesterQuirk.html?dir=rtl) */
+	float:left;
+}
+
+/* TextBox, ComboBox, Spinner */
 
 .dijitRtl .dijitTextBox .dijitButtonNode {
 	/* combobox and spinner: line between the input area and the drop down button */
 	border-right-width: 1px !important;
+	border-right-style: solid;
 	border-left-width: 0px !important;
-}
-
-.dj_iequirks-rtl .dijitComboButton BUTTON {
-	float:left;
+	border-left-style: none;
 }
 
 .dijitRtl .dijitSpinner .dijitInputLayoutContainer .dijitArrowButton {
-	right: auto;
-	left: 0;
+	right: 0;
+	left: auto;
 }
 
 .dijitRtl .dijitSpinnerButtonContainer {
 	float: left;
 }
 
-.dijitRtl .dijit_a11y .dijitSpinnerButtonContainer {
-	margin-left: 0px;
-	margin-right: 2px;
-}
-
 .dijitRtl DIV.dijitArrowButton, .dijitRtl .dijitValidationIcon, .dijitRtl .dijitValidationIconText {
 	float: left;
 }
@@ -53,12 +44,6 @@
 	margin:0 0 0 0.55em;
 }
 
-/* ProgressBar */
-
-.dijitRtl .dijitProgressBarFull .dijitProgressBarLabel {
-	right:0; /* FF workaround */
-}
-
 /* Slider */
 
 .dijitRtl .dijitSliderImageHandleV {
@@ -113,9 +98,6 @@
 }
 
 /* TabContainer */
-.dijitRtl .dijitTabContainer .tabStripMenuButton {
-	float: left;
-}
 
 .dijitRtl .dijitTab .dijitTabCloseButton {
 	margin-left: 0px;
@@ -139,3 +121,10 @@
 	right: 0;
 }
 
+/* Select */
+
+.dijitRtl .dijitSelect .dijitButtonNode {
+	text-align: right;
+}
+
+
--- a/web/js/dojotoolkit/dijit/themes/lucid/Calendar.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/Calendar.css	Wed Mar 31 18:09:01 2010 +0200
@@ -1,22 +1,14 @@
 /* Normal Calendar Style */
 .lucid .dijitCalendar {
-	font-size:10px;
-	border:solid 1px #6491c2;
-	min-width: 200px;
-	background:#f4f8fc url(images/calendar_back.png) repeat-x center top;
+	border:solid 1px #b5bcc7;
+	background-color:#d4ebff;
+	background-image:url("images/calendarContainerImages.png");
+	background-position:0px -448px;
+	background-repeat:repeat-x;
 	text-align:center;
 	padding:6px 5px 3px 5px;
-	margin-top:1px;
-	outline:none;
 	-moz-border-radius:4px;
-	-webkit-border-radius:4px;
-}
-.dj_ie6 .lucid .dijitCalendar,
-.dj_ie7 .lucid .dijitCalendar {
-	width: 200px;
-}
-.dj_ie7 .lucid .dijitCalendar {
-	padding-top:2px;
+	-webkit-border-radius:4px;	
 }
 .dj_ie6 .lucid .dijitCalendar {
 	background-image:none;
@@ -26,92 +18,57 @@
 }
 .lucid .dijitCalendarHover,
 .lucid .dijitCalendarActive {
-	background-color: #cce1f8;
+	background-color: #b7dcff;
+	border:solid 1px #769dc0;
 }
 .lucid .dijitCalendarMonthContainer th {
 	text-align:center;
 	padding-bottom:4px;
 	vertical-align:middle;
 }
-.lucid .dijitCalendar .dijitBackArrow {
-	padding-left:3px;
-	text-align:left;
-}
-.lucid .dijitCalendarMonth {
-	font-size:12px;
-	color:#0a2a49;
-}
 .lucid .dijitCalendarMonthLabelSpacer {
 	display:none;
 }
 .lucid .dijitCalendarMonthLabel {
 	color:#000000;
-	font-family:Verdana,Arial,Helvetica,sans-serif;
-	font-size:12px;
-	font-weight:bold;
+	font-size: 1.091em;
 	display: block;
 }
-.lucid .dijitCalendar .dijitFowardArrow {
-	padding-right:3px;
-	padding-top:2px;
-	text-align:right;
-}
-.lucid .dijitCalendar .dijitCalendarDecrease {
-	background-image: url("images/calendar_back_arrow.png");
-}
-.lucid .dijitCalendar .dijitCalendarIncrease {
-	background-image: url("images/calendar_forward_arrow.png");
-}
-.dijitRtl .lucid .dijitCalendar .dijitCalendarIncrease{
-	background-image: url("images/calendar_back_arrow.png");
-}
-.dijitRtl .lucid .dijitCalendar .dijitCalendarDecrease {
-	background-image: url("images/calendar_forward_arrow.png");
-}
-.lucid .dijitCalendarArrowHover .dijitCalendarDecrease {
-	background-image: url("images/calendar_back_arrow_hover.png");
-}
-.lucid .dijitCalendarArrowHover .dijitCalendarIncrease {
-	background-image: url("images/calendar_forward_arrow_hover.png");
-}
-.dijitRtl .lucid .dijitCalendarArrowHover .dijitCalendarIncrease{
-	background-image: url("images/calendar_back_arrow_hover.png");
-}
-.dijitRtl .lucid .dijitCalendarArrowHover .dijitCalendarDecrease {
-	background-image: url("images/calendar_forward_arrow_hover.png");
-}
-.lucid .dijitCalendarArrowActive .dijitCalendarDecrease {
-	background-image: url("images/calendar_back_arrow_mousedown.png");
-}
-.lucid .dijitCalendarArrowActive .dijitCalendarIncrease {
-	background-image: url("images/calendar_forward_arrow_mousedown.png");
-}
-.dijitRtl .lucid .dijitCalendarArrowActive .dijitCalendarIncrease{
-	background-image: url("images/calendar_back_arrow_mousedown.png");
-}
-.dijitRtl .lucid .dijitCalendarArrowActive .dijitCalendarDecrease {
-	background-image: url("images/calendar_forward_arrow_mousedown.png");
-}
-.dj_ie7 .lucid .dijitCalendarDecrease,
-.dj_ie7 .lucid .dijitCalendarIncrease {
-	margin-bottom:-5px;
-}
+
+/* next/previous month arrows */
 .lucid .dijitCalendarIncrementControl {
 	width:18px;
-	height:18px;
+	height:16px;
+	background-image: url("images/calendarArrows.png");
 	background-repeat: no-repeat;
 }
 .dj_ie6 .lucid .dijitCalendarIncrementControl {
-	font-size:.1em;
+	background-image: url("images/calendarArrows8bit.png");
+}
+.lucid .dijitCalendarIncrease {
+	background-position:-18px 0px;
+}
+.lucid .dijitCalendarArrowHover .dijitCalendarDecrease {
+	background-position:-36px 0px;
+}
+.lucid .dijitCalendarArrowHover .dijitCalendarIncrease {
+	background-position:-55px 0px;
+}
+.lucid .dijitCalendarArrowActive .dijitCalendarDecrease {
+	background-position:-72px 0px;
+}
+.lucid .dijitCalendarArrowActive .dijitCalendarIncrease {
+	background-position:-91px 0px;
 }
 .lucid .dijitA11ySideArrow {
+	/* text +/- labels instead of arrow icons, for high contrast mode */
 	display: none;
 }
+
+
 .lucid .dijitDayLabels th {
 	padding:0px 4px 0px 4px;
 	border-bottom:solid 1px #99b5cd;
-	color:#000;
-	font-size:11px;
 	font-weight:bold;
 	text-align:center;
 }
@@ -119,64 +76,49 @@
 	padding-bottom:0em;
 	text-align:center;
 	border-bottom:1px solid #99B5CD;
-	font-size:10px;
-	font-family: Verdana;
-	font-weight:normal;
+	font-size:0.909em;
 	padding:0 3px 2px;
 }
-.lucid .dijitCalendarBodyContainer {
-	border-bottom: 1px solid #eeeeee;
-}
 .lucid .dijitCalendarDateTemplate {
 	text-align:center;
-	background-color:#fafafa;
-	background-image:url(images/calendar_cell_bg.png);
+	background-color:#fff;
+	background-image:url("images/calendarContainerImages.png");
+	background-position:0px 0px;
 	background-repeat:repeat-x;
-	border-width:1px;
-	border-color: transparent transparent #d2dae8 transparent;
- 	border-style:none none solid;
+	border-bottom: 1px solid #dadde1;
 	padding-top:0px;
-	font-family:Arial,Verdana,Helvetica,sans-serif;
-	letter-spacing: 1px;
-	font-size:10px;
+	font-size:0.909em;
+	font-family: Arial;
 	font-weight:bold;
-	letter-spacing:1px;
+	letter-spacing:.05em;
 	text-align:center;
 }
 .dj_ie6 .lucid .dijitCalendarDateTemplate {
 	background-image: none;
-	border: none;
-	padding-top: 0px;
-	padding-left: 1px;
-	border-bottom: 1px solid #d2dae8;
-	border-top: none;
 }
 .lucid .dijitCalendarPreviousMonth,
 .lucid .dijitCalendarNextMonth {
 	background-color:#ebf3f9;
 	background-image:none;
+	border-bottom:solid 1px #d2dae8;
+	color:#547da1;
 }
 .lucid .dijitCalendarDateTemplate .dijitCalendarDateLabel {
 	text-decoration:none;
-	color:#000;
 	display:block;
-	padding:3px 3px 3px 4px;
-	border:solid 1px transparent;
-	font-weight: bold;
-}
-.dj_ie6 .lucid .dijitCalendarDateTemplate .dijitCalendarDateLabel {
-	border: none;
-	padding: 3px 2px 3px 3px;
+	padding:3px 5px 3px 4px;
+	border:solid 1px #fff;
+	color:#1e1e1e;
+	background-color:rgba(171,212,251,0);	/* transparent causes black-flash animation problem on webkit */
+	-webkit-transition-property:background-color, border;
+ 	-webkit-transition-duration:.35s;
 }
 .lucid .dijitCalendarPreviousMonth .dijitCalendarDateLabel,
-.lucid .dijitCalendarNextMonth .dijitCalendarDateLabel {
+.lucid .dijitCalendarNextMonth .dijitCalendarDateLabel{
 	color:#547da1;
+	border-color:#ebf3f9;
 }
-.lucid .dijitCalendarCurrentDate .dijitCalendarDateLabel {
-}
-.lucid .dijitCalendarCurrentMonth {
-	background-color:white;
-}
+
 .lucid .dijitCalendarYearContainer {
 	vertical-align:middle;
 }
@@ -186,67 +128,52 @@
 .lucid .dijitCalendarYearLabel {
 	padding:2px 0px 0px 0px;
 	margin:0;
-	height:18px;
 }
 .lucid .dijitCalendarYearLabel span {
+	/* trying to center next/current/previous year vertically, doesn't work on IE6/7 though */
+	vertical-align:middle;
+}
+.lucid .dijitCalendarSelectedYear {
 	padding:0px 3px;
-	vertical-align:middle;
 }
 .lucid .dijitCalendarNextYear,
 .lucid .dijitCalendarPreviousYear {
-	font-size:11px;
-	color:#000000;
-	padding:1px 4px 0px 4px;
-	border:solid 1px transparent;
-	font-weight: normal;
-}
-.dj_ie6 .lucid .dijitCalendarNextYear,
-.dj_ie6 .lucid .dijitCalendarPreviousYear {
-	border: none;
-	padding:2px 6px 1px 6px;
-}
-.dj_ie7 .lucid .dijitCalendarNextYear {
-	text-align:right;
-	padding-right:1px;
-}
-.dj_ie7 .lucid .dijitCalendarPreviousYear {
-	text-align:left;
-	padding-left:1px;
+	padding: 1px 6px 1px 6px;
+	font-size:0.909em;
 }
 .lucid .dijitCalendarSelectedYear {
-	font-size: 12px;
-	color:#000000;
-}
-.dj_ie7 .lucid .dijitCalendarSelectedYear {
-	padding-top:0px;
-	padding-left:2px;
-	padding-right:2px;
+	font-size:1.091em;
+	color:#000;
 }
 /* End Normal Calendar Style */
 /* Hovered Calendar Style */
-.lucid .dijitCalendarHoveredDate .dijitCalendarDateLabel {
-	background-color:#a2d1fc;
-	border:solid 1px #fff;
+.lucid .dijitCalendarHoveredDate .dijitCalendarDateLabel{
+	background-color:#abd4fb;
+	border:solid 1px #729dc2;
 	color:#000;
+	-webkit-transition-duration:.2s;
 }
 .lucid .dijitCalendarNextYearHover,
 .lucid .dijitCalendarPreviousYearHover {
 	color:#000;
-	border:solid 1px #799ab7;
-}
-.dj_ie6 .lucid .dijitCalendarNextYearHover,
-.dj_ie6 .lucid .dijitCalendarPreviousYearHover {
-	color:#000;
-	border:solid 1px #799ab7;
-	padding:1px 5px 0px 5px;
+	border:solid 1px #fefefe;
+	padding: 0px 5px 0px 5px;	/* reduced by 1 to make room for border */
+	background-color:#eaf4fe;
 }
 /* End Hovered Calendar Style */
 /* Active Calendar Style */
+.lucid .dijitCalendarNextYearActive,
+.lucid .dijitCalendarPreviousYearActive {
+	border: solid 1px #87b3d9;
+	padding: 0px 5px 0px 5px;	/* reduced by 1 to make room for border */
+	background-color:#90bde6;
+}
 .lucid .dijitCalendarActiveDate .dijitCalendarDateLabel {
-	background-image:url(images/calendar_cell_selected_bg.png);
+	background-image:url("images/calendarContainerImages.png");
+	background-position:0px -300px;
 	background-color:#75b5f0;
 	border:solid 1px #fff;
-	color:#000;
+	-webkit-transition-duration:.1s;
 }
 .dj_ie6 .lucid .dijitCalendarActiveDate .dijitCalendarDateLabel {
 	background-image:none;
@@ -255,25 +182,26 @@
 /* Selected Calendar Style */
 .lucid .dijitCalendarSelectedDate .dijitCalendarDateLabel {
 	color:#000;
-	background-color:#c4e4f5;
-	border-color:#fff;
+	background-color:#e7f4ff;
+	border-color:#accfed;
 }
 /* End Selected Calendar Style */
 /* Disabled Calendar Style*/
-.lucid .dijitCalendarPreviousMonthDisabled,
-.lucid .dijitCalendarNextMonthDisabled	{
-	/* days that are part of the previous or next month - disabled*/
-	background-color:#a4a5a6;
+.lucid .dijitCalendarDisabledDate .dijitCalendarDateLabel {
+	text-decoration:line-through;
+	
+	/* override hover effects above, hover and click on disabled date should have no effect */
+	background-color: transparent;
+	border-width: 0px;
+	padding: 4px 6px 4px 5px;
+	color: #547DA1;
 }
-.lucid .dijitCalendarCurrentMonthDisabled {
-	/* days that are part of this month - disabled */
-	background-color:#bbbbbc;
-}
-.lucid .dijitCalendarDisabledDate {
-	text-decoration:line-through;
-}
+
 /* End Disabled Calendar Style */
-.lucid .dijitCalendarMonthContainer .dijitMenuPassive{
+
+/* Styling for month drop down list */
+
+.lucid .dijitCalendarMonthContainer .dijitMenu{
 	/* top: 20px !important modifying date drop down so it appears below, instead of over, the current date */
 	top: 20px !important;
 	left: 0px;
@@ -282,12 +210,12 @@
 	text-align:center;
 	background-image: none;
 }
-.lucid .dijitCalendarMonthContainer .dijitMenuPassive .dijitCalendarMonthLabel{
+.lucid .dijitCalendarMonthContainer .dijitMenu .dijitCalendarMonthLabel{
 	border-top: solid 1px #fff;
 	border-bottom: solid 1px #fff;
 	padding: 2px 20px;
 }
-.lucid .dijitCalendarMonthContainer .dijitMenuPassive .dijitMenuItemHover{
+.lucid .dijitCalendarMonthContainer .dijitMenu .dijitMenuItemHover {
 	background-color: #abd6ff;
 	border-color: #769dc0;
 	border-width:1px 0px;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/js/dojotoolkit/dijit/themes/lucid/Calendar_rtl.css	Wed Mar 31 18:09:01 2010 +0200
@@ -0,0 +1,19 @@
+.dijitRtl .lucid .dijitCalendar .dijitCalendarIncrease{
+	background-position: 0px 0px;
+}
+.dijitRtl .lucid .dijitCalendar .dijitCalendarDecrease {
+	background-position: -18px 0px;
+}
+.dijitRtl .lucid .dijitCalendarArrowHover .dijitCalendarIncrease {
+	background-position: -36px 0px;
+}
+.dijitRtl .lucid .dijitCalendarArrowHover .dijitCalendarDecrease {
+	background-position: -55px 0px;
+}
+.dijitRtl .lucid .dijitCalendarArrowActive .dijitCalendarIncrease {
+	background-position: -72px 0px;
+}
+.dijitRtl .lucid .dijitCalendarArrowActive .dijitCalendarDecrease {
+	background-position: -91px 0px;
+}
+
--- a/web/js/dojotoolkit/dijit/themes/lucid/Dialog.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/Dialog.css	Wed Mar 31 18:09:01 2010 +0200
@@ -9,7 +9,7 @@
 
 .lucid .dijitDialog .dijitDialogPaneContent {
 	background: #fff url("images/dialog_contentarea_shadow.png") repeat-x top left;
-	border-top: 1px solid #769dc0; /* w/out this, an <h1> on the top line causes a gap between the .content and .label */
+	border-top: 1px solid #769dc0;
 	padding:10px 8px;
 	position: relative;
 }
--- a/web/js/dojotoolkit/dijit/themes/lucid/ProgressBar.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/ProgressBar.css	Wed Mar 31 18:09:01 2010 +0200
@@ -11,7 +11,7 @@
 
 .lucid .dijitProgressBarTile {
 	/* inner container for finished portion when in 'tile' (image) mode */
-	background:#93cafe url("images/progressBarFull.png") repeat-x center center;
+	background:#9dcfff url("images/progressBarFull.png") repeat-x center center;
 }
 
 .lucid .dijitProgressBarFull {
@@ -22,3 +22,7 @@
 	/* Set to a color that contrasts with both the "Empty" and "Full" parts. */
 	color:#293a4b;
 }
+.lucid .dijitProgressBarIndeterminate .dijitProgressBarTile {
+	/* use an animated gif for the progress bar in 'indeterminate' mode */
+	background:#cad2de url("images/progressBarAnim.gif") repeat-x top;
+} 
\ No newline at end of file
--- a/web/js/dojotoolkit/dijit/themes/lucid/TitlePane.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/TitlePane.css	Wed Mar 31 18:09:01 2010 +0200
@@ -48,7 +48,6 @@
 .lucid .dijitTitlePaneContentOuter {
 	background: #ffffff;
 	border:1px solid #C0CCDF;
-	/*border-top: 1px solid #ccc;*//* w/out this, an <h1> on the top line causes a gap between the .content and .label */
 	border-top:none;
 }
 .lucid .dijitTitlePaneContentInner {
--- a/web/js/dojotoolkit/dijit/themes/lucid/form/Button.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/form/Button.css	Wed Mar 31 18:09:01 2010 +0200
@@ -1,16 +1,18 @@
 .lucid .dijitButtonNode {
-	background-image: url(images/button_back_full.png);
+	background-image: url("images/button.png");
 	background-position: center top;
 	background-repeat: repeat-x;
-	background-color: #cde3f6;
-	border: 1px solid #799ab7;
-	padding:4px 10px 4px 10px;
+	background-color: #e4f2ff;
+	border: 1px solid #769dc0;
+	padding:2px 10px 3px 10px;
 	border-radius: 4px;
 	-moz-border-radius: 4px;
 	-webkit-border-radius: 4px;
-	box-shadow:0px 1px 1px rgba(0,0,0,0.2);
-	-webkit-box-shadow:0px 1px 1px rgba(0,0,0,0.2);
-	-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.2);
+	box-shadow:0px 1px 1px rgba(0,0,0,0.17);
+	-webkit-box-shadow:0px 1px 1px rgba(0,0,0,0.17);
+	-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.17);
+	-webkit-transition-property:background-color;
+ 	-webkit-transition-duration:.3s;
 }
 
 .lucid .dijitButtonNode button {
@@ -19,18 +21,41 @@
 }
 
 .lucid .dijitComboButton .dijitArrowButton {
-	border-left: none;
+	border-left-width: 0px;
 	min-width: 21px;
 	padding: 4px 0;
 }
 
+/*arrow styles for down/up/left/right directions*/
 .lucid .dijitArrowButtonInner {
-	width: 14px;
-	height: 10px;
+	width: 15px;
+	height: 15px;
 	margin: 0 auto;
-	background-image: url("images/button_arrow.png");
-	background-position:top center;
-	background-repeat: no-repeat;
+	background:url("images/buttonArrows.png") no-repeat 0px -15px;
+}
+.dj_ie6 .lucid .dijitArrowButtonInner {
+	overflow:hidden;
+}
+.lucid .dijitLeftArrowButton .dijitArrowButtonInner {
+	background-position: 0px 0px;
+}
+.lucid .dijitRightArrowButton .dijitArrowButtonInner {
+	background-position: 0px -30px;
+}
+.lucid .dijitUpArrowButton .dijitArrowButtonInner {
+	background-position: 0px -45px;
+}
+.lucid .dijitDisabled .dijitArrowButtonInner {
+	background-position: 0px -75px;
+}
+.lucid .dijitDisabled .dijitLeftArrowButton .dijitArrowButtonInner {
+	background-position: 0px -60px;
+}
+.lucid .dijitDisabled .dijitRightArrowButton .dijitArrowButtonInner {
+	background-position: 0px -90px;
+}
+.lucid .dijitDisabled .dijitUpArrowButton .dijitArrowButtonInner {
+	background-position: 0px -105px;
 }
 
 .lucid .dijitButtonText {
@@ -45,18 +70,22 @@
 /* hover status */
 .lucid .dijitButtonHover .dijitButtonNode,
 .lucid .dijitDropDownButtonHover .dijitButtonNode,
-/*.lucid .dijitComboButtonHover .dijitStretch,*/
 .lucid .dijitComboButton .dijitButtonNodeHover, 
-/*.lucid .dijitComboButtonDownArrowHover .dijitArrowButton*/
 .lucid .dijitComboButton .dijitDownArrowButtonHover{
-	background-color: #8dc7fe;
+	background-color: #afd9ff;
+	color:#000;
+ 	-webkit-transition-duration:.2s;
 }
 
 /* checked status */
 .lucid .dijitButtonActive .dijitButtonNode, 
 .lucid .dijitDropDownButtonActive .dijitButtonNode,
 .lucid .dijitComboButtonActive .dijitButtonNode {
-	background-color: #e1edf9;
+	background-color: #99cfff;
+	box-shadow:0px 0px 0px rgba(0,0,0,0);
+	-webkit-box-shadow:0px 0px 0px rgba(0,0,0,0);
+	-moz-box-shadow: 0px 0px 0px rgba(0,0,0,0);
+ 	-webkit-transition-duration:.1s;
 }
 
 /* disabled status */
@@ -71,20 +100,26 @@
 .lucid .dijitDropDownButtonDisabled .dijitButtonNode,
 .lucid .dijitComboButtonDisabled .dijitButtonNode,
 .lucid .dijitToggleButtonDisabled .dijitButtonNode{ 
-	background-image: url(images/button_grad_d.png);
-	background-color: #dddddd;
+	background-position:0px -149px;
+	background-color: #e3e3e3;
 	border: solid 1px #c9c9c9;
 	color: #696969;
+	box-shadow:0px 0px 0px rgba(0,0,0,0);
+	-webkit-box-shadow:0px 0px 0px rgba(0,0,0,0);
+	-moz-box-shadow: 0px 0px 0px rgba(0,0,0,0);
 }
 
 /* for ComboButton */
 .lucid table.dijitComboButton {
-	border-collapse: separate;	/* overrid dijit.css */
+	border-collapse: separate;	/* override dijit.css so that ComboBox rounded corners work */
 }
 
 /* ie6 & ie7 doesn't support min-width */
 .dj_ie6 .lucid .dijitComboButton .dijitArrowButton,
 .dj_ie7 .lucid .dijitComboButton .dijitArrowButton {
+	/* TODO: both min-width usage and width usage are strange, and width setting probably
+	 * breaks a11y at large font sizes.   can't you use padding instead?
+	 */
 	width: 21px;
 }
 
--- a/web/js/dojotoolkit/dijit/themes/lucid/form/Button_rtl.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/form/Button_rtl.css	Wed Mar 31 18:09:01 2010 +0200
@@ -6,9 +6,7 @@
 
 /* DropDownButton Arrow */
 .dijitRtl .lucid .dijitArrowButtonInner {
-	/*background-position:left center;*/
 	padding-right: 7px;
-    /*margin-left: -4px;*/
 }
 
 .dj_ie6-rtl .lucid .dijitDropDownButton .dijitArrowButtonInner,
@@ -23,6 +21,7 @@
 
 /* Combo Button */
 .dijitRtl .lucid .dijitComboButton .dijitArrowButton {
+	/* todo: hardcoded width breaks a11y, can't this use padding instead? */
 	width: 21px;
 }
 
@@ -34,20 +33,20 @@
     -webkit-border-bottom-left-radius: 0px;	
 }
 
-.dijitRtl .lucid .dijitComboButton .dijitArrowButton{
+.dijitRtl .lucid .dijitComboButton .dijitArrowButton {
 	-moz-border-radius:  4px 0px 0px  4px;
 	-webkit-border-top-left-radius:4px;
     -webkit-border-top-right-radius:0px;
     -webkit-border-bottom-right-radius:0px;
     -webkit-border-bottom-left-radius:4px;
-	min-width:21px;
 	padding:3px 0px 4px;
-	border-left:1px solid #799ab7;
+	border-left-width: 1px;
 	border-right-width: 0px;
 }
 
-.dijitRtl .lucid .dijitComboButton .dijitArrowButton .dijitArrowButtonInner{
-	width: 11px;
+.dijitRtl .lucid .dijitComboButton .dijitArrowButton .dijitArrowButtonInner {
+	/* todo: hardcoded width breaks a11y, can't this use padding instead? */
+	width: 15px;
 	padding-right:0px;
 }
 /* End Combo Button */
\ No newline at end of file
--- a/web/js/dojotoolkit/dijit/themes/lucid/form/Checkbox.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/form/Checkbox.css	Wed Mar 31 18:09:01 2010 +0200
@@ -49,7 +49,7 @@
 }
 
 .lucid .dijitCheckBoxCheckedHover {
-	/* hovering over an unchecked enabled checkbox */
+	/* hovering over an checked enabled checkbox */
 	background-position: -30px;
 }
 
--- a/web/js/dojotoolkit/dijit/themes/lucid/form/Common.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/form/Common.css	Wed Mar 31 18:09:01 2010 +0200
@@ -15,7 +15,6 @@
 }
 
 .lucid .dijitInputField,
-.lucid input.dijitTextBox,
 .lucid .dijitTextArea  {
 	padding-top: 2px;	/* $1 */
 	padding-bottom: 2px;	/* $1 .these are related, should be the same */
@@ -91,9 +90,8 @@
 
 .lucid .dijitComboBox .dijitButtonNode {
 	background: #f6f7fa url("images/menubutton_back.png") repeat-x left top;
-	border: none;
+	border-style: none;
 	border-left: 1px solid #bcc8dd;
-	padding: 0px;
 	width: 1.7em;
 	
 	/* override Button.css */
@@ -156,6 +154,6 @@
 	background-image: none;
 }
 .dj_ie6 .lucid .dijitComboBoxFocused .dijitArrowButtonInner {
-	border: none;	/* doesn't support transparent border */
+	border-style: none;	/* doesn't support transparent border */
 	margin: 1px; /* use margin 1px to fill the border's width */
-}
\ No newline at end of file
+}
--- a/web/js/dojotoolkit/dijit/themes/lucid/form/NumberSpinner.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/form/NumberSpinner.css	Wed Mar 31 18:09:01 2010 +0200
@@ -17,7 +17,6 @@
 	width: 21px;
 	overflow: hidden;
 	position: relative;
-	height: 100%;
 	padding: 2px 0px;
 }
 
@@ -27,7 +26,6 @@
 	width: 20px;
 	background-color: #f6f7fa;
 	background-image: url("images/menubutton_back.png");
-	overflow: hidden;
 	
 	/* override Button.css */
 	border-radius: 0;
@@ -64,7 +62,6 @@
 	width: auto;
 	height: 100%;
 	margin: 0;
-	margin-top: -1px;	/* here we set -1 to fix the position of the arrow button (because it has a border-top of dijitArrowButtonInner) */
 	padding:0;
 }
 
@@ -157,19 +154,11 @@
 /** hacks for browsers **/
 
 .dj_ie .lucid .dijitSpinner .dijitInputField {
-	padding: 0 0;
 	vertical-align: middle;
 }
-.dj_ie .lucid .dijitSpinner .dijitInputField input{
-	padding: 2px 2px;
-}
-
-.dj_ie6 .lucid .dijitSpinner .dijitInputField input {
-	padding: 2px 0;
-}
 
 /* for IE 7, when div is enlarged, 
  * should be no empty space between dijitInputLayoutContainer and dijitSpinner*/
 .dj_ie7 .lucid .dijitSpinner .dijitInputLayoutContainer{
 	overflow:visible;
-} 
\ No newline at end of file
+} 
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/bottom_shadow.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/bottom_shadow2.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/buttonArrows.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_arrow.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_arrow_hover.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_back_full.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_back_full_arrow.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_bottom_grad.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_bottom_grad_h.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_bottom_grad_s.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_bottom_grad_s_small.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_focus_line.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad_h.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad_h_small.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad_s.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad_s_small.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/button_grad_small.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/calendar_forward_arrow.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/checkbox_states.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/drop_top_grad.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/error_checked.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/icon_drop_down_h.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/input_alert.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/new_back.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/form/images/radio_button_states.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/images/calendarArrows.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/images/calendarArrows8bit.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/images/calendarContainerImages.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/images/calendar_back.gif has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/images/calendar_back.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/images/progressBarAnim.gif has changed
--- a/web/js/dojotoolkit/dijit/themes/lucid/layout/AccordionContainer.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/layout/AccordionContainer.css	Wed Mar 31 18:09:01 2010 +0200
@@ -7,21 +7,20 @@
 	background-color: #d4ebff;
 	border:solid 1px #b5bcc7;
 	margin-bottom:1px;
-	-webkit-transition-property:background-color;
+	-webkit-transition-property:background-color,border;
  	-webkit-transition-duration:.3s;
 	-webkit-transition-timing-function:linear;
 }
 .lucid .dijitAccordionTitle {
-	background-color: #eeeeee;
-	background-image: url("images/accordion_back.png");
+	background-color: #e6e6e7;
+	background-image: url("images/accordion.png");
+	background-position:0px 0px;
 	background-repeat:repeat-x;
 	padding: 5px 7px 2px 7px;
-	outline:none;
 	min-height:17px;
-	color:#3d3d3d;
+	color:#4a4a4a;
 	-webkit-transition-property:background-color, border;
- 	-webkit-transition-duration:.35s;
-	-webkit-transition-timing-function:linear;
+ 	-webkit-transition-duration:.3s;
 }
 .dj_ie6 .lucid .dijitAccordionTitle {
 	background-image: none;
@@ -37,90 +36,58 @@
 	padding: 9px;
 }
 
-/* Hover State */
+/* Hovering/pressing title bar for a closed pane */
 
 .lucid .dijitAccordionTitleHover {
 	background-color:#9dcfff;
 	color:#000;
-	-webkit-transition-property:background-color, border;
- 	-webkit-transition-duration:.3s;
-	-webkit-transition-timing-function:linear;
+ 	-webkit-transition-duration:.2s;
 }
-.dj_ie6 .lucid .dijitAccordionTitleHover {
-	background-image: none;
+.lucid .dijitAccordionTitleActive {
+	background-position:0px -136px;
+	background-repeat:repeat-x;
+	background-color:#7dbefa;
+	color:#000;
 }
-.lucid .dijitAccordionInnerContainerHover,
+
+
+/* Open pane */
+
+.lucid .dijitAccordionInnerContainerSelected {
+	border-color:#92bce1;
+}
+.lucid .dijitAccordionInnerContainerSelected .dijitAccordionTitle {
+	background-color:#cde8ff;
+	padding: 5px 7px 2px 7px;
+	color:#000;
+}
+
+/* Open pane, hovered */
+
+.lucid .dijitAccordionInnerContainerSelectedHover .dijitAccordionTitle,
+.lucid .dijitAccordionInnerContainerSelectedActive .dijitAccordionTitle {
+	background-color:#ABD6FF;
+	background-position: 0 0;
+	border-color:#769DC0;
+	-webkit-transition-duration:.2s;
+}
+.lucid .dijitAccordionInnerContainerSelectedHover,
 .lucid .dijitAccordionInnerContainerSelectedActive {
 	background-color:#b7dcff;
-	border:1px solid #769DC0;
-	-webkit-transition-property:background-color;
- 	-webkit-transition-duration:.3s;
-	-webkit-transition-timing-function:linear;
+	border:1px solid #769DC0 !important;
+	-webkit-transition-duration:.22s;
 }
-.lucid .dijitAccordionInnerContainerHover .dijitAccordionContainer-child,
-.lucid .dijitAccordionInnerContainerActive .dijitAccordionContainer-child {
+.lucid .dijitAccordionInnerContainerSelectedHover .dijitAccordionContainer-child,
+.lucid .dijitAccordionInnerContainerSelectedActive .dijitAccordionContainer-child {
 	background-color:#ffffff;
 	border:1px solid #769DC0 !important;
-	-webkit-box-shadow:inset 0px 0px 3px rgba(0, 0, 0, .35);
-	-moz-box-shadow:inset 0px 0px 3px rgba(0, 0, 0, .35);
-}
-.dj_ie6 .lucid .dijitAccordionInnerContainerHover {
-	background-image: none;
+	-webkit-box-shadow:inset 0px 0px 3px rgba(0, 0, 0, .25);
+	-moz-box-shadow:inset 0px 0px 3px rgba(0, 0, 0, .25);
 }
 
-/* Hover State End*/
-/* Active State*/
-
-.lucid .dijitAccordionInnerContainerActive {
-	border-color:#769DC0;
-}
-.lucid .dijitAccordionTitleActive {
-	background-image: url("images/accordion_down.png");
-	background-repeat:repeat-x;
-	background-color:#7dbefa;
-}
-.dj_ie6 .lucid .dijitAccordionTitleActive {
-	background-image: none;
-}
-
-/* Active State End*/
-/* Selected state */ 
-.lucid .dijitAccordionInnerContainerSelected {
-	border-color:#92bce1;
-
-}
-.lucid .dijitAccordionTitleSelected {
-	background-color:#cde8ff;
-	background-image:url("images/accordion_back.png");
-	background-position:center top;
-	padding: 5px 7px 2px 7px;
-	color:#000;
-	-webkit-transition-property:background-color;
- 	-webkit-transition-duration:.3s;
-	-webkit-transition-timing-function:linear;
-}
-.dj_ie6 .lucid .dijitAccordionTitleSelected {
-	background-image: none;
-}
-.lucid .dijitAccordionInnerContainerHover .dijitAccordionTitleSelected,
-.lucid .dijitAccordionInnerContainerActive .dijitAccordionTitleSelected {
-	background-color:#ABD6FF;
-}
-.lucid .dijitAccordionTitleSelectedHover,
-.lucid .dijitAccordionContainer .dijitAccordionTitleSelectedActive{
-	background-color:#ABD6FF;
-	background-image:url("images/accordion_back.png");
-}
-.dj_ie6 .lucid .dijitAccordionTitleSelectedHover {
-	background-image: none;
-}
-
-/* Selected State End*/  
-/* Focused State */
+/* Focused title bar */
 
 .lucid .dijitAccordionTitleFocused {
 	/* todo: presumably this violates a11y rules because there's no way to tell when focus is on the accordion itself */
 	text-decoration:none;
-	outline:none;
-}
-/* Focused State End*/
\ No newline at end of file
+}
\ No newline at end of file
--- a/web/js/dojotoolkit/dijit/themes/lucid/layout/BorderContainer.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/layout/BorderContainer.css	Wed Mar 31 18:09:01 2010 +0200
@@ -34,6 +34,8 @@
 	padding: 5px;
 }
 
+/* Splitters and gutters */
+
 .lucid .dijitSplitterH,
 .lucid .dijitGutterH {
 	background:none;
@@ -61,40 +63,42 @@
 	left:2px;
 	width:1px;
 }
-.lucid .dijitSplitterVHover .dijitSplitterThumb {
-	background:#769dc0 none;
+
+/* hovered splitter */
+.lucid .dijitSplitterHHover {
+	font-size: 1px;
+	-moz-opacity: 1;
+	opacity: 1;
+	filter: Alpha(Opacity=100);
+	margin: 0;
+	background: url("images/splitterHorizontalHover.png") no-repeat center top;
 }
 
 .lucid .dijitSplitterHHover .dijitSplitterThumb {
 	background:#769dc0 none;
 }
 
-.lucid .dijitSplitterHHover {
+.lucid .dijitSplitterVHover {
 	font-size: 1px;
 	-moz-opacity: 1;
 	opacity: 1;
 	filter: Alpha(Opacity=100);
 	margin: 0;
-	background: url("images/splitterThumbHover.png") no-repeat center top;
+	background: url("images/splitterVerticalHover.png") no-repeat center left;
 }
 
-.lucid .dijitSplitterVHover {
-	font-size: 1px;
-	-moz-opacity: 1;
-	opacity: 1;
-	filter: Alpha(Opacity=1);
-	margin: 0;
-	background: url("images/splitterThumbVerticalHover.png") no-repeat center left;
+.lucid .dijitSplitterVHover .dijitSplitterThumb {
+	background:#769dc0 none;
 }
 
 
 /* active splitter */
 .lucid .dijitSplitterHActive {
 	font-size: 1px;
-	background:url("images/splitterThumbActive.png");
-	-moz-opacity: 1;
-	opacity: 1;
-	filter: Alpha(Opacity=100);
+	background-color:#abd4fb;
+	-moz-opacity: .6;
+	opacity: .6;
+	filter: Alpha(Opacity=60);
 	margin: 0;
 	border-top:blue;
 
@@ -102,9 +106,9 @@
 
 .lucid .dijitSplitterVActive {
 	font-size: 1px;
-	background:url("images/splitterThumbActive.png");
-	-moz-opacity: 1;
-	opacity: 1;
-	filter: Alpha(Opacity=100);
+	background-color:#abd4fb;
+	-moz-opacity: .6;
+	opacity: .6;
+	filter: Alpha(Opacity=60);
 	margin: 0;
 }
--- a/web/js/dojotoolkit/dijit/themes/lucid/layout/TabContainer.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/layout/TabContainer.css	Wed Mar 31 18:09:01 2010 +0200
@@ -2,7 +2,18 @@
  * TabContainer
  */
 
-/*** some common festure ***/
+/*** some common features ***/
+.lucid .dijitTabPaneWrapper {
+	background:#fff;
+}
+.lucid .dijitTabPaneWrapper,
+.lucid .dijitTabContainerTop-tabs,
+.lucid .dijitTabContainerBottom-tabs,
+.lucid .dijitTabContainerLeft-tabs,
+.lucid .dijitTabContainerRight-tabs {
+	/* todo: add common class name for this div */
+	border-color: #b5bcc7;
+}
 .lucid .dijitTabContainerTop-tabs .dijitTabContent,
 .lucid .dijitTabContainerBottom-tabs .dijitTabContent{
 	min-width: 60px;
@@ -12,16 +23,19 @@
 	margin-left: 0;
 }
 .lucid .dijitTabCloseIcon {
-	background: url("images/tabClose.png") no-repeat right top;
-	width: 12px;
-	height: 12px;
+	background: url("images/tabClose.png") no-repeat;
+	width: 14px;
+	height: 14px;
 	margin-left: 5px;
-	margin-top:-2px;
+	margin-top:-1px;
+	margin-right:-3px;
 }
 .lucid .dijitTabCloseButtonHover .dijitTabCloseIcon {
-	background: url("images/tabCloseHover.png") no-repeat right top;
+	background-position:-14px;
 }
-
+.lucid .dijitTabCloseButtonActive .dijitTabCloseIcon {
+	background-position:-28px;
+}
 /* set the spacer invisible */
 .lucid .dijitTabSpacer {
 	height: 0;
@@ -29,41 +43,48 @@
 	overflow: hidden;
 }
 .lucid .dijitTabInnerDiv {
-	background-color:#eeeeee;
+	background-color:#e6e6e7;
 	-webkit-transition-property:background-color, border, padding-top;
  	-webkit-transition-duration:.35s;
+	color:#4a4a4a;
 }
 .lucid .dijitTabHover .dijitTabInnerDiv {
-	background-color:#a6d2fb;
+	background-color:#a9d6ff;
  	-webkit-transition-duration:.3s;
+	color:#000;
 }
 .lucid .dijitTabActive .dijitTabInnerDiv {
-	background-color:#7dbefa;
+	background-color:#8bc4f9;
+	color:#000;
 	-webkit-transition-duration:.2s;
 }
 .lucid .dijitTabChecked .dijitTabInnerDiv {
-	background-color:#fff;
+	background-color:#b2d4f3;
+	color:#000;
 }
-.lucid .tabStripButton .dijitTabInnerDiv,
-.lucid .tabStripButtonHover .dijitTabInnerDiv,
-.lucid .tabStripButtonActive .dijitTabInnerDiv {
+
+.lucid .dijitTabContent {
+	border: 1px solid #b5bcc7;
+}
+.lucid .dijitTabHover .dijitTabContent,
+.lucid .dijitTabActive .dijitTabContent {
+	border-color: #769dc0;
+}
+.lucid .dijitTabChecked .dijitTabContent {
+	color:#000;
+	border-color: #b5bcc7;	
+}
+
+.lucid .tabStripButton .dijitTabInnerDiv {
 	background-color: transparent;
 }
+.lucid .tabStripButton .dijitTabContent {
+	border: none;
+}
 /*** end common ***/
 
 
 /*************** top tab ***************/
-.lucid .dijitTabPaneWrapper {
-	background:#FFFFFF;
-}
-.lucid .dijitTabContainerTop-container {
-	background:#fff;
-	border:1px solid #b5bcc7;
-	border-top: none;
-}
-.lucid .dijitTabContainerTop-tabs {
-	border-bottom: 1px solid #b5bcc7;
-}
 .lucid .dijitTabContainerTop-tabs .dijitTab {
 	top: 1px;	/* used for overlap */
 	margin-right: 1px;
@@ -74,13 +95,7 @@
 	padding-right: 8px;
 	padding-bottom: 3px;
 	padding-left: 4px;
-	border: 1px solid #b5bcc7;
-	border-bottom: 1px solid #b5bcc7;
-}
-.lucid .dijitTabContainerTop-tabs .dijitTabHover .dijitTabContent,
-.lucid .dijitTabContainerTop-tabs .dijitTabActive .dijitTabContent {
-	color:#000 !important;
-	border: 1px solid #769dc0;
+	border-bottom: 1px;
 }
 .lucid .dijitTabContainerTop-tabs .dijitTab {
 	padding-top: 3px;
@@ -88,47 +103,39 @@
 .lucid .dijitTabContainerTop-tabs .dijitTabChecked .dijitTabContent {
 	padding-bottom: 4px;
 	padding-top: 6px;
-	border-bottom: none;
 }
 
 /* normal status */
 .lucid .dijitTabContainerTop-tabs .dijitTabInnerDiv {
-	background-image:url(images/tab_bottom.png);
+	background-image:url("images/tabTop.png");
+	background-position:0px -248px;
 	background-position:bottom;
 	background-repeat:repeat-x;
-	/*background-position: 0px -5px;*/
+	box-shadow: 0px -1px 1px rgba(0, 0, 0, 0.04);
+	-webkit-box-shadow: 0px -1px 1px rgba(0, 0, 0, 0.04);
+	-moz-box-shadow: 0px -1px 1px rgba(0, 0, 0, 0.04);
 }
 .lucid .dijitTabContainerTop-tabs .dijitTabContent {
-	background-image:url(images/tab_top_back.png);
-	background-position:center top;
+	background-image:url("images/tabTop.png");
+	background-position:0px 0px;
 	background-repeat:repeat-x;
-	color:#3d3d3d;
 }
+
 /* checked status */
 .lucid .dijitTabContainerTop-tabs .dijitTabChecked .dijitTabInnerDiv {
-	background-color:#b2d4f3;
 	background-image:none;
-	box-shadow: 0px -1px 1px rgba(0, 0, 0, 0.04);
-	-webkit-box-shadow: 0px -1px 0px rgba(0, 0, 0, 0.04);
-	-moz-box-shadow: 0px -1px 1px rgba(0, 0, 0, 0.04);
+	box-shadow: 0px -1px 2px rgba(0, 0, 0, 0.05);
+	-webkit-box-shadow: 0px -1px 2px rgba(0, 0, 0, 0.05);
+	-moz-box-shadow: 0px -1px 2px rgba(0, 0, 0, 0.05);
 }
 .lucid .dijitTabContainerTop-tabs .dijitTabChecked .dijitTabContent {
-	background-image:url(images/focus.png);
-	color:#000;
-	border-color:#b5bcc7;
+	background-position:0px -102px;
+	background-repeat:repeat-x;
 }
 /** end top tab **/
 
 
 /*************** bottom tab ***************/
-.lucid .dijitTabContainerBottom-container {
-	background:#fff;
-	border:1px solid #b5bcc7;
-	border-bottom: none;
-}
-.lucid .dijitTabContainerBottom-tabs {
-	border-top: 1px solid #b5bcc7;
-}
 .lucid .dijitTabContainerBottom-tabs .dijitTab {
 	top: -1px;	/* used for overlap */
 	margin-right: 1px;
@@ -139,66 +146,64 @@
 	padding-right: 8px;
 	padding-bottom: 4px;
 	padding-left: 4px;
-	border: 1px solid #b5bcc7;
-	border-top: 1px solid #b5bcc7;
+	border-top: none;
 }
 .lucid .dijitTabContainerBottom-tabs .dijitTab {
 	padding-bottom: 3px;
 }
+/* normal status */
+.lucid .dijitTabContainerBottom-tabs .dijitTabInnerDiv {
+	background-image: url("images/tabBottom.png");
+	background-position: top;
+	background-repeat: repeat-x;
+	box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.04);
+	-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.04);
+	-moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.04);
+	
+}
+.lucid .dijitTabContainerBottom-tabs .dijitTabContent {
+	background-image: url("images/tabBottom.png");
+	background-position:0px -249px;
+	background-repeat: repeat-x;
+	background-position:bottom
+}
+
+/* checked status */
 .lucid .dijitTabContainerBottom-tabs .dijitTabChecked .dijitTabContent {
 	padding-bottom: 7px;
 	padding-top: 4px;
-	border-top: none;
+	background-position:0px -119px;
 }
 .lucid .dijitTabContainerBottom-tabs .dijitTabChecked {
 	padding-bottom: 0;
 }
-/* normal status */
-.lucid .dijitTabContainerBottom-tabs .dijitTabInnerDiv {
-	background-image: url(images/tab_bottom_top.png);
-	background-position: top;
-	background-repeat: repeat-x;
-}
-.lucid .dijitTabContainerBottom-tabs .dijitTabContent {
-	background-image: url(images/tab_top_back_bottom.png);
-	background-position: center bottom;
-	background-repeat: repeat-x;
-}
-/* checked status */
 .lucid .dijitTabContainerBottom-tabs .dijitTabChecked .dijitTabInnerDiv {
 	background-image:none;
+	box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
+	-webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
+	-moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
 }
 /** end bottom tab **/
 
 /*************** left tab ***************/
-.lucid .dijitTabContainerLeft-container {
-	background:#fff;
-	border:1px solid #b5bcc7;
-	border-left: none;
-}
-.lucid .dijitTabContainerLeft-tabs {
-	border-right: 1px solid #b5bcc7;
-}
 .lucid .dijitTabContainerLeft-tabs .dijitTab {
 	left: 1px;	/* used for overlap */
 	margin-bottom: 1px;
 }
 /* normal status */
 .lucid .dijitTabContainerLeft-tabs .dijitTabInnerDiv {
-	background-image: url(images/tab_back_lucid_left.png);
-	background-position: center bottom;
-	background-repeat: repeat-x;
+	background-image: url("images/tabLeft.png");
+	background-position: -347px -340px;
+	background-repeat: repeat-y;
 }
 .lucid .dijitTabContainerLeft-tabs .dijitTabContent {
 	padding-top: 3px;
 	padding-right: 8px;
 	padding-bottom: 4px;
 	padding-left: 4px;
-	border: 1px solid #b5bcc7;
-	border-right: 1px solid #b5bcc7;
-	background-image: url(images/tab_top_back.png);
-	background-position: center bottom;
-	background-repeat: repeat-x;
+	background-image: url("images/tabLeft.png");
+	background-repeat: repeat-y;
+	background-position:0px 0px;
 }
 /* checked status */
 .lucid .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabContent {
@@ -207,39 +212,33 @@
 	background-image: none;
 }
 .lucid .dijitTabContainerLeft-tabs .dijitTabChecked .dijitTabInnerDiv {
-	background-image: url(images/focus.png);
+	background-position:0px -179px;
+	background-repeat:repeat-y;
+	box-shadow: -1px 0px 2px rgba(0, 0, 0, .05);
+	-webkit-box-shadow: -1px 0px 2px rgba(0, 0, 0, .05);
+	-moz-box-shadow: -1px 0px 2px rgba(0, 0, 0, 0.05);
 }
 /** end left tab **/
 
 /*************** right tab ***************/
-.lucid .dijitTabContainerRight-container {
-	background:#fff;
-	border:1px solid #b5bcc7;
-	border-right: none;
-}
-.lucid .dijitTabContainerRight-tabs {
-	border-left: 1px solid #b5bcc7;
-}
 .lucid .dijitTabContainerRight-tabs .dijitTab {
 	left: -1px;	/* used for overlap */
 	margin-bottom: 1px;
 }
 /* normal status */
 .lucid .dijitTabContainerRight-tabs .dijitTabInnerDiv {
-	background-image: url(images/tab_back_lucid_left.png);
-	background-position: center bottom;
-	background-repeat: repeat-x;
+	background-image: url("images/tabRight.png");
+	background-repeat: repeat-y;
+	background-position: -1px -347px;
 }
 .lucid .dijitTabContainerRight-tabs .dijitTabContent {
 	padding-top: 3px;
 	padding-right: 8px;
 	padding-bottom: 4px;
 	padding-left: 4px;
-	border: 1px solid #b5bcc7;
-	border-left: 1px solid #b5bcc7;
-	background-image: url(images/tab_top_back.png);
-	background-position: center bottom;
-	background-repeat: repeat-x;
+	background-image: url("images/tabRight.png");
+	background-position:right top;
+	background-repeat: repeat-y;
 }
 /* checked status */
 .lucid .dijitTabContainerRight-tabs .dijitTabChecked .dijitTabContent {
@@ -248,7 +247,10 @@
 	background-image: none;
 }
 .lucid .dijitTabContainerRight-tabs .dijitTabChecked .dijitTabInnerDiv {
-	background-image: url(images/focus.png);
+	background-position:-348px -179px;
+	box-shadow: 1px 0px 2px rgba(0, 0, 0, 0.07);
+	-webkit-box-shadow: 1px 0px 2px rgba(0, 0, 0, 0.07);
+	-moz-box-shadow: 1px 0px 2px rgba(0, 0, 0, 0.07);
 }
 /** end right tab **/
 
@@ -270,16 +272,11 @@
 .dj_ie6 .lucid .dijitLayoutContainer,
 .dj_ie6 .lucid .dijitTabListWrapper,
 .dj_ie6 .lucid .dijitTabContainerTabListNested {
-	overflow-x: hidden;	/* otherwish the widget will be very very long under ie6 */
+	overflow-x: hidden;	/* otherwise the widget will be very very long under ie6 */
 }
 .dj_ie6 .lucid .dijitTabInnerDiv,
 .dj_ie6 .lucid .dijitTabContent {
-	background-image: none;	/* ie6 doesn't support transparent background */
-}
-.dj_ie6 .lucid .dijitTabContainerLeft-tabs,
-.dj_ie6 .lucid .dijitTabContainerRight-tabs {
-	/*todo: this rule seems to make no difference for left/right tabs
-	 * top: -1px;	/* weird, why left & right tab has 1px spacing on the top under ie6??? */
+	background-image: none;	/* ie6 doesn't support gradient transparency background */
 }
 
 /** round corner **/
@@ -315,23 +312,21 @@
 
 /************ left/right scroll buttons + menu button ************/
 .lucid .tabStripButton {
-	background-color: #eeeeee;
-	background-repeat: no-repeat;
+	background-color:#deecf9;
+	border: 1px solid #b5bcc7;
 }
 .lucid .dijitTabListContainer-top .tabStripButton {
-	border: 1px solid #b5bcc7;
-	padding: 5px 3px;
-	margin-top:5px;
-	background-image: url(images/tab_top_back.png);
-	background-position: top center;
+	padding: 4px 3px;
+	margin-top:7px;
+	background-image: url("images/tabTop.png");
+	background-position:0px 0px;
 }
 .lucid .dijitTabListContainer-bottom .tabStripButton {
-	border: 1px solid #b5bcc7;
 	padding:5px 3px;
-	margin-bottom:3px;
-	background-image: url(images/tab_top_back_bottom.png);
-	background-position: bottom center;
-	/*background-color: transparent;*/
+	margin-bottom:4px;
+	background-image: url("images/tabTop.png");
+	background-position:0px -248px;
+	background-position:bottom;
 }
 .lucid .tabStripButtonHover {
 	background-color:#a6d2fb;
@@ -354,10 +349,12 @@
 }
 
 /*disabled styles for tab strip buttons*/
-.lucid .tabStripButtonDisabled {
-	background-color:#DDDDDD !important;
-	background-image:url(../form/images/button_grad_d.png) !important;
-	border:1px solid #C9C9C9 !important;
+.lucid .dijitTabListContainer-top .tabStripButtonDisabled,
+.lucid .dijitTabListContainer-bottom .tabStripButtonDisabled {
+	/* 3 element selector so background-image: ... rule doesn't need !important */
+	background-color:#DDDDDD;
+	background-image:url(../form/images/button_grad_d.png);
+	border:1px solid #C9C9C9;
 }
 .lucid .tabStripButtonDisabled .dijitTabInnerDiv {
 	background:none;
@@ -393,10 +390,11 @@
 }
 .lucid .dijitTabContainerNested .dijitTabContainerTop-tabs {
 	border-bottom:solid 1px #b5bcc7;
-	padding:0px 2px 3px;
+	padding:1px 2px 4px;
 	margin-top:-2px;
 }
 .lucid .dijitTabContainerTabListNested .dijitTabContent {
+	border-color:#fff;
 	background:rgba(255, 255, 255, 0) none repeat scroll 0 0;
 	border:1px solid rgba(255, 255, 255, 0);
 	padding-right: 4px;
@@ -404,7 +402,10 @@
 	-webkit-transition-property:background-color, border;
  	-webkit-transition-duration:.3s;
 }
-.lucid .dijitTabContainerTabListNested .dijitTabInnerDiv {
+.lucid .dijitTabContainerTabListNested .dijitTab .dijitTabInnerDiv {
+	/* 4 element selector to override box-shadow setting from above rule:
+	 *		.lucid .dijitTabContainerTop-tabs .dijitTabChecked .dijitTabInnerDiv { ... }
+	 */
 	background: none;
 	border: none;
 	top: 0px;/* to override top: 1px/-1px for normal tabs */
@@ -428,7 +429,7 @@
 	-moz-border-radius: 2px 2px 2px 2px;
 	-webkit-border-radius:2px;
 	border:solid 1px #a8c7e2;
-	background:#b9d9f5 url("images/tabNestedActive.png") repeat-x;
+	background:#b9d9f5 url("images/tabNested.png") repeat-x;
 	-webkit-transition-duration:.1s;
 }
 .lucid .dijitTabContainerTabListNested .dijitTabChecked .dijitTabContent {
@@ -438,13 +439,24 @@
 	-moz-border-radius: 2px 2px 2px 2px;
 	-webkit-border-radius:2px;
 	border:solid 1px #a8c7e2;
-	background:#d4e8f9 url("images/tabNestedChecked.png") repeat-x;
+	background-position: 0px 105px;
+	background-color:#d4e8f9;
 }
 .lucid .dijitTabContainerTabListNested .dijitTabChecked .tabLabel {
 	text-decoration: none;
 	background-image:none;
-	/*background:#f3f3f3;*/
 }
 .lucid .dijitTabPaneWrapperNested {
 	border: none;/* prevent double border */
+}
+
+.dj_iequirks .dijitTabContainerTop .dijitTabContainerTop-spacer,
+.dj_iequirks .dijitTabContainerBottom .dijitTabContainerBottom-spacer {
+	border-left: #b5bcc7 1px solid;
+	border-right: #b5bcc7 1px solid;
+}
+.dj_iequirks .dijitTabContainerLeft .dijitTabContainerLeft-spacer,
+.dj_iequirks .dijitTabContainerRight .dijitTabContainerRight-spacer {
+	border-top: #b5bcc7 1px solid;
+	border-bottom: #b5bcc7 1px solid;
 }
\ No newline at end of file
--- a/web/js/dojotoolkit/dijit/themes/lucid/layout/TabContainer_rtl.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/layout/TabContainer_rtl.css	Wed Mar 31 18:09:01 2010 +0200
@@ -11,7 +11,8 @@
 	display: block;
 	left: 0;
 }
-.dj_ie7-rtl .lucid .dijitTabCloseText {
+.dj_ie7-rtl .lucid .dijitTabCloseText,
+.dj_iequirks-rtl .lucid .dijitTabCloseText {
 	width: 0;
 	height: 0;
 	overflow: hidden;
@@ -25,18 +26,22 @@
 .dj_ie6-rtl .lucid .dijitTabContainerTop-tabs .dijitTabInnerDiv,
 .dj_ie6-rtl .lucid .dijitTabContainerBottom-tabs .dijitTabInnerDiv,
 .dj_ie7-rtl .lucid .dijitTabContainerTop-tabs .dijitTabInnerDiv,
-.dj_ie7-rtl .lucid .dijitTabContainerBottom-tabs .dijitTabInnerDiv {
+.dj_ie7-rtl .lucid .dijitTabContainerBottom-tabs .dijitTabInnerDiv,
+.dj_iequirks-rtl .lucid .tabStripButton .dijitButtonContents,
+.dj_iequirks-rtl .lucid .dijitTabContainerTop-tabs .dijitTabInnerDiv,
+.dj_iequirks-rtl .lucid .dijitTabContainerBottom-tabs .dijitTabInnerDiv {
 	float:left;
 }
 .dj_ie6-rtl .lucid .tabLabel,/*Make the .tablael has width in ie6-rtl with haslayout property, fix Close icon position bug*/
 .dj_ie6-rtl .lucid .dijitTabContainerRight-tabs .dijitTab,
 .dj_ie6-rtl .lucid .dijitTabContainerLeft-tabs .dijitTab,
 .dj_ie7-rtl .lucid .dijitTabContainerRight-tabs .dijitTabInnerDiv,
-.dj_ie7-rtl .lucid .dijitTabContainerLeft-tabs .dijitTabInnerDiv{
+.dj_ie7-rtl .lucid .dijitTabContainerLeft-tabs .dijitTabInnerDiv {
 	zoom:1;
 }
 .dj_ie6-rtl .lucid .dijitTabCloseIcon,
-.dj_ie7-rtl .lucid .dijitTabCloseIcon {
+.dj_ie7-rtl .lucid .dijitTabCloseIcon,
+.dj_iequirks-rtl .lucid .dijitTabCloseIcon {
 	margin-right:5px;
 }
 .dj_ie6-rtl .lucid .dijitTabContainerRight-tabs,
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/accordion.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/accordion_back.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/accordion_down.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/editor.gif has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/focus.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/splitterH.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/splitterHorizontalHover.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/splitterV.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/splitterVerticalHover.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabBottom.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabClose.gif has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabClose.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabCloseHover.gif has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabCloseHover.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabLeft.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabNested.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabRight.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabStripMenuButton.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabStripSlideButtonLeft.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabStripSlideButtonRight.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tabTop.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_back_lucid_left.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_back_lucid_right.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_bottom.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_bottom_back.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_bottom_focus.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_bottom_top.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_close_icon.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_close_icon_hover.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_close_icon_selected.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_container_border.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_shadow.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_back.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_back_bottom.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_bottom_grad.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_bottom_grad_h.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_bottom_grad_s.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_grad.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_grad_focus.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_grad_h.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_top_grad_s.png has changed
Binary file web/js/dojotoolkit/dijit/themes/lucid/layout/images/tab_whitegrad_left.png has changed
--- a/web/js/dojotoolkit/dijit/themes/lucid/lucid.css	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/themes/lucid/lucid.css	Wed Mar 31 18:09:01 2010 +0200
@@ -33,3 +33,5 @@
 @import url("Editor_rtl.css");
 @import url("TitlePane_rtl.css");
 @import url("Menu_rtl.css");
+@import url("Calendar_rtl.css");
+
--- a/web/js/dojotoolkit/dijit/tree/TreeStoreModel.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dijit/tree/TreeStoreModel.js	Wed Mar 31 18:09:01 2010 +0200
@@ -168,14 +168,14 @@
 				dojo.forEach(childItems, function(item, idx){
 					if(!store.isItemLoaded(item)){
 						store.loadItem({
-							item: function onItem(item){
+							item: item,
+							onItem: function(item){
 								childItems[idx] = item;
 								if(--_waitCount == 0){
 									// all nodes have been loaded, send them to the tree
 									onComplete(childItems);
 								}
 							},
-							onItem: onItem,
 							onError: onError
 						});
 					}
--- a/web/js/dojotoolkit/dojo/DeferredList.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dojo/DeferredList.js	Wed Mar 31 18:09:01 2010 +0200
@@ -8,88 +8,59 @@
 if(!dojo._hasResource["dojo.DeferredList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
 dojo._hasResource["dojo.DeferredList"] = true;
 dojo.provide("dojo.DeferredList");
-dojo.declare("dojo.DeferredList", dojo.Deferred, {
-	constructor: function(/*Array*/ list, /*Boolean?*/ fireOnOneCallback, /*Boolean?*/ fireOnOneErrback, /*Boolean?*/ consumeErrors, /*Function?*/ canceller){
-		// summary:
-		//		Provides event handling for a group of Deferred objects.
-		// description:
-		//		DeferredList takes an array of existing deferreds and returns a new deferred of its own
-		//		this new deferred will typically have its callback fired when all of the deferreds in
-		//		the given list have fired their own deferreds.  The parameters `fireOnOneCallback` and
-		//		fireOnOneErrback, will fire before all the deferreds as appropriate
-		//
-		//	list:
-		//		The list of deferreds to be synchronizied with this DeferredList
-		//	fireOnOneCallback:
-		//		Will cause the DeferredLists callback to be fired as soon as any
-		//		of the deferreds in its list have been fired instead of waiting until
-		//		the entire list has finished
-		//	fireonOneErrback:
-		//		Will cause the errback to fire upon any of the deferreds errback
-		//	canceller:
-		//		A deferred canceller function, see dojo.Deferred
-		this.list = list;
-		this.resultList = new Array(this.list.length);
-
-		// Deferred init
-		this.chain = [];
-		this.id = this._nextId();
-		this.fired = -1;
-		this.paused = 0;
-		this.results = [null, null];
-		this.canceller = canceller;
-		this.silentlyCancelled = false;
-
-		if(this.list.length === 0 && !fireOnOneCallback){
-			this.callback(this.resultList);
+dojo.DeferredList = function(/*Array*/ list, /*Boolean?*/ fireOnOneCallback, /*Boolean?*/ fireOnOneErrback, /*Boolean?*/ consumeErrors, /*Function?*/ canceller){
+	// summary:
+	//		Provides event handling for a group of Deferred objects.
+	// description:
+	//		DeferredList takes an array of existing deferreds and returns a new deferred of its own
+	//		this new deferred will typically have its callback fired when all of the deferreds in
+	//		the given list have fired their own deferreds.  The parameters `fireOnOneCallback` and
+	//		fireOnOneErrback, will fire before all the deferreds as appropriate
+	//
+	//	list:
+	//		The list of deferreds to be synchronizied with this DeferredList
+	//	fireOnOneCallback:
+	//		Will cause the DeferredLists callback to be fired as soon as any
+	//		of the deferreds in its list have been fired instead of waiting until
+	//		the entire list has finished
+	//	fireonOneErrback:
+	//		Will cause the errback to fire upon any of the deferreds errback
+	//	canceller:
+	//		A deferred canceller function, see dojo.Deferred
+	var resultList = [];
+	var resultDeferred = dojo.Deferred();
+	if(list.length === 0 && !fireOnOneCallback){
+		resultDeferred.resolve([0, []]);
+	}
+	var finished = 0;
+	dojo.forEach(list, function(item, i){
+		item.then(function(result){
+			if(fireOnOneCallback){
+				resultDeferred.resolve([i, result]);
+			}else{
+				addResult(true, result);
+			}
+		},function(error){
+			if(fireOnOneErrback){
+				resultDeferred.reject(error);
+			}else{
+				addResult(false, error);
+			}
+			if(consumeErrors){
+				return null;
+			}
+			throw error;
+		});
+		function addResult(succeeded, result){
+			resultList[i] = [succeeded, result];
+			finished++;
+			if(finished === list.length){
+				resultDeferred.resolve(resultList);
+			}
+			
 		}
-
-		this.finishedCount = 0;
-		this.fireOnOneCallback = fireOnOneCallback;
-		this.fireOnOneErrback = fireOnOneErrback;
-		this.consumeErrors = consumeErrors;
-
-		dojo.forEach(this.list, function(d, index){
-			d.addCallback(this, function(r){ this._cbDeferred(index, true, r); return r; });
-			d.addErrback(this, function(r){ this._cbDeferred(index, false, r); return r; });
-		}, this);
-	},
-
-	_cbDeferred: function(index, succeeded, result){
-		// summary:
-		//	The DeferredLists' callback handler
-
-		this.resultList[index] = [succeeded, result]; this.finishedCount += 1;
-		if(this.fired !== 0){
-			if(succeeded && this.fireOnOneCallback){
-				this.callback([index, result]);
-			}else if(!succeeded && this.fireOnOneErrback){
-				this.errback(result);
-			}else if(this.finishedCount == this.list.length){
-				this.callback(this.resultList);
-			}
-		}
-		if(!succeeded && this.consumeErrors){
-			result = null;
-		}
-		return result;
-	},
-
-	gatherResults: function(deferredList){
-		// summary:	
-		//	Gathers the results of the deferreds for packaging
-		//	as the parameters to the Deferred Lists' callback
-
-		var d = new dojo.DeferredList(deferredList, false, true, false);
-		d.addCallback(function(results){
-			var ret = [];
-			dojo.forEach(results, function(result){
-				ret.push(result[1]);
-			});
-			return ret;
-		});
-		return d;
-	}
-});
+	});
+	return resultDeferred;
+};
 
 }
--- a/web/js/dojotoolkit/dojo/_base/Deferred.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dojo/_base/Deferred.js	Wed Mar 31 18:09:01 2010 +0200
@@ -8,117 +8,53 @@
 if(!dojo._hasResource["dojo._base.Deferred"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
 dojo._hasResource["dojo._base.Deferred"] = true;
 dojo.provide("dojo._base.Deferred");
-dojo.require("dojo._base.lang");
 
-dojo.Deferred = function(/*Function?*/ canceller){
+(function(){
+		
+	var freeze = Object.freeze || function(){};
+	// A deferred provides an API for creating and resolving a promise.
+	dojo.Deferred = function(/*Function?*/canceller){
 	// summary:
-	//		Encapsulates a sequence of callbacks in response to a value that
-	//		may not yet be available.  This is modeled after the Deferred class
-	//		from Twisted <http://twistedmatrix.com>.
+	//		Deferreds provide a generic means for encapsulating an asynchronous
+	// 		operation and notifying users of the completion and result of the operation. 
 	// description:
-	//		JavaScript has no threads, and even if it did, threads are hard.
-	//		Deferreds are a way of abstracting non-blocking events, such as the
-	//		final response to an XMLHttpRequest. Deferreds create a promise to
-	//		return a response a some point in the future and an easy way to
-	//		register your interest in receiving that response.
+	//		The dojo.Deferred API is based on the concept of promises that provide a
+	//		generic interface into the eventual completion of an asynchronous action.
+	//		The motivation for promises fundamentally is about creating a 
+	//		separation of concerns that allows one to achieve the same type of 
+	//		call patterns and logical data flow in asynchronous code as can be 
+	//		achieved in synchronous code. Promises allows one 
+	//		to be able to call a function purely with arguments needed for 
+	//		execution, without conflating the call with concerns of whether it is 
+	//		sync or async. One shouldn't need to alter a call's arguments if the 
+	//		implementation switches from sync to async (or vice versa). By having 
+	//		async functions return promises, the concerns of making the call are 
+	//		separated from the concerns of asynchronous interaction (which are 
+	//		handled by the promise).
+	// 
+	//  	The dojo.Deferred is a type of promise that provides methods for fulfilling the 
+	// 		promise with a successful result or an error. The most important method for 
+	// 		working with Dojo's promises is the then() method, which follows the 
+	// 		CommonJS proposed promise API. An example of using a Dojo promise:
+	//		
+	//		| 	var resultingPromise = someAsyncOperation.then(function(result){
+	//		|		... handle result ...
+	//		|	},
+	//		|	function(error){
+	//		|		... handle error ...
+	//		|	});
+	//	
+	//		The .then() call returns a new promise that represents the result of the 
+	// 		execution of the callback. The callbacks will never affect the original promises value.
 	//
-	//		The most important methods for Deffered users are:
+	//		The dojo.Deferred instances also provide the following functions for backwards compatibility:
 	//
 	//			* addCallback(handler)
 	//			* addErrback(handler)
 	//			* callback(result)
 	//			* errback(result)
 	//
-	//		In general, when a function returns a Deferred, users then "fill
-	//		in" the second half of the contract by registering callbacks and
-	//		error handlers. You may register as many callback and errback
-	//		handlers as you like and they will be executed in the order
-	//		registered when a result is provided. Usually this result is
-	//		provided as the result of an asynchronous operation. The code
-	//		"managing" the Deferred (the code that made the promise to provide
-	//		an answer later) will use the callback() and errback() methods to
-	//		communicate with registered listeners about the result of the
-	//		operation. At this time, all registered result handlers are called
-	//		*with the most recent result value*.
-	//
-	//		Deferred callback handlers are treated as a chain, and each item in
-	//		the chain is required to return a value that will be fed into
-	//		successive handlers. The most minimal callback may be registered
-	//		like this:
-	//
-	//		|	var d = new dojo.Deferred();
-	//		|	d.addCallback(function(result){ return result; });
-	//
-	//		Perhaps the most common mistake when first using Deferreds is to
-	//		forget to return a value (in most cases, the value you were
-	//		passed).
-	//
-	//		The sequence of callbacks is internally represented as a list of
-	//		2-tuples containing the callback/errback pair.  For example, the
-	//		following call sequence:
-	//		
-	//		|	var d = new dojo.Deferred();
-	//		|	d.addCallback(myCallback);
-	//		|	d.addErrback(myErrback);
-	//		|	d.addBoth(myBoth);
-	//		|	d.addCallbacks(myCallback, myErrback);
-	//
-	//		is translated into a Deferred with the following internal
-	//		representation:
-	//
-	//		|	[
-	//		|		[myCallback, null],
-	//		|		[null, myErrback],
-	//		|		[myBoth, myBoth],
-	//		|		[myCallback, myErrback]
-	//		|	]
-	//
-	//		The Deferred also keeps track of its current status (fired).  Its
-	//		status may be one of three things:
-	//
-	//			* -1: no value yet (initial condition)
-	//			* 0: success
-	//			* 1: error
-	//	
-	//		A Deferred will be in the error state if one of the following three
-	//		conditions are met:
-	//
-	//			1. The result given to callback or errback is "instanceof" Error
-	//			2. The previous callback or errback raised an exception while
-	//			   executing
-	//			3. The previous callback or errback returned a value
-	//			   "instanceof" Error
-	//
-	//		Otherwise, the Deferred will be in the success state. The state of
-	//		the Deferred determines the next element in the callback sequence
-	//		to run.
-	//
-	//		When a callback or errback occurs with the example deferred chain,
-	//		something equivalent to the following will happen (imagine
-	//		that exceptions are caught and returned):
-	//
-	//		|	// d.callback(result) or d.errback(result)
-	//		|	if(!(result instanceof Error)){
-	//		|		result = myCallback(result);
-	//		|	}
-	//		|	if(result instanceof Error){
-	//		|		result = myErrback(result);
-	//		|	}
-	//		|	result = myBoth(result);
-	//		|	if(result instanceof Error){
-	//		|		result = myErrback(result);
-	//		|	}else{
-	//		|		result = myCallback(result);
-	//		|	}
-	//
-	//		The result is then stored away in case another step is added to the
-	//		callback sequence.	Since the Deferred already has a value
-	//		available, any new callbacks added will be called immediately.
-	//
-	//		There are two other "advanced" details about this implementation
-	//		that are useful:
-	//
-	//		Callbacks are allowed to return Deferred instances themselves, so
+	//		Callbacks are allowed to return promisesthemselves, so
 	//		you can build complicated sequences of events with ease.
 	//
 	//		The creator of the Deferred may specify a canceller.  The canceller
@@ -185,7 +121,7 @@
 	//		|	}
 	//
 	//		|	// using Deferred style
-	//		|	renderLotsOfData(someDataObj).addErrback(function(){
+	//		|	renderLotsOfData(someDataObj).then(null, function(){
 	//		|		promptUserToRecover();
 	//		|	});
 	//		|	// NOTE: addErrback and addCallback both return the Deferred
@@ -213,220 +149,191 @@
 	//		|	}
 	//
 	//		|	// using Deferred style
-	//		|	renderLotsOfData(someDataObj).addErrback(function(){
+	//		|	renderLotsOfData(someDataObj).then(null, function(){
 	//		|		promptUserToRecover();
 	//		|	});
 	//
 	//		Note that the caller doesn't have to change his code at all to
 	//		handle the asynchronous case.
-
-	this.chain = [];
-	this.id = this._nextId();
-	this.fired = -1;
-	this.paused = 0;
-	this.results = [null, null];
-	this.canceller = canceller;
-	this.silentlyCancelled = false;
-	this.isFiring = false;
+		return new Deferred(canceller);
+	} 
+	var mutator = function(){};
+	
+	function Deferred(canceller){
+		var result, finished, isError, head, nextListener;
+		var promise = this.promise = {};
+		
+		function complete(value){
+			if(finished){
+				throw new Error("This deferred has already been resolved");				
+			}
+			result = value;
+			finished = true;
+			notify();
+		}
+		function notify(){
+			var mutated;
+			while(!mutated && nextListener){
+				var listener = nextListener;
+				nextListener = nextListener.next;
+				if(mutated = (listener.progress == mutator)){ // assignment and check
+					finished = false;
+				}
+				var func = (isError ? listener.error : listener.resolved);
+				if (func) {
+					try {
+						var newResult = func(result);
+						if (newResult && typeof newResult.then === "function") {
+							newResult.then(listener.deferred.resolve, listener.deferred.reject);
+							continue;
+						}
+						listener.deferred.resolve(mutated && newResult === undefined ? result : newResult);
+					}
+					catch (e) {
+						listener.deferred.reject(e);
+					}
+				}else {
+					if(isError){
+						listener.deferred.reject(result);
+					}else{
+						listener.deferred.resolve(result);
+					}
+				}
+			}	
+		}
+		// calling resolve will resolve the promise
+		var resolve = this.resolve = this.callback = function(value){
+			// summary:
+			//		Fulfills the Deferred instance successfully with the provide value
+			this.fired = 0; 
+			complete(value);
+		};
+		
+		
+		// calling error will indicate that the promise failed
+		var reject = this.reject = this.errback = function(error){
+			// summary:
+			//		Fulfills the Deferred instance as an error with the provided error 
+			isError = true;
+			this.fired = 1;
+			complete(error);
+			(dojo.config.deferredOnError || function(x){ console.error(x); })(error);
+		};
+		// call progress to provide updates on the progress on the completion of the promise
+		this.progress = function(update){
+			// summary
+			//		Send progress events to all listeners
+			var listener = nextListener;
+			while(listener){
+				var progress = listener.progress;
+				progress && progress(update);
+				listener = listener.next;	
+			}
+		};
+		this.addCallbacks = function(/*Function?*/callback, /*Function?*/errback){
+			this.then(callback, errback, mutator);
+			return this;
+		};
+		// provide the implementation of the promise
+		this.then = promise.then = function(/*Function?*/resolvedCallback, /*Function?*/errorCallback, /*Function?*/progressCallback){
+			// summary
+			// 		Adds a fulfilledHandler, errorHandler, and progressHandler to be called for 
+			// 		completion of a promise. The fulfilledHandler is called when the promise 
+			// 		is fulfilled. The errorHandler is called when a promise fails. The 
+			// 		progressHandler is called for progress events. All arguments are optional 
+			// 		and non-function values are ignored. The progressHandler is not only an 
+			// 		optional argument, but progress events are purely optional. Promise 
+			// 		providers are not required to ever create progress events.
+			// 
+			// 		This function will return a new promise that is fulfilled when the given 
+			// 		fulfilledHandler or errorHandler callback is finished. This allows promise 
+			// 		operations to be chained together. The value returned from the callback 
+			// 		handler is the fulfillment value for the returned promise. If the callback 
+			// 		throws an error, the returned promise will be moved to failed state.
+			//	
+			// example:
+			// 		An example of using a CommonJS compliant promise:
+  			//		|	asyncComputeTheAnswerToEverything().
+			//		|		then(addTwo).
+			//		|		then(printResult, onError);
+  			//		|	>44 
+			// 		
+			var returnDeferred = progressCallback == mutator ? this : new Deferred(promise.cancel);
+			var listener = {
+				resolved: resolvedCallback, 
+				error: errorCallback, 
+				progress: progressCallback, 
+				deferred: returnDeferred
+			}; 
+			if(nextListener){
+				head = head.next = listener;
+			}
+			else{
+				nextListener = head = listener;
+			}
+			if(finished){
+				notify();
+			}
+			return returnDeferred.promise;
+		};
+		
+		this.cancel = promise.cancel = function () {
+			// summary:
+			//		Cancels the asynchronous operation
+			if(!finished){
+				var error = canceller && canceller(this);
+				if (!(error instanceof Error)) {
+					error = new Error(error);
+				}
+				reject(error);
+			}
+		}
+		freeze(promise);
+	};
+	dojo.extend(Deferred, {
+		addCallback: function (/*Function*/callback) {
+			return this.addCallbacks(dojo.hitch.apply(dojo, arguments));
+		},
+	
+		addErrback: function (/*Function*/errback) {
+			return this.addCallbacks(null, dojo.hitch.apply(dojo, arguments));
+		},
+	
+		addBoth: function (/*Function*/callback) {
+			var enclosed = dojo.hitch.apply(dojo, arguments);
+			return this.addCallbacks(enclosed, enclosed);
+		},
+		fired: -1
+	});
+	
+})();
+dojo.when = function(promiseOrValue, /*Function?*/callback, /*Function?*/errback, /*Function?*/progressHandler){
+	// summary:
+	//		This provides normalization between normal synchronous values and 
+	//		asynchronous promises, so you can interact with them in a common way
+	//	example:
+	//		|	function printFirstAndList(items){
+	//		|		dojo.when(findFirst(items), console.log);
+	//		|		dojo.when(findLast(items), console.log);
+	//		|	}
+	//		|	function findFirst(items){
+	//		|		return dojo.when(items, function(items){
+	//		|			return items[0];
+	//		|		});
+	//		|	}
+	//		|	function findLast(items){
+	//		|		return dojo.when(items, function(items){
+	//		|			return items[items.length];
+	//		|		});
+	//		|	}
+	//		And now all three of his functions can be used sync or async.
+	//		|	printFirstAndLast([1,2,3,4]) will work just as well as
+	//		|	printFirstAndLast(dojo.xhrGet(...));
+	
+	if(promiseOrValue && typeof promiseOrValue.then === "function"){
+		return promiseOrValue.then(callback, errback, progressHandler);
+	}
+	return callback(promiseOrValue);
 };
 
-dojo.extend(dojo.Deferred, {
-	/*
-	makeCalled: function(){
-		// summary:
-		//		returns a new, empty deferred, which is already in the called
-		//		state. Calling callback() or errback() on this deferred will
-		//		yeild an error and adding new handlers to it will result in
-		//		them being called immediately.
-		var deferred = new dojo.Deferred();
-		deferred.callback();
-		return deferred;
-	},
-
-	toString: function(){
-		var state;
-		if(this.fired == -1){
-			state = 'unfired';
-		}else{
-			state = this.fired ? 'success' : 'error';
-		}
-		return 'Deferred(' + this.id + ', ' + state + ')';
-	},
-	*/
-
-	_nextId: (function(){
-		var n = 1;
-		return function(){ return n++; };
-	})(),
-
-	cancel: function(){
-		// summary:	
-		//		Cancels a Deferred that has not yet received a value, or is
-		//		waiting on another Deferred as its value.
-		// description:
-		//		If a canceller is defined, the canceller is called. If the
-		//		canceller did not return an error, or there was no canceller,
-		//		then the errback chain is started.
-		var err;
-		if(this.fired == -1){
-			if(this.canceller){
-				err = this.canceller(this);
-			}else{
-				this.silentlyCancelled = true;
-			}
-			if(this.fired == -1){
-				if(!(err instanceof Error)){
-					var res = err;
-					var msg = "Deferred Cancelled";
-					if(err && err.toString){
-						msg += ": " + err.toString();
-					}
-					err = new Error(msg);
-					err.dojoType = "cancel";
-					err.cancelResult = res;
-				}
-				this.errback(err);
-			}
-		}else if(	(this.fired == 0) &&
-					(this.results[0] instanceof dojo.Deferred)
-		){
-			this.results[0].cancel();
-		}
-	},
-			
-
-	_resback: function(res){
-		// summary:
-		//		The private primitive that means either callback or errback
-		this.fired = ((res instanceof Error) ? 1 : 0);
-		this.results[this.fired] = res;
-		this._fire();
-	},
-
-	_check: function(){
-		if(this.fired != -1){
-			if(!this.silentlyCancelled){
-				throw new Error("already called!");
-			}
-			this.silentlyCancelled = false;
-			return;
-		}
-	},
-
-	callback: function(res){
-		//	summary:	
-		//		Begin the callback sequence with a non-error value.
-		
-		/*
-		callback or errback should only be called once on a given
-		Deferred.
-		*/
-		this._check();
-		this._resback(res);
-	},
-
-	errback: function(/*Error*/res){
-		//	summary: 
-		//		Begin the callback sequence with an error result.
-		this._check();
-		if(!(res instanceof Error)){
-			res = new Error(res);
-		}
-		this._resback(res);
-	},
-
-	addBoth: function(/*Function|Object*/cb, /*String?*/cbfn){
-		//	summary:
-		//		Add the same function as both a callback and an errback as the
-		//		next element on the callback sequence.This is useful for code
-		//		that you want to guarantee to run, e.g. a finalizer.
-		var enclosed = dojo.hitch.apply(dojo, arguments);
-		return this.addCallbacks(enclosed, enclosed); // dojo.Deferred
-	},
-
-	addCallback: function(/*Function|Object*/cb, /*String?*/cbfn /*...*/){
-		//	summary: 
-		//		Add a single callback to the end of the callback sequence.
-		return this.addCallbacks(dojo.hitch.apply(dojo, arguments)); // dojo.Deferred
-	},
-
-	addErrback: function(cb, cbfn){
-		//	summary: 
-		//		Add a single callback to the end of the callback sequence.
-		return this.addCallbacks(null, dojo.hitch.apply(dojo, arguments)); // dojo.Deferred
-	},
-
-	addCallbacks: function(cb, eb){
-		// summary: 
-		//		Add separate callback and errback to the end of the callback
-		//		sequence.
-		this.chain.push([cb, eb])
-		if(this.fired >= 0 && !this.isFiring){
-			this._fire();
-		}
-		return this; // dojo.Deferred
-	},
-
-	_fire: function(){
-		// summary: 
-		//		Used internally to exhaust the callback sequence when a result
-		//		is available.
-		this.isFiring = true;
-		var chain = this.chain;
-		var fired = this.fired;
-		var res = this.results[fired];
-		var self = this;
-		var cb = null;
-		while(
-			(chain.length > 0) &&
-			(this.paused == 0)
-		){
-			// Array
-			var f = chain.shift()[fired];
-			if(!f){ continue; }
-			var func = function(){
-				var ret = f(res);
-				//If no response, then use previous response.
-				if(typeof ret != "undefined"){
-					res = ret;
-				}
-				fired = ((res instanceof Error) ? 1 : 0);
-				if(res instanceof dojo.Deferred){
-					cb = function(res){
-						self._resback(res);
-						// inlined from _pause()
-						self.paused--;
-						if(
-							(self.paused == 0) && 
-							(self.fired >= 0)
-						){
-							self._fire();
-						}
-					}
-					// inlined from _unpause
-					this.paused++;
-				}
-			};
-			if(dojo.config.debugAtAllCosts){
-				func.call(this);
-			}else{
-				try{
-					func.call(this);
-				}catch(err){
-					fired = 1;
-					res = err;
-				}
-			}
-		}
-		this.fired = fired;
-		this.results[fired] = res;
-		this.isFiring = false;
-		if((cb)&&(this.paused)){
-			// this is for "tail recursion" in case the dependent
-			// deferred is already fired
-			res.addBoth(cb);
-		}
-	}
-});
-
 }
--- a/web/js/dojotoolkit/dojo/dojo.js	Wed Mar 31 16:29:56 2010 +0200
+++ b/web/js/dojotoolkit/dojo/dojo.js	Wed Mar 31 18:09:01 2010 +0200
@@ -13,4 +13,4 @@
 	for documentation and information on getting the source.
 */
 
-(function(){var _1=null;if((_1||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){var _2="",_3="",_4="",_5={},_6={};_1=_1||djConfig.scopeMap;for(var i=0;i<_1.length;i++){var _7=_1[i];_2+="var "+_7[0]+" = {}; "+_7[1]+" = "+_7[0]+";"+_7[1]+"._scopeName = '"+_7[1]+"';";_3+=(i==0?"":",")+_7[0];_4+=(i==0?"":",")+_7[1];_5[_7[0]]=_7[1];_6[_7[1]]=_7[0];}eval(_2+"dojo._scopeArgs = ["+_4+"];");dojo._scopePrefixArgs=_3;dojo._scopePrefix="(function("+_3+"){";dojo._scopeSuffix="})("+_4+")";dojo._scopeMap=_5;dojo._scopeMapRev=_6;}(function(){if(typeof this["loadFirebugConsole"]=="function"){this["loadFirebugConsole"]();}else{this.console=this.console||{};var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];var i=0,tn;while((tn=cn[i++])){if(!console[tn]){(function(){var _8=tn+"";console[_8]=("log" in console)?function(){var a=Array.apply({},arguments);a.unshift(_8+":");console["log"](a.join(" "));}:function(){};console[_8]._fake=true;})();}}}if(typeof dojo=="undefined"){dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};}var d=dojo;if(typeof dijit=="undefined"){dijit={_scopeName:"dijit"};}if(typeof dojox=="undefined"){dojox={_scopeName:"dojox"};}if(!d._scopeArgs){d._scopeArgs=[dojo,dijit,dojox];}d.global=this;d.config={isDebug:false,debugAtAllCosts:false};if(typeof djConfig!="undefined"){for(var _9 in djConfig){d.config[_9]=djConfig[_9];}}dojo.locale=d.config.locale;var _a="$Rev: 21438 $".match(/\d+/);dojo.version={major:0,minor:0,patch:0,flag:"dev",revision:_a?+_a[0]:NaN,toString:function(){with(d.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};if(typeof OpenAjax!="undefined"){OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());}var _b,_c,_d={};for(var i in {toString:1}){_b=[];break;}dojo._extraNames=_b=_b||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];_c=_b.length;dojo._mixin=function(_e,_f){var _10,s,i;for(_10 in _f){s=_f[_10];if(!(_10 in _e)||(_e[_10]!==s&&(!(_10 in _d)||_d[_10]!==s))){_e[_10]=s;}}if(_c&&_f){for(i=0;i<_c;++i){_10=_b[i];s=_f[_10];if(!(_10 in _e)||(_e[_10]!==s&&(!(_10 in _d)||_d[_10]!==s))){_e[_10]=s;}}}return _e;};dojo.mixin=function(obj,_11){if(!obj){obj={};}for(var i=1,l=arguments.length;i<l;i++){d._mixin(obj,arguments[i]);}return obj;};dojo._getProp=function(_12,_13,_14){var obj=_14||d.global;for(var i=0,p;obj&&(p=_12[i]);i++){if(i==0&&d._scopeMap[p]){p=d._scopeMap[p];}obj=(p in obj?obj[p]:(_13?obj[p]={}:undefined));}return obj;};dojo.setObject=function(_15,_16,_17){var _18=_15.split("."),p=_18.pop(),obj=d._getProp(_18,true,_17);return obj&&p?(obj[p]=_16):undefined;};dojo.getObject=function(_19,_1a,_1b){return d._getProp(_19.split("."),_1a,_1b);};dojo.exists=function(_1c,obj){return !!d.getObject(_1c,false,obj);};dojo["eval"]=function(_1d){return d.global.eval?d.global.eval(_1d):eval(_1d);};d.deprecated=d.experimental=function(){};})();(function(){var d=dojo;d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_1e){var mp=d._modulePrefixes;return !!(mp[_1e]&&mp[_1e].value);},_getModulePrefix:function(_1f){var mp=d._modulePrefixes;if(d._moduleHasPrefix(_1f)){return mp[_1f].value;}return _1f;},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});dojo._loadPath=function(_20,_21,cb){var uri=((_20.charAt(0)=="/"||_20.match(/^\w+:/))?"":d.baseUrl)+_20;try{return !_21?d._loadUri(uri,cb):d._loadUriAndCheck(uri,_21,cb);}catch(e){console.error(e);return false;}};dojo._loadUri=function(uri,cb){if(d._loadedUrls[uri]){return true;}d._inFlightCount++;var _22=d._getText(uri,true);if(_22){d._loadedUrls[uri]=true;d._loadedUrls.push(uri);if(cb){_22="("+_22+")";}else{_22=d._scopePrefix+_22+d._scopeSuffix;}if(!d.isIE){_22+="\r\n//@ sourceURL="+uri;}var _23=d["eval"](_22);if(cb){cb(_23);}}if(--d._inFlightCount==0&&d._postLoad&&d._loaders.length){setTimeout(function(){if(d._inFlightCount==0){d._callLoaded();}},0);}return !!_22;};dojo._loadUriAndCheck=function(uri,_24,cb){var ok=false;try{ok=d._loadUri(uri,cb);}catch(e){console.error("failed loading "+uri+" with error: "+e);}return !!(ok&&d._loadedModules[_24]);};dojo.loaded=function(){d._loadNotifying=true;d._postLoad=true;var mll=d._loaders;d._loaders=[];for(var x=0;x<mll.length;x++){mll[x]();}d._loadNotifying=false;if(d._postLoad&&d._inFlightCount==0&&mll.length){d._callLoaded();}};dojo.unloaded=function(){var mll=d._unloaders;while(mll.length){(mll.pop())();}};d._onto=function(arr,obj,fn){if(!fn){arr.push(obj);}else{if(fn){var _25=(typeof fn=="string")?obj[fn]:fn;arr.push(function(){_25.call(obj);});}}};dojo.ready=dojo.addOnLoad=function(obj,_26){d._onto(d._loaders,obj,_26);if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded();}};var dca=d.config.addOnLoad;if(dca){d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);}dojo._modulesLoaded=function(){if(d._postLoad){return;}if(d._inFlightCount>0){console.warn("files still in flight!");return;}d._callLoaded();};dojo._callLoaded=function(){if(typeof setTimeout=="object"||(d.config.useXDomain&&d.isOpera)){setTimeout(d.isAIR?function(){d.loaded();}:d._scopeName+".loaded();",0);}else{d.loaded();}};dojo._getModuleSymbols=function(_27){var _28=_27.split(".");for(var i=_28.length;i>0;i--){var _29=_28.slice(0,i).join(".");if(i==1&&!d._moduleHasPrefix(_29)){_28[0]="../"+_28[0];}else{var _2a=d._getModulePrefix(_29);if(_2a!=_29){_28.splice(0,i,_2a);break;}}}return _28;};dojo._global_omit_module_check=false;dojo.loadInit=function(_2b){_2b();};dojo._loadModule=dojo.require=function(_2c,_2d){_2d=d._global_omit_module_check||_2d;var _2e=d._loadedModules[_2c];if(_2e){return _2e;}var _2f=d._getModuleSymbols(_2c).join("/")+".js";var _30=!_2d?_2c:null;var ok=d._loadPath(_2f,_30);if(!ok&&!_2d){throw new Error("Could not load '"+_2c+"'; last tried '"+_2f+"'");}if(!_2d&&!d._isXDomain){_2e=d._loadedModules[_2c];if(!_2e){throw new Error("symbol '"+_2c+"' is not defined after loading '"+_2f+"'");}}return _2e;};dojo.provide=function(_31){_31=_31+"";return (d._loadedModules[_31]=d.getObject(_31,true));};dojo.platformRequire=function(_32){var _33=_32.common||[];var _34=_33.concat(_32[d._name]||_32["default"]||[]);for(var x=0;x<_34.length;x++){var _35=_34[x];if(_35.constructor==Array){d._loadModule.apply(d,_35);}else{d._loadModule(_35);}}};dojo.requireIf=function(_36,_37){if(_36===true){var _38=[];for(var i=1;i<arguments.length;i++){_38.push(arguments[i]);}d.require.apply(d,_38);}};dojo.requireAfterIf=d.requireIf;dojo.registerModulePath=function(_39,_3a){d._modulePrefixes[_39]={name:_39,value:_3a};};dojo.requireLocalization=function(_3b,_3c,_3d,_3e){d.require("dojo.i18n");d.i18n._requireLocalization.apply(d.hostenv,arguments);};var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");dojo._Url=function(){var n=null,_3f=arguments,uri=[_3f[0]];for(var i=1;i<_3f.length;i++){if(!_3f[i]){continue;}var _40=new d._Url(_3f[i]+""),_41=new d._Url(uri[0]+"");if(_40.path==""&&!_40.scheme&&!_40.authority&&!_40.query){if(_40.fragment!=n){_41.fragment=_40.fragment;}_40=_41;}else{if(!_40.scheme){_40.scheme=_41.scheme;if(!_40.authority){_40.authority=_41.authority;if(_40.path.charAt(0)!="/"){var _42=_41.path.substring(0,_41.path.lastIndexOf("/")+1)+_40.path;var _43=_42.split("/");for(var j=0;j<_43.length;j++){if(_43[j]=="."){if(j==_43.length-1){_43[j]="";}else{_43.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_43[0]=="")&&_43[j]==".."&&_43[j-1]!=".."){if(j==(_43.length-1)){_43.splice(j,1);_43[j-1]="";}else{_43.splice(j-1,2);j-=2;}}}}_40.path=_43.join("/");}}}}uri=[];if(_40.scheme){uri.push(_40.scheme,":");}if(_40.authority){uri.push("//",_40.authority);}uri.push(_40.path);if(_40.query){uri.push("?",_40.query);}if(_40.fragment){uri.push("#",_40.fragment);}}this.uri=uri.join("");var r=this.uri.match(ore);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(ire);this.user=r[3]||n;this.password=r[4]||n;this.host=r[6]||r[7];this.port=r[9]||n;}};dojo._Url.prototype.toString=function(){return this.uri;};dojo.moduleUrl=function(_44,url){var loc=d._getModuleSymbols(_44).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _45=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_45==-1||_45>loc.indexOf("/"))){loc=d.baseUrl+loc;}return new d._Url(loc,url);};})();if(typeof window!="undefined"){dojo.isBrowser=true;dojo._name="browser";(function(){var d=dojo;if(document&&document.getElementsByTagName){var _46=document.getElementsByTagName("script");var _47=/dojo(\.xd)?\.js(\W|$)/i;for(var i=0;i<_46.length;i++){var src=_46[i].getAttribute("src");if(!src){continue;}var m=src.match(_47);if(m){if(!d.config.baseUrl){d.config.baseUrl=src.substring(0,m.index);}var cfg=_46[i].getAttribute("djConfig");if(cfg){var _48=eval("({ "+cfg+" })");for(var x in _48){dojo.config[x]=_48[x];}}break;}}}d.baseUrl=d.config.baseUrl;var n=navigator;var dua=n.userAgent,dav=n.appVersion,tv=parseFloat(dav);if(dua.indexOf("Opera")>=0){d.isOpera=tv;}if(dua.indexOf("AdobeAIR")>=0){d.isAIR=1;}d.isKhtml=(dav.indexOf("Konqueror")>=0)?tv:0;d.isWebKit=parseFloat(dua.split("WebKit/")[1])||undefined;d.isChrome=parseFloat(dua.split("Chrome/")[1])||undefined;d.isMac=dav.indexOf("Macintosh")>=0;var _49=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);if(_49&&!dojo.isChrome){d.isSafari=parseFloat(dav.split("Version/")[1]);if(!d.isSafari||parseFloat(dav.substr(_49+7))<=419.3){d.isSafari=2;}}if(dua.indexOf("Gecko")>=0&&!d.isKhtml&&!d.isWebKit){d.isMozilla=d.isMoz=tv;}if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1]||dua.split("Minefield/")[1])||undefined;}if(document.all&&!d.isOpera){d.isIE=parseFloat(dav.split("MSIE ")[1])||undefined;var _4a=document.documentMode;if(_4a&&_4a!=5&&Math.floor(d.isIE)!=_4a){d.isIE=_4a;}}if(dojo.isIE&&window.location.protocol==="file:"){dojo.config.ieForceActiveXXhr=true;}d.isQuirks=document.compatMode=="BackCompat";d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d._xhrObj=function(){var _4b,_4c;if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){try{_4b=new XMLHttpRequest();}catch(e){}}if(!_4b){for(var i=0;i<3;++i){var _4d=d._XMLHTTP_PROGIDS[i];try{_4b=new ActiveXObject(_4d);}catch(e){_4c=e;}if(_4b){d._XMLHTTP_PROGIDS=[_4d];break;}}}if(!_4b){throw new Error("XMLHTTP not available: "+_4c);}return _4b;};d._isDocumentOk=function(_4e){var _4f=_4e.status||0,lp=location.protocol;return (_4f>=200&&_4f<300)||_4f==304||_4f==1223||(!_4f&&(lp=="file:"||lp=="chrome:"||lp=="app:"));};var _50=window.location+"";var _51=document.getElementsByTagName("base");var _52=(_51&&_51.length>0);d._getText=function(uri,_53){var _54=d._xhrObj();if(!_52&&dojo._Url){uri=(new dojo._Url(_50,uri)).toString();}if(d.config.cacheBust){uri+="";uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");}_54.open("GET",uri,false);try{_54.send(null);if(!d._isDocumentOk(_54)){var err=Error("Unable to load "+uri+" status:"+_54.status);err.status=_54.status;err.responseText=_54.responseText;throw err;}}catch(e){if(_53){return null;}throw e;}return _54.responseText;};var _55=window;var _56=function(_57,fp){var _58=_55.attachEvent||_55.addEventListener;_57=_55.attachEvent?_57:_57.substring(2);_58(_57,function(){fp.apply(_55,arguments);},false);};d._windowUnloaders=[];d.windowUnloaded=function(){var mll=d._windowUnloaders;while(mll.length){(mll.pop())();}};var _59=0;d.addOnWindowUnload=function(obj,_5a){d._onto(d._windowUnloaders,obj,_5a);if(!_59){_59=1;_56("onunload",d.windowUnloaded);}};var _5b=0;d.addOnUnload=function(obj,_5c){d._onto(d._unloaders,obj,_5c);if(!_5b){_5b=1;_56("onbeforeunload",dojo.unloaded);}};})();dojo._initFired=false;dojo._loadInit=function(e){if(!dojo._initFired){dojo._initFired=true;if(!dojo.config.afterOnLoad&&window.detachEvent){window.detachEvent("onload",dojo._loadInit);}if(dojo._inFlightCount==0){dojo._modulesLoaded();}}};if(!dojo.config.afterOnLoad){if(document.addEventListener){document.addEventListener("DOMContentLoaded",dojo._loadInit,false);window.addEventListener("load",dojo._loadInit,false);}else{if(window.attachEvent){window.attachEvent("onload",dojo._loadInit);}}}if(dojo.isIE){if(!dojo.config.afterOnLoad&&!dojo.config.skipIeDomLoaded){document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");}try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");var _5d=["*","group","roundrect","oval","shape","rect","imagedata"],i=0,l=1,s=document.createStyleSheet();if(dojo.isIE>=8){i=1;l=_5d.length;}for(;i<l;++i){s.addRule("v\\:"+_5d[i],"behavior:url(#default#VML); display:inline-block");}}catch(e){}}}(function(){var mp=dojo.config["modulePaths"];if(mp){for(var _5e in mp){dojo.registerModulePath(_5e,mp[_5e]);}}})();if(dojo.config.isDebug){dojo.require("dojo._firebug.firebug");}if(dojo.config.debugAtAllCosts){dojo.config.useXDomain=true;dojo.require("dojo._base._loader.loader_xd");dojo.require("dojo._base._loader.loader_debug");}if(!dojo._hasResource["dojo._base.lang"]){dojo._hasResource["dojo._base.lang"]=true;dojo.provide("dojo._base.lang");(function(){var d=dojo,_5f=Object.prototype.toString;dojo.isString=function(it){return (typeof it=="string"||it instanceof String);};dojo.isArray=function(it){return it&&(it instanceof Array||typeof it=="array");};dojo.isFunction=function(it){return _5f.call(it)==="[object Function]";};dojo.isObject=function(it){return it!==undefined&&(it===null||typeof it=="object"||d.isArray(it)||d.isFunction(it));};dojo.isArrayLike=function(it){return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));};dojo.isAlien=function(it){return it&&!d.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));};dojo.extend=function(_60,_61){for(var i=1,l=arguments.length;i<l;i++){d._mixin(_60.prototype,arguments[i]);}return _60;};dojo._hitchArgs=function(_62,_63){var pre=d._toArray(arguments,2);var _64=d.isString(_63);return function(){var _65=d._toArray(arguments);var f=_64?(_62||d.global)[_63]:_63;return f&&f.apply(_62||this,pre.concat(_65));};};dojo.hitch=function(_66,_67){if(arguments.length>2){return d._hitchArgs.apply(d,arguments);}if(!_67){_67=_66;_66=null;}if(d.isString(_67)){_66=_66||d.global;if(!_66[_67]){throw (["dojo.hitch: scope[\"",_67,"\"] is null (scope=\"",_66,"\")"].join(""));}return function(){return _66[_67].apply(_66,arguments||[]);};}return !_66?_67:function(){return _67.apply(_66,arguments||[]);};};dojo.delegate=dojo._delegate=(function(){function TMP(){};return function(obj,_68){TMP.prototype=obj;var tmp=new TMP();TMP.prototype=null;if(_68){d._mixin(tmp,_68);}return tmp;};})();var _69=function(obj,_6a,_6b){return (_6b||[]).concat(Array.prototype.slice.call(obj,_6a||0));};var _6c=function(obj,_6d,_6e){var arr=_6e||[];for(var x=_6d||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};dojo._toArray=d.isIE?function(obj){return ((obj.item)?_6c:_69).apply(this,arguments);}:_69;dojo.partial=function(_6f){var arr=[null];return d.hitch.apply(d,arr.concat(d._toArray(arguments)));};var _70=d._extraNames,_71=_70.length,_72={};dojo.clone=function(o){if(!o||typeof o!="object"||d.isFunction(o)){return o;}if(o.nodeType&&"cloneNode" in o){return o.cloneNode(true);}if(o instanceof Date){return new Date(o.getTime());}var r,i,l,s,_73;if(d.isArray(o)){r=[];for(i=0,l=o.length;i<l;++i){if(i in o){r.push(d.clone(o[i]));}}}else{r=o.constructor?new o.constructor():{};}for(_73 in o){s=o[_73];if(!(_73 in r)||(r[_73]!==s&&(!(_73 in _72)||_72[_73]!==s))){r[_73]=d.clone(s);}}if(_71){for(i=0;i<_71;++i){_73=_70[i];s=o[_73];if(!(_73 in r)||(r[_73]!==s&&(!(_73 in _72)||_72[_73]!==s))){r[_73]=s;}}}return r;};dojo.trim=String.prototype.trim?function(str){return str.trim();}:function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");};var _74=/\{([^\}]+)\}/g;dojo.replace=function(_75,map,_76){return _75.replace(_76||_74,d.isFunction(map)?map:function(_77,k){return d.getObject(k,false,map);});};})();}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _78=function(arr,obj,cb){return [(typeof arr=="string")?arr.split(""):arr,obj||dojo.global,(typeof cb=="string")?new Function("item","index","array",cb):cb];};var _79=function(_7a,arr,_7b,_7c){var _7d=_78(arr,_7c,_7b);arr=_7d[0];for(var i=0,l=arr.length;i<l;++i){var _7e=!!_7d[2].call(_7d[1],arr[i],i,arr);if(_7a^_7e){return _7e;}}return _7a;};dojo.mixin(dojo,{indexOf:function(_7f,_80,_81,_82){var _83=1,end=_7f.length||0,i=0;if(_82){i=end-1;_83=end=-1;}if(_81!=undefined){i=_81;}if((_82&&i>end)||i<end){for(;i!=end;i+=_83){if(_7f[i]==_80){return i;}}}return -1;},lastIndexOf:function(_84,_85,_86){return dojo.indexOf(_84,_85,_86,true);},forEach:function(arr,_87,_88){if(!arr||!arr.length){return;}var _89=_78(arr,_88,_87);arr=_89[0];for(var i=0,l=arr.length;i<l;++i){_89[2].call(_89[1],arr[i],i,arr);}},every:function(arr,_8a,_8b){return _79(true,arr,_8a,_8b);},some:function(arr,_8c,_8d){return _79(false,arr,_8c,_8d);},map:function(arr,_8e,_8f){var _90=_78(arr,_8f,_8e);arr=_90[0];var _91=(arguments[3]?(new arguments[3]()):[]);for(var i=0,l=arr.length;i<l;++i){_91.push(_90[2].call(_90[1],arr[i],i,arr));}return _91;},filter:function(arr,_92,_93){var _94=_78(arr,_93,_92);arr=_94[0];var _95=[];for(var i=0,l=arr.length;i<l;++i){if(_94[2].call(_94[1],arr[i],i,arr)){_95.push(arr[i]);}}return _95;}});})();}if(!dojo._hasResource["dojo._base.declare"]){dojo._hasResource["dojo._base.declare"]=true;dojo.provide("dojo._base.declare");(function(){var d=dojo,mix=d._mixin,op=Object.prototype,_96=op.toString,_97=new Function,_98=0,_99="constructor";function err(msg){throw new Error("declare: "+msg);};function _9a(_9b){var _9c=[],_9d=[{cls:0,refs:[]}],_9e={},_9f=1,l=_9b.length,i=0,j,lin,_a0,top,_a1,rec,_a2,_a3;for(;i<l;++i){_a0=_9b[i];if(!_a0){err("mixin #"+i+" is null");}lin=_a0._meta?_a0._meta.bases:[_a0];top=0;for(j=lin.length-1;j>=0;--j){_a1=lin[j].prototype;if(!_a1.hasOwnProperty("declaredClass")){_a1.declaredClass="uniqName_"+(_98++);}_a2=_a1.declaredClass;if(!_9e.hasOwnProperty(_a2)){_9e[_a2]={count:0,refs:[],cls:lin[j]};++_9f;}rec=_9e[_a2];if(top&&top!==rec){rec.refs.push(top);++top.count;}top=rec;}++top.count;_9d[0].refs.push(top);}while(_9d.length){top=_9d.pop();_9c.push(top.cls);--_9f;while(_a3=top.refs,_a3.length==1){top=_a3[0];if(!top||--top.count){top=0;break;}_9c.push(top.cls);--_9f;}if(top){for(i=0,l=_a3.length;i<l;++i){top=_a3[i];if(!--top.count){_9d.push(top);}}}}if(_9f){err("can't build consistent linearization");}_a0=_9b[0];_9c[0]=_a0?_a0._meta&&_a0===_9c[_9c.length-_a0._meta.bases.length]?_a0._meta.bases.length:1:0;return _9c;};function _a4(_a5,a,f){var _a6,_a7,_a8,_a9,_aa,_ab,_ac,opf,pos,_ad=this._inherited=this._inherited||{};if(typeof _a5=="string"){_a6=_a5;_a5=a;a=f;}f=0;_a9=_a5.callee;_a6=_a6||_a9.nom;if(!_a6){err("can't deduce a name to call inherited()");}_aa=this.constructor._meta;_a8=_aa.bases;pos=_ad.p;if(_a6!=_99){if(_ad.c!==_a9){pos=0;_ab=_a8[0];_aa=_ab._meta;if(_aa.hidden[_a6]!==_a9){_a7=_aa.chains;if(_a7&&typeof _a7[_a6]=="string"){err("calling chained method with inherited: "+_a6);}do{_aa=_ab._meta;_ac=_ab.prototype;if(_aa&&(_ac[_a6]===_a9&&_ac.hasOwnProperty(_a6)||_aa.hidden[_a6]===_a9)){break;}}while(_ab=_a8[++pos]);pos=_ab?pos:-1;}}_ab=_a8[++pos];if(_ab){_ac=_ab.prototype;if(_ab._meta&&_ac.hasOwnProperty(_a6)){f=_ac[_a6];}else{opf=op[_a6];do{_ac=_ab.prototype;f=_ac[_a6];if(f&&(_ab._meta?_ac.hasOwnProperty(_a6):f!==opf)){break;}}while(_ab=_a8[++pos]);}}f=_ab&&f||op[_a6];}else{if(_ad.c!==_a9){pos=0;_aa=_a8[0]._meta;if(_aa&&_aa.ctor!==_a9){_a7=_aa.chains;if(!_a7||_a7.constructor!=="manual"){err("calling chained constructor with inherited");}while(_ab=_a8[++pos]){_aa=_ab._meta;if(_aa&&_aa.ctor===_a9){break;}}pos=_ab?pos:-1;}}while(_ab=_a8[++pos]){_aa=_ab._meta;f=_aa?_aa.ctor:_ab;if(f){break;}}f=_ab&&f;}_ad.c=f;_ad.p=pos;if(f){return a===true?f:f.apply(this,a||_a5);}};function _ae(_af,_b0){if(typeof _af=="string"){return this.inherited(_af,_b0,true);}return this.inherited(_af,true);};function _b1(cls){var _b2=this.constructor._meta.bases;for(var i=0,l=_b2.length;i<l;++i){if(_b2[i]===cls){return true;}}return this instanceof cls;};function _b3(_b4,_b5){var _b6,t,i=0,l=d._extraNames.length;for(_b6 in _b5){t=_b5[_b6];if((t!==op[_b6]||!(_b6 in op))&&_b6!=_99){if(_96.call(t)=="[object Function]"){t.nom=_b6;}_b4[_b6]=t;}}for(;i<l;++i){_b6=d._extraNames[i];t=_b5[_b6];if((t!==op[_b6]||!(_b6 in op))&&_b6!=_99){if(_96.call(t)=="[object Function]"){t.nom=_b6;}_b4[_b6]=t;}}return _b4;};function _b7(_b8){_b3(this.prototype,_b8);return this;};function _b9(_ba,_bb){return function(){var a=arguments,_bc=a,a0=a[0],f,i,m,l=_ba.length,_bd;if(_bb&&(a0&&a0.preamble||this.preamble)){_bd=new Array(_ba.length);_bd[0]=a;for(i=0;;){a0=a[0];if(a0){f=a0.preamble;if(f){a=f.apply(this,a)||a;}}f=_ba[i].prototype;f=f.hasOwnProperty("preamble")&&f.preamble;if(f){a=f.apply(this,a)||a;}if(++i==l){break;}_bd[i]=a;}}for(i=l-1;i>=0;--i){f=_ba[i];m=f._meta;f=m?m.ctor:f;if(f){f.apply(this,_bd?_bd[i]:a);}}f=this.postscript;if(f){f.apply(this,_bc);}};};function _be(_bf,_c0){return function(){var a=arguments,t=a,a0=a[0],f;if(_c0){if(a0){f=a0.preamble;if(f){t=f.apply(this,t)||t;}}f=this.preamble;if(f){f.apply(this,t);}}if(_bf){_bf.apply(this,a);}f=this.postscript;if(f){f.apply(this,a);}};};function _c1(_c2){return function(){var a=arguments,i=0,f;for(;f=_c2[i];++i){m=f._meta;f=m?m.ctor:f;if(f){f.apply(this,a);break;}}f=this.postscript;if(f){f.apply(this,a);}};};function _c3(_c4,_c5,_c6){return function(){var b,m,f,i=0,_c7=1;if(_c6){i=_c5.length-1;_c7=-1;}for(;b=_c5[i];i+=_c7){m=b._meta;f=(m?m.hidden:b.prototype)[_c4];if(f){f.apply(this,arguments);}}};};d.declare=function(_c8,_c9,_ca){var _cb,i,t,_cc,_cd,_ce,_cf,_d0=1,_d1=_c9;if(typeof _c8!="string"){_ca=_c9;_c9=_c8;_c8="";}_ca=_ca||{};if(_96.call(_c9)=="[object Array]"){_ce=_9a(_c9);t=_ce[0];_d0=_ce.length-t;_c9=_ce[_d0];}else{_ce=[0];if(_c9){t=_c9._meta;_ce=_ce.concat(t?t.bases:_c9);}}if(_c9){for(i=_d0-1;;--i){_97.prototype=_c9.prototype;_cb=new _97;if(!i){break;}t=_ce[i];mix(_cb,t._meta?t._meta.hidden:t.prototype);_cc=new Function;_cc.superclass=_c9;_cc.prototype=_cb;_c9=_cb.constructor=_cc;}}else{_cb={};}_b3(_cb,_ca);t=_ca.constructor;if(t!==op.constructor){t.nom=_99;_cb.constructor=t;}_97.prototype=0;for(i=_d0-1;i;--i){t=_ce[i]._meta;if(t&&t.chains){_cf=mix(_cf||{},t.chains);}}if(_cb["-chains-"]){_cf=mix(_cf||{},_cb["-chains-"]);}t=!_cf||!_cf.hasOwnProperty(_99);_ce[0]=_cc=(_cf&&_cf.constructor==="manual")?_c1(_ce):(_ce.length==1?_be(_ca.constructor,t):_b9(_ce,t));_cc._meta={bases:_ce,hidden:_ca,chains:_cf,parents:_d1,ctor:_ca.constructor};_cc.superclass=_c9&&_c9.prototype;_cc.extend=_b7;_cc.prototype=_cb;_cb.constructor=_cc;_cb.getInherited=_ae;_cb.inherited=_a4;_cb.isInstanceOf=_b1;if(_c8){_cb.declaredClass=_c8;d.setObject(_c8,_cc);}if(_cf){for(_cd in _cf){if(_cb[_cd]&&typeof _cf[_cd]=="string"&&_cd!=_99){t=_cb[_cd]=_c3(_cd,_ce,_cf[_cd]==="after");t.nom=_cd;}}}return _cc;};d.safeMixin=_b3;})();}if(!dojo._hasResource["dojo._base.connect"]){dojo._hasResource["dojo._base.connect"]=true;dojo.provide("dojo._base.connect");dojo._listener={getDispatcher:function(){return function(){var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;var r=t&&t.apply(this,arguments);var lls;lls=[].concat(ls);for(var i in lls){if(!(i in ap)){lls[i].apply(this,arguments);}}return r;};},add:function(_d2,_d3,_d4){_d2=_d2||dojo.global;var f=_d2[_d3];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=_d2[_d3]=d;}return f._listeners.push(_d4);},remove:function(_d5,_d6,_d7){var f=(_d5||dojo.global)[_d6];if(f&&f._listeners&&_d7--){delete f._listeners[_d7];}}};dojo.connect=function(obj,_d8,_d9,_da,_db){var a=arguments,_dc=[],i=0;_dc.push(dojo.isString(a[0])?null:a[i++],a[i++]);var a1=a[i+1];_dc.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){_dc.push(a[i]);}return dojo._connect.apply(this,_dc);};dojo._connect=function(obj,_dd,_de,_df){var l=dojo._listener,h=l.add(obj,_dd,dojo.hitch(_de,_df));return [obj,_dd,h,l];};dojo.disconnect=function(_e0){if(_e0&&_e0[0]!==undefined){dojo._disconnect.apply(this,_e0);delete _e0[0];}};dojo._disconnect=function(obj,_e1,_e2,_e3){_e3.remove(obj,_e1,_e2);};dojo._topics={};dojo.subscribe=function(_e4,_e5,_e6){return [_e4,dojo._listener.add(dojo._topics,_e4,dojo.hitch(_e5,_e6))];};dojo.unsubscribe=function(_e7){if(_e7){dojo._listener.remove(dojo._topics,_e7[0],_e7[1]);}};dojo.publish=function(_e8,_e9){var f=dojo._topics[_e8];if(f){f.apply(this,_e9||[]);}};dojo.connectPublisher=function(_ea,obj,_eb){var pf=function(){dojo.publish(_ea,arguments);};return (_eb)?dojo.connect(obj,_eb,pf):dojo.connect(obj,pf);};}if(!dojo._hasResource["dojo._base.Deferred"]){dojo._hasResource["dojo._base.Deferred"]=true;dojo.provide("dojo._base.Deferred");dojo.Deferred=function(_ec){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_ec;this.silentlyCancelled=false;this.isFiring=false;};dojo.extend(dojo.Deferred,{_nextId:(function(){var n=1;return function(){return n++;};})(),cancel:function(){var err;if(this.fired==-1){if(this.canceller){err=this.canceller(this);}else{this.silentlyCancelled=true;}if(this.fired==-1){if(!(err instanceof Error)){var res=err;var msg="Deferred Cancelled";if(err&&err.toString){msg+=": "+err.toString();}err=new Error(msg);err.dojoType="cancel";err.cancelResult=res;}this.errback(err);}}else{if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){this.results[0].cancel();}}},_resback:function(res){this.fired=((res instanceof Error)?1:0);this.results[this.fired]=res;this._fire();},_check:function(){if(this.fired!=-1){if(!this.silentlyCancelled){throw new Error("already called!");}this.silentlyCancelled=false;return;}},callback:function(res){this._check();this._resback(res);},errback:function(res){this._check();if(!(res instanceof Error)){res=new Error(res);}this._resback(res);},addBoth:function(cb,_ed){var _ee=dojo.hitch.apply(dojo,arguments);return this.addCallbacks(_ee,_ee);},addCallback:function(cb,_ef){return this.addCallbacks(dojo.hitch.apply(dojo,arguments));},addErrback:function(cb,_f0){return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));},addCallbacks:function(cb,eb){this.chain.push([cb,eb]);if(this.fired>=0&&!this.isFiring){this._fire();}return this;},_fire:function(){this.isFiring=true;var _f1=this.chain;var _f2=this.fired;var res=this.results[_f2];var _f3=this;var cb=null;while((_f1.length>0)&&(this.paused==0)){var f=_f1.shift()[_f2];if(!f){continue;}var _f4=function(){var ret=f(res);if(typeof ret!="undefined"){res=ret;}_f2=((res instanceof Error)?1:0);if(res instanceof dojo.Deferred){cb=function(res){_f3._resback(res);_f3.paused--;if((_f3.paused==0)&&(_f3.fired>=0)){_f3._fire();}};this.paused++;}};if(dojo.config.debugAtAllCosts){_f4.call(this);}else{try{_f4.call(this);}catch(err){_f2=1;res=err;}}}this.fired=_f2;this.results[_f2]=res;this.isFiring=false;if((cb)&&(this.paused)){res.addBoth(cb);}}});}if(!dojo._hasResource["dojo._base.json"]){dojo._hasResource["dojo._base.json"]=true;dojo.provide("dojo._base.json");dojo.fromJson=function(_f5){return eval("("+_f5+")");};dojo._escapeString=function(str){return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};dojo.toJsonIndentStr="\t";dojo.toJson=function(it,_f6,_f7){if(it===undefined){return "undefined";}var _f8=typeof it;if(_f8=="number"||_f8=="boolean"){return it+"";}if(it===null){return "null";}if(dojo.isString(it)){return dojo._escapeString(it);}var _f9=arguments.callee;var _fa;_f7=_f7||"";var _fb=_f6?_f7+dojo.toJsonIndentStr:"";var tf=it.__json__||it.json;if(dojo.isFunction(tf)){_fa=tf.call(it);if(it!==_fa){return _f9(_fa,_f6,_fb);}}if(it.nodeType&&it.cloneNode){throw new Error("Can't serialize DOM nodes");}var sep=_f6?" ":"";var _fc=_f6?"\n":"";if(dojo.isArray(it)){var res=dojo.map(it,function(obj){var val=_f9(obj,_f6,_fb);if(typeof val!="string"){val="undefined";}return _fc+_fb+val;});return "["+res.join(","+sep)+_fc+_f7+"]";}if(_f8=="function"){return null;}var _fd=[],key;for(key in it){var _fe,val;if(typeof key=="number"){_fe="\""+key+"\"";}else{if(typeof key=="string"){_fe=dojo._escapeString(key);}else{continue;}}val=_f9(it[key],_f6,_fb);if(typeof val!="string"){continue;}_fd.push(_fc+_fb+_fe+":"+sep+val);}return "{"+_fd.join(","+sep)+_fc+_f7+"}";};}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");(function(){var d=dojo;dojo.Color=function(_ff){if(_ff){this.setColor(_ff);}};dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:d.config.transparentColor||[255,255,255]};dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){var t=this;t.r=r;t.g=g;t.b=b;t.a=a;},setColor:function(_100){if(d.isString(_100)){d.colorFromString(_100,this);}else{if(d.isArray(_100)){d.colorFromArray(_100,this);}else{this._set(_100.r,_100.g,_100.b,_100.a);if(!(_100 instanceof d.Color)){this.sanitize();}}}return this;},sanitize:function(){return this;},toRgb:function(){var t=this;return [t.r,t.g,t.b];},toRgba:function(){var t=this;return [t.r,t.g,t.b,t.a];},toHex:function(){var arr=d.map(["r","g","b"],function(x){var s=this[x].toString(16);return s.length<2?"0"+s:s;},this);return "#"+arr.join("");},toCss:function(_101){var t=this,rgb=t.r+", "+t.g+", "+t.b;return (_101?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});dojo.blendColors=function(_102,end,_103,obj){var t=obj||new d.Color();d.forEach(["r","g","b","a"],function(x){t[x]=_102[x]+(end[x]-_102[x])*_103;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};dojo.colorFromRgb=function(_104,obj){var m=_104.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);};dojo.colorFromHex=function(_105,obj){var t=obj||new d.Color(),bits=(_105.length==4)?4:8,mask=(1<<bits)-1;_105=Number("0x"+_105.substr(1));if(isNaN(_105)){return null;}d.forEach(["b","g","r"],function(x){var c=_105&mask;_105>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};dojo.colorFromArray=function(a,obj){var t=obj||new d.Color();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1;}return t.sanitize();};dojo.colorFromString=function(str,obj){var a=d.Color.named[str];return a&&d.colorFromArray(a,obj)||d.colorFromRgb(str,obj)||d.colorFromHex(str,obj);};})();}if(!dojo._hasResource["dojo._base"]){dojo._hasResource["dojo._base"]=true;dojo.provide("dojo._base");}if(!dojo._hasResource["dojo._base.window"]){dojo._hasResource["dojo._base.window"]=true;dojo.provide("dojo._base.window");dojo.doc=window["document"]||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_106,_107){dojo.global=_106;dojo.doc=_107;};dojo.withGlobal=function(_108,_109,_10a,_10b){var _10c=dojo.global;try{dojo.global=_108;return dojo.withDoc.call(null,_108.document,_109,_10a,_10b);}finally{dojo.global=_10c;}};dojo.withDoc=function(_10d,_10e,_10f,_110){var _111=dojo.doc,_112=dojo._bodyLtr,oldQ=dojo.isQuirks;try{dojo.doc=_10d;delete dojo._bodyLtr;dojo.isQuirks=dojo.doc.compatMode=="BackCompat";if(_10f&&typeof _10e=="string"){_10e=_10f[_10e];}return _10e.apply(_10f,_110||[]);}finally{dojo.doc=_111;delete dojo._bodyLtr;if(_112!==undefined){dojo._bodyLtr=_112;}dojo.isQuirks=oldQ;}};}if(!dojo._hasResource["dojo._base.event"]){dojo._hasResource["dojo._base.event"]=true;dojo.provide("dojo._base.event");(function(){var del=(dojo._event_listener={add:function(node,name,fp){if(!node){return;}name=del._normalizeEventName(name);fp=del._fixCallback(name,fp);var _113=name;if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){var ofp=fp;name=(name=="mouseenter")?"mouseover":"mouseout";fp=function(e){if(!dojo.isDescendant(e.relatedTarget,node)){return ofp.call(this,e);}};}node.addEventListener(name,fp,false);return fp;},remove:function(node,_114,_115){if(node){_114=del._normalizeEventName(_114);if(!dojo.isIE&&(_114=="mouseenter"||_114=="mouseleave")){_114=(_114=="mouseenter")?"mouseover":"mouseout";}node.removeEventListener(_114,_115,false);}},_normalizeEventName:function(name){return name.slice(0,2)=="on"?name.slice(2):name;},_fixCallback:function(name,fp){return name!="keypress"?fp:function(e){return fp.call(this,del._fixEvent(e,this));};},_fixEvent:function(evt,_116){switch(evt.type){case "keypress":del._setKeyChar(evt);break;}return evt;},_setKeyChar:function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode;},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});dojo.fixEvent=function(evt,_117){return del._fixEvent(evt,_117);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _118=dojo._listener;dojo._connect=function(obj,_119,_11a,_11b,_11c){var _11d=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=_11d?(_11c?2:1):0,l=[dojo._listener,del,_118][lid];var h=l.add(obj,_119,dojo.hitch(_11a,_11b));return [obj,_119,h,lid];};dojo._disconnect=function(obj,_11e,_11f,_120){([dojo._listener,del,_118][_120]).remove(obj,_11e,_11f);};dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:dojo.isSafari?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:dojo.isMac&&!dojo.isAIR?(dojo.isSafari?91:224):17};var _121=dojo.isMac?"metaKey":"ctrlKey";dojo.isCopyKey=function(e){return e[_121];};if(dojo.isIE){dojo.mouseButtons={LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(e,_122){return e.button&_122;},isLeft:function(e){return e.button&1;},isMiddle:function(e){return e.button&4;},isRight:function(e){return e.button&2;}};}else{dojo.mouseButtons={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(e,_123){return e.button==_123;},isLeft:function(e){return e.button==0;},isMiddle:function(e){return e.button==1;},isRight:function(e){return e.button==2;}};}if(dojo.isIE){var _124=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;var _125=(dojo._ieListenersName="_"+dojo._scopeName+"_listeners");if(!dojo.config._allow_leaks){_118=iel=dojo._ie_listener={handlers:[],add:function(_126,_127,_128){_126=_126||dojo.global;var f=_126[_127];if(!f||!f[_125]){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d[_125]=[];f=_126[_127]=d;}return f[_125].push(ieh.push(_128)-1);},remove:function(_129,_12a,_12b){var f=(_129||dojo.global)[_12a],l=f&&f[_125];if(f&&l&&_12b--){delete ieh[l[_12b]];delete l[_12b];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_12c,fp){if(!node){return;}_12c=del._normalizeEventName(_12c);if(_12c=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd[_125]||!kd._stealthKeydownHandle){var h=del.add(node,"onkeydown",del._stealthKeyDown);kd=node.onkeydown;kd._stealthKeydownHandle=h;kd._stealthKeydownRefs=1;}else{kd._stealthKeydownRefs++;}}return iel.add(node,_12c,del._fixCallback(fp));},remove:function(node,_12d,_12e){_12d=del._normalizeEventName(_12d);iel.remove(node,_12d,_12e);if(_12d=="onkeypress"){var kd=node.onkeydown;if(--kd._stealthKeydownRefs<=0){iel.remove(node,"onkeydown",kd._stealthKeydownHandle);delete kd._stealthKeydownHandle;}}},_normalizeEventName:function(_12f){return _12f.slice(0,2)!="on"?"on"+_12f:_12f;},_nop:function(){},_fixEvent:function(evt,_130){if(!evt){var w=_130&&(_130.ownerDocument||_130.document||_130).parentWindow||window;evt=w.event;}if(!evt){return (evt);}evt.target=evt.srcElement;evt.currentTarget=(_130||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _131=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;var _132=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_131.scrollLeft||0)-_132.x;evt.pageY=evt.clientY+(_131.scrollTop||0)-_132.y;if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}evt.stopPropagation=del._stopPropagation;evt.preventDefault=del._preventDefault;return del._fixKeys(evt);},_fixKeys:function(evt){switch(evt.type){case "keypress":var c=("charCode" in evt?evt.charCode:evt.keyCode);if(c==10){c=0;evt.keyCode=13;}else{if(c==13||c==27){c=0;}else{if(c==3){c=99;}}}evt.charCode=c;del._setKeyChar(evt);break;}return evt;},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp[_125]){return;}var k=evt.keyCode;var _133=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_133||evt.ctrlKey){var c=_133?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});kp.call(evt.currentTarget,faux);evt.cancelBubble=faux.cancelBubble;evt.returnValue=faux.returnValue;_124(evt,faux.keyCode);}},_stopPropagation:function(){this.cancelBubble=true;},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_124(this,0);}this.returnValue=false;}});dojo.stopEvent=function(evt){evt=evt||window.event;del._stopPropagation.call(evt);del._preventDefault.call(evt);};}del._synthesizeEvent=function(evt,_134){var faux=dojo.mixin({},evt,_134);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_135){switch(evt.type){case "keypress":var c=evt.which;if(c==3){c=99;}c=c<41&&!evt.shiftKey?0:c;if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){c+=32;}return del._synthesizeEvent(evt,{charCode:c});}return evt;}});}if(dojo.isWebKit){del._add=del.add;del._remove=del.remove;dojo.mixin(del,{add:function(node,_136,fp){if(!node){return;}var _137=del._add(node,_136,fp);if(del._normalizeEventName(_136)=="keypress"){_137._stealthKeyDownHandle=del._add(node,"keydown",function(evt){var k=evt.keyCode;var _138=k!=13&&k!=32&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_138||evt.ctrlKey){var c=_138?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if(!evt.shiftKey&&c>=65&&c<=90){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});fp.call(evt.currentTarget,faux);}});}return _137;},remove:function(node,_139,_13a){if(node){if(_13a._stealthKeyDownHandle){del._remove(node,"keydown",_13a._stealthKeyDownHandle);}del._remove(node,_139,_13a);}},_fixEvent:function(evt,_13b){switch(evt.type){case "keypress":if(evt.faux){return evt;}var c=evt.charCode;c=c>=32?c:0;return del._synthesizeEvent(evt,{charCode:c,faux:true});}return evt;}});}})();if(dojo.isIE){dojo._ieDispatcher=function(args,_13c){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c[dojo._ieListenersName],t=h[c.target];var r=t&&t.apply(_13c,args);var lls=[].concat(ls);for(var i in lls){var f=h[lls[i]];if(!(i in ap)&&f){f.apply(_13c,args);}}return r;};dojo._getIeDispatcher=function(){return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");};dojo._event_listener._fixCallback=function(fp){var f=dojo._event_listener._fixEvent;return function(e){return fp.call(this,f(e,this));};};}}if(!dojo._hasResource["dojo._base.html"]){dojo._hasResource["dojo._base.html"]=true;dojo.provide("dojo._base.html");try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}if(dojo.isIE||dojo.isOpera){dojo.byId=function(id,doc){if(typeof id!="string"){return id;}var _13d=doc||dojo.doc,te=_13d.getElementById(id);if(te&&(te.attributes.id.value==id||te.id==id)){return te;}else{var eles=_13d.all[id];if(!eles||eles.nodeName){eles=[eles];}var i=0;while((te=eles[i++])){if((te.attributes&&te.attributes.id&&te.attributes.id.value==id)||te.id==id){return te;}}}};}else{dojo.byId=function(id,doc){return (typeof id=="string")?(doc||dojo.doc).getElementById(id):id;};}(function(){var d=dojo;var byId=d.byId;var _13e=null,_13f;d.addOnWindowUnload(function(){_13e=null;});dojo._destroyElement=dojo.destroy=function(node){node=byId(node);try{var doc=node.ownerDocument;if(!_13e||_13f!=doc){_13e=doc.createElement("div");_13f=doc;}_13e.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_13e.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_140){try{node=byId(node);_140=byId(_140);while(node){if(node==_140){return true;}node=node.parentNode;}}catch(e){}return false;};dojo.setSelectable=function(node,_141){node=byId(node);if(d.isMozilla){node.style.MozUserSelect=_141?"":"none";}else{if(d.isKhtml||d.isWebKit){node.style.KhtmlUserSelect=_141?"auto":"none";}else{if(d.isIE){var v=(node.unselectable=_141?"":"on");d.query("*",node).forEach("item.unselectable = '"+v+"'");}}}};var _142=function(node,ref){var _143=ref.parentNode;if(_143){_143.insertBefore(node,ref);}};var _144=function(node,ref){var _145=ref.parentNode;if(_145){if(_145.lastChild==ref){_145.appendChild(node);}else{_145.insertBefore(node,ref.nextSibling);}}};dojo.place=function(node,_146,_147){_146=byId(_146);if(typeof node=="string"){node=node.charAt(0)=="<"?d._toDom(node,_146.ownerDocument):byId(node);}if(typeof _147=="number"){var cn=_146.childNodes;if(!cn.length||cn.length<=_147){_146.appendChild(node);}else{_142(node,cn[_147<0?0:_147]);}}else{switch(_147){case "before":_142(node,_146);break;case "after":_144(node,_146);break;case "replace":_146.parentNode.replaceChild(node,_146);break;case "only":d.empty(_146);_146.appendChild(node);break;case "first":if(_146.firstChild){_142(node,_146.firstChild);break;}default:_146.appendChild(node);}}return node;};dojo.boxModel="content-box";if(d.isIE){d.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";}var gcs;if(d.isWebKit){gcs=function(node){var s;if(node.nodeType==1){var dv=node.ownerDocument.defaultView;s=dv.getComputedStyle(node,null);if(!s&&node.style){node.style.display="";s=dv.getComputedStyle(node,null);}}return s||{};};}else{if(d.isIE){gcs=function(node){return node.nodeType==1?node.currentStyle:{};};}else{gcs=function(node){return node.nodeType==1?node.ownerDocument.defaultView.getComputedStyle(node,null):{};};}}dojo.getComputedStyle=gcs;if(!d.isIE){d._toPixelValue=function(_148,_149){return parseFloat(_149)||0;};}else{d._toPixelValue=function(_14a,_14b){if(!_14b){return 0;}if(_14b=="medium"){return 4;}if(_14b.slice&&_14b.slice(-2)=="px"){return parseFloat(_14b);}with(_14a){var _14c=style.left;var _14d=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_14b;_14b=style.pixelLeft;}catch(e){_14b=0;}style.left=_14c;runtimeStyle.left=_14d;}return _14b;};}var px=d._toPixelValue;var astr="DXImageTransform.Microsoft.Alpha";var af=function(n,f){try{return n.filters.item(astr);}catch(e){return f?{}:null;}};dojo._getOpacity=d.isIE?function(node){try{return af(node).Opacity/100;}catch(e){return 1;}}:function(node){return gcs(node).opacity;};dojo._setOpacity=d.isIE?function(node,_14e){var ov=_14e*100;node.style.zoom=1;af(node,1).Enabled=!(_14e==1);if(!af(node)){node.style.filter+=" progid:"+astr+"(Opacity="+ov+")";}else{af(node,1).Opacity=ov;}if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){d._setOpacity(i,_14e);});}return _14e;}:function(node,_14f){return node.style.opacity=_14f;};var _150={left:true,top:true};var _151=/margin|padding|width|height|max|min|offset/;var _152=function(node,type,_153){type=type.toLowerCase();if(d.isIE){if(_153=="auto"){if(type=="height"){return node.offsetHeight;}if(type=="width"){return node.offsetWidth;}}if(type=="fontweight"){switch(_153){case 700:return "bold";case 400:default:return "normal";}}}if(!(type in _150)){_150[type]=_151.test(type);}return _150[type]?px(node,_153):_153;};var _154=d.isIE?"styleFloat":"cssFloat",_155={"cssFloat":_154,"styleFloat":_154,"float":_154};dojo.style=function(node,_156,_157){var n=byId(node),args=arguments.length,op=(_156=="opacity");_156=_155[_156]||_156;if(args==3){return op?d._setOpacity(n,_157):n.style[_156]=_157;}if(args==2&&op){return d._getOpacity(n);}var s=gcs(n);if(args==2&&typeof _156!="string"){for(var x in _156){d.style(node,x,_156[x]);}return s;}return (args==1)?s:_152(n,_156,s[_156]||n.style[_156]);};dojo._getPadExtents=function(n,_158){var s=_158||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};};dojo._getBorderExtents=function(n,_159){var ne="none",s=_159||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};};dojo._getPadBorderExtents=function(n,_15a){var s=_15a||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};};dojo._getMarginExtents=function(n,_15b){var s=_15b||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(d.isWebKit&&(s.position!="absolute")){r=l;}return {l:l,t:t,w:l+r,h:t+b};};dojo._getMarginBox=function(node,_15c){var s=_15c||gcs(node),me=d._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode;if(d.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{if(p&&p.style){var pcs=gcs(p);if(pcs.overflow!="visible"){var be=d._getBorderExtents(p,pcs);l+=be.l,t+=be.t;}}}}else{if(d.isOpera||(d.isIE>7&&!d.isQuirks)){if(p){be=d._getBorderExtents(p);l-=be.l;t-=be.t;}}}return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};};dojo._getContentBox=function(node,_15d){var s=_15d||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;if(!w){w=node.offsetWidth,h=node.offsetHeight;}else{h=node.clientHeight,be.w=be.h=0;}if(d.isOpera){pe.l+=be.l;pe.t+=be.t;}return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};};dojo._getBorderBox=function(node,_15e){var s=_15e||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};};dojo._setBox=function(node,l,t,w,h,u){u=u||"px";var s=node.style;if(!isNaN(l)){s.left=l+u;}if(!isNaN(t)){s.top=t+u;}if(w>=0){s.width=w+u;}if(h>=0){s.height=h+u;}};dojo._isButtonTag=function(node){return node.tagName=="BUTTON"||node.tagName=="INPUT"&&(node.getAttribute("type")||"").toUpperCase()=="BUTTON";};dojo._usesBorderBox=function(node){var n=node.tagName;return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(node);};dojo._setContentSize=function(node,_15f,_160,_161){if(d._usesBorderBox(node)){var pb=d._getPadBorderExtents(node,_161);if(_15f>=0){_15f+=pb.w;}if(_160>=0){_160+=pb.h;}}d._setBox(node,NaN,NaN,_15f,_160);};dojo._setMarginBox=function(node,_162,_163,_164,_165,_166){var s=_166||gcs(node),bb=d._usesBorderBox(node),pb=bb?_167:d._getPadBorderExtents(node,s);if(d.isWebKit){if(d._isButtonTag(node)){var ns=node.style;if(_164>=0&&!ns.width){ns.width="4px";}if(_165>=0&&!ns.height){ns.height="4px";}}}var mb=d._getMarginExtents(node,s);if(_164>=0){_164=Math.max(_164-pb.w-mb.w,0);}if(_165>=0){_165=Math.max(_165-pb.h-mb.h,0);}d._setBox(node,_162,_163,_164,_165);};var _167={l:0,t:0,w:0,h:0};dojo.marginBox=function(node,box){var n=byId(node),s=gcs(n),b=box;return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);};dojo.contentBox=function(node,box){var n=byId(no