/**
 * Import EffectHandler.js first
 * (c) 2005 Mat Gessel
 */

/**
 * BorderEffect
 */
BorderEffect.prototype = new AbstractEffect();
BorderEffect.prototype.constructor = BorderEffect;

/**
 * Constructor
 * @param interval the animation delay in ms
 * @param borderStyle the style sheet string for the border
 */
function BorderEffect(borderStyle)
{
	this.initBorderEffect(borderStyle);
}

BorderEffect.prototype.initBorderEffect = function(borderStyle)
{
	this.initAbstractEffect();
	this.m_borderStyle = borderStyle;
	this.m_previousStyle = null;
}

BorderEffect.prototype.doStart = function()
{
	this.m_previousStyle = this.m_target.style.border;
	this.m_target.style.border = this.m_borderStyle;
};

BorderEffect.prototype.doFinish = function()
{
	this.m_target.style.border = this.m_previousStyle;
	this.m_previousStyle = null;
};

