<HEAD> <SCRIPT> <!-- Activate Cloaking Device //******************************************************************** // // Date & Time Display on the Status Bar // // Developed by Timothy Wallace , timothy@essex1.com // //******************************************************************** // Global variables for timer. var timerID = null; var timerRunning = false; // Called by both onLoad in BODY tag, and Resume button. function startclock () { // Make sure the clock is stopped stopclock(); time(); } // Kills clock. function stopclock () { if(timerRunning) clearTimeout(timerID); timerRunning = false; } function time () { var now = new Date(); var yr = now.getYear(); var mName = now.getMonth() + 1; var dName = now.getDay() + 1; var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate(); var ampm = (now.getHours() >= 12) ? " P.M." : " A.M." var hours = now.getHours(); hours = ((hours > 12) ? hours - 12 : hours); var minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes(); var seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds(); if(dName==1) Day = "Domenica"; if(dName==2) Day = "Lunedì"; if(dName==3) Day = "Martedì"; if(dName==4) Day = "Mercoledì"; if(dName==5) Day = "Giovedì"; if(dName==6) Day = "Venerdì"; if(dName==7) Day = "Sabato"; if(mName==1) Month="Gennaio"; if(mName==2) Month="Febbraio"; if(mName==3) Month="Marzo"; if(mName==4) Month="Aprile"; if(mName==5) Month="Maggio"; if(mName==6) Month="Giugno"; if(mName==7) Month="Luglio"; if(mName==8) Month="Agosto"; if(mName==9) Month="Settembre"; if(mName==10) Month="Ottobre"; if(mName==11) Month="Novembre"; if(mName==12) Month="Dicembre"; // String to display current date. var DayDateTime=(" " + Day + " " + Month + " " + dayNr + ", " + "19" + yr + " " + hours + minutes + seconds + " " + ampm ); // Displays Day-Date-Time on the staus bar. window.status=DayDateTime; timerID = setTimeout("time()",1000); timerRunning = true; } // Stops clock and clears status bar. function clearStatus() { if(timerRunning) clearTimeout(timerID); timerRunning = false; window.status=" "; } // Used for View Source function WinOpen() { alert('\nPage will load to full screen.\n\nUse View/Document Source from menu bar to view source.\n\nClose new window to return to this page. '); window.open("js-statc.htm","DisplayWindow","menubar=yes,status=yes"); window.open("js-statc.htm","DisplayWindow","menubar=yes,status=yes"); // double call for Macs } // Deactivate Cloaking --> </SCRIPT> </HEAD> <BODY onLoad="startclock ()">> <form> <TABLE BORDER=0 WIDTH=350> <TR> <TD align="center"><INPUT TYPE="button" value="Pausa" onClick="stopclock()"> <TD align="center"><INPUT TYPE="button" value="Riparti" onClick="startclock()"> <TD align="center"><INPUT TYPE="button" value="Elimina" onClick="clearStatus()"> </TR> </TABLE> </form> </BODY>
.