var VariablePressePapier = 1; //0=non ; 1=oui
function CopierPressePapier(lechamp)
{
	var RaccourciObjet = eval("document."+lechamp);
	RaccourciObjet.focus();
	RaccourciObjet.select();
	if (document.all && VariablePressePapier == 1)
	{
		copiage = RaccourciObjet.createTextRange();
		copiage.execCommand("Copy");
		window.status = "copié dans le presse papier.";
		setTimeout("window.status='';", 1800);
	}
}

function devoile_secret(div2){
	var divs = div2.getElementsByTagName('div');
	var div3 = divs[0];
	if(div3.style.visibility == 'visible') div3.style.visibility='hidden';
	else{div3.style.visibility='visible'; return true}
}

function correctPNG()
{
	for(var i=0; i < document.images.length; i++)
	{
		var img = document.images[i];
		var imgName = img.src.toUpperCase();
		if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
		{
			var imgID = (img.id) ? "id='" + img.id + "' " : "";
			var imgClass = (img.className) ? "class='" + img.className + "' " : "";
			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
			var imgStyle = "display:inline-block;" + img.style.cssText;
			if (img.align == "left") imgStyle = "float:left;" + imgStyle;
			if (img.align == "right") imgStyle = "float:right;" + imgStyle;
			if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
			var strNewHTML = "<span " + imgID + imgClass + imgTitle
			+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
			+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
			+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>";
			img.outerHTML = strNewHTML;
			i--;
		}
	}
}

if (navigator.appName == 'Microsoft Internet Explorer')
{
	if(parseFloat(navigator.appVersion) >= 5)
	{
		attachEvent("onload", correctPNG);
	}
}

// Voici la fonction pour activer ou désactiver le menu de connexion
function affiche_retire()
{
	if(get_form_display = document.getElementById('panel_connexion').style.display)
	{
		if(get_form_display == 'block')
		{
			document.getElementById('panel_connexion').style.display = 'none';
		}
		else
		{
			document.getElementById('panel_connexion').style.display = 'block';
		}
	}
}

/*
SCRIPT TROUVE SUR L'EDITEUR JAVASCRIPT
http://www.editeurjavascript.com

Disable select-text script (IE4+, NS6+)- By Andy Scott
Exclusive permission granted to Dynamic Drive to feature script
Visit http://www.dynamicdrive.com for this script
*/
function disableselect(e){
return false;
}
function reEnable(){
return true;
}
//if IE4+
document.onselectstart=new Function ("return false");
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}