/**
 * @author alienhard
 */
function cache(rubid){

	for (i=1; i < 12; i++){
		
		iok = "a"+i;
		imgOK = "img"+iok
		
		if (iok == rubid){
			myShow(iok,imgOK);
			
		}else{
			myHide(iok,imgOK);
		}
	}
	
}

function myShow(iok,imgOK){
	Element.show(iok);
	if (i<10){
	Element.show(imgOK);
	}	
}

function myHide(iok,imgOK){
	Element.hide(iok);
	Element.hide(imgOK);
}

thisImg = 1
function newSlide(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider.src = documents;
	  }
}

function newSlide1(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider1.src = documents;
	  }
}
  
function newSlide2(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider2.src = documents;
	  }
}

function newSlide3(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider3.src = documents;
	  }
}

function newSlide4(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider4.src = documents;
	  }
}

function newSlide5(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider5.src = documents;
	  }
}

function newSlide6(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider6.src = documents;
	  }
}

function newSlide7(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider7.src = documents;
	  }
}

function newSlide8(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider8.src = documents;
	  }
}

function newSlide9(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider9.src = documents;
	  }
}

function newSlide10(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider10.src = documents;
	  }
}

function newSlide11(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider11.src = documents;
	  }
}

function newSlide12(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider12.src = documents;
	  }
}

function newSlide13(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider13.src = documents;
	  }
}

function newSlide14(direction,dossier,nbImages) {
  	
  	imgCt = nbImages
	   	if (document.images) {
	    	thisImg = thisImg + direction
		    if (thisImg < 1) {
				thisImg = imgCt
		    }
			
	    if (thisImg > imgCt) {
			thisImg=1
	   }
	  
	   documents = dossier + "/" + thisImg + ".jpg";
	   document.slider14.src = documents;
	  }
}


