// Objets dans la pénombre
// (c) 2005-2010
// http://www.thorgal-bd.fr/

spot=new Object;
spot.sp=0;
spot.nb=0.95;
this.taille=18;
spot.x=0;
spot.y=0;

var l1 = new Array("","L'île","Terres du Nord","Contrées lointaines","Deuxième Monde");
var l2 = new Array("","Sites Thorgal","Sites bandes dessinées","Autres sites","Contacts");
var l3 = new Array("","Officiels, ou par les fans","Editeurs, et sites spécialisés","Quelques coups de coeur","Contacter le webmestre");

function flou(){
spot.sp++;
if(spot.sp==140)spot.sp=0;

if (document.all){
if(spot.sp<70){objet.filters.alpha.opacity-=2;} else {objet.filters.alpha.opacity+=2;}}

if (!document.all){
if(spot.sp<70){spot.nb-=.02} else {spot.nb+=.02;}
document.getElementById("objet").style.setProperty("-moz-opacity", spot.nb, "");
document.getElementById("objet").style.opacity=spot.nb;}

window.setTimeout('flou()',50);
}

function voir_l(qui){
if(document.all){
document.all("im"+qui).filters.alpha.opacity=100;
t1.innerHTML=l1[qui];
tspec.innerHTML=l1[qui];
t2.innerHTML=l2[qui];
t3.innerHTML=l3[qui];
t1.style.visibility="visible";}
if(!document.all){
document.getElementById("im"+qui).style.setProperty("-moz-opacity", 1, "");
document.getElementById("im"+qui).style.opacity=1;
document.getElementById("t1").innerHTML=l1[qui];
document.getElementById("tspec").innerHTML=l1[qui];
document.getElementById("t2").innerHTML=l2[qui];
document.getElementById("t3").innerHTML=l3[qui];
document.getElementById("t1").style.visibility="visible";}
this.taille=18;
}

function cacher_l(qui){
tspec.innerHTML="";
t1.innerHTML="";
t2.innerHTML="<i>« Voyageur,<br>choisis ta destination... »</i>";
t3.innerHTML="";
t1.style.visibility="hidden";
this.taille=18;
tspec.style.fontSize=18;
if(document.all){
document.all("tspec").filters.alpha.opacity=0;
document.all("im"+qui).filters.alpha.opacity=30;}
if(!document.all){
document.getElementById("tspec").style.setProperty("-moz-opacity", 0, "");
document.getElementById("im"+qui).style.setProperty("-moz-opacity", .3, "");
document.getElementById("tspec").style.opacity=0;
document.getElementById("im"+qui).style.opacity=.3;}
}

function zoom(){
if(tspec.innerHTML!=""&&document.all){
this.taille++;
if(this.taille==51)this.taille=18;
tspec.style.fontSize=this.taille;
tspec.style.pixelTop=t1.offsetTop+10-(tspec.offsetHeight/2);
tspec.style.pixelLeft=t1.offsetLeft+100-(tspec.offsetWidth/2);
document.all("tspec").filters.alpha.opacity=100-this.taille*3;}
if(tspec.innerHTML!=""&&!document.all){
this.taille++;
if(this.taille==51)this.taille=18;
document.getElementById("tspec").style.fontSize=this.taille;
document.getElementById("tspec").style.top=t1.offsetTop+10-(tspec.offsetHeight/2)+"px";
document.getElementById("tspec").style.left=t1.offsetLeft+100-(tspec.offsetWidth/2)+"px";
document.getElementById("tspec").style.setProperty("-moz-opacity", (100-this.taille*3)/100, "");
document.getElementById("tspec").style.opacity=(100-this.taille*3)/100;}

window.setTimeout('zoom()',30);
}

function souris(e){
if (document.all){
var g_d=document.body.scrollLeft;
var h_b=document.body.scrollTop;
spot.x=window.event.x+g_d+10;
spot.y=window.event.y+h_b+10;
if (spot.x>(document.body.clientWidth+g_d-40))spot.x=document.body.clientWidth+g_d-40;
if (spot.y>(document.body.clientHeight+h_b-50))spot.y=document.body.clientHeight+h_b-40;}
if (!document.all){
spot.x=e.pageX+10;
spot.y=e.pageY+10;
if (spot.x>(window.innerWidth-40))spot.x=window.innerWidth-40;
if (spot.y>(window.innerHeight+window.pageYOffset-40))spot.y=window.innerHeight+window.pageYOffset-40;}
}