function charge(obj){return document.getElementById(obj).style;};
function bouge(obj,x,y){var ec=charge(obj);ec.pixelLeft=x;ec.pixelTop=y;};
function bougepar(obj,dx,dy){var ec=charge(obj);ec.left = parseInt(ec.left)+dx+"px";ec.top = parseInt(ec.top)+dy+"px";};
function cache(obj){var ec=charge(obj);ec.visibility="hidden";};
function montre(obj){var ec=charge(obj);ec.visibility="visible";};
function posx(obj){var ec=charge(obj);return ec.pixelLeft;};
function posy(obj){var ec=charge(obj);return ec.pixelTop;};
function visible(obj){var ec=charge(obj);if(ec.visibility=="visible")return true;return false;};
function largeur(obj){var ec=charge(obj);return ec.pixelWidth;};
function hauteur(obj){var ec=charge(obj);return ec.pixelHeight;};
function redim(obj,largeur,hauteur){var ec=charge(obj);ec.width=largeur+"px";ec.height=hauteur+"px";};
function lfen(){if(window.innerWidth)return window.innerWidth;else return document.body.clientWidth;};
function lfen50(){return lfen()/2;};
function hfen(){if(window.innerHeight)return window.innerHeight; else return document.body.clientHeight;};
function hfen50(){return hfen()/2;};
function lec(){return self.screen.Width;};
function hec(){return self.screen.Height;};
function docheight(){if(document.all) return (document.body.scrollHeight>document.body.clientHeight)?document.body.scrollHeight:document.body.clientHeight;
else return (document.height>window.innerHeight)?document.height:window.innerHeight;};
function docwidth(){if(document.all) return (document.body.scrollWidth>document.body.clientWidth)?document.body.scrollWidth:document.body.clientWidth;
else return (document.width>window.innerWidth)?document.width:window.innerWidth;};
function docscrollleft(){if(document.all) return document.body.scrollLeft;
else return window.pageXOffset;};
function docscrolltop(){if(document.all) return document.body.scrollTop;
else return window.pageYOffset;};
function zIndex(obj){var ec=charge(obj);return ec.zIndex;};
function poszIndex(obj,z){var ec=charge(obj);ec.zIndex=z;};
function adimage(obj){var ec=document.getElementById(obj);return ec.setAttribute('src');};
function chimage(obj,ad){var ec=document.getElementById(obj);ec.setAttribute('src',ad);};
function cachecache(obj){ec=charge(obj);ec.visibility=(ec.visibility=="hidden")?"visible":"hidden"}
function bgc(obj,col){var ec=charge(obj);ec.backgroundColor=col;};
function rvb(obj,col){var ec=charge(obj);ec.color=col;};
function ecrit(obj,texte){document.getElementById(obj).innerHTML=texte;};
function graisse(obj,gras){var ec=charge(obj);ec.fontWeight=gras;};
function taille(obj,tail){var ec=charge(obj);ec.fontSize=tail;};
function police(obj,nom){var ec=charge(obj);ec.fontFamily=nom;};
function aligntext(obj,alig){var ec=charge(obj);ec.textAlign=alig;};
function spacetext(obj,spa){var ec=charge(obj);ec.letterSpacing=spa;};
function opacite(obj,arg) {var ec=charge(obj);ec.filter="alpha(opacity=100)";document.getElementById(obj).filters.alpha.opacity=arg;};
function opac(obj){return document.getElementById(obj).filters.alpha.opacity;};
function mousex(e){return (event.clientX)?event.clientX+document.body.scrollLeft-2:e.pageX-window.pageXOffset;};
function mousey(e){return (event.clientY)?event.clientY+document.body.scrollTop-2:e.pageY-window.pageYOffset;};
function preload(nom,src){eval(nom +'=new Image()');eval(nom+'.src="'+src+'"');};
function bg(obj,imgurl,attach,rep,pos){
var ec=charge(obj);
ec.backgroundImage="url("+imgurl+")";
ec.backgroundAttachment=attach;
ec.backgroundRepeat=rep;
ec.backgroundPosition=pos;
};
var vanim=25;
function deplace(obj,x,y,vdep){
var ec=charge(obj);
var hrzn,vert,left,top,nb;
if(ec.pasID&&ec.pasID!=null){setTimeout('deplace("'+obj+'",'+x+','+y+','+vdep+')',vanim);return;};
hrzn=x-ec.pixelLeft;
vert=y-ec.pixelTop;
left=ec.pixelLeft;
top=ec.pixelTop;
nb=(Math.max(Math.abs(hrzn),Math.abs(vert))/vdep)*(1000/vanim);
if(nb<=0)return;
ec.pasLeft=left;
ec.pasTop=top;
ec.pasDx=hrzn/nb;
ec.pasDy=vert/nb;
ec.pasfinX=x;
ec.pasfinY=y;
ec.pasnb=Math.floor(nb);
ec.pasID=setTimeout('pasInc("'+obj+'")',vanim);
};
function pasInc(obj){
var ec=charge(obj);
ec.pasLeft+=ec.pasDx;
ec.pasTop+=ec.pasDy;
ec.left=ec.pasLeft;
ec.top=ec.pasTop;
if(ec.pasnb-->0)ec.pasID=setTimeout('pasInc("'+obj+'")',vanim);
else{ec.left=ec.pasfinX;ec.top=ec.pasfinY;ec.pasID=null;};
};
function place(obj,num){
var hh=hauteur(obj);
var ll=largeur(obj);
if(num==1)bouge(obj,0,hfen()-hh);
if(num==2)bouge(obj,lfen50()-ll/2,hfen()-hh);
if(num==3)bouge(obj,lfen()-ll,hfen()-hh);
if(num==4)bouge(obj,0,hfen50()-hh/2);
if(num==5)bouge(obj,lfen50()-ll/2,hfen50()-hh/2);
if(num==6)bouge(obj,lfen()-ll,hfen50()-hh/2);
if(num==7)bouge(obj,0,0);
if(num==8)bouge(obj,lfen50()-ll/2,0);
if(num==9)bouge(obj,lfen()-ll,0);
};