function Ident() {
	HTML_AJAX.formSubmit('IdentForm',function (RetourXML){
		var UserID=RetourXML.getElementsByTagName('UserID').item(0).firstChild.data;
		switch (UserID) {
			case '0':
				var Msg="<b>Erreur lors de l'identification</b>";
				$("#IdentMsg").html(Msg);
				break;
			default:
				var Url=window.location.href;
				location.href=Url.replace('logout','login');
				break;
		}
	});
}

function ShowBox(Msg) {
	
	//Formatage
	Msg='<div id="FancyBoxMsg">'+Msg+'</div>';
	
	$.fancybox(
		Msg,
		{
        	'autoDimensions'	: true,
			'height'        	: 'auto',
			'transitionIn'		: 'none',
			'transitionOut'		: 'none'
		}
	);
}

function Waiting(State) {
	
	if (State==1) {
		jQuery('#MyriadesContainer').showLoading();
	}
	else {
		jQuery('#MyriadesContainer').hideLoading();
	}
	
}

function LoadingMsg(State) {
	
	if (State==1) {
		$.fancybox(
			"Chargement...",
			{
	        	'autoDimensions'	: true,
	        	'showCloseButton'	: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			}
		);
	}
	else {
		$.fancybox.close;
	}
	
}
