/*-- ------ homeImgPanel class ------ --*/
function homeImgPanel(){}
/*-- ------ Version ------ --*/
//介绍、版本号与功能说明
homeImgPanel.prototype.sVersion="Nets img panel version 1.0";
homeImgPanel.prototype.sIntroduct="Nets img panel version 1.0";
/*-- ------ Private prototype ------ --*/
homeImgPanel.prototype.sElement_Box=new Object();
homeImgPanel.prototype.sElement_Buttion=new Array();
homeImgPanel.prototype.sCount=0;
/*-- ------ Public prototype ------ --*/
homeImgPanel.prototype.sName="tmpPanel0";
homeImgPanel.prototype.sLength=100;
homeImgPanel.prototype.sIndex=0;
homeImgPanel.prototype.sButtonStyle_0="Home_74";
homeImgPanel.prototype.sButtonStyle_1="Home_75";
homeImgPanel.prototype.sEndPosition=0;
/*-- ------ Public function ------ --*/
homeImgPanel.prototype.Initial=function(){
	var tmpINT=0-this.sIndex*this.sLength;
	//-- #Box --
	this.sElement_Box=document.getElementById(this.sName+"_Box");
	this.sElement_Box.style.marginLeft=tmpINT+sysPx;
	//-- #Button --
	var Coun0=0;
	var tmpElement=document.getElementById(this.sName+"_Button_"+Coun0);
	while(tmpElement!=undefined){
		this.sElement_Buttion[Coun0]=document.getElementById(this.sName+"_Button_"+Coun0);
		tmpINT=Coun0+1;
		this.sElement_Buttion[Coun0].src="Ui/m_default/Img/Common/16_"+tmpINT+"_A.jpg";
		Coun0++;
		tmpElement=document.getElementById(this.sName+"_Button_"+Coun0);
	}
	this.sCount=Coun0;
	tmpINT=this.sIndex+1;
	this.sElement_Buttion[this.sIndex].src="Ui/m_default/Img/Common/16_"+tmpINT+"_B.jpg";
}
homeImgPanel.prototype.moveNext=function(pIndex){
	//-- #Box --
	this.sIndex=pIndex;
	this.sEndPosition=0-this.sIndex*this.sLength;
	//this.sElement_Box.style.marginLeft=tmpINT+sysPx;
	//-- #Button --
	var Coun0=0;
	var tmpElement=null;
	while(this.sCount>Coun0){
		tmpINT=Coun0+1;
		this.sElement_Buttion[Coun0].src="Ui/m_default/Img/Common/16_"+tmpINT+"_A.jpg";
		Coun0++;
	}
	tmpINT=this.sIndex+1;
	this.sElement_Buttion[this.sIndex].src="Ui/m_default/Img/Common/16_"+tmpINT+"_B.jpg";
}

homeImgPanel.prototype.sFrameStart=0;
homeImgPanel.prototype.sFrameIndex=0;
homeImgPanel.prototype.sFrameCount=10;
homeImgPanel.prototype.sFrameLong=0;

homeImgPanel.prototype.moveCartoon=function(pEndPosition){
	if(this.sFrameLong==0){
		tmpStart=parseInt(this.sElement_Box.style.marginLeft);
		this.sFrameStart=tmpStart;
		this.sFrameLong=(pEndPosition-tmpStart)/this.sFrameCount;
	}
	
	if(this.sFrameIndex<this.sFrameCount){
		tmpINT=this.sFrameStart+(this.sFrameLong*this.sFrameIndex);
		this.sElement_Box.style.marginLeft=parseInt(tmpINT)+sysPx;
		this.sFrameIndex++;
	}else{
		this.sFrameStart=0;
		this.sFrameIndex=0;
		this.sFrameCount=10;
		this.sFrameLong=0;
	}
}



