function ClsImageButtonAction(){

	this.oImageButton = null;
	this.selectedIndex = 0;
	this.m_arrayImageList = new Array();
	this.m_arrayImageObject = new Array();

}

ClsImageButtonAction.prototype.setImageObject = function(obj){
	this.oImageButton = obj;
}

ClsImageButtonAction.prototype.add = function(obj, idx){
	if ( this.getImageObject(idx) == null )
	{
		this.m_arrayImageObject[this.m_arrayImageObject.length] = new Array(idx, obj);
	}	
}

ClsImageButtonAction.prototype.setSelectedImage = function(idx){

	this.selectedIndex = idx;

	this.rollOutAll();

	var obj = this.getImageObject(idx);

	if ( obj == null )
	{
		return;
	}

	obj.src = this.m_arrayImageList[idx][1];
}

ClsImageButtonAction.prototype.addInfo = function(arrInfo){

	this.m_arrayImageList[this.m_arrayImageList.length] = arrInfo;

}

ClsImageButtonAction.prototype.rollOutAll = function(){

	for ( var i=0; i<this.m_arrayImageObject.length; i++)
	{
		this.rollOut(this.getImageObject(i), i);
	}

}

/** ÀÌ¹ÌÁö Roll Over Event Ã³¸® **/
ClsImageButtonAction.prototype.rollOver = function(obj, idx){
	
	if ( this.selectedIndex == idx )
	{
		return;
	}

	var oImageObject = this.getImageObject(idx);
	if ( oImageObject == null )
	{
		this.add(obj, idx);
	}

	try{
		obj.src = this.m_arrayImageList[idx][1];
	}
	catch(e){
	}

}

/** ÀÌ¹ÌÁö Roll Out Event Ã³¸® **/
ClsImageButtonAction.prototype.rollOut = function(obj, idx){

	if ( this.selectedIndex == idx )
	{
		return;
	}

	var oImageObject = this.getImageObject(idx);
	if ( oImageObject == null )
	{
		this.add(obj, idx);
	}

	try{
		obj.src = this.m_arrayImageList[idx][0];
	}
	catch(e){
	}


}

ClsImageButtonAction.prototype.click = function(imageIndex){

}

ClsImageButtonAction.prototype.hasImageData = function(imageIndex){
	if ( this.m_arrayImageList.length > imageIndex )
	{
		return true;
	}
	return false;
}

ClsImageButtonAction.prototype.isEnableAction = function(){
	return true;
}

ClsImageButtonAction.prototype.getImageObject = function(idx){
	if ( this.m_arrayImageObject.length > 0 )
	{
		for ( var i=0; i<this.m_arrayImageObject.length; i++ )
		{
			if ( this.m_arrayImageObject[i][0] == idx )
			{
				return this.m_arrayImageObject[i][1];
				break;
			}
		}
	}
	return null;
}