window swap document