function PopupImage(img) {
	titre="Zoom";
	w=open("",'image','left=200,top=200,width=400,height=400,toolbar=no,scrollbars=no,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function openWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function Confirmation(msg,lien) {
	var n = false;
	n = confirm (msg);
	if (n)
	document.location.href=lien;
}

function ConfirmationForm(msg,formName,typeSup) {
	var n = false;
	n = confirm (msg);
	if (n) {
		if(document.forms[formName].typeSup){ document.forms[formName].typeSup.value = typeSup; }
		document.forms[formName].submit();
	}
}



var isIE = document.all;
var mouseX = 0;
var mouseY = 0;

function getMouseXY(e)
{
	if (!e) e = window.event;	
	if (e)
	{
		mouseX = isIE ? (e.clientX + document.body.scrollLeft) : e.pageX;
		mouseY = isIE ? (e.clientY + document.body.scrollTop) : e.pageY;
		
	}
	document.getElementById("etiquette").style.left = mouseX+10 +"px";
	document.getElementById("etiquette").style.top = mouseY+10 +"px";
	if(mouseX < screen.width/2){
		document.getElementById("etiquette").style.left = mouseX+10 +"px";
	} else {
		document.getElementById("etiquette").style.left = mouseX-320 +"px";
	}
	if(mouseY < screen.height/2)
		{
		document.getElementById("etiquette").style.top = mouseY+10 +"px";
		}
	else {
		document.getElementById("etiquette").style.top = mouseY-320 +"px";
		
		}
	

	//document.getElementById("etiquette").style.top=screen.height/2-130;
}
document.onmousemove = getMouseXY;
function affichEtiquette(msg)
{
	document.getElementById("etiquette").innerHTML=msg;
	document.getElementById("etiquette").style.display='block';
}

function cachEtiquette () {
	document.getElementById('etiquette').innerHTML = "";;
	document.getElementById('etiquette').style.display='none';
}
function cacheZoom () {
	document.getElementById('imageZoom').style.display='none';
	document.getElementById('pleinecran').style.display='none';
}




function hide(id) {
	document.getElementById(id).style.display = 'none';
}
function show(id) {
	document.getElementById(id).style.display = 'block';
}
function inverse_display(id) {
	if (document.getElementById(id).style.display == 'none' || document.getElementById(id).style.display == '')
		{
		document.getElementById(id).style.display = 'block';
		}
	else
		{
		document.getElementById(id).style.display = 'none';
		}
}
function hide_extension(nombre) 
	{
	for (i=1;i<(nombre+1);i++)
		{
		id='extension_'+i;
		hide(id)
		}	
	}


//////////////////////////////////////// Menu //////////////////////////////////////////////

var	timerID;
var	folder_ico = new Image;
var	open_folder_ico	= new Image;
folder_ico.src = 'images/design/plus.gif';
open_folder_ico.src = 'images/design/moins.gif';


t_dom = document.getElementById ? 1 : 0;
b_ie5 = (navigator.appVersion.indexOf("MSIE 5")>-1 && t_dom) ? 1 : 0;
b_ie6 = (navigator.appVersion.indexOf("MSIE 6")>-1 && t_dom) ? 1 : 0;
b_ie4 = (document.all && !t_dom) ? 1 : 0;
b_ns6 = (!document.all && t_dom && parseInt(navigator.appVersion) >= 5) ? 1 : 0;
b_ns4 = (document.layers && t_dom) ? 1 : 0;

/*** prechargement images rollover ***/


function collapse(obj,ouvre)
{
	if(b_ie6||b_ie5||b_ns6)
	{
		elem = document.getElementById(obj);
		if (elem.style.display == 'none')
		{
			elem.style.display = '';
			document.images[obj + 'ico'].src = open_folder_ico.src;
		}
		else
		{
			elem.style.display = 'none';
			document.images[obj + 'ico'].src = folder_ico.src;
		}
	}
	return(true);
}

function show_bande_rouge(numero_id)
	{
	hide('texte_categorie_defaut');
	show('texte_categorie_'+numero_id);
	show('fleche_'+numero_id);
	}
	

function hide_bande_rouge(numero_id)
	{
	hide('texte_categorie_'+numero_id);
	hide('fleche_'+numero_id);
	show('texte_categorie_defaut');
	}
	




