<html>

<head>
<title>Browser Time Synchronization</title>
<script LANGUAGE="JavaScript">
//added to original code
<!--- hide script from old browsers
/******GLOBAL DECL *****************/
var lclID;			/* timeout handles */
var stdID;
var nDBG = 0;		/* debug level:  0-none 3-extreme */
var ticks = 0;	/* ticks of standard clock */
var nDSToffset = 0;	/* hours offset for non DST compatible browsers */
/***** MAIN *******************V3*****/
function Main()
{
	
	start_std_clock();
	start_lcl_clock();
}
function open_nav () {

	var n;
	n = beagleSetTime1.Heartbeat();
	
	if (n == 2) {
	    //alert("Installation OK!"); }
	}
	else {
	    alert("This step requires that you install our ActiveX control used\n to set your system clock to standard time. Try reloading \n the page and say yes to install the control when prompted. You might \n		also need to change your Internet Security settings to \n allow this ActiveX control to download and run. \n You might consider adding the Beagle Software web site  \n (http://www.beaglesoft.com) to the list of trusted web sites within  \n Internet Explorer. This should allow the ActiveX control to load and run.  \n For more information about this page contact Beagle Software.");
	}
	winTwo =window.open("setTime.shtm", "TimeSet", "width=400,height=25,resizable=yes,alwaysRaised=yes");
	self.name = "main";
}

function open_help () {

	winThree =window.open("http://www.beaglesoft.com/Server/SetTimeHelp.htm", "Time Set Help", "width=600,height=125,resizable=yes");
	self.name = "main";
}


function CheckCntrl()
{
	var n;
	n = beagleSetTime1.Heartbeat();
	if (n == 2) {
		alert("ActiveX Control has been sucessfully loaded.");
	}
	else {
		alert("Sorry, ActiveX Control is not properly installed.");
	} //insert try catch here......
	
	//if(navigator.appName != "Microsoft Internet Explorer") {
	//	//check(false, title, URL, risk);
	//	alert("Must have IE to run this check!")
	//}
	//else {
	//	if (beagleSetTime1.Heartbeat == "1.0.1") ) {
	//		alert("LoadedOK") }
	//	else {
	//		alert("Failed to load")
	//	}
	//}

	//CODEBASE = "http://jasper.he.net/~beagle/Server/setTime.ocx#Version=1.0.1"

}


function SetTime() 
   {
	//var dt=new Date();
	//window.location.reload;	
	var dt = dateStrg_to_Date(document.frmCntl.txtStdGMTTime.value);	/* convert string to a date */
	//dt.setTime(dt.getTime() + (ticks * 1000));
	//ticks++;
	
	var mm,dd,yy,h,m,s;
	var date="  ",time="";

	// find out date(mm,dd,yy) and time(h,m,s)
	//mm=dt.getMonth();
	//dd=dt.getDate();
	//yy=dt.getYear();
	//if (yy<10) 
	//	{var yr= "0" + yy}
	//else	{
	//	var yr= yy}
	h=dt.getHours();
	if (h<10) {h= "0" + h}
	m=dt.getMinutes();
	if (m<10) {m= "0" + m}
	s=dt.getSeconds();
	if (s<10) {s= "0" + s}

	time+=h+":"+m+":"+s;
	
	alert("SetTime, Setting Time String:_" + time + "_");
	beagleSetTime1.SetSystemTimeAPI(time);
   
   }
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. ');
   var mywin = window.open("ClockResults.shtm","CalculationWindow","menubar=yes,scrollbars=yes");  //location=yes,status=yes
	//mywin.document.frmMain.txtStdTime.value = "HelloWorld"
   }
/* checks the type of browser */
/* returns the DST offset if needed */
function check_browser_env() 
{
	// check the type of browser
	if (navigator.appName == "Microsoft") {
		return 0 }
	else if (navigator.appName == "Netscape") {
		return 1 }
	else	{
		return 0 }
}

//cease hiding-->
</script>
<script language="JavaScript">
<!-- begin
function stop() {
	clearTimeout(lclID);
	clearTimeout(stdID); 
}

function start_std_clock() {
// variables declaration
	//var dt=new Date();
	var dt = dateStrg_to_Date(document.frmCntl.txtStdGMTTime.value);	/* convert string to a date */
	dt.setTime(dt.getTime() + (ticks * 1000));
	ticks++;
	
	var mm,dd,yy,h,m,s;
	var date="  ",time="      ";

	// find out date(mm,dd,yy) and time(h,m,s)
	//mm=dt.getMonth();
	//dd=dt.getDate();
	//yy=dt.getYear();
	if (yy<10) {var yr= "0" + yy}
	h=dt.getHours();
	if (h<10) {h= "0" + h}
	m=dt.getMinutes();
	if (m<10) {m= "0" + m}
	s=dt.getSeconds();
	if (s<10) {s= "0" + s}

	// show it separated	
	//document.frmStdTime.month.value=mm;
//document.frmStdTime.day.value=dd;
	//document.frmStdTime.year.value=yr;
	document.frmStdTime.hours.value=h;
	document.frmStdTime.minutes.value=m;
	document.frmStdTime.seconds.value=s;

	// show it together
	if(mm==1) date+="January";
	if(mm==2) date+="February";
	if(mm==3) date+="March";
	if(mm==4) date+="April";
	if(mm==5) date+="May";
	if(mm==6) date+="June";
	if(mm==7) date+="July";
	if(mm==8) date+="August";
	if(mm==9) date+="September";
	if(mm==10) date+="October";
	if(mm==11) date+="November";
	if(mm==12) date+="December";
	date+=" "+dd+", "+(2000+yy);
	time+=h+":"+m+":"+s;
//	document.frmStdTime.date.value=date;
	document.frmStdTime.time.value=time;
	// run again in 999 ms
	stdID=setTimeout("start_std_clock()",999); 
}

/********* run LOCAL clock */
function start_lcl_clock() {
// variables declaration
	var dt=new Date();
	
	dt = dateStrg_to_Date(dt.toGMTString());	/* convert string to a date */
	//dt.setTime(dt.getTime() + (ticks * 1000));
	/*ticks++; */			/* handled in std clock */

	var mm,dd,yy,h,m,s;
	var date="  ",time="      ";
// find out date(mm,dd,yy) and time(h,m,s)
	//mm=dt.getMonth();
	//dd=dt.getDate();
	//yy=dt.getYear();
	if (yy<10) {var yr= "0" + yy}
	h=dt.getHours() + nDSToffset;		/* +1 DAYLIGHT SAVINGS TIME?*/
	if (h<10) {h= "0" + h}
	m=dt.getMinutes();
	if (m<10) {m= "0" + m}
	s=dt.getSeconds();
	if (s<10) {s= "0" + s}
// show it separated
//	document.frmLclTime.month.value=mm;
	//document.frmLclTime.day.value=dd;
//	document.frmLclTime.year.value=yr;
	document.frmLclTime.hours.value=h;
	document.frmLclTime.minutes.value=m;
	document.frmLclTime.seconds.value=s;
// show it together
	if(mm==1) date+="January";
	if(mm==2) date+="February";
	if(mm==3) date+="March";
	if(mm==4) date+="April";
	if(mm==5) date+="May";
	if(mm==6) date+="June";
	if(mm==7) date+="July";
	if(mm==8) date+="August";
	if(mm==9) date+="September";
	if(mm==10) date+="October";
	if(mm==11) date+="November";
	if(mm==12) date+="December";
	date+=" "+dd+", "+(2000+yy);
	time+=h+":"+m+":"+s;
//	document.frmLclTime.date.value=date;
	document.frmLclTime.time.value=time;
// run again in 999 ms
	lclID=setTimeout("start_lcl_clock()",999); 
}

/* this converts the GMT date string to a date and returns the date */
function dateStrg_to_Date(sGMTtime)
{
	/* Expected Time String: "Tue, 26 May 1998 04:50:37 UTC"   (29 char)*/
	/* Expected Time String: "01234567890123456789012345678  */
	/* or 			 "Mon, 1 Jun 1998 18:47:32 UTC"   (28 char)*/
	/* or 			 "Mon, 17 Jun 1998 18:47:32"   (25 char)*/
	/* or 			 "Mon, 1 Jun 1998 18:47:32"   (24 char)*/
	
	var nLen = sGMTtime.length
	
	/* parse the GMT date */
	if (nLen == 28 || nLen == 24)  {
		/* parse the GMT date */
		var theDay = sGMTtime.substring(4,6)
		var theYear = sGMTtime.substring(13,15)
		var theMonth = sGMTtime.substring(7,10)	
		//alert("Month:_" + theMonth + "_ Year:_" + theYear + "_ Time String:_" + sGMTtime + "_" + " Len:" + sGMTtime.length)
	}
	else if (nLen == 29 || nLen == 25) {
		/* parse the GMT date */
		var theDay = sGMTtime.substring(5,7)
		var theYear = sGMTtime.substring(14,16)
		var theMonth = sGMTtime.substring(8,11)
		//alert("Month:_" + theMonth + "_ Year:_" + theYear + "_ Time String:_" + sGMTtime + "_" + " Len:" + sGMTtime.length)
	}
	
	if (theMonth == "Jan" ) {
		theMonth = 1 }
	else if ( theMonth == "Feb" ) {
		theMonth = 2 }
	else if ( theMonth == "Mar" ) {
		theMonth = 3 }
	else if ( theMonth == "Apr" ) {
		theMonth = 4 }
	else if ( theMonth == "May" ) {
		theMonth = "05" }
	else if ( theMonth == "Jun" ) {
		theMonth = 6 }
	else if ( theMonth == "Jul" ) {
		theMonth = 7 }
	else if ( theMonth == "Aug" ) {
		theMonth = 8 }
	else if ( theMonth == "Sep" ) {
		theMonth = 9 }
	else if ( theMonth == "Oct" ) {
		theMonth = 10 }
	else if ( theMonth == "Nov" ) {
		theMonth = 11 }
	else if ( theMonth == "Dec" ) {
		theMonth = 12 }

	if (nDBG > 1) {alert ("Y/M/D:" + theYear + theMonth + theDay)}

	/* get the time */
	if (nLen == 28 || nLen == 24)  {
		sGMTtime=sGMTtime.substring(16,24);
	}
	else {
		sGMTtime=sGMTtime.substring(17,25);
	}
	var theHours=sGMTtime.substring(0,2);

	if(theHours.substring(1,2)==":") {
		theHours = theHours.substring(0,1);
		var theMins = sGMTtime.substring(2,4);
	   var theSecs = sGMTtime.substring(5,7);
	}
	else {
		var theMins = sGMTtime.substring(3,5);
		var theSecs = sGMTtime.substring(6,8);
	}

	//alert("Hours are:_" + theHours + "_" + "Minutes are:_" + theMins + "_" + "Seconds are:_" + theSecs + "_")}
		
	if (nDBG > 0) {alert("strg_to_Date Args:" + theYear + ", " + theMonth + ", " + theDay + ", " + theHours + ", " + theMins + ", " + theSecs)}

	var newDate = new Date(theYear, theMonth, theDay, theHours, theMins, theSecs);
	//var fresh = "December 17, 1999 23:22:49"
	//var newDate = new Date(fresh);
	//alert("year: " + newDate.getYear());
	//alert("month:" + newDate.getMonth());
	//alert("hours:" + newDate.getHours());

	return newDate 
	
}


// end -->
</script>
<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</head>

<body TEXT="0000FF" onload="Main()" onunload="stop()">


<form name="frmLclTime">
  <table width="300" border="1" align="center">
  <tr><td colspan="3">
  <table align="center">
    <tr>
      <td>Your Time (GMT): </td>
      <td><input type="text" name="time" size="20"></td></tr></table>
  
 
    <tr align="center">
      <td>Hours</td>
      <td>Minutes</td>
      <td>Seconds</td>
    </tr>
    <tr align="center">
      <td><input type="text" name="hours" size="4"></td>
      <td><input type="text" name="minutes" size="4"></td>
      <td><input type="text" name="seconds" size="4"></td>
    </tr>
  </table>
</form>


<form name="frmStdTime">
  <table width="300" border="1" align="center">
    <tr><td colspan="3">
	<table align="center">
	  <tr>
	    <td>Server Time (GMT)</td>
	    <td><input type="text" name="time" size="20"></td></tr></table>
	</td></tr>

    <tr>
      <td><div align="center">Hours</div></td>
      <td><div align="center">Minutes</div></td>
      <td><div align="center">Seconds</div></td>
    </tr>
    <tr>
      <td><div align="center">
        <input type="text" name="hours" size="4">
      </div></td>
      <td><div align="center">
        <input type="text" name="minutes" size="4">
      </div></td>
      <td><div align="center">
        <input type="text" name="seconds" size="4">
      </div></td>
    </tr>
  </table>
  <!--#config timefmt="%a, %d %h %Y %T" -->
</form>

<form name="frmCntl">
	<div align="center">
	
	  <input TYPE="BUTTON" NAME="Start" VALUE="Start Clock Setting Utility" onclick="window.open('http://www.atomictimeclock.com/solutions/clockset.shtm', 'Clock_Check', 'width=400, height=330, resizable=yes')">
	  <input type="button" name="cmdClose" value="Close" onclick="self.close()">
    <input type="hidden" name="txtStdGMTTime" value="&lt;!--#echo var=" DATE_GMT">&quot;&gt;
   
  
    <input type="hidden" name="txtLclGMTTime">
    </div>
</form>
<!--webbot BOT="HTMLMarkup" StartSpan --><strong>[FrontPage HTML Markup Component]</strong><!--webbot bot="HTMLMarkup" endspan i-checksum="3222" -->


<!--webbot bot="Include" U-Include="../_private/navbar.htm" TAG="BODY" startspan --><table dir="ltr" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top" width="1%">

<table border="0" cellspacing="0" width="21%" id="table1" cellpadding="0" height="100%">
  <tr>
    <td width="163" valign="top" background="../tgimages/bg_vbtn.gif" align="right" rowspan="3" height="100%">
    <img border="0" src="../tgimages/bg_vbtn.gif" width="163" height="11"><br>
    <font size="1">
    </font><p>&nbsp;</p>
    <p><font size="1">
    </font></p>
    <p>&nbsp;</p>
    <p>
    <font size="1">
    </font><p align="center">
    &nbsp;<p align="center">
    &nbsp;<p align="center">
    &nbsp;<p align="center">
    &nbsp;<p align="center">
    <a href="../mainaboutus.htm">
    <img border="0" src="../tgimages/mailphone.gif" width="72" height="22"></a><p align="center">
    &nbsp;</td>
  </tr>
</table>

&nbsp;

</td><td valign="top" width="24"></td><td valign="top">

<p align="center"><map name="FPMap0">
<area href="../Search.htm" shape="rect" coords="341, 0, 390, 35">
<area href="../Support.htm" shape="rect" coords="282, 0, 337, 33">
<area href="mailto:sales@beaglesoft.com" shape="rect" coords="230, 0, 277, 35">
<area href="../OrderForm.htm" coords="172, 0, 221, 35" shape="rect">
<area href="../Products.htm" shape="rect" coords="107, 0, 170, 35">
<area href="../News.htm" shape="rect" coords="50, 0, 104, 35">
<area href="../index-old.html" shape="rect" coords="0, 0, 44, 34"></map><img rectangle="(230,0) (277,35) mailto:sales@beaglesoft.com" rectangle="(172,0) (221,35) ../OrderFormOLD.htm" rectangle="(107,0) (170,35) ../Products.htm" rectangle="(50,0) (104,35) ../News.htm" rectangle="(0,0) (44,34) ../index.html" src="../images/NavBar.gif" width="391" height="35" alt="Beagle Software - navigation" border="0" usemap="#FPMap0"></p>
</td></tr></table><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>

<table border="0" cellspacing="0" width="100%" id="table1" cellpadding="0" height="100%">
  <tr>
    <td width="54" height="75" align="center" rowspan="2">&nbsp;</td>
    <td width="88%" height="50" align="center"><font size="1">
    </font></td>
    <td width="54" height="75" align="center" rowspan="2">
    <a href="../mainsupport.htm">
      <img border="0" src="../images/custsupportdog.gif" width="54" height="60"></a></td>
  </tr>
  <tr>
    <td width="88%" height="25" align="center">
    <font color="#000000" size="1" face="Verdana">Copyright &copy; 2004 Beagle 
    Software. All rights reserved<br>
    </font>
      <font size="1" face="Verdana">Last reviewed
      September 13, 2004</font></td>
  </tr>
</table>

</td></tr></table><!--webbot bot="Include" endspan i-checksum="29414" -->

<p class="style1">Note: To set the clock on your PC, you must load an ActiveX control. Nothing will be installed on your computer.</p>
</body>
</html>

