Toggling visibility of two gameobjects.

I want to swap two hierarchies (with lots of children each) on a keystroke. I found this script on another question which works great for switching the visibility of said hierarchy.

    function Update() {
    if (Input.GetKeyDown(KeyCode.Z)) {
        ToggleVisibility();
    }
}

    function ToggleVisibility() {
    // toggles the visibility of this gameobject and all it's children
    var renderers = gameObject.GetComponentsInChildren(Renderer);
    for (var r : Renderer in renderers) {
        r.enabled = !r.enabled;
    }
}

My question is how do I modify this script to set the initial visibility of my second hierarchy (and all it's children) to false? I believe I would have this script on the initially visible hierarchy and another script with initial visibility off on the second hierarchy. Then the keystroke would properly switch the two. I don't know how to implement this in the script. Thanks for any help you can provide.

Editted for proper terms (thanks for setting me straight Jessy)

Edit: 5 days and still no help?

You haven't mentioned if it's acceptable to just store the enabled state of all the renderers in the Editor, and then switch them all during gameplay. I'm going to go with that assumption for this code example. Please comment if that is not what you need.

import System.Collections.Generic;

#pragma strict

@ HideInInspector @ SerializeField private var renderers : Renderer[];

#if UNITY_EDITOR
var parents : List.<GameObject>;

function Reset () {
    if (parents == null) return;

    var renderers = new List.<Renderer>();
    parents.ForEach(function(parent) {
        for (var rendererComponent in parent.GetComponentsInChildren(Renderer)) 
            renderers.Add(rendererComponent as Renderer);
    });
    this.renderers = renderers.ToArray();
}
#endif

function Update() {
    if (Input.GetKeyDown(KeyCode.Z))
        for (var i = 0; i < renderers.Length; ++i) 
            renderers_.enabled = !renderers*.enabled;*_
_*}*_
_*```*_
_*<p>Just populate the <em>parents</em> List in the Inspector, and choose Reset from the script's drop-down menu after you have all the renderers set up the way you like.</p>*_
_*<p>I don't like the way Generics look in UnityScript, and the Generic form of GetComponents seems to be broken.  Here's what the ForEach statement can look like, in C#, and ideally what it could look like in UnityScript.</p>*_
_*```*_
_*parents.ForEach(parent => renderers.AddRange(parent.GetComponentsInChildren<Renderer>()) );*_
_*```*_
_*<p>Here's an Editor script.  Select any game object with a renderer, and then pick this menu item from the GameObject menu, and all the renderers in its parent's hierarchy will be set to whatever it is not, enabled-wise.  You can, of course, just select the parent itself.</p>*_
_*```*_
_*@ MenuItem ("GameObject/Toggle Renderers Recursively", false, 1011) static function Toggle () {*_
 _*var switchEnabled = !Selection.activeTransform.renderer.enabled;*_
 _*for (var rendererComponent in Selection.activeTransform.root.GetComponentsInChildren(Renderer))*_
 _*(rendererComponent as Renderer).enabled = switchEnabled;*_
_*}*_
_*@ MenuItem ("GameObject/Toggle Renderers Recursively", true) static function ValidateToggle () : boolean {*_
 _*return Selection.activeTransform && Selection.activeTransform.renderer;*_
_*}*_
_*```*_

That looks like a ridiculous amount of code to hide a parent and all of it's children - surely there's an easier way? Can someone post a simple example with key press that hides a hierarchy? My geo is visible but it has no rendering component? Why isn't there a hierarchical visibility attribute like every other 3D software? Why do I have to search every object in the game using a "find"? I should be able to refer to an object in a hierarchy with some kind of simple syntax but I can't see any explanation in the docs!