A tunable rf SQUID manipulated as flux and phase qubits