function showL (layer) {
	if (document.getElementById('texte0').style.display == '') {
		document.getElementById('texte0').style.display='none';
	}
	document.getElementById( layer ).style.display='block';
}

function hideL (layer) {
	document.getElementById( layer ).style.display='none';
}

function m_opacity (id_menu, classe) {
	document.getElementById(id_menu).className = classe;

}
function no_opacity (id_menu, classe) {
	document.getElementById(id_menu).className = classe;
}
function soumettre (lang) {

	if( validateForm( 'main_form',lang ) ){
		var oSelect = document.getElementById('main_form').getElementsByTagName("SELECT");
		for(var i=0;i<oSelect.length;i++){
			if(oSelect[i].multiple==true){
				oSelect[i].name = oSelect[i].name+'[]';
				if(oSelect[i].className=='selector'){
					NbCol1 = oSelect[i].length;
					// On lance une boucle pour selectionner tous les items
					for(a=0; a<NbCol1; a++){
						oSelect[i].options[a].selected = true;
					}
				}
			}
		}
		var oInput = document.getElementById('main_form').getElementsByTagName("INPUT");
		for(var i=0;i<oInput.length;i++){
			if(oInput[i].type=="checkbox"){
				oInput[i].name = oInput[i].name+'[]';
			}
		}
		document.getElementById('main_form').submit();
	}else{
		//afficheId('inscription-etape-01');
		//cacheId('inscription-etape-02');
	}
}
function popupWindow(url, largeur, hauteur)
{
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(url, "popup","top="+top+",left="+left+",width="+largeur+",height="+hauteur+",toolbar=no,location=no,scrollbar=no,status=no,menubar=no'");
}

function PopupCentrer(page,largeur,hauteur,options) {
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
function favoris(url,name) {
	if ( navigator.appName != 'Microsoft Internet Explorer' ){
		window.sidebar.addPanel(name,url,"");
	}else{
		window.external.AddFavorite(url,name);
	}
}


function afficher_date()
{

}

function afficheId(baliseId)
{
	if (document.getElementById && document.getElementById(baliseId) != null)
	{
		//document.getElementById(baliseId).style.visibility='visible';
		document.getElementById(baliseId).style.display='block';
	}
}

function cacheId(baliseId)
{
	if (document.getElementById && document.getElementById(baliseId) != null)
	{
		//document.getElementById(baliseId).style.visibility='hidden';
		document.getElementById(baliseId).style.display='none';
	}
}


function AfficherCacher(object_id){
 var obj=document.getElementById(object_id)	
 if(obj.style.display == 'block')
  obj.style.display='none'
 else
  obj.style.display='block'
 }

