Now converts uppercase to lowercase and vice versa.
Added so that a and A are converted to #.
Changed variable name And now also throws an exception if str is empty.
Remoed whitespace and comments.
Redone the if string === empty to make things easier to read.
Uncommented strict and added var to my variable declarations.