function affInformation(message)
{
	setVisible('affDialog');
	document.getElementById('affDialog').setAttribute("title", 'Information !');
	document.getElementById('affDialog').innerHTML = '<p><span class="ui-icon ui-icon-check" style="float:left; margin:0 7px 20px 0;"></span> ' + message + '</p>';
	
	$("#affDialog").dialog(
	{
		autoOpen : true,
		bgiframe: false,
		resizable: false,
		draggable: false,
		height: 140,
		width : 250,
		modal: false,
		position:['right', 'bottom'],
	//	show: 'clip',
	//	hide: 'clip',
		overlay:
		{
			backgroundColor: '#000',
			opacity: 1
		},
		buttons:
		{
			'Ok': function()
			{
				$(this).dialog('close');
				deleteDialog("#affDialog");
			}
		}
	});
	
	setTimeout(function(){
		$("#affDialog:visible").dialog('close');
		deleteDialog("#affDialog");
	}, 1500);
}

function afficheError(message, funcCallBack)
{
	setVisible('affDialog');
	document.getElementById('affDialog').setAttribute("title", 'Erreur !');
	document.getElementById('affDialog').innerHTML = '<p><span class="ui-icon ui-icon-cancel" style="float:left; margin:0 7px 20px 0;"></span> ' + message + '</p>';
	
	$("#affDialog").dialog(
	{
		autoOpen : true,
		bgiframe: true,
		resizable: false,
		draggable: false,
		height:120,
		width : 340,
		modal: true,
		overlay:
		{
			backgroundColor: '#000',
			opacity: 0.5
		},
		buttons:
		{
			'Ok': function()
			{
				if (funcCallBack != null)
					eval(funcCallBack + '()');
				
				$(this).dialog('close');
				deleteDialog("#affDialog");
			}
		}
	});
}

function afficheDialog(message, funcCallBackYes, funcCallBackNo)
{
	setVisible('affDialog');
	document.getElementById('affDialog').setAttribute("title", 'Question ?');
	document.getElementById('affDialog').innerHTML = '<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span> ' + message + '</p>';
	
	$("#affDialog").dialog(
	{
		autoOpen : true,
		bgiframe: true,
		resizable: false,
		draggable: false,
		height:120,
		width : 340,
		modal: true,
		overlay:
		{
			backgroundColor: '#000',
			opacity: 0.5
		},
		buttons:
		{
			'Oui': function()
			{
				if (funcCallBackYes != null)
					eval(funcCallBackYes + '()');
				
				$(this).dialog('close');
				deleteDialog("#affDialog");
			},
			'Non': function()
			{
				if (funcCallBackNo != null)
					eval(funcCallBackNo + '()');
				
				$(this).dialog('close');
				deleteDialog("#affDialog");
			}
		}
	});
}

function afficheForm(formName, funcCallBack)
{
	setVisible(formName);
	
	document.getElementById(formName).setAttribute("title", 'Formulaire :');
	sId = document.getElementById(formName).getAttribute('id');
	
	if( formName == 'contactUser' )
	{
		iHeight = 300;
		iWidth = 500;
	}
	else
	{
		select = document.getElementById(formName).note;
		select.selectedIndex = avParams['note'] - 1;
		iHeight = 120;
		iWidth = 200;
	}
	
	$("#" + sId).dialog(
	{
		autoOpen : true,
		bgiframe: true,
		resizable: false,
		draggable: false,
		height: iHeight,
		width : iWidth,
		modal: true,
		overlay:
		{
			backgroundColor: '#000',
			opacity: 0.5
		},
		buttons:
		{
			'Envoyer': function()
			{
				if (funcCallBack != null)
					eval(funcCallBack + '()');
				$(this).dialog('close');
				deleteDialog("#" + sId);
			}
		}
	});
}

function deleteDialog(sId)
{
	$(sId).dialog('destroy');
}

function setVisible(sId)
{
	document.getElementById(sId).style.visibility = 'visible';
	document.getElementById(sId).style.display = 'block';
}

function setHidden(sId)
{
	document.getElementById(sId).style.visibility = 'hidden';
	document.getElementById(sId).style.display = 'none';
}

function inscription()
{
	window.location = url_site;
}