/*
 * Copyright (C) 1995-2014 by 4system Polska Sp. z o.o.
 * All Rights Reserved. v4
 */
 
componentRectangle = function(name)
{
	//inherited
	this.componentElement	= componentElement;
	this.componentElement(name);
};

componentRectangle.prototype = new componentElement;
componentRectangle.prototype.type = "componentRectangle";

componentRectangle.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);

		this.imagesNameArr = [ '__.hotspot.gif' ];
		this.getPreloadImagesArr();
	};

	if (this.bgColor == "transparent") this.setHTML('<img id="' + this.id + '_contentObj" src="' + this.resourcesURL + '__.hotspot.gif" width="100%" height="100%" border="0" />');
};

componentRectangle.prototype.isReady = function()
{
	if (this.execution) {
		if (this.bgColor == "transparent") return preloadImage(this, "_1");	else return true;
	};
};
