

//--------------------------------------------------------------------------
//  AfficheDivision
//  Rev. 20.2.09 - info@point-i.ch
//
//--------------------------------------------------------------------------
function AfficheDivision(stElementId) {        

    var div = document.getElementById(stElementId);
    div.style.visibility = 'visible';
}
    
    
//--------------------------------------------------------------------------
//  CacheDivision
//  Rev. 26.9.08 - info@point-i.ch
//
//--------------------------------------------------------------------------
function CacheDivision(stElementId) {        

    var div = document.getElementById(stElementId);
    div.style.visibility = 'hidden';
    } 



//--------------------------------------------------------------------------
//  AfficheDivision
//  Rev. 20.2.09 - info@point-i.ch
//
//--------------------------------------------------------------------------
function MonteDivision(stElementId) {        

    var div = document.getElementById(stElementId);
    div.style.zIndex  = '500';
}


//--------------------------------------------------------------------------
//  PointiFlash 
//  Rev. 1.1.06 - info@point-i.ch
//--------------------------------------------------------------------------
function PointiFlash(FichierFlash, movieWidth, movieHeight) {

    
	
	var stTag = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
	            + 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
	            + 'width="' + movieWidth + '" height="' + movieHeight + '" id="Bandeau" align="middle">'
	            + '<param name="allowScriptAccess" value="sameDomain" />' 
	            + '<param name="movie" value="' + FichierFlash + '" />'
	            + '<param name="quality" value="high" />'
	            + '<param name="bgcolor" value="#ffffff" />'
	            + '<param name="wmode" VALUE="transparent" />'
	            + '<embed src="' + FichierFlash + '" quality="high" bgcolor="#ffffff" width="' + movieWidth + '" height="' + movieHeight + '" name="DimensionFixe" '
	            + 'align="middle" allowScriptAccess="sameDomain" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
	            + '</object>';
	document.write (stTag);
}



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];
    }
}





	more_scroll = '';
	less_scroll = '';

	function moveSlides(dir, num)
	{
		target = document.getElementById('slides');
		targetTop = parseInt(target.style.top);

		if (target.offsetHeight > 360)
		{
			switch (dir)
			{
				case "haut":
					magicNumber = 360 - parseInt(target.offsetHeight);
					if (targetTop <= magicNumber) // Reached limit, stop scrolling
					{
						target.style.top = magicNumber + 'px';
						clearTimeout(more_scroll);
						clearTimeout(less_scroll);
					} else {  // Scroll right
						target.style.top = (targetTop - 10) + 'px';
						more_scroll = setTimeout("moveSlides('haut')", 30);
						less_scroll = '';
					}
					break;
					
				case "bas":
					if (targetTop >= 0) // Reached limit, stop scrolling
					{
						target.style.left = '0px';
						clearTimeout(more_scroll);
						clearTimeout(less_scroll);
					} else {  // Scroll left
						target.style.top = (targetTop + 10) + 'px';
						less_scroll = setTimeout("moveSlides('bas')", 30);
						more_scroll = '';
					}
					break;
				case "stop":
					clearTimeout(more_scroll);
					clearTimeout(less_scroll);
					break;
			}
		}
	}

