
var appProducts=new Object();
appProducts._width=66;
appProducts._height=66;
appProducts.aryViewPic=new Array();

// i=2及appProducts.doPicCheck(2)实现从第二张图片循环
appProducts.doPicLoad=function()
{
	var _html="";
	var _aryPic;
	for (var i=2;i<this.aryViewPic.length;i++ )
	{
		_aryPic=this.aryViewPic[i];
		_html+="<span class=\"thumb\"><a class=\"hand\" onclick=\"javascript:return appProducts.doPicCheck("+i+");\">"+appCommon.toUploadPic(_aryPic[2],this._width,this._height,0.5,0)+"</a></span>";

	}
	try{ if ($("PicBody")) $("PicBody").innerHTML=_html; } catch(e) { dbg.e(e); }
	appProducts.doPicCheck(2);
}

appProducts.doPicCheck=function(strer)
{
	_aryPic=this.aryViewPic[strer];
	var tmpImg=$("img_PicMain");
	//tmpImg.className="img hand hide";
	tmpImg.src=appCommon.toUploadPic(_aryPic[3],this._width,this._height,1,-1);
	//tmpImg.width=100;
	//tmpImg.height=100;
	//dbg.obj(tmpImg);
	setTimeout("appProducts.doPicResize();",500);
	//标题
	var tmpTopic=$("pic_topic");
	if (tmpTopic) tmpTopic.innerHTML=_aryPic[1];
	var tmpeExplain=$("pic_explain");
	if (tmpeExplain) tmpeExplain.innerHTML=_aryPic[4];
	return false;
}

appProducts.doPicResize=function()
{
	var tmpDiv=$("PicMain");
	var tmpMaxWidth=tmpDiv.clientWidth-15;
	var tmpImg=$("img_PicMain");
	dcs.images.doResize(tmpImg,tmpMaxWidth,"");
}

appProducts.doPicView=function()
{
	dcs.images.doOpen($("img_PicMain"));
}

