adjusted margins in javascript