如图,电路中三个电阻Rl、R2和R3的阻值分别为R、2R和4R.当开关S1断开、S2闭合时,电源输出功率为P0;当S1闭合、S2断开时,电源输出功率也为P0.求:
(1)电源电动势E及内电阻r;
(2)当S1、S2都断开时,电源的总功率P.