switch between different animations

I have 4 animation clips where I'm trying to switch between them ....IF one animation clip is playing the other 3 shouldn't... whats the best way to implement this in javasript?

Check the docs here:

http://unity3d.com/support/documentation/ScriptReference/Animation.IsPlaying.html

function CheckPlayingAnims() {
    if (!animation.IsPlaying("anim1") && !animation.IsPlaying("anim2"))
        animation.Play("anim3");
}

or something along those lines