Deductions & credits

After reading the 540nr instructions, I'm increasingly thinking that I am allowed to deduct moving expenses for leaving California, as long as it's in connection with my new job (vs. simply leaving the state).