
var maxh =0;
function $(element){
return element = document.getElementById(element);
}
function $D(id){
var d=$(id);
var h=d.offsetHeight;

if(maxh ==0)
{
	maxh=500;
}
if(document.all)
{
	maxh = maxh-50;
}
function dmove(){
h+=50; //设置层展开的速度
if(h>=maxh){

d.style.height=h;
clearInterval(iIntervalId);
}else{
d.style.display='block';
d.style.height=h+'px';
}
}
iIntervalId=setInterval(dmove,2);
}
function $D2(id){
var d=$(id);
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(id,butt){
if(typeof(arguments[2]) != "undefined" && arguments[2])
	{
		maxh=arguments[2];
	}
var d=$(id);
var sb=$(butt);
if(d.style.display=='none' || d.style.display==''){
$D(id);
sb.innerHTML='<img src="/gsimages/english/btn_arrow_down.gif" />';
}else{
$D2(id);
sb.innerHTML='<img src="/gsimages/english/btn_arrow_top.gif" />';
}
}
