Wacky conditionals modifications

javascript modified