/* Initialization of the global variable Katoa and of katoa.config.  */

/**
 * @namespace name sapce of application
 * @author BDM
 */
var Katoa = {
	
	/**
	 * @public
	 */
	config:{
		/*
		 * @public
		 */
		language:document.documentElement.getAttribute("lang"),
		/**@constant*/
		debugLog:true,
		/**@constant*/
		debugFlex:false
	},
	
	/**
	 * @public
	 */
	backstage: {
		/*
		 * [EN] array of title news of backstage
		 * @public
		 */
		data:null,
		/*
		 * [EN] callback function to call at the end load data of backstage
		 * @public
		 */
		callback:[]
	}
};


/* Get back the language of the site.  */
if (window.location.search.match("(\\?|&)debug=")) {
	var log = window.location.search.replace(RegExp(".*(\\?|&)debug=([^&]*).*", "i"), "$2");
	Katoa.config.debugLog = (log=="true");
	Katoa.config.debugFlex = (log=="true");
	delete log;
}