You can't make a real loading screen for switching between layouts, because the browser is busy and will not tick the engine while it's loading. What you can do, however, is display a "loading" message on the *previous* layout, then go to the next layout. While it's frozen loading the next layout the user will be looking at the loading message. You might need to put a small 'Wait' delay (e.g. 0.1 seconds) before actually changing layout, to make sure the display is redrawn with the new message before continuing.