Guitexture fade in out at time

I'am a newbie and struggeling with js, but trying to understand.

I want a GuiTexture (logo) to fade in stay on screen for 15 seconds fade out and than after 180 seconds fade in again...so on and so on.

I got the fade in part and the dissapering act. But i can't figure out to reset time so it fades in the second time, also i haven't figured out the fade out part.

Please help:

var theTexture : Texture2D;
private var FadeTime : float;

function OnLevelWasLoaded(){
    FadeTime= Time.time;
}

function OnGUI(){
    if(Time.time%180<15){
        GUI.color = Color.white;
        GUI.color.a = Mathf.Lerp(0.0, 1.0, (Time.time-FadeTime/5));
        GUI.DrawTexture(Rect(0,0,100, 100), theTexture);
        //this doesn't work
        if(Time.time%10<1){
        FadeTime=Time.time;
        }
    }
}

Thanks...Arno

if it were me, i'd do something like this:

var fade : float = 1;
var theTexture : Texture2D;

function OnLevelWasLoaded(level : int)
{
    StopCoroutine("FadeCoroutine");
    StartCoroutine("FadeCoroutine");
}

function FadeCoroutine()
{
    while(true)
    {
        fade = 0;
        var time : float = 0;
        while (time < 5)
        {
            yield;
            fade += Time.deltaTime / 5;
            time += Time.deltaTime;
        }
        fade = 1;
        time = 20;
        yield WaitForSeconds(15);
            while (time < 25)
        {
            yield;
            fade -= Time.deltaTime / 5;
            time += Time.deltaTime;
        }
        fade = 0;
        yield WaitForSeconds(180);
    }
}

function OnGUI()
{
    if (fade > 0)
    {
        GUI.color = Color.white;
        GUI.color.a = fade;
        GUI.DrawTexture(Rect(0,0,100, 100), theTexture);
        GUI.color = Color.white;
    }
}