Fade in/out continously

Hello!

I make a scene that it’s seperated in 4 parts.
How can I make the first part to start with a fading from black, and right before second part to fade out to a black sreen and then again to fade in?

Sorry for my english!

This is the script that I use, but it only makes the screen to fade in from black on start.

    #pragma strict
     
    // FadeInOut
     
    var fadeTexture : Texture2D;
    var fadeSpeed = 0.2;
    var drawDepth = -1000;
     
    private var alpha = 1.0;
    private var fadeDir = -1;
     
    function OnGUI(){
     
    alpha += fadeDir * fadeSpeed * Time.deltaTime;
    alpha = Mathf.Clamp01(alpha);
     
    GUI.color.a = alpha;
     
    GUI.depth = drawDepth;
     
    GUI.DrawTexture(Rect(0, 0, Screen.width, Screen.height), fadeTexture);
    }

See this answer for fading in/out continuously:

http://answers.unity3d.com/questions/443646/continue-fade-in-and-out.html