JavaScript: Register Vertical Middle