finished masterPage.js

Change-Id: Ifa94fdf28dabedb2ab8bae5402c2bda6901c5d25