/*************************************** 
 *	Navigateur  *
 ***************************************/

/* Fonction de recherche d'un �l�ment ID compatible avec tous les navigateurs */
function FindID(id) 
{ 
	if(document.layers) 
		return document.layersid; 

	if(document.all && !document.getElementById) 
		return document.allid; 

	if(document.all && document.getElementById) 
		return document.getElementById(id); 
	
	if(!document.all && document.getElementById) 
		return document.getElementById(id); 
} 

/*************************************** 
 *	Gestion du panorama    *
 ***************************************/

/* Variables globales du panorama */
var quickness = 10;     // temps pendant lequel la rotation reste active ou survol d'une zone (en ms) 
var unitary_shift = 2; // decalage unitaire du panorama (en pixel)
var current_shift = 0;  // decalage courant du panorama (en pixel)
var actif;

function startMoveLeft(speed) 
{
	actif = setInterval('moveLeft('+speed+')',quickness);
} 

function startMoveRight(speed) 
{
	actif = setInterval('moveRight('+speed+')',quickness);
} 

function stopMove() 
{
	clearInterval(actif);
} 

function moveLeft(speed) 
{
	var objImg  = FindID('div_pic');
	current_shift += unitary_shift*speed;
	
	objImg.style.backgroundPosition = current_shift+'px 0px';	

} 

function moveRight(speed) 
{
	var objImg  = FindID('div_pic');
	current_shift -= unitary_shift*speed;
	
	objImg.style.backgroundPosition = current_shift+'px 0px';
} 