/* Bubble info */


function GetId(id)
{
	return document.getElementById(id);
}

var i=false; // La variable i nous dit si la bulle est visible ou non

function move(e) 
{
  if(i) 
  {  // Si la bulle est visible, on calcul en temps reel sa position ideale
	if (navigator.appName!="Microsoft Internet Explorer") 
	{ // Si on est pas sous IE
		GetId("curseur").style.left=e.pageX + 5+"px";
		GetId("curseur").style.top=e.pageY + 10+"px";
	}
	else
	{ // Modif proposé par TeDeum, merci à lui
		if(document.documentElement.clientWidth>0) 
		{
			GetId("curseur").style.left=20+event.x+document.documentElement.scrollLeft+"px";
			GetId("curseur").style.top=10+event.y+document.documentElement.scrollTop+"px";
		}
		else 
		{
			GetId("curseur").style.left=20+event.x+document.body.scrollLeft+"px";
			GetId("curseur").style.top=10+event.y+document.body.scrollTop+"px";
		}
	}
  }
}

function montre(text, width, height)
{
	if(i==false) 
	{
		GetId("curseur").style.visibility="visible";
		GetId("curseur").innerHTML = '<img width="' + width + '" height="' + height + '" src="' + text + '" />';
		i=true;
	}
}
function cache() 
{
	if(i==true) 
	{
		GetId("curseur").style.visibility="hidden"; // Si la bulle etais visible on la cache
		i=false;
	}
}



/* Scroll partners */


function ejs_img_fx(img)
{
	if(img && img.filters && img.filters[0])
	{
		img.filters[0].apply();
		img.filters[0].play();
	}
}

function StartAnim()
{
	if (onClick.length > 0)
	{
		document.write('<div id="scrollPartners"><a href="#" onclick="ImgDest();return(false)"><img height="" width="" src="" alt="Partners" name="defil" style="filter:progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=100,Duration=1)"></a></div>');
		defilimg()
	}
	else
	{
		document.write('<p class="partners"><img src="upload/partners/emvs.png"></p>');
	}
}

function ImgDest()
{
	window.open(onClick[a-1]);
}

function defilimg()
{
	if (a == onClick.length)
		a = 0;
		
	if (document.images)
	{
		ejs_img_fx(document.defil)
		document.defil.src = imgPath[a];
		document.defil.height = height[a];
		document.defil.width = width[a];
		tempo3 = setTimeout("defilimg()",3500);
		a++;
	}
}
	
	
function confDelete(message, url)
{
	if(confirm(message))
		window.location = url;
}