function MM_preloadImages() { //v3.0
	var d=document;
	if(d.images){
		if(!d.MM_p)
			d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
		for(i=0; i<a.length; i++)
    		if (a[i].indexOf("#")!=0){
				d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
			}
	}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
 
function MM_findObj(n, d) { //v4.01
	var p,i,x;
	if(!d) d=document;
	if((p=n.indexOf("?"))>0 && parent.frames.length) {
	    d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
  	if(!(x=d[n]) && d.all)
		x=d.all[n];
	for (i=0;!x&&i<d.forms.length;i++)
		x=d.forms[i][n];
 	for(i=0;!x&&d.layers&&i<d.layers.length;i++)
		x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById)
		x=d.getElementById(n);
	
	return x;
}
 
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments;
  document.MM_sr=new Array;
  for(i=0;i<(a.length-2);i+=3)
  	if ((x=MM_findObj(a[i]))!=null){
		document.MM_sr[j++]=x;
		if(!x.oSrc)
			x.oSrc=x.src;
		x.src=a[i+2];
		//alert(a[i+2]);
	}
}

function selectMenu(identifiant)
{
	//alert(identifiant);
	myObj = document.getElementById('lidiv'+identifiant);
	if(myObj != null)
		myObj.style.borderBottom = '1px dashed white';
	
	
	myObj2 = document.getElementById('sousmenu');
	if(myObj2 != null)
	{
		if(identifiant == 4 || identifiant == 5 || identifiant == 464 || identifiant == 465)
			myObj2.style.display = '';
		else
			myObj2.style.display = 'none';
	}
}

function selectPaging(identifiant)
{
	myObj = document.getElementById('PagingDiv'+identifiant);
	if(myObj != null)
	{
		myObj.className =  "pagingSelected";
		/*myObj.style.backgroundImage = '../assets/images/fondPaging.jpg';
		myObj.style.backgroundRepeat = 'repeat';*/
	}
	myObj2 = document.getElementById('aPaging'+identifiant);
	if(myObj2 != null)
	{
		//myObj2.className = 'url(../assets/images/fondPaging.jpg) top left repeat';
		/*myObj.style.backgroundImage = '../assets/images/fondPaging.jpg';
		myObj.style.backgroundRepeat = 'repeat';*/
	}
}

function menuClick(identifiant)
{
	MM_swapImage('logo','','http://www.p-graphicbox.com/assets/images/logo-click.jpg',1);
}

function menuOver(identifiant)
{
	myObj = document.getElementById('lidiv'+identifiant);
	if(myObj != null)
		myObj.style.borderBottom = '1px dashed white';
	MM_swapImage('logo','','http://www.p-graphicbox.com/assets/images/logo-hover.jpg',1);
}

function menuOut(identifiant, identpage, ultimateId)
{
	myObj = document.getElementById('lidiv'+identifiant);
	if(myObj != null)
		myObj.style.borderBottom = 'none';
	MM_swapImage('logo','','http://www.p-graphicbox.com/assets/images/logo-normal.jpg',1);
	if(identpage != 'undefined')
		selectMenu(ultimateId);
}
function onDivClick(id)
{
	alert(id);
	myObj = document.getElementById('link'+id);
	if(myObj != null)
	{
		myObj.click();
	}
}