/**
 * function Configurazione()
 * 
 * @type constructor
 * @memberOf Configurazione
 */
function Configurazione() {
}
/**
 * property siteUrl
 * @type String
 * @memberOf Configurazione
 */
 var domain = "http://www.eni.com";
 Configurazione.siteUrl = domain + "/en_IT/static/flash/eni-world/";
 Configurazione.supportoRicercaUrl = domain + "/en_IT/static/flash/eni-world/supportoRicerca.swf";
 Configurazione.radiobuttonsUrl = domain + "/en_IT/static/flash/eni-world/radiobuttons.swf";
 Configurazione.swfBalloon = "preload_balloon.swf";
 Configurazione.swfResults = domain + "/en_IT/static/flash/eni-world/results.swf";
 Configurazione.config_user = "dnsee";

/**
 * function EventDispatcher()
 * 
 * @type constructor
 * @memberOf EventDispatcher
 */
function EventDispatcher() {
	this._listeners = new Array();
	this.addListener(this);
}

/**
 * property _listeners
 * @type Array
 * @memberOf EventDispatcher
 */
EventDispatcher.prototype._listeners = null;
/**
 * function addListener()
 * 
 * @memberOf EventDispatcher
 */
EventDispatcher.prototype.addListener = function(o) {
	this.removeListener(o);
	return this._listeners.push(o);
}
/**
 * function removeListener()
 * @memberOf EventDispatcher
 */
EventDispatcher.prototype.removeListener = function(o) {
	var a = this._listeners;
	var i = a.length;
	while (i--) {
		if (a[i] == o) {
			a.splice(i, 1);
			return true;
		}
	}
	return false;
}
/**
 * function broadcastMessage()
 * @memberOf EventDispatcher
 */
EventDispatcher.prototype.broadcastMessage = function() {
	var arr = new Array();
	for ( var i = 0; i < arguments.length; i++) {
		arr.push(arguments[i])
	}
	var e = arr.shift();
	var a = this._listeners;
	var l = a.length;
	for ( var i = 0; i < l; i++) {
		if (a[i][e])
			a[i][e].apply(a[i], arr);
	}
}

function trace(value) {
	try {
		console.log("##GE_APP## "+value);
	} catch (e) {

	}
}

// ONLOAD

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}
