If the game freezes, just click inside it (games can get unresponsive if you click elsewhere on the page).
Move from room to room as you move upwards removing gears to open doors.
Select the cogs to complete the chain to open each door. Left/Right Arrows to highlight cogs. Up Arrow to select a cog.