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

	this.resourcesStatus = "online";
	this.resourcesURL = "";
};

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

componentHTML.prototype.onCreate = function()
{
	this.captureMouseEvents();
};

componentHTML.prototype.unselectable = function()
{
	return;
};

componentHTML.prototype.onPaint = function()
{
	if (page.state == psDesigning) {
		if (this.html.length > 0) {
			this.obj.dir = this.dir;
			this.setHTML(unescape(this.html));
		} else {
			var t = ""
			t = '<table style="border: 0px solid #DDDDDD;" width="100%" height="100%" bgcolor="#FFFFFF" dir="'+this.dir+'"><tr><td valign="middle">';
			t += '<img src="'+ resourcesURL + this.iconSrc +'" />';
			t += '</td></tr></table>';
		};
		this.setHTML(t);
		this.setVisible(true);
	} else {
		this.setHTML(unescape(this.html));
	};
};

componentHTML.prototype.componentHTMLBasehide = componentHTML.prototype.hide; //pg2-new
componentHTML.prototype.hide = function() //pg2-new
{
	//if (page && page.state != psDesigning) {
		try {
			this.setHTML(" ");
		} catch(e) {};
	//}
	this.componentHTMLBasehide();
};
