Activating the camera with a toggle button

Okay all i want is that when i hit the toggle button a camera activates, when i untick the toggle button, it deactivates the camera here is the code i tryed ?

var camera: Transform;

var showMap = false;

var xAxis : int;

var yAxis : int;

function Start()

{

camera.enabled = false; // hide it

}

function OnGUI()

{

showMap = (GUI.Toggle (Rect (xAxis, yAxis, 100, 20), showMap, “Map”));

camera.enabled = showMap;

}

Thanks

var cam : Camera;

var showMap = false;

var xAxis : int;

var yAxis : int;

function Start()

{

cam.enabled = false; // hide it

}

function OnGUI(){

showMap = GUI.Toggle(Rect(xAxis, yAxis, 100, 20), showMap, "Map");

cam.enabled = showMap;

}

There you go.

Be careful naming a variable as e.g Camera or anything that is predefined in Unity. It can cause some problems.