Added javascript to calculate partners and stuff

May want to put the header script in a new js file