<script>

function opendiv(name1){
var d=name1;
var h=d.offsetHeight;
var maxh=161;
function dmove(){
h+=40; //设置层展开的速度
if(h>=maxh){
d.style.height='161px';
clearInterval(iIntervalId);
}else{
d.style.display='block';
d.style.height=h+'px';
}
}
iIntervalId=setInterval(dmove,2);
}
function closediv(name1){
var d=name1;
var h=d.offsetHeight;
var maxh=40;
function dmove(){
h-=10;//设置层收缩的速度
if(h<=0){
d.style.display='none';
clearInterval(iIntervalId);
}else{
d.style.height=h+'px';
}
}
iIntervalId=setInterval(dmove,2);
}


function usediv(name1,name2){
var d=name1;
var sb=name2;
if(d.style.display=='none'){
opendiv(name1);
sb.innerHTML='<img src="Skins/default/images/stretch_icon.gif" width="11" height="6" alt="展开">';
}else{
closediv(name1);
sb.innerHTML='<img src="Skins/default/images/shrink_icon.gif" width="11" height="6" alt="收缩">';
}
}
</script>