// EFFETS MOUSEOVER MOUSEOUT SUR ELEMENTS CLIQUABLE

// PRECHARGEMENT DES IMAGES

if (document.images){
	var PicturesTab = new Array();
	var i;
	for(i=0;i<13;i++){
		PicturesTab[i] = new Array();
		if(i<1){
			PicturesTab[i][0] = new Image(570,191);
			PicturesTab[i][1] = new Image(570,191);
		}else{
			PicturesTab[i][0] = new Image(190,190);
			PicturesTab[i][1] = new Image(190,190);
		}
		PicturesTab[i][0].src = "images/pageAccueil/"+i+".jpg";
		PicturesTab[i][1].src = "images/pageAccueil/"+i+"_nb.jpg";
	}
}
function PageAccueil(){
	//alert('APPEL PAGE ACCUEIL OK')
	var i;
	for(i=0;i<13;i++){
		if(i<1){
			var Str = '<a href="javascript:;" onmouseover="javascript:SetStyleSelectable(4,pic'+i+',true,'+i+');" onmouseout="javascript:SetStyleSelectable(4,pic'+i+',false,'+i+');" onclick="LoadNav('+(i+1)+')">';
		}else{
			Str += '<a href="javascript:;" onmouseover="javascript:SetStyleSelectable(4,pic'+i+',true,'+i+');" onmouseout="javascript:SetStyleSelectable(4,pic'+i+',false,'+i+');" onclick="LoadNav('+(i+1)+')">';
		}
		Str += '<img name="pic'+i+'" src="images/pageAccueil/'+i+'.jpg" width="'+PicturesTab[i][0].width+'" height="'+PicturesTab[i][0].height+'" border="none" />';
		Str += '</a>';
	}
	document.getElementById('RecepAccueil').innerHTML = Str;
}
function SetStyleSelectable(type,elem,bool,Id){

	if(type == 0){ // ELEMENTS DU CENTRE
	
		if(bool==true){ // OVER
		
			elem.style.backgroundColor='#c7e4ff';
			elem.style.backgroundImage='url("images/basket_add.png")';
			elem.style.backgroundPosition='540px 5px';
			elem.style.backgroundRepeat='no-repeat';
			elem.style.border='solid #a00020 1px';
			elem.style.padding='5px';
			elem.style.margin='5px';
			
		}else{ // OUT
		
			elem.style.backgroundColor='white';
			elem.style.backgroundImage='url("images/basket.png")';
			elem.style.backgroundPosition='540px 5px';
			elem.style.backgroundRepeat='no-repeat';
			elem.style.border='solid white 1px';
			elem.style.padding='5px';
			elem.style.margin='5px';
		}
	}else if(type == 1){ // ELEMENTS PANIER
		if(bool==true){ // OVER
			elem.style.backgroundColor='#c7e4ff';
			elem.style.backgroundImage='url("images/basket_delete.png")';
			elem.style.backgroundPosition='200px 5px';
			elem.style.backgroundRepeat='no-repeat';
			/*elem.style.border='dotted #a00020 1px';*/
			elem.style.border='solid #a00020 1px';
		}else{ //OUT
			elem.style.backgroundColor='c7e4ff';
			elem.style.backgroundImage='none';
			elem.style.borderTop='none';
			elem.style.borderBottom='dotted #a00020 1px';
			elem.style.borderRight='none';
			elem.style.borderLeft='none';
		}
	}else if(type == 2){ // ELEMENTS CENTRE TYPE INFOBULLES
		if(bool==true){ // OVER
			elem.style.backgroundColor='#FF6600';
			elem.style.color='#2080FF';
		}else{ //OUT
			elem.style.backgroundColor='#FFFFFF';
			elem.style.color='white';
		}
	}else if(type == 3){ // ELEMENTS CENTRE TYPE INFOBULLES
		if(bool==true){ // OVER
			elem.style.backgroundColor='blue';
			elem.style.color='#ff6600';
		}else{ //OUT
			elem.style.backgroundColor='#FFFFFF';
			elem.style.color='white';
		}
	}else if(type == 4){ // ELEMENTS CENTRE ACCUEIL
		if(bool==true){ // OVER
			elem.src=PicturesTab[Id][1].src;
		}else{ //OUT
			elem.src=PicturesTab[Id][0].src;
		}
		/*
		if(bool==true){ // OVER
			elem.style.border='none';
			elem.style.backgroundImage=PicturesTab[Id][1].src;
			elem.style.backgroundPosition="left top";
			elem.style.backgroundRepeat="no-repeat";
		}else{ //OUT
			elem.style.border='none';
			elem.style.backgroundImage=PicturesTab[Id][0].src;
			elem.style.backgroundPosition="left top";
			elem.style.backgroundRepeat="no-repeat";
		}
		*/
	}
}