adjusted javascript for access