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

componentLastStepButton = function(name)
{
	//inherited	
	this.componentElement = __componentImage;
	this.componentElement(name);
	this.confirmAnswer = false;	
};

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

componentLastStepButton.prototype.onBaseCreate = function(obj)
{
	this.captureMouseEvents();
	if (this.execution) {
		this.resourcesStatus = "online";
		this.resourcesURL = resourcesURL;
		if (PageInterface.GetValue("state") != psDesigning && lms && lms.name != "lmsOffline") {
			this.resourcesStatus = lms.resourcesStatus();
			if (this.disableOnlineOfflineMix) this.resourcesURL = resourcesURL;
			else this.resourcesURL = lms.resourcesURL();
		};
		this.resourcesURL = unescape(this.resourcesURL);
	};
};

componentLastStepButton.prototype.componentLastStepButtonBaseOnCreate = componentLastStepButton.prototype.onCreate;
componentLastStepButton.prototype.onCreate = function(obj)
{
	if (this.execution) {
		document.getElementById(this.id + "_contentObj").src = this.resourcesURL + this.src;
	};
	
	this.componentLastStepButtonBaseOnCreate();
};

componentLastStepButton.prototype.onLastStep = function()
{
	this.show();	
};
