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

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

componentSLWButton.prototype = new componentElement();
componentSLWButton.prototype.type = "componentSLWButton";

componentSLWButton.prototype.onBaseCreate = function(obj)
{
	this.captureMouseEvents();
	
	if (this.disabled == true) {
		this.obj.disabled = true;
	}

	var s = "";
	if (this.visibleIcon == true) {
		s += "<img style=\"vertical-align: middle;\" src=\"" + resourcesURL + this.icon + "\"/> ";
	}
	if (this.visibleText == true) {
		s += this.text;
	}
	
	var o =  document.getElementById(this.id + "_contentObj");
	if (this.ctrlFontEnable) {
		this.innerCtrlFormatText(o, s, this.ctrlFontName, this.ctrlFontSize, this.ctrlFontColor, this.ctrlFontStyle);  
	} else {
		o.innerHTML = s;
	}
};
