}
function iniTime()
{
text1.innerText=getMyTime();
addAll(s1,23);
addAll(s2,59);
addAll(s3,59);
d = new Date();
s1.selectedIndex=d.getHours();
s2.selectedIndex=d.getMinutes();
s3.selectedIndex=d.getSeconds();
window.setInterval("text1.innerText=getMyTime();","1000");
settime();
}
function getobj(obj)
{
for(i=1;i<obj.document.all.length;i++)
{
if(obj==obj.document.all(i))
{
return(obj.document.all(i-1))
}
}
}
function settime()
{
text2.value=s1.value+":"+s2.value+":"+s3.value;
}
function setDate()
{
if(text3.value != C1.Year + "-" + C1.Month + "-" + C1.Day)
{
text3.value=C1.Year + "-" + C1.Month + "-" + C1.Day;
}
}
function rtn(obj)
{
var r=new String("");
r=text3.value + " " + text2.value;
r=r.replace(/(^[\s]*)|([\s]*$)/g, "");
getobj(window.dialogArguments).value=r;
self.close();
}
function getMyTime(){
var d, s = "";
var c = ":";
d = new Date();
s += d.getHours() + c;
s += d.getMinutes() + c;
s += d.getSeconds();
return(s) ;
}
function addAll(obj,n)
{
var ooo=document.createElement("<OPTION>");
for(i=0;i<=n;i++)
{
add(obj,i,i);
}
}
function add(obj,v,t)
{
var ooo=document.createElement("<OPTION>");
ooo.value=v;
ooo.text=t;
obj.add(ooo);
}
</SCRIPT>
</BODY>
</HTML>