<!--LOCAL/GMT OPTION CLOCK--> <!-- This part can go in the HEAD of the html file --> <script language="JavaScript" type="text/javascript"> <!-- Copyright 2005, Sandeep Gangadharan --> <!-- For more free scripts go to http://sivamdesign.com/scripts/ --> <!-- function localGM_Time() { now = new Date(); hour = now.getHours(); min = now.getMinutes(); sec = now.getSeconds(); exp1 = now.getUTCHours(); exp1 = ((exp1<10) ? "0"+exp1 : exp1); exp2 = now.getUTCMinutes(); exp2 = ((exp2<10) ? "0"+exp2 : exp2); exp4 = now.getUTCSeconds(); exp4 = ((exp4<10) ? "0"+exp4 : exp4); gmt = exp1 + ":" + exp2 + ":" + exp4; if (document.clock.sivamtime[0].checked) { if (min <= 9) { min = "0" + min; } if (sec <= 9) { sec = "0" + sec; } if (hour < 10) { hour = "0" + hour; } document.clock.sivam.value = hour + ':' + min + ':' + sec; } if (document.clock.sivamtime[1].checked) { document.clock.sivam.value = gmt; } setTimeout("localGM_Time()", 1000); } // --> </script> <!-- This goes into the body of the file wherever you want to have the time placed --> <!-- Note the script in the "body" tag --> <body onLoad="localGM_Time();"> <form name="clock"> <table border="4" align="center" cellspacing="0" cellpadding="2" width="110"> <tr> <td align="center"> <input type="text" name="sivam" size="8" style="text-align:center" /> </td> </tr> <tr> <td> <label for="1"><input type="radio" id="1" name="sivamtime" checked /><font face="verdana, arial, helvetica, ms sans serif" size="1">Local Time</font></label><br /> <label for="2"><input type="radio" id="2" name="sivamtime" /><font face="verdana, arial, helvetica, ms sans serif" size="1">GMT</font></label> </td> </tr> </table> </form> </body> </html>