var objsave = null;

function viewText(idbox,idlink,img,objlink)
{
	// modification du menu
	var menuPro = new Array();
	menuPro = document.getElementById('listeprofil').getElementsByTagName('li');
	for (i=0; i<menuPro.length; i++) { 
			menuPro[i].setAttribute('style','');
			menuPro[i].style.cssText = '';
			var menuImg = new Array();
			menuImg = menuPro[i].getElementsByTagName('img');
			for (j=0; j<menuImg.length; j++) { menuImg[j].className = "mess-profil";  }
	}
	document.getElementById(idlink).setAttribute("style",'background-position:0px -125px;height:155px;');
	document.getElementById(idlink).style.cssText = 'background-position:0px -125px;height:155px;';
	menuPro = document.getElementById(idlink).getElementsByTagName('img');
	for (i=0; i<menuPro.length; i++) { menuPro[i].className = "";  }
	if(objsave != null) {
		objsave.setAttribute('style','');
		objsave.style.cssText = "";
	}
	objlink.setAttribute("style",'color:#FFFFFF;');
	objlink.style.cssText = "color:#FFFFFF;";
	objsave = objlink;
	
	// modification du text
	var textPro = new Array();
	textPro = document.getElementById('descprofil').getElementsByTagName('div');
	for (i = 0; i < textPro.length; i++) { 
		if(textPro[i].className  != "text-profil-select" && textPro[i].className  != "desc-profil-select")
			textPro[i].className = 'mess-profil';
	}
	
	textPro = document.getElementById(idbox).getElementsByTagName('div');
	for (i = 0; i < textPro.length; i++) { 
		if(textPro[i].className  == "desc-profil-select")
			textPro[i].style.backgroundImage = 'url(\'images/' + img + '.gif\')';
	}
	document.getElementById(idbox).className = '';
}