/* ----javascript------ */
var thenow_i=0;
//改变相关对象的背景图
function chgobj_thebg(bg_var)
{
	if(bg_var>0){ thenow_i=bg_var-1; }
	if(document.getElementById(bg_obj))
	{
		var bgObj=document.getElementById(bg_obj);
		var bgUrl=theimgs[thenow_i];
		if(bg_type==0)
		{
			//bgObj.style.background="url(" + bgUrl + ")";
			bgObj.style.background="url(" + bgUrl + ") no-repeat center top";
		}
		else
		{
			bgObj.style.background=bgUrl;
		}
	}
}

//加载时引用的自动函数
function auto_chgbg()
{
	var thernd_num;
	if(thenow_i==theimgs.length)
	{
		thenow_i=0;
	}
	chgobj_thebg();
	//返回随机数
	thernd_num=Math.floor(Math.random()*theimgs.length);
	thenow_i=thernd_num;
	//thenow_i+=1;
	setTimeout("auto_chgbg();",rotation_time);
}



//分类菜单
function ulshow(uid,tid)
{

uobj=document.getElementById(uid);
tobj=document.getElementById(tid);

	if (uobj.style.display=="none" || uobj.style.display=="")
	{
		uobj.style.display="block";
	}
	else
	{
		uobj.style.display="none";
	}
}




