

/*------------------------------------------------------------------------------------------------------*/

/*---Tableaux des éléments de la page Profil--*/

var projets_2007 = new Array ('','nicolascanal', 'v150', 'amora', 'pmdm', 'pernod', 'idverte');

var liste_2006 = new Array ('','2006-liste-1', '2006-liste-2', '2006-liste-3');

var projets_2005 = new Array ('', 'site-afip', 'appz-afip', 'intranet-irit');

function switchDisplay_moded(tab, id) {
	var i;
	for (i = 1; i < eval(tab).length; i++) {
		if(i != id){
			document.getElementById(eval(tab)[i]).style.display = 'none';
		}
		
		else{
			document.getElementById(eval(tab)[id]).style.display = 'block';
		}
	}
}

/* --- effet de rollover sur les images --- */
/* --- change plusieurs images au rollover --- */
function swapAHover(elmt) {
	var img = elmt.getElementsByTagName('img');
	
	for (i = 0; i < img.length; i++) {
		image=img[i];
	
		posin = image.src.lastIndexOf('-off');
		posout = image.src.lastIndexOf('.');
			
		if (posin > -1)  {
			image.src = (image.src).substring(0, posin)+'-on'+(image.src).substring(posout);		
		}
		else  {
			posin = image.src.indexOf('-on');
			image.src = (image.src).substring(0, posin)+'-off'+(image.src).substring(posout);
		}
	}
}

/* --- change une image au rollover --- */
function swapHover(elmt) {
	var posin = elmt.src.lastIndexOf('-on');
	var posout = elmt.src.lastIndexOf('.');
	if (posin > -1)  {
		elmt.src = (elmt.src).substring(0, posin)+'-off'+(elmt.src).substring(posout);		
	}
	else  {
		posin = elmt.src.lastIndexOf('-off');
		elmt.src = (elmt.src).substring(0, posin)+'-on'+(elmt.src).substring(posout);
	}
}

/* --- afficher ou masquer un contenu --- */
function swapContent(elmt, container, content) {
	/* -- verifie si on masque ou affiche -- */
	posin = elmt.src.lastIndexOf('-close');
	posout = elmt.src.lastIndexOf('.');
	
	var contenant = document.getElementById(container);
	
	var blocs = contenant.getElementsByTagName('div');		
	if (posin > -1)  {
	/* affiche alors on le masque */
		/* -- etat du bouton -- */	
		elmt.src = (elmt.src).substring(0, posin)+'-open'+(elmt.src).substring(posout);
		elmt.setAttribute('alt', 'Afficher');
		for (i = 0; i < blocs.length; i++) {
			if (blocs[i].className == content) blocs[i].style.display = 'none';	
		}
		
	}
	else  {
		posin = elmt.src.lastIndexOf('-open');
		elmt.setAttribute('alt', 'Masquer');
		elmt.src = (elmt.src).substring(0, posin)+'-close'+(elmt.src).substring(posout);		
		for (i = 0; i < blocs.length; i++) {
			if (blocs[i].className == content) blocs[i].style.display = 'block';	
		}
	}	
}

/*--- affichage d'informations dans la barre d'état ---*/
function texte_ds_barre_etat(){ 
var mess = "Nicolas CANAL - Chef de Projet Internet";
window.defaultStatus = mess;
}





