/*-- ------ netsImgPanel class ------ --*/
function netsImgPanel(){}
//-- ------ #Parameters ------ --
netsImgPanel.prototype.sName="tmpImgPanel";

//-- Version --
//介绍、版本号与功能说明
netsImgPanel.prototype.sVersion="Nets img panel version 1.0";
netsImgPanel.prototype.sIntroduct="Nets img panel version 1.0";
//-- Private prototype --
netsImgPanel.prototype.sElement_Box=new Object();
netsImgPanel.prototype.sElement_Button=new Array();
netsImgPanel.prototype.sCount=0;
//-- #Public prototype --
netsImgPanel.prototype.sName="tmpPanel0";
netsImgPanel.prototype.sLength=100;
netsImgPanel.prototype.sIndex=0;
netsImgPanel.prototype.sButtonStyle_0="Home_74";
netsImgPanel.prototype.sButtonStyle_1="Home_75";
netsImgPanel.prototype.sEndPosition=0;

//-- ------ #Methods ------ --
netsImgPanel.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+tmpCommon.sysPx;
	//-- #Button --
	var Coun0=0;
	var tmpElement=document.getElementById(this.sName+"_Button_"+Coun0);
	while(tmpElement!=undefined){
		this.sElement_Button[Coun0]=document.getElementById(this.sName+"_Button_"+Coun0);
		this.sElement_Button[Coun0].className=this.sButtonStyle_0;
		Coun0++;
		tmpElement=document.getElementById(this.sName+"_Button_"+Coun0);
	}
	this.sCount=Coun0;
	this.sElement_Button[this.sIndex].className=this.sButtonStyle_1;
	
	return 0;
}
netsImgPanel.prototype.moveNext=function(pIndex){
	//-- #Box --
	this.sIndex=pIndex;
	this.sEndPosition=0-this.sIndex*this.sLength;
	//this.sElement_Box.style.marginLeft=tmpINT+tmpCommon.sysPx;
	//-- #Button --
	var Coun0=0;
	var tmpElement=null;
	while(this.sCount>Coun0){
		document.getElementById(this.sName+"_Button_"+Coun0).className=this.sButtonStyle_0;
		Coun0++;
	}
	document.getElementById(this.sName+"_Button_"+this.sIndex).className=this.sButtonStyle_1;
	
	return 0;
}

netsImgPanel.prototype.sFrameStart=0;
netsImgPanel.prototype.sFrameIndex=0;
netsImgPanel.prototype.sFrameCount=10;
netsImgPanel.prototype.sFrameLong=0;

netsImgPanel.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)+tmpCommon.sysPx;
		this.sFrameIndex++;
	}else{
		this.sFrameStart=0;
		this.sFrameIndex=0;
		this.sFrameCount=10;
		this.sFrameLong=0;
	}
	
	return 0;
}


