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

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

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();
	if (is.ie) {
		this.contentObj.onclick = function(e) {
			if (!e) var e = window.event;
			pc[this.owner.id].eventClick(e);
		};
	};
};

componentRollover.prototype.__eventClick__ = componentRollover.prototype.eventClick;
componentRollover.prototype.eventClick = function(e)
{
	if (is.ie) {
		if(this.multiClickEventBlock) return true;
		this.multiClickEventBlock = true;
		setTimeout("pc."+this.id+".multiClickEventBlock=false;", 200);
	};
	return this.__eventClick__(e);
};

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);
};
