/*
	Modifs. Thibaud, aot 2005
	Les pages des produits sont dans un sous dossier "Pages", il faut
	mettre  jour le chemin d'accs aux images.
	Au moment du premier appel, <body> n'est pas dfini => il faut passer
	par autre chose pour dtecter si on est dans la page Home ou pas.
	=> on teste la position de "/home.html"
	ATTENTION  CE HARD-CODAGE ! Si on change le nom de la page "home",
	a va beaucoup moins bien marcher ;->
*/
/* begin ------------------------------------------------------- */

if (document.images) {
	if(window.location.pathname.indexOf("/home.html") < 0)
		prefix = "../";
	else
		prefix = "";
		
//aline
alineOff = new Image();
alineOff.src = prefix + "img/title_aline.png";

alineOn = new Image();
alineOn.src = prefix + "img/title_aline_over.png";
		
//home
homeOff = new Image();
homeOff.src = prefix + "img/title_home.png";

homeOn = new Image();
homeOn.src = prefix + "img/title_home_over.png";

//contact
contactOff = new Image();
contactOff.src = prefix + "img/title_contact.png";

contactOn = new Image();
contactOn.src = prefix + "img/title_contact_over.png";

//commande
commandeOff = new Image();
commandeOff.src = prefix + "img/title_commande.png";

commandeOn = new Image();
commandeOn.src = prefix + "img/title_commande_over.png";

//arrow_next
arrow_nextOff = new Image();
arrow_nextOff.src = prefix + "img/arrow_next.png";

arrow_nextOn = new Image();
arrow_nextOn.src = prefix + "img/arrow_next_over.png";

//arrow_back
arrow_backOff = new Image();
arrow_backOff.src = prefix + "img/arrow_back.png";

arrow_backOn = new Image();
arrow_backOn.src = prefix + "img/arrow_back_over.png";

//arrow_right_next
arrow_right_nextOff = new Image();
arrow_right_nextOff.src = prefix + "img/arrow_next.png";

arrow_right_nextOn = new Image();
arrow_right_nextOn.src = prefix + "img/arrow_next_over.png";

//arrow_right_back
arrow_right_backOff = new Image();
arrow_right_backOff.src = prefix + "img/arrow_back.png";

arrow_right_backOn = new Image();
arrow_right_backOn.src = prefix + "img/arrow_back_over.png";

}


function turnOn(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "On.src");
  }
}

function turnOff(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "Off.src");
  }
}
/* end ------------------------------------------------------- */
