	function slide(id, posStart, posEnd, millisec, direction) {
			var speed = Math.round(millisec / 100);
			var timer = 0;
			if(posStart > posEnd) {
				for(i = posStart; i >= posEnd; i--) 
				{
					setTimeout("changeBackgroundPos(" + i + ","+ direction + ",'" + id + "')",(timer * speed));
					timer++;
				}
			} else if(posStart < posEnd) {
				for(i = posStart; i <= posEnd; i++) 
				{
					setTimeout("changeBackgroundPos(" + i + ","+ direction + ",'" + id + "')",(timer * speed));
					timer++;
				}
			}		 
	}
	function changeBackgroundPos(position, direction, id) {
			if(direction == 1) {document.getElementById(id).style.backgroundPosition = "0px " + position + "px";}
			else if(direction == 2) {document.getElementById(id).style.backgroundPosition = position + "px" + " 0px";}
	}
		
	function opacity(id, opacStart, opacEnd, millisec) {

    var speed = Math.round(millisec / 100);
    var timer = 0;


    if(opacStart > opacEnd) {
			for(i = opacStart; i >= opacEnd; i--) {
				setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
				timer++;
			}
		} else if(opacStart < opacEnd) {
			for(i = opacStart; i <= opacEnd; i++)
				{
				setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
				timer++;
			}
		}
	}


	function changeOpac(opacity, id) {
		var object = document.getElementById(id).style;
		object.opacity = (opacity / 100);
		object.MozOpacity = (opacity / 100);
		object.KhtmlOpacity = (opacity / 100);
		object.filter = "alpha(opacity=" + opacity + ")";
	} 
	
	function montrer(id)
	{
		document.getElementById(id).style.display = 'block';
	}
	function cacher(id)
	{
		document.getElementById(id).style.display = 'none';
	}
	function setCouleur(id, couleur)
	{
		document.getElementById(id).style.backgroundColor = couleur;
	}
	function getPositionY(e)
	{
		return(e.clientY); //sous IE6+       
	}
	function setPositionMenu(id,e)
	{
		var scrollY = getScrollPosition()[1];
		document.getElementById(id).style.left = (e.clientX + 10) + 'px';
		document.getElementById(id).style.top = (e.clientY - 50 + scrollY) + 'px';
	}
	function getScrollPosition()
	{
		return Array((document.documentElement && document.documentElement.scrollLeft) || window.pageXOffset || self.pageXOffset || document.body.scrollLeft,(document.documentElement && document.documentElement.scrollTop) || window.pageYOffset || self.pageYOffset || document.body.scrollTop);
	}
	function chargerIFrame(id, source)
	{
		document.getElementById(id).src = source;
	}
	function adjustIFrameSize (iframeWindow) {
		if (iframeWindow.document.height) {
			var iframeElement = document.getElementById(iframeWindow.name);
			iframeElement.style.width = '260px';
			if (iframeWindow.document.height < 400)
			{
				iframeElement.style.height = iframeWindow.document.height + 'px';
				//iframeElement.style.width = iframeWindow.document.width + 'px';
			}
			else {iframeElement.style.height = '400px'; iframeElement.style.overflow = 'auto';}
		}
		else if (document.all) {
			var iframeElement = document.all[iframeWindow.name];
			if (iframeWindow.document.compatMode && iframeWindow.document.compatMode != 'BackCompat') 
			{
				iframeElement.style.width = '260px';
				if (iframeWindow.document.documentElement.scrollHeight < 400)
				{
					iframeElement.style.height = iframeWindow.document.documentElement.scrollHeight + 0 + 'px';
					//iframeElement.style.width = iframeWindow.document.documentElement.scrollWidth + 0 + 'px';
				}
				else {iframeElement.style.height = '400px'; iframeElement.style.overflow = 'auto';}
			}
			
			else {
				iframeElement.style.width = '260px';
				if (iframeWindow.document.body.scrollHeight < 400)
				{
					iframeElement.style.height = iframeWindow.document.body.scrollHeight + 5 + 'px';
					//iframeElement.style.width = iframeWindow.document.body.scrollWidth + 5 + 'px';
				}
				else {iframeElement.style.height = '400px'; iframeElement.style.overflow = 'auto';}
			}
		}
	}
	
	function refresh(id){
	document.getElementById(id).src = './sous-menu/'+ id +'.html'
	}
	function openFiche(numeroFiche)
	{
		document.getElementById('frameContenu').src = './nouveau/fiche'+ numeroFiche +'.html';
		
	}

	
	
	//inutil pour le moment
	
	function setHeight(id)
	{
		var hauteur;  
		var iframe = document.getElementById(id);  
		if( document.all )
		hauteur = iframe.contentWindow.document.body.scrollHeight + 15;  
		else
		hauteur = iframe.contentWindow.document.body.offsetHeight + 15;
		iframe.setAttribute( "height", hauteur );  
	} 
	function actu_iframe()
	{
		if(document.all) {document.all.ssmenu2.style.height = document.frames("ssmenu2").document.body.scrollHeight;}
		else {document.getElementById("ssmenu2").style.height = document.getElementById("ssmenu2").contentDocument.body.scrollHeight;}
	}
	/*function test()
	{
		document.getElementById('menu1').onmouseout = action;
	}
	function action(event){
		event.cancelBubble = true;
		alert("ok");
	}*/
	
	
	