function SecondX() { var d, s; d = new Date(); s = d.getMinutes(); return(s); } theButton = new Array() for (i=0 ; i< 5; i++) { theButton[i] = new Image() } n= 13 /* Number of snt Photos */ m= 2 /* Number of tem photos */ p= 3 /* Number of Planet photos */ randomTem = SecondX() % (m +1) randomPlanet = SecondX() % (p +1) randomNo = SecondX() % (n +1) theButton[0].src = "images/buttons/btn0-text.gif" theButton[1].src = "images/buttons/Tem/tem" + randomTem + ".jpg" theButton[2].src = "images/buttons/Snt/snt" + randomNo + ".jpg" theButton[3].src = "images/buttons/" theButton[4].src = "images/buttons/Planet/planet" + randomPlanet + ".jpg" if (document.images) { var btn1_off = new Image() btn1_off.src = "images/buttons/" var btn1_on = new Image() btn1_on.src = "images/buttons/" var btn2_off = new Image() btn2_off.src = "images/buttons/" var btn2_on = new Image() btn2_on.src = "images/buttons/" var btn3_off = new Image() btn3_off.src = "images/buttons/" var btn3_on = new Image() btn3_on.src = "images/buttons/" var btn4_off = new Image() btn4_off.src = "images/buttons/" var btn4_on = new Image() btn4_on.src = "images/buttons/" } var name = null; function buttonOn (name, no) { if (name=='2') document["BASEPAD"].src = "images/buttons/Snt/snt" + randomNo + ".jpg" else if (name=='1') document["BASEPAD"].src = "images/buttons/tem/tem" + randomTem + ".jpg" else if (name=='4') document["BASEPAD"].src = "images/buttons/planet/planet" + randomPlanet + ".jpg" else document["BASEPAD"].src = "images/buttons/btn" + name + "" } function buttonOff () { document['BASEPAD'].src = "images/buttons/btn0-text.gif"; } function act(imgName) { if (document.images) document[imgName].src = eval(imgName + '_on.src') } function inact(imgName) { if (document.images) document[imgName].src = eval(imgName + '_off.src') }