
function testallsizes(){
lemenu = document.getElementById('menu');
menuWidth = lemenu.offsetWidth;
totalWidth = document.body.clientWidth;
menuLeft = (totalWidth-menuWidth)/2 ;
maxleft = menuWidth+menuLeft-161 
}








//SLIDE MENU V.1 


//Déclaration de mes variable d'état

actif = "aucun"; // Défini lequel est en animation
onwait = "no";  //Défini lequel est en attente

function slideMenu(div,location1){

	target =  location1
	
	
	//heightmax = height; // la hauteur maximal que je veux setter
	mondiv = document.getElementById(div); // je set mon layer
	mondiv2 = document.getElementById('MenuTop')
	currentwidth = mondiv.offsetWidth
	//alert(currentwidth);
	resize()
}


function resize(){
	if (currentwidth > 4){
		
		
		mondiv.style.width=currentwidth-9+"px"
		mondiv2.style.width=currentwidth-9+"px"
		currentwidth = mondiv.offsetWidth
		window.setTimeout("resize()",1);
	
	
	}
	
	else{
	mondiv.style.background='#ece8e4'
		resize2()
	}
}
	
	
	
function resize2(){
if (currentwidth <= 156){
		
		mondiv.style.width=currentwidth+9+"px"
		mondiv2.style.width=currentwidth+9+"px"
		currentwidth = mondiv.offsetWidth
		window.setTimeout("resize2()",1);
		
		}
		else{
			mondiv.style.width=161+"px"
		
			window.location.href=target
		
		}
	}

function mouseX(evt) {
	
	
	if (!evt) evt = window.event;
	if (evt.pageX) return evt.pageX;
	else if (evt.clientX ) return evt.clientX + (document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft);
	else return 0;
}

function follow(evt) {
	maxleft = typeof(maxleft) != 'undefined' ? maxleft : '';
	//if(maxleft) {
		var obj = document.getElementById(divName).style;
		var pos = parseInt(mouseX(evt))+offX;
		if (pos < maxleft && pos > menuLeft) {
			obj.visibility = 'visible';
			obj.left = pos + 'px';
		} else {
			if (pos > maxleft) obj.left = maxleft+'px';
			else if (pos < menuLeft) obj.left = menuLeft+'px';
		}
	//}
}








function flash(current,linkk,lang){
current2 = current+'.jpg' ;
var monswf = window.document.monflash;
monswf.SetVariable("img", current2);
monswf.SetVariable("link", linkk);
monswf.SetVariable("portfolioWeb_current", current);
monswf.Play();
//alert(lang);
callAjax(escape('formId=sectAlbum&id='+current+'&link='+linkk+'&lang='+lang),root+'process.php','Desc');

}





function folio(section){

alert(section)


}








