Added function to JS-library for getting window dimensions.
Added missing semicolon.
resizeDialogs() method now uses the new getWindowDimensions().