1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
function ongletactif() {
var urlpage = window.location;
for (i=-1; i<document.getElementsByTagName("li").length; i++){
if (document.getElementsByTagName("a")[i+1].href == urlpage){
document.getElementsByTagName("li")[i].className = 'current';
}
}
}
function rubriqueactive(){
var doc
doc=document.location.href.split("?")
var rub=doc[1].split("=")
document.getElementById(rub[1]).style.backgroundColor='#fff'
document.getElementById(rub[1]).style.color='#000033'
}
var pic=new Array("","./images/pharma/pharma7.jpg","./images/pharma/pharma8.jpg","./images/pharma/pharma4.jpg","./images/pharma/pharma5.jpg","./images/pharma/pharma6.jpg"); // tableau des noms d'images
var delay=3 // ici 3 secondes
var img="image"; // ici nom de l'image a recharger
// fonction à appeler dans le onload de BODY
function RefreshIMG() {
setTimeout("RefreshIMG()",delay*1000);
document.images[img].src=pic[Math.floor((5)*Math.random()+1)];
} |
Partager