diff --git a/htdocs/langs/en_US/paypal.lang b/htdocs/langs/en_US/paypal.lang
index 5adf942e20595098941468328ffd8118de21aec2..51fc27715bb25c3d25d2275aebade6faa1fac69b 100644
--- a/htdocs/langs/en_US/paypal.lang
+++ b/htdocs/langs/en_US/paypal.lang
@@ -11,4 +11,22 @@ PAYPAL_API_PASSWORD=API password
 PAYPAL_API_SIGNATURE=API signature
 PAYPAL_API_INTEGRAL_OR_PAYPALONLY=Offer payment "integral" (Credit card+Paypal) or "Paypal" only
 PAYPAL_CSS_URL=Optionnal Url of CSS style sheet on payment page
-ThisIsTransactionId=This is id of transaction: <b>%s</b>
\ No newline at end of file
+ThisIsTransactionId=This is id of transaction: <b>%s</b>
+PaypalTransactionDesc=This options allows you to import Paypal payments in Dolibarr as orders, invoices, etc ...
+PaypalEnableThisTool=Enable this functionnality
+
+# Paypal transaction fields
+PAYERID=
+PAYERSTATUS=
+ADDRESSSTATUS=
+TRANSACTIONID=
+TRANSACTIONTYPE=
+PAYMENTTYPE=
+AMT=
+FEEAMT=
+TAXAMT=
+PAYMENTSTATUS=
+PENDINGREASON=
+REASONCODE=
+SHIPPINGMETHOD=
+PROTECTIONELIGIBILITY=
diff --git a/htdocs/langs/fr_FR/paypal.lang b/htdocs/langs/fr_FR/paypal.lang
index 894deac480f142e1040fae725a38c452a19d67de..e73b7090e1078e106b4bfa2fceab95c4966a9494 100644
--- a/htdocs/langs/fr_FR/paypal.lang
+++ b/htdocs/langs/fr_FR/paypal.lang
@@ -11,4 +11,22 @@ PAYPAL_API_PASSWORD=Mot de passe utilisateur API
 PAYPAL_API_SIGNATURE=Signature API
 PAYPAL_API_INTEGRAL_OR_PAYPALONLY=Proposer le paiement intégral (Carte+Paypal) ou Paypal seul
 PAYPAL_CSS_URL=Url optionnelle de la feuille de style CSS de la page de paiement
-ThisIsTransactionId=Voici l'identifiant de la transaction: <b>%s</b> 
\ No newline at end of file
+ThisIsTransactionId=Voici l'identifiant de la transaction: <b>%s</b> 
+PaypalTransactionDesc=Ces options permettent d'importer des paiements Paypal dans Dolibarr en tant que commandes, factures, etc...
+PaypalEnableThisTool=Activer ces fonctionnalités
+
+# Paypal transaction fields
+PAYERID=
+PAYERSTATUS=
+ADDRESSSTATUS=
+TRANSACTIONID=
+TRANSACTIONTYPE=
+PAYMENTTYPE=
+AMT=
+FEEAMT=
+TAXAMT=
+PAYMENTSTATUS=
+PENDINGREASON=
+REASONCODE=
+SHIPPINGMETHOD=
+PROTECTIONELIGIBILITY=
diff --git a/htdocs/lib/ajax.lib.php b/htdocs/lib/ajax.lib.php
index 37b2e0b032db5100e832700b85079d9265660039..451427979bee91e95779c880f9feaac377acbd54 100644
--- a/htdocs/lib/ajax.lib.php
+++ b/htdocs/lib/ajax.lib.php
@@ -246,8 +246,8 @@ function ajax_constantonoff($code)
 		});
 	</script>';
 	
-	$out.= '<div id="set_'.$code.'" class="linkobject '.($conf->global->$code?'hideobject':'').'">'.img_picto($langs->trans("Disabled"),'off').'</div>';
-	$out.= '<div id="del_'.$code.'" class="linkobject '.($conf->global->$code?'':'hideobject').'">'.img_picto($langs->trans("Enabled"),'on').'</div>';
+	$out.= '<span id="set_'.$code.'" class="linkobject '.($conf->global->$code?'hideobject':'').'">'.img_picto($langs->trans("Disabled"),'switch_off').'</span>';
+	$out.= '<span id="del_'.$code.'" class="linkobject '.($conf->global->$code?'':'hideobject').'">'.img_picto($langs->trans("Enabled"),'switch_on').'</span>';
 	
 	return $out;
 }
diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php
index ea5708ee719d9e8aea72a03d9dccfe8cd14d129e..b6e76c5ee9a7e2cca85ddb55a37e6f2959c4c76f 100644
--- a/htdocs/lib/functions.lib.php
+++ b/htdocs/lib/functions.lib.php
@@ -2478,7 +2478,7 @@ function load_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath
 
     $return.= "\n";
     $return.= '<table '.($id?'id="'.$id.'" ':'').'summary="" width="100%" border="0" class="notopnoleftnoright" style="margin-bottom: 2px;"><tr>';
-    if (empty($conf->browser->phone) && $picto && $titre) $return.= '<td class="nobordernopadding" width="40" align="left" valign="middle">'.img_picto('',$picto, 'id="pictotitle"', $pictoisfullpath).'</td>';
+    if (empty($conf->browser->phone) && $picto) $return.= '<td class="nobordernopadding" width="40" align="left" valign="middle">'.img_picto('',$picto, 'id="pictotitle"', $pictoisfullpath).'</td>';
     $return.= '<td class="nobordernopadding" valign="middle">';
     $return.= '<div class="titre">'.$titre.'</div>';
     $return.= '</td>';
diff --git a/htdocs/paypal/admin/import.php b/htdocs/paypal/admin/import.php
new file mode 100755
index 0000000000000000000000000000000000000000..c7edcba320cb69f0b4612005fc7d67b1e883e165
--- /dev/null
+++ b/htdocs/paypal/admin/import.php
@@ -0,0 +1,128 @@
+<?php
+/* Copyright (C) 2011 Regis Houssin  <regis@dolibarr.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ *	    \file       htdocs/paypal/admin/import.php
+ *      \ingroup    paypal
+ *      \brief      Setup page for paypal module
+ *		\version    $Id$
+ */
+
+require("../../main.inc.php");
+require_once(DOL_DOCUMENT_ROOT."/paypal/lib/paypal.lib.php");
+require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
+
+if (!$user->admin)
+    accessforbidden();
+
+$langs->load("paypal");
+$langs->load("admin");
+
+
+/*
+ * Actions
+ */
+if (preg_match('/set_(.*)/',$action,$reg))
+{
+    $code=$reg[1];
+    if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0)
+    {
+        Header("Location: ".$_SERVER["PHP_SELF"]);
+        exit;
+    }
+    else
+    {
+        dol_print_error($db);
+    }
+}
+
+if (preg_match('/del_(.*)/',$action,$reg))
+{
+    $code=$reg[1];
+    if (dolibarr_del_const($db, $code, $conf->entity) > 0)
+    {
+        Header("Location: ".$_SERVER["PHP_SELF"]);
+        exit;
+    }
+    else
+    {
+        dol_print_error($db);
+    }
+}
+
+
+/*
+ * View
+ */
+
+
+$form=new Form($db);
+
+llxHeader('',$langs->trans("PaypalSetup"));
+
+
+$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
+print_fiche_titre(' - '.$langs->trans("ModuleSetup"),$linkback,'paypal_logo@paypal');
+print '<br />';
+
+$head=paypaladmin_prepare_head();
+
+dol_fiche_head($head, 'import', $langs->trans("ModuleSetup"));
+
+
+print '<table class="nobordernopadding" width="100%"><tr>';
+
+print '<td>'.$langs->trans("PaypalTransactionDesc").'</td>';
+
+print '<td align="right">'."\n";
+if ($conf->use_javascript_ajax)
+{
+	print ajax_constantonoff('PAYPAL_ENABLE_TRANSACTION_MANAGEMENT');
+}
+else
+{
+	if($conf->global->PAYPAL_ENABLE_TRANSACTION_MANAGEMENT == 0)
+	{
+		print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_PAYPAL_ENABLE_TRANSACTION_MANAGEMENT">'.img_picto($langs->trans("Disabled"),'off').'</a>';
+	}
+	else if($conf->global->PAYPAL_ENABLE_TRANSACTION_MANAGEMENT == 1)
+	{
+		print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_PAYPAL_ENABLE_TRANSACTION_MANAGEMENT">'.img_picto($langs->trans("Enabled"),'on').'</a>';
+	}
+}
+print '</td></tr>';
+print '</table>';
+
+print '<br />';
+
+print '<table class="nobordernopadding" width="100%">';
+
+$var=true;
+print '<table class="noborder" width="100%">';
+print '<tr class="liste_titre">';
+print '<td>'.$langs->trans("Parameters").'</td>'."\n";
+print '<td align="center" width="20">&nbsp;</td>';
+print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n";
+print '</tr>';
+
+print '</table>';
+
+$db->close();
+
+llxFooter('$Date$ - $Revision$');
+?>
diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php
index 796312809cb37e7b9dab82143fe3eb24108a2870..333d7f52eb7ad7ca77fab46c9d2421082c17c5e0 100644
--- a/htdocs/paypal/admin/paypal.php
+++ b/htdocs/paypal/admin/paypal.php
@@ -25,6 +25,7 @@
  */
 
 require("../../main.inc.php");
+require_once(DOL_DOCUMENT_ROOT."/paypal/lib/paypal.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/security.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
@@ -71,11 +72,16 @@ if ($_POST["action"] == 'setvalue' && $user->admin)
 
 $form=new Form($db);
 
-llxHeader();
+llxHeader('',$langs->trans("PaypalSetup"));
 
 
 $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
-print_fiche_titre($langs->trans("PaypalSetup"),$linkback,'setup');
+print_fiche_titre(' - '.$langs->trans("ModuleSetup"),$linkback,'paypal_logo@paypal');
+print '<br />';
+
+$head=paypaladmin_prepare_head();
+
+dol_fiche_head($head, 'paypalaccount', $langs->trans("ModuleSetup"));
 
 print $langs->trans("PaypalDesc")."<br>\n";
 
diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php
index 960ae99f329bc2b8d4d9e829c02a463d7ed30efa..8a88359fd46c15ced27dc6ea8ad82c0bb4bb0dc7 100755
--- a/htdocs/paypal/lib/paypal.lib.php
+++ b/htdocs/paypal/lib/paypal.lib.php
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (C) 2008-2010 Laurent Destailleur  <eldy@users.sourceforge.net>
- * Copyright (C) 2005-2007 Regis Houssin        <regis@dolibarr.fr>
+ * Copyright (C) 2011      Regis Houssin        <regis@dolibarr.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -59,8 +59,6 @@ function llxFooterPaypal()
 	print "</html>\n";
 }
 
-
-
 /**
  * Show footer of company in HTML pages
  *
@@ -127,7 +125,29 @@ function html_print_paypal_footer($fromcompany,$langs)
 	print '</font></center>'."\n";
 }
 
+/**
+ *  Define head array for tabs of paypal tools setup pages
+ *  @return			Array of head
+ */
+function paypaladmin_prepare_head()
+{
+	global $langs;
+	
+	$h = 0;
+	$head = array();
+
+	$head[$h][0] = DOL_URL_ROOT."/paypal/admin/paypal.php";
+	$head[$h][1] = $langs->trans("Account");
+	$head[$h][2] = 'paypalaccount';
+	$h++;
 
+    $head[$h][0] = DOL_URL_ROOT."/paypal/admin/import.php";
+    $head[$h][1] = $langs->trans("Import");
+    $head[$h][2] = 'import';
+    $h++;
+
+    return $head;
+}
 
 
 /**
diff --git a/htdocs/theme/auguria/img/switch_off.png b/htdocs/theme/auguria/img/switch_off.png
new file mode 100644
index 0000000000000000000000000000000000000000..7b691df7ebece2e9107776615dabe5b25b4daac7
Binary files /dev/null and b/htdocs/theme/auguria/img/switch_off.png differ
diff --git a/htdocs/theme/auguria/img/switch_on.png b/htdocs/theme/auguria/img/switch_on.png
new file mode 100644
index 0000000000000000000000000000000000000000..39ff5472e61d79cb1e233d4339b71ed82c9a46fc
Binary files /dev/null and b/htdocs/theme/auguria/img/switch_on.png differ
diff --git a/htdocs/theme/bureau2crea/img/switch_off.png b/htdocs/theme/bureau2crea/img/switch_off.png
new file mode 100644
index 0000000000000000000000000000000000000000..7b691df7ebece2e9107776615dabe5b25b4daac7
Binary files /dev/null and b/htdocs/theme/bureau2crea/img/switch_off.png differ
diff --git a/htdocs/theme/bureau2crea/img/switch_on.png b/htdocs/theme/bureau2crea/img/switch_on.png
new file mode 100644
index 0000000000000000000000000000000000000000..39ff5472e61d79cb1e233d4339b71ed82c9a46fc
Binary files /dev/null and b/htdocs/theme/bureau2crea/img/switch_on.png differ
diff --git a/htdocs/theme/eldy/img/switch_off.png b/htdocs/theme/eldy/img/switch_off.png
new file mode 100644
index 0000000000000000000000000000000000000000..7b691df7ebece2e9107776615dabe5b25b4daac7
Binary files /dev/null and b/htdocs/theme/eldy/img/switch_off.png differ
diff --git a/htdocs/theme/eldy/img/switch_on.png b/htdocs/theme/eldy/img/switch_on.png
new file mode 100644
index 0000000000000000000000000000000000000000..39ff5472e61d79cb1e233d4339b71ed82c9a46fc
Binary files /dev/null and b/htdocs/theme/eldy/img/switch_on.png differ
diff --git a/htdocs/theme/freelug/img/switch_off.png b/htdocs/theme/freelug/img/switch_off.png
new file mode 100644
index 0000000000000000000000000000000000000000..7b691df7ebece2e9107776615dabe5b25b4daac7
Binary files /dev/null and b/htdocs/theme/freelug/img/switch_off.png differ
diff --git a/htdocs/theme/freelug/img/switch_on.png b/htdocs/theme/freelug/img/switch_on.png
new file mode 100644
index 0000000000000000000000000000000000000000..39ff5472e61d79cb1e233d4339b71ed82c9a46fc
Binary files /dev/null and b/htdocs/theme/freelug/img/switch_on.png differ
diff --git a/htdocs/theme/yellow/img/switch_off.png b/htdocs/theme/yellow/img/switch_off.png
new file mode 100644
index 0000000000000000000000000000000000000000..7b691df7ebece2e9107776615dabe5b25b4daac7
Binary files /dev/null and b/htdocs/theme/yellow/img/switch_off.png differ
diff --git a/htdocs/theme/yellow/img/switch_on.png b/htdocs/theme/yellow/img/switch_on.png
new file mode 100644
index 0000000000000000000000000000000000000000..39ff5472e61d79cb1e233d4339b71ed82c9a46fc
Binary files /dev/null and b/htdocs/theme/yellow/img/switch_on.png differ