Update cs-wd.js

Forgot to add windowSwitch() function to my last pull.