// JavaScript Document
//FONCTIONS

function preload()
	{
		if(document.images)
			{
				tabImages=new Array;
				for (var i=0; i<preload.arguments.length; i++)
					{
						tabImages[i]=new Image();
						tabImages[i].src=preload.arguments[i];
					}
			}
	}
			

function switchThemeLogo(logoTheme)
	{
		var lienLargeLogo=logoTheme.alt; nomDeCode = logoTheme.name; nomComplet = logoTheme.title; 
		var projecteur = document.getElementById("projecteur"); placeNomTheme = document.getElementById("nomTheme");
		
		projecteur.src=lienLargeLogo;
		placeNomTheme.innerHTML= nomComplet;
	}
	
function glisserCorriger(objet,sens)
{
	multiplicatorSpeed = 10;
	for(i=0;i<multiplicatorSpeed;i++)
	{
		margeGauche = parseInt(objet.style.marginLeft); // Plus rapide / Clean
		margeGauche += 1*sens;
		if(margeGauche>=0)
		{ 
			out(); 
			return;
		}
		if(sens==1) // Pour la droite
		{
			if(margeGauche>=0)
			{ 
				out(); 
				return;
			}
			if(margeGauche >= globals.maxWidth)
			{
				clearInterval(timer);
				timer = 0;
			}
		 
		}
		else // Pour la gauche
		{
			if(margeGauche<=-324)
			{
				out(); 
				return;
			}
			if(margeGauche <= globals.minWidth) 
			{
				clearInterval(timer);
				timer = 0;
			}
		 
		}
		 
		objet.style.marginLeft = margeGauche + 'px';
	}
}


function over(){ 
 	out();
	timer = setInterval(function(){ glisserCorriger(document.getElementById('selectorObjet'),1); },timeExecution);
}

 function outToLeft(){

out();

timer = setInterval(function(){ glisserCorriger(document.getElementById('selectorObjet'),-1); },timeExecution);

}

function out(){

clearInterval(timer);timer=0;

} 

