Refactoring tbl_tracking.php

Hi Marc,
I have added tbl_tracking.lib.php and extracted methods to generate html code.