var oHeight = 0;
var Effect = {
    // public method. Attach slider to referenced element.
    slider : function(str) {
    oElem = document.getElementById(str);

    if(oElem.style.display == 'block') {
        new Effect._slideUp(oElem);
    }else {
        oElem.style.display = "block";
        oElem.style.height = "1px";
        new Effect._slideDown(oElem,oElem.scrollHeight);
    }
},
    // private method. Slide (transition) Element open/closed
_slideDown : function(oElem,maxHeight){
    oHeight= oElem.clientHeight;
    oElem.style.height = Math.min(Math.floor(oHeight*2),maxHeight)+"px";
    if(oHeight < maxHeight){
        window.setTimeout('Effect._slideDown(oElem,'+maxHeight+')',10);
    }
},
_slideUp : function(oElem){
    oHeight= oElem.clientHeight;
    oElem.style.height = Math.floor(oHeight/2)+"px";
    if(oHeight > 0){
        window.setTimeout('Effect._slideUp(oElem)',10);
    }else{
        oElem.style.display = "none";
    }
}

}
