/* for (var i=0;i<=3;i++) {
	var braqList = new Array('images/logo_braq_on.gif','images/logo_braq.gif',
'images/logo_prad_on.gif','images/logo_prad.gif')
	var braq = new Array()

	eval('braq['+i+'] = new Image()')
	eval('braq['+i+'].src = "'+braqList[i]+'"')
}



function slideShow(whereToGo, whichOne) {
	whereToGo = projetSelected + whereToGo;
	switchOff = projet[projetSelected];

	if (projetSelected == projetTotal && whereToGo > projetTotal) {
		if (back == "no") {
			alert ("Wrong way!")
		}
		else {
			switchOn = projet[0];
			projetSelected = 0;
			showAndHide(whichOne)
		}
	}
	else if (projetSelected == 0 && whereToGo < 0) {
		switchOn = projet[projetTotal];
		projetSelected = projetTotal;
		back = "ok"
		showAndHide(whichOne)
	}
	else {
		switchOn = projet[whereToGo];
		projetSelected = whereToGo;
		showAndHide(whichOne)
	}
}

function showAndHide(whichOne) {
	document.pht_projet.src = "images_" + whichOne + "/" + switchOn;

	switchOff = String(switchOff);
	switchOff = switchOff.substr(0, 4)

	switchOn = String(switchOn);
	switchOn = switchOn.substr(0, 4)

	document.getElementById("div_projet_" + switchOff).style.visibility = "hidden";
	document.getElementById("div_projet_" + switchOn).style.visibility = "visible";
} */

for (var i=0;i<=3;i++) {
	var braqList = new Array('images/logo_braq_on.gif','images/logo_braq.gif',
'images/logo_prad_on.gif','images/logo_prad.gif')
	var braq = new Array()

	eval('braq['+i+'] = new Image()')
	eval('braq['+i+'].src = "'+braqList[i]+'"')
}



function slideShow(whereToGo, whichOne) {
	whereToGo = projetSelected + whereToGo;
	switchOff = projet[projetSelected];

	if (projetSelected == projetTotal && whereToGo > projetTotal) {
		if (back == "no") {
			alert ("Wrong way!")
		}
		else {
			switchOn = projet[0];
			projetSelected = 0;
			showAndHide(whichOne)
		}
	}
	else if (projetSelected == 0 && whereToGo < 0) {
		switchOn = projet[projetTotal];
		projetSelected = projetTotal;
		back = "ok"
		showAndHide(whichOne)
	}
	else {
		switchOn = projet[whereToGo];
		projetSelected = whereToGo;
		showAndHide(whichOne)
	}
}

function showAndHide(whichOne) {
	// document.pht_projet.src = "images_" + whichOne + "/" + switchOn;
	document.pht_projet.src = "images/" + switchOn;

	switchOff = String(switchOff);
	switchOff = switchOff.substr(5, 4)

	switchOn = String(switchOn);
	switchOn = switchOn.substr(5, 4)

	document.getElementById("div_projet_" + switchOff).style.visibility = "hidden";
	document.getElementById("div_projet_" + switchOn).style.visibility = "visible";
}

