var secoya = {
	application: {
		UID: ''
	}
};
var core = null;
var as = null;
var sfh = null;



function secoyaErrorReporter() {
	this.wait();
}

secoyaErrorReporter.prototype = {
	wait: function() {
		if (window.lightCore) {
			if (!lightCore.initialized)
				lightCore.registerInit(this);
			else
				this.initialize();
		}
		else
			setTimeout('errorReporter.wait()',100);
	},

	initialize: function() {
		var msg = "";
		if (msg != '') {
			alert(msg.decodeEntities());
		}
	}
}

function secoyaTranslator() {}

secoyaTranslator.prototype = {
	fieldReplacer: new RegExp('\\[\\[([^\\]]+)\\]\\]', 'g'),

	get: function(name, fields) {
		var result = '';
		if (this.trans[name]) {
			result = this.trans[name];
			if (fields) {
				result = result.replace(this.fieldReplacer, function(all, field) {
					return fields[field] ? fields[field] : '';
				});
			}
		} else {
			result = 'unknown('+name+')';
		}
		return result;
	},

	trans: {}
}

var errorReporter = new secoyaErrorReporter();
var sTrans = new secoyaTranslator();