
var appPhoto=new Object();
appPhoto._width=120;
appPhoto._height=90;
appPhoto.aryViewPic=new Array();

appPhoto.doPicLoad=function()
{
	var _html="";
	var _aryPic;
	for (var i=1;i<this.aryViewPic.length;i++ )
	{
		_aryPic=this.aryViewPic[i];
		_html+="<span class=\"thumb\"><a class=\"hand\" onclick=\"javascript:return appPhoto.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); }
	appPhoto.doPicCheck(1);
}

appPhoto.doPicCheck=function(strer)
{
	var _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("appPhoto.doPicResize();",500);
	var tmpTopic=$("pic_topic");
	if (tmpTopic) tmpTopic.innerHTML=_aryPic[1];
	var tmpeExplain=$("pic_explain");
	if (tmpeExplain) tmpeExplain.innerHTML=_aryPic[4];
	return false;
}

appPhoto.doPicResize=function()
{
	var tmpDiv=$("PicMain");
	var tmpMaxWidth=tmpDiv.clientWidth-15;
	//alert(tmpDiv.clientWidth);
	var tmpImg=$("img_PicMain");
	dcs.images.doResize(tmpImg,tmpMaxWidth,"");
}

appPhoto.doPicView=function()
{
	dcs.images.doOpen($("img_PicMain"));
}

