/*
 * Copyright (C) 1995-2011 by 4system Polska Sp. z o.o.
 * All Rights Reserved. v4
 */

componentRollover = function(name)
{
	//inherited	
	this.__componentImage = __componentImage;
	this.__componentImage(name);
	
	this.confirmAnswer = false;
	this.orgCursor = null;
};

componentRollover.prototype = new __componentImage();
componentRollover.prototype.type = "componentRollover";

componentRollover.prototype.onBaseCreate = function(obj)
{
	this.captureMouseEvents();
};

componentRollover.prototype.componentRolloverBaseOnCreate = componentRollover.prototype.onCreate;
componentRollover.prototype.onCreate = function(obj)
{
	this.src = this.srcOut;
	this.standardSrc = this.src;
	this.mouseOverSrc = this.srcIn;
	this.orgCursor = this.cursor;
	
    if (!this.mouseOverSrc) this.mouseOverSrc = this.src;
	
	this.componentRolloverBaseOnCreate();
};

componentRollover.prototype.componentRolloverBaseEventMouseOver = componentRollover.prototype.eventMouseOver;
componentRollover.prototype.eventMouseOver = function(e)
{
	if (this.mouseOverSrc) this.setValue(this.resourcesURL + this.mouseOverSrc);
	return this.componentRolloverBaseEventMouseOver(e);
};

componentRollover.prototype.componentRolloverBaseEventMouseOut = componentRollover.prototype.eventMouseOut;
componentRollover.prototype.eventMouseOut = function(e)
{
	if (this.standardSrc) this.setValue(this.resourcesURL + this.standardSrc);
	return this.componentRolloverBaseEventMouseOut(e);
};
