
//début menu et preload images
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_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_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];}
}
// fin menu et preload images


//Scroller
var scrollCell, scrollCell2, contentHeight, contentHeight2, timer, timer2, lefttime, topStop, topStop2, theTimer;

//scroller fonction début

function initialize(){
	scrollCell = document.getElementById('scrollCell');
	contentHeight = scrollCell.offsetHeight; //alert(contentHeight);
	scrollCell.style.top = '0px';
	topStop = 0;
	
	scrollCell2 = document.getElementById('scrollCell2');
	contentHeight2 = scrollCell2.offsetHeight; //alert(contentHeight);
	scrollCell2.style.top = '0px';
	topStop2 = 0;
}

function initialize2(){
	scrollCell2 = document.getElementById('scrollCell2');
	contentHeight2 = scrollCell2.offsetHeight; //alert(contentHeight);
	scrollCell2.style.top = '0px';
	topStop2 = 0;
}


function scrollDown(stopScroller){	
	if(stopScroller){
		clearInterval(timer);
	}else{
		//alert(scrollCell.style.top);
		timer=setInterval("moveScroll(true)",50);
	}
}

function scrollUp(stopScroller){	
	if(stopScroller){
		clearInterval(timer);
	}else{
		//alert('start');
		timer=setInterval("moveScroll(false)",50);
	}
}

function moveScroll(down){
	scrollCell = document.getElementById('scrollCell');
	//smallBlock = document.getElementById('smallBlock');
	//if(isNaN(parseInt(smallBlock.style.paddingTop))) smallBlock.style.paddingTop = '0px';
	if(down){
		if(parseInt(scrollCell.style.top) > ((contentHeight-300)*-1)){ //alert(contentHeight/20);
			scrollCell.style.top = parseInt(scrollCell.style.top) - 20 + 'px';
			//if(parseInt(smallBlock.style.paddingTop) < 122) smallBlock.style.paddingTop = parseInt(smallBlock.style.paddingTop) + 144/((contentHeight  - 300)/20) + 'px';
		}
	}else{
		if(parseInt(scrollCell.style.top) < 0){
			scrollCell.style.top = parseInt(scrollCell.style.top) + 20 + 'px';
			//if(parseInt(smallBlock.style.paddingTop) < 122) smallBlock.style.paddingTop = parseInt(smallBlock.style.paddingTop) - 105/((contentHeight  - 300)/20) + 'px';
		}
	}
}

function top(){
	scrollCell.style.top = '0px';
}
//scroller fonction fin;



// début function chargement dans div
function bamwen(url,id)
{
		var xhr_object = null;
		var position = id;
	if(window.XMLHttpRequest) 
		xhr_object = new XMLHttpRequest();
		else
	if (window.ActiveXObject) 
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
 // On ouvre la requete vers la page désirée
	xhr_object.open("GET", url, true);
	xhr_object.onreadystatechange = function(){
if ( xhr_object.readyState == 4 )
		{
// j'affiche dans la DIV spécifiées le contenu retourné par le fichier
document.getElementById(position).innerHTML = xhr_object.responseText;
		}
}
// dans le cas du get
xhr_object.send(null);
} 

//fin fonction chargement dans div



//début fonction popup
//fin fonction popup