// JavaScript Document
var lbArr=new Array();
var lbIndex=0,lbTime,lbflag=false,speed=4000;
function showLBImg(v)
{
	if(v!=null) lbIndex=v;
	var l=lbArr.length;
	if(l<=0) return;
	if(lbIndex>=l) lbIndex=0;
	if(lbIndex<0) lbIndex=l-1;
	clearTimeout(lbTime);
	for(var i=0;i<l;i++)
	{
		document.getElementById("lbt"+i).className="lbt0";
	}
	if(document.all)
	{
		document.getElementById("lbbimg").filters[0].Apply();
		document.getElementById("lbbimg").filters[0].Play(duration=2);
	}
	document.getElementById("lbt"+lbIndex).className="lbt1";
	document.getElementById("lblink").href=lbArr[lbIndex][0];
	document.getElementById("lbbimg").src=lbArr[lbIndex][1];
}
function drawLB()
{
	var str="";
	for(var i=0;i<lbArr.length;i++)
	{
		str+="<div id='lbt"+i+"' class='lbt0' onclick='clkLBT("+i+")' onmouseover='showBImg("+i+")' onmouseout='outBImg("+i+")'"+(i==4?" style='width:114px;float:right;border:0px'":"")+">"+lbArr[i][2]+"</div>";
	}
	document.getElementById("lbt").innerHTML=str;
	lbflag=true;
}
function lbLoadFinsh(){if(!lbflag){clearTimeout(lbTime);return;}lbTime=setTimeout("loadLB()",speed);}
function loadLB(){showLBImg(++lbIndex);}
function showBImg(v){lbflag=false;showLBImg(v);}
function outBImg(v){lbflag=true;lbTime=setTimeout("showLBImg()",speed);}
function toNext(v){lbIndex+=v;showLBImg();}
function onBImg(){lbflag=false;clearTimeout(lbTime);}
function outBimg(){lbflag=true;lbTime=setTimeout("showLBImg()",speed);}
function clkLBT(v){window.open(lbArr[v][0]);}
lbArr[0]=["/diy/detail362.aspx","/images/homead/homec01.jpg","孔雀舞水晶"];
lbArr[1]=["/diy/detail363.aspx","/images/homead/homec02.jpg","男士玛瑙项链"];
lbArr[2]=["/diy/detail364.aspx","/images/homead/homec03.jpg","蓝色恋情"];
lbArr[3]=["/diy/detail369.aspx","/images/homead/homec04.jpg","男士照片手表"];
lbArr[4]=["/diy/detail359.aspx","/images/homead/homec05.jpg","水晶内雕玫瑰"];
drawLB();showLBImg(lbIndex);
