O.K the wires on mine are differant colours to yours but they must do the same things so here go's !
One wire will be permanant live, one will be earth, one will be ignition live and one will probably be for the head unit display dimmer. Get your self a live tester if you haven't allready got one and put one end on the brown wire (that should be earth it is on mine) and then put the other end onto one of the other 3 wires, if it makes a live circuit without the ignition on then you've found the permanant live. If it doesn't make a circuit then switch on the lights or the ignition, if its the dimmer it'll go live when the lights are on and if its the ignition live then it will only make a circuit with the ignition on.