script code for chain homepage data tables