/*
LocationIdManager gère l'affichage et la mise à jour de la location (position de l'internaute dans le site)
ainsi que l'identification de l'utilisateur

méthodes :
initContent - crée et initialise le swf
show/hide - affiche/masque le swf
setLocation (aTab) - définis la location

propriétés :
initialized - booléen qui détermine si le swf est initialisé

événements :
onInit - appelé à la fin de l'intialisation du swf

requêtes :
requestOpenPage (aIdPage) - appelé lorsque l'utilisateur clique sur un item
*/


LocationIdManager = new Object();
//
LocationIdManager.initContent = function(){
	var vObj = writeSwf("swf/location_id.swf", "location_id", 900, "100%", "JSManager=LocationIdManager.swf");
	var vSwf = this.swf = vObj.swf;
	var vDiv = this.div = vObj.div;
	this.hauteurSwf = 48;
	// modification des styles du div
	this.initDiv();
	// initialisation des événements du swf
	this.initSwf();
	// masquage
	this.hide();
	vDiv.style.width = vSwf.width;
	vDiv.style.borderBottom = "#999999 solid 1px";
};
LocationIdManager.show = function (){
	this.div.style.height = this.hauteurSwf;
};
LocationIdManager.hide = function (){
	this.div.style.height = 0;
};
LocationIdManager.setLocation = function (aTab){
	this.swf.setLocation (aTab);
};
//¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
// METHODES PRIVEES
//__________________
//
LocationIdManager.initDiv = function(){
	var vDiv = this.div;
	vDiv.style.borderBottom = "#999999 solid 1px";
};
LocationIdManager.initSwf = function(){
	var vSwf = this.swf
	vSwf.refThis = this;
	vSwf.onInit = function (){
		this.refThis.initialized = true;
		this.refThis.onInit();
	};
	vSwf.requestOpenPage = function (aTabNodeId){
		var vStr = ""+aTabNodeId;
		var vTab = vStr.split("_");
		for (var i=0; i<vTab.length; i++){
			vTab[i] = Number (vTab[i]);
		}
		this.refThis.requestOpenPage(vTab);
	};
	vSwf.onLogError = function (aMsg){
		alert ("Message de login :\n"+aMsg);
	};
	vSwf.onLogedIn = function (){
		this.refThis.onLogedIn();
	};
};