// JavaScript Document
var	 img = new Image();	
var slideShowSpeed = 5000;
var crossFadeDuration = 20;
var Pic = new Array();
var j = 0;
var imgname;
var timer;					
var index = 0;
var item_number;
var preLoad = new Array();
var img_position;
var oxo=1;
var opaa=100;
var opab=0;
var opam=0;


function fadetexte() {
ie4 = ((navigator.appVersion.indexOf("MSIE")>0) && (parseInt(navigator.appVersion) >= 4)); 
var count = 0, count2 = 0, add1 = 3, 
add2 = 10, timerID; 
function show() { 
if (ie4) { 
	count += add1; count2 += add2; 
	delay = 30; 
	if(count2 > 100) 
		count2 = 100; 
	if(count > 100) 
		{ count = 100; 
		add1 = -10; 
		add2 = -3; 
		delay = 350; 
		} 
	if(count < 0) 
		count = 0; 
	if(count2 < 0) { 
		count2 = 0; 
		add1 = 3; 
		add2 = 10; 
		delay = 200; 
		} 
	fader.style.filter = "Alpha(Opacity="+count2+",FinishOpacity="+count+",style=2)"; 
	timerID = setTimeout("show()", delay); } 
	} 
	window.onload = show;
}

function Startindex() {
	timer = setTimeout('runSlideShow2()', 10);
}
function Startindex2() {
	timer = setTimeout('runSlideShow22()', 10);
}

function runSlideShow2() {
opaa = 0;
accueil_fondu();	
}
function runSlideShow22() {
opaa = 0;

accueil_fondu22();	
}


function afflang() {
	
	
opam += 2;


set_opacity('menulangue',opam);

if (opam > 100) 
	{
	set_opacity('menulangue',100);
	return false;
	}
timer = setTimeout('afflang()', 10);
}


function efflang() {
	
	
opam -= 2;


set_opacity('menulangue',opam);

if (opam > 0) 
	{
	set_opacity('menulangue',0);
	return false;
	}
timer = setTimeout('afflang()', 10);
}



function accueil_fondu() {

opaa += 1;

set_opacity('acc1',opaa);

if (opaa > 100) 
	{
	set_opacity('acc1',100);
	opab=0;
	accueil2();
	return false;
	}
timer = setTimeout('accueil_fondu()', 7);
}


function accueil_fondu22() {

opaa += 1;

set_opacity('acc1',opaa);

if (opaa > 100) 
	{
	set_opacity('acc1',100);
	opab=0;
	accueil22();
	return false;
	}
timer = setTimeout('accueil_fondu22()', 7);
}



function accueil2() {

opab += 1;

set_opacity('acc2',opab);
set_opacity('acc3',opab);
set_opacity('indexfr',opab);
set_opacity('indexen',opab);
set_opacity('indexit',opab);

if (opab > 100) 
	{
	set_opacity('acc2',100);
	set_opacity('acc3',100);
//	menu();
	return false;
	}
timer = setTimeout('accueil2()', 10);
}
function accueil22() {

opab += 1;

set_opacity('acc3',opab);

if (opab > 100) 
	{
	set_opacity('acc3',100);
//	menu();
	return false;
	}
timer = setTimeout('accueil22()', 10);
}

function gonext() {
	location.href="accueil.php";
}




function menu() {
	$(document).ready(function(){
    $("p.txind").show();
   });
}


function set_opacity(id, opacity)
{
	el = document.getElementById(id);
    el.style["filter"] = "alpha(opacity="+opacity+")";
    el.style["-moz-opacity"] = opacity/100;
    el.style["-khtml-opacity"] = opacity/100;
    el.style["opacity"] = opacity/100;
    return true;
}

function change_on(ID) {
	img = new Image();
	img.src = "../img/" + ID + "_on.jpg";
	document.getElementById(ID).src = img.src;
} 

function change_off(ID) {
	img = new Image();
	img.src = "../img/" + ID + ".jpg";
	document.getElementById(ID).src = img.src;
} 

function opendiv(id) { 
  	var div = document.getElementById('portfolio'); 
	div.style.display = "block"; 
}
function closediv(id) { 
  	var div = document.getElementById('portfolio'); 
	div.style.display = "none"; 
}


