// Show/hidden content for wjint.net JavaScript Document
// Copyright wjint.net 2007

function $(element){
return element = document.getElementById(element);
}
function $D(){
var d=$('hiddencontent');
var h=d.offsetHeight;
var maxh=300;
function dmove(){
h+=50; //设置层展开的速度
if(h>=maxh){
d.style.height='auto';
clearInterval(iIntervalId);
}else{
d.style.display='block';
d.style.height=h+'px';
}
}
iIntervalId=setInterval(dmove,2);
}
function $D2(){
var d=$('hiddencontent');
var h=d.offsetHeight;
var maxh=300;
function dmove(){
h-=50;//设置层收缩的速度
if(h<=0){
d.style.display='none';
clearInterval(iIntervalId);
}else{
d.style.height=h+'px';
}
}
iIntervalId=setInterval(dmove,2);
}
function $use(){
var d=$('hiddencontent');
var sb=$('stateBut');
if(d.style.display=='none'){
$D();
sb.innerHTML='&uarr;&uarr;';
}else{
$D2();
sb.innerHTML='&darr;&darr;';
}
}