function DOMAnimation()
{
    //arguments[0] = {element:DOMNode,styleString:{to:value,behavior:string or Behavior,f1,f2,....,fn}}
    this.element = null;
    this.animations = new Array()
    this.pause = false
    if(DOMAnimation.arguments[0])
    {
        for(var i in arguments[0])
        {
            var arg = DOMAnimation.arguments[0]
            if(i == "element")
            {
                this.element = DOMAnimation.arguments[0][i]
            }
            else
            {
               var obj = copy(DOMAnimation.arguments[0][i])
               obj["style"] = i
               this.animations.push(new Animation(this.element,obj))
            }
        }
    }
    
    this.animate = function()
    {
        if(!this.pause)
        {
            
            for(var i = 0; i < this.animations.length; i++)
                GLOBAL["ANIMATOR"].registerAnimation(this.animations[i])
        }
        else
        {
            for(var i = 0; i < this.animations.length; i++)
                this.animations[i].isFinished = true;
        }
    }
    
}
