window.onload=begin;

function begin(){
//rotateOsas();
//rotateFranair();
rotateGM();
rotateGF();
rotateSZ();
montre();
slideShowGW5();
slideShowGW52();
}


/*var osas = new Array("images/osas1.gif","images/osas2.gif", "images/osas3.gif");
var thisAd2 = 0;

function rotateOsas() {
	thisAd2++;
	if (thisAd2 == osas.length) {
		thisAd2 = 0;
	}
	document.getElementById("marcheOsas").src = osas[thisAd2];

	setTimeout("rotateOsas()", 3*2000);
}*/


/*var franair = new Array("images/franair1.gif","images/franair2.gif", "images/franair3.gif");
var thisAd4 = 0;

function rotateFranair() {
	thisAd4++;
	if (thisAd4 == franair.length) {
		thisAd4 = 0;
	}
	document.getElementById("franair").src = franair[thisAd4];

	setTimeout("rotateFranair()", 3*2000);
}*/


var gfIndex = new Array("images/GF1.gif", "images/GF2.gif","images/GF3.gif", "images/GF4.gif", "images/GF5.gif","images/GF6.gif", "images/GF7.gif");
var thisGF = 0;

function rotateGF() {
	thisGF++;
	if (thisGF == gfIndex.length) {
		thisGF = 0;
	}
	document.getElementById("GF").src = gfIndex[thisGF];

	setTimeout("rotateGF()", 3*1000);
}

var gmIndex = new Array("images/GM1.gif","images/GM2.gif", "images/GM3.gif");
var thisGM = 0;

function rotateGM() {
	thisGM++;
	if (thisGM == gmIndex.length) {
		thisGM = 0;
	}
	document.getElementById("GM").src = gmIndex[thisGM];

	setTimeout("rotateGM()", 3*1000);
}

var szIndex = new Array("images/SZ1.gif","images/SZ2.gif", "images/SZ3.gif");
var thisSZ = 0;

function rotateSZ() {
	thisSZ++;
	if (thisSZ == szIndex.length) {
		thisSZ = 0;
	}
	document.getElementById("SZ").src = szIndex[thisSZ];

	setTimeout("rotateSZ()", 3*1000);
}



function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}


var slideShowSpeed = 3000;

var crossFadeDuration = 2;

var Pic = new Array("images/GW5th_1.gif","images/GW5th_2.gif","images/GW5th_3.gif","images/GW5th_4.gif","images/GW5th_5.gif","images/GW5th_6.gif","images/GW5th_7.gif");

var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++){
   preLoad[i] = new Image();
   preLoad[i].src = Pic[i];
}
function slideShowGW5(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)";
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow.filters.blendTrans.Apply();      
   }
   document.images.SlideShow.src = preLoad[j].src;
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play();
      
   }
   j = j + 1;
   if (j > (p-1)) j=0;
   t = setTimeout('slideShowGW5()', slideShowSpeed);
}

var slideShowSpeed = 5000;

var crossFadeDuration = 5;

var Pic2 = new Array("images/GW5th_1.png","images/GW5th_2.png","images/GW5th_3.png","images/GW5th_4.png","images/GW5th_5.png","images/GW5th_6.png","images/GW5th_7.png");

var t2;
var k = 0;
var q = Pic2.length;
var preLoad2 = new Array();
for (l = 0; l < q; l++){
   preLoad2[l] = new Image();
   preLoad2[l].src = Pic2[l];
}
function slideShowGW52(){
   if (document.all){
      document.images.SlideShow2.style.filter="blendTrans(duration=5)";
      document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow2.filters.blendTrans.Apply();      
   }
   document.images.SlideShow2.src = preLoad2[k].src;
   if (document.all){
      document.images.SlideShow2.filters.blendTrans.Play();
      
   }
   k = k + 1;
   if (k > (q-1)) k=0;
   t = setTimeout('slideShowGW52()', slideShowSpeed);
}
