//this is a class
function ListContentBG(){
	//properties
	this.obj_old=null;
	this.obj=null;
	this.old_bgcolor=null;
	this.old_fontcolor=null;

	this.cobj_old=null;
	this.cobj=null;
	
	//method
	this.changeBG=toggleBg;
	this.ci=changeImage;
	this.con=chooseOn;
	this.coff=chooseOff;
}	

function toggleBg(obj){
	this.obj=obj;
	
	if(this.obj_old!=null)
	{
		//未选中状态
		this.obj_old.style.color=this.old_fontcolor;//改回原来的前景色
		this.obj_old.style.background=this.old_bgcolor;//改回原来的背景色
	}
	
	//选中状态
	this.old_fontcolor=this.obj.style.color;//保存原前景色
	this.old_bgcolor=this.obj.style.background;//保存原背景色
	
	this.obj.style.color="#ffffff";//"#000066";//改变前景色
	this.obj.style.background="#2E81A9";//"#8CAAE8";//改变背景色
	this.obj_old=this.obj;
}

function changeBackground(obj){
	toggleBg(obj);
}

function changeImage(obj)
{
	this.obj=obj;
	
	if(this.obj_old!=null)
	{
		this.obj_old.src="../img/white.gif";		
	}
	
	this.obj.src="../img/arrow.gif";
	
	this.obj_old=this.obj;	
}

function chooseOn(obj){
	this.cobj=obj;
	this.cobj.style.fontWeight='bolder';
}

function chooseOff(obj){
	this.cobj=obj;
	this.cobj.style.fontWeight='normal';
}