partial: http://outils.prodinternet.com/mantis/view.php?id=4455
http://outils.prodinternet.com/mantis/view.php?id=4438#c10084