// (C) 2006 - 2009 Serge Lamarche
// http://sergewebservice.ca/
// All codes copyrights Serge Lamarche, any reproduction and 
// use strictly forbidden without written consent.
// Tous les codes droits d'auteurs Serge Lamarche, toute reproduction et 
// utilisation est strictement interdite sans autorisation écrite.
// Contact: info@sergewebservice.ca, sergewebservice@yahoo.ca or/ou sergelamarche@gmail.com 
// ...for help with your website. Reliable, inexpensive website service. Thanks.
// ...pour de l'aide avec votre site. Service internet abordable et professionnel. Merci. 

//var hauteurecran = document.documentElement || false; 
//hauteurecran = hauteurecran.clientHeight || window.innerHeight || false; //raccourci!!
//pas besoin de ces deux variables.
//var largeurecran = document.documentElement || window; 
//largeurecran = largeurecran.clientWidth || largeurecran.innerWidth || 850; //raccourci!!

var srcimage = ["dogtooth_2336.jpg", "noel_2237.jpg", "noel_3651.jpg", "noel_2351.jpg", "noel_2235.jpg", "piececentrale_2238.jpg", "sculptureneige_3005.jpg", "khr_2309.jpg", "motoneige_3646.jpg", "patinoire-a_0472.jpg", "patinoirereflection_2346.jpg", "hockeyapied_2324.jpg", "joueurshockey_2349.jpg", "traineauchiens_1034.jpg", "noel-khmt7_3047.jpg", "neigeauto_3094.jpg", "noel-aile_3004.jpg", "cerf_2191.jpg", "sentier_2348.jpg", "motoneige_0471.jpg", "khrwhitetooth_2329.jpg", "khrbasse_2328.jpg", "arbresenveloppes_2327.jpg"]; 
var ensimage = new Array(srcimage.length); 
var zed = new Array(3); zed[0] = false; 
var intervechimg, todepart = false; 
var imagea, imageb, echangeimagesinterv;
var p1 = 0; var n = 1; 


function initial() { if (!document.getElementById) return;
imagea = document.getElementById("imga"); imagea.direct = document.imga || document.all.imga; //ouais. 
imageb = document.getElementById("imgb"); imageb.direct = document.imgb || document.all.imgb; 
for (var i=0;i<ensimage.length;i++) { ensimage[i] = new Image();
ensimage[i].src = "images-gen/parade_"+srcimage[i]; }; //précharge les images. 
if (!imagea.direct) return;
todepart=true; departto=window.setTimeout("depart()",5000); }

function depart() { if (todepart) { window.clearTimeout(departto); todepart=false; }; 
if (!document.getElementById||!imagea.direct||!imagea.style||intervechimg) return; 
intervechimg=true; echangeimagesinterv=window.setInterval("echangeles()",50); }

function echangeles() { 
mvtvertic=280-200*Math.sin((p1/100)*Math.PI); p1++; 
if (p1==50) { zed  = (zed[0]) ? [false, 2, 3] : [true, 3, 2]; imagea.style.zIndex=zed[1]; imageb.style.zIndex=zed[2]; }; 
if (p1>100) { nilinterval(); p1 = 0; 
n++; if (srcimage.length==n) n=0; if (zed[0]) imageb.direct.src = ensimage[n].src; else imagea.direct.src = ensimage[n].src; 
todepart=true; departto=window.setTimeout("depart()",10000); }; 
imagea.style.top=mvtvertic+"px"; }

function nilinterval() { 
if (intervechimg) { window.clearInterval(echangeimagesinterv); intervechimg=false; }
if (todepart) { window.clearTimeout(departto); todepart=false; }; }



function unilingue(langue0, langue1) { if (!document.styleSheets) return; 
//if (typeof(ncss)==typeof(pasdefini)) ncss=0; ncss
for (var i=0;i<document.styleSheets.length;i++) { 
var chg = document.styleSheets[i]; 
if (chg.insertRule) { 
chg.insertRule('ul.navmarge { background: url(images-gen/bg-borderg1-ombregrisp.gif) no-repeat top left; }',chg.cssRules.length); 
chg.insertRule('*.'+langue0+', span.'+langue0+', span.langsep {display: none; }',chg.cssRules.length);
chg.insertRule('*.'+langue1+' {display: block; }',chg.cssRules.length); 
chg.insertRule('span.'+langue1+' {display: inline; }',chg.cssRules.length); } 
if (chg.addRule) { 
chg.addRule('*.'+langue0, 'display: none;'); 
chg.addRule('span.'+langue0, 'display: none;'); 
chg.addRule('span.langsep', 'display: none;'); 
chg.addRule('*.'+langue1, 'display: block;'); 
chg.addRule('span.'+langue1, 'display: inline;'); }; }; }



// (C) 2006 - 2009 Serge Lamarche
// http://sergewebservice.ca/
// All codes copyrights Serge Lamarche, any reproduction and 
// use strictly forbidden without written consent.
// Tous les codes droits d'auteurs Serge Lamarche, toute reproduction et 
// utilisation est strictement interdite sans autorisation écrite.
// Contact: info@sergewebservice.ca, sergewebservice@yahoo.ca or/ou sergelamarche@gmail.com 
// ...for help with your website. Reliable, inexpensive website service. Thanks.
// ...pour de l'aide avec votre site. Service internet abordable et professionnel. Merci. 
