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

componentFeedback = function(name)
{
	this.componentPopup = componentPopup;
	if (arguments[1]){
		this.componentPopup(name, arguments[1]);
	}else{
		this.componentPopup(name);
	};
	this.z = 999;
	this.popupTitle.visual = false;
	this.buttonCross.visual = false;
	
	this.buttonCrossVisible = true;
};

componentFeedback.prototype = new componentPopup();
componentFeedback.prototype.type = "componentFeedback";

componentFeedback.prototype.onBaseCreate = function(obj)
{
	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 = [ this.buttonSrc, this.buttonMouseOverSrc, this.buttonCrossSrc, this.buttonCrossMouseOverSrc, 	this.leftTop, this.centerTop, this.rightTop, this.topMiddle, this.centerMiddle, this.bottomMiddle ];
		this.getPreloadImagesArr();
		
		this.contentObj = this.findContentObj();
		if (this.contentObj) {
			this.contentObj.innerHTML = this.initText(this.contentObj.innerHTML);
		}
	};
	if (!this.popupTitleVisible) this.buttonCrossVisible = false;
	this.setCompleteArrayInfo(this.completeInfoStyleImages);
	this.captureMouseEvents();
};

componentFeedback.prototype.onShow = function()
{
	this.bringToFront();
}

componentFeedback.prototype.findContentObj = function()
{
	if (this.isNewPopup){
		return this.findContentObjByName(this.id + "_contentObj");
	}else{
		return this.findContentObjByName(this.id + "_textDIV_contentObj");
	};
};
