initial region loading in javascript