// JavaScript Document
function manual_time()
{
	parent.frames["msgFrame"].location.replace("/cgi-bin/action?action=settime&lang=chs&systime=" + document.getElementById('systime').value)
}
 
function auto_time()
{	
	parent.frames["msgFrame"].location.replace("/cgi-bin/action?action=settime&lang=chs&systime=" + document.getElementById('pcsystime').value)
}
var  timerID  =  null
var  timerRunning  =  false  
function  stopclock(){
if(timerRunning)
clearTimeout(timerID)
timerRunning  =  false
}  
function  startclock(){
stopclock()
showtime()
}  
function  showtime(){
var  now  =  new  Date()
var  years = now.getFullYear()
var  months = now.getMonth() + 1
var  days = now.getDate()
var  hours  =  now.getHours()
var  minutes  =  now.getMinutes()
var  seconds  =  now.getSeconds()
var  timeValue  = "" + years
timeValue  +=  ((months  <  10)  ?  "-0"  :  "-")  +  months
timeValue  +=  ((days  <  10)  ?  "-0"  :  "-")  +  days
timeValue  +=  " "+((hours  <  10)  ?  "0"  :  "")  +  hours
timeValue  +=  ((minutes  <  10)  ?  ":0"  :  ":")  +  minutes
timeValue  +=  ((seconds  <  10)  ?  ":0"  :  ":")  +  seconds
document.getElementById('pcsystime').value  =  timeValue  
timerID  =  setTimeout("showtime()",1000)
timerRunning  =  true
}
 
function check_disable(value)
{
	if(!document.getElementById("id_AutoRebootEnable").checked)  {
		document.getElementById("id_AutoRebootTime").disabled = 1;
	}else{
		document.getElementById("id_AutoRebootTime").disabled = 0;
	}
}