﻿var PageSound=false
var TCount=0
var TEnd=86400
var TO
var Code="000000000000"
var RunTimer=true

function PlaySound(mbd) 
   {
   document.getElementById("SND").innerHTML="<embed src='"+mbd+"' hidden=true autostart=true loop=true>"
    LoadComplete=1
   MouseOver(0)
   }
function FormLoad()
   {
   LoadComplete=1
   MouseOver(0)
   document.getElementById("txtCMD").focus()
   Timer()
   }

function Timer()
   {
   TO=setTimeout("Timer()",1000)
   if (RunTimer==true)
      {
      TCount=TCount+1
      if (TCount>TEnd){TCount=1}
      Now=new Date()
      YYYY=Now.getFullYear()
      Code=("" + Now.getFullYear()).substring(2,4) + ("" + (Now.getMonth()+101)).substring(1,3) + ("" + (Now.getDate()+100)).substring(1,3) + ("" + (Now.getHours()+100)).substring(1,3) + ("" + (Now.getMinutes()+100)).substring(1,3) + ("" + (Now.getSeconds()+100)).substring(1,3)         
      document.getElementById("spnCRyyyy").innerHTML=YYYY
      
      }
   }

function SoundClick()
   {
   document.getElementById("btnSound").src="I/btnSound.jpg"
   
   }
function txtCMDKyDn(KY)
   {
   if (window.event)
      {
      keynum = KY.keyCode
      }
   else if (KY.which)
      {
      keynum = KY.which
      }
   
   if (keynum==27)
      {
      
      document.getElementById("txtCMD").focus()
      }

   }