
/*
 * Fonction a utiliser pour charger une nouvelle adresse 
 */
function goPage(location)
{
	wait();
	parent.location.href=location;
}

/* Fonction a utiliser pour soumettre un formulaire en changeant l'action*/
function goForm(action, form)
{
	wait();
	if (action != null)
	{
		form.action=action;
	}
	form.submit();
}

/* Retour aux informations d'identification */
function goInfoPerso()
{
	goPage('afficherInfoPersoNouveau.do');
}

/* Chargement du formulaire avec page d'attente */
function load(form)
{
	wait();
	form.submit();
}

/* Fonction permettant d'ouvrir le dialogue de recuperation du mot de passe */
function ouvrirPopupRetrouverPass()
{
	sm('motDePasse', 300, 75);
}

/* Fonction permettant de remonter l'element fils d'un composant a partir d'un id 
   Sert si il y a plusieurs id dans la meme page  */

function getChildById( sId , dParentElement ,sChildNodeTagName )
{
	if(!sId || typeof(sId) !='string' ){ return null;};
	if(!sChildNodeTagName || typeof(sChildNodeTagName) !='string' ){sChildNodeTagName = '*' };

	if( typeof(dParentElement) =='string')
	{
		dParentElement = document.getElementById(dParentElement);
	};
	
	if( !dParentElement || ( dParentElement!=document && !dParentElement.nodeType ) )
	{
		dParentElement = document;
	};
    
	var dCollection = (dParentElement.all || dParentElement.getElementsByTagName('*'));

	var dNamedItem = dCollection.namedItem(sId);
	if(!dNamedItem && window.opera )
	{
		/*yep, stupid Opera fail again!*/
		for(var i=0,j=dCollection.length;i<j;i++)
		{
			if(dCollection[i]['id'] == sId)
			{
				dNamedItem = dCollection[i];
				break;
			};
		};
	};
	
	return ( dNamedItem[0] || dNamedItem );
};

   