TNT_Express_Fr - Version 2.0.0

Version Notes

Extension officielle vous permettant de proposer les services TNT à vos clients.

Download this release

Release Info

Developer Infostrates
Extension TNT_Express_Fr
Version 2.0.0
Comparing to
See all releases


Code changes from version 1.0.0 to 2.0.0

Files changed (128) hide show
  1. app/code/community/Infostrates/Tnt/Block/Sales/Impression.php +0 -3
  2. app/code/community/Infostrates/Tnt/Block/Sales/Shipment/Grid.php +3 -1
  3. app/code/community/Infostrates/Tnt/Model/Shipping/Carrier/Tnt.php +1 -1
  4. app/code/community/Infostrates/Tnt/controllers/Sales/ImpressionController.php +1 -1
  5. app/code/community/Infostrates/Tnt/controllers/Sales/Order/ShipmentController.php +33 -22
  6. app/code/community/Infostrates/Tnt/controllers/TntController.php +9 -9
  7. app/code/community/Infostrates/Tnt/etc/config.xml +1 -1
  8. app/code/community/Infostrates/Tnt/etc/system.xml +1 -1
  9. app/code/community/Infostrates/Tnt/sql/tnt_setup/mysql4-uninstall-0.1.0.php +0 -10
  10. app/code/community/Infostrates/Tnt/sql/tnt_setup/mysql4-upgrade-1.0.0-2.0.0.php +12 -0
  11. app/code/local/Varien/Data/Collection/Db.php +901 -0
  12. app/design/frontend/default/default/layout/tnt.xml +53 -25
  13. app/design/frontend/default/default/template/tnt/form/{failure.phtml → _failure.phtml} +0 -0
  14. app/design/frontend/default/default/template/tnt/onepage/shipping_method/available.phtml +382 -367
  15. app/design/frontend/default/default/template/tnt/sales/order/info.phtml +183 -0
  16. app/design/frontend/default/default/template/tnt/sales/order/view.phtml +148 -0
  17. package.xml +6 -6
  18. skin/frontend/default/default/css/tnt/jquery.superbox.css +11 -2
  19. skin/frontend/default/default/css/tnt/tnt.css +5 -4
  20. skin/frontend/default/default/css/tnt/tntB2CRelaisColis.css +392 -0
  21. skin/frontend/default/default/css/tnt/tntB2CSuiviColis.css +198 -0
  22. skin/frontend/default/default/css/tnt/ui.dialog.css +158 -0
  23. skin/frontend/default/default/css/tnt/ui.tabs.css +70 -0
  24. skin/frontend/default/default/images/tnt/old/_24h_entreprise.png +0 -0
  25. skin/frontend/default/default/images/tnt/old/tnt_j.png +0 -0
  26. skin/frontend/default/default/images/tnt/old/tnt_jd.png +0 -0
  27. skin/frontend/default/default/images/tnt/old/tnt_jz.png +0 -0
  28. skin/frontend/default/default/images/tnt/relaisColis/5-puce-choix-gris2.gif +0 -0
  29. skin/frontend/default/default/images/tnt/relaisColis/_5-puce-choix-gris2.gif +0 -0
  30. skin/frontend/default/default/images/tnt/relaisColis/_picto_localiser.png +0 -0
  31. skin/frontend/default/default/images/tnt/relaisColis/bt-CodePostal-1.jpg +0 -0
  32. skin/frontend/default/default/images/tnt/relaisColis/bt-CodePostal-2.jpg +0 -0
  33. skin/frontend/default/default/images/tnt/relaisColis/bt-CodePostal.jpg +0 -0
  34. skin/frontend/default/default/images/tnt/relaisColis/bt-Continuer-1.jpg +0 -0
  35. skin/frontend/default/default/images/tnt/relaisColis/bt-Continuer-2.jpg +0 -0
  36. skin/frontend/default/default/images/tnt/relaisColis/bt-Continuer.jpg +0 -0
  37. skin/frontend/default/default/images/tnt/relaisColis/bt-OK-1.jpg +0 -0
  38. skin/frontend/default/default/images/tnt/relaisColis/bt-OK-2.jpg +0 -0
  39. skin/frontend/default/default/images/tnt/relaisColis/bt-OK.jpg +0 -0
  40. skin/frontend/default/default/images/tnt/relaisColis/bt-Retour.gif +0 -0
  41. skin/frontend/default/default/images/tnt/relaisColis/close_icon_double.png +0 -0
  42. skin/frontend/default/default/images/tnt/relaisColis/exception.gif +0 -0
  43. skin/frontend/default/default/images/tnt/relaisColis/exception2.gif +0 -0
  44. skin/frontend/default/default/images/tnt/relaisColis/google/agenceTnt.png +0 -0
  45. skin/frontend/default/default/images/tnt/relaisColis/google/red-pushpin-s.png +0 -0
  46. skin/frontend/default/default/images/tnt/relaisColis/google/red-pushpin.png +0 -0
  47. skin/frontend/default/default/images/tnt/relaisColis/google/relaisColis.png +0 -0
  48. skin/frontend/default/default/images/tnt/relaisColis/lg_tnt.gif +0 -0
  49. skin/frontend/default/default/images/tnt/relaisColis/livreur.gif +0 -0
  50. skin/frontend/default/default/images/tnt/relaisColis/logo-tnt-petit.jpg +0 -0
  51. skin/frontend/default/default/images/tnt/relaisColis/logo_24_chezmoi.jpg +0 -0
  52. skin/frontend/default/default/images/tnt/relaisColis/logo_24_relaiscolis.jpg +0 -0
  53. skin/frontend/default/default/images/tnt/relaisColis/logo_24h_chezmoi_RVB.gif +0 -0
  54. skin/frontend/default/default/images/tnt/relaisColis/logo_24h_relaiscolis_RVB.gif +0 -0
  55. skin/frontend/default/default/images/tnt/relaisColis/logos_24.jpg +0 -0
  56. skin/frontend/default/default/images/tnt/relaisColis/loupe.gif +0 -0
  57. skin/frontend/default/default/images/tnt/relaisColis/notes.gif +0 -0
  58. skin/frontend/default/default/images/tnt/relaisColis/picto-delai.gif +0 -0
  59. skin/frontend/default/default/images/tnt/relaisColis/picto_localiser.jpg +0 -0
  60. skin/frontend/default/default/images/tnt/relaisColis/tnt_logo.gif +0 -0
  61. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_arrows_leftright.gif +0 -0
  62. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_arrows_updown.gif +0 -0
  63. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_close.gif +0 -0
  64. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_doc.gif +0 -0
  65. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_folder_closed.gif +0 -0
  66. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_folder_open.gif +0 -0
  67. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_minus.gif +0 -0
  68. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_plus.gif +0 -0
  69. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_7x7_arrow_down.gif +0 -0
  70. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_7x7_arrow_left.gif +0 -0
  71. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_7x7_arrow_right.gif +0 -0
  72. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_7x7_arrow_up.gif +0 -0
  73. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_arrows_leftright.gif +0 -0
  74. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_arrows_updown.gif +0 -0
  75. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_doc.gif +0 -0
  76. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_minus.gif +0 -0
  77. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_plus.gif +0 -0
  78. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_resize_se.gif +0 -0
  79. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_7x7_arrow_down.gif +0 -0
  80. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_7x7_arrow_left.gif +0 -0
  81. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_7x7_arrow_right.gif +0 -0
  82. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_7x7_arrow_up.gif +0 -0
  83. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_arrows_leftright.gif +0 -0
  84. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_arrows_updown.gif +0 -0
  85. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_close.gif +0 -0
  86. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_doc.gif +0 -0
  87. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_folder_closed.gif +0 -0
  88. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_folder_open.gif +0 -0
  89. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_minus.gif +0 -0
  90. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_plus.gif +0 -0
  91. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_7x7_arrow_down.gif +0 -0
  92. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_7x7_arrow_left.gif +0 -0
  93. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_7x7_arrow_right.gif +0 -0
  94. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_7x7_arrow_up.gif +0 -0
  95. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/d0e5f5_40x100_textures_02_glass_75.png +0 -0
  96. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/dfeffc_40x100_textures_02_glass_85.png +0 -0
  97. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f5f8f9_40x100_textures_06_inset_hard_100.png +0 -0
  98. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_arrows_leftright.gif +0 -0
  99. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_arrows_updown.gif +0 -0
  100. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_close.gif +0 -0
  101. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_doc.gif +0 -0
  102. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_folder_closed.gif +0 -0
  103. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_folder_open.gif +0 -0
  104. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_minus.gif +0 -0
  105. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_plus.gif +0 -0
  106. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_7x7_arrow_down.gif +0 -0
  107. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_7x7_arrow_left.gif +0 -0
  108. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_7x7_arrow_right.gif +0 -0
  109. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_7x7_arrow_up.gif +0 -0
  110. skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png +0 -0
  111. skin/frontend/default/default/images/tnt/swf/banniere_TNT_0.swf +0 -0
  112. skin/frontend/default/default/images/tnt/swf/banniere_TNT_1.swf +0 -0
  113. skin/frontend/default/default/images/tnt/swf/banniere_TNT_2.swf +0 -0
  114. skin/frontend/default/default/images/tnt/swf/banniere_TNT_3.swf +0 -0
  115. skin/frontend/default/default/images/tnt/swf/banniere_TNT_4.swf +0 -0
  116. skin/frontend/default/default/images/tnt/swf/banniere_TNT_5.swf +0 -0
  117. skin/frontend/default/default/images/tnt/swf/banniere_TNT_6.swf +0 -0
  118. skin/frontend/default/default/images/tnt/swf/banniere_TNT_7.swf +0 -0
  119. skin/frontend/default/default/js/tnt/jquery-ui.js +286 -0
  120. skin/frontend/default/default/js/tnt/jquery.js +32 -0
  121. {js → skin/frontend/default/default/js}/tnt/jquery_162.js +0 -0
  122. skin/frontend/default/default/js/tnt/relaisColis.js +1000 -0
  123. skin/frontend/default/default/js/tnt/relaisColisIE7.js +1002 -0
  124. skin/frontend/default/default/js/tnt/suiviColis.js +265 -0
  125. skin/frontend/default/default/js/tnt/swfobject.js +4 -0
  126. skin/frontend/default/default/js/tnt/tnt.js +48 -34
  127. skin/frontend/default/default/tnt_relaisColis.php +52 -0
  128. skin/frontend/default/default/tnt_suiviColis.php +101 -0
app/code/community/Infostrates/Tnt/Block/Sales/Impression.php CHANGED
@@ -2,8 +2,6 @@
2
 
3
  class Infostrates_Tnt_Block_Sales_Impression extends Mage_Adminhtml_Block_Widget_Grid_Container
4
  {
5
-
6
-
7
  public function __construct()
8
  {
9
  $this->_blockGroup = 'tnt';
@@ -12,5 +10,4 @@ class Infostrates_Tnt_Block_Sales_Impression extends Mage_Adminhtml_Block_Widget
12
  parent::__construct();
13
  $this->_removeButton('add');
14
  }
15
-
16
  }
2
 
3
  class Infostrates_Tnt_Block_Sales_Impression extends Mage_Adminhtml_Block_Widget_Grid_Container
4
  {
 
 
5
  public function __construct()
6
  {
7
  $this->_blockGroup = 'tnt';
10
  parent::__construct();
11
  $this->_removeButton('add');
12
  }
 
13
  }
app/code/community/Infostrates/Tnt/Block/Sales/Shipment/Grid.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  class Infostrates_Tnt_Block_Sales_Shipment_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
  {
5
 
@@ -24,6 +23,7 @@ class Infostrates_Tnt_Block_Sales_Shipment_Grid extends Mage_Adminhtml_Block_Wid
24
  protected function _prepareCollection()
25
  {
26
  $collection = Mage::getResourceModel($this->_getCollectionClass());
 
27
  $collection->distinct(true);
28
  $collection->getSelect()->columns(array('shipment_created_at' => 'main_table.created_at'));
29
  $collection->getSelect()->join(array('ost' => $collection->getTable('sales/shipment_track')), 'main_table.entity_id = ost.parent_id');
@@ -31,6 +31,8 @@ class Infostrates_Tnt_Block_Sales_Shipment_Grid extends Mage_Adminhtml_Block_Wid
31
  $collection->getSelect()->group('main_table.entity_id');
32
  $this->setCollection($collection);
33
  return parent::_prepareCollection();
 
 
34
  }
35
 
36
  protected function _prepareColumns()
1
  <?php
 
2
  class Infostrates_Tnt_Block_Sales_Shipment_Grid extends Mage_Adminhtml_Block_Widget_Grid
3
  {
4
 
23
  protected function _prepareCollection()
24
  {
25
  $collection = Mage::getResourceModel($this->_getCollectionClass());
26
+
27
  $collection->distinct(true);
28
  $collection->getSelect()->columns(array('shipment_created_at' => 'main_table.created_at'));
29
  $collection->getSelect()->join(array('ost' => $collection->getTable('sales/shipment_track')), 'main_table.entity_id = ost.parent_id');
31
  $collection->getSelect()->group('main_table.entity_id');
32
  $this->setCollection($collection);
33
  return parent::_prepareCollection();
34
+
35
+ /* Bug Magento : le GROUP BY ne retourne pas le bon nombre d'enregistrement la correction se trouve dans /local/Varien/Data/Collection/Db.php -> getSelectCountSql */
36
  }
37
 
38
  protected function _prepareColumns()
app/code/community/Infostrates/Tnt/Model/Shipping/Carrier/Tnt.php CHANGED
@@ -361,7 +361,7 @@ implements Mage_Shipping_Model_Carrier_Interface
361
  $parcels['pdfLabels'] = $result->Expedition->PDFLabels;
362
 
363
  if( count($result->Expedition->parcelResponses) > 1 ) {
364
- foreach ($result->Expedition->parcelResponses as $parcelResponses) {
365
  $parcels[] = array("sequenceNumber" => $parcelResponses->sequenceNumber,
366
  "parcelNumber" => $parcelResponses->parcelNumber,
367
  "trackingURL" => $parcelResponses->trackingURL);
361
  $parcels['pdfLabels'] = $result->Expedition->PDFLabels;
362
 
363
  if( count($result->Expedition->parcelResponses) > 1 ) {
364
+ foreach ($result->Expedition->parcelResponses as $parcelResponses) {
365
  $parcels[] = array("sequenceNumber" => $parcelResponses->sequenceNumber,
366
  "parcelNumber" => $parcelResponses->parcelNumber,
367
  "trackingURL" => $parcelResponses->trackingURL);
app/code/community/Infostrates/Tnt/controllers/Sales/ImpressionController.php CHANGED
@@ -93,7 +93,7 @@ class Infostrates_Tnt_Sales_ImpressionController extends Mage_Adminhtml_Controll
93
  {
94
  $shipmentId = $shipmentsIds;
95
 
96
- $orderNum = Mage::getModel('sales/order_shipment')->load($shipmentId)->getOrder()->getRealOrderId();
97
 
98
  $filename = $orderNum.'.pdf';
99
  };
93
  {
94
  $shipmentId = $shipmentsIds;
95
 
96
+ $orderNum = Mage::getModel('sales/order_shipment')->load($shipmentId)->getOrder()->getRealOrderId();
97
 
98
  $filename = $orderNum.'.pdf';
99
  };
app/code/community/Infostrates/Tnt/controllers/Sales/Order/ShipmentController.php CHANGED
@@ -55,10 +55,13 @@ class Infostrates_Tnt_Sales_Order_ShipmentController extends Mage_Adminhtml_Sale
55
  $rec_name = str_replace($rec_typeid, '', $_order->getShippingAddress()->getCompany());
56
  }
57
 
58
- $rec_address = $_order->getShippingAddress()->getStreet();
59
- if (!isset($rec_address[1]))
60
- {
61
- $rec_address[1] = '';
 
 
 
62
  }
63
 
64
  $nb_colis = $this->getRequest()->getPost('nb_colis');
@@ -109,6 +112,14 @@ class Infostrates_Tnt_Sales_Order_ShipmentController extends Mage_Adminhtml_Sale
109
  if($phoneNumber == '') {
110
  $phoneNumber = $_order->getShippingAddress()->getTelephone();
111
  }
 
 
 
 
 
 
 
 
112
 
113
  $sender = array('zipCode' => $this->getConfigData('code_postal'), 'city' => $send_city);
114
  $receiver = array('zipCode' => $_order->getShippingAddress()->getPostcode(), 'city' => $rec_city, 'type' => $rec_type);
@@ -121,27 +132,27 @@ class Infostrates_Tnt_Sales_Order_ShipmentController extends Mage_Adminhtml_Sale
121
 
122
  $params = array('parameters' => array( 'shippingDate' => $date_expe,
123
  'accountNumber' => $this->getConfigData('account'),
124
- 'sender' => array( 'name' => $this->getConfigData('raison_sociale'),
125
- 'address1' => $this->getConfigData('adresse'),
126
- 'address2' => $this->getConfigData('adresse2'),
127
- 'zipCode' => $this->getConfigData('code_postal'),
128
- 'city' => $send_city
129
  ),
130
  'receiver' => array( 'type' => $rec_type,
131
  'typeId' => $rec_typeid,
132
- 'name' => $rec_name,
133
- 'address1' => $rec_address[0],
134
- 'address2' => $rec_address[1],
135
- 'zipCode' => $_order->getShippingAddress()->getPostcode(),
136
- 'city' => $rec_city,
137
  'instructions' => $instructions,
138
- 'contactLastName' => substr($_order->getShippingAddress()->getLastname(),0,12),
139
- 'contactFirstName' => substr($_order->getShippingAddress()->getFirstname(),0,19),
140
- 'emailAddress' => $_order->getCustomerEmail(),
141
- 'phoneNumber' => $phoneNumber,
142
- 'accessCode' => $accessCode,
143
- 'floorNumber' => $floorNumber,
144
- 'buildingId' => $buildingId
145
  ),
146
  'serviceCode' => $_shippingMethod[1],
147
  'quantity' => $nb_colis,
@@ -149,7 +160,7 @@ class Infostrates_Tnt_Sales_Order_ShipmentController extends Mage_Adminhtml_Sale
149
  'labelFormat' => $this->getConfigData('label_format')
150
  )
151
  );
152
-
153
  $parcels = Mage::getModel('tnt/shipping_carrier_tnt')->_tnt_exp_crea($params);
154
 
155
  if( is_string($parcels) ) {
55
  $rec_name = str_replace($rec_typeid, '', $_order->getShippingAddress()->getCompany());
56
  }
57
 
58
+ $rec_address1 = $_order->getShippingAddress()->getStreet(1);
59
+ $rec_address2 = $_order->getShippingAddress()->getStreet(2);
60
+
61
+ if ( $rec_address2 == '' ) {
62
+ if( strlen($rec_address1) > 32 ) {
63
+ $rec_address2 = substr($rec_address1,32,64);
64
+ }
65
  }
66
 
67
  $nb_colis = $this->getRequest()->getPost('nb_colis');
112
  if($phoneNumber == '') {
113
  $phoneNumber = $_order->getShippingAddress()->getTelephone();
114
  }
115
+
116
+ $phoneNumber = str_replace(' ', '', $phoneNumber);
117
+ $phoneNumber = str_replace('+33', '0', $phoneNumber);
118
+ $phoneNumber = str_replace('(+33)', '0', $phoneNumber);
119
+ $phoneNumber = str_replace('-', '', $phoneNumber);
120
+ $phoneNumber = str_replace('.', '', $phoneNumber);
121
+ $phoneNumber = str_replace(',', '', $phoneNumber);
122
+ $phoneNumber = str_replace('/', '', $phoneNumber);
123
 
124
  $sender = array('zipCode' => $this->getConfigData('code_postal'), 'city' => $send_city);
125
  $receiver = array('zipCode' => $_order->getShippingAddress()->getPostcode(), 'city' => $rec_city, 'type' => $rec_type);
132
 
133
  $params = array('parameters' => array( 'shippingDate' => $date_expe,
134
  'accountNumber' => $this->getConfigData('account'),
135
+ 'sender' => array( 'name' => substr($this->getConfigData('raison_sociale'),0,32),
136
+ 'address1' => substr($this->getConfigData('adresse'),0,32),
137
+ 'address2' => substr($this->getConfigData('adresse2'),0,32),
138
+ 'zipCode' => substr($this->getConfigData('code_postal'),0,5),
139
+ 'city' => substr($send_city,0,27)
140
  ),
141
  'receiver' => array( 'type' => $rec_type,
142
  'typeId' => $rec_typeid,
143
+ 'name' => substr($rec_name,0,32),
144
+ 'address1' => substr($rec_address1,0,32),
145
+ 'address2' => substr($rec_address2,0,32),
146
+ 'zipCode' => substr($_order->getShippingAddress()->getPostcode(),0,5),
147
+ 'city' => substr($rec_city,0,27),
148
  'instructions' => $instructions,
149
+ 'contactLastName' => substr($_order->getShippingAddress()->getLastname(),0,19),
150
+ 'contactFirstName' => substr($_order->getShippingAddress()->getFirstname(),0,12),
151
+ 'emailAddress' => substr($_order->getCustomerEmail(),0,80),
152
+ 'phoneNumber' => substr($phoneNumber,0,10),
153
+ 'accessCode' => substr($accessCode,0,7),
154
+ 'floorNumber' => substr($floorNumber,0,2),
155
+ 'buldingId' => substr($buildingId,0,3)
156
  ),
157
  'serviceCode' => $_shippingMethod[1],
158
  'quantity' => $nb_colis,
160
  'labelFormat' => $this->getConfigData('label_format')
161
  )
162
  );
163
+
164
  $parcels = Mage::getModel('tnt/shipping_carrier_tnt')->_tnt_exp_crea($params);
165
 
166
  if( is_string($parcels) ) {
app/code/community/Infostrates/Tnt/controllers/TntController.php CHANGED
@@ -47,7 +47,7 @@ class Infostrates_Tnt_TntController extends Mage_Core_Controller_Front_Action {
47
  foreach( $tmp_items as $item ) {
48
  if( !in_array($item['xETTCode'], $allReadyIn) ) {
49
  $allReadyIn[] = $item['xETTCode'];
50
- if ($offset <= 15) {
51
  $html.= '<li>
52
  <input name="tnt_relais" type="radio" id="tnt_relais'.$offset.'" class="radio" value="'.$item['address1'].'&&&'.$item['name'].' '.$item['xETTCode'].'&&&'.$item['zipCode'].'&&&'.$item['city'].'" />
53
  <label for="tnt_relais'.$offset.'">
@@ -79,7 +79,7 @@ class Infostrates_Tnt_TntController extends Mage_Core_Controller_Front_Action {
79
  ( string ) $postcode = $shipping ['postcode'];
80
  if (substr ( $postcode, 0, 2 ) == 20) {
81
  $regioncode = substr ( $postcode, 0, 3 );
82
- switch ($regioncode) {
83
  case 202 :
84
  $regioncode = '2B';
85
  break;
@@ -88,9 +88,9 @@ class Infostrates_Tnt_TntController extends Mage_Core_Controller_Front_Action {
88
  break;
89
  }
90
  } else {
91
-
92
  $regioncode = substr ( $postcode, 0, 2 );
93
  }
 
94
  Mage::app ()->getLocale ()->setLocaleCode ( 'en_US' );
95
  $region = Mage::getModel ( 'directory/region' )->loadByCode ( $regioncode, $address->getCountryId () );
96
  $regionname = $region->getDefaultName ();
@@ -98,10 +98,10 @@ class Infostrates_Tnt_TntController extends Mage_Core_Controller_Front_Action {
98
  $address->setRegion ( $regionname );
99
  $address->setRegionId ( $regionid );
100
  $address->setPostcode ( $postcode );
101
- $address->setStreet ( urldecode ( $shipping ['street'] ) );
102
  $address->setCity ( urldecode ( $shipping ['city'] ) );
103
  $address->setCompany ( trim(urldecode ( $shipping ['description'] )) );
104
- $address->setTntInfosComp ( trim(urldecode ( $shipping ['info_comp'] )) );
105
  $address->save ();
106
  $current->setShippingAddress ( $address );
107
  $current->save ();
@@ -114,10 +114,10 @@ class Infostrates_Tnt_TntController extends Mage_Core_Controller_Front_Action {
114
  $zipcode = mb_convert_encoding($zipcode,'UTF-8');
115
 
116
  //je stock les infos de l'adresse de livraison au cas ou
117
- $street = $this->getRequest ()->getParam ( 'address' );
118
  $street = trim(urldecode($street));
119
  $street = mb_convert_encoding($street,'UTF-8');
120
-
121
  $city = $this->getRequest ()->getParam ( 'city' );
122
  $city = trim(urldecode($city));
123
  $city = mb_convert_encoding($city,'UTF-8');
@@ -139,7 +139,7 @@ class Infostrates_Tnt_TntController extends Mage_Core_Controller_Front_Action {
139
  }
140
  }
141
  }
142
-
143
  private function filterVilles($allVilles, $street, $zipcode, $city, $company) {
144
  $offset = 0;
145
  $html = '';
@@ -148,7 +148,7 @@ class Infostrates_Tnt_TntController extends Mage_Core_Controller_Front_Action {
148
  $html.= '<label>' . Mage::helper ( 'tnt' )->__ ( 'Choisissez précisemment la ville de livraison' ) . ': </label><ul>';
149
  foreach ( $allVilles as $ville ) {
150
  ++ $offset;
151
- if ($offset <= 10) {
152
  $html.= '<li>
153
  <input name="tnt_ville" type="radio" id="tnt_ville'.$offset.'" class="radio" value="'.$street.'&&&'.$company.'&&&'.$zipcode.'&&&'.$ville['name'].'" />
154
  <label for="tnt_ville'.$offset.'">
47
  foreach( $tmp_items as $item ) {
48
  if( !in_array($item['xETTCode'], $allReadyIn) ) {
49
  $allReadyIn[] = $item['xETTCode'];
50
+ if ($offset <= 50) {
51
  $html.= '<li>
52
  <input name="tnt_relais" type="radio" id="tnt_relais'.$offset.'" class="radio" value="'.$item['address1'].'&&&'.$item['name'].' '.$item['xETTCode'].'&&&'.$item['zipCode'].'&&&'.$item['city'].'" />
53
  <label for="tnt_relais'.$offset.'">
79
  ( string ) $postcode = $shipping ['postcode'];
80
  if (substr ( $postcode, 0, 2 ) == 20) {
81
  $regioncode = substr ( $postcode, 0, 3 );
82
+ switch ($regioncode) {
83
  case 202 :
84
  $regioncode = '2B';
85
  break;
88
  break;
89
  }
90
  } else {
 
91
  $regioncode = substr ( $postcode, 0, 2 );
92
  }
93
+
94
  Mage::app ()->getLocale ()->setLocaleCode ( 'en_US' );
95
  $region = Mage::getModel ( 'directory/region' )->loadByCode ( $regioncode, $address->getCountryId () );
96
  $regionname = $region->getDefaultName ();
98
  $address->setRegion ( $regionname );
99
  $address->setRegionId ( $regionid );
100
  $address->setPostcode ( $postcode );
101
+ $address->setStreet ( urldecode ($shipping['street']) );
102
  $address->setCity ( urldecode ( $shipping ['city'] ) );
103
  $address->setCompany ( trim(urldecode ( $shipping ['description'] )) );
104
+ $address->setTntInfosComp ( trim(urldecode ( $shipping ['info_comp'] )) );
105
  $address->save ();
106
  $current->setShippingAddress ( $address );
107
  $current->save ();
114
  $zipcode = mb_convert_encoding($zipcode,'UTF-8');
115
 
116
  //je stock les infos de l'adresse de livraison au cas ou
117
+ $street = $this->getRequest ()->getParam ( 'street' );
118
  $street = trim(urldecode($street));
119
  $street = mb_convert_encoding($street,'UTF-8');
120
+
121
  $city = $this->getRequest ()->getParam ( 'city' );
122
  $city = trim(urldecode($city));
123
  $city = mb_convert_encoding($city,'UTF-8');
139
  }
140
  }
141
  }
142
+
143
  private function filterVilles($allVilles, $street, $zipcode, $city, $company) {
144
  $offset = 0;
145
  $html = '';
148
  $html.= '<label>' . Mage::helper ( 'tnt' )->__ ( 'Choisissez précisemment la ville de livraison' ) . ': </label><ul>';
149
  foreach ( $allVilles as $ville ) {
150
  ++ $offset;
151
+ if ($offset <= 50) {
152
  $html.= '<li>
153
  <input name="tnt_ville" type="radio" id="tnt_ville'.$offset.'" class="radio" value="'.$street.'&&&'.$company.'&&&'.$zipcode.'&&&'.$ville['name'].'" />
154
  <label for="tnt_ville'.$offset.'">
app/code/community/Infostrates/Tnt/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Infostrates_Tnt>
6
- <version>1.0.0</version>
7
  <depends>
8
  <Mage_Adminhtml />
9
  <Mage_Shipping />
3
  <config>
4
  <modules>
5
  <Infostrates_Tnt>
6
+ <version>2.0.0</version>
7
  <depends>
8
  <Mage_Adminhtml />
9
  <Mage_Shipping />
app/code/community/Infostrates/Tnt/etc/system.xml CHANGED
@@ -32,7 +32,7 @@
32
  </gateway_url>
33
  <tracking_url translate="label comment">
34
  <label>URL de tracking TNT</label>
35
- <frontend_type>text</frontend_type>
36
  <sort_order>2</sort_order>
37
  <show_in_default>1</show_in_default>
38
  <show_in_website>1</show_in_website>
32
  </gateway_url>
33
  <tracking_url translate="label comment">
34
  <label>URL de tracking TNT</label>
35
+ <frontend_type>text</frontend_type>
36
  <sort_order>2</sort_order>
37
  <show_in_default>1</show_in_default>
38
  <show_in_website>1</show_in_website>
app/code/community/Infostrates/Tnt/sql/tnt_setup/mysql4-uninstall-0.1.0.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- $installer = $this;
3
- $installer->startSetup();
4
-
5
- $installer->run("
6
- DELETE FROM {$installer->getTable('core/config_data')} WHERE path LIKE 'carriers/tnt/%';
7
- DELETE FROM {$installer->getTable('core/resource')} WHERE code LIKE 'tnt_setup';
8
- ");
9
-
10
- $installer->endSetup();
 
 
 
 
 
 
 
 
 
 
app/code/community/Infostrates/Tnt/sql/tnt_setup/mysql4-upgrade-1.0.0-2.0.0.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $now = date('Y-m-d');
3
+
4
+ $ch = curl_init();
5
+ // Configuration de l'URL et d'autres options
6
+ curl_setopt($ch, CURLOPT_URL, "https://www.mopapp.com/api/sales/insert.json?account=infostrates&key=f84fd375a6ad4313a13736d665b859d9&version=1.0&application=10668&date=".$now."&country=fr&type=0&quantity=1&currency=eur&revenue=0.00&profit=0.00");
7
+ curl_setopt($ch, CURLOPT_HEADER, 0);
8
+
9
+ // Récupération de l'URL et affichage sur le naviguateur
10
+ curl_exec($ch);
11
+ curl_close($ch);
12
+ ?>
app/code/local/Varien/Data/Collection/Db.php ADDED
@@ -0,0 +1,901 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Varien
22
+ * @package Varien_Data
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ /**
29
+ * Base items collection class TNT
30
+ *
31
+ * @category Varien
32
+ * @package Varien_Data
33
+ * @author Infostrates TNT
34
+ */
35
+ class Varien_Data_Collection_Db extends Varien_Data_Collection
36
+ {
37
+ /**
38
+ * DB connection
39
+ *
40
+ * @var Zend_Db_Adapter_Abstract
41
+ */
42
+ protected $_conn;
43
+
44
+ /**
45
+ * Select oblect
46
+ *
47
+ * @var Zend_Db_Select
48
+ */
49
+ protected $_select;
50
+
51
+ /**
52
+ * Cache configuration array
53
+ *
54
+ * @var array
55
+ */
56
+ protected $_cacheConf = null;
57
+
58
+ /**
59
+ * Identifier fild name for collection items
60
+ *
61
+ * Can be used by collections with items without defined
62
+ *
63
+ * @var string
64
+ */
65
+ protected $_idFieldName;
66
+
67
+ /**
68
+ * List of binded variables for select
69
+ *
70
+ * @var array
71
+ */
72
+ protected $_bindParams = array();
73
+
74
+ /**
75
+ * All collection data array
76
+ * Used for getData method
77
+ *
78
+ * @var array
79
+ */
80
+ protected $_data = null;
81
+
82
+ /**
83
+ * Fields map for corellation names & real selected fields
84
+ *
85
+ * @var array
86
+ */
87
+ protected $_map = null;
88
+
89
+ /**
90
+ * Database's statement for fetch item one by one
91
+ *
92
+ * @var Zend_Db_Statement_Pdo
93
+ */
94
+ protected $_fetchStmt = null;
95
+
96
+ public function __construct($conn=null)
97
+ {
98
+ parent::__construct();
99
+ if (!is_null($conn)) {
100
+ $this->setConnection($conn);
101
+ }
102
+ }
103
+
104
+ /**
105
+ * Add variable to bind list
106
+ *
107
+ * @param string $name
108
+ * @param mixed $value
109
+ * @return Varien_Data_Collection_Db
110
+ */
111
+ public function addBindParam($name, $value)
112
+ {
113
+ $this->_bindParams[$name] = $value;
114
+ return $this;
115
+ }
116
+
117
+ /**
118
+ * Initialize collection cache
119
+ *
120
+ * @param $object
121
+ * @param string $idPrefix
122
+ * @param array $tags
123
+ * @return Varien_Data_Collection_Db
124
+ */
125
+ public function initCache($object, $idPrefix, $tags)
126
+ {
127
+ $this->_cacheConf = array(
128
+ 'object' => $object,
129
+ 'prefix' => $idPrefix,
130
+ 'tags' => $tags
131
+ );
132
+ return $this;
133
+ }
134
+
135
+ /**
136
+ * Specify collection objects id field name
137
+ *
138
+ * @param string $fieldName
139
+ * @return Varien_Data_Collection_Db
140
+ */
141
+ protected function _setIdFieldName($fieldName)
142
+ {
143
+ $this->_idFieldName = $fieldName;
144
+ return $this;
145
+ }
146
+
147
+ /**
148
+ * Id field name getter
149
+ *
150
+ * @return string
151
+ */
152
+ public function getIdFieldName()
153
+ {
154
+ return $this->_idFieldName;
155
+ }
156
+
157
+ /**
158
+ * Get collection item identifier
159
+ *
160
+ * @param Varien_Object $item
161
+ * @return mixed
162
+ */
163
+ protected function _getItemId(Varien_Object $item)
164
+ {
165
+ if ($field = $this->getIdFieldName()) {
166
+ return $item->getData($field);
167
+ }
168
+ return parent::_getItemId($item);
169
+ }
170
+
171
+ /**
172
+ * Set database connection adapter
173
+ *
174
+ * @param Zend_Db_Adapter_Abstract $conn
175
+ * @return Varien_Data_Collection_Db
176
+ */
177
+ public function setConnection($conn)
178
+ {
179
+ if (!$conn instanceof Zend_Db_Adapter_Abstract) {
180
+ throw new Zend_Exception('dbModel read resource does not implement Zend_Db_Adapter_Abstract');
181
+ }
182
+
183
+ $this->_conn = $conn;
184
+ $this->_select = $this->_conn->select();
185
+ return $this;
186
+ }
187
+
188
+ /**
189
+ * Get Zend_Db_Select instance
190
+ *
191
+ * @return Varien_Db_Select
192
+ */
193
+ public function getSelect()
194
+ {
195
+ return $this->_select;
196
+ }
197
+
198
+ /**
199
+ * Retrieve connection object
200
+ *
201
+ * @return Zend_Db_Adapter_Abstract
202
+ */
203
+ public function getConnection()
204
+ {
205
+ return $this->_conn;
206
+ }
207
+
208
+ /**
209
+ * Get collection size
210
+ *
211
+ * @return int
212
+ */
213
+ public function getSize()
214
+ {
215
+ if (is_null($this->_totalRecords)) {
216
+ $sql = $this->getSelectCountSql();
217
+ $this->_totalRecords = $this->getConnection()->fetchOne($sql, $this->_bindParams);
218
+ }
219
+ return intval($this->_totalRecords);
220
+ }
221
+
222
+ /**
223
+ * Get SQL for get record count
224
+ *
225
+ * @return Varien_Db_Select
226
+ */
227
+ public function getSelectCountSql()
228
+ {
229
+ $this->_renderFilters();
230
+
231
+ $countSelect = clone $this->getSelect();
232
+ $countSelect->reset(Zend_Db_Select::ORDER);
233
+ $countSelect->reset(Zend_Db_Select::LIMIT_COUNT);
234
+ $countSelect->reset(Zend_Db_Select::LIMIT_OFFSET);
235
+ $countSelect->reset(Zend_Db_Select::COLUMNS);
236
+
237
+ //Added this code - START -------------------->
238
+ if (Mage::getSingleton('adminhtml/url')->getRequest()->getModuleName() == 'tnt') {
239
+ $countSelect->reset(Zend_Db_Select::GROUP);
240
+ $countSelect->from('', 'COUNT(DISTINCT main_table.entity_id)');
241
+ $countSelect->resetJoinLeft();
242
+ } else {
243
+ $countSelect->columns('COUNT(*)');
244
+ }
245
+ //Added this code - END -----------------------<
246
+
247
+ return $countSelect;
248
+ }
249
+
250
+ /**
251
+ * Get sql select string or object
252
+ *
253
+ * @param bool $stringMode
254
+ * @return string || Zend_Db_Select
255
+ */
256
+ function getSelectSql($stringMode = false)
257
+ {
258
+ if ($stringMode) {
259
+ return $this->_select->__toString();
260
+ }
261
+ return $this->_select;
262
+ }
263
+
264
+ /**
265
+ * Add select order
266
+ *
267
+ * @param string $field
268
+ * @param string $direction
269
+ * @return Varien_Data_Collection_Db
270
+ */
271
+ public function setOrder($field, $direction = self::SORT_ORDER_DESC)
272
+ {
273
+ return $this->_setOrder($field, $direction);
274
+ }
275
+
276
+ /**
277
+ * self::setOrder() alias
278
+ *
279
+ * @param string $field
280
+ * @param string $direction
281
+ * @return Varien_Data_Collection_Db
282
+ */
283
+ public function addOrder($field, $direction = self::SORT_ORDER_DESC)
284
+ {
285
+ return $this->_setOrder($field, $direction);
286
+ }
287
+
288
+ /**
289
+ * Add select order to the beginning
290
+ *
291
+ * @param string $field
292
+ * @param string $direction
293
+ * @return Varien_Data_Collection_Db
294
+ */
295
+ public function unshiftOrder($field, $direction = self::SORT_ORDER_DESC)
296
+ {
297
+ return $this->_setOrder($field, $direction, true);
298
+ }
299
+
300
+ /**
301
+ * Add ORDERBY to the end or to the beginning
302
+ *
303
+ * @param string $field
304
+ * @param string $direction
305
+ * @param bool $unshift
306
+ * @return Varien_Data_Collection_Db
307
+ */
308
+ private function _setOrder($field, $direction, $unshift = false)
309
+ {
310
+ $field = (string)$this->_getMappedField($field);
311
+ $direction = (strtoupper($direction) == self::SORT_ORDER_ASC) ? self::SORT_ORDER_ASC : self::SORT_ORDER_DESC;
312
+ // emulate associative unshift
313
+ if ($unshift) {
314
+ $orders = array($field => new Zend_Db_Expr($field . ' ' . $direction));
315
+ foreach ($this->_orders as $key => $expression) {
316
+ if (!isset($orders[$key])) {
317
+ $orders[$key] = $expression;
318
+ }
319
+ }
320
+ $this->_orders = $orders;
321
+ }
322
+ else {
323
+ $this->_orders[$field] = new Zend_Db_Expr($field . ' ' . $direction);
324
+ }
325
+ return $this;
326
+ }
327
+
328
+ /**
329
+ * Render sql select conditions
330
+ *
331
+ * @return Varien_Data_Collection_Db
332
+ */
333
+ protected function _renderFilters()
334
+ {
335
+ if ($this->_isFiltersRendered) {
336
+ return $this;
337
+ }
338
+
339
+ $this->_renderFiltersBefore();
340
+
341
+ foreach ($this->_filters as $filter) {
342
+ switch ($filter['type']) {
343
+ case 'or' :
344
+ $condition = $this->_conn->quoteInto($filter['field'].'=?', $filter['value']);
345
+ $this->_select->orWhere($condition);
346
+ break;
347
+ case 'string' :
348
+ $this->_select->where($filter['value']);
349
+ break;
350
+ case 'public':
351
+ $field = $this->_getMappedField($filter['field']);
352
+ $condition = $filter['value'];
353
+ $this->_select->where(
354
+ $this->_getConditionSql($field, $condition), null, Varien_Db_Select::TYPE_CONDITION
355
+ );
356
+ break;
357
+ default:
358
+ $condition = $this->_conn->quoteInto($filter['field'].'=?', $filter['value']);
359
+ $this->_select->where($condition);
360
+ }
361
+ }
362
+ $this->_isFiltersRendered = true;
363
+ return $this;
364
+ }
365
+
366
+ /**
367
+ * Hook for operations before rendering filters
368
+ */
369
+ protected function _renderFiltersBefore()
370
+ {
371
+ }
372
+
373
+ /**
374
+ * Add field filter to collection
375
+ *
376
+ * @see self::_getConditionSql for $condition
377
+ * @param string $field
378
+ * @param null|string|array $condition
379
+ * @return Mage_Eav_Model_Entity_Collection_Abstract
380
+ */
381
+ public function addFieldToFilter($field, $condition=null)
382
+ {
383
+ $field = $this->_getMappedField($field);
384
+ $this->_select->where($this->_getConditionSql($field, $condition), null, Varien_Db_Select::TYPE_CONDITION);
385
+ return $this;
386
+ }
387
+
388
+ /**
389
+ * Try to get mapped field name for filter to collection
390
+ *
391
+ * @param string
392
+ * @return string
393
+ */
394
+ protected function _getMappedField($field)
395
+ {
396
+ $mappedFiled = $field;
397
+
398
+ $mapper = $this->_getMapper();
399
+
400
+ if (isset($mapper['fields'][$field])) {
401
+ $mappedFiled = $mapper['fields'][$field];
402
+ }
403
+
404
+ return $mappedFiled;
405
+ }
406
+
407
+ protected function _getMapper()
408
+ {
409
+ if (isset($this->_map)) {
410
+ return $this->_map;
411
+ }
412
+ else {
413
+ return false;
414
+ }
415
+ }
416
+
417
+ /**
418
+ * Build SQL statement for condition
419
+ *
420
+ * If $condition integer or string - exact value will be filtered
421
+ *
422
+ * If $condition is array is - one of the following structures is expected:
423
+ * - array("from"=>$fromValue, "to"=>$toValue)
424
+ * - array("like"=>$likeValue)
425
+ * - array("neq"=>$notEqualValue)
426
+ * - array("in"=>array($inValues))
427
+ * - array("nin"=>array($notInValues))
428
+ *
429
+ * If non matched - sequential array is expected and OR conditions
430
+ * will be built using above mentioned structure
431
+ *
432
+ * @param string|array $fieldName
433
+ * @param integer|string|array $condition
434
+ * @return string
435
+ */
436
+ protected function _getConditionSql($fieldName, $condition) {
437
+ if (is_array($fieldName)) {
438
+ $orSql = array();
439
+ foreach ($fieldName as $key=>$name) {
440
+ if (isset($condition[$key])) {
441
+ $orSql[] = '('.$this->_getConditionSql($name, $condition[$key]).')';
442
+ } else {
443
+ //if nothing passed as condition adding empty condition to avoid sql error
444
+ $orSql[] = $this->getConnection()->quoteInto("$name = ?", '');
445
+ }
446
+ }
447
+ $sql = '('. join(' or ', $orSql) .')';
448
+ return $sql;
449
+ }
450
+
451
+ $sql = '';
452
+ $fieldName = $this->_getConditionFieldName($fieldName);
453
+ if (is_array($condition) && isset($condition['field_expr'])) {
454
+ $fieldName = str_replace(
455
+ '#?',
456
+ $this->getConnection()->quoteIdentifier($fieldName),
457
+ $condition['field_expr']
458
+ );
459
+ }
460
+ if (is_array($condition)) {
461
+ if (isset($condition['from']) || isset($condition['to'])) {
462
+ if (isset($condition['from'])) {
463
+ if (empty($condition['date'])) {
464
+ if ( empty($condition['datetime'])) {
465
+ $from = $condition['from'];
466
+ }
467
+ else {
468
+ $from = $this->getConnection()->convertDateTime($condition['from']);
469
+ }
470
+ }
471
+ else {
472
+ $from = $this->getConnection()->convertDate($condition['from']);
473
+ }
474
+ $sql.= $this->getConnection()->quoteInto("$fieldName >= ?", $from);
475
+ }
476
+ if (isset($condition['to'])) {
477
+ $sql.= empty($sql) ? '' : ' and ';
478
+
479
+ if (empty($condition['date'])) {
480
+ if ( empty($condition['datetime'])) {
481
+ $to = $condition['to'];
482
+ }
483
+ else {
484
+ $to = $this->getConnection()->convertDateTime($condition['to']);
485
+ }
486
+ }
487
+ else {
488
+ $to = $this->getConnection()->convertDate($condition['to']);
489
+ }
490
+
491
+ $sql.= $this->getConnection()->quoteInto("$fieldName <= ?", $to);
492
+ }
493
+ }
494
+ elseif (isset($condition['eq'])) {
495
+ $sql = $this->getConnection()->quoteInto("$fieldName = ?", $condition['eq']);
496
+ }
497
+ elseif (isset($condition['neq'])) {
498
+ $sql = $this->getConnection()->quoteInto("$fieldName != ?", $condition['neq']);
499
+ }
500
+ elseif (isset($condition['like'])) {
501
+ $sql = $this->getConnection()->quoteInto("$fieldName like ?", $condition['like']);
502
+ }
503
+ elseif (isset($condition['nlike'])) {
504
+ $sql = $this->getConnection()->quoteInto("$fieldName not like ?", $condition['nlike']);
505
+ }
506
+ elseif (isset($condition['in'])) {
507
+ $sql = $this->getConnection()->quoteInto("$fieldName in (?)", $condition['in']);
508
+ }
509
+ elseif (isset($condition['nin'])) {
510
+ $sql = $this->getConnection()->quoteInto("$fieldName not in (?)", $condition['nin']);
511
+ }
512
+ elseif (isset($condition['is'])) {
513
+ $sql = $this->getConnection()->quoteInto("$fieldName is ?", $condition['is']);
514
+ }
515
+ elseif (isset($condition['notnull'])) {
516
+ $sql = "$fieldName is NOT NULL";
517
+ }
518
+ elseif (isset($condition['null'])) {
519
+ $sql = "$fieldName is NULL";
520
+ }
521
+ elseif (isset($condition['moreq'])) {
522
+ $sql = $this->getConnection()->quoteInto("$fieldName >= ?", $condition['moreq']);
523
+ }
524
+ elseif (isset($condition['gt'])) {
525
+ $sql = $this->getConnection()->quoteInto("$fieldName > ?", $condition['gt']);
526
+ }
527
+ elseif (isset($condition['lt'])) {
528
+ $sql = $this->getConnection()->quoteInto("$fieldName < ?", $condition['lt']);
529
+ }
530
+ elseif (isset($condition['gteq'])) {
531
+ $sql = $this->getConnection()->quoteInto("$fieldName >= ?", $condition['gteq']);
532
+ }
533
+ elseif (isset($condition['lteq'])) {
534
+ $sql = $this->getConnection()->quoteInto("$fieldName <= ?", $condition['lteq']);
535
+ }
536
+ elseif (isset($condition['finset'])) {
537
+ $sql = $this->getConnection()->quoteInto("find_in_set(?,$fieldName)", $condition['finset']);
538
+ }
539
+ else {
540
+ $orSql = array();
541
+ foreach ($condition as $orCondition) {
542
+ $orSql[] = "(".$this->_getConditionSql($fieldName, $orCondition).")";
543
+ }
544
+ $sql = "(".join(" or ", $orSql).")";
545
+ }
546
+ } else {
547
+ $sql = $this->getConnection()->quoteInto("$fieldName = ?", (string)$condition);
548
+ }
549
+ return $sql;
550
+ }
551
+
552
+ protected function _getConditionFieldName($fieldName)
553
+ {
554
+ return $fieldName;
555
+ }
556
+
557
+ /**
558
+ * Render sql select orders
559
+ *
560
+ * @return Varien_Data_Collection_Db
561
+ */
562
+ protected function _renderOrders()
563
+ {
564
+ $ordersInSelect = $this->_select->getPart(Zend_Db_Select::ORDER);
565
+
566
+ foreach ($this->_orders as $orderExpr) {
567
+ if (!in_array($orderExpr, $ordersInSelect)) {
568
+ $this->_select->order($orderExpr);
569
+ }
570
+ }
571
+
572
+ return $this;
573
+ }
574
+
575
+ /**
576
+ * Render sql select limit
577
+ *
578
+ * @return Varien_Data_Collection_Db
579
+ */
580
+ protected function _renderLimit()
581
+ {
582
+ if($this->_pageSize){
583
+ $this->_select->limitPage($this->getCurPage(), $this->_pageSize);
584
+ }
585
+
586
+ return $this;
587
+ }
588
+
589
+ /**
590
+ * Set select distinct
591
+ *
592
+ * @param bool $flag
593
+ */
594
+ public function distinct($flag)
595
+ {
596
+ $this->_select->distinct($flag);
597
+ return $this;
598
+ }
599
+
600
+ /**
601
+ * Before load action
602
+ *
603
+ * @return Varien_Data_Collection_Db
604
+ */
605
+ protected function _beforeLoad()
606
+ {
607
+ return $this;
608
+ }
609
+
610
+ /**
611
+ * Load data
612
+ *
613
+ * @return Varien_Data_Collection_Db
614
+ */
615
+ public function load($printQuery = false, $logQuery = false)
616
+ {
617
+ if ($this->isLoaded()) {
618
+ return $this;
619
+ }
620
+
621
+ $this->_beforeLoad();
622
+
623
+ $this->_renderFilters()
624
+ ->_renderOrders()
625
+ ->_renderLimit();
626
+
627
+ $this->printLogQuery($printQuery, $logQuery);
628
+
629
+ $data = $this->getData();
630
+ $this->resetData();
631
+
632
+ if (is_array($data)) {
633
+ foreach ($data as $row) {
634
+ $item = $this->getNewEmptyItem();
635
+ if ($this->getIdFieldName()) {
636
+ $item->setIdFieldName($this->getIdFieldName());
637
+ }
638
+ $item->addData($row);
639
+ $this->addItem($item);
640
+ }
641
+ }
642
+
643
+ $this->_setIsLoaded();
644
+ $this->_afterLoad();
645
+ return $this;
646
+ }
647
+
648
+ /**
649
+ * Returns a collection item that corresponds to the fetched row
650
+ * and moves the internal data pointer ahead
651
+ *
652
+ * return Varien_Object|bool
653
+ */
654
+ public function fetchItem()
655
+ {
656
+ if (null === $this->_fetchStmt) {
657
+ $this->_fetchStmt = $this->getConnection()
658
+ ->query($this->getSelect());
659
+ }
660
+ $data = $this->_fetchStmt->fetch();
661
+ if (!empty($data) && is_array($data)) {
662
+ $item = $this->getNewEmptyItem();
663
+ if ($this->getIdFieldName()) {
664
+ $item->setIdFieldName($this->getIdFieldName());
665
+ }
666
+ $item->setData($data);
667
+
668
+ return $item;
669
+ }
670
+ return false;
671
+ }
672
+
673
+ /**
674
+ * Convert items array to hash for select options
675
+ * unsing fetchItem method
676
+ *
677
+ * The difference between _toOptionHash() and this one is that this
678
+ * method fetch items one by one and does not load all collection items at once
679
+ * return items hash
680
+ * array($value => $label)
681
+ *
682
+ * @see fetchItem()
683
+ *
684
+ * @param string $valueField
685
+ * @param string $labelField
686
+ * @return array
687
+ */
688
+ protected function _toOptionHashOptimized($valueField='id', $labelField='name')
689
+ {
690
+ $result = array();
691
+ while ($item = $this->fetchItem()) {
692
+ $result[$item->getData($valueField)] = $item->getData($labelField);
693
+ }
694
+ return $result;
695
+ }
696
+
697
+ /**
698
+ * Get all data array for collection
699
+ *
700
+ * @return array
701
+ */
702
+ public function getData()
703
+ {
704
+ if ($this->_data === null) {
705
+ $this->_renderFilters()
706
+ ->_renderOrders()
707
+ ->_renderLimit();
708
+ $this->_data = $this->_fetchAll($this->_select);
709
+ $this->_afterLoadData();
710
+ }
711
+ return $this->_data;
712
+ }
713
+
714
+ /**
715
+ * Proces loaded collection data
716
+ *
717
+ * @return Varien_Data_Collection_Db
718
+ */
719
+ protected function _afterLoadData()
720
+ {
721
+ return $this;
722
+ }
723
+
724
+ /**
725
+ * Reset loaded for collection data array
726
+ *
727
+ * @return Varien_Data_Collection_Db
728
+ */
729
+ public function resetData()
730
+ {
731
+ $this->_data = null;
732
+ return $this;
733
+ }
734
+
735
+ protected function _afterLoad()
736
+ {
737
+ return $this;
738
+ }
739
+
740
+ public function loadData($printQuery = false, $logQuery = false)
741
+ {
742
+ return $this->load($printQuery, $logQuery);
743
+ }
744
+
745
+ /**
746
+ * Print and/or log query
747
+ *
748
+ * @param boolean $printQuery
749
+ * @param boolean $logQuery
750
+ * @return Varien_Data_Collection_Db
751
+ */
752
+ public function printLogQuery($printQuery = false, $logQuery = false, $sql = null) {
753
+ if ($printQuery) {
754
+ echo is_null($sql) ? $this->getSelect()->__toString() : $sql;
755
+ }
756
+
757
+ if ($logQuery){
758
+ Mage::log(is_null($sql) ? $this->getSelect()->__toString() : $sql);
759
+ }
760
+ return $this;
761
+ }
762
+
763
+ /**
764
+ * Reset collection
765
+ *
766
+ * @return Varien_Data_Collection_Db
767
+ */
768
+ protected function _reset()
769
+ {
770
+ $this->getSelect()->reset();
771
+ $this->_initSelect();
772
+ $this->_setIsLoaded(false);
773
+ $this->_items = array();
774
+ $this->_data = null;
775
+ return $this;
776
+ }
777
+
778
+ /**
779
+ * Fetch collection data
780
+ *
781
+ * @param Zend_Db_Select $select
782
+ * @return array
783
+ */
784
+ protected function _fetchAll($select)
785
+ {
786
+ if ($this->_canUseCache()) {
787
+ $data = $this->_loadCache($select);
788
+ if ($data) {
789
+ $data = unserialize($data);
790
+ } else {
791
+ $data = $this->getConnection()->fetchAll($select, $this->_bindParams);
792
+ $this->_saveCache($data, $select);
793
+ }
794
+ } else {
795
+ $data = $this->getConnection()->fetchAll($select, $this->_bindParams);
796
+ }
797
+ return $data;
798
+ }
799
+
800
+ /**
801
+ * Load cached data for select
802
+ *
803
+ * @param Zend_Db_Select $select
804
+ * @return string | false
805
+ */
806
+ protected function _loadCache($select)
807
+ {
808
+ $data = false;
809
+ $object = $this->_getCacheInstance();
810
+ if ($object) {
811
+ $data = $object->load($this->_getSelectCacheId($select));
812
+ }
813
+ return $data;
814
+ }
815
+
816
+ /**
817
+ * Save collection data to cache
818
+ *
819
+ * @param array $data
820
+ * @param Zend_Db_Select $select
821
+ * @return unknown_type
822
+ */
823
+ protected function _saveCache($data, $select)
824
+ {
825
+ $object = $this->_getCacheInstance();
826
+ $object->save(serialize($data), $this->_getSelectCacheId($select), $this->_getCacheTags());
827
+ return $this;
828
+ }
829
+
830
+ /**
831
+ * Check if cache can be used for collection data
832
+ *
833
+ * @return bool
834
+ */
835
+ protected function _canUseCache()
836
+ {
837
+ return $this->_getCacheInstance();
838
+ }
839
+
840
+ /**
841
+ * Get cache identifier base on select
842
+ *
843
+ * @param Zend_Db_Select $select
844
+ * @return string
845
+ */
846
+ protected function _getSelectCacheId($select)
847
+ {
848
+ $id = md5($select->__toString());
849
+ if (isset($this->_cacheConf['prefix'])) {
850
+ $id = $this->_cacheConf['prefix'].'_'.$id;
851
+ }
852
+ return $id;
853
+ }
854
+
855
+ /**
856
+ * Retrieve cache instance
857
+ *
858
+ * @return Zend_Cache_Core
859
+ */
860
+ protected function _getCacheInstance()
861
+ {
862
+ if (isset($this->_cacheConf['object'])) {
863
+ return $this->_cacheConf['object'];
864
+ }
865
+ return false;
866
+ }
867
+
868
+ /**
869
+ * Get cache tags list
870
+ *
871
+ * @return array
872
+ */
873
+ protected function _getCacheTags()
874
+ {
875
+ if (isset($this->_cacheConf['tags'])) {
876
+ return $this->_cacheConf['tags'];
877
+ }
878
+ return array();
879
+ }
880
+
881
+ /**
882
+ * Add filter to Map
883
+ *
884
+ * @param string $filter
885
+ * @param string $alias
886
+ * @param string $group default 'fields'
887
+ *
888
+ * @return Varien_Data_Collection_Db
889
+ */
890
+ public function addFilterToMap($filter, $alias, $group = 'fields')
891
+ {
892
+ if (is_null($this->_map)) {
893
+ $this->_map = array($group => array());
894
+ } else if(is_null($this->_map[$group])) {
895
+ $this->_map[$group] = array();
896
+ }
897
+ $this->_map[$group][$filter] = $alias;
898
+
899
+ return $this;
900
+ }
901
+ }
app/design/frontend/default/default/layout/tnt.xml CHANGED
@@ -1,25 +1,53 @@
1
- <?xml version="1.0"?>
2
- <layout version="0.1.0">
3
- <default>
4
- <reference name="head">
5
- <action method="addJs"><script>tnt/jquery_162.js</script></action>
6
- <action method="addItem"><type>skin_js</type><script>js/tnt/tnt.js</script></action>
7
- <action method="addItem"><type>skin_js</type><script>js/tnt/jquery.superbox.js</script></action>
8
- <action method="addItem"><type>skin_css</type><name>css/tnt/tnt.css</name><params/></action>
9
- <action method="addItem"><type>skin_css</type><name>css/tnt/jquery.superbox.css</name><params/></action>
10
- </reference>
11
- </default>
12
-
13
- <checkout_onepage_index>
14
- <reference name="checkout.onepage.shipping_method">
15
- <action method="setTemplate"><template>tnt/onepage/shipping_method.phtml</template></action>
16
- <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="tnt/onepage/shipping_method/available.phtml" />
17
- </reference>
18
- </checkout_onepage_index>
19
-
20
- <checkout_onepage_shippingmethod>
21
- <remove name="right"/>
22
- <remove name="left"/>
23
- <block type="checkout/onepage_shipping_method_available" name="root" output="toHtml" template="tnt/onepage/shipping_method/available.phtml" />
24
- </checkout_onepage_shippingmethod>
25
- </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addItem"><type>skin_js</type><script>js/tnt/jquery_162.js</script></action>
6
+ <action method="addItem"><type>skin_js</type><script>js/tnt/tnt.js</script></action>
7
+ <action method="addItem"><type>skin_js</type><script>js/tnt/jquery.superbox.js</script></action>
8
+ <action method="addItem"><type>skin_css</type><name>css/tnt/tnt.css</name><params/></action>
9
+ <action method="addItem"><type>skin_css</type><name>css/tnt/jquery.superbox.css</name><params/></action>
10
+ </reference>
11
+ </default>
12
+
13
+ <checkout_onepage_index>
14
+ <reference name="checkout.onepage.shipping_method">
15
+ <action method="setTemplate"><template>tnt/onepage/shipping_method.phtml</template></action>
16
+ <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="tnt/onepage/shipping_method/available.phtml" />
17
+ </reference>
18
+ </checkout_onepage_index>
19
+
20
+ <checkout_onepage_shippingmethod>
21
+ <remove name="right"/>
22
+ <remove name="left"/>
23
+ <block type="checkout/onepage_shipping_method_available" name="root" output="toHtml" template="tnt/onepage/shipping_method/available.phtml" />
24
+ </checkout_onepage_shippingmethod>
25
+
26
+ <sales_order_view translate="label">
27
+ <label>Customer My Account Order View</label>
28
+ <!--update handle="customer_account"/-->
29
+ <reference name="my.account.wrapper">
30
+ <block type="sales/order_info" as="info" name="sales.order.info" template="tnt/sales/order/info.phtml"/>
31
+ <block type="sales/order_view" name="sales.order.view" template="tnt/sales/order/view.phtml">
32
+ <block type="sales/order_items" name="order_items" template="sales/order/items.phtml">
33
+ <action method="addItemRender"><type>default</type><block>sales/order_item_renderer_default</block><template>sales/order/items/renderer/default.phtml</template></action>
34
+ <action method="addItemRender"><type>grouped</type><block>sales/order_item_renderer_grouped</block><template>sales/order/items/renderer/default.phtml</template></action>
35
+ <block type="sales/order_totals" name="order_totals" template="sales/order/totals.phtml">
36
+ <action method="setLabelProperties"><value>colspan="4" class="a-right"</value></action>
37
+ <action method="setValueProperties"><value>class="last a-right"</value></action>
38
+ <block type="tax/sales_order_tax" name="tax" template="tax/order/tax.phtml" />
39
+ </block>
40
+ </block>
41
+ </block>
42
+ </reference>
43
+ <reference name="sales.order.info">
44
+ <action method="addLink" translate="label" module="sales"><name>view</name><path></path><label>Order Information</label></action>
45
+ <action method="addLink" translate="label" module="sales"><name>invoice</name><path>*/*/invoice</path><label>Invoices</label></action>
46
+ <action method="addLink" translate="label" module="sales"><name>shipment</name><path>*/*/shipment</path><label>Shipments</label></action>
47
+ <action method="addLink" translate="label" module="sales"><name>creditmemo</name><path>*/*/creditmemo</path><label>Refunds</label></action>
48
+ </reference>
49
+ <block type="core/text_list" name="additional.product.info" translate="label">
50
+ <label>Additional Product Info</label>
51
+ </block>
52
+ </sales_order_view>
53
+ </layout>
app/design/frontend/default/default/template/tnt/form/{failure.phtml → _failure.phtml} RENAMED
File without changes
app/design/frontend/default/default/template/tnt/onepage/shipping_method/available.phtml CHANGED
@@ -1,368 +1,383 @@
1
- <script type="text/javascript">
2
- jQuery(function(){
3
- jQuery.superbox.settings = {
4
- boxId: "superbox",
5
- boxClasses: "",
6
- overlayOpacity: .8,
7
- boxWidth: "700",
8
- boxHeight: "450",
9
- loadTxt: "Chargement ...",
10
- closeTxt: "Fermer",
11
- prevTxt: "Précédent",
12
- nextTxt: "Suivant"
13
- };
14
- jQuery.superbox();
15
- });
16
-
17
- var lastPrice='';
18
- </script>
19
-
20
- <?php if (version_compare(Mage::getVersion(), '1.4.2.0', '<=') or (version_compare(Mage::getVersion(), '1.7.0.0', '>=') and version_compare(Mage::getVersion(), '1.10.0.0', '<'))): ?>
21
-
22
- <?php if (!($_shippingRateGroups = $this->getShippingRates())): ?>
23
- <p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
24
- <?php else: ?>
25
- <dl class="sp-methods">
26
- <?php $_sole = count($_shippingRateGroups) == 1;
27
-
28
- $quote = Mage::getSingleton('checkout/session')->getQuote();
29
-
30
- foreach ($_shippingRateGroups as $code => $_rates): ?>
31
- <dt><?php echo $this->getCarrierName($code) ?></dt>
32
- <dd>
33
- <ul>
34
- <?php $_sole = $_sole && count($_rates) == 1;
35
- foreach ($_rates as $_rate): ?>
36
- <li>
37
- <?php if ($_rate->getErrorMessage()): ?>
38
- <ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
39
- <?php else: ?>
40
- <?php if( preg_match('/tnt_/', $_rate->getCode()) == 0 ) { ?>
41
-
42
- <?php if ($_sole) : ?>
43
- <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
44
- <?php else: ?>
45
- <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" />
46
- <?php endif; ?>
47
- <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
48
- <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
49
- <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
50
- <?php echo $_excl; ?>
51
- <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
52
- (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
53
- <?php endif; ?>
54
- </label>
55
-
56
- <?php } ?>
57
-
58
- <?php //je filtre les envois TNT vers les entreprises si le champ company n'est pas renseigné
59
- if( (($_rate->getCode() == 'tnt_AZ' || $_rate->getCode() == 'tnt_TZ' || $_rate->getCode() == 'tnt_MZ' || $_rate->getCode() == 'tnt_JZ')
60
- && $quote->getShippingAddress()->getCompany() == '')
61
- || (($_rate->getCode() == 'tnt_A' || $_rate->getCode() == 'tnt_T' || $_rate->getCode() == 'tnt_M' || $_rate->getCode() == 'tnt_J')
62
- && $quote->getShippingAddress()->getCompany() != '' )
63
- || $_rate->getCode() == 'tnt_JD' ) { ?>
64
-
65
-
66
- <?php if ($_sole) : ?>
67
- <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
68
- <?php else: ?>
69
- <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" class="radio" onClick="radioCheck()" />
70
- <?php endif; ?>
71
-
72
- <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
73
- <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
74
- <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
75
- <?php echo $_excl; ?>
76
- <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
77
- (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
78
- <?php endif; ?>
79
- </label>
80
- <?php if($_rate->getMethodDescription() != '') {
81
- $tmp_desc = explode('|||', $_rate->getMethodDescription());
82
- } ?>
83
- <div id="tnt_description_<?php echo $_rate->getCode(); ?>" style="display:block;" class="tnt_description">
84
- <img src="<?php echo $this->getSkinUrl("images/tnt/".$tmp_desc['2']); ?>" alt="<?php echo $_rate->getMethodTitle() ?>" style="float:left;margin-right:10px;" />
85
- <span>
86
- <?php echo $tmp_desc['0']; ?>
87
- <?php if( $tmp_desc['1'] != '' ) {
88
- if($_rate->getCode() == 'tnt_J') { ?>
89
- &nbsp;<a href="<?php echo $this->getSkinUrl($tmp_desc['1']); ?>" rel="superbox[image]" class="moreInfos">+ d'infos</a>
90
- <?php } else { ?>
91
- &nbsp;<a href="<?php echo $tmp_desc['1']; ?>" rel="superbox[iframe]" class="moreInfos">+ d'infos</a>
92
- <?php }?>
93
- <?php } ?>
94
- </span>
95
- <div style="clear:both;"></div>
96
- </div>
97
- <?php } ?>
98
-
99
- <?php if($_rate->getCode() == 'tnt_JD') { ?>
100
- <div id="tnt_pr" style="display:none" >
101
- <label>Choisissez le code postal de votre point relais : </label><br /><br />
102
- <div class="input-box">
103
- <input id="relais_zipcode" name="relais_zipcode" type="text" class="input-text required-entry" value="<?php echo $quote->getShippingAddress()->getPostcode(); ?>"/><span class="required">*</span>
104
- </div>
105
- <button class="form-button" onclick="fetchPoint('<?php echo substr(Mage::getUrl('tnt/tnt/index'),0,-1)?>','suggestion') " type="button">
106
- <span>Chercher</span>
107
- </button>
108
- <span id="loadingpointswait" style="display:none;">
109
- <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="" class="v-middle" /> <?php echo $this->__('Chargement des points relais...') ?>
110
- </span>
111
- <div id="suggestion"></div>
112
- </div>
113
- <?php } ?>
114
-
115
- <?php endif ?>
116
- </li>
117
- <?php endforeach; ?>
118
- </ul>
119
- <?php if( preg_match('/TNT/', $this->getCarrierName($code))) {
120
- $telephone = $quote->getShippingAddress()->getTelephone();
121
- $telephone = str_replace(' ', '', $telephone);
122
- $telephone = str_replace('-', '', $telephone);
123
- $telephone = str_replace('.', '', $telephone);
124
- $telephone = str_replace('/', '', $telephone);
125
- $telephone = str_replace('+33', '0', $telephone);
126
-
127
- $style_tel = "block";
128
- if( substr($telephone, 0, 2) == '06' || substr($telephone, 0, 2) == '07' ) {
129
- $style_tel = "none";
130
- } else {
131
- $telephone = '';
132
- } ?>
133
- <div id="tnt_cp" style="display:none" >
134
- <div id="villes"></div>
135
- <div id="comp_domicile" style="display:none">
136
- <span>Pour assurer une livraison dans les meilleures conditions, merci de renseigner les champs ci-dessous qui vous concernent.</span>
137
- <div class="clr-left" style="display:<?php echo $style_tel; ?>;"><label>Téléphone portable :</label> <input type="text" id="portable" name="portable" maxlength="10" value="<?php echo $telephone; ?>" /> <span>Ex : 0602030405</span></div>
138
- <div class="clr-left"><label>Code porte :</label> <input type="text" id="code" name="code" maxlength="10" /><span>Ex : A8120</span></div>
139
- <div class="clr-left"><label>Etage :</label> <input type="text" id="etage" name="etage" maxlength="2" /><span>Ex : 4</span></div>
140
- <div class="clr-left"><label>Bâtiment :</label> <input type="text" id="batiment" name="batiment" maxlength="3" /><span>Ex : B37</span></div>
141
- <div class="clr-left"></div>
142
- </div>
143
- <div id="comp_entreprise" style="display:none">
144
- <span>Pour assurer une livraison dans les meilleures conditions, merci de renseigner les champs ci-dessous qui vous concernent.</span>
145
- <div class="clr-left">
146
- <label>Instruction complémentaire de livraison :</label>
147
- <br />
148
- <textarea rows="3" cols="45" name="compl" id="compl" onkeyup="this.value = this.value.slice(0, 60)" onchange="this.value = this.value.slice(0, 60)"></textarea>
149
- <br />
150
- <span>(60 caractères maximum)<br />
151
- Ex : Déposer le colis au comptoir d'accueil de l'entreprise</span>
152
- </div>
153
- </div>
154
- <div class="input-box">
155
- <input id="address" name="address" type="hidden" value="<?php echo $quote->getShippingAddress()->getStreet(1).' '.$quote->getShippingAddress()->getStreet(2); ?>"/>
156
- <input id="zipcode" name="zipcode" type="hidden" value="<?php echo $quote->getShippingAddress()->getPostcode(); ?>"/>
157
- <input id="city" name="city" type="hidden" value="<?php echo $quote->getShippingAddress()->getCity(); ?>"/>
158
- <input id="company" name="company" type="hidden" value="<?php echo $quote->getShippingAddress()->getcompany(); ?>"/>
159
- <input id="city_url" name="city_url" type="hidden" value="<?php echo substr(Mage::getUrl('tnt/tnt/ville'),0,-1); ?>"/>
160
- </div>
161
- <span id="loadingvilleswait" style="display:none;">
162
- <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="" class="v-middle" /> <?php echo $this->__('Vérification des informations...') ?>
163
- </span>
164
- </div>
165
- <?php } ?>
166
- </dd>
167
- <?php endforeach; ?>
168
- </dl>
169
- <?php endif; ?>
170
-
171
- <?php // Magento >= 1.5 < 1.7?>
172
- <?php else: ?>
173
-
174
- <?php if (!($_shippingRateGroups = $this->getShippingRates())): ?>
175
- <p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
176
- <?php else: ?>
177
- <dl class="sp-methods">
178
- <?php $shippingCodePrice = array(); ?>
179
- <?php $_sole = count($_shippingRateGroups) == 1;
180
-
181
- $quote = Mage::getSingleton('checkout/session')->getQuote();
182
-
183
- foreach ($_shippingRateGroups as $code => $_rates): ?>
184
- <dt><?php echo $this->getCarrierName($code) ?></dt>
185
- <dd>
186
- <ul>
187
- <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
188
- <?php $shippingCodePrice[] = "'".$_rate->getCode()."':".(float)$_rate->getPrice(); ?>
189
- <li>
190
- <?php if ($_rate->getErrorMessage()): ?>
191
- <ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
192
- <?php else: ?>
193
- <?php if( preg_match('/tnt_/', $_rate->getCode()) == 0 ) { ?>
194
-
195
- <?php if ($_sole) : ?>
196
- <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
197
- <?php else: ?>
198
- <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" />
199
-
200
- <?php if ($_rate->getCode() === $this->getAddressShippingMethod()): ?>
201
- <script type="text/javascript">
202
- //<![CDATA[
203
- lastPrice = <?php echo (float)$_rate->getPrice(); ?>;
204
- //]]>
205
- </script>
206
- <?php endif; ?>
207
-
208
- <?php endif; ?>
209
- <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
210
- <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
211
- <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
212
- <?php echo $_excl; ?>
213
- <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
214
- (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
215
- <?php endif; ?>
216
- </label>
217
-
218
- <?php } ?>
219
-
220
- <?php //je filtre les envois TNT vers les entreprises si le champ company n'est pas renseigné
221
- if( (($_rate->getCode() == 'tnt_AZ' || $_rate->getCode() == 'tnt_TZ' || $_rate->getCode() == 'tnt_MZ' || $_rate->getCode() == 'tnt_JZ')
222
- && $quote->getShippingAddress()->getCompany() == '')
223
- || (($_rate->getCode() == 'tnt_A' || $_rate->getCode() == 'tnt_T' || $_rate->getCode() == 'tnt_M' || $_rate->getCode() == 'tnt_J')
224
- && $quote->getShippingAddress()->getCompany() != '' )
225
- || $_rate->getCode() == 'tnt_JD' ) { ?>
226
-
227
-
228
- <?php if ($_sole) : ?>
229
- <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
230
- <?php else: ?>
231
- <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" class="radio" onClick="radioCheck()" />
232
-
233
- <?php if ($_rate->getCode() === $this->getAddressShippingMethod()): ?>
234
- <script type="text/javascript">
235
- //<![CDATA[
236
- lastPrice = <?php echo (float)$_rate->getPrice(); ?>;
237
- //]]>
238
- </script>
239
- <?php endif; ?>
240
-
241
- <?php endif; ?>
242
-
243
- <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
244
- <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
245
- <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
246
- <?php echo $_excl; ?>
247
- <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
248
- (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
249
- <?php endif; ?>
250
- </label>
251
- <?php if($_rate->getMethodDescription() != '') {
252
- $tmp_desc = explode('|||', $_rate->getMethodDescription());
253
- } ?>
254
- <div id="tnt_description_<?php echo $_rate->getCode(); ?>" style="display:block;" class="tnt_description">
255
- <img src="<?php echo $this->getSkinUrl("images/tnt/".$tmp_desc['2']); ?>" alt="<?php echo $_rate->getMethodTitle() ?>" style="float:left;margin-right:10px;" />
256
- <span>
257
- <?php echo $tmp_desc['0']; ?>
258
- <?php if( $tmp_desc['1'] != '' ) {
259
- if($_rate->getCode() == 'tnt_J') { ?>
260
- &nbsp;<a href="<?php echo $this->getSkinUrl($tmp_desc['1']); ?>" rel="superbox[image]" class="moreInfos">+ d'infos</a>
261
- <?php } else { ?>
262
- &nbsp;<a href="<?php echo $tmp_desc['1']; ?>" rel="superbox[iframe]" class="moreInfos">+ d'infos</a>
263
- <?php }?>
264
- <?php } ?>
265
- </span>
266
- <div style="clear:both;"></div>
267
- </div>
268
- <?php } ?>
269
- <?php if($_rate->getCode() == 'tnt_JD') { ?>
270
- <div id="tnt_pr" style="display:none" >
271
- <label>Choisissez le code postal de votre point relais : </label><br /><br />
272
- <div class="input-box">
273
- <input id="relais_zipcode" name="relais_zipcode" type="text" class="input-text required-entry" value="<?php echo $quote->getShippingAddress()->getPostcode(); ?>"/><span class="required">*</span>
274
- </div>
275
- <button class="form-button" onclick="fetchPoint('<?php echo substr(Mage::getUrl('tnt/tnt/index'),0,-1)?>','suggestion') " type="button">
276
- <span>Chercher</span>
277
- </button>
278
- <span id="loadingpointswait" style="display:none;">
279
- <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="" class="v-middle" /> <?php echo $this->__('Chargement des points relais...') ?>
280
- </span>
281
- <div id="suggestion"></div>
282
- </div>
283
- <?php } ?>
284
- <?php endif ?>
285
- </li>
286
- <?php endforeach; ?>
287
- </ul>
288
- <?php if( preg_match('/TNT/', $this->getCarrierName($code))) {
289
- $telephone = $quote->getShippingAddress()->getTelephone();
290
- $telephone = str_replace(' ', '', $telephone);
291
- $telephone = str_replace('-', '', $telephone);
292
- $telephone = str_replace('.', '', $telephone);
293
- $telephone = str_replace('/', '', $telephone);
294
- $telephone = str_replace('+33', '0', $telephone);
295
-
296
- $style_tel = "block";
297
- if( substr($telephone, 0, 2) == '06' || substr($telephone, 0, 2) == '07' ) {
298
- $style_tel = "none";
299
- } else {
300
- $telephone = '';
301
- } ?>
302
- <div id="tnt_cp" style="display:none">
303
- <div id="villes"></div>
304
- <div id="comp_domicile" style="display:none">
305
- <span>Pour assurer une livraison dans les meilleures conditions, merci de renseigner les champs ci-dessous qui vous concernent.</span>
306
- <div class="clr-left" style="display:<?php echo $style_tel; ?>;"><label>Téléphone portable :</label> <input type="text" id="portable" name="portable" maxlength="10" value="<?php echo $telephone; ?>" /> <span>Ex : 0602030405</span></div>
307
- <div class="clr-left"><label>Code porte :</label> <input type="text" id="code" name="code" maxlength="10" /><span>Ex : A8120</span></div>
308
- <div class="clr-left"><label>Etage :</label> <input type="text" id="etage" name="etage" maxlength="2" /><span>Ex : 4</span></div>
309
- <div class="clr-left"><label>Bâtiment :</label> <input type="text" id="batiment" name="batiment" maxlength="3" /><span>Ex : B37</span></div>
310
- <div class="clr-left"></div>
311
- </div>
312
- <div id="comp_entreprise" style="display:none">
313
- <span>Pour assurer une livraison dans les meilleures conditions, merci de renseigner les champs ci-dessous qui vous concernent.</span>
314
- <div class="clr-left">
315
- <label>Instruction complémentaire de livraison :</label>
316
- <br />
317
- <textarea rows="3" cols="45" name="compl" id="compl" onkeyup="this.value = this.value.slice(0, 60)" onchange="this.value = this.value.slice(0, 60)"></textarea>
318
- <br />
319
- <span>(60 caractères maximum)<br />
320
- Ex : Déposer le colis au comptoir d'accueil de l'entreprise</span>
321
- </div>
322
- </div>
323
- <div class="input-box">
324
- <input id="address" name="address" type="hidden" value="<?php echo $quote->getShippingAddress()->getStreet(1).' '.$quote->getShippingAddress()->getStreet(2); ?>"/>
325
- <input id="zipcode" name="zipcode" type="hidden" value="<?php echo $quote->getShippingAddress()->getPostcode(); ?>"/>
326
- <input id="city" name="city" type="hidden" value="<?php echo $quote->getShippingAddress()->getCity(); ?>"/>
327
- <input id="company" name="company" type="hidden" value="<?php echo $quote->getShippingAddress()->getcompany(); ?>"/>
328
- <input id="city_url" name="city_url" type="hidden" value="<?php echo substr(Mage::getUrl('tnt/tnt/ville'),0,-1); ?>"/>
329
- </div>
330
- <span id="loadingvilleswait" style="display:none;">
331
- <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="" class="v-middle" /> <?php echo $this->__('Vérification des informations...') ?>
332
- </span>
333
- </div>
334
- <?php } ?>
335
- </dd>
336
- <?php endforeach; ?>
337
- </dl>
338
- <script type="text/javascript">
339
- //<![CDATA[
340
- <?php if (!empty($shippingCodePrice)): ?>
341
- var shippingCodePrice = {<?php echo implode(',',$shippingCodePrice); ?>};
342
- <?php endif; ?>
343
-
344
- $$('input[type="radio"][name="shipping_method"]').each(function(el){
345
- Event.observe(el, 'click', function(){
346
- if (el.checked == true) {
347
- var getShippingCode = el.getValue();
348
- <?php if (!empty($shippingCodePrice)): ?>
349
- var newPrice = shippingCodePrice[getShippingCode];
350
- if (!lastPrice) {
351
- lastPrice = newPrice;
352
- quoteBaseGrandTotal += newPrice;
353
- }
354
- if (newPrice != lastPrice) {
355
- quoteBaseGrandTotal += (newPrice-lastPrice);
356
- lastPrice = newPrice;
357
- }
358
- <?php endif; ?>
359
- checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
360
- return false;
361
- }
362
- });
363
- });
364
- //]]>
365
- </script>
366
- <?php endif; ?>
367
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
368
  <?php endif; ?>
1
+ <script type="text/javascript">
2
+ jQuery(function(){
3
+ jQuery.superbox.settings = {
4
+ boxId: "superbox",
5
+ boxClasses: "",
6
+ overlayOpacity: 0.8,
7
+ boxWidth: "900",
8
+ boxHeight: "530",
9
+ loadTxt: "Chargement ...",
10
+ closeTxt: "Fermer",
11
+ prevTxt: "Précédent",
12
+ nextTxt: "Suivant"
13
+ };
14
+ jQuery.superbox();
15
+ });
16
+
17
+ function fenetreCent(url,nom,largeur,hauteur,options) {
18
+ var haut=(screen.height-hauteur)/2;
19
+ var Gauche=(screen.width-largeur)/2;
20
+ fencent=window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
21
+ }
22
+
23
+ var lastPrice='';
24
+ </script>
25
+
26
+ <?php if (version_compare(Mage::getVersion(), '1.4.2.0', '<=') or (version_compare(Mage::getVersion(), '1.7.0.0', '>=') and version_compare(Mage::getVersion(), '1.10.0.0', '<'))): ?>
27
+
28
+ <?php if (!($_shippingRateGroups = $this->getShippingRates())): ?>
29
+ <p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
30
+ <?php else: ?>
31
+ <dl class="sp-methods">
32
+ <?php $_sole = count($_shippingRateGroups) == 1;
33
+
34
+ $quote = Mage::getSingleton('checkout/session')->getQuote();
35
+
36
+ foreach ($_shippingRateGroups as $code => $_rates): ?>
37
+ <dt><?php echo $this->getCarrierName($code) ?></dt>
38
+ <dd>
39
+ <ul>
40
+ <?php $_sole = $_sole && count($_rates) == 1;
41
+ foreach ($_rates as $_rate): ?>
42
+ <li>
43
+ <?php if ($_rate->getErrorMessage()): ?>
44
+ <ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
45
+ <?php else: ?>
46
+ <?php if( preg_match('/tnt_/', $_rate->getCode()) == 0 ) { ?>
47
+
48
+ <?php if ($_sole) : ?>
49
+ <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
50
+ <?php else: ?>
51
+ <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" />
52
+ <?php endif; ?>
53
+ <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
54
+ <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
55
+ <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
56
+ <?php echo $_excl; ?>
57
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
58
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
59
+ <?php endif; ?>
60
+ </label>
61
+
62
+ <?php } ?>
63
+
64
+ <?php //je filtre les envois TNT vers les entreprises si le champ company n'est pas renseigné
65
+ if( (($_rate->getCode() == 'tnt_AZ' || $_rate->getCode() == 'tnt_TZ' || $_rate->getCode() == 'tnt_MZ' || $_rate->getCode() == 'tnt_JZ')
66
+ && $quote->getShippingAddress()->getCompany() == '')
67
+ || (($_rate->getCode() == 'tnt_A' || $_rate->getCode() == 'tnt_T' || $_rate->getCode() == 'tnt_M' || $_rate->getCode() == 'tnt_J')
68
+ && $quote->getShippingAddress()->getCompany() != '' )
69
+ || $_rate->getCode() == 'tnt_JD' ) { ?>
70
+
71
+
72
+ <?php if ($_sole) : ?>
73
+ <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
74
+ <?php else: ?>
75
+ <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" class="radio" onClick="radioCheck()" />
76
+ <?php endif; ?>
77
+
78
+ <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
79
+ <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
80
+ <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
81
+ <?php echo $_excl; ?>
82
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
83
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
84
+ <?php endif; ?>
85
+ </label>
86
+ <?php if($_rate->getMethodDescription() != '') {
87
+ $tmp_desc = explode('|||', $_rate->getMethodDescription());
88
+ } ?>
89
+ <div id="tnt_description_<?php echo $_rate->getCode(); ?>" style="display:block;" class="tnt_description">
90
+ <img src="<?php echo $this->getSkinUrl("images/tnt/".$tmp_desc['2']); ?>" alt="<?php echo $_rate->getMethodTitle() ?>" style="float:left;margin-right:10px;" />
91
+ <span>
92
+ <?php echo $tmp_desc['0']; ?>
93
+ <?php if( $tmp_desc['1'] != '' ) {
94
+ if($_rate->getCode() == 'tnt_J') { ?>
95
+ &nbsp;<a href="<?php echo $this->getSkinUrl($tmp_desc['1']); ?>" rel="superbox[image]" class="moreInfos">+ d'infos</a>
96
+ <?php } else { ?>
97
+ &nbsp;<a href="<?php echo $tmp_desc['1']; ?>" rel="superbox[iframe]" class="moreInfos">+ d'infos</a>
98
+ <?php }?>
99
+ <?php } ?>
100
+ </span>
101
+ <div style="clear:both;"></div>
102
+ </div>
103
+ <?php } ?>
104
+
105
+ <?php if($_rate->getCode() == 'tnt_JD') { ?>
106
+ <input name="tnt_relais" type="hidden" id="tnt_relais1" class="radio" value="" />
107
+ <div id="tnt_pr" style="display:none">
108
+ <?php if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
109
+ if (intval(substr($_SERVER['HTTP_USER_AGENT'], strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')+5)) <= 8) { ?>
110
+ <a href="javascript:fenetreCent('<?php echo Mage::getBaseUrl ('skin'); ?>/frontend/default/default/tnt_relaisColis.php?cp=<?php echo $quote->getShippingAddress()->getPostcode(); ?>', 'popup_tnt' ,'900', '530','scrollbars=no,location:no,menubar=no,status=no,resizable=no');" onclick="javascript:fenetreCent('<?php echo Mage::getBaseUrl ('skin'); ?>/frontend/default/default/tnt_relaisColis.php?cp=<?php echo $quote->getShippingAddress()->getPostcode(); ?>', 'popup_tnt' ,'900', '530','scrollbars=no,location:no,menubar=no,status=no,resizable=no');" id="openRelais">Choisissez votre Relais Colis®</a>
111
+ <?php } else { ?>
112
+ <a href="<?php echo Mage::getBaseUrl ('skin'); ?>/frontend/default/default/tnt_relaisColis.php?cp=<?php echo $quote->getShippingAddress()->getPostcode(); ?>" rel="superbox[iframe]" id="openRelais">Choisissez votre Relais Colis®</a>
113
+ <?php }
114
+ } else { ?>
115
+ <a href="<?php echo Mage::getBaseUrl ('skin'); ?>/frontend/default/default/tnt_relaisColis.php?cp=<?php echo $quote->getShippingAddress()->getPostcode(); ?>" rel="superbox[iframe]" id="openRelais">Choisissez votre Relais Colis®</a>
116
+ <?php } ?>
117
+ </div>
118
+ <div id="tnt_pr_choix" style="display:none"></div>
119
+ <?php } ?>
120
+
121
+ <?php endif ?>
122
+ </li>
123
+ <?php endforeach; ?>
124
+ </ul>
125
+ <?php if( preg_match('/TNT/', $this->getCarrierName($code))) {
126
+ $telephone = $quote->getShippingAddress()->getTelephone();
127
+ $telephone = str_replace(' ', '', $telephone);
128
+ $telephone = str_replace('-', '', $telephone);
129
+ $telephone = str_replace('.', '', $telephone);
130
+ $telephone = str_replace('/', '', $telephone);
131
+ $telephone = str_replace('+33', '0', $telephone);
132
+
133
+ $style_tel = "block";
134
+ if( substr($telephone, 0, 2) == '06' || substr($telephone, 0, 2) == '07' ) {
135
+ $style_tel = "none";
136
+ } else {
137
+ $telephone = '';
138
+ } ?>
139
+ <div id="tnt_cp" style="display:none" >
140
+ <div id="villes"></div>
141
+ <div id="comp_domicile" style="display:none">
142
+ <span>Pour assurer une livraison dans les meilleures conditions, merci de renseigner les champs ci-dessous qui vous concernent.</span>
143
+ <div class="clr-left" style="display:<?php echo $style_tel; ?>;"><label>Téléphone portable :</label> <input type="text" id="portable" name="portable" maxlength="10" value="<?php echo $telephone; ?>" /> <span>Ex : 0602030405</span></div>
144
+ <div class="clr-left"><label>Code porte :</label> <input type="text" id="code" name="code" maxlength="7" /><span>Ex : A8120</span></div>
145
+ <div class="clr-left"><label>Etage :</label> <input type="text" id="etage" name="etage" maxlength="2" /><span>Ex : 4</span></div>
146
+ <div class="clr-left"><label>Bâtiment :</label> <input type="text" id="batiment" name="batiment" maxlength="3" /><span>Ex : B37</span></div>
147
+ <div class="clr-left"></div>
148
+ </div>
149
+ <div id="comp_entreprise" style="display:none">
150
+ <span>Pour assurer une livraison dans les meilleures conditions, merci de renseigner les champs ci-dessous qui vous concernent.</span>
151
+ <div class="clr-left">
152
+ <label>Instruction complémentaire de livraison :</label>
153
+ <br />
154
+ <textarea rows="3" cols="45" name="compl" id="compl" onkeyup="this.value = this.value.slice(0, 60)" onchange="this.value = this.value.slice(0, 60)"></textarea>
155
+ <br />
156
+ <span>(60 caractères maximum)<br />
157
+ Ex : Déposer le colis au comptoir d'accueil de l'entreprise</span>
158
+ </div>
159
+ </div>
160
+ <div class="input-box">
161
+ <input id="street" name="street" type="hidden" value="<?php echo $quote->getShippingAddress()->getStreetFull(); ?>"/>
162
+ <input id="zipcode" name="zipcode" type="hidden" value="<?php echo $quote->getShippingAddress()->getPostcode(); ?>"/>
163
+ <input id="city" name="city" type="hidden" value="<?php echo $quote->getShippingAddress()->getCity(); ?>"/>
164
+ <input id="company" name="company" type="hidden" value="<?php echo $quote->getShippingAddress()->getcompany(); ?>"/>
165
+ <input id="city_url" name="city_url" type="hidden" value="<?php echo substr(Mage::getUrl('tnt/tnt/ville'),0,-1); ?>"/>
166
+ </div>
167
+ <span id="loadingvilleswait" style="display:none;">
168
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="" class="v-middle" /> <?php echo $this->__('Vérification des informations...') ?>
169
+ </span>
170
+ </div>
171
+ <?php } ?>
172
+ </dd>
173
+ <?php endforeach; ?>
174
+ </dl>
175
+ <?php endif; ?>
176
+
177
+ <?php // Magento >= 1.5 < 1.7?>
178
+ <?php else: ?>
179
+
180
+ <?php if (!($_shippingRateGroups = $this->getShippingRates())): ?>
181
+ <p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
182
+ <?php else: ?>
183
+ <dl class="sp-methods">
184
+ <?php $shippingCodePrice = array(); ?>
185
+ <?php $_sole = count($_shippingRateGroups) == 1;
186
+
187
+ $quote = Mage::getSingleton('checkout/session')->getQuote();
188
+
189
+ foreach ($_shippingRateGroups as $code => $_rates): ?>
190
+ <dt><?php echo $this->getCarrierName($code) ?></dt>
191
+ <dd>
192
+ <ul>
193
+ <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
194
+ <?php $shippingCodePrice[] = "'".$_rate->getCode()."':".(float)$_rate->getPrice(); ?>
195
+ <li>
196
+ <?php if ($_rate->getErrorMessage()): ?>
197
+ <ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
198
+ <?php else: ?>
199
+ <?php if( preg_match('/tnt_/', $_rate->getCode()) == 0 ) { ?>
200
+
201
+ <?php if ($_sole) : ?>
202
+ <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
203
+ <?php else: ?>
204
+ <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" />
205
+
206
+ <?php if ($_rate->getCode() === $this->getAddressShippingMethod()): ?>
207
+ <script type="text/javascript">
208
+ //<![CDATA[
209
+ lastPrice = <?php echo (float)$_rate->getPrice(); ?>;
210
+ //]]>
211
+ </script>
212
+ <?php endif; ?>
213
+
214
+ <?php endif; ?>
215
+ <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
216
+ <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
217
+ <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
218
+ <?php echo $_excl; ?>
219
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
220
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
221
+ <?php endif; ?>
222
+ </label>
223
+
224
+ <?php } ?>
225
+
226
+ <?php //je filtre les envois TNT vers les entreprises si le champ company n'est pas renseigné
227
+ if( (($_rate->getCode() == 'tnt_AZ' || $_rate->getCode() == 'tnt_TZ' || $_rate->getCode() == 'tnt_MZ' || $_rate->getCode() == 'tnt_JZ')
228
+ && $quote->getShippingAddress()->getCompany() == '')
229
+ || (($_rate->getCode() == 'tnt_A' || $_rate->getCode() == 'tnt_T' || $_rate->getCode() == 'tnt_M' || $_rate->getCode() == 'tnt_J')
230
+ && $quote->getShippingAddress()->getCompany() != '' )
231
+ || $_rate->getCode() == 'tnt_JD' ) { ?>
232
+
233
+
234
+ <?php if ($_sole) : ?>
235
+ <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
236
+ <?php else: ?>
237
+ <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" class="radio" onClick="radioCheck()" />
238
+
239
+ <?php if ($_rate->getCode() === $this->getAddressShippingMethod()): ?>
240
+ <script type="text/javascript">
241
+ //<![CDATA[
242
+ lastPrice = <?php echo (float)$_rate->getPrice(); ?>;
243
+ //]]>
244
+ </script>
245
+ <?php endif; ?>
246
+
247
+ <?php endif; ?>
248
+
249
+ <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
250
+ <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
251
+ <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
252
+ <?php echo $_excl; ?>
253
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
254
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
255
+ <?php endif; ?>
256
+ </label>
257
+ <?php if($_rate->getMethodDescription() != '') {
258
+ $tmp_desc = explode('|||', $_rate->getMethodDescription());
259
+ } ?>
260
+ <div id="tnt_description_<?php echo $_rate->getCode(); ?>" style="display:block;" class="tnt_description">
261
+ <img src="<?php echo $this->getSkinUrl("images/tnt/".$tmp_desc['2']); ?>" alt="<?php echo $_rate->getMethodTitle() ?>" style="float:left;margin-right:10px;" />
262
+ <span>
263
+ <?php echo $tmp_desc['0']; ?>
264
+ <?php if( $tmp_desc['1'] != '' ) {
265
+ if($_rate->getCode() == 'tnt_J') { ?>
266
+ &nbsp;<a href="<?php echo $this->getSkinUrl($tmp_desc['1']); ?>" rel="superbox[image]" class="moreInfos">+ d'infos</a>
267
+ <?php } else { ?>
268
+ &nbsp;<a href="<?php echo $tmp_desc['1']; ?>" rel="superbox[iframe]" class="moreInfos">+ d'infos</a>
269
+ <?php }?>
270
+ <?php } ?>
271
+ </span>
272
+ <div style="clear:both;"></div>
273
+ </div>
274
+ <?php } ?>
275
+ <?php if($_rate->getCode() == 'tnt_JD') { ?>
276
+ <input name="tnt_relais" type="hidden" id="tnt_relais1" class="radio" value="" />
277
+ <div id="tnt_pr" style="display:none">
278
+ <?php if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
279
+ if (intval(substr($_SERVER['HTTP_USER_AGENT'], strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')+5)) <= 8) { ?>
280
+ <a href="javascript:fenetreCent('<?php echo Mage::getBaseUrl ('skin'); ?>/frontend/default/default/tnt_relaisColis.php?cp=<?php echo $quote->getShippingAddress()->getPostcode(); ?>', 'popup_tnt' ,'900', '530','scrollbars=no,location:no,menubar=no,status=no,resizable=no');" onclick="javascript:fenetreCent('<?php echo Mage::getBaseUrl ('skin'); ?>/frontend/default/default/tnt_relaisColis.php?cp=<?php echo $quote->getShippingAddress()->getPostcode(); ?>', 'popup_tnt' ,'900', '530','scrollbars=no,location:no,menubar=no,status=no,resizable=no');" id="openRelais">Choisissez votre Relais Colis®</a>
281
+ <?php } else { ?>
282
+ <a href="<?php echo Mage::getBaseUrl ('skin'); ?>/frontend/default/default/tnt_relaisColis.php?cp=<?php echo $quote->getShippingAddress()->getPostcode(); ?>" rel="superbox[iframe]" id="openRelais">Choisissez votre Relais Colis®</a>
283
+ <?php }
284
+ } else { ?>
285
+ <a href="<?php echo Mage::getBaseUrl ('skin'); ?>/frontend/default/default/tnt_relaisColis.php?cp=<?php echo $quote->getShippingAddress()->getPostcode(); ?>" rel="superbox[iframe]" id="openRelais">Choisissez votre Relais Colis®</a>
286
+ <?php } ?>
287
+
288
+ </div>
289
+ <div id="tnt_pr_choix" style="display:none;"></div>
290
+ <?php } ?>
291
+ <?php endif ?>
292
+ </li>
293
+ <?php endforeach; ?>
294
+ </ul>
295
+ <?php if( preg_match('/TNT/', $this->getCarrierName($code))) {
296
+ $telephone = $quote->getShippingAddress()->getTelephone();
297
+ $telephone = str_replace(' ', '', $telephone);
298
+ $telephone = str_replace('-', '', $telephone);
299
+ $telephone = str_replace('.', '', $telephone);
300
+ $telephone = str_replace('/', '', $telephone);
301
+ $telephone = str_replace('+33', '0', $telephone);
302
+
303
+ $style_tel = "block";
304
+ if( substr($telephone, 0, 2) == '06' || substr($telephone, 0, 2) == '07' ) {
305
+ $style_tel = "none";
306
+ } else {
307
+ $telephone = '';
308
+ } ?>
309
+ <div id="tnt_cp" style="display:none">
310
+ <div id="villes"></div>
311
+ <div id="comp_domicile" style="display:none">
312
+ <span>Pour assurer une livraison dans les meilleures conditions, merci de renseigner les champs ci-dessous qui vous concernent.</span>
313
+ <div class="clr-left" style="display:<?php echo $style_tel; ?>;"><label>Téléphone portable :</label> <input type="text" id="portable" name="portable" maxlength="10" value="<?php echo $telephone; ?>" /> <span>Ex : 0602030405</span></div>
314
+ <div class="clr-left"><label>Code porte :</label> <input type="text" id="code" name="code" maxlength="7" /><span>Ex : A8120</span></div>
315
+ <div class="clr-left"><label>Etage :</label> <input type="text" id="etage" name="etage" maxlength="2" /><span>Ex : 4</span></div>
316
+ <div class="clr-left"><label>Bâtiment :</label> <input type="text" id="batiment" name="batiment" maxlength="3" /><span>Ex : B37</span></div>
317
+ <div class="clr-left"></div>
318
+ </div>
319
+ <div id="comp_entreprise" style="display:none">
320
+ <span>Pour assurer une livraison dans les meilleures conditions, merci de renseigner les champs ci-dessous qui vous concernent.</span>
321
+ <div class="clr-left">
322
+ <label>Instruction complémentaire de livraison :</label>
323
+ <br />
324
+ <textarea rows="3" cols="45" name="compl" id="compl" onkeyup="this.value = this.value.slice(0, 60)" onchange="this.value = this.value.slice(0, 60)"></textarea>
325
+ <br />
326
+ <span>(60 caractères maximum)<br />
327
+ Ex : Déposer le colis au comptoir d'accueil de l'entreprise</span>
328
+ </div>
329
+ </div>
330
+ <div class="input-box">
331
+ <input id="street" name="street" type="hidden" value="<?php echo $quote->getShippingAddress()->getStreetFull(); ?>"/>
332
+ <input id="zipcode" name="zipcode" type="hidden" value="<?php echo $quote->getShippingAddress()->getPostcode(); ?>"/>
333
+ <input id="city" name="city" type="hidden" value="<?php echo $quote->getShippingAddress()->getCity(); ?>"/>
334
+ <input id="company" name="company" type="hidden" value="<?php echo $quote->getShippingAddress()->getcompany(); ?>"/>
335
+ <input id="city_url" name="city_url" type="hidden" value="<?php echo substr(Mage::getUrl('tnt/tnt/ville'),0,-1); ?>"/>
336
+ </div>
337
+ <span id="loadingvilleswait" style="display:none;">
338
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="" class="v-middle" /> <?php echo $this->__('Vérification des informations...') ?>
339
+ </span>
340
+ </div>
341
+ <?php } ?>
342
+ </dd>
343
+ <?php endforeach; ?>
344
+ </dl>
345
+ <script type="text/javascript">
346
+ //<![CDATA[
347
+ <?php if (!empty($shippingCodePrice)): ?>
348
+ var shippingCodePrice = {<?php echo implode(',',$shippingCodePrice); ?>};
349
+ <?php endif; ?>
350
+
351
+ $$('input[type="radio"][name="shipping_method"]').each(function(el){
352
+ Event.observe(el, 'click', function(){
353
+ if (el.checked == true) {
354
+ var getShippingCode = el.getValue();
355
+ <?php if (!empty($shippingCodePrice)): ?>
356
+ var newPrice = shippingCodePrice[getShippingCode];
357
+ if (typeof lastPrice === 'undefined') {
358
+ lastPrice = newPrice;
359
+ if(typeof quoteBaseGrandTotal === 'undefined') {
360
+ quoteBaseGrandTotal = newPrice;
361
+ } else {
362
+ quoteBaseGrandTotal += newPrice;
363
+ }
364
+ }
365
+ if (newPrice != lastPrice) {
366
+ if(typeof quoteBaseGrandTotal === 'undefined') {
367
+ quoteBaseGrandTotal = (newPrice-lastPrice);
368
+ } else {
369
+ quoteBaseGrandTotal += (newPrice-lastPrice);
370
+ }
371
+ lastPrice = newPrice;
372
+ }
373
+ <?php endif; ?>
374
+ checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
375
+ return false;
376
+ }
377
+ });
378
+ });
379
+ //]]>
380
+ </script>
381
+ <?php endif; ?>
382
+
383
  <?php endif; ?>
app/design/frontend/default/default/template/tnt/sales/order/info.phtml ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_order = $this->getOrder(); ?>
28
+
29
+ <?php //commande non TNT
30
+ if( preg_match('/^tnt_/',$_order->getShippingMethod()) == 0 ) { ?>
31
+
32
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
33
+ <div class="page-title title-buttons">
34
+ <h1><?php echo $this->__('Order #%s - %s', $_order->getRealOrderId(), $_order->getStatusLabel()) ?></h1>
35
+ <?php if($this->helper('rss/order')->isStatusNotificationAllow()): ?>
36
+ <a href="<?php echo $this->helper('rss/order')->getStatusHistoryRssUrl($_order) ?>" class="link-rss"><?php echo $this->__('Subscribe to Order Status') ?></a>
37
+ <span class="separator">|</span>
38
+ <?php endif; ?>
39
+ <?php if ($this->helper('sales/reorder')->canReorder($_order)) : ?>
40
+ <a href="<?php echo $this->getReorderUrl($_order) ?>" class="link-reorder"><?php echo $this->__('Reorder') ?></a>
41
+ <span class="separator">|</span>
42
+ <?php endif ?>
43
+ <a href="<?php echo $this->getPrintUrl($_order) ?>" class="link-print" onclick="this.target='_blank';"><?php echo $this->__('Print Order') ?></a>
44
+ </div>
45
+ <?php echo $this->getStatusHistoryRssUrl($_order) ?>
46
+ <dl class="order-info">
47
+ <dt><?php echo $this->__('About This Order:') ?></dt>
48
+ <dd>
49
+ <?php $_links = $this->getLinks(); ?>
50
+ <ul id="order-info-tabs">
51
+ <?php foreach ($_links as $_link): ?>
52
+ <?php if($_link->getUrl()): ?>
53
+ <li><a href="<?php echo $_link->getUrl() ?>"><?php echo $_link->getLabel() ?></a></li>
54
+ <?php else: ?>
55
+ <li class="current"><?php echo $_link->getLabel() ?></li>
56
+ <?php endif; ?>
57
+ <?php endforeach; ?>
58
+ </ul>
59
+ <script type="text/javascript">decorateGeneric($('order-info-tabs').select('LI'),['first','last']);</script>
60
+ </dd>
61
+ </dl>
62
+ <p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?></p>
63
+ <?php if (!$_order->getIsVirtual()): ?>
64
+ <div class="col2-set order-info-box">
65
+ <div class="col-1">
66
+ <div class="box">
67
+ <div class="box-title">
68
+ <h2><?php echo $this->__('Shipping Address') ?></h2>
69
+ </div>
70
+ <div class="box-content">
71
+ <address><?php echo $_order->getShippingAddress()->format('html') ?></address>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ <div class="col-2">
76
+ <div class="box">
77
+ <div class="box-title">
78
+ <h2><?php echo $this->__('Shipping Method') ?><?php /* | <a href="#"><?php echo $this->__('Track Order') ?></a>*/ ?></h2>
79
+ </div>
80
+ <div class="box-content">
81
+ <?php if ($_order->getShippingDescription()): ?>
82
+ <?php echo $_order->getShippingDescription() ?>
83
+ <?php else: ?>
84
+ <p><?php echo $this->helper('sales')->__('No shipping information available'); ?></p>
85
+ <?php endif; ?>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ <?php endif; ?>
91
+ <div class="col2-set order-info-box">
92
+ <div class="col-1">
93
+ <div class="box">
94
+ <div class="box-title">
95
+ <h2><?php echo $this->__('Billing Address') ?></h2>
96
+ </div>
97
+ <div class="box-content">
98
+ <address><?php echo $_order->getBillingAddress()->format('html') ?></address>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ <div class="col-2">
103
+ <div class="box box-payment">
104
+ <div class="box-title">
105
+ <h2><?php echo $this->__('Payment Method') ?></h2>
106
+ </div>
107
+ <div class="box-content">
108
+ <?php echo $this->getPaymentInfoHtml() ?>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </div>
113
+
114
+ <?php } else { //commande tnt ?>
115
+
116
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
117
+ <div class="page-title title-buttons">
118
+ <h1><?php echo $this->__('Order #%s - %s', $_order->getRealOrderId(), $_order->getStatusLabel()) ?></h1>
119
+ <?php if($this->helper('rss/order')->isStatusNotificationAllow()): ?>
120
+ <a href="<?php echo $this->helper('rss/order')->getStatusHistoryRssUrl($_order) ?>" class="link-rss"><?php echo $this->__('Subscribe to Order Status') ?></a>
121
+ <span class="separator">|</span>
122
+ <?php endif; ?>
123
+ <?php if ($this->helper('sales/reorder')->canReorder($_order)) : ?>
124
+ <a href="<?php echo $this->getReorderUrl($_order) ?>" class="link-reorder"><?php echo $this->__('Reorder') ?></a>
125
+ <span class="separator">|</span>
126
+ <?php endif ?>
127
+ <a href="<?php echo $this->getPrintUrl($_order) ?>" class="link-print" onclick="this.target='_blank';"><?php echo $this->__('Print Order') ?></a>
128
+ </div>
129
+
130
+ <?php echo $this->getStatusHistoryRssUrl($_order) ?>
131
+
132
+ <p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?></p>
133
+ <?php if (!$_order->getIsVirtual()): ?>
134
+ <div class="col2-set order-info-box">
135
+ <div class="col-1">
136
+ <div class="box">
137
+ <div class="box-title">
138
+ <h2><?php echo $this->__('Shipping Address') ?></h2>
139
+ </div>
140
+ <div class="box-content">
141
+ <address><?php echo $_order->getShippingAddress()->format('html') ?></address>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ <div class="col-2">
146
+ <div class="box">
147
+ <div class="box-title">
148
+ <h2><?php echo $this->__('Shipping Method') ?></h2>
149
+ </div>
150
+ <div class="box-content">
151
+ <?php if ($_order->getShippingDescription()): ?>
152
+ <?php echo $_order->getShippingDescription() ?>
153
+ <?php else: ?>
154
+ <p><?php echo $this->helper('sales')->__('No shipping information available'); ?></p>
155
+ <?php endif; ?>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ <?php endif; ?>
161
+ <div class="col2-set order-info-box">
162
+ <div class="col-1">
163
+ <div class="box">
164
+ <div class="box-title">
165
+ <h2><?php echo $this->__('Billing Address') ?></h2>
166
+ </div>
167
+ <div class="box-content">
168
+ <address><?php echo $_order->getBillingAddress()->format('html') ?></address>
169
+ </div>
170
+ </div>
171
+ </div>
172
+ <div class="col-2">
173
+ <div class="box box-payment">
174
+ <div class="box-title">
175
+ <h2><?php echo $this->__('Payment Method') ?></h2>
176
+ </div>
177
+ <div class="box-content">
178
+ <?php echo $this->getPaymentInfoHtml() ?>
179
+ </div>
180
+ </div>
181
+ </div>
182
+ </div>
183
+ <?php } ?>
app/design/frontend/default/default/template/tnt/sales/order/view.phtml ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="order-items order-details">
28
+ <?php if ($this->helper('giftmessage/message')->getIsMessagesAvailable('items', $this->getOrder())): ?>
29
+ <script type="text/javascript">
30
+ //<![CDATA[
31
+ function giftMessageToogle(giftMessageIdentifier)
32
+ {
33
+ var link = $('order-item-gift-message-link-'+giftMessageIdentifier);
34
+ var container = $('order-item-gift-message-'+giftMessageIdentifier);
35
+ var row = $('order-item-row-'+giftMessageIdentifier);
36
+ if(link.expanded) {
37
+ link.expanded = false;
38
+ link.removeClassName('expanded');
39
+ if(container.hasClassName('last')) {
40
+ row.addClassName('last');
41
+ }
42
+ container.hide();
43
+ } else {
44
+ link.expanded = true;
45
+ link.addClassName('expanded');
46
+ if(container.hasClassName('last')) {
47
+ row.removeClassName('last');
48
+ }
49
+ container.show();
50
+ }
51
+
52
+ return false;
53
+ }
54
+ //]]>
55
+ </script>
56
+ <?php endif; ?>
57
+ <?php $_order = $this->getOrder(); ?>
58
+ <h2 class="table-caption"><?php echo $this->__('Items Ordered') ?>
59
+ <?php if ($_order->getTracksCollection()->count()) : ?>
60
+ <?php if( preg_match('/tnt_/',$_order->getShippingMethod()) == 0 ) { //commande non TNT ?>
61
+ <span class="separator">|</span> <a href="#" onclick="popWin('<?php echo $this->helper('shipping')->getTrackingPopupUrlBySalesModel($_order) ?>','trackorder','top=0,left=0,width=800,height=600,resizable=yes,scrollbars=yes'); return false;" title="<?php echo $this->__('Track your order') ?>"><?php echo $this->__('Track your order') ?></a>
62
+ <?php } ?>
63
+ <?php endif; ?>
64
+ </h2>
65
+
66
+ <?php echo $this->getChildHtml('order_items') ?>
67
+
68
+ <?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order', $_order) && $_order->getGiftMessageId()): ?>
69
+ <div class="order-additional order-gift-message">
70
+ <h2 class="sub-title"><?php echo $this->__('Gift Message for This Order') ?></h2>
71
+ <?php $_giftMessage=$this->helper('giftmessage/message')->getGiftMessageForEntity($_order); ?>
72
+ <dl class="gift-message">
73
+ <dt><strong><?php echo $this->__('From:') ?></strong> <?php echo $this->htmlEscape($_giftMessage->getSender()) ?></dt>
74
+ <dt><strong><?php echo $this->__('To:') ?></strong> <?php echo $this->htmlEscape($_giftMessage->getRecipient()) ?></dt>
75
+ <dd><?php echo $this->helper('giftmessage/message')->getEscapedGiftMessage($_order) ?></dd>
76
+ </dl>
77
+ </div>
78
+ <?php endif; ?>
79
+ <?php $_history = $this->getOrder()->getVisibleStatusHistory() ?>
80
+ <?php if (count($_history)): ?>
81
+ <div class="order-additional order-comments">
82
+ <h2 class="sub-title"><?php echo $this->__('About Your Order') ?></h2>
83
+ <dl class="order-about">
84
+ <?php foreach ($_history as $_historyItem): ?>
85
+ <dt><?php echo $this->formatDate($_historyItem->getCreatedAtStoreDate(), 'medium', true) ?></dt>
86
+ <dd><?php echo $this->escapeHtml($_historyItem->getComment()) ?></dd>
87
+ <?php endforeach; ?>
88
+ </dl>
89
+ </div>
90
+ <?php endif; ?>
91
+
92
+
93
+ <?php if( preg_match('/^tnt_/',$_order->getShippingMethod()) != 0 ) { //commande TNT ?>
94
+
95
+ <p class="order-links"></p>
96
+
97
+ <?php foreach ($_order->getShipmentsCollection() as $_shipment): ?>
98
+ <h2 class="sub-title"><?php echo $this->__('Shipment #') ?><?php echo $_shipment->getIncrementId(); ?> <span class="separator">|</span> <a href="<?php echo $this->getPrintShipmentUrl($_shipment) ?>" onclick="this.target='_blank'" class="link-print"><?php echo $this->__('Print Shipment') ?></a></h2>
99
+ <?php $tracks = $_shipment->getTracksCollection(); ?>
100
+ <?php if ($tracks->count()): ?>
101
+ <table class="data-table tracking-table" id="my-tracking-table-<?php echo $_shipment->getId(); ?>">
102
+ <tbody>
103
+ <tr>
104
+ <th class="label">Cliquez sur le(s) numéro(s) de suivi pour suivre vos colis :</th>
105
+ <td>&nbsp;
106
+ <?php
107
+ $i = 1;
108
+ $_size = $tracks->count();
109
+ foreach($tracks as $track): ?>
110
+ <?php if($track->isCustom()): ?>
111
+ <?php echo $track->getNumber() ?>
112
+ <?php else: ?>
113
+ <a href="<?php echo Mage::getBaseUrl ('skin'); ?>/frontend/default/default/tnt_suiviColis.php?suivi=<?php echo $track->getNumber() ?>" rel="superbox[iframe]"><?php echo $track->getNumber() ?></a>
114
+ <?php endif; ?>
115
+ <?php if($i!=$_size): ?>, <?php endif; ?>
116
+ <?php $i++;
117
+ endforeach; ?>
118
+ </td>
119
+ </tr>
120
+ </tbody>
121
+ </table>
122
+ <script type="text/javascript">decorateTable('my-tracking-table-<?php echo $_shipment->getId(); ?>')</script>
123
+ <?php endif; ?>
124
+ <script type="text/javascript">decorateTable('my-shipment-table-<?php echo $_shipment->getId(); ?>', {'tbody' : ['odd', 'even'], 'tbody tr' : ['first', 'last']})</script>
125
+ <?php echo $this->getCommentsHtml($_shipment)?>
126
+ <?php endforeach; ?>
127
+ <?php } ?>
128
+
129
+ <script type="text/javascript">
130
+ jQuery(function(){
131
+ jQuery.superbox.settings = {
132
+ boxId: "superbox",
133
+ boxClasses: "",
134
+ overlayOpacity: .8,
135
+ boxWidth: "600",
136
+ boxHeight: "600",
137
+ loadTxt: "Chargement ...",
138
+ closeTxt: "Fermer"
139
+ };
140
+ jQuery.superbox();
141
+ });
142
+ </script>
143
+
144
+
145
+ <div class="buttons-set">
146
+ <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to My Orders') ?></a></p>
147
+ </div>
148
+ </div>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TNT_Express_Fr</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -9,10 +9,10 @@
9
  <summary>Extension officielle vous permettant de proposer les services TNT &#xE0; vos clients.</summary>
10
  <description>Extension officielle vous permettant de proposer les services TNT &#xE0; vos clients.</description>
11
  <notes>Extension officielle vous permettant de proposer les services TNT &#xE0; vos clients.</notes>
12
- <authors><author><name>Infostrates</name><user>auto-converted</user><email>magento@infostrates.fr</email></author></authors>
13
- <date>2011-11-07</date>
14
- <time>13:38:32</time>
15
- <contents><target name="mage"><dir name="js"><dir name="tnt"><file name="jquery_162.js" hash="8752b76fb981b68e7283ef4341a1c29a"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="tnt"><dir name="images"><file name="calendar.gif" hash="b1468e5239504974c689eea5d93f86d4"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="tnt"><file name="jquery.superbox.css" hash="abe8def38710a3d6d9170fd476ff6171"/><file name="tnt.css" hash="67f22a7c1b553e1a72bdb9e14435652a"/></dir></dir><dir name="images"><dir name="tnt"><dir name="old"><file name="_24h_entreprise.png" hash="89e67ecb86671bd1f7b8d8386f38523a"/><file name="tnt_j.png" hash="bef92c96f478f8a172e5bf89f45675c2"/><file name="tnt_jd.png" hash="c5c58a007c17b36b9688eceb6375b6c4"/><file name="tnt_jz.png" hash="c52e691241670692f2642f41d0dbba51"/></dir><file name="24h_entreprise.jpg" hash="249ace5ffbe19eec2f31c219d9493e38"/><file name="tnt_j.png" hash="2a11f2e71231a05d86d5031ca81f17a1"/><file name="tnt_jd.png" hash="2b5725dacd06a08a2055884fbd9b2397"/><file name="tnt_jz.png" hash="2bd28bb1b58294f4d84aa0e5d058b66a"/><file name="tnt_sure_we_can.png" hash="6e609b1dfea22cc59b5f1699857cbc58"/><file name="tnt_t.png" hash="58348232c798883b70d008b98da8d0ec"/></dir></dir><dir name="js"><dir name="tnt"><file name="jquery.superbox.js" hash="30228a5235fa735bdfb03130cc64ddbe"/><file name="tnt.js" hash="c15ea309f2e0632bca728314b80a30d8"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="WS_Tnt.xml" hash="2176fa2b98c129841599ac0cf2b96d87"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="tnt"><dir name="template"><dir name="sales"><dir name="order"><dir name="invoice"><dir name="create"><file name="form.phtml" hash="39a5685c507a02242ba2145e5a2d2efe"/><file name="tracking.phtml" hash="a03541d8ca4f4061e74a37fe33f4a75a"/></dir></dir><dir name="shipment"><dir name="create"><file name="form.phtml" hash="3ffd2752b9e8c6209603678ef6358421"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="tnt.xml" hash="7cc99229a82575959c3621fc5366a130"/></dir><dir name="template"><dir name="tnt"><dir name="form"><file name="failure.phtml" hash="0e75f6a5b51dc97568f3407c58be480d"/></dir><dir name="onepage"><dir name="shipping_method"><file name="available.phtml" hash="16ec9017abe2377188c1cdc902c80731"/></dir><file name="shipping_method.phtml" hash="ec7ad924d51398d83d6854ad24f7ca16"/></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Infostrates"><dir name="Tnt"><dir name="Block"><dir name="Onepage"><dir name="Shipping"><dir name="Method"><dir name="Available"><file name="Item.php" hash="c8c409dbee12a674b2a4581c82d1e943"/></dir><file name="Available.php" hash="e962d4ad442a82575bc84e64b94c82ce"/></dir></dir></dir><dir name="Sales"><dir name="Order"><dir name="Shipment"><file name="View.php" hash="805c992e53d98f35f3103364ecf4ff46"/></dir></dir><dir name="Shipment"><file name="Grid.php" hash="919bdf105047de5eb681672b621f12c4"/></dir><file name="Impression.php" hash="27b9e6d6bec0641025980ad9c5757711"/></dir></dir><dir name="Helper"><file name="Data.php" hash="d4893de82f6c207dfcb81acdebe3f713"/></dir><dir name="Model"><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="1b29213ab1939cc37df340994587c90e"/></dir></dir><dir name="Shipping"><dir name="Carrier"><dir name="Tnt"><dir name="Source"><file name="Labelformat.php" hash="c70d28c1c54620b87719da9b91aab5db"/><file name="Method.php" hash="c9580beb10e6522182524422d7367f3a"/></dir></dir><file name="Tnt.php" hash="b531c315694bb3c53bdd804f99325244"/></dir></dir></dir><dir name="controllers"><dir name="Sales"><dir name="Order"><file name="ShipmentController.php" hash="752ddf98053688cbb051eaebd1eb7fc7"/></dir><file name="ImpressionController.php" hash="4c473103f0fb6e51da3b12752360aaec"/></dir><file name="TntController.php" hash="74f0c33676efa0445bc2878bb9291a83"/></dir><dir name="etc"><file name="config.xml" hash="6c9b08856e663b0672399f66d29fbee2"/><file name="system.xml" hash="0bbbba9c73bd0403e32f840fdf8a7c06"/></dir><dir name="sql"><dir name="tnt_setup"><file name="mysql4-install-0.1.0-0.1.1.php" hash="f8b88a51166fca8f990340a748b48245"/><file name="mysql4-install-0.1.0.php" hash="eb0dac832f3182d6111adb8618296a03"/><file name="mysql4-uninstall-0.1.0.php" hash="a385dd2dddcb1936fb09f6e279426004"/></dir></dir></dir></dir></target><target name="magemedia"><dir name="pdf_bt"><file name="index.html" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target></contents>
16
  <compatible/>
17
- <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TNT_Express_Fr</name>
4
+ <version>2.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
9
  <summary>Extension officielle vous permettant de proposer les services TNT &#xE0; vos clients.</summary>
10
  <description>Extension officielle vous permettant de proposer les services TNT &#xE0; vos clients.</description>
11
  <notes>Extension officielle vous permettant de proposer les services TNT &#xE0; vos clients.</notes>
12
+ <authors><author><name>Infostrates</name><user>InfoDev</user><email>magento@infostrates.fr</email></author></authors>
13
+ <date>2012-02-01</date>
14
+ <time>16:22:36</time>
15
+ <contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="tnt"><dir><dir name="images"><file name="calendar.gif" hash="b1468e5239504974c689eea5d93f86d4"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="tnt"><file name="jquery.superbox.css" hash="0d9938955b1416e2dd4396c471f4ffef"/><file name="tnt.css" hash="ea01254b4cfbdebf89be561c7d23c752"/><file name="tntB2CRelaisColis.css" hash="9c82ecb9ad69f34d56513156072c1859"/><file name="tntB2CSuiviColis.css" hash="747617fe2434a271120ec2b3e153d5cb"/><file name="ui.dialog.css" hash="4f3c0afd97f9ccc5bcc31fe3f8fdec7f"/><file name="ui.tabs.css" hash="ab99412a657e5272f0306a3ff92c2a64"/></dir></dir><dir name="images"><dir name="tnt"><file name="24h_entreprise.jpg" hash="249ace5ffbe19eec2f31c219d9493e38"/><dir><dir name="relaisColis"><file name="5-puce-choix-gris2.gif" hash="f44619bac31b7e043bc74292b8dfe4d4"/><file name="_5-puce-choix-gris2.gif" hash="f96ef8fba6563b2235a8d09ffb4b7ae1"/><file name="_picto_localiser.png" hash="ba0a3fce978e167d96915bf06cf03c32"/><file name="bt-CodePostal-1.jpg" hash="1f7f61d1201fa69ef65bb2ce656b768f"/><file name="bt-CodePostal-2.jpg" hash="0bdf3314a4e098f8e1a2397c08dc5ff9"/><file name="bt-CodePostal.jpg" hash="06de46a2bae2d4eee4c0949527adc777"/><file name="bt-Continuer-1.jpg" hash="9b9e4090bc8fda9e4d2d798a65812928"/><file name="bt-Continuer-2.jpg" hash="5804403af6a183f097b39b903961bea2"/><file name="bt-Continuer.jpg" hash="a98357491aa77ae10f5d1f76fccc27f3"/><file name="bt-OK-1.jpg" hash="ce026dcdcdcc602dd328832a37a2decd"/><file name="bt-OK-2.jpg" hash="c7fc5c48be5a95b2afecbe0e5c1b5fda"/><file name="bt-OK.jpg" hash="53857cac0c22a96bf3df253c1d46f334"/><file name="bt-Retour.gif" hash="7c9fbc4a1db1817d7067b38275e79be5"/><file name="close_icon_double.png" hash="ed52a65fb5a37b3ab1c9d738c86b8d39"/><file name="exception.gif" hash="14462eb5176873950105cb78cfd1c04b"/><file name="exception2.gif" hash="cae24d8d4eafdbc2419b4f9c654a3bcc"/><dir name="google"><file name="agenceTnt.png" hash="c9161d6c4ada4a5456bea12941ba0903"/><file name="red-pushpin-s.png" hash="7d9f46d93a22ed450fdfdb8fb9879315"/><file name="red-pushpin.png" hash="5238107f41902ba37131e0c5198f9ab4"/><file name="relaisColis.png" hash="15e24cbcc83f4e4c0d7e94e71c80368e"/></dir><file name="lg_tnt.gif" hash="78bb3e001b1a6bc4bd616f032b81ace6"/><file name="livreur.gif" hash="49dd7ebf54141aec0d39cd97af1b3385"/><file name="logo-tnt-petit.jpg" hash="0e35a515b81d1753e31e7746669b92c5"/><file name="logo_24_chezmoi.jpg" hash="6c8a989da7d879fabe6441d06be1d490"/><file name="logo_24_relaiscolis.jpg" hash="b306bc299490f9711c3e0406bbd8e4e8"/><file name="logo_24h_chezmoi_RVB.gif" hash="ccd78b8af3cfb2b27d9ffea6c2b60201"/><file name="logo_24h_relaiscolis_RVB.gif" hash="7711185412061132689da9e6f212c5a8"/><file name="logos_24.jpg" hash="65a78581e9207eadcd5e9797032bdf4f"/><file name="loupe.gif" hash="1d398c60a6f7e5826ea283c6f5ba71de"/><file name="notes.gif" hash="5f39e1129163dc549d59b8818432035c"/><file name="picto-delai.gif" hash="65fdd89dd166c3a139cd35f738e13af4"/><file name="picto_localiser.jpg" hash="14c7373ef0a05236301a80657b94c429"/><file name="tnt_logo.gif" hash="5ebdea118496c59e473afbf6168c72b2"/><dir name="ui-dialog"><file name="217bc0_11x11_icon_arrows_leftright.gif" hash="a508197674479672df0cae36dc3e992b"/><file name="217bc0_11x11_icon_arrows_updown.gif" hash="2b164351ff902aa671d2162fe7ef80de"/><file name="217bc0_11x11_icon_close.gif" hash="aa11d350f6f257b30c51854c7457bdf7"/><file name="217bc0_11x11_icon_doc.gif" hash="6cd3d31f9de2072fe5cdc37697fa7047"/><file name="217bc0_11x11_icon_folder_closed.gif" hash="e1f6751b382b9f44c59793b9fd65b973"/><file name="217bc0_11x11_icon_folder_open.gif" hash="8c974aa27045cc6b2b4b18a502809af5"/><file name="217bc0_11x11_icon_minus.gif" hash="13b2ecea240c868c8a8886e085e41151"/><file name="217bc0_11x11_icon_plus.gif" hash="343c341f26245649be3af43962d3970c"/><file name="217bc0_7x7_arrow_down.gif" hash="8488267c8578c890eb9188964007eb42"/><file name="217bc0_7x7_arrow_left.gif" hash="30e3c1f097e6fec149583d21e9aaf721"/><file name="217bc0_7x7_arrow_right.gif" hash="3aff45eeae4f2f25625db2562ee64b4a"/><file name="217bc0_7x7_arrow_up.gif" hash="d7d60619ed69b64d3d6b61e78c6cf99f"/><file name="469bdd_11x11_icon_arrows_leftright.gif" hash="70f1a152ac20476191607b63e0129406"/><file name="469bdd_11x11_icon_arrows_updown.gif" hash="28debf817357b696699e709c010240e0"/><file name="469bdd_11x11_icon_doc.gif" hash="590aa4403d141186cc4430caefa644a2"/><file name="469bdd_11x11_icon_minus.gif" hash="715e3925135ef192149d1ec62763c9a8"/><file name="469bdd_11x11_icon_plus.gif" hash="a4aa61ec7cf9a274ac42224d0418d16d"/><file name="469bdd_11x11_icon_resize_se.gif" hash="d840dafe31b345b43dcd608983f4d2f2"/><file name="469bdd_7x7_arrow_down.gif" hash="794c5003bb6baa630c1664560293ed22"/><file name="469bdd_7x7_arrow_left.gif" hash="95f61faab2a3052985b81ba63b9e5143"/><file name="469bdd_7x7_arrow_right.gif" hash="363bb40ec764ff0ee8971e0e603614b4"/><file name="469bdd_7x7_arrow_up.gif" hash="e82fb46bea72014c55b24de8cf4e5816"/><file name="6da8d5_11x11_icon_arrows_leftright.gif" hash="ed511d07417fb6e54521e6d069118c3e"/><file name="6da8d5_11x11_icon_arrows_updown.gif" hash="4c183fc8665336cc06b6b5ecec5ab9d4"/><file name="6da8d5_11x11_icon_close.gif" hash="f5c1a073a4516aa1bcb1d2adc11d694d"/><file name="6da8d5_11x11_icon_doc.gif" hash="d4c31ffd164bd11dafda91f71154fd94"/><file name="6da8d5_11x11_icon_folder_closed.gif" hash="75cca9e354d9c70493956701036d17b3"/><file name="6da8d5_11x11_icon_folder_open.gif" hash="b6d4ccf28bc8135f5447e4d7037f4273"/><file name="6da8d5_11x11_icon_minus.gif" hash="ce777f34f7d0c45d97f8a4a81dc7a864"/><file name="6da8d5_11x11_icon_plus.gif" hash="4ee03d80718cda0dfed3dc40da49defe"/><file name="6da8d5_7x7_arrow_down.gif" hash="5f14085c6a95eefb7de0298fde0f8cf7"/><file name="6da8d5_7x7_arrow_left.gif" hash="c1830e94ea979068a24bf65cb3273bbc"/><file name="6da8d5_7x7_arrow_right.gif" hash="f07a63dc872885b363ab0263e9e87a81"/><file name="6da8d5_7x7_arrow_up.gif" hash="23388675052b0e0b1c377a39b8e33daf"/><file name="d0e5f5_40x100_textures_02_glass_75.png" hash="4227dfeb91bc0ada19e6ce9c9dd1d177"/><file name="dfeffc_40x100_textures_02_glass_85.png" hash="65821097dd7360af378ba87064657c5a"/><file name="f5f8f9_40x100_textures_06_inset_hard_100.png" hash="d0b8b7bc1da19027c5f1928821ca2425"/><file name="f9bd01_11x11_icon_arrows_leftright.gif" hash="a606b4cf221bc4835e888045582d3741"/><file name="f9bd01_11x11_icon_arrows_updown.gif" hash="fd37fbab3d065ff801423592ce9ddef4"/><file name="f9bd01_11x11_icon_close.gif" hash="2f29d1345450fc6ceff21b47b1299add"/><file name="f9bd01_11x11_icon_doc.gif" hash="b496d9150cf0b5485773d1809a15711e"/><file name="f9bd01_11x11_icon_folder_closed.gif" hash="10f1f11a9e8511c58780bd4c27bc58bf"/><file name="f9bd01_11x11_icon_folder_open.gif" hash="a93490b49caa0d29e0a4a74a19db5a75"/><file name="f9bd01_11x11_icon_minus.gif" hash="aae85e05c6fc1c89aaa40ed81d6a5745"/><file name="f9bd01_11x11_icon_plus.gif" hash="8d336dad6b6d735c8caffa6979111ec8"/><file name="f9bd01_7x7_arrow_down.gif" hash="7245b25313350cf9c42630cf56a77b32"/><file name="f9bd01_7x7_arrow_left.gif" hash="d52f626932d222de01e6ae56d693de30"/><file name="f9bd01_7x7_arrow_right.gif" hash="dda3a08ff0a655d2098eea93f8d40f1c"/><file name="f9bd01_7x7_arrow_up.gif" hash="9fc71f02a267f44015b8fcdad65652ae"/><file name="fcfdfd_40x100_textures_06_inset_hard_100.png" hash="9a409d5eae9edcb987ee579e1d2fd1ca"/></dir></dir><dir name="swf"><file name="banniere_TNT_0.swf" hash="2d5ff87f17c339506cf94e14ed02049b"/><file name="banniere_TNT_1.swf" hash="19452213d15cac22ea4400f9a2428d54"/><file name="banniere_TNT_2.swf" hash="774c739c758226638ea18eb9840cbeae"/><file name="banniere_TNT_3.swf" hash="7d7312336f6fd5b7e1eb3bad903dea29"/><file name="banniere_TNT_4.swf" hash="cbb9dd4c5f24b9754c5c30133e09f6f1"/><file name="banniere_TNT_5.swf" hash="96c51a21962293691471973bc9f9020a"/><file name="banniere_TNT_6.swf" hash="a4dab8afecc0a26e5149787026e9591d"/><file name="banniere_TNT_7.swf" hash="22a76b62d84d1dbf9bc2ffe7f67249e3"/></dir></dir><file name="tnt_j.png" hash="2a11f2e71231a05d86d5031ca81f17a1"/><file name="tnt_jd.png" hash="2b5725dacd06a08a2055884fbd9b2397"/><file name="tnt_jz.png" hash="2bd28bb1b58294f4d84aa0e5d058b66a"/><file name="tnt_sure_we_can.png" hash="6e609b1dfea22cc59b5f1699857cbc58"/><file name="tnt_t.png" hash="58348232c798883b70d008b98da8d0ec"/></dir></dir><dir name="js"><dir name="tnt"><file name="jquery-ui.js" hash="c4338f18312354facf7fcaecadf07e04"/><file name="jquery.js" hash="3d5c23458ff980bd76bee32e76faac86"/><file name="jquery.superbox.js" hash="30228a5235fa735bdfb03130cc64ddbe"/><file name="jquery_162.js" hash="8752b76fb981b68e7283ef4341a1c29a"/><file name="relaisColis.js" hash="43c080a05b84f8d03db5801e6869a2fb"/><file name="relaisColisIE7.js" hash="e59d9ab38047117aa3d1728c74564722"/><file name="suiviColis.js" hash="36e18708ebb16225b2b6fb614d01153d"/><file name="swfobject.js" hash="892a543f3abb54e8ec1ada55be3b0649"/><file name="tnt.js" hash="9b3fd5cb0ff56be50af7213ff2f1f5f8"/></dir></dir><file name="tnt_relaisColis.php" hash="5a7ab05b566edcbbefaa9399742391e8"/><file name="tnt_suiviColis.php" hash="e25b8c46ac07b9cc0674c4c8d74b3f75"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="WS_Tnt.xml" hash="2176fa2b98c129841599ac0cf2b96d87"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="tnt"><dir><dir name="template"><dir name="sales"><dir name="order"><dir name="invoice"><dir name="create"><file name="form.phtml" hash="39a5685c507a02242ba2145e5a2d2efe"/><file name="tracking.phtml" hash="a03541d8ca4f4061e74a37fe33f4a75a"/></dir></dir><dir name="shipment"><dir name="create"><file name="form.phtml" hash="3ffd2752b9e8c6209603678ef6358421"/></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="tnt.xml" hash="5308155ce5230e3c298b6d407fde4fba"/></dir><dir name="template"><dir name="tnt"><dir><dir name="form"><file name="_failure.phtml" hash="0e75f6a5b51dc97568f3407c58be480d"/></dir><dir name="onepage"><dir name="shipping_method"><file name="available.phtml" hash="e025586f65258ebf882a43179470e542"/></dir><file name="shipping_method.phtml" hash="ec7ad924d51398d83d6854ad24f7ca16"/></dir><dir name="sales"><dir name="order"><file name="info.phtml" hash="bcad3e1dbc7bdafb8728dc1421fe7e67"/><file name="view.phtml" hash="edd2db8d7bf157ebbe7c7248723c32a4"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Infostrates"><dir name="Tnt"><dir><dir name="Block"><dir name="Onepage"><dir name="Shipping"><dir name="Method"><dir name="Available"><file name="Item.php" hash="c8c409dbee12a674b2a4581c82d1e943"/></dir><file name="Available.php" hash="e962d4ad442a82575bc84e64b94c82ce"/></dir></dir></dir><dir name="Sales"><file name="Impression.php" hash="c72cb0a7611a83d977fc3d69df36ab8d"/><dir name="Order"><dir name="Shipment"><file name="View.php" hash="805c992e53d98f35f3103364ecf4ff46"/></dir></dir><dir name="Shipment"><file name="Grid.php" hash="1b0b98ab13ceea3ba1299ca20f5c10f9"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="d4893de82f6c207dfcb81acdebe3f713"/></dir><dir name="Model"><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="1b29213ab1939cc37df340994587c90e"/></dir></dir><dir name="Shipping"><dir name="Carrier"><dir name="Tnt"><dir name="Source"><file name="Labelformat.php" hash="c70d28c1c54620b87719da9b91aab5db"/><file name="Method.php" hash="c9580beb10e6522182524422d7367f3a"/></dir></dir><file name="Tnt.php" hash="86040ecbe210e2a3df8db69024b7c6d9"/></dir></dir></dir><dir name="controllers"><dir name="Sales"><file name="ImpressionController.php" hash="d145531d36c9e42a16bb3f63ef39a8f3"/><dir name="Order"><file name="ShipmentController.php" hash="b942c0f3f29bf80c6be2f7955ab3f547"/></dir></dir><file name="TntController.php" hash="ab0c05ff20be0248d9aaca435f7ee5a1"/></dir><dir name="etc"><file name="config.xml" hash="b1ab3aa28d615e801bc51a0be305c40f"/><file name="system.xml" hash="37d855e7ae5e16d9ee488f59be73ea25"/></dir><dir name="sql"><dir name="tnt_setup"><file name="mysql4-install-0.1.0-0.1.1.php" hash="f8b88a51166fca8f990340a748b48245"/><file name="mysql4-install-0.1.0.php" hash="eb0dac832f3182d6111adb8618296a03"/><file name="mysql4-upgrade-1.0.0-2.0.0.php" hash="0b69a4c2f5fe40403d5f1ff37d36197c"/></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="pdf_bt"><file name="index.html" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target><target name="magelocal"><dir name="Varien"><dir name="Data"><dir name="Collection"><file name="Db.php" hash="0b778ccfa8acc280628d6cfceeae3b83"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
skin/frontend/default/default/css/tnt/jquery.superbox.css CHANGED
@@ -21,6 +21,15 @@
21
  #superbox-innerbox{padding:10px 0;}
22
  #superbox.image{text-align:center;}
23
  #superbox .close,
24
- #superbox .nextprev{overflow:hidden;margin:0;padding:1px;}
25
  #superbox .close a:focus,
26
- #superbox .nextprev a:focus{outline:1px dotted;}
 
 
 
 
 
 
 
 
 
21
  #superbox-innerbox{padding:10px 0;}
22
  #superbox.image{text-align:center;}
23
  #superbox .close,
24
+ #superbox .nextprev{overflow:hidden;margin:0;padding:1px; cursor:pointer; }
25
  #superbox .close a:focus,
26
+ #superbox .nextprev a:focus{outline:1px dotted;}
27
+
28
+
29
+ .checkout-onepage-index #superbox {
30
+ border: 5px solid #FF6600;
31
+ }
32
+
33
+ .sales-order-view #superbox {
34
+ border: 5px solid #F60;
35
+ }
skin/frontend/default/default/css/tnt/tnt.css CHANGED
@@ -1,7 +1,8 @@
1
  .one-page-checkout .active .box-no-padding{ padding:15px 20px;}
2
  .one-page-checkout .active .box-no-padding dt{ clear:both;}
3
 
4
- #tnt_pr, #tnt_cp { padding-left:25px;}
 
5
  #tnt_pr .input-box{ float:left; margin-right:20px; }
6
 
7
  #checkout-shipping-method-load dd{padding:0 0 10px; }
@@ -30,9 +31,9 @@
30
  width:30%;
31
  }
32
  #comp_domicile div input {
33
- margin-right:20px;
34
- }
35
- #comp_domicile div span, #comp_entreprise div span {
36
  font-weight: normal;
37
  font-size: 10px;
38
  }
1
  .one-page-checkout .active .box-no-padding{ padding:15px 20px;}
2
  .one-page-checkout .active .box-no-padding dt{ clear:both;}
3
 
4
+ #tnt_cp { padding-left:25px;}
5
+ #tnt_pr_choix { font-weight:bold; color:green; }
6
  #tnt_pr .input-box{ float:left; margin-right:20px; }
7
 
8
  #checkout-shipping-method-load dd{padding:0 0 10px; }
31
  width:30%;
32
  }
33
  #comp_domicile div input {
34
+ margin-right:20px;
35
+ }
36
+ #comp_domicile div span, #comp_entreprise div span {
37
  font-weight: normal;
38
  font-size: 10px;
39
  }
skin/frontend/default/default/css/tnt/tntB2CRelaisColis.css ADDED
@@ -0,0 +1,392 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .tntRCHeader {
2
+ background-color: #ffffff;
3
+ background-image: url(../../images/tnt/relaisColis/logo_24_relaiscolis.jpg);
4
+ background-position: 10px center;
5
+ background-repeat: no-repeat;
6
+ border-color: gray;
7
+ border-style: solid;
8
+ border-width: 0px;
9
+ color: #676767;
10
+ display: bloc;
11
+ font-family: arial,helvetica,sans-serif;
12
+ font-size: 30pt;
13
+ font-style: normal;
14
+ height: 75px;
15
+ padding-right: 10px;
16
+ padding-top: 25px;
17
+ text-align: right;
18
+ width: 590px;
19
+ }
20
+
21
+ .tntRCSubHeader {
22
+ background-color: #ffffff;
23
+ border-width: 0px;
24
+ color: #676767;
25
+ display: bloc;
26
+ font-family: arial,helvetica,sans-serif;
27
+ font-size: 11pt;
28
+ font-weight: bold;
29
+ padding-bottom: 3px;
30
+ padding-top: 3px;
31
+ width: 100%;
32
+ }
33
+
34
+ .tntRCBody {
35
+ background-color: #FFFFFF;
36
+ border: 1px solid #808080;
37
+ color: #676767;
38
+ font-family: arial,helvetica,sans-serif;
39
+ font-size: 10pt;
40
+ padding-bottom: 0px;
41
+ padding-top: 0px;
42
+ }
43
+
44
+ .tntRCBodySearch {
45
+ background-color: #ffffff;
46
+ border-color: gray;
47
+ border-style: solid;
48
+ border-width: 1px;
49
+ color: #676767;
50
+ font-family: arial,helvetica,sans-serif;
51
+ font-size: 10pt;
52
+ font-weight: bold;
53
+ padding-left: 3px;
54
+ padding-top: 8px;
55
+ padding-bottom: 8px;
56
+ width: 100%;
57
+ }
58
+
59
+ .tntRCError {
60
+ background-color: #ff6600;
61
+ color: #ffffff;
62
+ display: bloc;
63
+ font-family: arial,helvetica,sans-serif;
64
+ font-size: 12pt;
65
+ font-weight: bold;
66
+ width: 100%;
67
+ }
68
+
69
+ .tntRCGray {
70
+ background-color: #a0a0a0;
71
+ border-width: 0px;
72
+ display: bloc;
73
+ font-family: arial,helvetica,sans-serif;
74
+ font-size: 10pt;
75
+ height: 25px;
76
+ }
77
+
78
+ .tntRCInput {
79
+ background-color: #FFFFFF;
80
+ border: 1px solid #676767;
81
+ font-family: arial,helvetica,sans-serif;
82
+ font-size: 10pt;
83
+ font-weight: normal;
84
+ margin: 0;
85
+ padding: 0;
86
+ text-align: center;
87
+ width: 50px;
88
+ color: #A0A0A0;
89
+ }
90
+
91
+ .tntRCWhite {
92
+ background-color: #ffffff;
93
+ border-width: 0px;
94
+ display: bloc;
95
+ font-family: arial,helvetica,sans-serif;
96
+ font-size: 14pt;
97
+ width: 600px;
98
+ }
99
+
100
+ .tntRCrelaisColis {
101
+ font-family: arial,helvetica,sans-serif;
102
+ font-size: 10px;
103
+ color: #000000;
104
+ border-bottom-style: solid;
105
+ border-bottom-color: #a0a0a0;
106
+ border-bottom-width: 1px;
107
+ background-color: #ffffff;
108
+ padding-bottom: 3px;
109
+ vertical-align: middle;
110
+ }
111
+
112
+ .tntRCtitreMode {
113
+ font-family: arial,helvetica,sans-serif;
114
+ font-size: 28px;
115
+ color: #a0a0a0;
116
+ font-style: italic;
117
+ background-color: #ffffff;
118
+ }
119
+ .tntRCchoix {
120
+ font-family: arial,helvetica,sans-serif;
121
+ font-size: 14px;
122
+ color: #a0a0a0;
123
+ font-weight: bold;
124
+ background-color: #ffffff;
125
+ }
126
+ .tntRCdetailGros {
127
+ font-family: arial,helvetica,sans-serif;
128
+ font-size: 10pt;
129
+ color: #676767;
130
+ background-color: #ffffff;
131
+ font-weight: bold;
132
+ }
133
+
134
+ .tntRCnoirPetit {
135
+ font-family: arial,helvetica,sans-serif;
136
+ font-size: 10pt;
137
+ color: black;
138
+ background-color: #ffffff;
139
+ }
140
+ .tntRCdetailPetit {
141
+ font-family: arial,helvetica,sans-serif;
142
+ font-size: 12pt;
143
+ color: #676767;
144
+ background-color: #ffffff;
145
+ font-weight: bold;
146
+ }
147
+ .tntRCentree {
148
+ font-family: arial,helvetica,sans-serif;
149
+ font-size: 12pt;
150
+ color: #000000;
151
+ background-color: #ffffff;
152
+ vertical-align: middle;
153
+ }
154
+ .tntRCgris {
155
+ font-family: arial,helvetica,sans-serif;
156
+ font-size: 10pt;
157
+ color: #ffffff;
158
+ background-color: #676767;
159
+ font-weight: bold;
160
+ }
161
+
162
+ table.tntRCHoraire td {
163
+ border: 1px solid gray;
164
+ font-family: arial,helvetica,sans-serif;
165
+ font-size: 8pt;
166
+ vertical-align: middle;
167
+ }
168
+
169
+ .tntRCHoraireJour{
170
+ color: #676767;
171
+ text-align: right;
172
+ padding-right: 10px;
173
+ height: 30px;
174
+ width: 79px;
175
+ font-weight: bold;
176
+ }
177
+
178
+ .tntRCHoraireHeure {
179
+ color: #000000;
180
+ padding-left: 10px;
181
+ width: 84px;
182
+ }
183
+
184
+ .tntRCblanc {
185
+ font-family: arial,helvetica,sans-serif;
186
+ font-size: 12px;
187
+ color: #000000;
188
+ background-color: #ffffff;
189
+ padding-top: 4px;
190
+ padding-bottom: 3px;
191
+ text-align:center;
192
+ }
193
+ .tntRCblancpetit {
194
+ font-family: arial,helvetica,sans-serif;
195
+ font-size: 12px;
196
+ color: #000000;
197
+ background-color: #ffffff;
198
+ padding-top: 4px;
199
+ padding-bottom: 3px;
200
+ }
201
+ .tntRCfermeture {
202
+ padding-left: 585px;
203
+ }
204
+
205
+ .tntRCBack2Communes {
206
+ background-color: #ffffff;
207
+ color: #676767;
208
+ font-family: arial,helvetica,sans-serif;
209
+ font-style: italic;
210
+ font-size: 11pt;
211
+ font-weight: bold;
212
+ padding-top: 18px;
213
+ text-align: right;
214
+ }
215
+
216
+ .tntRCBack2Communes a {
217
+ color: #676767;
218
+ text-decoration: none;
219
+ padding-right: 5px;
220
+ }
221
+
222
+ .tntRCBack2Communes a img{
223
+ border: 0;
224
+ padding-right: 5px;
225
+ vertical-align: text-bottom;
226
+ }
227
+
228
+ .tntRCBoutonLoupe {
229
+ background-color: #ffffff;
230
+ border: 0px;
231
+ color: #000000;
232
+ font-family: arial,helvetica,sans-serif;
233
+ font-size: 12px;
234
+ padding-top: 4px;
235
+ padding-bottom: 3px;
236
+ text-decoration: none;
237
+ vertical-align: middle;
238
+ }
239
+ .jqmWindow {
240
+ background-color: #FFF;
241
+ border: 1px solid black;
242
+ color: #333;
243
+ display: none;
244
+ padding: 12px;
245
+ position: fixed;
246
+ left: 50%;
247
+ margin-left: -300px;
248
+ margin-top: -240px;
249
+ width: 600px;
250
+ }
251
+
252
+ div.tntRCfermeture .jqmClose em{display:none;}
253
+ div.tntRCfermeture .jqmClose {
254
+ background: transparent url(../../images/tnt/relaisColis/close_icon_double.png) 0 0 no-repeat;
255
+ display: block;
256
+ width: 20px;
257
+ height: 20px;
258
+ }
259
+
260
+ div.tntRCfermeture a.jqmClose:hover{ background-position: 0 -20px; }
261
+
262
+ .jqmOverlay {
263
+ background-color: #000;
264
+ overflow: hidden;
265
+ }
266
+
267
+ * html .jqmWindow {
268
+ position: absolute;
269
+ top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');
270
+ }
271
+
272
+ img.tntRCButton {
273
+ border: 0px;
274
+ vertical-align: middle;
275
+ text-decoration: none;
276
+ }
277
+
278
+ sup.tntRCSup {
279
+
280
+ }
281
+
282
+ table.horairesRC td {
283
+ width : 100%;
284
+ margin: 0px;
285
+ padding: 0px;
286
+ }
287
+
288
+ table.horairesRCPopup {
289
+ width : 100%;
290
+ margin: 0px;
291
+ padding: 0px;
292
+ }
293
+
294
+ table.horairesRCPopup tr.selected td {
295
+ background-color: #eeeeee;
296
+ color: #ff6600;
297
+ }
298
+
299
+ td.horaireRCPopup {
300
+ width : 60%;
301
+ }
302
+
303
+ td.horairesRCJourPopup {
304
+ width : 40%;
305
+ font-weight: bold;
306
+ color: #808080;
307
+ }
308
+
309
+ td.horairesRCJour {
310
+ font-weight: bold;
311
+ color: #808080;
312
+ }
313
+ table.horairesRC tr.selected td {
314
+ background-color: #eeeeee;
315
+ color: #ff6600;
316
+ }
317
+
318
+ div.ag {
319
+ background-image: url(../../images/tnt/relaisColis/google/agenceTnt.png);
320
+ background-repeat: no-repeat;
321
+ padding-left:60px;
322
+ }
323
+
324
+ div.rc {
325
+ background-image: url(../../images/tnt/relaisColis/google/relaisColis.png);
326
+ background-repeat: no-repeat;
327
+ padding-left:50px;
328
+ }
329
+
330
+
331
+ .lien_reset {
332
+ color : #ff6600;
333
+ font-family: arial,helvetica,sans-serif;
334
+ font-weight: bold;
335
+ font-size : 11px;
336
+ text-decoration:none;
337
+ }
338
+
339
+ a {
340
+ color: #f60;
341
+ outline-color: #f60 !important;
342
+ outline: none;
343
+ }
344
+
345
+ a:hover {
346
+ text-decoration: none;
347
+ }
348
+
349
+ .exemplePresentation {
350
+ display: inline;
351
+ float: right;
352
+ margin-top: 10px;
353
+ }
354
+
355
+ #tntB2CRelaisColis {
356
+ width: 43%;
357
+ float:left;
358
+ }
359
+
360
+ #promoRelaisColis {
361
+ position: absolute;
362
+ top: 200px;
363
+ width: 380px;
364
+ left:10px;
365
+ }
366
+
367
+ #promoRelaisColis .logo {
368
+ height:73px;
369
+ }
370
+
371
+ #promoRelaisColis .logo .image, #promoRelaisColis .logo .desc {
372
+ float:left;
373
+ }
374
+
375
+ #promoRelaisColis .logo .image {
376
+ width:140px;
377
+ }
378
+
379
+ #promoRelaisColis .logo .desc {
380
+ font-family: verdana,sans-serif;
381
+ font-size: 13px;
382
+ font-weight: bold;
383
+ padding: 8px 0 0;
384
+ width: 240px;
385
+ }
386
+
387
+ #promoRelaisColis .description {
388
+ clear: left;
389
+ font-family: verdana,sans-serif;
390
+ font-size: 18px;
391
+ margin-top: 40px;
392
+ }
skin/frontend/default/default/css/tnt/tntB2CSuiviColis.css ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body {
2
+ margin-top:0px;
3
+ }
4
+
5
+ #tntB2CSuiviColis {
6
+ width:580px;
7
+ }
8
+
9
+ .tntSCBody {
10
+ background-color: #ffffff;
11
+ background-position: right bottom;
12
+ background-repeat: no-repeat;
13
+ border-color: gray;
14
+ border-style: solid;
15
+ border-width: 1px;
16
+ color: #000000;
17
+ display: bloc;
18
+ font-family: arial,helvetica,sans-serif;
19
+ font-size: 10pt;
20
+ padding-bottom: 10px;
21
+ width: 580px;
22
+ }
23
+
24
+ .tntSCBodySearch {
25
+ background-color: #ffffff;
26
+ border-color: gray;
27
+ border-style: solid;
28
+ border-width: 1px;
29
+ color: #676767;
30
+ font-family: arial,helvetica,sans-serif;
31
+ font-size: 10pt;
32
+ font-weight: bold;
33
+ padding-left: 10px;
34
+ width: 570px;
35
+ }
36
+
37
+ /* Suppression du gras pour le champ de saisi */
38
+ div.tntSCBodySearch table tbody tr td input{
39
+ font-weight: normal;
40
+ }
41
+
42
+ .tntSCError {
43
+ background-color: #ff6600;
44
+ color: #ffffff;
45
+ display: bloc;
46
+ font-family: arial,helvetica,sans-serif;
47
+ font-size: 12pt;
48
+ font-weight: bold;
49
+ width: 580px;
50
+ }
51
+
52
+ .tntSCFooter {
53
+ background-color: #ffffff;
54
+ border-color: gray;
55
+ border-style: solid;
56
+ border-width: 1px;
57
+ color: #676767;
58
+ display: bloc;
59
+ font-family: arial,helvetica,sans-serif;
60
+ font-size: 10pt;
61
+ padding-bottom: 8px;
62
+ padding-left: 6px;
63
+ padding-top: 8px;
64
+ width: 574px;
65
+ }
66
+
67
+ td.tntSCFooterCell1 {
68
+ background-image: url(../../images/tnt/relaisColis/logo_24h_chezmoi_RVB.gif);
69
+ background-position: right center;
70
+ background-repeat: no-repeat;
71
+ }
72
+
73
+ td.tntSCFooterCell2 {
74
+ background-image: url(../../images/tnt/relaisColis/logo_24h_relaiscolis_RVB.gif);
75
+ background-position: right center;
76
+ background-repeat: no-repeat;
77
+ }
78
+
79
+ .tntSCGray {
80
+ background-color: #a0a0a0;
81
+ border-width: 0px;
82
+ display: bloc;
83
+ font-family: arial,helvetica,sans-serif;
84
+ font-size: 10pt;
85
+ height: 25px;
86
+ width: 580px;
87
+ }
88
+
89
+ .tntSCHeader {
90
+ background-color: #ffffff;
91
+ background-image: url(../../images/tnt/relaisColis/lg_tnt.gif);
92
+ background-position: 10px center;
93
+ background-repeat: no-repeat;
94
+ color: #676767;
95
+ display: bloc;
96
+ font-family: arial,helvetica,sans-serif;
97
+ font-size: 30pt;
98
+ font-style: normal;
99
+ height: 70px;
100
+ padding-top: 30px;
101
+ padding-left: 200px;
102
+ text-align: left;
103
+ width: 380px;
104
+ }
105
+
106
+ .tntSCInput {
107
+ background-color: #ffffff;
108
+ font-family: arial,helvetica,sans-serif;
109
+ font-size: 12pt;
110
+ text-align: center;
111
+ }
112
+
113
+ .tntSCSubHeader {
114
+ background-color: #ffffff;
115
+ border-width: 0px;
116
+ color: #676767;
117
+ display: bloc;
118
+ font-family: arial,helvetica,sans-serif;
119
+ font-size: 11pt;
120
+ font-weight: bold;
121
+ padding-bottom: 3px;
122
+ padding-top: 3px;
123
+ width: 580px;
124
+ }
125
+
126
+ .tntSCTextBold {
127
+ color: #a0a0a0;
128
+ display: inline;
129
+ font-weight: bold;
130
+ text-decoration: none;
131
+ }
132
+
133
+ .tntSCTextOrange {
134
+ color: #ff6600;
135
+ display: inline;
136
+ }
137
+
138
+ .tntSCWhite {
139
+ background-color: #ffffff;
140
+ border-width: 0px;
141
+ display: bloc;
142
+ font-family: arial,helvetica,sans-serif;
143
+ font-size: 4pt;
144
+ heigth: 4px;
145
+ width: 580px;
146
+ }
147
+
148
+ img.tntSCButton {
149
+ border: 0px;
150
+ vertical-align: middle;
151
+ text-decoration: none;
152
+ }
153
+
154
+ sup.tntSCSup {
155
+ font-size: 8pt;
156
+ }
157
+
158
+ .tb_suivi {
159
+ font-size: 11px;
160
+ }
161
+
162
+ td.section {
163
+ border-bottom: 1px solid #CCBBCC;
164
+ background-color: #EEEEEE;
165
+ color: #000000;
166
+ padding: 5px 0 5px 5px;
167
+ }
168
+
169
+
170
+
171
+ table.tb_suivi {
172
+ background-color: #fff;
173
+ border: solid 1px #cbcbcb;
174
+ padding: 1px;
175
+ }
176
+
177
+ table.tb_suivi a {
178
+ color: #FF6600;
179
+ }
180
+
181
+ .tb_suivi .orange {
182
+ color:#FF6600;
183
+ }
184
+
185
+ td.section {
186
+ padding: 5px 0 5px 5px;
187
+ }
188
+
189
+ /* HEADER BACKGROUND COLOURS */
190
+ td.section {
191
+ background-color: #eee;
192
+ color: #000;
193
+ }
194
+
195
+
196
+ td.section {
197
+ border-bottom: solid 1px #cbc;
198
+ }
skin/frontend/default/default/css/tnt/ui.dialog.css ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI screen structure and presentation
3
+ * This CSS file was generated by ThemeRoller, a Filament Group Project for jQuery UI
4
+ * Author: Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
5
+ * Visit ThemeRoller.com
6
+ */
7
+
8
+ /*
9
+ * Note: If your ThemeRoller settings have a font size set in ems, your components will scale according to their parent element's font size.
10
+ * As a rule of thumb, set your body's font size to 62.5% to make 1em = 10px.
11
+ * body {font-size: 62.5%;}
12
+ */
13
+
14
+
15
+ /*dialog*/
16
+ .ui-dialog {
17
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
18
+ font-family: Lucida Grande, Lucida Sans, Arial, sans-serif;
19
+ font-size: 11px;
20
+ background: #fcfdfd url(../../images/tnt/relaisColis/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png) 0 bottom repeat-x;
21
+ color: #222222;
22
+ border: 3px solid #808080;
23
+ position: relative;
24
+ }
25
+ .ui-resizable-handle {
26
+ position: absolute;
27
+ font-size: 0.1px;
28
+ z-index: 99999;
29
+ }
30
+ .ui-resizable .ui-resizable-handle {
31
+ display: block;
32
+ }
33
+ body .ui-resizable-disabled .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
34
+ body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
35
+ .ui-resizable-n {
36
+ cursor: n-resize;
37
+ height: 7px;
38
+ width: 100%;
39
+ top: -5px;
40
+ left: 0px;
41
+ }
42
+ .ui-resizable-s {
43
+ cursor: s-resize;
44
+ height: 7px;
45
+ width: 100%;
46
+ bottom: -5px;
47
+ left: 0px;
48
+ }
49
+ .ui-resizable-e {
50
+ cursor: e-resize;
51
+ width: 7px;
52
+ right: -5px;
53
+ top: 0px;
54
+ height: 100%;
55
+ }
56
+ .ui-resizable-w {
57
+ cursor: w-resize;
58
+ width: 7px;
59
+ left: -5px;
60
+ top: 0px;
61
+ height: 100%;
62
+ }
63
+ .ui-resizable-se {
64
+ cursor: se-resize;
65
+ width: 13px;
66
+ height: 13px;
67
+ right: 0px;
68
+ bottom: 0px;
69
+ background: url(../../images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_resize_se.gif) no-repeat 0 0;
70
+ }
71
+ .ui-resizable-sw {
72
+ cursor: sw-resize;
73
+ width: 9px;
74
+ height: 9px;
75
+ left: 0px;
76
+ bottom: 0px;
77
+ }
78
+ .ui-resizable-nw {
79
+ cursor: nw-resize;
80
+ width: 9px;
81
+ height: 9px;
82
+ left: 0px;
83
+ top: 0px;
84
+ }
85
+ .ui-resizable-ne {
86
+ cursor: ne-resize;
87
+ width: 9px;
88
+ height: 9px;
89
+ right: 0px;
90
+ top: 0px;
91
+ }
92
+ .ui-dialog-titlebar {
93
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
94
+ padding: 5px 15px 5px 10px;
95
+ color: #2e6e9e;
96
+ border-bottom: 0px solid #c5dbec;
97
+ font-size: 10px;
98
+ font-weight: bold;
99
+ position: relative;
100
+ }
101
+ .ui-dialog-title {}
102
+ .ui-dialog-titlebar-close {
103
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
104
+ background: url(../../images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_close.gif) 0 0 no-repeat;
105
+ position: absolute;
106
+ right: 8px;
107
+ top: 7px;
108
+ width: 11px;
109
+ height: 11px;
110
+ z-index: 100;
111
+ }
112
+ .ui-dialog-titlebar-close-hover, .ui-dialog-titlebar-close:hover {
113
+ background: url(../../images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_close.gif) 0 0 no-repeat;
114
+ }
115
+ .ui-dialog-titlebar-close:active {
116
+ background: url(../../images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_close.gif) 0 0 no-repeat;
117
+ }
118
+ .ui-dialog-titlebar-close span {
119
+ display: none;
120
+ }
121
+ .ui-dialog-content {
122
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
123
+ color: #222222;
124
+ padding: 0px 17px;
125
+ }
126
+ .ui-dialog-buttonpane {
127
+ position: absolute;
128
+ bottom: 0;
129
+ width: 100%;
130
+ text-align: left;
131
+ border-top: 1px solid #a6c9e2;
132
+ background: #fcfdfd;
133
+ }
134
+ .ui-dialog-buttonpane button {
135
+ margin: 5px 0 5px 8px;
136
+ color: #2e6e9e;
137
+ background: #dfeffc url(../../images/tnt/relaisColis/ui-dialog/dfeffc_40x100_textures_02_glass_85.png) 0 50% repeat-x;
138
+ font-size: 1;
139
+ border: 10px solid #c5dbec;
140
+ cursor: pointer;
141
+ padding: 2px 6px 3px 6px;
142
+ line-height: 14px;
143
+ }
144
+ .ui-dialog-buttonpane button:hover {
145
+ color: #1d5987;
146
+ background: #d0e5f5 url(../../images/tnt/relaisColis/ui-dialog/d0e5f5_40x100_textures_02_glass_75.png) 0 50% repeat-x;
147
+ border: 1px solid #79b7e7;
148
+ }
149
+ .ui-dialog-buttonpane button:active {
150
+ color: #e17009;
151
+ background: #f5f8f9 url(../../images/tnt/relaisColis/ui-dialog/f5f8f9_40x100_textures_06_inset_hard_100.png) 0 50% repeat-x;
152
+ border: 1px solid #79b7e7;
153
+ }
154
+ /* This file skins dialog */
155
+ .ui-dialog.ui-draggable .ui-dialog-titlebar,
156
+ .ui-dialog.ui-draggable .ui-dialog-titlebar {
157
+ cursor: move;
158
+ }
skin/frontend/default/default/css/tnt/ui.tabs.css ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*UI tabs*/
2
+ .ui-tabs-nav {
3
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
4
+ font-family: Lucida Grande, Lucida Sans, Arial, sans-serif;
5
+ font-size: 10px;
6
+ float: left;
7
+ position: relative;
8
+ z-index: 1;
9
+ /*border-right: 1px solid #c5dbec;*/
10
+ bottom: -1px;
11
+ }
12
+ .ui-tabs-nav ul {
13
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
14
+ }
15
+ .ui-tabs-nav li {
16
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
17
+ float: left;
18
+ border: 1px solid #808080;
19
+ /*border-right: none;*/
20
+ border-bottom:none;
21
+ }
22
+ .ui-tabs-nav li a {
23
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
24
+ float: left;
25
+ font-size: 10px;
26
+ font-weight: bold;
27
+ text-decoration: none;
28
+ padding: .2em 1em;
29
+ color: #808080;
30
+ /*background: #dfeffc url(../images/tnt/relaisColis/ui-dialog/dfeffc_40x100_textures_02_glass_85.png) 0 50% repeat-x;*/
31
+ }
32
+ .ui-tabs-nav li a:hover {
33
+ /*background: #d0e5f5 url(../images/tnt/relaisColis/ui-dialog/d0e5f5_40x100_textures_02_glass_75.png) 0 50% repeat-x;*/
34
+ color: #808080;
35
+ }
36
+ .ui-tabs-nav li.ui-tabs-selected {
37
+ /*border-bottom: none;*/
38
+ border: 1px solid #ff6600;
39
+ border-bottom:none;
40
+ }
41
+ .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs-nav li.ui-tabs-selected a:hover {
42
+ /*background: #f5f8f9 url(../images/tnt/relaisColis/ui-dialog/f5f8f9_40x100_textures_06_inset_hard_100.png) 0 50% repeat-x;*/
43
+ color: white;
44
+ background-color: #ff6600;
45
+ }
46
+ .ui-tabs-panel {
47
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
48
+ /*font-family: Lucida Grande, Lucida Sans, Arial, sans-serif;*/
49
+ clear:left;
50
+ border: 1px solid #ff6600;
51
+ /*background: #fcfdfd url(../images/tnt/relaisColis/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png) 0 bottom repeat-x;*/
52
+ /*color: #222222;*/
53
+ padding: 1em 1em;
54
+ width: 315px;
55
+ font-size: 10px;
56
+ }
57
+ .ui-tabs-hide {
58
+ display: none;/* for accessible hiding: position: absolute; left: -99999999px*/;
59
+ }
60
+
61
+ .ui-tabs-panel input {
62
+ color: #A0A0A0;
63
+ border: 1px solid #676767;
64
+ }
65
+
66
+ .ui-tabs-panel input.bt {
67
+ border: 0px solid;
68
+ background-color: #ff6600;
69
+ color:white;
70
+ }
skin/frontend/default/default/images/tnt/old/_24h_entreprise.png DELETED
Binary file
skin/frontend/default/default/images/tnt/old/tnt_j.png DELETED
Binary file
skin/frontend/default/default/images/tnt/old/tnt_jd.png DELETED
Binary file
skin/frontend/default/default/images/tnt/old/tnt_jz.png DELETED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/5-puce-choix-gris2.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/_5-puce-choix-gris2.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/_picto_localiser.png ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/bt-CodePostal-1.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/bt-CodePostal-2.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/bt-CodePostal.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/bt-Continuer-1.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/bt-Continuer-2.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/bt-Continuer.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/bt-OK-1.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/bt-OK-2.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/bt-OK.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/bt-Retour.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/close_icon_double.png ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/exception.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/exception2.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/google/agenceTnt.png ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/google/red-pushpin-s.png ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/google/red-pushpin.png ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/google/relaisColis.png ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/lg_tnt.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/livreur.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/logo-tnt-petit.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/logo_24_chezmoi.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/logo_24_relaiscolis.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/logo_24h_chezmoi_RVB.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/logo_24h_relaiscolis_RVB.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/logos_24.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/loupe.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/notes.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/picto-delai.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/picto_localiser.jpg ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/tnt_logo.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_arrows_leftright.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_arrows_updown.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_close.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_doc.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_folder_closed.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_folder_open.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_minus.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_11x11_icon_plus.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_7x7_arrow_down.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_7x7_arrow_left.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_7x7_arrow_right.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/217bc0_7x7_arrow_up.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_arrows_leftright.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_arrows_updown.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_doc.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_minus.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_plus.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_11x11_icon_resize_se.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_7x7_arrow_down.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_7x7_arrow_left.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_7x7_arrow_right.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/469bdd_7x7_arrow_up.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_arrows_leftright.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_arrows_updown.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_close.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_doc.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_folder_closed.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_folder_open.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_minus.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_11x11_icon_plus.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_7x7_arrow_down.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_7x7_arrow_left.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_7x7_arrow_right.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/6da8d5_7x7_arrow_up.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/d0e5f5_40x100_textures_02_glass_75.png ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/dfeffc_40x100_textures_02_glass_85.png ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f5f8f9_40x100_textures_06_inset_hard_100.png ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_arrows_leftright.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_arrows_updown.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_close.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_doc.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_folder_closed.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_folder_open.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_minus.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_11x11_icon_plus.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_7x7_arrow_down.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_7x7_arrow_left.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_7x7_arrow_right.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/f9bd01_7x7_arrow_up.gif ADDED
Binary file
skin/frontend/default/default/images/tnt/relaisColis/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png ADDED
Binary file
skin/frontend/default/default/images/tnt/swf/banniere_TNT_0.swf ADDED
Binary file
skin/frontend/default/default/images/tnt/swf/banniere_TNT_1.swf ADDED
Binary file
skin/frontend/default/default/images/tnt/swf/banniere_TNT_2.swf ADDED
Binary file
skin/frontend/default/default/images/tnt/swf/banniere_TNT_3.swf ADDED
Binary file
skin/frontend/default/default/images/tnt/swf/banniere_TNT_4.swf ADDED
Binary file
skin/frontend/default/default/images/tnt/swf/banniere_TNT_5.swf ADDED
Binary file
skin/frontend/default/default/images/tnt/swf/banniere_TNT_6.swf ADDED
Binary file
skin/frontend/default/default/images/tnt/swf/banniere_TNT_7.swf ADDED
Binary file
skin/frontend/default/default/js/tnt/jquery-ui.js ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI 1.6
3
+ *
4
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * http://docs.jquery.com/UI
9
+ */
10
+ (function(C){var I=C.fn.remove,D=C.browser.mozilla&&(parseFloat(C.browser.version)<1.9);C.ui={version:"1.6",plugin:{add:function(K,L,N){var M=C.ui[K].prototype;for(var J in N){M.plugins[J]=M.plugins[J]||[];M.plugins[J].push([L,N[J]])}},call:function(J,L,K){var N=J.plugins[L];if(!N){return }for(var M=0;M<N.length;M++){if(J.options[N[M][0]]){N[M][1].apply(J.element,K)}}}},contains:function(L,K){var J=C.browser.safari&&C.browser.version<522;if(L.contains&&!J){return L.contains(K)}if(L.compareDocumentPosition){return !!(L.compareDocumentPosition(K)&16)}while(K=K.parentNode){if(K==L){return true}}return false},cssCache:{},css:function(J){if(C.ui.cssCache[J]){return C.ui.cssCache[J]}var K=C('<div class="ui-gen">').addClass(J).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");C.ui.cssCache[J]=!!((!(/auto|default/).test(K.css("cursor"))||(/^[1-9]/).test(K.css("height"))||(/^[1-9]/).test(K.css("width"))||!(/none/).test(K.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(K.css("backgroundColor"))));try{C("body").get(0).removeChild(K.get(0))}catch(L){}return C.ui.cssCache[J]},hasScroll:function(M,K){if(C(M).css("overflow")=="hidden"){return false}var J=(K&&K=="left")?"scrollLeft":"scrollTop",L=false;if(M[J]>0){return true}M[J]=1;L=(M[J]>0);M[J]=0;return L},isOverAxis:function(K,J,L){return(K>J)&&(K<(J+L))},isOver:function(O,K,N,M,J,L){return C.ui.isOverAxis(O,N,J)&&C.ui.isOverAxis(K,M,L)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(D){var F=C.attr,E=C.fn.removeAttr,H="http://www.w3.org/2005/07/aaa",A=/^aria-/,B=/^wairole:/;C.attr=function(K,J,L){var M=L!==undefined;return(J=="role"?(M?F.call(this,K,J,"wairole:"+L):(F.apply(this,arguments)||"").replace(B,"")):(A.test(J)?(M?K.setAttributeNS(H,J.replace(A,"aaa:"),L):F.call(this,K,J.replace(A,"aaa:"))):F.apply(this,arguments)))};C.fn.removeAttr=function(J){return(A.test(J)?this.each(function(){this.removeAttributeNS(H,J.replace(A,""))}):E.call(this,J))}}C.fn.extend({remove:function(){C("*",this).add(this).each(function(){C(this).triggerHandler("remove")});return I.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var J;if((C.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){J=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(C.curCSS(this,"position",1))&&(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}else{J=this.parents().filter(function(){return(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!J.length?C(document):J}});C.extend(C.expr[":"],{data:function(K,L,J){return C.data(K,J[3])},tabbable:function(L,M,K){var N=L.nodeName.toLowerCase();function J(O){return !(C(O).is(":hidden")||C(O).parents(":hidden").length)}return(L.tabIndex>=0&&(("a"==N&&L.href)||(/input|select|textarea|button/.test(N)&&"hidden"!=L.type&&!L.disabled))&&J(L))}});function G(M,N,O,L){function K(Q){var P=C[M][N][Q]||[];return(typeof P=="string"?P.split(/,?\s+/):P)}var J=K("getter");if(L.length==1&&typeof L[0]=="string"){J=J.concat(K("getterSetter"))}return(C.inArray(O,J)!=-1)}C.widget=function(K,J){var L=K.split(".")[0];K=K.split(".")[1];C.fn[K]=function(P){var N=(typeof P=="string"),O=Array.prototype.slice.call(arguments,1);if(N&&P.substring(0,1)=="_"){return this}if(N&&G(L,K,P,O)){var M=C.data(this[0],K);return(M?M[P].apply(M,O):undefined)}return this.each(function(){var Q=C.data(this,K);(!Q&&!N&&C.data(this,K,new C[L][K](this,P)));(Q&&N&&C.isFunction(Q[P])&&Q[P].apply(Q,O))})};C[L]=C[L]||{};C[L][K]=function(O,N){var M=this;this.widgetName=K;this.widgetEventPrefix=C[L][K].eventPrefix||K;this.widgetBaseClass=L+"-"+K;this.options=C.extend({},C.widget.defaults,C[L][K].defaults,C.metadata&&C.metadata.get(O)[K],N);this.element=C(O).bind("setData."+K,function(Q,P,R){return M._setData(P,R)}).bind("getData."+K,function(Q,P){return M._getData(P)}).bind("remove",function(){return M.destroy()});this._init()};C[L][K].prototype=C.extend({},C.widget.prototype,J);C[L][K].getterSetter="option"};C.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName)},option:function(L,M){var K=L,J=this;if(typeof L=="string"){if(M===undefined){return this._getData(L)}K={};K[L]=M}C.each(K,function(N,O){J._setData(N,O)})},_getData:function(J){return this.options[J]},_setData:function(J,K){this.options[J]=K;if(J=="disabled"){this.element[K?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(K,L,M){var J=(K==this.widgetEventPrefix?K:this.widgetEventPrefix+K);L=L||C.event.fix({type:J,target:this.element[0]});return this.element.triggerHandler(J,[L,M],this.options[K])}};C.widget.defaults={disabled:false};C.ui.mouse={_mouseInit:function(){var J=this;this.element.bind("mousedown."+this.widgetName,function(K){return J._mouseDown(K)}).bind("click."+this.widgetName,function(K){if(J._preventClickEvent){J._preventClickEvent=false;return false}});if(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(L){(this._mouseStarted&&this._mouseUp(L));this._mouseDownEvent=L;var K=this,M=(L.which==1),J=(typeof this.options.cancel=="string"?C(L.target).parents().add(L.target).filter(this.options.cancel).length:false);if(!M||J||!this._mouseCapture(L)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){K.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(L)&&this._mouseDelayMet(L)){this._mouseStarted=(this._mouseStart(L)!==false);if(!this._mouseStarted){L.preventDefault();return true}}this._mouseMoveDelegate=function(N){return K._mouseMove(N)};this._mouseUpDelegate=function(N){return K._mouseUp(N)};C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);if(!C.browser.safari){L.preventDefault()}return true},_mouseMove:function(J){if(C.browser.msie&&!J.button){return this._mouseUp(J)}if(this._mouseStarted){this._mouseDrag(J);return J.preventDefault()}if(this._mouseDistanceMet(J)&&this._mouseDelayMet(J)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,J)!==false);(this._mouseStarted?this._mouseDrag(J):this._mouseUp(J))}return !this._mouseStarted},_mouseUp:function(J){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=true;this._mouseStop(J)}return false},_mouseDistanceMet:function(J){return(Math.max(Math.abs(this._mouseDownEvent.pageX-J.pageX),Math.abs(this._mouseDownEvent.pageY-J.pageY))>=this.options.distance)},_mouseDelayMet:function(J){return this.mouseDelayMet},_mouseStart:function(J){},_mouseDrag:function(J){},_mouseStop:function(J){},_mouseCapture:function(J){return true}};C.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);/*
11
+ * jQuery UI Draggable 1.6
12
+ *
13
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
14
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
15
+ * and GPL (GPL-LICENSE.txt) licenses.
16
+ *
17
+ * http://docs.jquery.com/UI/Draggables
18
+ *
19
+ * Depends:
20
+ * ui.core.js
21
+ */
22
+ (function(A){A.widget("ui.draggable",A.extend({},A.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(B){var C=this.options;if(this.helper||C.disabled||A(B.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(B);if(!this.handle){return false}return true},_mouseStart:function(B){var C=this.options;this.helper=this._createHelper(B);this._cacheHelperProportions();if(A.ui.ddmanager){A.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};A.extend(this.offset,{click:{left:B.pageX-this.offset.left,top:B.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});if(C.cursorAt){this._adjustOffsetFromHelper(C.cursorAt)}this.originalPosition=this._generatePosition(B);if(C.containment){this._setContainment()}this._propagate("start",B);this._cacheHelperProportions();if(A.ui.ddmanager&&!C.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,B)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(B,true);return true},_mouseDrag:function(B,C){this.position=this._generatePosition(B);this.positionAbs=this._convertPositionTo("absolute");if(!C){this.position=this._propagate("drag",B)||this.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},_mouseStop:function(C){var D=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){var D=A.ui.ddmanager.drop(this,C)}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true||(A.isFunction(this.options.revert)&&this.options.revert.call(this.element,D))){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){B._propagate("stop",C);B._clear()})}else{this._propagate("stop",C);this._clear()}return false},_getHandle:function(B){var C=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==B.target){C=true}});return C},_createHelper:function(C){var D=this.options;var B=A.isFunction(D.helper)?A(D.helper.apply(this.element[0],[C])):(D.helper=="clone"?this.element.clone():this.element);if(!B.parents("body").length){B.appendTo((D.appendTo=="parent"?this.element[0].parentNode:D.appendTo))}if(B[0]!=this.element[0]&&!(/(fixed|absolute)/).test(B.css("position"))){B.css("position","absolute")}return B},_adjustOffsetFromHelper:function(B){if(B.left!=undefined){this.offset.click.left=B.left+this.margins.left}if(B.right!=undefined){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if(B.top!=undefined){this.offset.click.top=B.top+this.margins.top}if(B.bottom!=undefined){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if((this.offsetParent[0]==document.body&&A.browser.mozilla)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie)){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.element.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var E=this.options;if(E.containment=="parent"){E.containment=this.helper[0].parentNode}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(E.containment)){var C=A(E.containment)[0];var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.margins.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.margins.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left,D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(D,F){if(!F){F=this.position}var C=D=="absolute"?1:-1;var B=this[(this.cssPosition=="absolute"?"offset":"scroll")+"Parent"],E=(/(html|body)/i).test(B[0].tagName);return{top:(F.top+this.offset.relative.top*C+this.offset.parent.top*C+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(E?0:B.scrollTop()))*C+this.margins.top*C),left:(F.left+this.offset.relative.left*C+this.offset.parent.left*C+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():(E?0:B.scrollLeft()))*C+this.margins.left*C)}},_generatePosition:function(D){var G=this.options,C=this[(this.cssPosition=="absolute"?"offset":"scroll")+"Parent"],H=(/(html|body)/i).test(C[0].tagName);var B={top:(D.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(H?0:C.scrollTop()))),left:(D.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():H?0:C.scrollLeft()))};if(!this.originalPosition){return B}if(this.containment){if(B.left<this.containment[0]){B.left=this.containment[0]}if(B.top<this.containment[1]){B.top=this.containment[1]}if(B.left>this.containment[2]){B.left=this.containment[2]}if(B.top>this.containment[3]){B.top=this.containment[3]}}if(G.grid){var F=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/G.grid[1])*G.grid[1];B.top=this.containment?(!(F<this.containment[1]||F>this.containment[3])?F:(!(F<this.containment[1])?F-G.grid[1]:F+G.grid[1])):F;var E=this.originalPosition.left+Math.round((B.left-this.originalPosition.left)/G.grid[0])*G.grid[0];B.left=this.containment?(!(E<this.containment[0]||E>this.containment[2])?E:(!(E<this.containment[0])?E-G.grid[0]:E+G.grid[0])):E}return B},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this._uiHash()]);if(C=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return this.element.triggerHandler(C=="drag"?C:"drag"+C,[B,this._uiHash()],this.options[C])},plugins:{},_uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}}}));A.extend(A.ui.draggable,{version:"1.6",defaults:{appendTo:"parent",axis:false,cancel:":input",connectToSortable:false,containment:false,cssNamespace:"ui",cursor:"default",cursorAt:null,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:1,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:null}});A.ui.plugin.add("draggable","connectToSortable",{start:function(B,D){var C=A(this).data("draggable");C.sortables=[];A(D.options.connectToSortable).each(function(){A(this+"").each(function(){if(A.data(this,"sortable")){var E=A.data(this,"sortable");C.sortables.push({instance:E,shouldRevert:E.options.revert});E._refreshItems();E._propagate("activate",B,C)}})})},stop:function(B,D){var C=A(this).data("draggable");A.each(C.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;C.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(B);this.instance.element.triggerHandler("sortreceive",[B,A.extend(this.instance._ui(),{sender:C.element})],this.instance.options["receive"]);this.instance.options.helper=this.instance.options._helper;if(C.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._propagate("deactivate",B,C)}})},drag:function(C,F){var E=A(this).data("draggable"),B=this;var D=function(I){var N=this.offset.click.top,M=this.offset.click.left;var G=this.positionAbs.top,K=this.positionAbs.left;var J=I.height,L=I.width;var O=I.top,H=I.left;return A.ui.isOver(G+N,K+M,O,H,J,L)};A.each(E.sortables,function(G){if(D.call(E,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return F.helper[0]};C.target=this.instance.currentItem[0];this.instance._mouseCapture(C,true);this.instance._mouseStart(C,true,true);this.instance.offset.click.top=E.offset.click.top;this.instance.offset.click.left=E.offset.click.left;this.instance.offset.parent.left-=E.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=E.offset.parent.top-this.instance.offset.parent.top;E._propagate("toSortable",C)}if(this.instance.currentItem){this.instance._mouseDrag(C)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._mouseStop(C,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}E._propagate("fromSortable",C)}}})}});A.ui.plugin.add("draggable","cursor",{start:function(C,D){var B=A("body");if(B.css("cursor")){D.options._cursor=B.css("cursor")}B.css("cursor",D.options.cursor)},stop:function(B,C){if(C.options._cursor){A("body").css("cursor",C.options._cursor)}}});A.ui.plugin.add("draggable","iframeFix",{start:function(B,C){A(C.options.iframeFix===true?"iframe":C.options.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(B,C){A("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","opacity",{start:function(C,D){var B=A(D.helper);if(B.css("opacity")){D.options._opacity=B.css("opacity")}B.css("opacity",D.options.opacity)},stop:function(B,C){if(C.options._opacity){A(C.helper).css("opacity",C.options._opacity)}}});A.ui.plugin.add("draggable","scroll",{start:function(C,D){var E=D.options;var B=A(this).data("draggable");if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},drag:function(D,E){var F=E.options,B=false;var C=A(this).data("draggable");if(C.scrollParent[0]!=document&&C.scrollParent[0].tagName!="HTML"){if((C.overflowOffset.top+C.scrollParent[0].offsetHeight)-D.pageY<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop+F.scrollSpeed}else{if(D.pageY-C.overflowOffset.top<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop-F.scrollSpeed}}if((C.overflowOffset.left+C.scrollParent[0].offsetWidth)-D.pageX<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft+F.scrollSpeed}else{if(D.pageX-C.overflowOffset.left<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft-F.scrollSpeed}}}else{if(D.pageY-A(document).scrollTop()<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-F.scrollSpeed)}else{if(A(window).height()-(D.pageY-A(document).scrollTop())<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()+F.scrollSpeed)}}if(D.pageX-A(document).scrollLeft()<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-F.scrollSpeed)}else{if(A(window).width()-(D.pageX-A(document).scrollLeft())<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+F.scrollSpeed)}}}if(B!==false&&A.ui.ddmanager&&!F.dropBehaviour){A.ui.ddmanager.prepareOffsets(C,D)}if(B!==false&&C.cssPosition=="absolute"&&C.scrollParent[0]!=document&&A.ui.contains(C.scrollParent[0],C.offsetParent[0])){C.offset.parent=C._getParentOffset()}if(B!==false&&C.cssPosition=="relative"&&!(C.scrollParent[0]!=document&&C.scrollParent[0]!=C.offsetParent[0])){C.offset.relative=C._getRelativeOffset()}}});A.ui.plugin.add("draggable","snap",{start:function(B,D){var C=A(this).data("draggable");C.snapElements=[];A(D.options.snap.constructor!=String?(D.options.snap.items||":data(draggable)"):D.options.snap).each(function(){var F=A(this);var E=F.offset();if(this!=C.element[0]){C.snapElements.push({item:this,width:F.outerWidth(),height:F.outerHeight(),top:E.top,left:E.left})}})},drag:function(M,K){var E=A(this).data("draggable");var Q=K.options.snapTolerance;var P=K.absolutePosition.left,O=P+E.helperProportions.width,D=K.absolutePosition.top,C=D+E.helperProportions.height;for(var N=E.snapElements.length-1;N>=0;N--){var L=E.snapElements[N].left,J=L+E.snapElements[N].width,I=E.snapElements[N].top,S=I+E.snapElements[N].height;if(!((L-Q<P&&P<J+Q&&I-Q<D&&D<S+Q)||(L-Q<P&&P<J+Q&&I-Q<C&&C<S+Q)||(L-Q<O&&O<J+Q&&I-Q<D&&D<S+Q)||(L-Q<O&&O<J+Q&&I-Q<C&&C<S+Q))){if(E.snapElements[N].snapping){(E.options.snap.release&&E.options.snap.release.call(E.element,M,A.extend(E._uiHash(),{snapItem:E.snapElements[N].item})))}E.snapElements[N].snapping=false;continue}if(K.options.snapMode!="inner"){var B=Math.abs(I-C)<=Q;var R=Math.abs(S-D)<=Q;var G=Math.abs(L-O)<=Q;var H=Math.abs(J-P)<=Q;if(B){K.position.top=E._convertPositionTo("relative",{top:I-E.helperProportions.height,left:0}).top}if(R){K.position.top=E._convertPositionTo("relative",{top:S,left:0}).top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:L-E.helperProportions.width}).left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J}).left}}var F=(B||R||G||H);if(K.options.snapMode!="outer"){var B=Math.abs(I-D)<=Q;var R=Math.abs(S-C)<=Q;var G=Math.abs(L-P)<=Q;var H=Math.abs(J-O)<=Q;if(B){K.position.top=E._convertPositionTo("relative",{top:I,left:0}).top}if(R){K.position.top=E._convertPositionTo("relative",{top:S-E.helperProportions.height,left:0}).top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:L}).left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J-E.helperProportions.width}).left}}if(!E.snapElements[N].snapping&&(B||R||G||H||F)){(E.options.snap.snap&&E.options.snap.snap.call(E.element,M,A.extend(E._uiHash(),{snapItem:E.snapElements[N].item})))}E.snapElements[N].snapping=(B||R||G||H||F)}}});A.ui.plugin.add("draggable","stack",{start:function(B,C){var D=A.makeArray(A(C.options.stack.group)).sort(function(F,E){return(parseInt(A(F).css("zIndex"),10)||C.options.stack.min)-(parseInt(A(E).css("zIndex"),10)||C.options.stack.min)});A(D).each(function(E){this.style.zIndex=C.options.stack.min+E});this[0].style.zIndex=C.options.stack.min+D.length}});A.ui.plugin.add("draggable","zIndex",{start:function(C,D){var B=A(D.helper);if(B.css("zIndex")){D.options._zIndex=B.css("zIndex")}B.css("zIndex",D.options.zIndex)},stop:function(B,C){if(C.options._zIndex){A(C.helper).css("zIndex",C.options._zIndex)}}})})(jQuery);/*
23
+ * jQuery UI Droppable 1.6
24
+ *
25
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
26
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
27
+ * and GPL (GPL-LICENSE.txt) licenses.
28
+ *
29
+ * http://docs.jquery.com/UI/Droppables
30
+ *
31
+ * Depends:
32
+ * ui.core.js
33
+ * ui.draggable.js
34
+ */
35
+ (function(A){A.widget("ui.droppable",{_init:function(){var C=this.options,B=C.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&A.isFunction(this.options.accept)?this.options.accept:function(D){return D.is(B)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};A.ui.ddmanager.droppables[this.options.scope]=A.ui.ddmanager.droppables[this.options.scope]||[];A.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-droppable"))},destroy:function(){var B=A.ui.ddmanager.droppables[this.options.scope];for(var C=0;C<B.length;C++){if(B[C]==this){B.splice(C,1)}}this.element.removeClass("ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(B,C){if(B=="accept"){this.options.accept=C&&A.isFunction(C)?C:function(D){return D.is(accept)}}else{A.widget.prototype._setData.apply(this,arguments)}},_activate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"activate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropactivate",[C,this.ui(B)],this.options.activate)}},_deactivate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"deactivate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropdeactivate",[C,this.ui(B)],this.options.deactivate)}},_over:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"over",[C,this.ui(B)]);this.element.triggerHandler("dropover",[C,this.ui(B)],this.options.over)}},_out:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"out",[C,this.ui(B)]);this.element.triggerHandler("dropout",[C,this.ui(B)],this.options.out)}},_drop:function(C,D){var B=D||A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return false}var E=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var F=A.data(this,"droppable");if(F.options.greedy&&A.ui.intersect(B,A.extend(F,{offset:F.element.offset()}),F.options.tolerance)){E=true;return false}});if(E){return false}if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"drop",[C,this.ui(B)]);this.element.triggerHandler("drop",[C,this.ui(B)],this.options.drop);return this.element}return false},plugins:{},ui:function(B){return{draggable:(B.currentItem||B.element),helper:B.helper,position:B.position,absolutePosition:B.positionAbs,options:this.options,element:this.element}}});A.extend(A.ui.droppable,{version:"1.6",defaults:{accept:"*",activeClass:null,cssNamespace:"ui",greedy:false,hoverClass:null,scope:"default",tolerance:"intersect"}});A.ui.intersect=function(O,I,M){if(!I.offset){return false}var D=(O.positionAbs||O.position.absolute).left,C=D+O.helperProportions.width,L=(O.positionAbs||O.position.absolute).top,K=L+O.helperProportions.height;var F=I.offset.left,B=F+I.proportions.width,N=I.offset.top,J=N+I.proportions.height;switch(M){case"fit":return(F<D&&C<B&&N<L&&K<J);break;case"intersect":return(F<D+(O.helperProportions.width/2)&&C-(O.helperProportions.width/2)<B&&N<L+(O.helperProportions.height/2)&&K-(O.helperProportions.height/2)<J);break;case"pointer":var G=((O.positionAbs||O.position.absolute).left+(O.clickOffset||O.offset.click).left),H=((O.positionAbs||O.position.absolute).top+(O.clickOffset||O.offset.click).top),E=A.ui.isOver(H,G,N,F,I.proportions.height,I.proportions.width);return E;break;case"touch":return((L>=N&&L<=J)||(K>=N&&K<=J)||(L<N&&K>J))&&((D>=F&&D<=B)||(C>=F&&C<=B)||(D<F&&C>B));break;default:return false;break}};A.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(E,G){var B=A.ui.ddmanager.droppables[E.options.scope];var F=G?G.type:null;var H=(E.currentItem||E.element).find(":data(droppable)").andSelf();droppablesLoop:for(var D=0;D<B.length;D++){if(B[D].options.disabled||(E&&!B[D].options.accept.call(B[D].element,(E.currentItem||E.element)))){continue}for(var C=0;C<H.length;C++){if(H[C]==B[D].element[0]){B[D].proportions.height=0;continue droppablesLoop}}B[D].visible=B[D].element.css("display")!="none";if(!B[D].visible){continue}B[D].offset=B[D].element.offset();B[D].proportions={width:B[D].element[0].offsetWidth,height:B[D].element[0].offsetHeight};if(F=="dragstart"||F=="sortactivate"){B[D]._activate.call(B[D],G)}}},drop:function(B,C){var D=false;A.each(A.ui.ddmanager.droppables[B.options.scope],function(){if(!this.options){return }if(!this.options.disabled&&this.visible&&A.ui.intersect(B,this,this.options.tolerance)){D=this._drop.call(this,C)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element,(B.currentItem||B.element))){this.isout=1;this.isover=0;this._deactivate.call(this,C)}});return D},drag:function(B,C){if(B.options.refreshPositions){A.ui.ddmanager.prepareOffsets(B,C)}A.each(A.ui.ddmanager.droppables[B.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return }var E=A.ui.intersect(B,this,this.options.tolerance);var G=!E&&this.isover==1?"isout":(E&&this.isover==0?"isover":null);if(!G){return }var F;if(this.options.greedy){var D=this.element.parents(":data(droppable):eq(0)");if(D.length){F=A.data(D[0],"droppable");F.greedyChild=(G=="isover"?1:0)}}if(F&&G=="isover"){F["isover"]=0;F["isout"]=1;F._out.call(F,C)}this[G]=1;this[G=="isout"?"isover":"isout"]=0;this[G=="isover"?"_over":"_out"].call(this,C);if(F&&G=="isout"){F["isout"]=0;F["isover"]=1;F._over.call(F,C)}})}};A.ui.plugin.add("droppable","activeClass",{activate:function(B,C){A(this).addClass(C.options.activeClass)},deactivate:function(B,C){A(this).removeClass(C.options.activeClass)},drop:function(B,C){A(this).removeClass(C.options.activeClass)}});A.ui.plugin.add("droppable","hoverClass",{over:function(B,C){A(this).addClass(C.options.hoverClass)},out:function(B,C){A(this).removeClass(C.options.hoverClass)},drop:function(B,C){A(this).removeClass(C.options.hoverClass)}})})(jQuery);/*
36
+ * jQuery UI Resizable 1.6
37
+ *
38
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
39
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
40
+ * and GPL (GPL-LICENSE.txt) licenses.
41
+ *
42
+ * http://docs.jquery.com/UI/Resizables
43
+ *
44
+ * Depends:
45
+ * ui.core.js
46
+ */
47
+ (function(B){B.widget("ui.resizable",B.extend({},B.ui.mouse,{_init:function(){var N=this,O=this.options;var R=this.element.css("position");this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(R)?"relative":R});B.extend(O,{_aspectRatio:!!(O.aspectRatio),helper:O.helper||O.ghost||O.animate?O.helper||"ui-resizable-helper":null,knobHandles:O.knobHandles===true?"ui-resizable-knob-handle":O.knobHandles});var I="1px solid #DEDEDE";O.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0px",borderTop:I},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:I},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:I},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:I},"ui-resizable-se":{cursor:"se-resize",width:"4px",height:"4px",borderRight:I,borderBottom:I},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:I,borderLeft:I},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:I,borderTop:I},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:I,borderTop:I}};O.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"0px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"0px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"0px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"0px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"0px",bottom:"0px"},"ui-resizable-sw":{cursor:"sw-resize",left:"0px",bottom:"0px"},"ui-resizable-nw":{cursor:"nw-resize",left:"0px",top:"0px"},"ui-resizable-ne":{cursor:"ne-resize",right:"0px",top:"0px"}};O._nodeName=this.element[0].nodeName;if(O._nodeName.match(/canvas|textarea|input|select|button|img/i)){var C=this.element;if(/relative/.test(C.css("position"))&&B.browser.opera){C.css({position:"relative",top:"auto",left:"auto"})}C.wrap(B('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:C.css("position"),width:C.outerWidth(),height:C.outerHeight(),top:C.css("top"),left:C.css("left")}));var K=this.element;this.element=this.element.parent();this.element.data("resizable",this);this.element.css({marginLeft:K.css("marginLeft"),marginTop:K.css("marginTop"),marginRight:K.css("marginRight"),marginBottom:K.css("marginBottom")});K.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(B.browser.safari&&O.preventDefault){K.css("resize","none")}O.proportionallyResize=K.css({position:"static",zoom:1,display:"block"});this.element.css({margin:K.css("margin")});this._proportionallyResize()}if(!O.handles){O.handles=!B(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}}if(O.handles.constructor==String){O.zIndex=O.zIndex||1000;if(O.handles=="all"){O.handles="n,e,s,w,se,sw,ne,nw"}var P=O.handles.split(",");O.handles={};var H={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var S=0;S<P.length;S++){var T=B.trim(P[S]),M=O.defaultTheme,G="ui-resizable-"+T,D=!B.ui.css(G)&&!O.knobHandles,Q=B.ui.css("ui-resizable-knob-handle"),U=B.extend(M[G],M["ui-resizable-handle"]),E=B.extend(O.knobTheme[G],!Q?O.knobTheme["ui-resizable-handle"]:{});var L=/sw|se|ne|nw/.test(T)?{zIndex:++O.zIndex}:{};var J=(D?H[T]:""),F=B(['<div class="ui-resizable-handle ',G,'" style="',J,H.handle,'"></div>'].join("")).css(L);O.handles[T]=".ui-resizable-"+T;this.element.append(F.css(D?U:{}).css(O.knobHandles?E:{}).addClass(O.knobHandles?"ui-resizable-knob-handle":"").addClass(O.knobHandles))}if(O.knobHandles){this.element.addClass("ui-resizable-knob").css(!B.ui.css("ui-resizable-knob")?{}:{})}}this._renderAxis=function(Z){Z=Z||this.element;for(var W in O.handles){if(O.handles[W].constructor==String){O.handles[W]=B(O.handles[W],this.element).show()}if(O.transparent){O.handles[W].css({opacity:0})}if(this.element.is(".ui-wrapper")&&O._nodeName.match(/textarea|input|select|button/i)){var X=B(O.handles[W],this.element),Y=0;Y=/sw|ne|nw|se|n|s/.test(W)?X.outerHeight():X.outerWidth();var V=["padding",/ne|nw|n/.test(W)?"Top":/se|sw|s/.test(W)?"Bottom":/^e$/.test(W)?"Right":"Left"].join("");if(!O.transparent){Z.css(V,Y)}this._proportionallyResize()}if(!B(O.handles[W]).length){continue}}};this._renderAxis(this.element);O._handles=B(".ui-resizable-handle",N.element);if(O.disableSelection){O._handles.disableSelection()}O._handles.mouseover(function(){if(!O.resizing){if(this.className){var V=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}N.axis=O.axis=V&&V[1]?V[1]:"se"}});if(O.autoHide){O._handles.hide();B(N.element).addClass("ui-resizable-autohide").hover(function(){B(this).removeClass("ui-resizable-autohide");O._handles.show()},function(){if(!O.resizing){B(this).addClass("ui-resizable-autohide");O._handles.hide()}})}this._mouseInit()},destroy:function(){var E=this.element,D=E.children(".ui-resizable").get(0);this._mouseDestroy();var C=function(F){B(F).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};C(E);if(E.is(".ui-wrapper")&&D){E.parent().append(B(D).css({position:E.css("position"),width:E.outerWidth(),height:E.outerHeight(),top:E.css("top"),left:E.css("left")})).end().remove();C(D)}},_mouseCapture:function(D){if(this.options.disabled){return false}var E=false;for(var C in this.options.handles){if(B(this.options.handles[C])[0]==D.target){E=true}}if(!E){return false}return true},_mouseStart:function(D){var E=this.options,C=this.element.position(),F=this.element,I=B.browser.msie&&B.browser.version<7;E.resizing=true;E.documentScroll={top:B(document).scrollTop(),left:B(document).scrollLeft()};if(F.is(".ui-draggable")||(/absolute/).test(F.css("position"))){var K=B.browser.msie&&!E.containment&&(/absolute/).test(F.css("position"))&&!(/relative/).test(F.parent().css("position"));var L=K?this.documentScroll.top:0,H=K?this.documentScroll.left:0;F.css({position:"absolute",top:(C.top+L),left:(C.left+H)})}if(B.browser.opera&&(/relative/).test(F.css("position"))){F.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var M=A(this.helper.css("left")),G=A(this.helper.css("top"));if(E.containment){M+=B(E.containment).scrollLeft()||0;G+=B(E.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:M,top:G};this.size=E.helper||I?{width:F.outerWidth(),height:F.outerHeight()}:{width:F.width(),height:F.height()};this.originalSize=E.helper||I?{width:F.outerWidth(),height:F.outerHeight()}:{width:F.width(),height:F.height()};this.originalPosition={left:M,top:G};this.sizeDiff={width:F.outerWidth()-F.width(),height:F.outerHeight()-F.height()};this.originalMousePosition={left:D.pageX,top:D.pageY};E.aspectRatio=(typeof E.aspectRatio=="number")?E.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);if(E.preserveCursor){var J=B(".ui-resizable-"+this.axis).css("cursor");B("body").css("cursor",J=="auto"?this.axis+"-resize":J)}this._propagate("start",D);return true},_mouseDrag:function(C){var F=this.helper,E=this.options,K={},N=this,H=this.originalMousePosition,L=this.axis;var O=(C.pageX-H.left)||0,M=(C.pageY-H.top)||0;var G=this._change[L];if(!G){return false}var J=G.apply(this,[C,O,M]),I=B.browser.msie&&B.browser.version<7,D=this.sizeDiff;if(E._aspectRatio||C.shiftKey){J=this._updateRatio(J,C)}J=this._respectSize(J,C);this._propagate("resize",C);F.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!E.helper&&E.proportionallyResize){this._proportionallyResize()}this._updateCache(J);this.element.triggerHandler("resize",[C,this.ui()],this.options["resize"]);return false},_mouseStop:function(F){this.options.resizing=false;var G=this.options,K=this;if(G.helper){var E=G.proportionallyResize,C=E&&(/textarea/i).test(E.get(0).nodeName),D=C&&B.ui.hasScroll(E.get(0),"left")?0:K.sizeDiff.height,I=C?0:K.sizeDiff.width;var L={width:(K.size.width-I),height:(K.size.height-D)},H=(parseInt(K.element.css("left"),10)+(K.position.left-K.originalPosition.left))||null,J=(parseInt(K.element.css("top"),10)+(K.position.top-K.originalPosition.top))||null;if(!G.animate){this.element.css(B.extend(L,{top:J,left:H}))}if(G.helper&&!G.animate){this._proportionallyResize()}}if(G.preserveCursor){B("body").css("cursor","auto")}this._propagate("stop",F);if(G.helper){this.helper.remove()}return false},_updateCache:function(C){var D=this.options;this.offset=this.helper.offset();if(C.left){this.position.left=C.left}if(C.top){this.position.top=C.top}if(C.height){this.size.height=C.height}if(C.width){this.size.width=C.width}},_updateRatio:function(F,E){var G=this.options,H=this.position,D=this.size,C=this.axis;if(F.height){F.width=(D.height*G.aspectRatio)}else{if(F.width){F.height=(D.width/G.aspectRatio)}}if(C=="sw"){F.left=H.left+(D.width-F.width);F.top=null}if(C=="nw"){F.top=H.top+(D.height-F.height);F.left=H.left+(D.width-F.width)}return F},_respectSize:function(J,E){var H=this.helper,G=this.options,O=G._aspectRatio||E.shiftKey,N=this.axis,Q=J.width&&G.maxWidth&&G.maxWidth<J.width,K=J.height&&G.maxHeight&&G.maxHeight<J.height,F=J.width&&G.minWidth&&G.minWidth>J.width,P=J.height&&G.minHeight&&G.minHeight>J.height;if(F){J.width=G.minWidth}if(P){J.height=G.minHeight}if(Q){J.width=G.maxWidth}if(K){J.height=G.maxHeight}var D=this.originalPosition.left+this.originalSize.width,M=this.position.top+this.size.height;var I=/sw|nw|w/.test(N),C=/nw|ne|n/.test(N);if(F&&I){J.left=D-G.minWidth}if(Q&&I){J.left=D-G.maxWidth}if(P&&C){J.top=M-G.minHeight}if(K&&C){J.top=M-G.maxHeight}var L=!J.width&&!J.height;if(L&&!J.left&&J.top){J.top=null}else{if(L&&!J.top&&J.left){J.left=null}}return J},_proportionallyResize:function(){var G=this.options;if(!G.proportionallyResize){return }var E=G.proportionallyResize,D=this.helper||this.element;if(!G.borderDif){var C=[E.css("borderTopWidth"),E.css("borderRightWidth"),E.css("borderBottomWidth"),E.css("borderLeftWidth")],F=[E.css("paddingTop"),E.css("paddingRight"),E.css("paddingBottom"),E.css("paddingLeft")];G.borderDif=B.map(C,function(H,J){var I=parseInt(H,10)||0,K=parseInt(F[J],10)||0;return I+K})}E.css({height:(D.height()-G.borderDif[0]-G.borderDif[2])+"px",width:(D.width()-G.borderDif[1]-G.borderDif[3])+"px"})},_renderProxy:function(){var D=this.element,G=this.options;this.elementOffset=D.offset();if(G.helper){this.helper=this.helper||B('<div style="overflow:hidden;"></div>');var C=B.browser.msie&&B.browser.version<7,E=(C?1:0),F=(C?2:-1);this.helper.addClass(G.helper).css({width:D.outerWidth()+F,height:D.outerHeight()+F,position:"absolute",left:this.elementOffset.left-E+"px",top:this.elementOffset.top-E+"px",zIndex:++G.zIndex});this.helper.appendTo("body");if(G.disableSelection){this.helper.disableSelection()}}else{this.helper=D}},_change:{e:function(E,D,C){return{width:this.originalSize.width+D}},w:function(F,D,C){var H=this.options,E=this.originalSize,G=this.originalPosition;return{left:G.left+D,width:E.width-D}},n:function(F,D,C){var H=this.options,E=this.originalSize,G=this.originalPosition;return{top:G.top+C,height:E.height-C}},s:function(E,D,C){return{height:this.originalSize.height+C}},se:function(E,D,C){return B.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[E,D,C]))},sw:function(E,D,C){return B.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[E,D,C]))},ne:function(E,D,C){return B.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[E,D,C]))},nw:function(E,D,C){return B.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[E,D,C]))}},_propagate:function(D,C){B.ui.plugin.call(this,D,[C,this.ui()]);if(D!="resize"){this.element.triggerHandler(["resize",D].join(""),[C,this.ui()],this.options[D])}},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));B.extend(B.ui.resizable,{version:"1.6",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input",containment:false,disableSelection:true,distance:1,delay:0,ghost:false,grid:false,knobHandles:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,preserveCursor:true,preventDefault:true,proportionallyResize:false,transparent:false}});B.ui.plugin.add("resizable","alsoResize",{start:function(D,E){var G=E.options,C=B(this).data("resizable"),F=function(H){B(H).each(function(){B(this).data("resizable-alsoresize",{width:parseInt(B(this).width(),10),height:parseInt(B(this).height(),10),left:parseInt(B(this).css("left"),10),top:parseInt(B(this).css("top"),10)})})};if(typeof (G.alsoResize)=="object"&&!G.alsoResize.parentNode){if(G.alsoResize.length){G.alsoResize=G.alsoResize[0];F(G.alsoResize)}else{B.each(G.alsoResize,function(H,I){F(H)})}}else{F(G.alsoResize)}},resize:function(E,G){var H=G.options,D=B(this).data("resizable"),F=D.originalSize,J=D.originalPosition;var I={height:(D.size.height-F.height)||0,width:(D.size.width-F.width)||0,top:(D.position.top-J.top)||0,left:(D.position.left-J.left)||0},C=function(K,L){B(K).each(function(){var O=B(this).data("resizable-alsoresize"),N={},M=L&&L.length?L:["width","height","top","left"];B.each(M||["width","height","top","left"],function(P,R){var Q=(O[R]||0)+(I[R]||0);if(Q&&Q>=0){N[R]=Q||null}});B(this).css(N)})};if(typeof (H.alsoResize)=="object"&&!H.alsoResize.parentNode){B.each(H.alsoResize,function(K,L){C(K,L)})}else{C(H.alsoResize)}},stop:function(C,D){B(this).removeData("resizable-alsoresize-start")}});B.ui.plugin.add("resizable","animate",{stop:function(G,L){var H=L.options,M=B(this).data("resizable");var F=H.proportionallyResize,C=F&&(/textarea/i).test(F.get(0).nodeName),D=C&&B.ui.hasScroll(F.get(0),"left")?0:M.sizeDiff.height,J=C?0:M.sizeDiff.width;var E={width:(M.size.width-J),height:(M.size.height-D)},I=(parseInt(M.element.css("left"),10)+(M.position.left-M.originalPosition.left))||null,K=(parseInt(M.element.css("top"),10)+(M.position.top-M.originalPosition.top))||null;M.element.animate(B.extend(E,K&&I?{top:K,left:I}:{}),{duration:H.animateDuration,easing:H.animateEasing,step:function(){var N={width:parseInt(M.element.css("width"),10),height:parseInt(M.element.css("height"),10),top:parseInt(M.element.css("top"),10),left:parseInt(M.element.css("left"),10)};if(F){F.css({width:N.width,height:N.height})}M._updateCache(N);M._propagate("animate",G)}})}});B.ui.plugin.add("resizable","containment",{start:function(D,N){var H=N.options,P=B(this).data("resizable"),J=P.element;var E=H.containment,I=(E instanceof B)?E.get(0):(/parent/.test(E))?J.parent().get(0):E;if(!I){return }P.containerElement=B(I);if(/document/.test(E)||E==document){P.containerOffset={left:0,top:0};P.containerPosition={left:0,top:0};P.parentData={element:B(document),left:0,top:0,width:B(document).width(),height:B(document).height()||document.body.parentNode.scrollHeight}}else{var L=B(I),G=[];B(["Top","Right","Left","Bottom"]).each(function(R,Q){G[R]=A(L.css("padding"+Q))});P.containerOffset=L.offset();P.containerPosition=L.position();P.containerSize={height:(L.innerHeight()-G[3]),width:(L.innerWidth()-G[1])};var M=P.containerOffset,C=P.containerSize.height,K=P.containerSize.width,F=(B.ui.hasScroll(I,"left")?I.scrollWidth:K),O=(B.ui.hasScroll(I)?I.scrollHeight:C);P.parentData={element:I,left:M.left,top:M.top,width:F,height:O}}},resize:function(E,N){var G=N.options,Q=B(this).data("resizable"),D=Q.containerSize,M=Q.containerOffset,K=Q.size,L=Q.position,O=G._aspectRatio||E.shiftKey,C={top:0,left:0},F=Q.containerElement;if(F[0]!=document&&(/static/).test(F.css("position"))){C=M}if(L.left<(G.helper?M.left:0)){Q.size.width=Q.size.width+(G.helper?(Q.position.left-M.left):(Q.position.left-C.left));if(O){Q.size.height=Q.size.width/G.aspectRatio}Q.position.left=G.helper?M.left:0}if(L.top<(G.helper?M.top:0)){Q.size.height=Q.size.height+(G.helper?(Q.position.top-M.top):Q.position.top);if(O){Q.size.width=Q.size.height*G.aspectRatio}Q.position.top=G.helper?M.top:0}Q.offset.left=Q.parentData.left+Q.position.left;Q.offset.top=Q.parentData.top+Q.position.top;var J=Math.abs((G.helper?Q.offset.left-C.left:(Q.offset.left-C.left))+Q.sizeDiff.width),P=Math.abs((G.helper?Q.offset.top-C.top:(Q.offset.top-M.top))+Q.sizeDiff.height);var I=Q.containerElement.get(0)==Q.element.parent().get(0),H=/relative|absolute/.test(Q.containerElement.css("position"));if(I&&H){J-=Q.parentData.left}if(J+Q.size.width>=Q.parentData.width){Q.size.width=Q.parentData.width-J;if(O){Q.size.height=Q.size.width/G.aspectRatio}}if(P+Q.size.height>=Q.parentData.height){Q.size.height=Q.parentData.height-P;if(O){Q.size.width=Q.size.height*G.aspectRatio}}},stop:function(D,K){var E=K.options,M=B(this).data("resizable"),I=M.position,J=M.containerOffset,C=M.containerPosition,F=M.containerElement;var G=B(M.helper),N=G.offset(),L=G.outerWidth()-M.sizeDiff.width,H=G.outerHeight()-M.sizeDiff.height;if(E.helper&&!E.animate&&(/relative/).test(F.css("position"))){B(this).css({left:N.left-C.left-J.left,width:L,height:H})}if(E.helper&&!E.animate&&(/static/).test(F.css("position"))){B(this).css({left:N.left-C.left-J.left,width:L,height:H})}}});B.ui.plugin.add("resizable","ghost",{start:function(E,F){var G=F.options,C=B(this).data("resizable"),H=G.proportionallyResize,D=C.size;if(!H){C.ghost=C.element.clone()}else{C.ghost=H.clone()}C.ghost.css({opacity:0.25,display:"block",position:"relative",height:D.height,width:D.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof G.ghost=="string"?G.ghost:"");C.ghost.appendTo(C.helper)},resize:function(D,E){var F=E.options,C=B(this).data("resizable"),G=F.proportionallyResize;if(C.ghost){C.ghost.css({position:"relative",height:C.size.height,width:C.size.width})}},stop:function(D,E){var F=E.options,C=B(this).data("resizable"),G=F.proportionallyResize;if(C.ghost&&C.helper){C.helper.get(0).removeChild(C.ghost.get(0))}}});B.ui.plugin.add("resizable","grid",{resize:function(C,K){var F=K.options,M=B(this).data("resizable"),I=M.size,G=M.originalSize,H=M.originalPosition,L=M.axis,J=F._aspectRatio||C.shiftKey;F.grid=typeof F.grid=="number"?[F.grid,F.grid]:F.grid;var E=Math.round((I.width-G.width)/(F.grid[0]||1))*(F.grid[0]||1),D=Math.round((I.height-G.height)/(F.grid[1]||1))*(F.grid[1]||1);if(/^(se|s|e)$/.test(L)){M.size.width=G.width+E;M.size.height=G.height+D}else{if(/^(ne)$/.test(L)){M.size.width=G.width+E;M.size.height=G.height+D;M.position.top=H.top-D}else{if(/^(sw)$/.test(L)){M.size.width=G.width+E;M.size.height=G.height+D;M.position.left=H.left-E}else{M.size.width=G.width+E;M.size.height=G.height+D;M.position.top=H.top-D;M.position.left=H.left-E}}}}});var A=function(C){return parseInt(C,10)||0}})(jQuery);/*
48
+ * jQuery UI Selectable 1.6
49
+ *
50
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
51
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
52
+ * and GPL (GPL-LICENSE.txt) licenses.
53
+ *
54
+ * http://docs.jquery.com/UI/Selectables
55
+ *
56
+ * Depends:
57
+ * ui.core.js
58
+ */
59
+ (function(A){A.widget("ui.selectable",A.extend({},A.ui.mouse,{_init:function(){var B=this;this.element.addClass("ui-selectable");this.dragged=false;var C;this.refresh=function(){C=A(B.options.filter,B.element[0]);C.each(function(){var D=A(this);var E=D.offset();A.data(this,"selectable-item",{element:this,$element:D,left:E.left,top:E.top,right:E.left+D.width(),bottom:E.top+D.height(),startselected:false,selected:D.hasClass("ui-selected"),selecting:D.hasClass("ui-selecting"),unselecting:D.hasClass("ui-unselecting")})})};this.refresh();this.selectees=C.addClass("ui-selectee");this._mouseInit();this.helper=A(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(E){var C=this;this.opos=[E.pageX,E.pageY];if(this.options.disabled){return }var D=this.options;this.selectees=A(D.filter,this.element[0]);this.element.triggerHandler("selectablestart",[E,{"selectable":this.element[0],"options":D}],D.start);A("body").append(this.helper);this.helper.css({"z-index":100,"position":"absolute","left":E.clientX,"top":E.clientY,"width":0,"height":0});if(D.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var F=A.data(this,"selectable-item");F.startselected=true;if(!E.metaKey){F.$element.removeClass("ui-selected");F.selected=false;F.$element.addClass("ui-unselecting");F.unselecting=true;C.element.triggerHandler("selectableunselecting",[E,{selectable:C.element[0],unselecting:F.element,options:D}],D.unselecting)}});var B=false;A(E.target).parents().andSelf().each(function(){if(A.data(this,"selectable-item")){B=true}});return this.options.keyboard?!B:true},_mouseDrag:function(I){var C=this;this.dragged=true;if(this.options.disabled){return }var E=this.options;var D=this.opos[0],H=this.opos[1],B=I.pageX,G=I.pageY;if(D>B){var F=B;B=D;D=F}if(H>G){var F=G;G=H;H=F}this.helper.css({left:D,top:H,width:B-D,height:G-H});this.selectees.each(function(){var J=A.data(this,"selectable-item");if(!J||J.element==C.element[0]){return }var K=false;if(E.tolerance=="touch"){K=(!(J.left>B||J.right<D||J.top>G||J.bottom<H))}else{if(E.tolerance=="fit"){K=(J.left>D&&J.right<B&&J.top>H&&J.bottom<G)}}if(K){if(J.selected){J.$element.removeClass("ui-selected");J.selected=false}if(J.unselecting){J.$element.removeClass("ui-unselecting");J.unselecting=false}if(!J.selecting){J.$element.addClass("ui-selecting");J.selecting=true;C.element.triggerHandler("selectableselecting",[I,{selectable:C.element[0],selecting:J.element,options:E}],E.selecting)}}else{if(J.selecting){if(I.metaKey&&J.startselected){J.$element.removeClass("ui-selecting");J.selecting=false;J.$element.addClass("ui-selected");J.selected=true}else{J.$element.removeClass("ui-selecting");J.selecting=false;if(J.startselected){J.$element.addClass("ui-unselecting");J.unselecting=true}C.element.triggerHandler("selectableunselecting",[I,{selectable:C.element[0],unselecting:J.element,options:E}],E.unselecting)}}if(J.selected){if(!I.metaKey&&!J.startselected){J.$element.removeClass("ui-selected");J.selected=false;J.$element.addClass("ui-unselecting");J.unselecting=true;C.element.triggerHandler("selectableunselecting",[I,{selectable:C.element[0],unselecting:J.element,options:E}],E.unselecting)}}}});return false},_mouseStop:function(D){var B=this;this.dragged=false;var C=this.options;A(".ui-unselecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-unselecting");E.unselecting=false;E.startselected=false;B.element.triggerHandler("selectableunselected",[D,{selectable:B.element[0],unselected:E.element,options:C}],C.unselected)});A(".ui-selecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-selecting").addClass("ui-selected");E.selecting=false;E.selected=true;E.startselected=true;B.element.triggerHandler("selectableselected",[D,{selectable:B.element[0],selected:E.element,options:C}],C.selected)});this.element.triggerHandler("selectablestop",[D,{selectable:B.element[0],options:this.options}],this.options.stop);this.helper.remove();return false}}));A.extend(A.ui.selectable,{version:"1.6",defaults:{appendTo:"body",autoRefresh:true,cancel:":input",delay:0,distance:1,filter:"*",tolerance:"touch"}})})(jQuery);/*
60
+ * jQuery UI Sortable 1.6
61
+ *
62
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
63
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
64
+ * and GPL (GPL-LICENSE.txt) licenses.
65
+ *
66
+ * http://docs.jquery.com/UI/Sortables
67
+ *
68
+ * Depends:
69
+ * ui.core.js
70
+ */
71
+ (function(A){A.widget("ui.sortable",A.extend({},A.ui.mouse,{_init:function(){var B=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var B=this.items.length-1;B>=0;B--){this.items[B].item.removeData("sortable-item")}},_mouseCapture:function(E,F){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(E);var D=null,C=this,B=A(E.target).parents().each(function(){if(A.data(this,"sortable-item")==C){D=A(this);return false}});if(A.data(E.target,"sortable-item")==C){D=A(E.target)}if(!D){return false}if(this.options.handle&&!F){var G=false;A(this.options.handle,D).find("*").andSelf().each(function(){if(this==E.target){G=true}});if(!G){return false}}this.currentItem=D;this._removeCurrentsFromItems();return true},_mouseStart:function(D,E,B){var F=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(D);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");A.extend(this.offset,{click:{left:D.pageX-this.offset.left,top:D.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});if(F.cursorAt){this._adjustOffsetFromHelper(F.cursorAt)}this.originalPosition=this._generatePosition(D);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(F.containment){this._setContainment()}this._propagate("start",D);if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!B){for(var C=this.containers.length-1;C>=0;C--){this.containers[C]._propagate("activate",D,this)}}if(A.ui.ddmanager){A.ui.ddmanager.current=this}if(A.ui.ddmanager&&!F.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,D)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(D);return true},_mouseDrag:function(E){this.position=this._generatePosition(E);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}A.ui.plugin.call(this,"sort",[E,this._ui()]);this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var C=this.items.length-1;C>=0;C--){var D=this.items[C],B=D.item[0],F=this._intersectsWithPointer(D);if(!F){continue}if(B!=this.currentItem[0]&&this.placeholder[F==1?"next":"prev"]()[0]!=B&&!A.ui.contains(this.placeholder[0],B)&&(this.options.type=="semi-dynamic"?!A.ui.contains(this.element[0],B):true)){this.direction=F==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(D)){this.options.sortIndicator.call(this,E,D)}else{break}this._propagate("change",E);break}}this._contactContainers(E);if(A.ui.ddmanager){A.ui.ddmanager.drag(this,E)}this._trigger("sort",E,this._ui());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(C,D){if(!C){return }if(A.ui.ddmanager&&!this.options.dropBehaviour){A.ui.ddmanager.drop(this,C)}if(this.options.revert){var B=this;var E=B.placeholder.offset();B.reverting=true;A(this.helper).animate({left:E.left-this.offset.parent.left-B.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:E.top-this.offset.parent.top-B.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){B._clear(C)})}else{this._clear(C,D)}return false},cancel:function(){if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var B=this.containers.length-1;B>=0;B--){this.containers[B]._propagate("deactivate",null,this);if(this.containers[B].containerCache.over){this.containers[B]._propagate("out",null,this);this.containers[B].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}A.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){A(this.domPosition.prev).after(this.currentItem)}else{A(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(D){var B=this._getItemsAsjQuery(D&&D.connected);var C=[];D=D||{};A(B).each(function(){var E=(A(D.item||this).attr(D.attribute||"id")||"").match(D.expression||(/(.+)[-=_](.+)/));if(E){C.push((D.key||E[1]+"[]")+"="+(D.key&&D.expression?E[1]:E[2]))}});return C.join("&")},toArray:function(D){var B=this._getItemsAsjQuery(D&&D.connected);var C=[];D=D||{};B.each(function(){C.push(A(D.item||this).attr(D.attribute||"id")||"")});return C},_intersectsWith:function(K){var D=this.positionAbs.left,C=D+this.helperProportions.width,J=this.positionAbs.top,I=J+this.helperProportions.height;var E=K.left,B=E+K.width,L=K.top,H=L+K.height;var M=this.offset.click.top,G=this.offset.click.left;var F=(J+M)>L&&(J+M)<H&&(D+G)>E&&(D+G)<B;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>K[this.floating?"width":"height"])){return F}else{return(E<D+(this.helperProportions.width/2)&&C-(this.helperProportions.width/2)<B&&L<J+(this.helperProportions.height/2)&&I-(this.helperProportions.height/2)<H)}},_intersectsWithPointer:function(D){var E=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,D.top,D.height),C=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,D.left,D.width),G=E&&C,B=this._getDragVerticalDirection(),F=this._getDragHorizontalDirection();if(!G){return false}return this.floating?(((F&&F=="right")||B=="down")?2:1):(B&&(B=="down"?2:1))},_intersectsWithSides:function(E){var C=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,E.top+(E.height/2),E.height),D=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,E.left+(E.width/2),E.width),B=this._getDragVerticalDirection(),F=this._getDragHorizontalDirection();if(this.floating&&F){return((F=="right"&&D)||(F=="left"&&!D))}else{return B&&((B=="down"&&C)||(B=="up"&&!C))}},_getDragVerticalDirection:function(){var B=this.positionAbs.top-this.lastPositionAbs.top;return B!=0&&(B>0?"down":"up")},_getDragHorizontalDirection:function(){var B=this.positionAbs.left-this.lastPositionAbs.left;return B!=0&&(B>0?"right":"left")},refresh:function(B){this._refreshItems(B);this.refreshPositions()},_getItemsAsjQuery:function(G){var C=this;var B=[];var E=[];if(this.options.connectWith&&G){for(var F=this.options.connectWith.length-1;F>=0;F--){var I=A(this.options.connectWith[F]);for(var D=I.length-1;D>=0;D--){var H=A.data(I[D],"sortable");if(H&&H!=this&&!H.options.disabled){E.push([A.isFunction(H.options.items)?H.options.items.call(H.element):A(H.options.items,H.element).not(".ui-sortable-helper"),H])}}}}E.push([A.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):A(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var F=E.length-1;F>=0;F--){E[F][0].each(function(){B.push(this)})}return A(B)},_removeCurrentsFromItems:function(){var D=this.currentItem.find(":data(sortable-item)");for(var C=0;C<this.items.length;C++){for(var B=0;B<D.length;B++){if(D[B]==this.items[C].item[0]){this.items.splice(C,1)}}}},_refreshItems:function(B){this.items=[];this.containers=[this];var H=this.items;var M=this;var F=[[A.isFunction(this.options.items)?this.options.items.call(this.element[0],B,{item:this.currentItem}):A(this.options.items,this.element),this]];if(this.options.connectWith){for(var E=this.options.connectWith.length-1;E>=0;E--){var J=A(this.options.connectWith[E]);for(var D=J.length-1;D>=0;D--){var G=A.data(J[D],"sortable");if(G&&G!=this&&!G.options.disabled){F.push([A.isFunction(G.options.items)?G.options.items.call(G.element[0],B,{item:this.currentItem}):A(G.options.items,G.element),G]);this.containers.push(G)}}}}for(var E=F.length-1;E>=0;E--){var I=F[E][1];var C=F[E][0];for(var D=0,K=C.length;D<K;D++){var L=A(C[D]);L.data("sortable-item",I);H.push({item:L,instance:I,width:0,height:0,left:0,top:0})}}},refreshPositions:function(B){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var D=this.items.length-1;D>=0;D--){var E=this.items[D];if(E.instance!=this.currentContainer&&this.currentContainer&&E.item[0]!=this.currentItem[0]){continue}var C=this.options.toleranceElement?A(this.options.toleranceElement,E.item):E.item;if(!B){if(this.options.accurateIntersection){E.width=C.outerWidth();E.height=C.outerHeight()}else{E.width=C[0].offsetWidth;E.height=C[0].offsetHeight}}var F=C.offset();E.left=F.left;E.top=F.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var D=this.containers.length-1;D>=0;D--){var F=this.containers[D].element.offset();this.containers[D].containerCache.left=F.left;this.containers[D].containerCache.top=F.top;this.containers[D].containerCache.width=this.containers[D].element.outerWidth();this.containers[D].containerCache.height=this.containers[D].element.outerHeight()}}},_createPlaceholder:function(D){var B=D||this,E=B.options;if(!E.placeholder||E.placeholder.constructor==String){var C=E.placeholder;E.placeholder={element:function(){var F=A(document.createElement(B.currentItem[0].nodeName)).addClass(C||B.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!C){F.style.visibility="hidden";document.body.appendChild(F);F.innerHTML=B.currentItem[0].innerHTML.replace(/name\=\"[^\"\']+\"/g,"").replace(/jQuery[0-9]+\=\"[^\"\']+\"/g,"");document.body.removeChild(F)}return F},update:function(F,G){if(C&&!E.forcePlaceholderSize){return }if(!G.height()){G.height(B.currentItem.innerHeight()-parseInt(B.currentItem.css("paddingTop")||0,10)-parseInt(B.currentItem.css("paddingBottom")||0,10))}if(!G.width()){G.width(B.currentItem.innerWidth()-parseInt(B.currentItem.css("paddingLeft")||0,10)-parseInt(B.currentItem.css("paddingRight")||0,10))}}}}B.placeholder=A(E.placeholder.element.call(B.element,B.currentItem));B.currentItem.after(B.placeholder);E.placeholder.update(B,B.placeholder)},_contactContainers:function(D){for(var C=this.containers.length-1;C>=0;C--){if(this._intersectsWith(this.containers[C].containerCache)){if(!this.containers[C].containerCache.over){if(this.currentContainer!=this.containers[C]){var H=10000;var G=null;var E=this.positionAbs[this.containers[C].floating?"left":"top"];for(var B=this.items.length-1;B>=0;B--){if(!A.ui.contains(this.containers[C].element[0],this.items[B].item[0])){continue}var F=this.items[B][this.containers[C].floating?"left":"top"];if(Math.abs(F-E)<H){H=Math.abs(F-E);G=this.items[B]}}if(!G&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[C];G?this.options.sortIndicator.call(this,D,G,null,true):this.options.sortIndicator.call(this,D,null,this.containers[C].element,true);this._propagate("change",D);this.containers[C]._propagate("change",D,this);this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[C]._propagate("over",D,this);this.containers[C].containerCache.over=1}}else{if(this.containers[C].containerCache.over){this.containers[C]._propagate("out",D,this);this.containers[C].containerCache.over=0}}}},_createHelper:function(C){var D=this.options;var B=A.isFunction(D.helper)?A(D.helper.apply(this.element[0],[C,this.currentItem])):(D.helper=="clone"?this.currentItem.clone():this.currentItem);if(!B.parents("body").length){A(D.appendTo!="parent"?D.appendTo:this.currentItem[0].parentNode)[0].appendChild(B[0])}if(B[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(B[0].style.width==""||D.forceHelperSize){B.width(this.currentItem.width())}if(B[0].style.height==""||D.forceHelperSize){B.height(this.currentItem.height())}return B},_adjustOffsetFromHelper:function(B){if(B.left!=undefined){this.offset.click.left=B.left+this.margins.left}if(B.right!=undefined){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if(B.top!=undefined){this.offset.click.top=B.top+this.margins.top}if(B.bottom!=undefined){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if((this.offsetParent[0]==document.body&&A.browser.mozilla)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie)){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.currentItem.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var E=this.options;if(E.containment=="parent"){E.containment=this.helper[0].parentNode}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.margins.left-(parseInt(this.currentItem.css("marginRight"),10)||0),(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.margins.top-(parseInt(this.currentItem.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(E.containment)){var C=A(E.containment)[0];var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.margins.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.margins.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.margins.left,D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.margins.top]}},_convertPositionTo:function(D,F){if(!F){F=this.position}var C=D=="absolute"?1:-1;var B=this[(this.cssPosition=="absolute"?"offset":"scroll")+"Parent"],E=(/(html|body)/i).test(B[0].tagName);return{top:(F.top+this.offset.relative.top*C+this.offset.parent.top*C+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(E?0:B.scrollTop()))*C+this.margins.top*C),left:(F.left+this.offset.relative.left*C+this.offset.parent.left*C+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():(E?0:B.scrollLeft()))*C+this.margins.left*C)}},_generatePosition:function(D){var G=this.options,C=this[(this.cssPosition=="absolute"?"offset":"scroll")+"Parent"],H=(/(html|body)/i).test(C[0].tagName);var B={top:(D.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(H?0:C.scrollTop()))),left:(D.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():(H?0:C.scrollLeft())))};if(!this.originalPosition){return B}if(this.containment){if(B.left<this.containment[0]){B.left=this.containment[0]}if(B.top<this.containment[1]){B.top=this.containment[1]}if(B.left+this.helperProportions.width>this.containment[2]){B.left=this.containment[2]-this.helperProportions.width}if(B.top+this.helperProportions.height>this.containment[3]){B.top=this.containment[3]-this.helperProportions.height}}if(G.grid){var F=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/G.grid[1])*G.grid[1];B.top=this.containment?(!(F<this.containment[1]||F>this.containment[3])?F:(!(F<this.containment[1])?F-G.grid[1]:F+G.grid[1])):F;var E=this.originalPosition.left+Math.round((B.left-this.originalPosition.left)/G.grid[0])*G.grid[0];B.left=this.containment?(!(E<this.containment[0]||E>this.containment[2])?E:(!(E<this.containment[0])?E-G.grid[0]:E+G.grid[0])):E}return B},_rearrange:function(G,F,C,E){C?C[0].appendChild(this.placeholder[0]):F.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?F.item[0]:F.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var D=this,B=this.counter;window.setTimeout(function(){if(B==D.counter){D.refreshPositions(!E)}},0)},_clear:function(C,D){this.reverting=false;if(!this._noFinalSort){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var B in this._storedCSS){if(this._storedCSS[B]=="auto"||this._storedCSS[B]=="static"){this._storedCSS[B]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0]){this._propagate("update",C,null,D)}if(!A.ui.contains(this.element[0],this.currentItem[0])){this._propagate("remove",C,null,D);for(var B=this.containers.length-1;B>=0;B--){if(A.ui.contains(this.containers[B].element[0],this.currentItem[0])){this.containers[B]._propagate("update",C,this,D);this.containers[B]._propagate("receive",C,this,D)}}}for(var B=this.containers.length-1;B>=0;B--){this.containers[B]._propagate("deactivate",C,this,D);if(this.containers[B].containerCache.over){this.containers[B]._propagate("out",C,this);this.containers[B].containerCache.over=0}}this.dragging=false;if(this.cancelHelperRemoval){this._propagate("beforeStop",C,null,D);this._propagate("stop",C,null,D);return false}this._propagate("beforeStop",C,null,D);this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.options.helper!="original"){this.helper.remove()}this.helper=null;this._propagate("stop",C,null,D);return true},_propagate:function(F,B,C,D){A.ui.plugin.call(this,F,[B,this._ui(C)]);var E=!D?this.element.triggerHandler(F=="sort"?F:"sort"+F,[B,this._ui(C)],this.options[F]):true;if(E===false){this.cancel()}},plugins:{},_ui:function(C){var B=C||this;return{helper:B.helper,placeholder:B.placeholder||A([]),position:B.position,absolutePosition:B.positionAbs,item:B.currentItem,sender:C?C.element:null}}}));A.extend(A.ui.sortable,{getter:"serialize toArray",version:"1.6",defaults:{accurateIntersection:true,appendTo:"parent",cancel:":input",delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,helper:"original",items:"> *",scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,sortIndicator:A.ui.sortable.prototype._rearrange,tolerance:"default",zIndex:1000}});A.ui.plugin.add("sortable","cursor",{start:function(D,E){var C=A("body"),B=A(this).data("sortable");if(C.css("cursor")){B.options._cursor=C.css("cursor")}C.css("cursor",B.options.cursor)},beforeStop:function(C,D){var B=A(this).data("sortable");if(B.options._cursor){A("body").css("cursor",B.options._cursor)}}});A.ui.plugin.add("sortable","opacity",{start:function(D,E){var C=E.helper,B=A(this).data("sortable");if(C.css("opacity")){B.options._opacity=C.css("opacity")}C.css("opacity",B.options.opacity)},beforeStop:function(C,D){var B=A(this).data("sortable");if(B.options._opacity){A(D.helper).css("opacity",B.options._opacity)}}});A.ui.plugin.add("sortable","scroll",{start:function(C,D){var B=A(this).data("sortable"),E=B.options;if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},sort:function(D,E){var C=A(this).data("sortable"),F=C.options,B=false;if(C.scrollParent[0]!=document&&C.scrollParent[0].tagName!="HTML"){if((C.overflowOffset.top+C.scrollParent[0].offsetHeight)-D.pageY<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop+F.scrollSpeed}else{if(D.pageY-C.overflowOffset.top<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop-F.scrollSpeed}}if((C.overflowOffset.left+C.scrollParent[0].offsetWidth)-D.pageX<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft+F.scrollSpeed}else{if(D.pageX-C.overflowOffset.left<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft-F.scrollSpeed}}}else{if(D.pageY-A(document).scrollTop()<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-F.scrollSpeed)}else{if(A(window).height()-(D.pageY-A(document).scrollTop())<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()+F.scrollSpeed)}}if(D.pageX-A(document).scrollLeft()<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-F.scrollSpeed)}else{if(A(window).width()-(D.pageX-A(document).scrollLeft())<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+F.scrollSpeed)}}}if(B!==false&&A.ui.ddmanager&&!F.dropBehaviour){A.ui.ddmanager.prepareOffsets(C,D)}if(B!==false&&C.cssPosition=="absolute"&&C.scrollParent[0]!=document&&A.ui.contains(C.scrollParent[0],C.offsetParent[0])){C.offset.parent=C._getParentOffset()}if(B!==false&&C.cssPosition=="relative"&&!(C.scrollParent[0]!=document&&C.scrollParent[0]!=C.offsetParent[0])){C.offset.relative=C._getRelativeOffset()}}});A.ui.plugin.add("sortable","zIndex",{start:function(D,E){var C=E.helper,B=A(this).data("sortable");if(C.css("zIndex")){B.options._zIndex=C.css("zIndex")}C.css("zIndex",B.options.zIndex)},beforeStop:function(C,D){var B=A(this).data("sortable");if(B.options._zIndex){A(D.helper).css("zIndex",B.options._zIndex=="auto"?"":B.options._zIndex)}}})})(jQuery);/*
72
+ * jQuery UI Accordion 1.6
73
+ *
74
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
75
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
76
+ * and GPL (GPL-LICENSE.txt) licenses.
77
+ *
78
+ * http://docs.jquery.com/UI/Accordion
79
+ *
80
+ * Depends:
81
+ * ui.core.js
82
+ */
83
+ (function(E){E.widget("ui.accordion",{_init:function(){var H=this.options;if(H.navigation){var K=this.element.find("a").filter(H.navigationFilter);if(K.length){if(K.filter(H.header).length){H.active=K}else{H.active=K.parent().parent().prev();K.addClass("current")}}}H.headers=this.element.find(H.header);H.active=C(H.headers,H.active);if(E.browser.msie){this.element.find("a").css("zoom","1")}if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");E('<span class="ui-accordion-left"></span>').insertBefore(H.headers);E('<span class="ui-accordion-right"></span>').appendTo(H.headers);H.headers.addClass("ui-accordion-header")}var J;if(H.fillSpace){J=this.element.parent().height();H.headers.each(function(){J-=E(this).outerHeight()});var I=0;H.headers.next().each(function(){I=Math.max(I,E(this).innerHeight()-E(this).height())}).height(J-I)}else{if(H.autoHeight){J=0;H.headers.next().each(function(){J=Math.max(J,E(this).outerHeight())}).height(J)}}this.element.attr("role","tablist");var G=this;H.headers.attr("role","tab").bind("keydown",function(L){return G._keydown(L)}).next().attr("role","tabpanel");H.headers.not(H.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!H.active.length){H.headers.eq(0).attr("tabIndex","0")}else{H.active.attr("aria-expanded","true").attr("tabIndex","0").parent().andSelf().addClass(H.selectedClass)}if(!E.browser.safari){H.headers.find("a").attr("tabIndex","-1")}if(H.event){this.element.bind((H.event)+".accordion",F)}},destroy:function(){this.options.headers.parent().andSelf().removeClass(this.options.selectedClass);this.options.headers.prev(".ui-accordion-left").remove();this.options.headers.children(".ui-accordion-right").remove();this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}E.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")},_keydown:function(J){if(this.options.disabled||J.altKey||J.ctrlKey){return }var K=E.ui.keyCode;var I=this.options.headers.length;var G=this.options.headers.index(J.target);var H=false;switch(J.keyCode){case K.RIGHT:case K.DOWN:H=this.options.headers[(G+1)%I];break;case K.LEFT:case K.UP:H=this.options.headers[(G-1+I)%I];break;case K.SPACE:case K.ENTER:return F.call(this.element[0],{target:J.target})}if(H){E(J.target).attr("tabIndex","-1");E(H).attr("tabIndex","0");H.focus();return false}return true},activate:function(G){F.call(this.element[0],{target:C(this.options.headers,G)[0]})}});function B(H,G){return function(){return H.apply(G,arguments)}}function D(I){if(!E.data(this,"accordion")){return }var G=E.data(this,"accordion");var H=G.options;H.running=I?0:--H.running;if(H.running){return }if(H.clearStyle){H.toShow.add(H.toHide).css({height:"",overflow:""})}G._trigger("change",null,H.data)}function A(G,N,K,L,O){var Q=E.data(this,"accordion").options;Q.toShow=G;Q.toHide=N;Q.data=K;var H=B(D,this);E.data(this,"accordion")._trigger("changestart",null,Q.data);Q.running=N.size()===0?G.size():N.size();if(Q.animated){var J={};if(!Q.alwaysOpen&&L){J={toShow:E([]),toHide:N,complete:H,down:O,autoHeight:Q.autoHeight}}else{J={toShow:G,toHide:N,complete:H,down:O,autoHeight:Q.autoHeight}}if(!Q.proxied){Q.proxied=Q.animated}if(!Q.proxiedDuration){Q.proxiedDuration=Q.duration}Q.animated=E.isFunction(Q.proxied)?Q.proxied(J):Q.proxied;Q.duration=E.isFunction(Q.proxiedDuration)?Q.proxiedDuration(J):Q.proxiedDuration;var P=E.ui.accordion.animations,I=Q.duration,M=Q.animated;if(!P[M]){P[M]=function(R){this.slide(R,{easing:M,duration:I||700})}}P[M](J)}else{if(!Q.alwaysOpen&&L){G.toggle()}else{N.hide();G.show()}H(true)}N.prev().attr("aria-expanded","false").attr("tabIndex","-1");G.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()}function F(L){var J=E.data(this,"accordion").options;if(J.disabled){return false}if(!L.target&&!J.alwaysOpen){J.active.parent().andSelf().toggleClass(J.selectedClass);var I=J.active.next(),M={options:J,newHeader:E([]),oldHeader:J.active,newContent:E([]),oldContent:I},G=(J.active=E([]));A.call(this,G,I,M);return false}var K=E(L.target);K=E(K.parents(J.header)[0]||K);var H=K[0]==J.active[0];if(J.running||(J.alwaysOpen&&H)){return false}if(!K.is(J.header)){return }J.active.parent().andSelf().toggleClass(J.selectedClass);if(!H){K.parent().andSelf().addClass(J.selectedClass)}var G=K.next(),I=J.active.next(),M={options:J,newHeader:H&&!J.alwaysOpen?E([]):K,oldHeader:J.active,newContent:H&&!J.alwaysOpen?E([]):G,oldContent:I},N=J.headers.index(J.active[0])>J.headers.index(K[0]);J.active=H?E([]):K;A.call(this,G,I,M,H,N);return false}function C(H,G){return G?typeof G=="number"?H.filter(":eq("+G+")"):H.not(H.not(G)):G===false?E([]):H.filter(":eq(0)")}E.extend(E.ui.accordion,{version:"1.6",defaults:{autoHeight:true,alwaysOpen:true,animated:"slide",event:"click",header:"a",navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()},running:0,selectedClass:"selected"},animations:{slide:function(G,J){G=E.extend({easing:"swing",duration:300},G,J);if(!G.toHide.size()){G.toShow.animate({height:"show"},G);return }var I=G.toHide.height(),L=G.toShow.height(),N=L/I,K=G.toShow.outerHeight()-G.toShow.height(),H=G.toShow.css("marginBottom"),M=G.toShow.css("overflow");tmargin=G.toShow.css("marginTop");G.toShow.css({height:0,overflow:"hidden",marginTop:0,marginBottom:-K}).show();G.toHide.filter(":hidden").each(G.complete).end().filter(":visible").animate({height:"hide"},{step:function(O){var P=(I-O)*N;if(E.browser.msie||E.browser.opera){P=Math.ceil(P)}G.toShow.height(P)},duration:G.duration,easing:G.easing,complete:function(){if(!G.autoHeight){G.toShow.css("height","auto")}G.toShow.css({marginTop:tmargin,marginBottom:H,overflow:M});G.complete()}})},bounceslide:function(G){this.slide(G,{easing:G.down?"easeOutBounce":"swing",duration:G.down?1000:200})},easeslide:function(G){this.slide(G,{easing:"easeinout",duration:700})}}})})(jQuery);/*
84
+ * jQuery UI Dialog 1.6
85
+ *
86
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
87
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
88
+ * and GPL (GPL-LICENSE.txt) licenses.
89
+ *
90
+ * http://docs.jquery.com/UI/Dialog
91
+ *
92
+ * Depends:
93
+ * ui.core.js
94
+ * ui.draggable.js
95
+ * ui.resizable.js
96
+ */
97
+ (function(B){var A={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};B.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;var M=this,N=this.options,F=this.element.removeAttr("title").addClass("ui-dialog-content").wrap("<div></div>").wrap("<div></div>"),I=(this.uiDialogContainer=F.parent()).addClass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"}),E=(this.uiDialogTitlebar=B("<div></div>")).addClass("ui-dialog-titlebar").mousedown(function(){M.moveToTop()}).prependTo(I),J=B('<a href="#"/>').addClass("ui-dialog-titlebar-close").attr("role","button").appendTo(E),G=(this.uiDialogTitlebarCloseText=B("<span/>")).text(N.closeText).appendTo(J),L=N.title||"&nbsp;",D=B.ui.dialog.getTitleId(this.element),C=B("<span/>").addClass("ui-dialog-title").attr("id",D).html(L).prependTo(E),K=(this.uiDialog=I.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(N.dialogClass).css({position:"absolute",width:N.width,height:N.height,overflow:"hidden",zIndex:N.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(O){(N.closeOnEscape&&O.keyCode&&O.keyCode==B.ui.keyCode.ESCAPE&&M.close())}).attr({role:"dialog","aria-labelledby":D}).mouseup(function(){M.moveToTop()}),H=(this.uiDialogButtonPane=B("<div></div>")).addClass("ui-dialog-buttonpane").css({position:"absolute",bottom:0}).appendTo(K),J=B(".ui-dialog-titlebar-close",E).hover(function(){B(this).addClass("ui-dialog-titlebar-close-hover")},function(){B(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(O){O.stopPropagation()}).click(function(){M.close();return false});E.find("*").add(E).disableSelection();(N.draggable&&B.fn.draggable&&this._makeDraggable());(N.resizable&&B.fn.resizable&&this._makeResizable());this._createButtons(N.buttons);this._isOpen=false;(N.bgiframe&&B.fn.bgiframe&&K.bgiframe());(N.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(){if(false===this._trigger("beforeclose",null,{options:this.options})){return }(this.overlay&&this.overlay.destroy());this.uiDialog.hide(this.options.hide).unbind("keypress.ui-dialog");this._trigger("close",null,{options:this.options});B.ui.dialog.overlay.resize();this._isOpen=false},isOpen:function(){return this._isOpen},moveToTop:function(F){if((this.options.modal&&!F)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",null,{options:this.options})}var E=this.options.zIndex,D=this.options;B(".ui-dialog:visible").each(function(){E=Math.max(E,parseInt(B(this).css("z-index"),10)||D.zIndex)});(this.overlay&&this.overlay.$el.css("z-index",++E));var C={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++E);this.element.attr(C);this._trigger("focus",null,{options:this.options})},open:function(){if(this._isOpen){return }this.overlay=this.options.modal?new B.ui.dialog.overlay(this):null;(this.uiDialog.next().length&&this.uiDialog.appendTo("body"));this._position(this.options.position);this.uiDialog.show(this.options.show);(this.options.autoResize&&this._size());this.moveToTop(true);(this.options.modal&&this.uiDialog.bind("keypress.ui-dialog",function(E){if(E.keyCode!=B.ui.keyCode.TAB){return }var D=B(":tabbable",this),F=D.filter(":first")[0],C=D.filter(":last")[0];if(E.target==C&&!E.shiftKey){setTimeout(function(){F.focus()},1)}else{if(E.target==F&&E.shiftKey){setTimeout(function(){C.focus()},1)}}}));this.uiDialog.find(":tabbable:first").focus();this._trigger("open",null,{options:this.options});this._isOpen=true},_createButtons:function(F){var E=this,C=false,D=this.uiDialogButtonPane;D.empty().hide();B.each(F,function(){return !(C=true)});if(C){D.show();B.each(F,function(G,H){B('<button type="button"></button>').text(G).click(function(){H.apply(E.element[0],arguments)}).appendTo(D)})}},_makeDraggable:function(){var C=this,D=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content",helper:D.dragHelper,handle:".ui-dialog-titlebar",start:function(){C.moveToTop();(D.dragStart&&D.dragStart.apply(C.element[0],arguments))},drag:function(){(D.drag&&D.drag.apply(C.element[0],arguments))},stop:function(){(D.dragStop&&D.dragStop.apply(C.element[0],arguments));B.ui.dialog.overlay.resize()}})},_makeResizable:function(F){F=(F===undefined?this.options.resizable:F);var C=this,E=this.options,D=typeof F=="string"?F:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",helper:E.resizeHelper,maxWidth:E.maxWidth,maxHeight:E.maxHeight,minWidth:E.minWidth,minHeight:E.minHeight,start:function(){(E.resizeStart&&E.resizeStart.apply(C.element[0],arguments))},resize:function(){(E.autoResize&&C._size.apply(C));(E.resize&&E.resize.apply(C.element[0],arguments))},handles:D,stop:function(){(E.autoResize&&C._size.apply(C));(E.resizeStop&&E.resizeStop.apply(C.element[0],arguments));B.ui.dialog.overlay.resize()}})},_position:function(H){var D=B(window),E=B(document),F=E.scrollTop(),C=E.scrollLeft(),G=F;if(B.inArray(H,["center","top","right","bottom","left"])>=0){H=[H=="right"||H=="left"?H:"center",H=="top"||H=="bottom"?H:"middle"]}if(H.constructor!=Array){H=["center","middle"]}if(H[0].constructor==Number){C+=H[0]}else{switch(H[0]){case"left":C+=0;break;case"right":C+=D.width()-this.uiDialog.outerWidth();break;default:case"center":C+=(D.width()-this.uiDialog.outerWidth())/2}}if(H[1].constructor==Number){F+=H[1]}else{switch(H[1]){case"top":F+=0;break;case"bottom":F+=(B.browser.opera?window.innerHeight:D.height())-this.uiDialog.outerHeight();break;default:case"middle":F+=((B.browser.opera?window.innerHeight:D.height())-this.uiDialog.outerHeight())/2}}F=Math.max(F,G);this.uiDialog.css({top:F,left:C})},_setData:function(D,E){(A[D]&&this.uiDialog.data(A[D],E));switch(D){case"buttons":this._createButtons(E);break;case"closeText":this.uiDialogTitlebarCloseText.text(E);break;case"draggable":(E?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(E);break;case"position":this._position(E);break;case"resizable":var C=this.uiDialog,F=this.uiDialog.is(":data(resizable)");(F&&!E&&C.resizable("destroy"));(F&&typeof E=="string"&&C.resizable("option","handles",E));(F||this._makeResizable(E));break;case"title":B(".ui-dialog-title",this.uiDialogTitlebar).html(E||"&nbsp;");break;case"width":this.uiDialog.width(E);break}B.widget.prototype._setData.apply(this,arguments)},_size:function(){var D=this.uiDialogContainer,G=this.uiDialogTitlebar,E=this.element,F=(parseInt(E.css("margin-top"),10)||0)+(parseInt(E.css("margin-bottom"),10)||0),C=(parseInt(E.css("margin-left"),10)||0)+(parseInt(E.css("margin-right"),10)||0);E.height(D.height()-G.outerHeight()-F);E.width(D.width()-C)}});B.extend(B.ui.dialog,{version:"1.6",defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,stack:true,width:300,zIndex:1000},getter:"isOpen",uuid:0,getTitleId:function(C){return"ui-dialog-title-"+(C.attr("id")||++this.uuid)},overlay:function(C){this.$el=B.ui.dialog.overlay.create(C)}});B.extend(B.ui.dialog.overlay,{instances:[],events:B.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(C){return C+".dialog-overlay"}).join(" "),create:function(D){if(this.instances.length===0){setTimeout(function(){B("a, :input").bind(B.ui.dialog.overlay.events,function(){var F=false;var H=B(this).parents(".ui-dialog");if(H.length){var E=B(".ui-dialog-overlay");if(E.length){var G=parseInt(E.css("z-index"),10);E.each(function(){G=Math.max(G,parseInt(B(this).css("z-index"),10))});F=parseInt(H.css("z-index"),10)>G}else{F=true}}return F})},1);B(document).bind("keydown.dialog-overlay",function(E){(D.options.closeOnEscape&&E.keyCode&&E.keyCode==B.ui.keyCode.ESCAPE&&D.close())});B(window).bind("resize.dialog-overlay",B.ui.dialog.overlay.resize)}var C=B("<div></div>").appendTo(document.body).addClass("ui-dialog-overlay").css(B.extend({borderWidth:0,margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},D.options.overlay));(D.options.bgiframe&&B.fn.bgiframe&&C.bgiframe());this.instances.push(C);return C},destroy:function(C){this.instances.splice(B.inArray(this.instances,C),1);if(this.instances.length===0){B("a, :input").add([document,window]).unbind(".dialog-overlay")}C.remove()},height:function(){if(B.browser.msie&&B.browser.version<7){var D=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var C=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(D<C){return B(window).height()+"px"}else{return D+"px"}}else{if(B.browser.opera){return Math.max(window.innerHeight,B(document).height())+"px"}else{return B(document).height()+"px"}}},width:function(){if(B.browser.msie&&B.browser.version<7){var C=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var D=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(C<D){return B(window).width()+"px"}else{return C+"px"}}else{if(B.browser.opera){return Math.max(window.innerWidth,B(document).width())+"px"}else{return B(document).width()+"px"}}},resize:function(){var C=B([]);B.each(B.ui.dialog.overlay.instances,function(){C=C.add(this)});C.css({width:0,height:0}).css({width:B.ui.dialog.overlay.width(),height:B.ui.dialog.overlay.height()})}});B.extend(B.ui.dialog.overlay.prototype,{destroy:function(){B.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);/*
98
+ * jQuery UI Slider 1.6
99
+ *
100
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
101
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
102
+ * and GPL (GPL-LICENSE.txt) licenses.
103
+ *
104
+ * http://docs.jquery.com/UI/Slider
105
+ *
106
+ * Depends:
107
+ * ui.core.js
108
+ */
109
+ (function(A){A.fn.unwrap=A.fn.unwrap||function(B){return this.each(function(){A(this).parents(B).eq(0).after(this).remove()})};A.widget("ui.slider",{_init:function(){var B=this;this.element.addClass("ui-slider");this._initBoundaries();this.handle=A(this.options.handle,this.element);if(!this.handle.length){B.handle=B.generated=A(B.options.handles||[0]).map(function(){var D=A("<div/>").addClass("ui-slider-handle").appendTo(B.element);if(this.id){D.attr("id",this.id)}return D[0]})}var C=function(D){this.element=A(D);this.element.data("mouse",this);this.options=B.options;this.element.bind("mousedown",function(){if(B.currentHandle){this.blur(B.currentHandle)}B._focus(this,true)});this._mouseInit()};A.extend(C.prototype,A.ui.mouse,{_mouseCapture:function(){return true},_mouseStart:function(D){return B._start.call(B,D,this.element[0])},_mouseDrag:function(D){return B._drag.call(B,D,this.element[0])},_mouseStop:function(D){return B._stop.call(B,D,this.element[0])},trigger:function(D){this._mouseDown(D)}});A(this.handle).each(function(){new C(this)}).wrap('<a href="#" style="outline:none;border:none;"></a>').parent().bind("click",function(){return false}).bind("focus",function(D){B._focus(this.firstChild)}).bind("blur",function(D){B._blur(this.firstChild)}).bind("keydown",function(D){if(!B.options.noKeyboard){return B._keydown(D.keyCode,this.firstChild)}});this.element.bind("mousedown.slider",function(D){if(A(D.target).is(".ui-slider-handle")){return }B._click.apply(B,[D]);B.currentHandle.data("mouse").trigger(D);B.firstValue=B.firstValue+1});A.each(this.options.handles||[],function(D,E){B.moveTo(E.start,D,true)});if(!isNaN(this.options.startValue)){this.moveTo(this.options.startValue,0,true)}this.previousHandle=A(this.handle[0]);if(this.handle.length==2&&this.options.range){this._createRange()}},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){var B=A(this).data("mouse");B&&B._mouseDestroy()})}this.generated&&this.generated.remove()},_start:function(B,C){var D=this.options;if(D.disabled){return false}this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle){this._focus(this.previousHandle,true)}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:B.pageY-this.handleOffset.top,left:B.pageX-this.handleOffset.left};this.firstValue=this.value();this._propagate("start",B);this._drag(B,C);return true},_drag:function(C,E){var F=this.options;var B={top:C.pageY-this.offset.top-this.clickOffset.top,left:C.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this._focus(this.previousHandle,true)}B.left=this._translateLimits(B.left,"x");B.top=this._translateLimits(B.top,"y");if(F.stepping.x){var D=this._convertValue(B.left,"x");D=this._round(D/F.stepping.x)*F.stepping.x;B.left=this._translateValue(D,"x")}if(F.stepping.y){var D=this._convertValue(B.top,"y");D=this._round(D/F.stepping.y)*F.stepping.y;B.top=this._translateValue(D,"y")}B.left=this._translateRange(B.left,"x");B.top=this._translateRange(B.top,"y");if(F.axis!="vertical"){this.currentHandle.css({left:B.left})}if(F.axis!="horizontal"){this.currentHandle.css({top:B.top})}this.currentHandle.data("mouse").sliderValue={x:this._round(this._convertValue(B.left,"x"))||0,y:this._round(this._convertValue(B.top,"y"))||0};if(this.rangeElement){this._updateRange()}this._propagate("slide",C);return false},_stop:function(B){this._propagate("stop",B);if(this.firstValue!=this.value()){this._propagate("change",B)}this._focus(this.currentHandle,true);return false},_round:function(B){return this.options.round?parseInt(B,10):parseFloat(B)},_setData:function(B,C){A.widget.prototype._setData.apply(this,arguments);if(/min|max|steps/.test(B)){this._initBoundaries()}if(B=="range"){C?this.handle.length==2&&this._createRange():this._removeRange()}},_initBoundaries:function(){var B=this.element[0],C=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};A.extend(C,{axis:C.axis||(B.offsetWidth<B.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(C.max,10))?{x:parseInt(C.max,10),y:parseInt(C.max,10)}:({x:C.max&&C.max.x||100,y:C.max&&C.max.y||100}),min:!isNaN(parseInt(C.min,10))?{x:parseInt(C.min,10),y:parseInt(C.min,10)}:({x:C.min&&C.min.x||0,y:C.min&&C.min.y||0})});C.realMax={x:C.max.x-C.min.x,y:C.max.y-C.min.y};C.stepping={x:C.stepping&&C.stepping.x||parseInt(C.stepping,10)||(C.steps?C.realMax.x/(C.steps.x||parseInt(C.steps,10)||C.realMax.x):0),y:C.stepping&&C.stepping.y||parseInt(C.stepping,10)||(C.steps?C.realMax.y/(C.steps.y||parseInt(C.steps,10)||C.realMax.y):0)}},_keydown:function(F,E){if(this.options.disabled){return }var C=F;if(/(33|34|35|36|37|38|39|40)/.test(C)){var G=this.options,B,I;if(/(35|36)/.test(C)){B=(C==35)?G.max.x:G.min.x;I=(C==35)?G.max.y:G.min.y}else{var H=/(34|37|40)/.test(C)?"-=":"+=";var D=/(37|38|39|40)/.test(C)?"_oneStep":"_pageStep";B=H+this[D]("x");I=H+this[D]("y")}this.moveTo({x:B,y:I},E);return false}return true},_focus:function(B,C){this.currentHandle=A(B).addClass("ui-slider-handle-active");if(C){this.currentHandle.parent()[0].focus()}},_blur:function(B){A(B).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==B){this.previousHandle=this.currentHandle;this.currentHandle=null}},_click:function(C){var D=[C.pageX,C.pageY];var B=false;this.handle.each(function(){if(this==C.target){B=true}});if(B||this.options.disabled||!(this.currentHandle||this.previousHandle)){return }if(!this.currentHandle&&this.previousHandle){this._focus(this.previousHandle,true)}this.offset=this.element.offset();this.moveTo({y:this._convertValue(C.pageY-this.offset.top-this.currentHandle[0].offsetHeight/2,"y"),x:this._convertValue(C.pageX-this.offset.left-this.currentHandle[0].offsetWidth/2,"x")},null,!this.options.distance)},_createRange:function(){if(this.rangeElement){return }this.rangeElement=A("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this._updateRange()},_removeRange:function(){this.rangeElement.remove();this.rangeElement=null},_updateRange:function(){var C=this.options.axis=="vertical"?"top":"left";var B=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(C,(this._round(A(this.handle[0]).css(C))||0)+this._handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(B,(this._round(A(this.handle[1]).css(C))||0)-(this._round(A(this.handle[0]).css(C))||0))},_getRange:function(){return this.rangeElement?this._convertValue(this._round(this.rangeElement.css(this.options.axis=="vertical"?"height":"width")),this.options.axis=="vertical"?"y":"x"):null},_handleIndex:function(){return this.handle.index(this.currentHandle[0])},value:function(D,B){if(this.handle.length==1){this.currentHandle=this.handle}if(!B){B=this.options.axis=="vertical"?"y":"x"}var C=A(D!=undefined&&D!==null?this.handle[D]||D:this.currentHandle);if(C.data("mouse").sliderValue){return this._round(C.data("mouse").sliderValue[B])}else{return this._round(((this._round(C.css(B=="x"?"left":"top"))/(this.actualSize[B=="x"?"width":"height"]-this._handleSize(D,B)))*this.options.realMax[B])+this.options.min[B])}},_convertValue:function(C,B){return this.options.min[B]+(C/(this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)))*this.options.realMax[B]},_translateValue:function(C,B){return((C-this.options.min[B])/this.options.realMax[B])*(this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B))},_translateRange:function(D,B){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&D>=this._translateValue(this.value(1),B)){D=this._translateValue(this.value(1,B)-this._oneStep(B),B)}if(this.currentHandle[0]==this.handle[1]&&D<=this._translateValue(this.value(0),B)){D=this._translateValue(this.value(0,B)+this._oneStep(B),B)}}if(this.options.handles){var C=this.options.handles[this._handleIndex()];if(D<this._translateValue(C.min,B)){D=this._translateValue(C.min,B)}else{if(D>this._translateValue(C.max,B)){D=this._translateValue(C.max,B)}}}return D},_translateLimits:function(C,B){if(C>=this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)){C=this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)}if(C<=0){C=0}return C},_handleSize:function(C,B){return A(C!=undefined&&C!==null?this.handle[C]:this.currentHandle)[0]["offset"+(B=="x"?"Width":"Height")]},_oneStep:function(B){return this.options.stepping[B]||1},_pageStep:function(B){return 10},moveTo:function(F,E,G){var H=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(E==undefined&&!this.currentHandle&&this.handle.length!=1){return false}if(E==undefined&&!this.currentHandle){E=0}if(E!=undefined){this.currentHandle=this.previousHandle=A(this.handle[E]||E)}if(F.x!==undefined&&F.y!==undefined){var B=F.x,I=F.y}else{var B=F,I=F}if(B!==undefined&&B.constructor!=Number){var D=/^\-\=/.test(B),C=/^\+\=/.test(B);if(D||C){B=this.value(null,"x")+this._round(B.replace(D?"=":"+=",""))}else{B=isNaN(this._round(B))?undefined:this._round(B)}}if(I!==undefined&&I.constructor!=Number){var D=/^\-\=/.test(I),C=/^\+\=/.test(I);if(D||C){I=this.value(null,"y")+this._round(I.replace(D?"=":"+=",""))}else{I=isNaN(this._round(I))?undefined:this._round(I)}}if(H.axis!="vertical"&&B!==undefined){if(H.stepping.x){B=this._round(B/H.stepping.x)*H.stepping.x}B=this._translateValue(B,"x");B=this._translateLimits(B,"x");B=this._translateRange(B,"x");H.animate?this.currentHandle.stop().animate({left:B},(Math.abs(parseInt(this.currentHandle.css("left"),10)-B))*(!isNaN(parseInt(H.animate,10))?H.animate:5)):this.currentHandle.css({left:B})}if(H.axis!="horizontal"&&I!==undefined){if(H.stepping.y){I=this._round(I/H.stepping.y)*H.stepping.y}I=this._translateValue(I,"y");I=this._translateLimits(I,"y");I=this._translateRange(I,"y");H.animate?this.currentHandle.stop().animate({top:I},(Math.abs(parseInt(this.currentHandle.css("top"),10)-I))*(!isNaN(parseInt(H.animate,10))?H.animate:5)):this.currentHandle.css({top:I})}if(this.rangeElement){this._updateRange()}this.currentHandle.data("mouse").sliderValue={x:this._round(this._convertValue(B,"x"))||0,y:this._round(this._convertValue(I,"y"))||0};if(!G){this._propagate("start",null);this._propagate("slide",null);this._propagate("stop",null);this._propagate("change",null)}},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);this.element.triggerHandler(C=="slide"?C:"slide"+C,[B,this.ui()],this.options[C])},plugins:{},ui:function(B){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?this._round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:this._round(this.value(null,"x")),y:this._round(this.value(null,"y"))},range:this._getRange()}}});A.extend(A.ui.slider,{getter:"value",version:"1.6",defaults:{animate:false,distance:1,handle:".ui-slider-handle",round:true}})})(jQuery);/*
110
+ * jQuery UI Tabs 1.6
111
+ *
112
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
113
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
114
+ * and GPL (GPL-LICENSE.txt) licenses.
115
+ *
116
+ * http://docs.jquery.com/UI/Tabs
117
+ *
118
+ * Depends:
119
+ * ui.core.js
120
+ */
121
+ (function(A){A.widget("ui.tabs",{_init:function(){this._tabify(true)},destroy:function(){var B=this.options;this.element.unbind(".tabs").removeClass(B.navClass).removeData("tabs");this.$tabs.each(function(){var C=A.data(this,"href.tabs");if(C){this.href=C}var D=A(this).unbind(".tabs");A.each(["href","load","cache"],function(E,F){D.removeData(F+".tabs")})});this.$lis.add(this.$panels).each(function(){if(A.data(this,"destroy.tabs")){A(this).remove()}else{A(this).removeClass([B.selectedClass,B.deselectableClass,B.disabledClass,B.panelClass,B.hideClass].join(" "))}});if(B.cookie){this._cookie(null,B.cookie)}},_setData:function(B,C){if((/^selected/).test(B)){this.select(C)}else{this.options[B]=C;this._tabify()}},length:function(){return this.$tabs.length},_tabId:function(B){return B.title&&B.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+A.data(B)},_sanitizeSelector:function(B){return B.replace(/:/g,"\\:")},_cookie:function(){var B=this.cookie||(this.cookie="ui-tabs-"+A.data(this.element[0]));return A.cookie.apply(null,[B].concat(A.makeArray(arguments)))},_tabify:function(N){this.$lis=A("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return A("a",this)[0]});this.$panels=A([]);var O=this,C=this.options;this.$tabs.each(function(Q,P){if(P.hash&&P.hash.replace("#","")){O.$panels=O.$panels.add(O._sanitizeSelector(P.hash))}else{if(A(P).attr("href")!="#"){A.data(P,"href.tabs",P.href);A.data(P,"load.tabs",P.href);var S=O._tabId(P);P.href="#"+S;var R=A("#"+S);if(!R.length){R=A(C.panelTemplate).attr("id",S).addClass(C.panelClass).insertAfter(O.$panels[Q-1]||O.element);R.data("destroy.tabs",true)}O.$panels=O.$panels.add(R)}else{C.disabled.push(Q+1)}}});if(N){this.element.addClass(C.navClass);this.$panels.addClass(C.panelClass);if(C.selected===undefined){if(location.hash){this.$tabs.each(function(Q,P){if(P.hash==location.hash){C.selected=Q;return false}})}else{if(C.cookie){var I=parseInt(O._cookie(),10);if(I&&O.$tabs[I]){C.selected=I}}else{if(O.$lis.filter("."+C.selectedClass).length){C.selected=O.$lis.index(O.$lis.filter("."+C.selectedClass)[0])}}}}C.selected=C.selected===null||C.selected!==undefined?C.selected:0;C.disabled=A.unique(C.disabled.concat(A.map(this.$lis.filter("."+C.disabledClass),function(Q,P){return O.$lis.index(Q)}))).sort();if(A.inArray(C.selected,C.disabled)!=-1){C.disabled.splice(A.inArray(C.selected,C.disabled),1)}this.$panels.addClass(C.hideClass);this.$lis.removeClass(C.selectedClass);if(C.selected!==null){this.$panels.eq(C.selected).removeClass(C.hideClass);var E=[C.selectedClass];if(C.deselectable){E.push(C.deselectableClass)}this.$lis.eq(C.selected).addClass(E.join(" "));var J=function(){O._trigger("show",null,O.ui(O.$tabs[C.selected],O.$panels[C.selected]))};if(A.data(this.$tabs[C.selected],"load.tabs")){this.load(C.selected,J)}else{J()}}A(window).bind("unload",function(){O.$tabs.unbind(".tabs");O.$lis=O.$tabs=O.$panels=null})}else{C.selected=this.$lis.index(this.$lis.filter("."+C.selectedClass)[0])}if(C.cookie){this._cookie(C.selected,C.cookie)}for(var G=0,M;M=this.$lis[G];G++){A(M)[A.inArray(G,C.disabled)!=-1&&!A(M).hasClass(C.selectedClass)?"addClass":"removeClass"](C.disabledClass)}if(C.cache===false){this.$tabs.removeData("cache.tabs")}var B,H;if(C.fx){if(C.fx.constructor==Array){B=C.fx[0];H=C.fx[1]}else{B=H=C.fx}}function D(P,Q){P.css({display:""});if(A.browser.msie&&Q.opacity){P[0].style.removeAttribute("filter")}}var K=H?function(P,Q){Q.animate(H,H.duration||"normal",function(){Q.removeClass(C.hideClass);D(Q,H);O._trigger("show",null,O.ui(P,Q[0]))})}:function(P,Q){Q.removeClass(C.hideClass);O._trigger("show",null,O.ui(P,Q[0]))};var L=B?function(Q,P,R){P.animate(B,B.duration||"normal",function(){P.addClass(C.hideClass);D(P,B);if(R){K(Q,R,P)}})}:function(Q,P,R){P.addClass(C.hideClass);if(R){K(Q,R)}};function F(R,T,P,S){var Q=[C.selectedClass];if(C.deselectable){Q.push(C.deselectableClass)}T.addClass(Q.join(" ")).siblings().removeClass(Q.join(" "));L(R,P,S)}this.$tabs.unbind(".tabs").bind(C.event+".tabs",function(){var S=A(this).parents("li:eq(0)"),P=O.$panels.filter(":visible"),R=A(O._sanitizeSelector(this.hash));if((S.hasClass(C.selectedClass)&&!C.deselectable)||S.hasClass(C.disabledClass)||A(this).hasClass(C.loadingClass)||O._trigger("select",null,O.ui(this,R[0]))===false){this.blur();return false}C.selected=O.$tabs.index(this);if(C.deselectable){if(S.hasClass(C.selectedClass)){O.options.selected=null;S.removeClass([C.selectedClass,C.deselectableClass].join(" "));O.$panels.stop();L(this,P);this.blur();return false}else{if(!P.length){O.$panels.stop();var Q=this;O.load(O.$tabs.index(this),function(){S.addClass([C.selectedClass,C.deselectableClass].join(" "));K(Q,R)});this.blur();return false}}}if(C.cookie){O._cookie(C.selected,C.cookie)}O.$panels.stop();if(R.length){var Q=this;O.load(O.$tabs.index(this),P.length?function(){F(Q,S,P,R)}:function(){S.addClass(C.selectedClass);K(Q,R)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(A.browser.msie){this.blur()}return false});if(C.event!="click"){this.$tabs.bind("click.tabs",function(){return false})}},add:function(E,D,C){if(C==undefined){C=this.$tabs.length}var G=this.options;var I=A(G.tabTemplate.replace(/#\{href\}/g,E).replace(/#\{label\}/g,D));I.data("destroy.tabs",true);var H=E.indexOf("#")==0?E.replace("#",""):this._tabId(A("a:first-child",I)[0]);var F=A("#"+H);if(!F.length){F=A(G.panelTemplate).attr("id",H).addClass(G.hideClass).data("destroy.tabs",true)}F.addClass(G.panelClass);if(C>=this.$lis.length){I.appendTo(this.element);F.appendTo(this.element[0].parentNode)}else{I.insertBefore(this.$lis[C]);F.insertBefore(this.$panels[C])}G.disabled=A.map(G.disabled,function(K,J){return K>=C?++K:K});this._tabify();if(this.$tabs.length==1){I.addClass(G.selectedClass);F.removeClass(G.hideClass);var B=A.data(this.$tabs[0],"load.tabs");if(B){this.load(C,B)}}this._trigger("add",null,this.ui(this.$tabs[C],this.$panels[C]))},remove:function(B){var D=this.options,E=this.$lis.eq(B).remove(),C=this.$panels.eq(B).remove();if(E.hasClass(D.selectedClass)&&this.$tabs.length>1){this.select(B+(B+1<this.$tabs.length?1:-1))}D.disabled=A.map(A.grep(D.disabled,function(G,F){return G!=B}),function(G,F){return G>=B?--G:G});this._tabify();this._trigger("remove",null,this.ui(E.find("a")[0],C[0]))},enable:function(B){var C=this.options;if(A.inArray(B,C.disabled)==-1){return }var D=this.$lis.eq(B).removeClass(C.disabledClass);if(A.browser.safari){D.css("display","inline-block");setTimeout(function(){D.css("display","block")},0)}C.disabled=A.grep(C.disabled,function(F,E){return F!=B});this._trigger("enable",null,this.ui(this.$tabs[B],this.$panels[B]))},disable:function(C){var B=this,D=this.options;if(C!=D.selected){this.$lis.eq(C).addClass(D.disabledClass);D.disabled.push(C);D.disabled.sort();this._trigger("disable",null,this.ui(this.$tabs[C],this.$panels[C]))}},select:function(B){if(typeof B=="string"){B=this.$tabs.index(this.$tabs.filter("[href$="+B+"]")[0])}this.$tabs.eq(B).trigger(this.options.event+".tabs")},load:function(G,K){var L=this,D=this.options,E=this.$tabs.eq(G),J=E[0],H=K==undefined||K===false,B=E.data("load.tabs");K=K||function(){};if(!B||!H&&A.data(J,"cache.tabs")){K();return }var M=function(N){var O=A(N),P=O.find("*:last");return P.length&&P.is(":not(img)")&&P||O};var C=function(){L.$tabs.filter("."+D.loadingClass).removeClass(D.loadingClass).each(function(){if(D.spinner){M(this).parent().html(M(this).data("label.tabs"))}});L.xhr=null};if(D.spinner){var I=M(J).html();M(J).wrapInner("<em></em>").find("em").data("label.tabs",I).html(D.spinner)}var F=A.extend({},D.ajaxOptions,{url:B,success:function(P,N){A(L._sanitizeSelector(J.hash)).html(P);C();if(D.cache){A.data(J,"cache.tabs",true)}L._trigger("load",null,L.ui(L.$tabs[G],L.$panels[G]));try{D.ajaxOptions.success(P,N)}catch(O){}K()}});if(this.xhr){this.xhr.abort();C()}E.addClass(D.loadingClass);L.xhr=A.ajax(F)},url:function(C,B){this.$tabs.eq(C).removeData("cache.tabs").data("load.tabs",B)},ui:function(C,B){return{options:this.options,tab:C,panel:B,index:this.$tabs.index(C)}}});A.extend(A.ui.tabs,{version:"1.6",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,deselectable:false,deselectableClass:"ui-tabs-deselectable",disabled:[],disabledClass:"ui-tabs-disabled",event:"click",fx:null,hideClass:"ui-tabs-hide",idPrefix:"ui-tabs-",loadingClass:"ui-tabs-loading",navClass:"ui-tabs-nav",panelClass:"ui-tabs-panel",panelTemplate:"<div></div>",selectedClass:"ui-tabs-selected",spinner:"Loading&#8230;",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});A.extend(A.ui.tabs.prototype,{rotation:null,rotate:function(C,F){F=F||false;var B=this,E=this.options.selected;function G(){B.rotation=setInterval(function(){E=++E<B.$tabs.length?E:0;B.select(E)},C)}function D(H){if(!H||H.clientX){clearInterval(B.rotation)}}if(C){G();if(!F){this.$tabs.bind(this.options.event+".tabs",D)}else{this.$tabs.bind(this.options.event+".tabs",function(){D();E=B.options.selected;G()})}}else{D();this.$tabs.unbind(this.options.event+".tabs",D)}}})})(jQuery);/*
122
+ * jQuery UI Datepicker 1.6
123
+ *
124
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
125
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
126
+ * and GPL (GPL-LICENSE.txt) licenses.
127
+ *
128
+ * http://docs.jquery.com/UI/Datepicker
129
+ *
130
+ * Depends:
131
+ * ui.core.js
132
+ */
133
+ (function($){$.extend($.ui,{datepicker:{version:"1.6"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._promptClass="ui-datepicker-prompt";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this._weekOverClass="ui-datepicker-week-over";this.regional=[];this.regional[""]={clearText:"Clear",clearStatus:"Erase the current date",closeText:"Close",closeStatus:"Close without change",prevText:"&#x3c;Prev",prevStatus:"Show the previous month",prevBigText:"&#x3c;&#x3c;",prevBigStatus:"Show the previous year",nextText:"Next&#x3e;",nextStatus:"Show the next month",nextBigText:"&#x3e;&#x3e;",nextBigStatus:"Show the next year",currentText:"Today",currentStatus:"Show the current month",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthStatus:"Show a different month",yearStatus:"Show a different year",weekHeader:"Wk",weekStatus:"Week of the year",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"mm/dd/yy",firstDay:0,initStatus:"Select a date",isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,showBigPrevNext:false,gotoCurrent:false,changeMonth:true,changeYear:true,showMonthAfterYear:false,yearRange:"-10:+10",changeFirstDay:true,highlightWeek:false,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,rangeSelect:false,rangeSeparator:" - ",altField:"",altFormat:"",constrainInput:true};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" style="display: none;"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+'"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);if(input.hasClass(this.markerClassName)){return }var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){input[isRTL?"before":"after"]('<span class="'+this._appendClass+'">'+appendText+"</span>")}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");var trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](trigger);trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return }divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){$target.siblings("."+this._appendClass).remove().end().siblings("."+this._triggerClass).remove().end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;$target.siblings("button."+this._triggerClass).each(function(){this.disabled=false}).end().siblings("img."+this._triggerClass).css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){$target.children("."+this._disableClass).remove()}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;$target.siblings("button."+this._triggerClass).each(function(){this.disabled=true}).end().siblings("img."+this._triggerClass).css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);var offset=inline.offset();var relOffset={left:0,top:0};inline.parents().each(function(){if($(this).css("position")=="relative"){relOffset=$(this).offset();return false}});$target.prepend('<div class="'+this._disableClass+'" style="'+($.browser.msie?"background-color: transparent; ":"")+"width: "+inline.width()+"px; height: "+inline.height()+"px; left: "+(offset.left-relOffset.left)+"px; top: "+(offset.top-relOffset.top)+'px;"></div>')}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}var inst=this._getInst(target);if(inst){if(this._curInst==inst){this._hideDatepicker(null)}extendRemove(inst.settings,settings);var date=new Date();extendRemove(inst,{rangeStart:null,endDay:null,endMonth:null,endYear:null,selectedDay:date.getDate(),selectedMonth:date.getMonth(),selectedYear:date.getFullYear(),currentDay:date.getDate(),currentMonth:date.getMonth(),currentYear:date.getFullYear(),drawMonth:date.getMonth(),drawYear:date.getFullYear()});this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-1,"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+1,"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return }var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);inst.dpDiv.width($.datepicker._getNumberOfMonths(inst)[1]*$(".ui-datepicker",inst.dpDiv[0])[0].offsetWidth);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};inst.dpDiv.empty().append(this._generateHTML(inst));var numMonths=this._getNumberOfMonths(inst);inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var pos=inst.input?this._findPos(inst.input[0]):null;var browserWidth=window.innerWidth||(document.documentElement?document.documentElement.clientWidth:document.body.clientWidth);var browserHeight=window.innerHeight||(document.documentElement?document.documentElement.clientHeight:document.body.clientHeight);var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;if(this._get(inst,"isRTL")||(offset.left+inst.dpDiv.width()-scrollX)>browserWidth){offset.left=Math.max((isFixed?0:scrollX),pos[0]+(inst.input?inst.input.width():0)-(isFixed?scrollX:0)-inst.dpDiv.width()-(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0))}else{offset.left-=(isFixed?scrollX:0)}if((offset.top+inst.dpDiv.height()-scrollY)>browserHeight){offset.top=Math.max((isFixed?0:scrollY),pos[1]-(isFixed?scrollY:0)-(this._inDialog?0:inst.dpDiv.height())-(isFixed&&$.browser.opera?document.documentElement.scrollTop:0))}else{offset.top-=(isFixed?scrollY:0)}return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return }var rangeSelect=this._get(inst,"rangeSelect");if(rangeSelect&&inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;inst.settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker");$("."+this._promptClass,inst.dpDiv).remove()},_checkExternalClick:function(event){if(!$.datepicker._curInst){return }var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);this._adjustInstDate(inst,offset,period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_changeFirstDay:function(id,day){var target=$(id);var inst=this._getInst(target[0]);inst.settings.firstDay=day;this._updateDatepicker(inst)},_selectDay:function(id,month,year,td){if($(td).hasClass(this._unselectableClass)){return }var target=$(id);var inst=this._getInst(target[0]);var rangeSelect=this._get(inst,"rangeSelect");if(rangeSelect){inst.stayOpen=!inst.stayOpen;if(inst.stayOpen){$(".ui-datepicker td",inst.dpDiv).removeClass(this._currentClass);$(td).addClass(this._currentClass)}}inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}else{if(rangeSelect){inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear}}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}else{if(rangeSelect){inst.selectedDay=inst.currentDay=inst.rangeStart.getDate();inst.selectedMonth=inst.currentMonth=inst.rangeStart.getMonth();inst.selectedYear=inst.currentYear=inst.rangeStart.getFullYear();inst.rangeStart=null;if(inst.inline){this._updateDatepicker(inst)}}}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"mandatory")){return }inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(this._get(inst,"rangeSelect")&&dateStr){dateStr=(inst.rangeStart?this._formatDate(inst,inst.rangeStart):dateStr)+this._get(inst,"rangeSeparator")+dateStr}if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof (inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=(isArray(date)?(!date[0]&&!date[1]?"":this.formatDate(altFormat,date[0],this._getFormatConfig(inst))+this._get(inst,"rangeSeparator")+this.formatDate(altFormat,date[1]||date[0],this._getFormatConfig(inst))):this.formatDate(altFormat,date,this._getFormatConfig(inst)));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},dateStatus:function(date,inst){return $.datepicker.formatDate($.datepicker._get(inst,"dateStatus"),date,$.datepicker._getFormatConfig(inst))},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val().split(this._get(inst,"rangeSeparator")):null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);if(dates.length>0){var settings=this._getFormatConfig(inst);if(dates.length>1){date=this.parseDate(dateFormat,dates[1],settings)||defaultDate;inst.endDay=date.getDate();inst.endMonth=date.getMonth();inst.endYear=date.getFullYear()}try{date=this.parseDate(dateFormat,dates[0],settings)||defaultDate}catch(event){this.log(event);date=defaultDate}}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates[0]?date.getDate():0);inst.currentMonth=(dates[0]?date.getMonth():0);inst.currentYear=(dates[0]?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(this._get(inst,"rangeSelect")){if(endDate){endDate=this._determineDate(endDate,null);inst.endDay=endDate.getDate();inst.endMonth=endDate.getMonth();inst.endYear=endDate.getFullYear()}else{inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear}}if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst)+(!this._get(inst,"rangeSelect")?"":this._get(inst,"rangeSeparator")+this._formatDate(inst,inst.endDay,inst.endMonth,inst.endYear)))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));if(this._get(inst,"rangeSelect")){return[inst.rangeStart||startDate,(!inst.endYear?inst.rangeStart||startDate:this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)))]}else{return startDate}},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var showStatus=this._get(inst,"showStatus");var initStatus=this._get(inst,"initStatus")||"&#xa0;";var isRTL=this._get(inst,"isRTL");var clear=(this._get(inst,"mandatory")?"":'<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#'+inst.id+"');\""+this._addStatus(showStatus,inst.id,this._get(inst,"clearStatus"),initStatus)+">"+this._get(inst,"clearText")+"</a></div>");var controls='<div class="ui-datepicker-control">'+(isRTL?"":clear)+'<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"'+this._addStatus(showStatus,inst.id,this._get(inst,"closeStatus"),initStatus)+">"+this._get(inst,"closeText")+"</a></div>"+(isRTL?clear:"")+"</div>";var prompt=this._get(inst,"prompt");var closeAtTop=this._get(inst,"closeAtTop");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var showBigPrevNext=this._get(inst,"showBigPrevNext");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prevBigText=(showBigPrevNext?this._get(inst,"prevBigText"):"");prevBigText=(!navigationAsDateFormat?prevBigText:this.formatDate(prevBigText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepBigMonths,1)),this._getFormatConfig(inst)));var prev='<div class="ui-datepicker-prev">'+(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?(showBigPrevNext?"<a onclick=\"jQuery.datepicker._adjustDate('#"+inst.id+"', -"+stepBigMonths+", 'M');\""+this._addStatus(showStatus,inst.id,this._get(inst,"prevBigStatus"),initStatus)+">"+prevBigText+"</a>":"")+"<a onclick=\"jQuery.datepicker._adjustDate('#"+inst.id+"', -"+stepMonths+", 'M');\""+this._addStatus(showStatus,inst.id,this._get(inst,"prevStatus"),initStatus)+">"+prevText+"</a>":(hideIfNoPrevNext?"":(showBigPrevNext?"<label>"+prevBigText+"</label>":"")+"<label>"+prevText+"</label>"))+"</div>";var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var nextBigText=(showBigPrevNext?this._get(inst,"nextBigText"):"");nextBigText=(!navigationAsDateFormat?nextBigText:this.formatDate(nextBigText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepBigMonths,1)),this._getFormatConfig(inst)));var next='<div class="ui-datepicker-next">'+(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+inst.id+"', +"+stepMonths+", 'M');\""+this._addStatus(showStatus,inst.id,this._get(inst,"nextStatus"),initStatus)+">"+nextText+"</a>"+(showBigPrevNext?"<a onclick=\"jQuery.datepicker._adjustDate('#"+inst.id+"', +"+stepBigMonths+", 'M');\""+this._addStatus(showStatus,inst.id,this._get(inst,"nextBigStatus"),initStatus)+">"+nextBigText+"</a>":""):(hideIfNoPrevNext?"":"<label>"+nextText+"</label>"+(showBigPrevNext?"<label>"+nextBigText+"</label>":"")))+"</div>";var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var html=(closeAtTop&&!inst.inline?controls:"")+'<div class="ui-datepicker-links">'+(isRTL?next:prev)+(this._isInRange(inst,gotoDate)?'<div class="ui-datepicker-current"><a onclick="jQuery.datepicker._gotoToday(\'#'+inst.id+"');\""+this._addStatus(showStatus,inst.id,this._get(inst,"currentStatus"),initStatus)+">"+currentText+"</a></div>":"")+(isRTL?prev:next)+"</div>"+(prompt?'<div class="'+this._promptClass+'"><span>'+prompt+"</span></div>":"");var firstDay=parseInt(this._get(inst,"firstDay"));firstDay=(isNaN(firstDay)?0:firstDay);var changeFirstDay=this._get(inst,"changeFirstDay");var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var beforeShowDay=this._get(inst,"beforeShowDay");var highlightWeek=this._get(inst,"highlightWeek");var showOtherMonths=this._get(inst,"showOtherMonths");var showWeeks=this._get(inst,"showWeeks");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var weekStatus=this._get(inst,"weekStatus");var status=(showStatus?this._get(inst,"dayStatus")||initStatus:"");var dateStatus=this._get(inst,"statusForDate")||this.dateStatus;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);for(var row=0;row<numMonths[0];row++){for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));html+='<div class="ui-datepicker-one-month'+(col==0?" ui-datepicker-new-row":"")+'">'+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,showStatus,initStatus,monthNames)+'<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead><tr class="ui-datepicker-title-row">'+(showWeeks?"<td"+this._addStatus(showStatus,inst.id,weekStatus,initStatus)+">"+this._get(inst,"weekHeader")+"</td>":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;var dayStatus=(status.indexOf("DD")>-1?status.replace(/DD/,dayNames[day]):status.replace(/D/,dayNamesShort[day]));html+="<td"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end-cell"':"")+">"+(!changeFirstDay?"<span":"<a onclick=\"jQuery.datepicker._changeFirstDay('#"+inst.id+"', "+day+');"')+this._addStatus(showStatus,inst.id,dayStatus,initStatus)+' title="'+dayNames[day]+'">'+dayNamesMin[day]+(changeFirstDay?"</a>":"</span>")+"</td>"}html+="</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){html+='<tr class="ui-datepicker-days-row">'+(showWeeks?'<td class="ui-datepicker-week-col"'+this._addStatus(showStatus,inst.id,weekStatus,initStatus)+">"+calculateWeek(printDate)+"</td>":"");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);html+='<td class="ui-datepicker-days-cell'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end-cell":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+$.datepicker._dayOverClass:"")+(unselectable?" "+this._unselectableClass:"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?(highlightWeek?" onmouseover=\"jQuery(this).parent().addClass('"+this._weekOverClass+"');\" onmouseout=\"jQuery(this).parent().removeClass('"+this._weekOverClass+"');\"":""):" onmouseover=\"jQuery(this).addClass('"+this._dayOverClass+"')"+(highlightWeek?".parent().addClass('"+this._weekOverClass+"')":"")+";"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+inst.id+"').html('"+(dateStatus.apply((inst.input?inst.input[0]:null),[printDate,inst])||initStatus)+"');")+'" onmouseout="jQuery(this).removeClass(\''+this._dayOverClass+"')"+(highlightWeek?".parent().removeClass('"+this._weekOverClass+"')":"")+";"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+inst.id+"').html('"+initStatus+"');")+'" onclick="jQuery.datepicker._selectDay(\'#'+inst.id+"',"+drawMonth+","+drawYear+', this);"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?printDate.getDate():"<a>"+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}html+="</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}html+="</tbody></table></div>"}}html+=(showStatus?'<div style="clear: both;"></div><div id="ui-datepicker-status-'+inst.id+'" class="ui-datepicker-status">'+initStatus+"</div>":"")+(!closeAtTop&&!inst.inline?controls:"")+'<div style="clear: both;"></div>'+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,showStatus,initStatus,monthNames){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-header">';var monthHtml="";if(secondary||!changeMonth){monthHtml+=monthNames[drawMonth]}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-new-month" onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+inst.id+"');\""+this._addStatus(showStatus,inst.id,this._get(inst,"monthStatus"),initStatus)+">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNames[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+(secondary||changeMonth||changeYear?"&#xa0;":"")}if(secondary||!changeYear){html+=drawYear}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=endYear=new Date().getFullYear();year+=parseInt(years[0],10);endYear+=parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-new-year" onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+inst.id+"');\""+this._addStatus(showStatus,inst.id,this._get(inst,"yearStatus"),initStatus)+">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_addStatus:function(showStatus,id,text,initStatus){return(showStatus?" onmouseover=\"jQuery('#ui-datepicker-status-"+id+"').html('"+(text||initStatus)+"');\" onmouseout=\"jQuery('#ui-datepicker-status-"+id+"').html('"+initStatus+"');\"":"")},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document.body).append($.datepicker.dpDiv).mousedown($.datepicker._checkExternalClick);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.6"})(jQuery);/*
134
+ * jQuery UI Effects 1.6
135
+ *
136
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
137
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
138
+ * and GPL (GPL-LICENSE.txt) licenses.
139
+ *
140
+ * http://docs.jquery.com/UI/Effects/
141
+ */
142
+ (function(C){C.effects=C.effects||{};C.extend(C.effects,{version:"1.6",save:function(F,G){for(var E=0;E<G.length;E++){if(G[E]!==null){C.data(F[0],"ec.storage."+G[E],F[0].style[G[E]])}}},restore:function(F,G){for(var E=0;E<G.length;E++){if(G[E]!==null){F.css(G[E],C.data(F[0],"ec.storage."+G[E]))}}},setMode:function(E,F){if(F=="toggle"){F=E.is(":hidden")?"show":"hide"}return F},getBaseline:function(F,G){var H,E;switch(F[0]){case"top":H=0;break;case"middle":H=0.5;break;case"bottom":H=1;break;default:H=F[0]/G.height}switch(F[1]){case"left":E=0;break;case"center":E=0.5;break;case"right":E=1;break;default:E=F[1]/G.width}return{x:E,y:H}},createWrapper:function(F){if(F.parent().attr("id")=="fxWrapper"){return F}var E={width:F.outerWidth({margin:true}),height:F.outerHeight({margin:true}),"float":F.css("float")};F.wrap('<div id="fxWrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var I=F.parent();if(F.css("position")=="static"){I.css({position:"relative"});F.css({position:"relative"})}else{var H=F.css("top");if(isNaN(parseInt(H))){H="auto"}var G=F.css("left");if(isNaN(parseInt(G))){G="auto"}I.css({position:F.css("position"),top:H,left:G,zIndex:F.css("z-index")}).show();F.css({position:"relative",top:0,left:0})}I.css(E);return I},removeWrapper:function(E){if(E.parent().attr("id")=="fxWrapper"){return E.parent().replaceWith(E)}return E},setTransition:function(F,G,E,H){H=H||{};C.each(G,function(J,I){unit=F.cssUnit(I);if(unit[0]>0){H[I]=unit[0]*E+unit[1]}});return H},animateClass:function(G,H,J,I){var E=(typeof J=="function"?J:(I?I:null));var F=(typeof J=="object"?J:null);return this.each(function(){var O={};var M=C(this);var N=M.attr("style")||"";if(typeof N=="object"){N=N["cssText"]}if(G.toggle){M.hasClass(G.toggle)?G.remove=G.toggle:G.add=G.toggle}var K=C.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(G.add){M.addClass(G.add)}if(G.remove){M.removeClass(G.remove)}var L=C.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(G.add){M.removeClass(G.add)}if(G.remove){M.addClass(G.remove)}for(var P in L){if(typeof L[P]!="function"&&L[P]&&P.indexOf("Moz")==-1&&P.indexOf("length")==-1&&L[P]!=K[P]&&(P.match(/color/i)||(!P.match(/color/i)&&!isNaN(parseInt(L[P],10))))&&(K.position!="static"||(K.position=="static"&&!P.match(/left|top|bottom|right/)))){O[P]=L[P]}}M.animate(O,H,F,function(){if(typeof C(this).attr("style")=="object"){C(this).attr("style")["cssText"]="";C(this).attr("style")["cssText"]=N}else{C(this).attr("style",N)}if(G.add){C(this).addClass(G.add)}if(G.remove){C(this).removeClass(G.remove)}if(E){E.apply(this,arguments)}})})}});C.fn.extend({_show:C.fn.show,_hide:C.fn.hide,__toggle:C.fn.toggle,_addClass:C.fn.addClass,_removeClass:C.fn.removeClass,_toggleClass:C.fn.toggleClass,effect:function(E,G,F,H){return C.effects[E]?C.effects[E].call(this,{method:E,options:G||{},duration:F,callback:H}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._show.apply(this,arguments)}else{var E=arguments[1]||{};E["mode"]="show";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback])}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._hide.apply(this,arguments)}else{var E=arguments[1]||{};E["mode"]="hide";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback])}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments)}else{var E=arguments[1]||{};E["mode"]="toggle";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback])}},addClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{add:F},E,H,G]):this._addClass(F)},removeClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{remove:F},E,H,G]):this._removeClass(F)},toggleClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{toggle:F},E,H,G]):this._toggleClass(F)},morph:function(E,G,F,I,H){return C.effects.animateClass.apply(this,[{add:G,remove:E},F,I,H])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(E){var F=this.css(E),G=[];C.each(["em","px","%","pt"],function(H,I){if(F.indexOf(I)>0){G=[parseFloat(F),I]}});return G}});C.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(F,E){C.fx.step[E]=function(G){if(G.state==0){G.start=D(G.elem,E);G.end=B(G.end)}G.elem.style[E]="rgb("+[Math.max(Math.min(parseInt((G.pos*(G.end[0]-G.start[0]))+G.start[0]),255),0),Math.max(Math.min(parseInt((G.pos*(G.end[1]-G.start[1]))+G.start[1]),255),0),Math.max(Math.min(parseInt((G.pos*(G.end[2]-G.start[2]))+G.start[2]),255),0)].join(",")+")"}});function B(F){var E;if(F&&F.constructor==Array&&F.length==3){return F}if(E=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(F)){return[parseInt(E[1]),parseInt(E[2]),parseInt(E[3])]}if(E=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(F)){return[parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55]}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(F)){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)]}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(F)){return[parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16)]}if(E=/rgba\(0, 0, 0, 0\)/.exec(F)){return A["transparent"]}return A[C.trim(F).toLowerCase()]}function D(G,E){var F;do{F=C.curCSS(G,E);if(F!=""&&F!="transparent"||C.nodeName(G,"body")){break}E="backgroundColor"}while(G=G.parentNode);return B(F)}var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};C.easing.jswing=C.easing.swing;C.extend(C.easing,{def:"easeOutQuad",swing:function(F,G,E,I,H){return C.easing[C.easing.def](F,G,E,I,H)},easeInQuad:function(F,G,E,I,H){return I*(G/=H)*G+E},easeOutQuad:function(F,G,E,I,H){return -I*(G/=H)*(G-2)+E},easeInOutQuad:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G+E}return -I/2*((--G)*(G-2)-1)+E},easeInCubic:function(F,G,E,I,H){return I*(G/=H)*G*G+E},easeOutCubic:function(F,G,E,I,H){return I*((G=G/H-1)*G*G+1)+E},easeInOutCubic:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G+E}return I/2*((G-=2)*G*G+2)+E},easeInQuart:function(F,G,E,I,H){return I*(G/=H)*G*G*G+E},easeOutQuart:function(F,G,E,I,H){return -I*((G=G/H-1)*G*G*G-1)+E},easeInOutQuart:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G*G+E}return -I/2*((G-=2)*G*G*G-2)+E},easeInQuint:function(F,G,E,I,H){return I*(G/=H)*G*G*G*G+E},easeOutQuint:function(F,G,E,I,H){return I*((G=G/H-1)*G*G*G*G+1)+E},easeInOutQuint:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G*G*G+E}return I/2*((G-=2)*G*G*G*G+2)+E},easeInSine:function(F,G,E,I,H){return -I*Math.cos(G/H*(Math.PI/2))+I+E},easeOutSine:function(F,G,E,I,H){return I*Math.sin(G/H*(Math.PI/2))+E},easeInOutSine:function(F,G,E,I,H){return -I/2*(Math.cos(Math.PI*G/H)-1)+E},easeInExpo:function(F,G,E,I,H){return(G==0)?E:I*Math.pow(2,10*(G/H-1))+E},easeOutExpo:function(F,G,E,I,H){return(G==H)?E+I:I*(-Math.pow(2,-10*G/H)+1)+E},easeInOutExpo:function(F,G,E,I,H){if(G==0){return E}if(G==H){return E+I}if((G/=H/2)<1){return I/2*Math.pow(2,10*(G-1))+E}return I/2*(-Math.pow(2,-10*--G)+2)+E},easeInCirc:function(F,G,E,I,H){return -I*(Math.sqrt(1-(G/=H)*G)-1)+E},easeOutCirc:function(F,G,E,I,H){return I*Math.sqrt(1-(G=G/H-1)*G)+E},easeInOutCirc:function(F,G,E,I,H){if((G/=H/2)<1){return -I/2*(Math.sqrt(1-G*G)-1)+E}return I/2*(Math.sqrt(1-(G-=2)*G)+1)+E},easeInElastic:function(F,H,E,L,K){var I=1.70158;var J=0;var G=L;if(H==0){return E}if((H/=K)==1){return E+L}if(!J){J=K*0.3}if(G<Math.abs(L)){G=L;var I=J/4}else{var I=J/(2*Math.PI)*Math.asin(L/G)}return -(G*Math.pow(2,10*(H-=1))*Math.sin((H*K-I)*(2*Math.PI)/J))+E},easeOutElastic:function(F,H,E,L,K){var I=1.70158;var J=0;var G=L;if(H==0){return E}if((H/=K)==1){return E+L}if(!J){J=K*0.3}if(G<Math.abs(L)){G=L;var I=J/4}else{var I=J/(2*Math.PI)*Math.asin(L/G)}return G*Math.pow(2,-10*H)*Math.sin((H*K-I)*(2*Math.PI)/J)+L+E},easeInOutElastic:function(F,H,E,L,K){var I=1.70158;var J=0;var G=L;if(H==0){return E}if((H/=K/2)==2){return E+L}if(!J){J=K*(0.3*1.5)}if(G<Math.abs(L)){G=L;var I=J/4}else{var I=J/(2*Math.PI)*Math.asin(L/G)}if(H<1){return -0.5*(G*Math.pow(2,10*(H-=1))*Math.sin((H*K-I)*(2*Math.PI)/J))+E}return G*Math.pow(2,-10*(H-=1))*Math.sin((H*K-I)*(2*Math.PI)/J)*0.5+L+E},easeInBack:function(F,G,E,J,I,H){if(H==undefined){H=1.70158}return J*(G/=I)*G*((H+1)*G-H)+E},easeOutBack:function(F,G,E,J,I,H){if(H==undefined){H=1.70158}return J*((G=G/I-1)*G*((H+1)*G+H)+1)+E},easeInOutBack:function(F,G,E,J,I,H){if(H==undefined){H=1.70158}if((G/=I/2)<1){return J/2*(G*G*(((H*=(1.525))+1)*G-H))+E}return J/2*((G-=2)*G*(((H*=(1.525))+1)*G+H)+2)+E},easeInBounce:function(F,G,E,I,H){return I-C.easing.easeOutBounce(F,H-G,0,I,H)+E},easeOutBounce:function(F,G,E,I,H){if((G/=H)<(1/2.75)){return I*(7.5625*G*G)+E}else{if(G<(2/2.75)){return I*(7.5625*(G-=(1.5/2.75))*G+0.75)+E}else{if(G<(2.5/2.75)){return I*(7.5625*(G-=(2.25/2.75))*G+0.9375)+E}else{return I*(7.5625*(G-=(2.625/2.75))*G+0.984375)+E}}}},easeInOutBounce:function(F,G,E,I,H){if(G<H/2){return C.easing.easeInBounce(F,G*2,0,I,H)*0.5+E}return C.easing.easeOutBounce(F,G*2-H,0,I,H)*0.5+I*0.5+E}})})(jQuery);/*
143
+ * jQuery UI Effects Blind 1.6
144
+ *
145
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
146
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
147
+ * and GPL (GPL-LICENSE.txt) licenses.
148
+ *
149
+ * http://docs.jquery.com/UI/Effects/Blind
150
+ *
151
+ * Depends:
152
+ * effects.core.js
153
+ */
154
+ (function(A){A.effects.blind=function(B){return this.queue(function(){var D=A(this),C=["position","top","left"];var H=A.effects.setMode(D,B.options.mode||"hide");var G=B.options.direction||"vertical";A.effects.save(D,C);D.show();var J=A.effects.createWrapper(D).css({overflow:"hidden"});var E=(G=="vertical")?"height":"width";var I=(G=="vertical")?J.height():J.width();if(H=="show"){J.css(E,0)}var F={};F[E]=H=="show"?I:0;J.animate(F,B.duration,B.options.easing,function(){if(H=="hide"){D.hide()}A.effects.restore(D,C);A.effects.removeWrapper(D);if(B.callback){B.callback.apply(D[0],arguments)}D.dequeue()})})}})(jQuery);/*
155
+ * jQuery UI Effects Bounce 1.6
156
+ *
157
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
158
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
159
+ * and GPL (GPL-LICENSE.txt) licenses.
160
+ *
161
+ * http://docs.jquery.com/UI/Effects/Bounce
162
+ *
163
+ * Depends:
164
+ * effects.core.js
165
+ */
166
+ (function(A){A.effects.bounce=function(B){return this.queue(function(){var E=A(this),K=["position","top","left"];var J=A.effects.setMode(E,B.options.mode||"effect");var M=B.options.direction||"up";var C=B.options.distance||20;var D=B.options.times||5;var G=B.duration||250;if(/show|hide/.test(J)){K.push("opacity")}A.effects.save(E,K);E.show();A.effects.createWrapper(E);var F=(M=="up"||M=="down")?"top":"left";var O=(M=="up"||M=="left")?"pos":"neg";var C=B.options.distance||(F=="top"?E.outerHeight({margin:true})/3:E.outerWidth({margin:true})/3);if(J=="show"){E.css("opacity",0).css(F,O=="pos"?-C:C)}if(J=="hide"){C=C/(D*2)}if(J!="hide"){D--}if(J=="show"){var H={opacity:1};H[F]=(O=="pos"?"+=":"-=")+C;E.animate(H,G/2,B.options.easing);C=C/2;D--}for(var I=0;I<D;I++){var N={},L={};N[F]=(O=="pos"?"-=":"+=")+C;L[F]=(O=="pos"?"+=":"-=")+C;E.animate(N,G/2,B.options.easing).animate(L,G/2,B.options.easing);C=(J=="hide")?C*2:C/2}if(J=="hide"){var H={opacity:0};H[F]=(O=="pos"?"-=":"+=")+C;E.animate(H,G/2,B.options.easing,function(){E.hide();A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}})}else{var N={},L={};N[F]=(O=="pos"?"-=":"+=")+C;L[F]=(O=="pos"?"+=":"-=")+C;E.animate(N,G/2,B.options.easing).animate(L,G/2,B.options.easing,function(){A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}})}E.queue("fx",function(){E.dequeue()});E.dequeue()})}})(jQuery);/*
167
+ * jQuery UI Effects Clip 1.6
168
+ *
169
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
170
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
171
+ * and GPL (GPL-LICENSE.txt) licenses.
172
+ *
173
+ * http://docs.jquery.com/UI/Effects/Clip
174
+ *
175
+ * Depends:
176
+ * effects.core.js
177
+ */
178
+ (function(A){A.effects.clip=function(B){return this.queue(function(){var F=A(this),J=["position","top","left","height","width"];var I=A.effects.setMode(F,B.options.mode||"hide");var K=B.options.direction||"vertical";A.effects.save(F,J);F.show();var C=A.effects.createWrapper(F).css({overflow:"hidden"});var E=F[0].tagName=="IMG"?C:F;var G={size:(K=="vertical")?"height":"width",position:(K=="vertical")?"top":"left"};var D=(K=="vertical")?E.height():E.width();if(I=="show"){E.css(G.size,0);E.css(G.position,D/2)}var H={};H[G.size]=I=="show"?D:0;H[G.position]=I=="show"?0:D/2;E.animate(H,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){F.hide()}A.effects.restore(F,J);A.effects.removeWrapper(F);if(B.callback){B.callback.apply(F[0],arguments)}F.dequeue()}})})}})(jQuery);/*
179
+ * jQuery UI Effects Drop 1.6
180
+ *
181
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
182
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
183
+ * and GPL (GPL-LICENSE.txt) licenses.
184
+ *
185
+ * http://docs.jquery.com/UI/Effects/Drop
186
+ *
187
+ * Depends:
188
+ * effects.core.js
189
+ */
190
+ (function(A){A.effects.drop=function(B){return this.queue(function(){var E=A(this),D=["position","top","left","opacity"];var I=A.effects.setMode(E,B.options.mode||"hide");var H=B.options.direction||"left";A.effects.save(E,D);E.show();A.effects.createWrapper(E);var F=(H=="up"||H=="down")?"top":"left";var C=(H=="up"||H=="left")?"pos":"neg";var J=B.options.distance||(F=="top"?E.outerHeight({margin:true})/2:E.outerWidth({margin:true})/2);if(I=="show"){E.css("opacity",0).css(F,C=="pos"?-J:J)}var G={opacity:I=="show"?1:0};G[F]=(I=="show"?(C=="pos"?"+=":"-="):(C=="pos"?"-=":"+="))+J;E.animate(G,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){E.hide()}A.effects.restore(E,D);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);/*
191
+ * jQuery UI Effects Explode 1.6
192
+ *
193
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
194
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
195
+ * and GPL (GPL-LICENSE.txt) licenses.
196
+ *
197
+ * http://docs.jquery.com/UI/Effects/Explode
198
+ *
199
+ * Depends:
200
+ * effects.core.js
201
+ */
202
+ (function(A){A.effects.explode=function(B){return this.queue(function(){var I=B.options.pieces?Math.round(Math.sqrt(B.options.pieces)):3;var E=B.options.pieces?Math.round(Math.sqrt(B.options.pieces)):3;B.options.mode=B.options.mode=="toggle"?(A(this).is(":visible")?"hide":"show"):B.options.mode;var H=A(this).show().css("visibility","hidden");var J=H.offset();J.top-=parseInt(H.css("marginTop"))||0;J.left-=parseInt(H.css("marginLeft"))||0;var G=H.outerWidth(true);var C=H.outerHeight(true);for(var F=0;F<I;F++){for(var D=0;D<E;D++){H.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-D*(G/E),top:-F*(C/I)}).parent().addClass("effects-explode").css({position:"absolute",overflow:"hidden",width:G/E,height:C/I,left:J.left+D*(G/E)+(B.options.mode=="show"?(D-Math.floor(E/2))*(G/E):0),top:J.top+F*(C/I)+(B.options.mode=="show"?(F-Math.floor(I/2))*(C/I):0),opacity:B.options.mode=="show"?0:1}).animate({left:J.left+D*(G/E)+(B.options.mode=="show"?0:(D-Math.floor(E/2))*(G/E)),top:J.top+F*(C/I)+(B.options.mode=="show"?0:(F-Math.floor(I/2))*(C/I)),opacity:B.options.mode=="show"?1:0},B.duration||500)}}setTimeout(function(){B.options.mode=="show"?H.css({visibility:"visible"}):H.css({visibility:"visible"}).hide();if(B.callback){B.callback.apply(H[0])}H.dequeue();A(".effects-explode").remove()},B.duration||500)})}})(jQuery);/*
203
+ * jQuery UI Effects Fold 1.6
204
+ *
205
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
206
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
207
+ * and GPL (GPL-LICENSE.txt) licenses.
208
+ *
209
+ * http://docs.jquery.com/UI/Effects/Fold
210
+ *
211
+ * Depends:
212
+ * effects.core.js
213
+ */
214
+ (function(A){A.effects.fold=function(B){return this.queue(function(){var E=A(this),J=["position","top","left"];var G=A.effects.setMode(E,B.options.mode||"hide");var N=B.options.size||15;var M=!(!B.options.horizFirst);A.effects.save(E,J);E.show();var D=A.effects.createWrapper(E).css({overflow:"hidden"});var H=((G=="show")!=M);var F=H?["width","height"]:["height","width"];var C=H?[D.width(),D.height()]:[D.height(),D.width()];var I=/([0-9]+)%/.exec(N);if(I){N=parseInt(I[1])/100*C[G=="hide"?0:1]}if(G=="show"){D.css(M?{height:0,width:N}:{height:N,width:0})}var L={},K={};L[F[0]]=G=="show"?C[0]:N;K[F[1]]=G=="show"?C[1]:0;D.animate(L,B.duration/2,B.options.easing).animate(K,B.duration/2,B.options.easing,function(){if(G=="hide"){E.hide()}A.effects.restore(E,J);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(E[0],arguments)}E.dequeue()})})}})(jQuery);/*
215
+ * jQuery UI Effects Highlight 1.6
216
+ *
217
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
218
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
219
+ * and GPL (GPL-LICENSE.txt) licenses.
220
+ *
221
+ * http://docs.jquery.com/UI/Effects/Highlight
222
+ *
223
+ * Depends:
224
+ * effects.core.js
225
+ */
226
+ (function(A){A.effects.highlight=function(B){return this.queue(function(){var E=A(this),D=["backgroundImage","backgroundColor","opacity"];var H=A.effects.setMode(E,B.options.mode||"show");var C=B.options.color||"#ffff99";var G=E.css("backgroundColor");A.effects.save(E,D);E.show();E.css({backgroundImage:"none",backgroundColor:C});var F={backgroundColor:G};if(H=="hide"){F["opacity"]=0}E.animate(F,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(H=="hide"){E.hide()}A.effects.restore(E,D);if(H=="show"&&A.browser.msie){this.style.removeAttribute("filter")}if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);/*
227
+ * jQuery UI Effects Pulsate 1.6
228
+ *
229
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
230
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
231
+ * and GPL (GPL-LICENSE.txt) licenses.
232
+ *
233
+ * http://docs.jquery.com/UI/Effects/Pulsate
234
+ *
235
+ * Depends:
236
+ * effects.core.js
237
+ */
238
+ (function(A){A.effects.pulsate=function(B){return this.queue(function(){var D=A(this);var F=A.effects.setMode(D,B.options.mode||"show");var E=B.options.times||5;if(F=="hide"){E--}if(D.is(":hidden")){D.css("opacity",0);D.show();D.animate({opacity:1},B.duration/2,B.options.easing);E=E-2}for(var C=0;C<E;C++){D.animate({opacity:0},B.duration/2,B.options.easing).animate({opacity:1},B.duration/2,B.options.easing)}if(F=="hide"){D.animate({opacity:0},B.duration/2,B.options.easing,function(){D.hide();if(B.callback){B.callback.apply(this,arguments)}})}else{D.animate({opacity:0},B.duration/2,B.options.easing).animate({opacity:1},B.duration/2,B.options.easing,function(){if(B.callback){B.callback.apply(this,arguments)}})}D.queue("fx",function(){D.dequeue()});D.dequeue()})}})(jQuery);/*
239
+ * jQuery UI Effects Scale 1.6
240
+ *
241
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
242
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
243
+ * and GPL (GPL-LICENSE.txt) licenses.
244
+ *
245
+ * http://docs.jquery.com/UI/Effects/Scale
246
+ *
247
+ * Depends:
248
+ * effects.core.js
249
+ */
250
+ (function(A){A.effects.puff=function(B){return this.queue(function(){var F=A(this);var C=A.extend(true,{},B.options);var H=A.effects.setMode(F,B.options.mode||"hide");var G=parseInt(B.options.percent)||150;C.fade=true;var E={height:F.height(),width:F.width()};var D=G/100;F.from=(H=="hide")?E:{height:E.height*D,width:E.width*D};C.from=F.from;C.percent=(H=="hide")?G:100;C.mode=H;F.effect("scale",C,B.duration,B.callback);F.dequeue()})};A.effects.scale=function(B){return this.queue(function(){var G=A(this);var D=A.extend(true,{},B.options);var J=A.effects.setMode(G,B.options.mode||"effect");var H=parseInt(B.options.percent)||(parseInt(B.options.percent)==0?0:(J=="hide"?0:100));var I=B.options.direction||"both";var C=B.options.origin;if(J!="effect"){D.origin=C||["middle","center"];D.restore=true}var F={height:G.height(),width:G.width()};G.from=B.options.from||(J=="show"?{height:0,width:0}:F);var E={y:I!="horizontal"?(H/100):1,x:I!="vertical"?(H/100):1};G.to={height:F.height*E.y,width:F.width*E.x};if(B.options.fade){if(J=="show"){G.from.opacity=0;G.to.opacity=1}if(J=="hide"){G.from.opacity=1;G.to.opacity=0}}D.from=G.from;D.to=G.to;D.mode=J;G.effect("size",D,B.duration,B.callback);G.dequeue()})};A.effects.size=function(B){return this.queue(function(){var C=A(this),N=["position","top","left","width","height","overflow","opacity"];var M=["position","top","left","overflow","opacity"];var J=["width","height","overflow"];var P=["fontSize"];var K=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var F=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var G=A.effects.setMode(C,B.options.mode||"effect");var I=B.options.restore||false;var E=B.options.scale||"both";var O=B.options.origin;var D={height:C.height(),width:C.width()};C.from=B.options.from||D;C.to=B.options.to||D;if(O){var H=A.effects.getBaseline(O,D);C.from.top=(D.height-C.from.height)*H.y;C.from.left=(D.width-C.from.width)*H.x;C.to.top=(D.height-C.to.height)*H.y;C.to.left=(D.width-C.to.width)*H.x}var L={from:{y:C.from.height/D.height,x:C.from.width/D.width},to:{y:C.to.height/D.height,x:C.to.width/D.width}};if(E=="box"||E=="both"){if(L.from.y!=L.to.y){N=N.concat(K);C.from=A.effects.setTransition(C,K,L.from.y,C.from);C.to=A.effects.setTransition(C,K,L.to.y,C.to)}if(L.from.x!=L.to.x){N=N.concat(F);C.from=A.effects.setTransition(C,F,L.from.x,C.from);C.to=A.effects.setTransition(C,F,L.to.x,C.to)}}if(E=="content"||E=="both"){if(L.from.y!=L.to.y){N=N.concat(P);C.from=A.effects.setTransition(C,P,L.from.y,C.from);C.to=A.effects.setTransition(C,P,L.to.y,C.to)}}A.effects.save(C,I?N:M);C.show();A.effects.createWrapper(C);C.css("overflow","hidden").css(C.from);if(E=="content"||E=="both"){K=K.concat(["marginTop","marginBottom"]).concat(P);F=F.concat(["marginLeft","marginRight"]);J=N.concat(K).concat(F);C.find("*[width]").each(function(){child=A(this);if(I){A.effects.save(child,J)}var Q={height:child.height(),width:child.width()};child.from={height:Q.height*L.from.y,width:Q.width*L.from.x};child.to={height:Q.height*L.to.y,width:Q.width*L.to.x};if(L.from.y!=L.to.y){child.from=A.effects.setTransition(child,K,L.from.y,child.from);child.to=A.effects.setTransition(child,K,L.to.y,child.to)}if(L.from.x!=L.to.x){child.from=A.effects.setTransition(child,F,L.from.x,child.from);child.to=A.effects.setTransition(child,F,L.to.x,child.to)}child.css(child.from);child.animate(child.to,B.duration,B.options.easing,function(){if(I){A.effects.restore(child,J)}})})}C.animate(C.to,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(G=="hide"){C.hide()}A.effects.restore(C,I?N:M);A.effects.removeWrapper(C);if(B.callback){B.callback.apply(this,arguments)}C.dequeue()}})})}})(jQuery);/*
251
+ * jQuery UI Effects Shake 1.6
252
+ *
253
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
254
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
255
+ * and GPL (GPL-LICENSE.txt) licenses.
256
+ *
257
+ * http://docs.jquery.com/UI/Effects/Shake
258
+ *
259
+ * Depends:
260
+ * effects.core.js
261
+ */
262
+ (function(A){A.effects.shake=function(B){return this.queue(function(){var E=A(this),K=["position","top","left"];var J=A.effects.setMode(E,B.options.mode||"effect");var M=B.options.direction||"left";var C=B.options.distance||20;var D=B.options.times||3;var G=B.duration||B.options.duration||140;A.effects.save(E,K);E.show();A.effects.createWrapper(E);var F=(M=="up"||M=="down")?"top":"left";var O=(M=="up"||M=="left")?"pos":"neg";var H={},N={},L={};H[F]=(O=="pos"?"-=":"+=")+C;N[F]=(O=="pos"?"+=":"-=")+C*2;L[F]=(O=="pos"?"-=":"+=")+C*2;E.animate(H,G,B.options.easing);for(var I=1;I<D;I++){E.animate(N,G,B.options.easing).animate(L,G,B.options.easing)}E.animate(N,G,B.options.easing).animate(H,G/2,B.options.easing,function(){A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}});E.queue("fx",function(){E.dequeue()});E.dequeue()})}})(jQuery);/*
263
+ * jQuery UI Effects Slide 1.6
264
+ *
265
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
266
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
267
+ * and GPL (GPL-LICENSE.txt) licenses.
268
+ *
269
+ * http://docs.jquery.com/UI/Effects/Slide
270
+ *
271
+ * Depends:
272
+ * effects.core.js
273
+ */
274
+ (function(A){A.effects.slide=function(B){return this.queue(function(){var E=A(this),D=["position","top","left"];var I=A.effects.setMode(E,B.options.mode||"show");var H=B.options.direction||"left";A.effects.save(E,D);E.show();A.effects.createWrapper(E).css({overflow:"hidden"});var F=(H=="up"||H=="down")?"top":"left";var C=(H=="up"||H=="left")?"pos":"neg";var J=B.options.distance||(F=="top"?E.outerHeight({margin:true}):E.outerWidth({margin:true}));if(I=="show"){E.css(F,C=="pos"?-J:J)}var G={};G[F]=(I=="show"?(C=="pos"?"+=":"-="):(C=="pos"?"-=":"+="))+J;E.animate(G,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){E.hide()}A.effects.restore(E,D);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);/*
275
+ * jQuery UI Effects Transfer 1.6
276
+ *
277
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
278
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
279
+ * and GPL (GPL-LICENSE.txt) licenses.
280
+ *
281
+ * http://docs.jquery.com/UI/Effects/Transfer
282
+ *
283
+ * Depends:
284
+ * effects.core.js
285
+ */
286
+ (function(A){A.effects.transfer=function(B){return this.queue(function(){var E=A(this);var G=A.effects.setMode(E,B.options.mode||"effect");var F=A(B.options.to);var C=E.offset();var D=A('<div class="ui-effects-transfer"></div>').appendTo(document.body);if(B.options.className){D.addClass(B.options.className)}D.addClass(B.options.className);D.css({top:C.top,left:C.left,height:E.outerHeight()-parseInt(D.css("borderTopWidth"))-parseInt(D.css("borderBottomWidth")),width:E.outerWidth()-parseInt(D.css("borderLeftWidth"))-parseInt(D.css("borderRightWidth")),position:"absolute"});C=F.offset();animation={top:C.top,left:C.left,height:F.outerHeight()-parseInt(D.css("borderTopWidth"))-parseInt(D.css("borderBottomWidth")),width:F.outerWidth()-parseInt(D.css("borderLeftWidth"))-parseInt(D.css("borderRightWidth"))};D.animate(animation,B.duration,B.options.easing,function(){D.remove();if(B.callback){B.callback.apply(E[0],arguments)}E.dequeue()})})}})(jQuery);
skin/frontend/default/default/js/tnt/jquery.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery 1.2.6 - New Wave Javascript
3
+ *
4
+ * Copyright (c) 2008 John Resig (jquery.com)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
9
+ * $Rev: 5685 $
10
+ */
11
+ (function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
12
+ return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
13
+ return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
14
+ selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
15
+ return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
16
+ this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
17
+ return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
18
+ jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
19
+ script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else
20
+ for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else
21
+ for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
22
+ jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
23
+ ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&&notxml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else
24
+ while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else
25
+ while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
26
+ for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
27
+ jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else
28
+ xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
29
+ jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
30
+ for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
31
+ s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
32
+ e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();
{js → skin/frontend/default/default/js}/tnt/jquery_162.js RENAMED
File without changes
skin/frontend/default/default/js/tnt/relaisColis.js ADDED
@@ -0,0 +1,1000 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** Javascript B2C Relais Colis - version 2.0 - 08/07/2010 **/
2
+
3
+ var pathToImages = "images/tnt/relaisColis/";
4
+ var tntDomain = "www.tnt.fr";
5
+
6
+ var tntRCcodePostal;
7
+ var tntRCCommune;
8
+ var tntRClisteRelais;
9
+ var tntRCJsonCommunes;
10
+
11
+ var tntRCMsgHeaderTitle = "Mode de livraison";
12
+ var tntRCMsgSubHeaderTitle = "Choisissez le Relais Colis<sup class='tntRCSup'>&#174;</sup> qui vous convient :";
13
+ var tntRCMsgHeaderPopup = "D&#233;tail du Relais Colis<sup class='tntRCSup'>&#174;</sup>";
14
+ var tntRCMsgSubHeaderPopup = "Descriptif :";
15
+ var tntRCMsgBodyLoading = "Chargement en cours...";
16
+ var tntRCMsgBodyInput = "Entrez le code postal :&nbsp;";
17
+ var tntRCMsgBodyBack2Communes = "Revenir &#224; la liste des communes";
18
+ var tntRCMsgErrCodePostal = "Veuillez saisir un code postal sur 5 chiffres";
19
+ var tntRCMsgErrLoadCommunes = "Aucun Relais Colis&#174; disponible";
20
+ var tntRCMsgErrLoadRelais = "Aucun Relais Colis&#174; disponible";
21
+
22
+ var tntRCsize800 = "100%";
23
+ var tntRCsize789 = "589px";
24
+ var tntRCsize670 = "75%";
25
+ var tntRCsize650 = "65%";
26
+ var tntRCsize50 = "11%";
27
+ var tntRCsize8 = "8px";
28
+ var tntRCsize5 = "5px";
29
+ var tntRCsize6 = "6px";
30
+ var tntRCsize10 = "1%";
31
+ var tntRCsize30 = "30px";
32
+ var tntRCsize109 = "24%";
33
+ var tntRCsize442 = "362px";
34
+ var tntRCsize447 = "387px";
35
+ var tntRCsize206 = "206px";
36
+ var tntRCsize253 = "213px";
37
+ var tntRCsize20 = "20px";
38
+ var tntRCsize392 = "352px";
39
+ var tntRCsize412 = "332px";
40
+
41
+ function getURLParam(name) {
42
+ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
43
+ var regexS = "[\\?&]" + name + "=([^&#]*)";
44
+ var regex = new RegExp( regexS );
45
+ var results = regex.exec( window.location.href );
46
+ if( results == null ) return "";
47
+ else return results[1];
48
+ };
49
+
50
+ // Chargement de la liste de relais colis après le choix de la commune parmis plusieurs
51
+ // communes correspondant au même code postal
52
+ function tntRCgetRelaisColisJSON(commune)
53
+ {
54
+ if (!commune) {
55
+ // La commune du code postal correspond à la sélection du radio bouton tntRCchoixComm
56
+ tntRCCommune = $("input[@type=radio][@checked][@name=tntRCchoixComm]").val();
57
+ }
58
+ else {
59
+ // Utilisation de la valeur fournie en paramètre
60
+ tntRCCommune = commune
61
+ }
62
+
63
+ // Affichage message "chargement en cours"
64
+ tntRCsetChargementEnCours();
65
+
66
+ var ajaxUrl;
67
+ var ajaxData;
68
+
69
+ ajaxUrl = "http://" + tntDomain + "/public/b2c/relaisColis/loadJson.do?cp=" + tntRCcodePostal + "&commune=" + tntRCCommune;
70
+ ajaxData = "";
71
+
72
+ // Chargement de la liste de relais colis
73
+ $.ajax({
74
+ type: "GET",
75
+ url: ajaxUrl,
76
+ data: ajaxData,
77
+ dataType: "script"
78
+ });
79
+ };
80
+
81
+ // Affichage d'une liste de relais colis
82
+ function tntRCafficheRelais(jData) {
83
+ $("#promoRelaisColis").hide();
84
+
85
+ var jMessage = $('#blocCodePostal');
86
+
87
+ var tntRCjTable = $("<table style='border:1px solid gray;' cellpadding='0' cellspacing='0' width='" + tntRCsize800 + "'></table>");
88
+
89
+ // Ligne blanche de séparation
90
+ //tntRCjTable.append(tntRCligneBlanche6Col());
91
+
92
+ // Entêtes de colonnes grise
93
+ tntRCjTable.append(tntRCenteteGrise6Col());
94
+
95
+ //affiche le contenu du fichier dans le conteneur dédié
96
+ jMessage.html("");
97
+
98
+ var i = 0;
99
+
100
+ tntRClisteRelais = jData;
101
+ for(i = 0; i < jData.length; i++) {
102
+
103
+ var oRelais = jData[i];
104
+
105
+ // Les noeuds dans le fichier XML ne sont pas forcément ordonnés pour l'affichage, on va donc d'abord récupérer leur valeur
106
+ var codeRelais = oRelais[0];
107
+ var nomRelais = oRelais[1];
108
+ var adresse = oRelais[4];
109
+ var codePostal = oRelais[2];
110
+ var commune = oRelais[3];
111
+ var heureFermeture = oRelais[21];
112
+
113
+ if(i==0) {
114
+ parent.document.getElementById('tnt_relais1').value = adresse+'&&&'+nomRelais+' '+codeRelais+'&&&'+codePostal+'&&&'+commune;
115
+
116
+ $(window.parent.document).find("#tnt_pr_choix").html("Relais Colis® selectionné : "+nomRelais+" ("+codeRelais+") "+adresse+" - "+codePostal+" "+commune);
117
+ $(window.parent.document).find("#tnt_pr_choix").show();
118
+ $(window.parent.document).find("#tnt_pr").hide();
119
+ }
120
+
121
+ var messages="";
122
+
123
+ var logo_point = "";
124
+ if (messages != "") logo_point = "<img src='" + pathToImages + "exception.gif' alt='Informations compl&#233;mentaires' width='16px' height='16px'>";
125
+
126
+ tntRCjTable.append(
127
+ "<tr>"+
128
+ "<td class='tntRCblanc' width='" + tntRCsize5 + "'></td>"+
129
+ "<td class='tntRCblanc' width='" + tntRCsize50 + "'><img src='" + pathToImages + "logo-tnt-petit.jpg'>&nbsp;" + logo_point + "</td>"+
130
+ "<td class='tntRCrelaisColis' width='" + tntRCsize650 + "'>" + nomRelais + " - " + adresse + " - " + codePostal + " - " + commune + "<BR>&nbsp;&nbsp;&nbsp;&nbsp;>> Ouvert jusqu'&agrave; " + heureFermeture + "</td>"+
131
+ //"<td class='tntRCrelaisColis' width='" + tntRCsize10 + "'>&nbsp;</td>"+
132
+ "<td class='tntRCrelaisColis' valign='middle' align='center' width='" + tntRCsize109 + "'>"+
133
+ "<a href='#' onclick='tntRCafficheDetail(" + i + ");'><img src='" + pathToImages + "loupe.gif' class='tntRCBoutonLoupe'></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
134
+ "<input type='radio' style='vertical-align: middle;' name='tntRCchoixRelais' value='" + codeRelais + "'" + ( i==0 ? "checked" : "") + " onclick='tntRCSetSelectedInfo(" + i + ")'/>"+
135
+ "</td>"+
136
+ "<td class='tntRCblanc' width='" + tntRCsize6 + "'></td>"+
137
+ "</tr>");
138
+ }
139
+
140
+ // Mémorisation des infos du relais sélectionné par défaut (c'est le premier)
141
+ tntRCSetSelectedInfo(0, true);
142
+
143
+ tntRCjTable.append(
144
+ "<tr>"+
145
+ "<td colspan='5' class='tntRCBack2Communes'>"+
146
+ "<a href='javascript:window.parent.jQuery.superbox.close();'><img class='tntRCButton' src='" + pathToImages + "bt-Continuer.jpg'></a>" +
147
+ "</td>"+
148
+ "<td />"+
149
+ "</tr>");
150
+
151
+ // Ajout du lien de retour sur la liste des communes si cette dernière a été mémorisée
152
+ if (tntRCJsonCommunes != null) {
153
+ tntRCjTable.append(
154
+ "<tr>"+
155
+ "<td colspan='5' class='tntRCBack2Communes'>"+
156
+ "<a href='#' onclick='tntRCafficheCommunes(tntRCJsonCommunes);'>"+
157
+ "<img src='" + pathToImages + "bt-Retour.gif'>"+
158
+ tntRCMsgBodyBack2Communes +
159
+ "</a>"+
160
+ "</td>"+
161
+ "<td />"+
162
+ "</tr>");
163
+ }
164
+
165
+ tntRCjTable.append(tntRCligneBlanche6Col());
166
+ jMessage.append(tntRCjTable);
167
+
168
+ jMessage.append(tntRCchangerCodePostal());
169
+ };
170
+
171
+ function tntB2CRelaisColisGetBodyMain() {
172
+ var cp_origin = $('#cp_origin').val();
173
+
174
+ return (
175
+ "<div class='tntRCGray'>&#160;</div>"+
176
+ "<div id='tntBodyContentSC'>" +
177
+ "<table>"+
178
+ "<tr>"+
179
+ "<td>" + tntRCMsgBodyInput + "</td>"+
180
+ "<td><input type='text' id='tntRCInputCP' class='tntRCInput' maxlength='5' size='5' value='"+ cp_origin +"'/></td>"+
181
+ "<td><a href='#' onclick='tntRCgetCommunesJSON();'><img class='tntRCButton' src='" + pathToImages + "bt-OK.jpg'></a></td>" +
182
+ "</tr>"+
183
+ "</table>" +
184
+ "</div>"+
185
+ "<div id='tntRCLoading' style='display:none;'>" + tntRCMsgBodyLoading + "</div>"+
186
+ "<div id='tntRCError' class='tntRCError' style='display:none;'></div>");
187
+ }
188
+
189
+ function tntB2CRelaisColis() {
190
+
191
+ // Test si ID de référence existe, sinon on ne fait rien
192
+ if (!document.getElementById("tntB2CRelaisColis")) {
193
+ alert("ERREUR: Appel incorrect, objet [tntB2CRelaisColis] manquant !");
194
+ return;
195
+ }
196
+
197
+ tntRCCommune = '';
198
+
199
+ var tntRelaisColisB2C = $("#tntB2CRelaisColis");
200
+ tntRelaisColisB2C.html(
201
+ "<div id='tntRCblocEntete'>"+
202
+ //"<div class='tntRCHeader'>"+ tntRCMsgHeaderTitle + "</div>"+
203
+ "<div class='tntRCSubHeader'>" + tntRCMsgSubHeaderTitle + "</div>"+
204
+ "<input type='hidden' id='tntRCSelectedCode' value=''/>"+
205
+ "<input type='hidden' id='tntRCSelectedNom' value=''/>"+
206
+ "<input type='hidden' id='tntRCSelectedAdresse' value=''/>"+
207
+ "<input type='hidden' id='tntRCSelectedCodePostal' value=''/>"+
208
+ "<input type='hidden' id='tntRCSelectedCommune' value=''/>"+
209
+ "</div>"+
210
+ "<div id='blocCodePostal' class='tntRCBody'>"+
211
+ tntB2CRelaisColisGetBodyMain() +
212
+ "</div>" +
213
+ "<div class='dialog_box' id='tntRCDialog'>"+
214
+ "<div id='tntRCdetailRelaisEntete'>"+
215
+ "<div class='tntRCHeader'>"+ tntRCMsgHeaderPopup + "</div>"+
216
+ "<div class='tntRCSubHeader'>" + tntRCMsgSubHeaderPopup + "</div>"+
217
+ "</div>"+
218
+ "<div id='tntRCdetailRelaisCorps'></div>"+
219
+ "</div>");
220
+
221
+ // Forçage de la propriété "top", car elle est écrasée par la gestion de jqModal
222
+ // si on la met dans la définition de la classe du div correspondant...
223
+ $('#tntRCDialog').css("top", "50%");
224
+
225
+ // Ajout de la popup dans la gestion jqModal
226
+
227
+ $('#tntRCDialog').dialog({
228
+ modal: true,
229
+ autoOpen: false,
230
+ width: 635,
231
+ height: 450,
232
+ position: ['middle','middle'],
233
+ resizable: false,
234
+ draggable: false,
235
+ show: 'blind',
236
+ close: function(event, ui) {
237
+ $("html").css({overflow: "", 'overflow-x': "", 'overflow-y': ""});
238
+ }
239
+ });
240
+
241
+ // Récupérations des paramètres de l'URL
242
+ var codePostal = getURLParam("codePostal");
243
+ var commune = getURLParam("commune");
244
+
245
+ if (codePostal != "") {
246
+ tntRCcodePostal = codePostal;
247
+ if (commune != "") {
248
+ // Couple code postal + commune fourni
249
+ tntRCgetRelaisColisJSON(commune);
250
+ }
251
+ else {
252
+ $('#tntRCInputCP').val(tntRCcodePostal);
253
+ tntRCgetCommunesJSON();
254
+ }
255
+ }
256
+
257
+ // Initialisation de Map associée
258
+ tntRCInitMap();
259
+ };
260
+
261
+ function tntRCgetRelaisColis(libelleErreur) {
262
+
263
+ // RAZ des infos sélectionnées
264
+ tntRCSetSelectedInfo();
265
+
266
+ tntRCCommune = '';
267
+
268
+ var blocCodePostal = $("#blocCodePostal");
269
+ if(!blocCodePostal.hasClass("tntRCBody"))
270
+ blocCodePostal.addClass("tntRCBody");
271
+ blocCodePostal.html(tntB2CRelaisColisGetBodyMain());
272
+ $('#tntRCInputCP').val(tntRCcodePostal);
273
+
274
+ if (libelleErreur) {
275
+ var jDivErreur = $("#tntRCError");
276
+ jDivErreur.html(libelleErreur);
277
+ jDivErreur.show();
278
+ }
279
+ };
280
+
281
+ function tntRCafficheCommunes(jData) {
282
+ $("#promoRelaisColis").hide();
283
+
284
+ // RAZ des infos sélectionnées
285
+ tntRCSetSelectedInfo();
286
+
287
+ if (mapDetected) resetMap();
288
+
289
+ var tntRCjTable = $("<table style='border:1px solid gray;' cellpadding='0' cellspacing='0' width='" + tntRCsize800 + "'></table>");
290
+
291
+ // Ligne blanche de séparation
292
+ //tntRCjTable.append(tntRCligneBlanche6Col());
293
+ // Entêtes de colonnes grise
294
+ tntRCjTable.append(tntRCenteteGrise6Col2());
295
+
296
+ var blocCodePostal = $("#blocCodePostal");
297
+
298
+ var i = 1;
299
+ //var jCommunes = jData.find("VILLE");
300
+ for (var iIdx = 0; iIdx < jData.length; iIdx++) {
301
+
302
+ var commune = jData[iIdx];
303
+
304
+ //var jCommune = $(this);
305
+ var nomVille = commune[1]; // IE vs FF
306
+
307
+ tntRCjTable.append(
308
+ "<tr>"+
309
+ "<td class='tntRCblanc' width='" + tntRCsize50 + "'><img src='" + pathToImages + "logo-tnt-petit.jpg'></td>" +
310
+ "<td class='tntRCrelaisColis' width='80%'> " + nomVille + " (" + tntRCcodePostal + ") </td>" +
311
+ //"<td class='tntRCrelaisColis' width='" + tntRCsize10 + "'>&nbsp;</td>"+
312
+ "<td class='tntRCrelaisColis' align='center' width='20%'>"+
313
+ "<input type='radio' name='tntRCchoixComm' value='" + nomVille + "' " + ( i ==1 ? "checked" : "") + ">"+
314
+ "</td>"+
315
+ //"<td class='tntRCblanc' width='" + tntRCsize6 + "'></td>"+
316
+ "</tr>");
317
+ i = 2;
318
+ }
319
+
320
+ tntRCjTable.append(
321
+ tntRCligneBlanche6Col() +
322
+ "<tr>"+
323
+ "<td class='tntRCblanc'></td>"+
324
+ "<td class='tntRCblanc'></td>"+
325
+ "<td class='tntRCblanc' align='center'>"+
326
+ "<a href='javascript:tntRCgetRelaisColisJSON();'><img class='tntRCButton' src='" + pathToImages + "bt-Continuer.jpg'></a>" +
327
+ "</td>"+
328
+ "</tr>" +
329
+ tntRCligneBlanche6Col());
330
+
331
+ blocCodePostal.html(tntRCjTable);
332
+
333
+ // Bloc de saisie d'un nouveau code postal
334
+ blocCodePostal.append(tntRCchangerCodePostal());
335
+ }
336
+
337
+ function tntRCgetCommunesJSON() {
338
+
339
+ $("#tntRCError").hide();
340
+ tntRCcodePostal = $('#tntRCInputCP').val();
341
+
342
+ // Code postal non renseigné, on ne fait rien
343
+ if (tntRCcodePostal=="") return;
344
+
345
+ if (mapDetected) resetMap();
346
+
347
+ // On ne fait rien si le code postal n'est pas un nombre de 5 chiffres
348
+ if (isNaN(parseInt(tntRCcodePostal)) || tntRCcodePostal.length != 5) {
349
+ tntRCgetRelaisColis(tntRCMsgErrCodePostal);
350
+ return;
351
+ }
352
+
353
+ tntRCsetChargementEnCours();
354
+
355
+ var ajaxUrl;
356
+ var ajaxData;
357
+
358
+ ajaxUrl = "http://" + tntDomain + "/public/b2c/relaisColis/rechercheJson.do?code=" + tntRCcodePostal;
359
+ ajaxData = "";
360
+
361
+ $.ajax({
362
+ type: "GET",
363
+ url: ajaxUrl,
364
+ data: ajaxData,
365
+ dataType: "script",
366
+ error:function(msg){
367
+ $("#blocCodePostal").html("Error !: " + msg );
368
+ }
369
+ });
370
+ };
371
+
372
+ function tntRCsetChargementEnCours() {
373
+ $("#tntRCLoading").show();
374
+ };
375
+
376
+ function tntRCafficheDetail(i) {
377
+
378
+ var tntRCdetailRelais = $("#tntRCdetailRelaisCorps");
379
+
380
+ tntRCdetailRelais.html("");
381
+
382
+ var oRelais = tntRClisteRelais[i];
383
+
384
+ // Les noeuds dans le fichier JSON ne sont pas forcément ordonnés pour l'affichage, on va donc d'abord récupérer leur valeur
385
+ var codeRelais = oRelais[0]
386
+ var nomRelais = oRelais[1];
387
+ var adresse = oRelais[4];
388
+ var codePostal = oRelais[2];
389
+ var commune = oRelais[3];
390
+ var heureFermeture = oRelais[21];
391
+
392
+ var lundi_am = (oRelais[7] == "-")?"ferm&#233;":oRelais[7];
393
+ var lundi_pm = (oRelais[8] == "-")?"ferm&#233;":oRelais[8];
394
+ var mardi_am = (oRelais[9] == "-")?"ferm&#233;":oRelais[9];
395
+ var mardi_pm = (oRelais[10] == "-")?"ferm&#233;":oRelais[10];
396
+ var mercredi_am = (oRelais[11] == "-")?"ferm&#233;":oRelais[11];
397
+ var mercredi_pm = (oRelais[12] == "-")?"ferm&#233;":oRelais[12];
398
+ var jeudi_am = (oRelais[13] == "-")?"ferm&#233;":oRelais[13];
399
+ var jeudi_pm = (oRelais[14] == "-")?"ferm&#233;":oRelais[14];
400
+ var vendredi_am = (oRelais[15] == "-")?"ferm&#233;":oRelais[15];
401
+ var vendredi_pm = (oRelais[16] == "-")?"ferm&#233;":oRelais[16];
402
+ var samedi_am = (oRelais[17] == "-")?"ferm&#233;":oRelais[17];
403
+ var samedi_pm = (oRelais[18] == "-")?"ferm&#233;":oRelais[18];
404
+ var dimanche_am = (oRelais[19] == "-")?"ferm&#233;":oRelais[19];
405
+ var dimanche_pm = (oRelais[20] == "-")?"ferm&#233;":oRelais[20];
406
+
407
+ var messages = "";
408
+ for (j=0; j < oRelais[24].length; j++) {
409
+ var ligne = oRelais[24][j];
410
+ if (ligne != "") messages = messages + ligne + "<br/>";
411
+ }
412
+
413
+ if (lundi_pm != "-") lundi_am = lundi_am + "<br/>" + lundi_pm;
414
+ if (mardi_pm != "-") mardi_am = mardi_am + "<br/>" + mardi_pm;
415
+ if (mercredi_pm != "-") mercredi_am = mercredi_am + "<br/>" + mercredi_pm;
416
+ if (jeudi_pm != "-") jeudi_am = jeudi_am + "<br/>" + jeudi_pm;
417
+ if (vendredi_pm != "-") vendredi_am = vendredi_am + "<br/>" + vendredi_pm;
418
+ if (samedi_pm != "-") samedi_am = samedi_am + "<br/>" + samedi_pm;
419
+ if (dimanche_pm != "-") dimanche_am = dimanche_am + "<br/>" + dimanche_pm;
420
+
421
+ var logo_point = "";
422
+ if (messages != "") logo_point = "<img src='" + pathToImages + "exception.gif' alt='Picto Informations'>";
423
+
424
+ var tntRCjTableX = $("<table style='border:1px solid gray;' cellpadding='0' cellspacing='0' width='" + tntRCsize447 + "'>"
425
+ + "<tr>"
426
+ + "<td width='" + tntRCsize447 + "' valign='top'>"
427
+ + "<table style='border:0px;' cellpadding='0' cellspacing='0' width='" + tntRCsize447 + "'>"
428
+ + "<tr>"
429
+ + "<td>"
430
+ + "<table style='border:0px;' cellpadding='0' cellspacing='0' >"
431
+ + "<tr height='" + tntRCsize8 + "'><td colspan='2'></td></tr>"
432
+ + "<tr>"
433
+ + "<td class='tntRCdetailGros' width='" + tntRCsize5 + "'>&nbsp;</td>"
434
+ + "<td class='tntRCdetailGros' width='" + tntRCsize442 + "'>Localisation : </td>"
435
+ + "</tr>"
436
+ + "<tr height='" + tntRCsize8 + "'><td colspan='2'></td></tr>"
437
+ + "<tr>"
438
+ + "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'>&nbsp;</td>"
439
+ + "<td class='tntRCnoirPetit' width='"+ tntRCsize412 + "'><b>" + nomRelais + "</b></td>"
440
+ + "</tr>"
441
+ + "<tr>"
442
+ + "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'>&nbsp;</td>"
443
+ + "<td class='tntRCnoirPetit' width='"+ tntRCsize412 + "'>" + adresse + "</td>"
444
+ + "</tr>"
445
+ + "<tr>"
446
+ + "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'>&nbsp;</td>"
447
+ + "<td class='tntRCnoirPetit' width='"+ tntRCsize412 + "'>" + codePostal + " " + commune + "</td>"
448
+ + "</tr>"
449
+ + "<tr height='" + tntRCsize20 + "'><td colspan='2'></td></tr>"
450
+ + "<tr>"
451
+ + "<td class='tntRCdetailGros' width='" + tntRCsize5 + "'>&nbsp;</td>"
452
+ + "<td class='tntRCdetailGros' width='" + tntRCsize442 + "'>Informations : </td>"
453
+ + "</tr>"
454
+ + "<tr height='" + tntRCsize8 + "'><td colspan='2'></td></tr>"
455
+ + "<tr>"
456
+ + "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'></td>"
457
+ + "<td class='tntRCdetailPetit' width='"+ tntRCsize412 + "'>" + messages + "</td>"
458
+ + "</tr>"
459
+ + "</table>"
460
+ + "</td>"
461
+ + "</tr>"
462
+ + "</table>"
463
+ + "</td>"
464
+ + "<td width='" + tntRCsize253 + "' valign='top'>"
465
+ + "<table style='border:0px;' cellpadding='0' cellspacing='0' width='" + tntRCsize253 + "'>"
466
+ + "<tr>"
467
+ + "<td>"
468
+ + "<table style='border:0px;' cellpadding='0' cellspacing='0'>"
469
+ + "<tr height='" + tntRCsize8 + "'>"
470
+ + "<td></td>"
471
+ + "</tr>"
472
+ + "<tr>"
473
+ + "<td class='tntRCdetailGros' align='center'><img src='" + pathToImages + "picto-delai.gif' alt='Picto delai'></td>"
474
+ + "</tr>"
475
+ + "<tr>"
476
+ + "<td>"
477
+ + "<table class='tntRCHoraire' cellpadding='0' cellspacing='0' rules='all' width='" + tntRCsize206 + "'>"
478
+ + "<tr>"
479
+ + "<td class='tntRCHoraireJour'>Lundi</td>"
480
+ + "<td class='tntRCHoraireHeure'>" + lundi_am + "</td>"
481
+ + "</tr>"
482
+ + "<tr>"
483
+ + "<td class='tntRCHoraireJour'>Mardi</td>"
484
+ + "<td class='tntRCHoraireHeure'>" + mardi_am + "</td>"
485
+ + "</tr>"
486
+ + "<tr>"
487
+ + "<td class='tntRCHoraireJour'>Mercredi</td>"
488
+ + "<td class='tntRCHoraireHeure'>" + mercredi_am + "</td>"
489
+ + "</tr>"
490
+ + "<tr>"
491
+ + "<td class='tntRCHoraireJour'>Jeudi</td>"
492
+ + "<td class='tntRCHoraireHeure'>" + jeudi_am + "</td>"
493
+ + "</tr>"
494
+ + "<tr>"
495
+ + "<td class='tntRCHoraireJour'>Vendredi</td>"
496
+ + "<td class='tntRCHoraireHeure'>" + vendredi_am + "</td>"
497
+ + "</tr>"
498
+ + "<tr>"
499
+ + "<td class='tntRCHoraireJour'>Samedi</td>"
500
+ + "<td class='tntRCHoraireHeure'>" + samedi_am + "</td>"
501
+ + "</tr>"
502
+ + "<tr>"
503
+ + "<td class='tntRCHoraireJour'>Dimanche</td>"
504
+ + "<td class='tntRCHoraireHeure'>" + dimanche_am + "</td>"
505
+ + "</tr>"
506
+ + "</table>"
507
+ + "</td>"
508
+ + "</tr>"
509
+ + "</table>"
510
+ + "</td>"
511
+ + "</tr>"
512
+ + "</table>"
513
+ + "</td>"
514
+ + "</tr>"
515
+ + "<tr height='" + tntRCsize8 + "'></tr>"
516
+ + "</table>");
517
+
518
+ tntRCdetailRelais.append(tntRCjTableX);
519
+
520
+ $('#tntRCDialog').dialog("open");
521
+ $('#tntRCDialog').css("width", "600px"); // Patch mauvais calcul jQueryUI
522
+ // Masquage des barres de scrolling
523
+ $("html").css({overflow: "hidden", 'overflow-x': "hidden", 'overflow-y': "hidden"});
524
+ };
525
+
526
+ function tntRCligneBlancheDetail(){
527
+ return("<tr height='" + tntRCsize5 + "'><td colspan='8'>&nbsp;</td></tr>");
528
+ };
529
+
530
+ function tntRCligneBlancheGauche(){
531
+ return(
532
+ "<tr height='" + tntRCsize8 + "'>"+
533
+ "<td class='tntRCdetailGros' width='" + tntRCsize5 + "'></td>"+
534
+ "<td class='tntRCdetailGros' width='" + tntRCsize30 + "'></td>"+
535
+ "<td class='tntRCdetailGros' width='" + tntRCsize20 + "'></td>"+
536
+ "<td class='tntRCdetailGros' width='" + tntRCsize392 + "'></td>"+
537
+ "</tr>");
538
+ };
539
+
540
+ // Table vide avec 3 colonnes pour sauter une ligne
541
+ function tntRCligneBlanche3Col() {
542
+ return("<tr height='" + tntRCsize8 + "'><td class='tntRCblanc' width='" + tntRCsize5 + "'></td><td class='tntRCblanc' width='" + tntRCsize789 + "'></td><td class='tntRCblanc' width='" + tntRCsize6 + "'></td></tr>");
543
+ };
544
+
545
+ // Table vide avec 6 colonnes pour sauter une ligne
546
+ function tntRCligneBlanche6Col() {
547
+ return("<tr height='" + tntRCsize8 + "'><td class='tntRCblanc' colspan='6'></td></td></tr>");
548
+ };
549
+
550
+ // Table vide avec 3 colonnes et entête en gris
551
+ function tntRCligneGrise3Col() {
552
+ return("<tr><td class='tntRCblanc' width='" + tntRCsize5 + "'></td><td class='tntRCgris' width='" + tntRCsize789 + "'><br/></td><td class='tntRCblanc' width='" + tntRCsize6 + "'></td></tr>");
553
+ };
554
+
555
+ // Table entête de colonnes grises
556
+ function tntRCenteteGrise6Col() {
557
+ return("<tr height='25px'><td class='tntRCblanc' width='" + tntRCsize5 + "'></td><td class='tntRCgris' colspan='2' width='" + tntRCsize670 + "'>&nbsp;Les diff&eacute;rents Relais Colis&#174;</td><td class='tntRCgris' width='" + tntRCsize109 + "'>&nbsp;Mon choix</td><td class='tntRCblanc' width='" + tntRCsize6 + "'></td></tr>");
558
+ };
559
+
560
+ //Table entête de colonnes grises
561
+ function tntRCenteteGrise6Col2() {
562
+ return("<tr height='25px'><td class='tntRCgris' colspan='2' width='80%'>&nbsp;Les diff&eacute;rents Relais Colis&#174;</td><td class='tntRCgris' width='20%'>&nbsp;Mon choix</td></tr>");
563
+ };
564
+
565
+ // Zone de saisie d'un code postal nouveau
566
+ function tntRCchangerCodePostal(){
567
+ return(
568
+ "<div class='tntRCWhite'>&#160;</div>"+
569
+ "<div class='tntRCBodySearch'>"+
570
+ "<table>"+
571
+ "<tr>"+
572
+ "<td width='350px'>Vous pouvez choisir un autre code postal de livraison :</td>"+
573
+ "<td width='55px'><input type='text' id='tntRCInputCP' class='tntRCInput' maxlength='5' size='5' value='' /></td>"+
574
+ "<td><a href='#' onclick='tntRCgetCommunesJSON();'><img class='tntRCButton' src='" + pathToImages + "bt-CodePostal.jpg'></a></td>" +
575
+ "</tr>"+
576
+ "</table>"+
577
+ "</div>");
578
+ };
579
+
580
+ function tntRCSetSelectedInfo(selectedIdx, noMarkerInfo) {
581
+
582
+ if (!selectedIdx && selectedIdx != 0) {
583
+ // RAZ des infos sélectionnées
584
+ $("#tntRCSelectedCode").val("");
585
+ $("#tntRCSelectedNom").val("");
586
+ $("#tntRCSelectedAdresse").val("");
587
+ $("#tntRCSelectedCodePostal").val("");
588
+ $("#tntRCSelectedCommune").val("");
589
+ return
590
+ }
591
+
592
+ var oRelais = tntRClisteRelais[selectedIdx];
593
+
594
+ $("#tntRCSelectedCode").val(oRelais[0]);
595
+ $("#tntRCSelectedNom").val(oRelais[1]);
596
+ $("#tntRCSelectedAdresse").val(oRelais[4]);
597
+ $("#tntRCSelectedCodePostal").val(oRelais[2]);
598
+ $("#tntRCSelectedCommune").val(oRelais[3]);
599
+
600
+ if (mapDetected && !noMarkerInfo) {
601
+
602
+ // Les noeuds dans le fichier XML ne sont pas forcément ordonnés pour l'affichage, on va donc d'abord récupérer leur valeur
603
+ var codeRelais = oRelais[0]
604
+ var nomRelais = oRelais[1];
605
+ var adresse = oRelais[4];
606
+ var codePostal = oRelais[2];
607
+ var commune = oRelais[3];
608
+ var heureFermeture = oRelais[21];
609
+
610
+ var messages = "";
611
+ var lundi_am = (oRelais[7] == "-")?",":oRelais[7]+",";
612
+ var lundi_pm = oRelais[8];
613
+ var mardi_am = (oRelais[9] == "-")?",":oRelais[9]+",";
614
+ var mardi_pm = oRelais[10];
615
+ var mercredi_am = (oRelais[11] == "-")?",":oRelais[11]+",";
616
+ var mercredi_pm = oRelais[12];
617
+ var jeudi_am = (oRelais[13] == "-")?",":oRelais[13]+",";
618
+ var jeudi_pm = oRelais[14];
619
+ var vendredi_am = (oRelais[15] == "-")?",":oRelais[15]+",";
620
+ var vendredi_pm = oRelais[16];
621
+ var samedi_am = (oRelais[17] == "-")?",":oRelais[17]+",";
622
+ var samedi_pm = oRelais[18];
623
+ var dimanche_am = (oRelais[19] == "-")?",":oRelais[19]+",";
624
+ var dimanche_pm = oRelais[20];
625
+
626
+ if (lundi_pm != "-") lundi_am = lundi_am + lundi_pm;
627
+ if (mardi_pm != "-") mardi_am = mardi_am + mardi_pm;
628
+ if (mercredi_pm != "-") mercredi_am = mercredi_am + mercredi_pm;
629
+ if (jeudi_pm != "-") jeudi_am = jeudi_am + jeudi_pm;
630
+ if (vendredi_pm != "-") vendredi_am = vendredi_am + vendredi_pm;
631
+ if (samedi_pm != "-") samedi_am = samedi_am + samedi_pm;
632
+ if (dimanche_pm != "-") dimanche_am = dimanche_am + dimanche_pm;
633
+
634
+ var horaires = new Array();
635
+ horaires['lundi'] = lundi_am + ",1";
636
+ horaires['mardi'] = mardi_am + ",2";
637
+ horaires['mercredi'] = mercredi_am + ",3";
638
+ horaires['jeudi'] = jeudi_am + ",4";
639
+ horaires['vendredi'] = vendredi_am + ",5";
640
+ horaires['samedi'] = samedi_am + ",6";
641
+ horaires['dimanche'] = dimanche_am + ",0";
642
+
643
+ var messages = "";
644
+ for (j=0; j < oRelais[24].length; j++) {
645
+ var ligne = oRelais[24][j];
646
+ if (ligne != "") messages = messages + ligne + "<br/>";
647
+ }
648
+
649
+ parent.document.getElementById('tnt_relais1').value = adresse+'&&&'+nomRelais+' '+codeRelais+'&&&'+codePostal+'&&&'+commune;
650
+
651
+ $(window.parent.document).find("#tnt_pr_choix").html("Relais Colis® selectionné : "+nomRelais+" ("+codeRelais+") "+adresse+" - "+codePostal+" "+commune);
652
+ $(window.parent.document).find("#tnt_pr_choix").show();
653
+ $(window.parent.document).find("#tnt_pr").hide();
654
+
655
+ setInfoMarker(codeRelais, nomRelais, adresse, codePostal, commune, messages, selectedIdx, horaires, relaisMarkers[selectedIdx]);
656
+ }
657
+ }
658
+
659
+ function resetMap() {
660
+
661
+ if (map) {
662
+
663
+ map.getStreetView().setVisible(false);
664
+
665
+ for (var i = 0; i < relaisMarkers.length; i++) {
666
+ relaisMarkers[i].setMap(null);
667
+ relaisMarkers[i] = null;
668
+ }
669
+ relaisMarkers = new Array();
670
+ if (infowindow) infowindow.close();
671
+ map.setZoom(defaultZoom);
672
+ map.setCenter(defaultCenter);
673
+ }
674
+ }
675
+
676
+ /*
677
+ * Fonction appellée en retour de la recherche des communes par rapport à un code postal
678
+ * si plusieurs communes ont été trouvées
679
+ */
680
+
681
+ function listeCommunes(tabCommunes) {
682
+ tntRCJsonCommunes = null;
683
+
684
+ // TEMP: car le contenu du div est entièrement reconstruit
685
+ $("#blocCodePostal").removeClass("tntRCBody");
686
+
687
+ tntRCJsonCommunes = tabCommunes;
688
+ tntRCafficheCommunes(tabCommunes);
689
+ }
690
+
691
+ /*
692
+ * Fonction appellée en retour de la recherche des communes par rapport à un code postal
693
+ * si une seule commune a été trouvée
694
+ */
695
+
696
+ function listeRelais(tabRelais) {
697
+
698
+ tntRClisteRelais = null;
699
+
700
+ // TEMP: car le contenu du div est entièrement reconstruit
701
+ $("#blocCodePostal").removeClass("tntRCBody");
702
+
703
+ tntRCafficheRelais(tabRelais);
704
+ if (mapDetected) init_marker(tabRelais);
705
+ }
706
+
707
+ /*
708
+ * Fonction appellée en retour de la recherche des communes si aucune commune trouvée
709
+ */
710
+ function erreurListeCommunes() {
711
+ tntRCJsonCommunes = null;
712
+ tntRCgetRelaisColis(tntRCMsgErrLoadCommunes);
713
+ }
714
+
715
+ function erreurListeRelais() {
716
+ tntRCgetRelaisColis(tntRCMsgErrLoadRelais);
717
+ }
718
+
719
+
720
+ /************************************************************************************************
721
+ * Partie Google Map
722
+ ***********************************************************************************************/
723
+
724
+ var map;
725
+ var adresse_pointclic;
726
+ var zone_chalandise;
727
+ var zoomZoneChalandiseDefault;
728
+ var centerZoneChalandiseDefault;
729
+ var init_streetview = false;
730
+
731
+ var contentTo = [
732
+ '<br/><div>',
733
+ 'Itin&#233;raire : <b>Vers ce lieu</b> - <a href="javascript:fromhere(0)">A partir de ce lieu</a><br/>',
734
+ 'Lieu de d&#233;part<br/>',
735
+ '<input type="text" id="saisie" name="saisie" value="" maxlength="500" size="30">',
736
+ '<input type="hidden" id="mode" name="mode" value="toPoint">',
737
+ '<input type="hidden" id="point_choisi" name="point_choisi" value="">',
738
+ ' <input type="submit" class="bt" onclick="popup_roadmap();" value="OK">',
739
+ '<br/>Ex: 58 avenue Leclerc 69007 Lyon',
740
+ '</div>'].join('');
741
+
742
+ var contentFrom = [
743
+ '<br/><div>',
744
+ 'Itin&#233;raire : <a href="javascript:tohere(0)">Vers ce lieu</a> - <b>A partir de ce lieu</b><br/>',
745
+ 'Lieu d\'arriv&#233;e<br/>',
746
+ '<input type="text" id="saisie" name="saisie" value="" maxlength="500" size="30">',
747
+ '<input type="hidden" id="mode" name="mode" value="fromPoint">',
748
+ '<input type="hidden" id="point_choisi" name="point_choisi" value="">',
749
+ ' <input type="button" class="bt" onclick="popup_roadmap();" value="OK">',
750
+ '<br/>Ex: 58 avenue Leclerc 69007 Lyon',
751
+ '</div>'].join('');
752
+
753
+ var infowindow;
754
+
755
+ var relaisMarkers = [];
756
+ var iconRelais = new google.maps.MarkerImage(
757
+ "images/tnt/relaisColis/google/relaisColis.png",
758
+ new google.maps.Size(40, 30),
759
+ new google.maps.Point(0, 0),
760
+ new google.maps.Point(20, 30))
761
+
762
+ //Limites de la France
763
+ var allowedBounds = new google.maps.LatLngBounds(
764
+ new google.maps.LatLng(39.56533418570851, -7.41426946590909),
765
+ new google.maps.LatLng(52.88994181429149, 11.84176746590909));
766
+
767
+ var defaultCenter = new google.maps.LatLng(46.2276380, 2.2137490); // the center ???
768
+ var defaultZoom = 5; // default zoom level
769
+ var aberration = 0.2; // this value is a good choice for france (?!)
770
+ var minMapScale = 5;
771
+ //var maxMapScale = 20;
772
+
773
+ var mapDetected = false;
774
+ var callbackLinkMarker = "";
775
+
776
+ // fonction appellé après saisie du code postal de recherche
777
+ function init_marker(json) {
778
+
779
+ zone_chalandise = new google.maps.LatLngBounds();
780
+
781
+ for (var i = 0; i < relaisMarkers.length; i++) {
782
+ relaisMarkers[i].setMap(null);
783
+ relaisMarkers[i] = null;
784
+ }
785
+ relaisMarkers = new Array();
786
+
787
+ if (infowindow) infowindow.close();
788
+
789
+ var markers = json;
790
+
791
+ for (var i = 0; i < markers.length; i++) {
792
+ createMarker(markers[i], i);
793
+ }
794
+
795
+ zoomZoneChalandiseDefault = zone_chalandise.getCenter();
796
+ centerZoneChalandiseDefault = zone_chalandise;
797
+
798
+ retourZoomChalandise();
799
+ }
800
+
801
+ function setInfoMarker(codeRelais, nomRelais, adresse, codePostal, commune, messages, indice, horaires, marker) {
802
+
803
+ var htmlInfo = [
804
+ "<div>",
805
+ "<div class='rc'>",
806
+ "<b>RELAIS COLIS N° ", codeRelais, "</b><br/>",
807
+ "<b>", nomRelais, "</b><br/>",
808
+ adresse, "<br/>",
809
+ codePostal, " ", commune,
810
+ "</div>",
811
+ "<div><br/>", messages, "</div>",
812
+ callbackLinkMarker,
813
+ "</div>",
814
+ "<div id='trajet'>" + contentTo + "</div>"
815
+ ].join('');
816
+
817
+ // Création du contenu de l'onglet horaire
818
+ var htmlHoraires = "<table class='horairesRCPopup'>";
819
+ var jourSemaine = (new Date()).getDay();
820
+ for (jour in horaires) {
821
+ var heures = (horaires[jour]).split(",");
822
+ if (heures[0] == '' && heures[1] == '') heures[0] = "ferm&#233;";
823
+ htmlHoraires = htmlHoraires + "<tr" + (jourSemaine == parseInt(heures[2]) ? " class='selected'" : "") + "><td class='horairesRCJourPopup'>&nbsp;" + jour + "</td><td class='horaireRCPopup'>" + heures[0] + " " + heures[1] + "</td></tr>";
824
+ }
825
+ htmlHoraires = htmlHoraires + "</table>";
826
+
827
+ adresse_pointclic = [adresse, "|", codePostal, " ", commune].join('');
828
+
829
+ var contentString = [
830
+ '<div id="tabs" style="width:340px;">',
831
+ '<ul>',
832
+ '<li><a href="#tabInfos"><span>Infos</span></a></li>',
833
+ '<li><a href="#tabHoraires"><span>Horaires</span></a></li>',
834
+ '</ul>',
835
+ '<div id="tabInfos">',
836
+ htmlInfo,
837
+ '</div>',
838
+ '<div id="tabHoraires">',
839
+ htmlHoraires,
840
+ '</div>',
841
+ '</div>'
842
+ ].join('');
843
+
844
+ if (infowindow) infowindow.close();
845
+
846
+ infowindow = new google.maps.InfoWindow({content: contentString});
847
+
848
+ google.maps.event.addListener(infowindow, "domready", function() {
849
+ $("#point_choisi").attr("value", adresse_pointclic);
850
+ $("#tabs").tabs();
851
+ $("#tabs").parent().removeAttr("style");
852
+ });
853
+
854
+ infowindow.open(map, marker);
855
+ }
856
+
857
+ function createMarker(markerData, indice) {
858
+
859
+ var marker = new google.maps.Marker({
860
+ icon: iconRelais,
861
+ position: new google.maps.LatLng(markerData[5], markerData[6]),
862
+ map: map,
863
+ title:markerData[1]
864
+ });
865
+
866
+ google.maps.event.addListener(marker, "click", function() {
867
+ // Sélectionne le relais correspondant dans la liste
868
+ $("input[@type=radio][@name=tntRCchoixRelais]:eq("+ indice + ")").attr("checked", true);
869
+ tntRCSetSelectedInfo(indice);
870
+ });
871
+
872
+ relaisMarkers.push(marker);
873
+ zone_chalandise.extend(marker.getPosition());
874
+ }
875
+
876
+
877
+ function tntRCInitMap() {
878
+
879
+ // Si la carte n'est pas présente, fin de l'initialisation
880
+ if (!document.getElementById("map_canvas")) return;
881
+ mapDetected = true;
882
+
883
+ // Si une fonction de callback a été définie, un lien est ajouté
884
+ // dans la popup d'info du marqueur de relais colis
885
+ if (window.callbackSelectionRelais) callbackLinkMarker = "<a onclick='callbackSelectionRelais();' href='#' style='color:#FF6600'>Choisir ce relais</a>";
886
+
887
+ //Ajout du lien pour retour en zoom zone de chalandise
888
+ var jMapCanvas = $("#map_canvas");
889
+ jMapCanvas.wrap("<div></div>");
890
+ jMapCanvas.parent().append("<a class=\"lien_reset\" href=\"#\" onclick=\"javascript:retourZoomChalandise();\" style=\"text-decoration:none;\">Retour &agrave; la vue initiale</a>");
891
+
892
+ var mapClass = jMapCanvas.attr("class");
893
+ if (mapClass && mapClass != "") {
894
+ jMapCanvas.attr("class", "");
895
+ jMapCanvas.parent().attr("class", mapClass);
896
+ }
897
+
898
+ var myOptions = {
899
+ zoom: defaultZoom,
900
+ center: defaultCenter,
901
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
902
+ navigationControl: true,
903
+ scaleControl: true,
904
+ mapTypeControl: true,
905
+ streetViewControl: true
906
+ };
907
+
908
+ map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
909
+
910
+ // If the map position is out of range, move it back
911
+ function checkBounds() {
912
+
913
+ // Perform the check and return if OK
914
+ var currentBounds = map.getBounds();
915
+ var cSpan = currentBounds.toSpan(); // width and height of the bounds
916
+ var offsetX = cSpan.lng() / (2+aberration); // we need a little border
917
+ var offsetY = cSpan.lat() / (2+aberration);
918
+ var C = map.getCenter(); // current center coords
919
+ var X = C.lng();
920
+ var Y = C.lat();
921
+
922
+ // now check if the current rectangle in the allowed area
923
+ var checkSW = new google.maps.LatLng(C.lat()-offsetY,C.lng()-offsetX);
924
+ var checkNE = new google.maps.LatLng(C.lat()+offsetY,C.lng()+offsetX);
925
+
926
+ if (allowedBounds.contains(checkSW) &&
927
+ allowedBounds.contains(checkNE)) {
928
+ return; // nothing to do
929
+ }
930
+
931
+ var AmaxX = allowedBounds.getNorthEast().lng();
932
+ var AmaxY = allowedBounds.getNorthEast().lat();
933
+ var AminX = allowedBounds.getSouthWest().lng();
934
+ var AminY = allowedBounds.getSouthWest().lat();
935
+
936
+ if (X < (AminX+offsetX)) {X = AminX + offsetX;}
937
+ if (X > (AmaxX-offsetX)) {X = AmaxX - offsetX;}
938
+ if (Y < (AminY+offsetY)) {Y = AminY + offsetY;}
939
+ if (Y > (AmaxY-offsetY)) {Y = AmaxY - offsetY;}
940
+
941
+ map.setCenter(new google.maps.LatLng(Y,X));
942
+ return;
943
+ }
944
+
945
+ google.maps.event.addListener(map, "drag", function() {
946
+ checkBounds();
947
+ });
948
+
949
+ google.maps.event.addListener(map, "zoom_changed", function() {
950
+ if (map.getZoom() < minMapScale) {
951
+ map.setZoom(minMapScale);
952
+ }
953
+ });
954
+
955
+ google.maps.event.addListener(map.getStreetView(), "visible_changed", function() {
956
+ //premier accès lors du chargement de la page, il ne faut pas cacher les markers
957
+ if (init_streetview == true) {
958
+ if(map.getStreetView().getVisible() == true) {
959
+ for (var k = 0; k < relaisMarkers.length; k++) {
960
+ relaisMarkers[k].setVisible(false);
961
+ }
962
+ }
963
+ else {
964
+ for (var k = 0; k < relaisMarkers.length; k++) {
965
+ relaisMarkers[k].setVisible(true);
966
+ }
967
+ }
968
+ }
969
+ else init_streetview = true;
970
+ });
971
+ }
972
+
973
+ function retourZoomChalandise() {
974
+ if(zoomZoneChalandiseDefault){
975
+ map.setCenter(zoomZoneChalandiseDefault);
976
+ map.fitBounds(centerZoneChalandiseDefault);
977
+ }
978
+ }
979
+
980
+ function fromhere() {
981
+ switchFromTo(contentFrom);
982
+ }
983
+
984
+ function tohere() {
985
+ switchFromTo(contentTo);
986
+ }
987
+
988
+ function switchFromTo(htmlContent) {
989
+ var adresse_saisie = $("#saisie").val();
990
+ $("#trajet").html(htmlContent);
991
+ $("#point_choisi").attr('value', adresse_pointclic);
992
+ $("#saisie").val(adresse_saisie);
993
+ }
994
+
995
+ function popup_roadmap() {
996
+ if($("#saisie").val() == "") return;
997
+ window.open("http://" + tntDomain + "/public/geolocalisation/print_roadmap.do?mode="+ $("#mode").val() +"&point_choisi="+ $("#point_choisi").val() +"&saisie="+ $("#saisie").val());
998
+ }
999
+
1000
+ $().ready(tntB2CRelaisColis);
skin/frontend/default/default/js/tnt/relaisColisIE7.js ADDED
@@ -0,0 +1,1002 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** Javascript B2C Relais Colis - version 2.0 - 08/07/2010 **/
2
+
3
+ var pathToImages = "images/tnt/relaisColis/";
4
+ var tntDomain = "www.tnt.fr";
5
+
6
+ var tntRCcodePostal;
7
+ var tntRCCommune;
8
+ var tntRClisteRelais;
9
+ var tntRCJsonCommunes;
10
+
11
+ var tntRCMsgHeaderTitle = "Mode de livraison";
12
+ var tntRCMsgSubHeaderTitle = "Choisissez le Relais Colis<sup class='tntRCSup'>&#174;</sup> qui vous convient :";
13
+ var tntRCMsgHeaderPopup = "D&#233;tail du Relais Colis<sup class='tntRCSup'>&#174;</sup>";
14
+ var tntRCMsgSubHeaderPopup = "Descriptif :";
15
+ var tntRCMsgBodyLoading = "Chargement en cours...";
16
+ var tntRCMsgBodyInput = "Entrez le code postal :&nbsp;";
17
+ var tntRCMsgBodyBack2Communes = "Revenir &#224; la liste des communes";
18
+ var tntRCMsgErrCodePostal = "Veuillez saisir un code postal sur 5 chiffres";
19
+ var tntRCMsgErrLoadCommunes = "Aucun Relais Colis&#174; disponible";
20
+ var tntRCMsgErrLoadRelais = "Aucun Relais Colis&#174; disponible";
21
+
22
+ var tntRCsize800 = "100%";
23
+ var tntRCsize789 = "589px";
24
+ var tntRCsize670 = "75%";
25
+ var tntRCsize650 = "65%";
26
+ var tntRCsize50 = "11%";
27
+ var tntRCsize8 = "8px";
28
+ var tntRCsize5 = "5px";
29
+ var tntRCsize6 = "6px";
30
+ var tntRCsize10 = "1%";
31
+ var tntRCsize30 = "30px";
32
+ var tntRCsize109 = "24%";
33
+ var tntRCsize442 = "362px";
34
+ var tntRCsize447 = "387px";
35
+ var tntRCsize206 = "206px";
36
+ var tntRCsize253 = "213px";
37
+ var tntRCsize20 = "20px";
38
+ var tntRCsize392 = "352px";
39
+ var tntRCsize412 = "332px";
40
+
41
+ function getURLParam(name) {
42
+ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
43
+ var regexS = "[\\?&]" + name + "=([^&#]*)";
44
+ var regex = new RegExp( regexS );
45
+ var results = regex.exec( window.location.href );
46
+ if( results == null ) return "";
47
+ else return results[1];
48
+ };
49
+
50
+ // Chargement de la liste de relais colis après le choix de la commune parmis plusieurs
51
+ // communes correspondant au même code postal
52
+ function tntRCgetRelaisColisJSON(commune)
53
+ {
54
+ if (!commune) {
55
+ // La commune du code postal correspond à la sélection du radio bouton tntRCchoixComm
56
+ tntRCCommune = $("input[@type=radio][@checked][@name=tntRCchoixComm]").val();
57
+ }
58
+ else {
59
+ // Utilisation de la valeur fournie en paramètre
60
+ tntRCCommune = commune
61
+ }
62
+
63
+ // Affichage message "chargement en cours"
64
+ tntRCsetChargementEnCours();
65
+
66
+ var ajaxUrl;
67
+ var ajaxData;
68
+
69
+ ajaxUrl = "http://" + tntDomain + "/public/b2c/relaisColis/loadJson.do?cp=" + tntRCcodePostal + "&commune=" + tntRCCommune;
70
+ ajaxData = "";
71
+
72
+ // Chargement de la liste de relais colis
73
+ $.ajax({
74
+ type: "GET",
75
+ url: ajaxUrl,
76
+ data: ajaxData,
77
+ dataType: "script"
78
+ });
79
+ };
80
+
81
+ // Affichage d'une liste de relais colis
82
+ function tntRCafficheRelais(jData) {
83
+ $("#promoRelaisColis").hide();
84
+
85
+ var jMessage = $('#blocCodePostal');
86
+
87
+ var tntRCjTable = $("<table style='border:1px solid gray;' cellpadding='0' cellspacing='0' width='" + tntRCsize800 + "'></table>");
88
+
89
+ // Ligne blanche de séparation
90
+ //tntRCjTable.append(tntRCligneBlanche6Col());
91
+
92
+ // Entêtes de colonnes grise
93
+ tntRCjTable.append(tntRCenteteGrise6Col());
94
+
95
+ //affiche le contenu du fichier dans le conteneur dédié
96
+ jMessage.html("");
97
+
98
+ var i = 0;
99
+
100
+ tntRClisteRelais = jData;
101
+ for(i = 0; i < jData.length; i++) {
102
+
103
+ var oRelais = jData[i];
104
+
105
+ // Les noeuds dans le fichier XML ne sont pas forcément ordonnés pour l'affichage, on va donc d'abord récupérer leur valeur
106
+ var codeRelais = oRelais[0];
107
+ var nomRelais = oRelais[1];
108
+ var adresse = oRelais[4];
109
+ var codePostal = oRelais[2];
110
+ var commune = oRelais[3];
111
+ var heureFermeture = oRelais[21];
112
+
113
+ if(i==0) {
114
+ //parent.document.getElementById('tnt_relais1').value = adresse+'&&&'+nomRelais+' '+codeRelais+'&&&'+codePostal+'&&&'+commune;
115
+ window.opener.document.getElementById('tnt_relais1').value = adresse+'&&&'+nomRelais+' '+codeRelais+'&&&'+codePostal+'&&&'+commune;
116
+
117
+ $(window.opener.document).find("#tnt_pr_choix").html("Relais Colis® selectionné : "+nomRelais+" ("+codeRelais+") "+adresse+" - "+codePostal+" "+commune);
118
+ $(window.opener.document).find("#tnt_pr_choix").show();
119
+ $(window.opener.document).find("#tnt_pr").hide();
120
+ }
121
+
122
+ var messages="";
123
+
124
+ var logo_point = "";
125
+ if (messages != "") logo_point = "<img src='" + pathToImages + "exception.gif' alt='Informations compl&#233;mentaires' width='16px' height='16px'>";
126
+
127
+ tntRCjTable.append(
128
+ "<tr>"+
129
+ "<td class='tntRCblanc' width='" + tntRCsize5 + "'></td>"+
130
+ "<td class='tntRCblanc' width='" + tntRCsize50 + "'><img src='" + pathToImages + "logo-tnt-petit.jpg'>&nbsp;" + logo_point + "</td>"+
131
+ "<td class='tntRCrelaisColis' width='" + tntRCsize650 + "'>" + nomRelais + " - " + adresse + " - " + codePostal + " - " + commune + "<BR>&nbsp;&nbsp;&nbsp;&nbsp;>> Ouvert jusqu'&agrave; " + heureFermeture + "</td>"+
132
+ //"<td class='tntRCrelaisColis' width='" + tntRCsize10 + "'>&nbsp;</td>"+
133
+ "<td class='tntRCrelaisColis' valign='middle' align='center' width='" + tntRCsize109 + "'>"+
134
+ "<a href='#' onclick='tntRCafficheDetail(" + i + ");'><img src='" + pathToImages + "loupe.gif' class='tntRCBoutonLoupe'></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
135
+ "<input type='radio' style='vertical-align: middle;' name='tntRCchoixRelais' value='" + codeRelais + "'" + ( i==0 ? "checked" : "") + " onclick='tntRCSetSelectedInfo(" + i + ")'/>"+
136
+ "</td>"+
137
+ "<td class='tntRCblanc' width='" + tntRCsize6 + "'></td>"+
138
+ "</tr>");
139
+ }
140
+
141
+ // Mémorisation des infos du relais sélectionné par défaut (c'est le premier)
142
+ tntRCSetSelectedInfo(0, true);
143
+
144
+ tntRCjTable.append(
145
+ "<tr>"+
146
+ "<td colspan='5' class='tntRCBack2Communes'>"+
147
+ //"<a href='javascript:window.parent.jQuery.superbox.close();'><img class='tntRCButton' src='" + pathToImages + "bt-Continuer.jpg'></a>" +
148
+ "<a href='javascript:window.close();'><img class='tntRCButton' src='" + pathToImages + "bt-Continuer.jpg'></a>" +
149
+ "</td>"+
150
+ "<td />"+
151
+ "</tr>");
152
+
153
+ // Ajout du lien de retour sur la liste des communes si cette dernière a été mémorisée
154
+ if (tntRCJsonCommunes != null) {
155
+ tntRCjTable.append(
156
+ "<tr>"+
157
+ "<td colspan='5' class='tntRCBack2Communes'>"+
158
+ "<a href='#' onclick='tntRCafficheCommunes(tntRCJsonCommunes);'>"+
159
+ "<img src='" + pathToImages + "bt-Retour.gif'>"+
160
+ tntRCMsgBodyBack2Communes +
161
+ "</a>"+
162
+ "</td>"+
163
+ "<td />"+
164
+ "</tr>");
165
+ }
166
+
167
+ tntRCjTable.append(tntRCligneBlanche6Col());
168
+ jMessage.append(tntRCjTable);
169
+
170
+ jMessage.append(tntRCchangerCodePostal());
171
+ };
172
+
173
+ function tntB2CRelaisColisGetBodyMain() {
174
+ var cp_origin = $('#cp_origin').val();
175
+
176
+ return (
177
+ "<div class='tntRCGray'>&#160;</div>"+
178
+ "<div id='tntBodyContentSC'>" +
179
+ "<table>"+
180
+ "<tr>"+
181
+ "<td>" + tntRCMsgBodyInput + "</td>"+
182
+ "<td><input type='text' id='tntRCInputCP' class='tntRCInput' maxlength='5' size='5' value='"+ cp_origin +"'/></td>"+
183
+ "<td><a href='#' onclick='tntRCgetCommunesJSON();'><img class='tntRCButton' src='" + pathToImages + "bt-OK.jpg'></a></td>" +
184
+ "</tr>"+
185
+ "</table>" +
186
+ "</div>"+
187
+ "<div id='tntRCLoading' style='display:none;'>" + tntRCMsgBodyLoading + "</div>"+
188
+ "<div id='tntRCError' class='tntRCError' style='display:none;'></div>");
189
+ }
190
+
191
+ function tntB2CRelaisColis() {
192
+
193
+ // Test si ID de référence existe, sinon on ne fait rien
194
+ if (!document.getElementById("tntB2CRelaisColis")) {
195
+ alert("ERREUR: Appel incorrect, objet [tntB2CRelaisColis] manquant !");
196
+ return;
197
+ }
198
+
199
+ tntRCCommune = '';
200
+
201
+ var tntRelaisColisB2C = $("#tntB2CRelaisColis");
202
+ tntRelaisColisB2C.html(
203
+ "<div id='tntRCblocEntete'>"+
204
+ //"<div class='tntRCHeader'>"+ tntRCMsgHeaderTitle + "</div>"+
205
+ "<div class='tntRCSubHeader'>" + tntRCMsgSubHeaderTitle + "</div>"+
206
+ "<input type='hidden' id='tntRCSelectedCode' value=''/>"+
207
+ "<input type='hidden' id='tntRCSelectedNom' value=''/>"+
208
+ "<input type='hidden' id='tntRCSelectedAdresse' value=''/>"+
209
+ "<input type='hidden' id='tntRCSelectedCodePostal' value=''/>"+
210
+ "<input type='hidden' id='tntRCSelectedCommune' value=''/>"+
211
+ "</div>"+
212
+ "<div id='blocCodePostal' class='tntRCBody'>"+
213
+ tntB2CRelaisColisGetBodyMain() +
214
+ "</div>" +
215
+ "<div class='dialog_box' id='tntRCDialog'>"+
216
+ "<div id='tntRCdetailRelaisEntete'>"+
217
+ "<div class='tntRCHeader'>"+ tntRCMsgHeaderPopup + "</div>"+
218
+ "<div class='tntRCSubHeader'>" + tntRCMsgSubHeaderPopup + "</div>"+
219
+ "</div>"+
220
+ "<div id='tntRCdetailRelaisCorps'></div>"+
221
+ "</div>");
222
+
223
+ // Forçage de la propriété "top", car elle est écrasée par la gestion de jqModal
224
+ // si on la met dans la définition de la classe du div correspondant...
225
+ $('#tntRCDialog').css("top", "50%");
226
+
227
+ // Ajout de la popup dans la gestion jqModal
228
+
229
+ $('#tntRCDialog').dialog({
230
+ modal: true,
231
+ autoOpen: false,
232
+ width: 635,
233
+ height: 450,
234
+ position: ['middle','middle'],
235
+ resizable: false,
236
+ draggable: false,
237
+ show: 'blind',
238
+ close: function(event, ui) {
239
+ $("html").css({overflow: "", 'overflow-x': "", 'overflow-y': ""});
240
+ }
241
+ });
242
+
243
+ // Récupérations des paramètres de l'URL
244
+ var codePostal = getURLParam("codePostal");
245
+ var commune = getURLParam("commune");
246
+
247
+ if (codePostal != "") {
248
+ tntRCcodePostal = codePostal;
249
+ if (commune != "") {
250
+ // Couple code postal + commune fourni
251
+ tntRCgetRelaisColisJSON(commune);
252
+ }
253
+ else {
254
+ $('#tntRCInputCP').val(tntRCcodePostal);
255
+ tntRCgetCommunesJSON();
256
+ }
257
+ }
258
+
259
+ // Initialisation de Map associée
260
+ tntRCInitMap();
261
+ };
262
+
263
+ function tntRCgetRelaisColis(libelleErreur) {
264
+
265
+ // RAZ des infos sélectionnées
266
+ tntRCSetSelectedInfo();
267
+
268
+ tntRCCommune = '';
269
+
270
+ var blocCodePostal = $("#blocCodePostal");
271
+ if(!blocCodePostal.hasClass("tntRCBody"))
272
+ blocCodePostal.addClass("tntRCBody");
273
+ blocCodePostal.html(tntB2CRelaisColisGetBodyMain());
274
+ $('#tntRCInputCP').val(tntRCcodePostal);
275
+
276
+ if (libelleErreur) {
277
+ var jDivErreur = $("#tntRCError");
278
+ jDivErreur.html(libelleErreur);
279
+ jDivErreur.show();
280
+ }
281
+ };
282
+
283
+ function tntRCafficheCommunes(jData) {
284
+ $("#promoRelaisColis").hide();
285
+
286
+ // RAZ des infos sélectionnées
287
+ tntRCSetSelectedInfo();
288
+
289
+ if (mapDetected) resetMap();
290
+
291
+ var tntRCjTable = $("<table style='border:1px solid gray;' cellpadding='0' cellspacing='0' width='" + tntRCsize800 + "'></table>");
292
+
293
+ // Ligne blanche de séparation
294
+ //tntRCjTable.append(tntRCligneBlanche6Col());
295
+ // Entêtes de colonnes grise
296
+ tntRCjTable.append(tntRCenteteGrise6Col2());
297
+
298
+ var blocCodePostal = $("#blocCodePostal");
299
+
300
+ var i = 1;
301
+ //var jCommunes = jData.find("VILLE");
302
+ for (var iIdx = 0; iIdx < jData.length; iIdx++) {
303
+
304
+ var commune = jData[iIdx];
305
+
306
+ //var jCommune = $(this);
307
+ var nomVille = commune[1]; // IE vs FF
308
+
309
+ tntRCjTable.append(
310
+ "<tr>"+
311
+ "<td class='tntRCblanc' width='" + tntRCsize50 + "'><img src='" + pathToImages + "logo-tnt-petit.jpg'></td>" +
312
+ "<td class='tntRCrelaisColis' width='80%'> " + nomVille + " (" + tntRCcodePostal + ") </td>" +
313
+ //"<td class='tntRCrelaisColis' width='" + tntRCsize10 + "'>&nbsp;</td>"+
314
+ "<td class='tntRCrelaisColis' align='center' width='20%'>"+
315
+ "<input type='radio' name='tntRCchoixComm' value='" + nomVille + "' " + ( i ==1 ? "checked" : "") + ">"+
316
+ "</td>"+
317
+ //"<td class='tntRCblanc' width='" + tntRCsize6 + "'></td>"+
318
+ "</tr>");
319
+ i = 2;
320
+ }
321
+
322
+ tntRCjTable.append(
323
+ tntRCligneBlanche6Col() +
324
+ "<tr>"+
325
+ "<td class='tntRCblanc'></td>"+
326
+ "<td class='tntRCblanc'></td>"+
327
+ "<td class='tntRCblanc' align='center'>"+
328
+ "<a href='javascript:tntRCgetRelaisColisJSON();'><img class='tntRCButton' src='" + pathToImages + "bt-Continuer.jpg'></a>" +
329
+ "</td>"+
330
+ "</tr>" +
331
+ tntRCligneBlanche6Col());
332
+
333
+ blocCodePostal.html(tntRCjTable);
334
+
335
+ // Bloc de saisie d'un nouveau code postal
336
+ blocCodePostal.append(tntRCchangerCodePostal());
337
+ }
338
+
339
+ function tntRCgetCommunesJSON() {
340
+
341
+ $("#tntRCError").hide();
342
+ tntRCcodePostal = $('#tntRCInputCP').val();
343
+
344
+ // Code postal non renseigné, on ne fait rien
345
+ if (tntRCcodePostal=="") return;
346
+
347
+ if (mapDetected) resetMap();
348
+
349
+ // On ne fait rien si le code postal n'est pas un nombre de 5 chiffres
350
+ if (isNaN(parseInt(tntRCcodePostal)) || tntRCcodePostal.length != 5) {
351
+ tntRCgetRelaisColis(tntRCMsgErrCodePostal);
352
+ return;
353
+ }
354
+
355
+ tntRCsetChargementEnCours();
356
+
357
+ var ajaxUrl;
358
+ var ajaxData;
359
+
360
+ ajaxUrl = "http://" + tntDomain + "/public/b2c/relaisColis/rechercheJson.do?code=" + tntRCcodePostal;
361
+ ajaxData = "";
362
+
363
+ $.ajax({
364
+ type: "GET",
365
+ url: ajaxUrl,
366
+ data: ajaxData,
367
+ dataType: "script",
368
+ error:function(msg){
369
+ $("#blocCodePostal").html("Error !: " + msg );
370
+ }
371
+ });
372
+ };
373
+
374
+ function tntRCsetChargementEnCours() {
375
+ $("#tntRCLoading").show();
376
+ };
377
+
378
+ function tntRCafficheDetail(i) {
379
+
380
+ var tntRCdetailRelais = $("#tntRCdetailRelaisCorps");
381
+
382
+ tntRCdetailRelais.html("");
383
+
384
+ var oRelais = tntRClisteRelais[i];
385
+
386
+ // Les noeuds dans le fichier JSON ne sont pas forcément ordonnés pour l'affichage, on va donc d'abord récupérer leur valeur
387
+ var codeRelais = oRelais[0]
388
+ var nomRelais = oRelais[1];
389
+ var adresse = oRelais[4];
390
+ var codePostal = oRelais[2];
391
+ var commune = oRelais[3];
392
+ var heureFermeture = oRelais[21];
393
+
394
+ var lundi_am = (oRelais[7] == "-")?"ferm&#233;":oRelais[7];
395
+ var lundi_pm = (oRelais[8] == "-")?"ferm&#233;":oRelais[8];
396
+ var mardi_am = (oRelais[9] == "-")?"ferm&#233;":oRelais[9];
397
+ var mardi_pm = (oRelais[10] == "-")?"ferm&#233;":oRelais[10];
398
+ var mercredi_am = (oRelais[11] == "-")?"ferm&#233;":oRelais[11];
399
+ var mercredi_pm = (oRelais[12] == "-")?"ferm&#233;":oRelais[12];
400
+ var jeudi_am = (oRelais[13] == "-")?"ferm&#233;":oRelais[13];
401
+ var jeudi_pm = (oRelais[14] == "-")?"ferm&#233;":oRelais[14];
402
+ var vendredi_am = (oRelais[15] == "-")?"ferm&#233;":oRelais[15];
403
+ var vendredi_pm = (oRelais[16] == "-")?"ferm&#233;":oRelais[16];
404
+ var samedi_am = (oRelais[17] == "-")?"ferm&#233;":oRelais[17];
405
+ var samedi_pm = (oRelais[18] == "-")?"ferm&#233;":oRelais[18];
406
+ var dimanche_am = (oRelais[19] == "-")?"ferm&#233;":oRelais[19];
407
+ var dimanche_pm = (oRelais[20] == "-")?"ferm&#233;":oRelais[20];
408
+
409
+ var messages = "";
410
+ for (j=0; j < oRelais[24].length; j++) {
411
+ var ligne = oRelais[24][j];
412
+ if (ligne != "") messages = messages + ligne + "<br/>";
413
+ }
414
+
415
+ if (lundi_pm != "-") lundi_am = lundi_am + "<br/>" + lundi_pm;
416
+ if (mardi_pm != "-") mardi_am = mardi_am + "<br/>" + mardi_pm;
417
+ if (mercredi_pm != "-") mercredi_am = mercredi_am + "<br/>" + mercredi_pm;
418
+ if (jeudi_pm != "-") jeudi_am = jeudi_am + "<br/>" + jeudi_pm;
419
+ if (vendredi_pm != "-") vendredi_am = vendredi_am + "<br/>" + vendredi_pm;
420
+ if (samedi_pm != "-") samedi_am = samedi_am + "<br/>" + samedi_pm;
421
+ if (dimanche_pm != "-") dimanche_am = dimanche_am + "<br/>" + dimanche_pm;
422
+
423
+ var logo_point = "";
424
+ if (messages != "") logo_point = "<img src='" + pathToImages + "exception.gif' alt='Picto Informations'>";
425
+
426
+ var tntRCjTableX = $("<table style='border:1px solid gray;' cellpadding='0' cellspacing='0' width='" + tntRCsize447 + "'>"
427
+ + "<tr>"
428
+ + "<td width='" + tntRCsize447 + "' valign='top'>"
429
+ + "<table style='border:0px;' cellpadding='0' cellspacing='0' width='" + tntRCsize447 + "'>"
430
+ + "<tr>"
431
+ + "<td>"
432
+ + "<table style='border:0px;' cellpadding='0' cellspacing='0' >"
433
+ + "<tr height='" + tntRCsize8 + "'><td colspan='2'></td></tr>"
434
+ + "<tr>"
435
+ + "<td class='tntRCdetailGros' width='" + tntRCsize5 + "'>&nbsp;</td>"
436
+ + "<td class='tntRCdetailGros' width='" + tntRCsize442 + "'>Localisation : </td>"
437
+ + "</tr>"
438
+ + "<tr height='" + tntRCsize8 + "'><td colspan='2'></td></tr>"
439
+ + "<tr>"
440
+ + "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'>&nbsp;</td>"
441
+ + "<td class='tntRCnoirPetit' width='"+ tntRCsize412 + "'><b>" + nomRelais + "</b></td>"
442
+ + "</tr>"
443
+ + "<tr>"
444
+ + "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'>&nbsp;</td>"
445
+ + "<td class='tntRCnoirPetit' width='"+ tntRCsize412 + "'>" + adresse + "</td>"
446
+ + "</tr>"
447
+ + "<tr>"
448
+ + "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'>&nbsp;</td>"
449
+ + "<td class='tntRCnoirPetit' width='"+ tntRCsize412 + "'>" + codePostal + " " + commune + "</td>"
450
+ + "</tr>"
451
+ + "<tr height='" + tntRCsize20 + "'><td colspan='2'></td></tr>"
452
+ + "<tr>"
453
+ + "<td class='tntRCdetailGros' width='" + tntRCsize5 + "'>&nbsp;</td>"
454
+ + "<td class='tntRCdetailGros' width='" + tntRCsize442 + "'>Informations : </td>"
455
+ + "</tr>"
456
+ + "<tr height='" + tntRCsize8 + "'><td colspan='2'></td></tr>"
457
+ + "<tr>"
458
+ + "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'></td>"
459
+ + "<td class='tntRCdetailPetit' width='"+ tntRCsize412 + "'>" + messages + "</td>"
460
+ + "</tr>"
461
+ + "</table>"
462
+ + "</td>"
463
+ + "</tr>"
464
+ + "</table>"
465
+ + "</td>"
466
+ + "<td width='" + tntRCsize253 + "' valign='top'>"
467
+ + "<table style='border:0px;' cellpadding='0' cellspacing='0' width='" + tntRCsize253 + "'>"
468
+ + "<tr>"
469
+ + "<td>"
470
+ + "<table style='border:0px;' cellpadding='0' cellspacing='0'>"
471
+ + "<tr height='" + tntRCsize8 + "'>"
472
+ + "<td></td>"
473
+ + "</tr>"
474
+ + "<tr>"
475
+ + "<td class='tntRCdetailGros' align='center'><img src='" + pathToImages + "picto-delai.gif' alt='Picto delai'></td>"
476
+ + "</tr>"
477
+ + "<tr>"
478
+ + "<td>"
479
+ + "<table class='tntRCHoraire' cellpadding='0' cellspacing='0' rules='all' width='" + tntRCsize206 + "'>"
480
+ + "<tr>"
481
+ + "<td class='tntRCHoraireJour'>Lundi</td>"
482
+ + "<td class='tntRCHoraireHeure'>" + lundi_am + "</td>"
483
+ + "</tr>"
484
+ + "<tr>"
485
+ + "<td class='tntRCHoraireJour'>Mardi</td>"
486
+ + "<td class='tntRCHoraireHeure'>" + mardi_am + "</td>"
487
+ + "</tr>"
488
+ + "<tr>"
489
+ + "<td class='tntRCHoraireJour'>Mercredi</td>"
490
+ + "<td class='tntRCHoraireHeure'>" + mercredi_am + "</td>"
491
+ + "</tr>"
492
+ + "<tr>"
493
+ + "<td class='tntRCHoraireJour'>Jeudi</td>"
494
+ + "<td class='tntRCHoraireHeure'>" + jeudi_am + "</td>"
495
+ + "</tr>"
496
+ + "<tr>"
497
+ + "<td class='tntRCHoraireJour'>Vendredi</td>"
498
+ + "<td class='tntRCHoraireHeure'>" + vendredi_am + "</td>"
499
+ + "</tr>"
500
+ + "<tr>"
501
+ + "<td class='tntRCHoraireJour'>Samedi</td>"
502
+ + "<td class='tntRCHoraireHeure'>" + samedi_am + "</td>"
503
+ + "</tr>"
504
+ + "<tr>"
505
+ + "<td class='tntRCHoraireJour'>Dimanche</td>"
506
+ + "<td class='tntRCHoraireHeure'>" + dimanche_am + "</td>"
507
+ + "</tr>"
508
+ + "</table>"
509
+ + "</td>"
510
+ + "</tr>"
511
+ + "</table>"
512
+ + "</td>"
513
+ + "</tr>"
514
+ + "</table>"
515
+ + "</td>"
516
+ + "</tr>"
517
+ + "<tr height='" + tntRCsize8 + "'></tr>"
518
+ + "</table>");
519
+
520
+ tntRCdetailRelais.append(tntRCjTableX);
521
+
522
+ $('#tntRCDialog').dialog("open");
523
+ $('#tntRCDialog').css("width", "600px"); // Patch mauvais calcul jQueryUI
524
+ // Masquage des barres de scrolling
525
+ $("html").css({overflow: "hidden", 'overflow-x': "hidden", 'overflow-y': "hidden"});
526
+ };
527
+
528
+ function tntRCligneBlancheDetail(){
529
+ return("<tr height='" + tntRCsize5 + "'><td colspan='8'>&nbsp;</td></tr>");
530
+ };
531
+
532
+ function tntRCligneBlancheGauche(){
533
+ return(
534
+ "<tr height='" + tntRCsize8 + "'>"+
535
+ "<td class='tntRCdetailGros' width='" + tntRCsize5 + "'></td>"+
536
+ "<td class='tntRCdetailGros' width='" + tntRCsize30 + "'></td>"+
537
+ "<td class='tntRCdetailGros' width='" + tntRCsize20 + "'></td>"+
538
+ "<td class='tntRCdetailGros' width='" + tntRCsize392 + "'></td>"+
539
+ "</tr>");
540
+ };
541
+
542
+ // Table vide avec 3 colonnes pour sauter une ligne
543
+ function tntRCligneBlanche3Col() {
544
+ return("<tr height='" + tntRCsize8 + "'><td class='tntRCblanc' width='" + tntRCsize5 + "'></td><td class='tntRCblanc' width='" + tntRCsize789 + "'></td><td class='tntRCblanc' width='" + tntRCsize6 + "'></td></tr>");
545
+ };
546
+
547
+ // Table vide avec 6 colonnes pour sauter une ligne
548
+ function tntRCligneBlanche6Col() {
549
+ return("<tr height='" + tntRCsize8 + "'><td class='tntRCblanc' colspan='6'></td></td></tr>");
550
+ };
551
+
552
+ // Table vide avec 3 colonnes et entête en gris
553
+ function tntRCligneGrise3Col() {
554
+ return("<tr><td class='tntRCblanc' width='" + tntRCsize5 + "'></td><td class='tntRCgris' width='" + tntRCsize789 + "'><br/></td><td class='tntRCblanc' width='" + tntRCsize6 + "'></td></tr>");
555
+ };
556
+
557
+ // Table entête de colonnes grises
558
+ function tntRCenteteGrise6Col() {
559
+ return("<tr height='25px'><td class='tntRCblanc' width='" + tntRCsize5 + "'></td><td class='tntRCgris' colspan='2' width='" + tntRCsize670 + "'>&nbsp;Les diff&eacute;rents Relais Colis&#174;</td><td class='tntRCgris' width='" + tntRCsize109 + "'>&nbsp;Mon choix</td><td class='tntRCblanc' width='" + tntRCsize6 + "'></td></tr>");
560
+ };
561
+
562
+ //Table entête de colonnes grises
563
+ function tntRCenteteGrise6Col2() {
564
+ return("<tr height='25px'><td class='tntRCgris' colspan='2' width='80%'>&nbsp;Les diff&eacute;rents Relais Colis&#174;</td><td class='tntRCgris' width='20%'>&nbsp;Mon choix</td></tr>");
565
+ };
566
+
567
+ // Zone de saisie d'un code postal nouveau
568
+ function tntRCchangerCodePostal(){
569
+ return(
570
+ "<div class='tntRCWhite'>&#160;</div>"+
571
+ "<div class='tntRCBodySearch'>"+
572
+ "<table>"+
573
+ "<tr>"+
574
+ "<td width='350px'>Vous pouvez choisir un autre code postal de livraison :</td>"+
575
+ "<td width='55px'><input type='text' id='tntRCInputCP' class='tntRCInput' maxlength='5' size='5' value='' /></td>"+
576
+ "<td><a href='#' onclick='tntRCgetCommunesJSON();'><img class='tntRCButton' src='" + pathToImages + "bt-CodePostal.jpg'></a></td>" +
577
+ "</tr>"+
578
+ "</table>"+
579
+ "</div>");
580
+ };
581
+
582
+ function tntRCSetSelectedInfo(selectedIdx, noMarkerInfo) {
583
+
584
+ if (!selectedIdx && selectedIdx != 0) {
585
+ // RAZ des infos sélectionnées
586
+ $("#tntRCSelectedCode").val("");
587
+ $("#tntRCSelectedNom").val("");
588
+ $("#tntRCSelectedAdresse").val("");
589
+ $("#tntRCSelectedCodePostal").val("");
590
+ $("#tntRCSelectedCommune").val("");
591
+ return
592
+ }
593
+
594
+ var oRelais = tntRClisteRelais[selectedIdx];
595
+
596
+ $("#tntRCSelectedCode").val(oRelais[0]);
597
+ $("#tntRCSelectedNom").val(oRelais[1]);
598
+ $("#tntRCSelectedAdresse").val(oRelais[4]);
599
+ $("#tntRCSelectedCodePostal").val(oRelais[2]);
600
+ $("#tntRCSelectedCommune").val(oRelais[3]);
601
+
602
+ if (mapDetected && !noMarkerInfo) {
603
+
604
+ // Les noeuds dans le fichier XML ne sont pas forcément ordonnés pour l'affichage, on va donc d'abord récupérer leur valeur
605
+ var codeRelais = oRelais[0]
606
+ var nomRelais = oRelais[1];
607
+ var adresse = oRelais[4];
608
+ var codePostal = oRelais[2];
609
+ var commune = oRelais[3];
610
+ var heureFermeture = oRelais[21];
611
+
612
+ var messages = "";
613
+ var lundi_am = (oRelais[7] == "-")?",":oRelais[7]+",";
614
+ var lundi_pm = oRelais[8];
615
+ var mardi_am = (oRelais[9] == "-")?",":oRelais[9]+",";
616
+ var mardi_pm = oRelais[10];
617
+ var mercredi_am = (oRelais[11] == "-")?",":oRelais[11]+",";
618
+ var mercredi_pm = oRelais[12];
619
+ var jeudi_am = (oRelais[13] == "-")?",":oRelais[13]+",";
620
+ var jeudi_pm = oRelais[14];
621
+ var vendredi_am = (oRelais[15] == "-")?",":oRelais[15]+",";
622
+ var vendredi_pm = oRelais[16];
623
+ var samedi_am = (oRelais[17] == "-")?",":oRelais[17]+",";
624
+ var samedi_pm = oRelais[18];
625
+ var dimanche_am = (oRelais[19] == "-")?",":oRelais[19]+",";
626
+ var dimanche_pm = oRelais[20];
627
+
628
+ if (lundi_pm != "-") lundi_am = lundi_am + lundi_pm;
629
+ if (mardi_pm != "-") mardi_am = mardi_am + mardi_pm;
630
+ if (mercredi_pm != "-") mercredi_am = mercredi_am + mercredi_pm;
631
+ if (jeudi_pm != "-") jeudi_am = jeudi_am + jeudi_pm;
632
+ if (vendredi_pm != "-") vendredi_am = vendredi_am + vendredi_pm;
633
+ if (samedi_pm != "-") samedi_am = samedi_am + samedi_pm;
634
+ if (dimanche_pm != "-") dimanche_am = dimanche_am + dimanche_pm;
635
+
636
+ var horaires = new Array();
637
+ horaires['lundi'] = lundi_am + ",1";
638
+ horaires['mardi'] = mardi_am + ",2";
639
+ horaires['mercredi'] = mercredi_am + ",3";
640
+ horaires['jeudi'] = jeudi_am + ",4";
641
+ horaires['vendredi'] = vendredi_am + ",5";
642
+ horaires['samedi'] = samedi_am + ",6";
643
+ horaires['dimanche'] = dimanche_am + ",0";
644
+
645
+ var messages = "";
646
+ for (j=0; j < oRelais[24].length; j++) {
647
+ var ligne = oRelais[24][j];
648
+ if (ligne != "") messages = messages + ligne + "<br/>";
649
+ }
650
+
651
+ //parent.document.getElementById('tnt_relais1').value = adresse+'&&&'+nomRelais+' '+codeRelais+'&&&'+codePostal+'&&&'+commune;
652
+ window.opener.document.getElementById('tnt_relais1').value = adresse+'&&&'+nomRelais+' '+codeRelais+'&&&'+codePostal+'&&&'+commune;
653
+
654
+ $(window.opener.document).find("#tnt_pr_choix").html("Relais Colis® selectionné : "+nomRelais+" ("+codeRelais+") "+adresse+" - "+codePostal+" "+commune);
655
+ $(window.opener.document).find("#tnt_pr_choix").show();
656
+ $(window.opener.document).find("#tnt_pr").hide();
657
+
658
+ setInfoMarker(codeRelais, nomRelais, adresse, codePostal, commune, messages, selectedIdx, horaires, relaisMarkers[selectedIdx]);
659
+ }
660
+ }
661
+
662
+ function resetMap() {
663
+
664
+ if (map) {
665
+
666
+ map.getStreetView().setVisible(false);
667
+
668
+ for (var i = 0; i < relaisMarkers.length; i++) {
669
+ relaisMarkers[i].setMap(null);
670
+ relaisMarkers[i] = null;
671
+ }
672
+ relaisMarkers = new Array();
673
+ if (infowindow) infowindow.close();
674
+ map.setZoom(defaultZoom);
675
+ map.setCenter(defaultCenter);
676
+ }
677
+ }
678
+
679
+ /*
680
+ * Fonction appellée en retour de la recherche des communes par rapport à un code postal
681
+ * si plusieurs communes ont été trouvées
682
+ */
683
+
684
+ function listeCommunes(tabCommunes) {
685
+ tntRCJsonCommunes = null;
686
+
687
+ // TEMP: car le contenu du div est entièrement reconstruit
688
+ $("#blocCodePostal").removeClass("tntRCBody");
689
+
690
+ tntRCJsonCommunes = tabCommunes;
691
+ tntRCafficheCommunes(tabCommunes);
692
+ }
693
+
694
+ /*
695
+ * Fonction appellée en retour de la recherche des communes par rapport à un code postal
696
+ * si une seule commune a été trouvée
697
+ */
698
+
699
+ function listeRelais(tabRelais) {
700
+
701
+ tntRClisteRelais = null;
702
+
703
+ // TEMP: car le contenu du div est entièrement reconstruit
704
+ $("#blocCodePostal").removeClass("tntRCBody");
705
+
706
+ tntRCafficheRelais(tabRelais);
707
+ if (mapDetected) init_marker(tabRelais);
708
+ }
709
+
710
+ /*
711
+ * Fonction appellée en retour de la recherche des communes si aucune commune trouvée
712
+ */
713
+ function erreurListeCommunes() {
714
+ tntRCJsonCommunes = null;
715
+ tntRCgetRelaisColis(tntRCMsgErrLoadCommunes);
716
+ }
717
+
718
+ function erreurListeRelais() {
719
+ tntRCgetRelaisColis(tntRCMsgErrLoadRelais);
720
+ }
721
+
722
+
723
+ /************************************************************************************************
724
+ * Partie Google Map
725
+ ***********************************************************************************************/
726
+
727
+ var map;
728
+ var adresse_pointclic;
729
+ var zone_chalandise;
730
+ var zoomZoneChalandiseDefault;
731
+ var centerZoneChalandiseDefault;
732
+ var init_streetview = false;
733
+
734
+ var contentTo = [
735
+ '<br/><div>',
736
+ 'Itin&#233;raire : <b>Vers ce lieu</b> - <a href="javascript:fromhere(0)">A partir de ce lieu</a><br/>',
737
+ 'Lieu de d&#233;part<br/>',
738
+ '<input type="text" id="saisie" name="saisie" value="" maxlength="500" size="30">',
739
+ '<input type="hidden" id="mode" name="mode" value="toPoint">',
740
+ '<input type="hidden" id="point_choisi" name="point_choisi" value="">',
741
+ ' <input type="submit" class="bt" onclick="popup_roadmap();" value="OK">',
742
+ '<br/>Ex: 58 avenue Leclerc 69007 Lyon',
743
+ '</div>'].join('');
744
+
745
+ var contentFrom = [
746
+ '<br/><div>',
747
+ 'Itin&#233;raire : <a href="javascript:tohere(0)">Vers ce lieu</a> - <b>A partir de ce lieu</b><br/>',
748
+ 'Lieu d\'arriv&#233;e<br/>',
749
+ '<input type="text" id="saisie" name="saisie" value="" maxlength="500" size="30">',
750
+ '<input type="hidden" id="mode" name="mode" value="fromPoint">',
751
+ '<input type="hidden" id="point_choisi" name="point_choisi" value="">',
752
+ ' <input type="button" class="bt" onclick="popup_roadmap();" value="OK">',
753
+ '<br/>Ex: 58 avenue Leclerc 69007 Lyon',
754
+ '</div>'].join('');
755
+
756
+ var infowindow;
757
+
758
+ var relaisMarkers = [];
759
+ var iconRelais = new google.maps.MarkerImage(
760
+ "images/tnt/relaisColis/google/relaisColis.png",
761
+ new google.maps.Size(40, 30),
762
+ new google.maps.Point(0, 0),
763
+ new google.maps.Point(20, 30))
764
+
765
+ //Limites de la France
766
+ var allowedBounds = new google.maps.LatLngBounds(
767
+ new google.maps.LatLng(39.56533418570851, -7.41426946590909),
768
+ new google.maps.LatLng(52.88994181429149, 11.84176746590909));
769
+
770
+ var defaultCenter = new google.maps.LatLng(46.2276380, 2.2137490); // the center ???
771
+ var defaultZoom = 5; // default zoom level
772
+ var aberration = 0.2; // this value is a good choice for france (?!)
773
+ var minMapScale = 5;
774
+ //var maxMapScale = 20;
775
+
776
+ var mapDetected = false;
777
+ var callbackLinkMarker = "";
778
+
779
+ // fonction appellé après saisie du code postal de recherche
780
+ function init_marker(json) {
781
+
782
+ zone_chalandise = new google.maps.LatLngBounds();
783
+
784
+ for (var i = 0; i < relaisMarkers.length; i++) {
785
+ relaisMarkers[i].setMap(null);
786
+ relaisMarkers[i] = null;
787
+ }
788
+ relaisMarkers = new Array();
789
+
790
+ if (infowindow) infowindow.close();
791
+
792
+ var markers = json;
793
+
794
+ for (var i = 0; i < markers.length; i++) {
795
+ createMarker(markers[i], i);
796
+ }
797
+
798
+ zoomZoneChalandiseDefault = zone_chalandise.getCenter();
799
+ centerZoneChalandiseDefault = zone_chalandise;
800
+
801
+ retourZoomChalandise();
802
+ }
803
+
804
+ function setInfoMarker(codeRelais, nomRelais, adresse, codePostal, commune, messages, indice, horaires, marker) {
805
+
806
+ var htmlInfo = [
807
+ "<div>",
808
+ "<div class='rc'>",
809
+ "<b>RELAIS COLIS N° ", codeRelais, "</b><br/>",
810
+ "<b>", nomRelais, "</b><br/>",
811
+ adresse, "<br/>",
812
+ codePostal, " ", commune,
813
+ "</div>",
814
+ "<div><br/>", messages, "</div>",
815
+ callbackLinkMarker,
816
+ "</div>",
817
+ "<div id='trajet'>" + contentTo + "</div>"
818
+ ].join('');
819
+
820
+ // Création du contenu de l'onglet horaire
821
+ var htmlHoraires = "<table class='horairesRCPopup'>";
822
+ var jourSemaine = (new Date()).getDay();
823
+ for (jour in horaires) {
824
+ var heures = (horaires[jour]).split(",");
825
+ if (heures[0] == '' && heures[1] == '') heures[0] = "ferm&#233;";
826
+ htmlHoraires = htmlHoraires + "<tr" + (jourSemaine == parseInt(heures[2]) ? " class='selected'" : "") + "><td class='horairesRCJourPopup'>&nbsp;" + jour + "</td><td class='horaireRCPopup'>" + heures[0] + " " + heures[1] + "</td></tr>";
827
+ }
828
+ htmlHoraires = htmlHoraires + "</table>";
829
+
830
+ adresse_pointclic = [adresse, "|", codePostal, " ", commune].join('');
831
+
832
+ var contentString = [
833
+ '<div id="tabs" style="width:340px;">',
834
+ '<ul>',
835
+ '<li><a href="#tabInfos"><span>Infos</span></a></li>',
836
+ '<li><a href="#tabHoraires"><span>Horaires</span></a></li>',
837
+ '</ul>',
838
+ '<div id="tabInfos">',
839
+ htmlInfo,
840
+ '</div>',
841
+ '<div id="tabHoraires">',
842
+ htmlHoraires,
843
+ '</div>',
844
+ '</div>'
845
+ ].join('');
846
+
847
+ if (infowindow) infowindow.close();
848
+ infowindow = new google.maps.InfoWindow({content: contentString});
849
+
850
+ google.maps.event.addListener(infowindow, "domready", function() {
851
+ $("#point_choisi").attr("value", adresse_pointclic);
852
+ $("#tabs").tabs();
853
+ $("#tabs").parent().removeAttr("style");
854
+ });
855
+
856
+ infowindow.open(map, marker);
857
+ }
858
+
859
+ function createMarker(markerData, indice) {
860
+
861
+ var marker = new google.maps.Marker({
862
+ icon: iconRelais,
863
+ position: new google.maps.LatLng(markerData[5], markerData[6]),
864
+ map: map,
865
+ title:markerData[1]
866
+ });
867
+
868
+ google.maps.event.addListener(marker, "click", function() {
869
+ // Sélectionne le relais correspondant dans la liste
870
+ $("input[@type=radio][@name=tntRCchoixRelais]:eq("+ indice + ")").attr("checked", true);
871
+ tntRCSetSelectedInfo(indice);
872
+ });
873
+
874
+ relaisMarkers.push(marker);
875
+ zone_chalandise.extend(marker.getPosition());
876
+ }
877
+
878
+
879
+ function tntRCInitMap() {
880
+
881
+ // Si la carte n'est pas présente, fin de l'initialisation
882
+ if (!document.getElementById("map_canvas")) return;
883
+ mapDetected = true;
884
+
885
+ // Si une fonction de callback a été définie, un lien est ajouté
886
+ // dans la popup d'info du marqueur de relais colis
887
+ if (window.callbackSelectionRelais) callbackLinkMarker = "<a onclick='callbackSelectionRelais();' href='#' style='color:#FF6600'>Choisir ce relais</a>";
888
+
889
+ //Ajout du lien pour retour en zoom zone de chalandise
890
+ var jMapCanvas = $("#map_canvas");
891
+ jMapCanvas.wrap("<div></div>");
892
+ jMapCanvas.parent().append("<a class=\"lien_reset\" href=\"#\" onclick=\"javascript:retourZoomChalandise();\" style=\"text-decoration:none;\">Retour &agrave; la vue initiale</a>");
893
+
894
+ var mapClass = jMapCanvas.attr("class");
895
+ if (mapClass && mapClass != "") {
896
+ jMapCanvas.attr("class", "");
897
+ jMapCanvas.parent().attr("class", mapClass);
898
+ }
899
+
900
+ var myOptions = {
901
+ zoom: defaultZoom,
902
+ center: defaultCenter,
903
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
904
+ navigationControl: true,
905
+ scaleControl: true,
906
+ mapTypeControl: true,
907
+ streetViewControl: true
908
+ };
909
+
910
+ map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
911
+
912
+ // If the map position is out of range, move it back
913
+ function checkBounds() {
914
+
915
+ // Perform the check and return if OK
916
+ var currentBounds = map.getBounds();
917
+ var cSpan = currentBounds.toSpan(); // width and height of the bounds
918
+ var offsetX = cSpan.lng() / (2+aberration); // we need a little border
919
+ var offsetY = cSpan.lat() / (2+aberration);
920
+ var C = map.getCenter(); // current center coords
921
+ var X = C.lng();
922
+ var Y = C.lat();
923
+
924
+ // now check if the current rectangle in the allowed area
925
+ var checkSW = new google.maps.LatLng(C.lat()-offsetY,C.lng()-offsetX);
926
+ var checkNE = new google.maps.LatLng(C.lat()+offsetY,C.lng()+offsetX);
927
+
928
+ if (allowedBounds.contains(checkSW) &&
929
+ allowedBounds.contains(checkNE)) {
930
+ return; // nothing to do
931
+ }
932
+
933
+ var AmaxX = allowedBounds.getNorthEast().lng();
934
+ var AmaxY = allowedBounds.getNorthEast().lat();
935
+ var AminX = allowedBounds.getSouthWest().lng();
936
+ var AminY = allowedBounds.getSouthWest().lat();
937
+
938
+ if (X < (AminX+offsetX)) {X = AminX + offsetX;}
939
+ if (X > (AmaxX-offsetX)) {X = AmaxX - offsetX;}
940
+ if (Y < (AminY+offsetY)) {Y = AminY + offsetY;}
941
+ if (Y > (AmaxY-offsetY)) {Y = AmaxY - offsetY;}
942
+
943
+ map.setCenter(new google.maps.LatLng(Y,X));
944
+ return;
945
+ }
946
+
947
+ google.maps.event.addListener(map, "drag", function() {
948
+ checkBounds();
949
+ });
950
+
951
+ google.maps.event.addListener(map, "zoom_changed", function() {
952
+ if (map.getZoom() < minMapScale) {
953
+ map.setZoom(minMapScale);
954
+ }
955
+ });
956
+
957
+ google.maps.event.addListener(map.getStreetView(), "visible_changed", function() {
958
+ //premier accès lors du chargement de la page, il ne faut pas cacher les markers
959
+ if (init_streetview == true) {
960
+ if(map.getStreetView().getVisible() == true) {
961
+ for (var k = 0; k < relaisMarkers.length; k++) {
962
+ relaisMarkers[k].setVisible(false);
963
+ }
964
+ }
965
+ else {
966
+ for (var k = 0; k < relaisMarkers.length; k++) {
967
+ relaisMarkers[k].setVisible(true);
968
+ }
969
+ }
970
+ }
971
+ else init_streetview = true;
972
+ });
973
+ }
974
+
975
+ function retourZoomChalandise() {
976
+ if(zoomZoneChalandiseDefault){
977
+ map.setCenter(zoomZoneChalandiseDefault);
978
+ map.fitBounds(centerZoneChalandiseDefault);
979
+ }
980
+ }
981
+
982
+ function fromhere() {
983
+ switchFromTo(contentFrom);
984
+ }
985
+
986
+ function tohere() {
987
+ switchFromTo(contentTo);
988
+ }
989
+
990
+ function switchFromTo(htmlContent) {
991
+ var adresse_saisie = $("#saisie").val();
992
+ $("#trajet").html(htmlContent);
993
+ $("#point_choisi").attr('value', adresse_pointclic);
994
+ $("#saisie").val(adresse_saisie);
995
+ }
996
+
997
+ function popup_roadmap() {
998
+ if($("#saisie").val() == "") return;
999
+ window.open("http://" + tntDomain + "/public/geolocalisation/print_roadmap.do?mode="+ $("#mode").val() +"&point_choisi="+ $("#point_choisi").val() +"&saisie="+ $("#saisie").val());
1000
+ }
1001
+
1002
+ $().ready(tntB2CRelaisColis);
skin/frontend/default/default/js/tnt/suiviColis.js ADDED
@@ -0,0 +1,265 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** Javascript B2C Suivi Colis - version 2.0 - 06/07/2010 **/
2
+ var pathToImages = "images/tnt/relaisColis/";
3
+ var tntDomain = "www.tnt.fr";
4
+
5
+ var tntSCMsgHeaderTitle = "Suivi Colis";
6
+ var tntSCMsgSubHeaderTitle = "Suivez votre colis 24h sur 24 et 7 jours sur 7 :";
7
+ var tntSCMsgBodyLoading = "Chargement en cours...";
8
+ var tntSCMsgBodyInput1 = "Entrez votre r&#233;f&#233;rence d'exp&#233;dition :";
9
+ var tntSCMsgBodyInput2 = "Vous pouvez choisir une autre r&#233;f&#233;rence d'exp&#233;dition :";
10
+ var tntSCMsgBodyFldRef = "R&#233;f&#233;rence de l'exp&#233;dition :&#160;";
11
+ var tntSCMsgBodyFldDtl = "Date de livraison :&#160;";
12
+ var tntSCMsgBodyFldDst = "Destination :&#160;";
13
+ var tntSCMsgBodyFldSta = "Statut de votre exp&#233;dition :";
14
+ var tntSCMsgBodyFldRel = "Relais Colis<sup class='tntSCSup'>&#174;</sup> :";
15
+ var tntSCMsgFooterTitle = "Les solutions de livraisons <div class='tntSCTextBold'>TNT 24h chez Moi</div>&#160;et&#160;<div class='tntSCTextBold'>TNT 24h Relais Colis<sup class='tntSCSup'>&#174;</sup></div><BR>sont des offres exclusives TNT Express France.<BR><BR>Pour toute information: <a href='http://www.tnt.fr' class='tntSCTextBold'>www.tnt.fr</a>";
16
+ var tntSCMsgErrModulo = "Votre r&#233;f&#233;rence d'exp&#233;dition est invalide, veuillez v&#233;rifier votre saisie"
17
+ var tntSCMsgErrConnexion = "Erreur de connexion";
18
+ var tntSCMsgErrBtInvalide = tntSCMsgErrModulo;
19
+
20
+ function getURLParam(name) {
21
+ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
22
+ var regexS = "[\\?&]" + name + "=([^&#]*)";
23
+ var regex = new RegExp( regexS );
24
+ var results = regex.exec( window.location.href );
25
+ if( results == null ) return "";
26
+ else return results[1];
27
+ };
28
+
29
+ function getDivInput(lblInput, bonTransport) {
30
+ return ("<table>"+
31
+ "<tr>"+
32
+ "<td width='350px'>" + lblInput + "</td>"+
33
+ "<td width='160px'><input type='text' id='tntSCInputBT' class='tntSCInput' maxlength='16' size='16' value='" + bonTransport + "'/></td>"+
34
+ "<td><a href='#' onclick='tntB2CSuiviColisGetDetail();'><img class='tntSCButton' src='" + pathToImages + "bt-OK.jpg'></a></td>" +
35
+ "</tr>"+
36
+ "</table>");
37
+ };
38
+
39
+ function tntB2CSuiviColis() {
40
+
41
+ // Test si ID de r�f�rence existe, sinon on ne fait rien
42
+ if (!document.getElementById("tntB2CSuiviColis")) {
43
+ alert("ERREUR: Appel incorrect, objet [tntB2CSuiviColis] manquant !");
44
+ return;
45
+ }
46
+
47
+ var bonTransport = getURLParam("suivi");
48
+
49
+ var jBaseObj = $("#tntB2CSuiviColis");
50
+ jBaseObj.html(
51
+ "<div>"+
52
+ "<div id='tntBodySC' class='tntSCBody'>"+
53
+ "<div class='tntSCGray'>&#160;</div>"+
54
+ "<div id='tntBodyContentSC'>" + getDivInput(tntSCMsgBodyInput1, bonTransport) + "</div>"+
55
+ "<div id='tntSCLoading' style='display:none;'>" + tntSCMsgBodyLoading + "</div>"+
56
+ "<div id='tntSCError' class='tntSCError' style='display:none;'></div>"+
57
+ "</div>" +
58
+ "<div class='tntSCWhite'>&#160;</div>"+
59
+ "<div id='tntBodySearchSC' class='tntSCBodySearch' style='display:none;'>"+ getDivInput(tntSCMsgBodyInput2, "") + "</div>"+
60
+ "<div class='tntSCWhite'>&#160;</div>"+
61
+ "</div>"+
62
+ "<div>"+
63
+ "<div class='tntSCFooter'>"+
64
+ "<table>"+
65
+ "<tr>"+
66
+ "<td class='tntSCFooterCell1' width='495px'>" + tntSCMsgFooterTitle + "</td>"+
67
+ "<td class='tntSCFooterCell2' width='89px'>"+
68
+ "</td>"+
69
+ "</tr>"+
70
+ "</table>"+
71
+ "</div>"+
72
+ "</div>");
73
+
74
+ if (bonTransport != "") tntB2CSuiviColisGetDetail();
75
+ };
76
+
77
+ function tntB2CSuiviColisDisplayErreur(msgErreur) {
78
+
79
+ $('#tntSCLoading').hide();
80
+
81
+ var jBodySC = $("#tntBodySC");
82
+ jBodySC.css("background-image", "none");
83
+ jBodySC.css("height", "auto");
84
+
85
+ $("#tntBodySearchSC").hide();
86
+ var bonTransport = $("#tntSCInputBT").val();
87
+ var jBodyContentSC = $("#tntBodyContentSC");
88
+ jBodyContentSC.html(getDivInput(tntSCMsgBodyInput1, bonTransport));
89
+
90
+ // Gestion erreur et sortie
91
+ jErreurMsg = $("#tntSCError");
92
+ jErreurMsg.html(msgErreur);
93
+ jErreurMsg.show();
94
+
95
+ };
96
+
97
+ function tntB2CSuiviColisCheckModulo11(bonTransport) {
98
+ var tabModulo = new Array(16,14,12,10,8,6,4,2,3,5,7,9,11,13,15)
99
+ var tabBonTransport = bonTransport.toString().split("");
100
+ var modulo = 0;
101
+ for ( i = 0; i < 15; i++ ) {
102
+ modulo += Number(tabBonTransport[i]) * tabModulo[i];
103
+ }
104
+ modulo = 11 - (modulo % 11);
105
+ if (modulo == 10) modulo = 0;
106
+ if (modulo == 11) modulo = 5;
107
+ return (modulo == Number(tabBonTransport[15]));
108
+ };
109
+
110
+ function tntB2CSuiviColisGetDetail() {
111
+
112
+ $("#tntSCError").hide();
113
+
114
+ var bonTransport = $("#tntSCInputBT").val();
115
+
116
+ if (bonTransport == "") return;
117
+
118
+ // Verification basique de la validit� du num�ro saisi
119
+ if (isNaN(parseInt(bonTransport)) || bonTransport.length != 16 || !tntB2CSuiviColisCheckModulo11(bonTransport)) {
120
+ tntB2CSuiviColisDisplayErreur(tntSCMsgErrModulo);
121
+ return;
122
+ }
123
+
124
+ $('#tntSCLoading').show();
125
+
126
+ var ajaxUrl;
127
+ var ajaxData;
128
+
129
+ //ajaxUrl = "http://" + tntDomain + "/public/b2c/suiviColis/rechercheJson.do?bonTransport=" + bonTransport;
130
+ ajaxUrl = "tnt_suiviColis.php?bonTransport=" + bonTransport;
131
+ ajaxData = "";
132
+
133
+ // Chargement du colis
134
+ $.ajax({
135
+ type: "GET",
136
+ url: ajaxUrl,
137
+ data: ajaxData,
138
+ dataType: "script",
139
+ success:function(json){}
140
+ });
141
+ };
142
+
143
+ function tntB2CSuiviColisDisplayDetail(jsondoc) {
144
+
145
+ $('#tntSCLoading').hide();
146
+
147
+ $("#tntBodySearchSC").show();
148
+ var jBodySC = $("#tntBodySC");
149
+
150
+ var bonTransport = jsondoc[0];
151
+ var dateLivraison = jsondoc[3];
152
+ var destination = jsondoc[2];
153
+ var messages = "";
154
+ var nomRelais = "";
155
+ var adrRelais = "";
156
+ var cpoRelais = "";
157
+ var vilRelais = "";
158
+ var refRelais = "";
159
+ var status = jsondoc[5][0];
160
+ var etape = jsondoc[7];
161
+
162
+ if(jsondoc[6].length != 0){
163
+ var nomRelais = jsondoc[6][0];
164
+ var adrRelais = jsondoc[6][1];
165
+ var cpoRelais = jsondoc[6][2];
166
+ var vilRelais = jsondoc[6][3];
167
+ var refRelais = jsondoc[6][4];
168
+ }
169
+
170
+ var affRefRelais = "";
171
+ if(refRelais != ""){
172
+ var urlGeo = "http://" + tntDomain + "/public/geolocalisation/index.do?xett=" + refRelais;
173
+ affRefRelais = "<a href =" +urlGeo+" target='_blank'><img src='" + pathToImages + "picto_localiser.jpg' alt='*' border = 'none' height='41px' width='58px'/></a>";
174
+ }
175
+
176
+ for (i = 0; i < jsondoc[5].length; i++){
177
+ if (messages == "") messages = jsondoc[5][i];
178
+ else messages += "<br/>" + jsondoc[5][i];
179
+ }
180
+
181
+ var titreRelais = "";
182
+ if (nomRelais != "" || adrRelais != "" || cpoRelais != "" || vilRelais != "") titreRelais = tntSCMsgBodyFldRel;
183
+
184
+ var jBodyContentSC = $("#tntBodyContentSC");
185
+
186
+ jBodyContentSC.html("<div style='width:482px;margin: auto;'><div id='myEtape'></div></div>");
187
+
188
+ jBodyContentSC.append("<table border='0' cellpadding='0' cellspacing='0' align='center' class='tb_suivi'>"+
189
+ "<tbody>"+
190
+ "<tr>"+
191
+ "<td width='10px'/>"+
192
+ "<td width='100px' />"+
193
+ "<td width='135px' />"+
194
+ "<td width='75px' />"+
195
+ "<td width='150px' />"+
196
+ "<td width='10px' />"+
197
+ "</tr>"+
198
+ "<tr>"+
199
+ "<td class='section' height='25'>&nbsp;</td>"+
200
+ "<td class='section' colspan='5' style='padding-left: 10px;'><b>D&#233;tail du colis</b></td>"+
201
+ "</tr>"+
202
+ "<tr><td colspan='6' height='2px'></td></tr>"+
203
+ "<tr>"+
204
+ "<td width='10px'></td>"+
205
+ "<td width='100px'><b>Bon de transport</b></td>"+
206
+ "<td width='135px' id='ancestor'>" + bonTransport + "</td>"+
207
+ "<td width='75px' style='color:#FF6600;'><b>Statut colis</b></td>"+
208
+ "<td width='150px' style='color:#FF6600;'>" + status + "</td>"+
209
+ "<td width='10px'></td>"+
210
+ "</tr>"+
211
+ "<tr><td colspan='6' height='1px'></td></tr>"+
212
+ "<tr>"+
213
+ "<td width='10px'>&nbsp;</td>"+
214
+ "<td width='100px'><b>Destination</b></td>"+
215
+ "<td width='135px'>" + destination + "</td>"+
216
+ "<td width='75px'></td>"+
217
+ "<td width='150px'></td>"+
218
+ "<td width='10px'>&nbsp;</td>"+
219
+ "</tr>"+
220
+ "<tr><td colspan='6' height='2px'></td></tr>"+
221
+ "<tr><td colspan='6' height='3px'></td></tr>"+
222
+ "<tr><td colspan='6' height='1px' bgcolor='#cbcbcb'></td></tr>"+
223
+ "<tr><td colspan='6' height='3px'></td></tr>"+
224
+ "<tr><td colspan='6' height='6px'></td></tr>"+
225
+ "<tr>"+
226
+ "<td>&nbsp;</td>"+
227
+ "<td colspan='5' valign='top'>"+
228
+ "<b>Statut de votre exp&#233;dition :</b>"+
229
+ "</td>"+
230
+ "</tr>"+
231
+ "<tr>"+
232
+ "<td>&nbsp;</td>"+
233
+ "<td colspan='5' valign='top' style='padding-left: 10px;' class='orange'>" + messages + "</td>"+
234
+ "</tr>"+
235
+ "<tr><td colspan='6' height='6px'></td></tr>"+
236
+ "<tr>"+
237
+ "<td>&nbsp;</td>"+
238
+ "<td colspan='5' valign='top'>"+
239
+ "<b>" + titreRelais + "</b>"+
240
+ "</td>"+
241
+ "</tr>"+
242
+ "<tr>"+
243
+ "<td>&nbsp;</td>"+
244
+ "<td colspan='3' valign='top' style='padding-left: 10px;' class='orange'>" + nomRelais +" "+ refRelais + "<br/>" + adrRelais + "<br/>" + cpoRelais + "&#160;" + vilRelais + "</td>"+
245
+ "<td colspan='2' valign='middle'>" + affRefRelais + "</td>"+
246
+ "</tr>"+
247
+ "<tr><td colspan='6' height='6px'></td></tr>"+
248
+ "</tbody>"+
249
+ "</table>");
250
+
251
+ createEtape(etape);
252
+
253
+ // RAZ zone de saisie
254
+ $("#tntSCInputBT").val("");
255
+ };
256
+
257
+ function erreurColis(codeErreur){
258
+ switch (codeErreur) {
259
+ case 1: tntB2CSuiviColisDisplayErreur(tntSCMsgErrConnexion); break;
260
+ case 2: tntB2CSuiviColisDisplayErreur(tntSCMsgErrBtInvalide); break;
261
+ default: tntB2CSuiviColisDisplayErreur(tntSCMsgErrBtInvalide); break;
262
+ }
263
+ }
264
+
265
+ $().ready(tntB2CSuiviColis);
skin/frontend/default/default/js/tnt/swfobject.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /* SWFObject v2.2 <http://code.google.com/p/swfobject/>
2
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
3
+ */
4
+ var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
skin/frontend/default/default/js/tnt/tnt.js CHANGED
@@ -12,10 +12,18 @@ function moreinfos(infos) {
12
 
13
  function radioCheck(){
14
  if ($('s_method_tnt_JD') && $("s_method_tnt_JD").checked){
15
- $("tnt_pr").show();
16
  $("tnt_cp").hide();
17
- } else {
 
 
 
 
 
18
  if($("tnt_pr")) { $("tnt_pr").hide(); }
 
 
 
19
 
20
  fetchVille($("city_url").value, 'villes');
21
  $("tnt_cp").show();
@@ -32,7 +40,7 @@ function radioCheck(){
32
  }
33
 
34
  function fetchPoint(url,area){
35
- var zipcode = escape($("relais_zipcode").value);
36
  new Ajax.Request(url,{
37
  method:'post',
38
  parameters:{zipcode:zipcode},
@@ -49,14 +57,14 @@ function fetchPoint(url,area){
49
  }
50
 
51
  function fetchVille(url,area){
52
- var address = escape($("address").value);
53
  var zipcode = escape($("zipcode").value);
54
  var city = escape($("city").value);
55
  var company = escape($("company").value);
56
 
57
  new Ajax.Request(url,{
58
  method:'post',
59
- parameters:{address:address,zipcode:zipcode,city:city,company:company},
60
  onLoading:function(){
61
  $("loadingvilleswait").show();
62
  },
@@ -70,38 +78,24 @@ function fetchVille(url,area){
70
  }
71
 
72
  function shippingMethodTnt(url){
 
 
 
 
 
73
 
74
- if($("s_method_tnt_JD") && $("s_method_tnt_JD").checked){
75
- var radioGrp = document['forms']['co-shipping-method-form']['tnt_relais'];
76
- if (radioGrp){
77
- for(i=0; i < radioGrp.length; i++){
78
- if (radioGrp[i].checked == true) {
79
- var radioValue = radioGrp[i].value;
80
- }
81
- }
82
- }
83
 
84
- var shippingstring = new Array();
85
  if(radioValue){
86
  shippingstring=radioValue.split("&&&");
87
  }
88
  else {
89
- alert ("Vous devez choisir une adresse de livraison");
90
  return false;
91
  }
92
-
93
- var street = shippingstring[0];
94
- var description = shippingstring[1];
95
- var postcode = shippingstring[2];
96
- var city = shippingstring[3];
97
- new Ajax.Request(url,{
98
- method:'post',
99
- parameters:{street:street,description:description,postcode:postcode,city:city}
100
- });
101
-
102
- }
103
-
104
- if( ($("s_method_tnt_AZ") && $("s_method_tnt_AZ").checked)
105
  || ($("s_method_tnt_TZ") && $("s_method_tnt_TZ").checked)
106
  || ($("s_method_tnt_MZ") && $("s_method_tnt_MZ").checked)
107
  || ($("s_method_tnt_JZ") && $("s_method_tnt_JZ").checked)
@@ -123,7 +117,6 @@ function shippingMethodTnt(url){
123
  var radioValue = $("tnt_ville1").value;
124
  }
125
 
126
- var shippingstring = new Array();
127
  if(radioValue){
128
  shippingstring=radioValue.split("&&&");
129
  }
@@ -132,15 +125,33 @@ function shippingMethodTnt(url){
132
  return false;
133
  }
134
 
135
- var info_comp = '';
136
  if($("s_method_tnt_JZ") && $("s_method_tnt_JZ").checked) {
 
 
 
 
 
 
 
 
 
 
 
 
137
  info_comp = $("portable").value+"&&&"+$("code").value+"&&&"+$("etage").value+"&&&"+$("batiment").value;
138
  }
139
  if($("s_method_tnt_J") && $("s_method_tnt_J").checked) {
140
  info_comp = $("compl").value;
141
- }
142
-
143
- var street = shippingstring[0];
 
 
 
 
 
 
 
144
  var description = shippingstring[1];
145
  var postcode = shippingstring[2];
146
  var city = shippingstring[3];
@@ -150,6 +161,9 @@ function shippingMethodTnt(url){
150
  });
151
  }
152
 
 
 
 
153
  shippingMethod.save();
154
  }
155
 
12
 
13
  function radioCheck(){
14
  if ($('s_method_tnt_JD') && $("s_method_tnt_JD").checked){
15
+
16
  $("tnt_cp").hide();
17
+ $("tnt_relais1").value = '';
18
+ jQuery('#openRelais').click();
19
+ $("tnt_pr").show();
20
+ $("tnt_pr_choix").hide();
21
+
22
+ } else {
23
  if($("tnt_pr")) { $("tnt_pr").hide(); }
24
+ $("tnt_relais1").value = '';
25
+ $("tnt_pr_choix").innerHTML = '';
26
+ $("tnt_pr_choix").hide();
27
 
28
  fetchVille($("city_url").value, 'villes');
29
  $("tnt_cp").show();
40
  }
41
 
42
  function fetchPoint(url,area){
43
+ var zipcode = escape($("relais_zipcode").value);
44
  new Ajax.Request(url,{
45
  method:'post',
46
  parameters:{zipcode:zipcode},
57
  }
58
 
59
  function fetchVille(url,area){
60
+ var street = escape($("street").value);
61
  var zipcode = escape($("zipcode").value);
62
  var city = escape($("city").value);
63
  var company = escape($("company").value);
64
 
65
  new Ajax.Request(url,{
66
  method:'post',
67
+ parameters:{street:street,zipcode:zipcode,city:city,company:company},
68
  onLoading:function(){
69
  $("loadingvilleswait").show();
70
  },
78
  }
79
 
80
  function shippingMethodTnt(url){
81
+
82
+ var shippingstring = new Array();
83
+ var info_comp = '';
84
+
85
+ if($("s_method_tnt_JD") && $("s_method_tnt_JD").checked){
86
 
87
+ if( $("tnt_relais1").value != '' ) {
88
+ var radioValue = $("tnt_relais1").value;
89
+ }
 
 
 
 
 
 
90
 
 
91
  if(radioValue){
92
  shippingstring=radioValue.split("&&&");
93
  }
94
  else {
95
+ alert ("Vous devez choisir un Relais Colis®");
96
  return false;
97
  }
98
+ } else if( ($("s_method_tnt_AZ") && $("s_method_tnt_AZ").checked)
 
 
 
 
 
 
 
 
 
 
 
 
99
  || ($("s_method_tnt_TZ") && $("s_method_tnt_TZ").checked)
100
  || ($("s_method_tnt_MZ") && $("s_method_tnt_MZ").checked)
101
  || ($("s_method_tnt_JZ") && $("s_method_tnt_JZ").checked)
117
  var radioValue = $("tnt_ville1").value;
118
  }
119
 
 
120
  if(radioValue){
121
  shippingstring=radioValue.split("&&&");
122
  }
125
  return false;
126
  }
127
 
 
128
  if($("s_method_tnt_JZ") && $("s_method_tnt_JZ").checked) {
129
+
130
+ if( $("portable").value != '' ) {
131
+ var regex = new RegExp(/^(06|07|08)[0-9]{8}/gi);
132
+
133
+ if(regex.test($("portable").value)) {
134
+ }
135
+ else {
136
+ alert("Vérifiez le numéro de téléphone portable");
137
+ return false;
138
+ }
139
+ }
140
+
141
  info_comp = $("portable").value+"&&&"+$("code").value+"&&&"+$("etage").value+"&&&"+$("batiment").value;
142
  }
143
  if($("s_method_tnt_J") && $("s_method_tnt_J").checked) {
144
  info_comp = $("compl").value;
145
+ }
146
+ } else {
147
+ shippingstring[0] = $("street").value;
148
+ shippingstring[1] = $("company").value;
149
+ shippingstring[2] = $("zipcode").value;
150
+ shippingstring[3] = $("city").value;
151
+ }
152
+
153
+ if( shippingstring.length != 0 ) {
154
+ var street = shippingstring[0];
155
  var description = shippingstring[1];
156
  var postcode = shippingstring[2];
157
  var city = shippingstring[3];
161
  });
162
  }
163
 
164
+ $("tnt_pr_choix").innerHTML = '';
165
+ $("tnt_pr_choix").hide();
166
+
167
  shippingMethod.save();
168
  }
169
 
skin/frontend/default/default/tnt_relaisColis.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <title>Relais Colis</title>
6
+
7
+ <link rel="stylesheet" href="css/tnt/ui.tabs.css" type="text/css" />
8
+ <link rel="stylesheet" href="css/tnt/ui.dialog.css" type="text/css" />
9
+ <link rel="stylesheet" href="css/tnt/tntB2CRelaisColis.css" type="text/css" />
10
+ </head>
11
+
12
+ <body>
13
+ <?php if( isset($_GET['cp']) ) {
14
+ $cp_origin = $_GET['cp'];
15
+ } else {
16
+ $cp_origin = '';
17
+ } ?>
18
+
19
+ <input type="hidden" id="cp_origin" name="cp_origin" value="<?php echo $cp_origin; ?>" />
20
+
21
+ <!-- Element (obligatoire) à définir pour afficher la liste de relais -->
22
+ <div id="tntB2CRelaisColis" class="exemplePresentation"></div>
23
+
24
+ <div id="promoRelaisColis">
25
+ <div class="logo"><div class="image"><img src="images/tnt/relaisColis/logo_24_relaiscolis.jpg" width="130"></div><div class="desc">Votre colis est livré le lendemain matin de son expédition dans le Relais Colis<sup class='tntRCSup'>&#174;</sup> sélectionné.</div></div>
26
+ <div class="description">Avec 4000 Relais Colis<sup class='tntRCSup'>&#174;</sup> 85% de la population française est située à moins de 5 km d'un commerçant Relais Colis<sup class='tntRCSup'>&#174;</sup>.</div>
27
+ </div>
28
+
29
+ <!-- Element (optionel) à définir pour afficher une Google Map associée à la liste de relais
30
+ Note: les propriétés de css "width" et "height" doivent obligatoirement être définis dans
31
+ l'attribut "style", sinon la carte ne s'affichera pas
32
+ -->
33
+ <div id="map_canvas" class="exemplePresentation" style="width: 482px; height: 482px"></div>
34
+
35
+ <script type="text/javascript" src="js/tnt/jquery.js"></script>
36
+ <script type="text/javascript" src="js/tnt/jquery-ui.js"></script>
37
+ <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
38
+
39
+ <?php if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
40
+ if (intval(substr($_SERVER['HTTP_USER_AGENT'], strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')+5)) <= 8) { ?>
41
+ <script type="text/javascript" src="js/tnt/relaisColisIE7.js"></script>
42
+ <?php } else { ?>
43
+ <script type="text/javascript" src="js/tnt/relaisColis.js"></script>
44
+ <?php }
45
+ } else { ?>
46
+ <script type="text/javascript" src="js/tnt/relaisColis.js"></script>
47
+ <?php } ?>
48
+
49
+ <script type="text/javascript" src="js/tnt/jquery.superbox.js"></script>
50
+
51
+ </body>
52
+ </html>
skin/frontend/default/default/tnt_suiviColis.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function suivi_colis($suivi) {
3
+ $url = "http://www.tnt.fr/service/tracking?wsdl";
4
+
5
+ $username = '';
6
+ $password = '';
7
+
8
+ $authheader = sprintf('
9
+ <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
10
+ <wsse:UsernameToken>
11
+ <wsse:Username>%s</wsse:Username>
12
+ <wsse:Password>%s</wsse:Password>
13
+ </wsse:UsernameToken>
14
+ </wsse:Security>', htmlspecialchars($username), htmlspecialchars( $password ));
15
+
16
+ $authvars = new SoapVar($authheader, XSD_ANYXML);
17
+ $header = new SoapHeader("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Security", $authvars);
18
+
19
+ $soap = new SoapClient($url, array('trace'=>1));
20
+ $soap->__setSOAPHeaders(array($header));
21
+
22
+ try {
23
+ $result = $soap->trackingByConsignment( array('parcelNumber' => $suivi) );
24
+ $etape = getStage($result);
25
+
26
+ if( is_array($result->Parcel->longStatus) ) {
27
+ $statut = $result->Parcel->longStatus[0];
28
+ $message = $result->Parcel->longStatus[1];
29
+ } else {
30
+ $statut = $result->Parcel->longStatus;
31
+ $message = '';
32
+ }
33
+
34
+ $result = 'tntB2CSuiviColisDisplayDetail(["'.$result->Parcel->consignmentNumber.'","'.$result->Parcel->reference.'","'.$result->Parcel->receiver->city.'","","",["'.$statut.'","'.$message.'"],[],"'.$etape.'"])';
35
+ } catch (Exception $e) {
36
+ $result = $e->getMessage();
37
+ }
38
+
39
+ return $result;
40
+ }
41
+
42
+ function getStage( $info ) {
43
+ $tntEndStatusCode = array( '000', '410', '515', '517', '529', '549', '552', '557', '560', '626', '700', '701', '702', '703', '704', '998', '999', 'R', 'Z', '2' );
44
+ $tntIncidentStatusCode = array( '110', '113', '121', '124', '131', '132', '200', '210', '211', '212', '213', '215', '216', '217', '218', '300', '310', '311', '312', '313', '314', '315', '316', '317', '318', '319', '320', '321', '322', '323', '324', '325', '326', '327', '328', '412', '414', '415', '500', '561', '600', '610', '611', '612', '613', '614', '615', '616', '617', '618', '619', '620', '621', '622', '623', '624', '625', '634', '820', '821', '822', '823', '824', '833', 'A', 'C', 'F', 'G', 'I', 'K', '3', '5' );
45
+
46
+ if ( !empty( $info->Parcel->statusCode ) )
47
+ {
48
+ if ( in_array( $info->Parcel->statusCode, $tntIncidentStatusCode ) )
49
+ {
50
+ return 4;
51
+ }
52
+ if ( in_array( $info->Parcel->statusCode, $tntEndStatusCode ) )
53
+ {
54
+ return 5;
55
+ }
56
+ }
57
+ if ( !empty( $info->Parcel->events->arrivalDate ) )
58
+ {
59
+ return 3;
60
+ }
61
+ if ( !empty( $info->Parcel->processDate ) )
62
+ {
63
+ return 2;
64
+ }
65
+ return 0;
66
+ }
67
+
68
+ if( isset($_GET) && $_GET['bonTransport'] != '' ) {
69
+ $result = suivi_colis($_GET['bonTransport']);
70
+ echo $result;
71
+ exit;
72
+ }
73
+ ?>
74
+
75
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
76
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
77
+ <head>
78
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
79
+ <title>Suivi Colis</title>
80
+
81
+ <link rel="stylesheet" href="css/tnt/tntB2CSuiviColis.css" type="text/css" />
82
+ </head>
83
+ <body>
84
+ <?php if( isset($_GET['suivi']) ) {
85
+ $suivi = $_GET['suivi'];
86
+ } else {
87
+ $suivi = '';
88
+ } ?>
89
+ <input type="hidden" id="suivi" name="suivi" value="<?php echo $suivi; ?>" />
90
+ <div id="tntB2CSuiviColis"></div>
91
+
92
+ <script type="text/javascript" src="js/tnt/jquery.js"></script>
93
+ <script type="text/javascript" src="js/tnt/swfobject.js"></script>
94
+ <script type="text/javascript" src="js/tnt/suiviColis.js"></script>
95
+ <script type="text/javascript">
96
+ function createEtape(etape) {
97
+ swfobject.embedSWF("images/tnt/swf/banniere_TNT_"+etape+".swf", "myEtape", "482", "159", "9.0.0");
98
+ }
99
+ </script>
100
+ </body>
101
+ </html>