How to prevent Z axis rotation ?

hello, first sorry for my bad english …

i want to rotate camera around object at X and Y axis only, how could i prevent Z axis rotation and keep it at zero ?

here is my code

using UnityEngine;
using System.Collections;

public class CameraController : MonoBehaviour {

	public GameObject Target;
	public float rotateSpeed = 100f;
	public Vector3 offside;

	void Start () {
		offside = Target.transform.position;
		transform.LookAt (offside);
	}

	// Update is called once per frame
	void Update () {
		if (Input.GetKey (KeyCode.DownArrow))
			transform.RotateAround (offside, Vector3.left, rotateSpeed * Time.deltaTime);
		else if (Input.GetKey (KeyCode.UpArrow))
			transform.RotateAround (offside, Vector3.left, -rotateSpeed * Time.deltaTime);
		else if (Input.GetKey (KeyCode.LeftArrow))
			transform.RotateAround (offside, Vector3.up, -rotateSpeed * Time.deltaTime);
		else if (Input.GetKey (KeyCode.RightArrow))
			transform.RotateAround (offside, Vector3.up, rotateSpeed * Time.deltaTime);
	}
}

please help me with example, i still noob …

Just set teh eulerangle of the desired axis to zero after calling the RotateAround (or any other rotate function).

if (Input.GetKey (KeyCode.DownArrow))
             transform.RotateAround (offside, Vector3.left, rotateSpeed * Time.deltaTime);
Quaternion q = transform.rotation;
q.eulerAngles = new Vector3(q.eulerAngles.x, q.eulerAngles.y, 0);
transform.rotation = q;