// Ten (10) minute timer -- 1000 is 1 sec, 600000 is 10 mins // 1500000 = 25 mins function theTimer() { setTimeout( "reloadPage()", 1500000); } function reloadPage() { // Array of Months var monthNames = new Array( "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ); // Array of Days var dayNames = new Array( "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ); // Current date var now = new Date(); // Adjust for Y2K issues var MyYear = now.getYear(); if ( MyYear <= 100 ) { MyYear = 2000 + MyYear; } // Make sure hours are displayed as two-digits var MyHour = now.getHours(); var ap = "AM"; if ( MyHour < 10 ) {MyHour = '0' + MyHour;} if (MyHour > 11) { ap = "PM"; } if (MyHour > 12) { MyHour = MyHour - 12; } if (MyHour == 0) { MyHour = 12; } // Make sure minutes are displayed as two-digits var MyMin = now.getMinutes(); if ( MyMin < 10 ) { MyMin = '0' + MyMin; } // Set Date and Time in easy-to-read format: HHmm on day, dd-mmm-yyyy // Use "MyHour + '' + MyMin..." instead of "MyHour + MyMin..." or else it'll add the hours to the minutes var theDateTime = MyHour + ':' + MyMin +' '+ ap + ' on ' + dayNames[ now.getDay() ] + ', ' + now.getDate() + '-' + monthNames[ now.getMonth() ] + '-' + MyYear; // Bring this browser windows to the front of all other windows window.focus(); // Confirmation message var bReloadPage = confirm( 'It is ' + theDateTime + '.\n\n' + 'Your Tama session will expire in 5 minutes.\n' + 'To save your unfinished work, click cancel \n' + 'and submit any updates before before time expires.\n\n' + '**Note** clicking "OK" will refresh your browser\n' + 'but you will lose any unsaved work.\n\n'); if ( bReloadPage ) { /* Netscape 2.0 and higher */ window.location.href= location.href ; /* Netscape 3.0 and higher window.location.reload( forceGet ); */ } } function welcome () { var message = "