function animateThis(id, height) {
var attributes = {
   height: { to: height },
    width: {by: 0 }
};

var myAnim = new YAHOO.util.Anim(id, attributes);

var attributes2 = {
   height: { by: 0 },
    width: {by: 0 }
};

var myAnimPause = new YAHOO.util.Anim(id, attributes2);
myAnimPause.duration = 3; 

var attributes3 = {
   height: { to: 0 },
    width: {by: 0 }
};

var myAnimClose = new YAHOO.util.Anim(id, attributes3);


myAnim.onComplete.subscribe(pause);
myAnimPause.onComplete.subscribe(close);

myAnim.animate();

function pause(){
        myAnimPause.animate();
}

function close(){
myAnimClose.animate();
}

}

function openThis(id, height) {
var attributes = {
   height: { to: height }
};

var myAnim = new YAHOO.util.Anim(id, attributes);
myAnim.animate();
}

function closeThis(id, height) {
var attributes = {
   height: { to: height },
   width: {by: 0 }
};

var myAnim = new YAHOO.util.Anim(id, attributes);
myAnim.animate();
}

