Exhibit 10.77 LOAN AGREEMENT by and between HEADWATERS INCORPORATED