Wacky use of javascript conditionals code.