function openlist(callingobj,listid)
{
	expanditems = Ext.DomQuery.select("li[class*=expander]",listid);
	if(Ext.isArray(expanditems))
	{
		Ext.each(expanditems, function(obj,ind,arr){obj.style.display="block"; setTimeout("expand('"+obj.id+"')",0)});
		
		//Ext.each(expanditems, function(obj,ind,arr){Ext.get(obj).setHeight(16,{duration: 1});Ext.get(obj).setDisplayed(true)});
	}
	callingobj.onclick = function(){ return closelist(this,listid) };
	callingobj.innerHTML = "LESS...";
	return false;
}

function closelist(callingobj,listid)
{
	expanditems = Ext.DomQuery.select("li[class*=expander]",listid);
	if(Ext.isArray(expanditems))
	{
		Ext.each(expanditems, function(obj,ind,arr){setTimeout("shrink('"+obj.id+"')",0)});
	}
	callingobj.onclick = function(){ return openlist(this,listid) };
	callingobj.innerHTML = "MORE...";

	return false;
}

function expand(oid)
{
	obj = document.getElementById(oid);
	objheight = parseInt(obj.style.fontSize.replace("px", ""));
	objheight = objheight ? objheight : 0;
	if(objheight < 12)
	{
		objheight+=4;
// 		obj.style.height = objheight+"px";
		obj.style.lineHeight = objheight+"px";
		obj.style.fontSize = (objheight)+"px";
		setTimeout("expand('"+oid+"')",0);
	}
	else
	{
		obj.style.lineHeight = (objheight + 4)+"px";
		obj.style.color="#472a14";
	}
}

function shrink(oid)
{
	obj = document.getElementById(oid);
	objheight = obj.offsetHeight;
	obj.style.color="#999999";
	if(objheight > 0)
	{
		objheight-=4;
		obj.style.height = objheight+"px";
		obj.style.lineHeight = objheight+"px";
		if(objheight<=12)
			obj.style.fontSize = (objheight)+"px";
		setTimeout("shrink('"+oid+"')",0);
	}
	else
	{
		obj.style.height = "";
		obj.style.display = "none";
	}
}