added auto formatting when page is loaded
adding php code to decide wheather to display the 2nd graph for each block
fixed bug