
function appli() {
	
	this.Appli="";
	this.Label="";
	this.Login="";
	this.Password="";
	this.lastpageshown="";

}


// itemname = le tag formant l'enveloppe 
// return list of appli objects to which user has acces
function UserApplisXmltoArray(xmlinfo, itemname) {

	var list=new Array();
	
	var fiches = XMLtoArray(xmlinfo, itemname);	
	var ind=0;
	while (	fiches[ind]!=null) {
		list[list.length]=getUserApplisXml(fiches[ind]);
		ind++;
	}

	return list;
}


// Converts xml into object appli (Appli, Login, Password)
function getUserApplisXml(xmlnode) {
	
	var Item = new appli();
	Item.Appli		= getTagInfo("id", 		xmlnode);
	Item.Password	= getTagInfo("password", xmlnode);
	Item.Login		= getTagInfo("login", 	xmlnode);

	return Item; 	
}


function authorization() {
	
	this.Data="";
	this.Authorization="";
}


function UserAuthsXmltoArray(xmlinfo, itemname) {

	var list=new Array();
	
	var fiches = XMLtoArray(xmlinfo, itemname);	
	var ind=0;
	while (	fiches[ind]!=null) {
		list[list.length]=getUserAuthXml(fiches[ind]);
		ind++;
	}

	return list;
}


function getUserAuthXml(xmlnode) {
	
	var Item = new authorization();
	Item.Data			= getTagInfo("data", 		 xmlnode);
	Item.Authorization	= getTagInfo("authorization", xmlnode);

	return Item; 	
}


