var DivID;
var DivSZ;
var DivST;
var DivMaxSize;

function div_move(ID) {
    DivID = ID;
    if(ID.style.display=="none") {
        DivID.style.height = 1;
        DivID.style.display="";
        DivMaxSize = parseInt(ID.parentNode.getElementsByTagName("DIV").item(1).offsetHeight);        
        DivST = Math.round(DivMaxSize / 15);
        div_in(ID);
        }
    else {
        DivMaxSize = parseInt(ID.parentNode.getElementsByTagName("DIV").item(1).offsetHeight);        
        DivST = Math.round(DivMaxSize / 15);
        div_out(ID);
    }
}

function div_in(ID) {
    DivID = ID;
    DivSZ = DivID.offsetHeight + DivST;
    DivMaxSize = parseInt(ID.parentNode.getElementsByTagName("DIV").item(1).offsetHeight);
    if(DivSZ>=DivMaxSize) {
        DivID.style.height = DivMaxSize;
    }
    else { 
        DivID.style.height = DivSZ;
        setTimeout("div_in(DivID)", 15);   
    }        
}

function div_out(ID) {
    DivID = ID;
    DivSZ = DivID.offsetHeight - DivST;
    if(DivSZ<1) {
        DivID.style.height = 1;
        DivID.style.display="none";
    }
    else { 
        DivID.style.height = DivSZ; 
        setTimeout("div_out(DivID)", 15);   
    }
}
