Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Clock Manager Utilities</title>
<script language="javscript" src="../css_classes/clock.js"></script>
<link rel="stylesheet" href="../css_classes/scrollBar.css" type="text/css">
<link rel="stylesheet" href="../css_classes/display_controls.css" type="text/css">
<script language="javascript">
var key, clockName, clockProb, clockIdea, length, inUse, element, status, place
expireDate = new Date
deleteDate = new Date
expireDate.setMonth(expireDate.getMonth()+240)
deleteDate.setMonth(expireDate.getMonth()-1)
thisCookie = document.cookie.split("; ")
key = new Array();
key['13'] = "javascript:clockAction()";
key['113'] = "../../clock_manager.htm";
key['118'] = "javascript:scroll('up')";
key['119'] = "javascript:scroll('down')";
function getKey(keyStroke) {
for (var i in key) if (event.keyCode == i) window.location = key[i];
}
document.onkeydown = getKey;
function scroll(dir) {
if (dir == "up") {
document.options.clock.selectedIndex--
} else {
document.options.clock.selectedIndex++
}
}
function loadClocks() {
for (i=0; i<thisCookie.length; i++) {
if (thisCookie[i].split("=")[1] == "clock2") {
document.write("<option value=" + thisCookie[i].split("=")[0] + ">" + thisCookie[i].split("=")[0] + "</option>");
}
}
}
function clockAction() {
if (status == "in" && place == "new") {
var h = 0
var j = 0
var k = 0
var g = 0
var c = 0
var check
var inName = document.options.newClock.value.toLowerCase().replace(" ", "_")
var testStr = inName.substring(1, + inName.length)
clockName = document.options.newClock.value.toLowerCase()
if (clockName != "") {
for (i=0; i<thisCookie.length; i++) { //check if name is in use
if (clockName == thisCookie[i].split("=")[0].substring(0, + thisCookie[i].split("=")[0].length -9) && h == 0) {
inUse = true;
alert("that name is in use, delete the old name, or change the new name (try adding a first name or a number on the front)");
document.options.newClock.value = "";
h++
k++
}
}
if(!inUse) {
for (c=0; c<10; c++) { //check for a number at the last character
if (g == 0) {
if(testStr.search(c) != -1) {
g++;
inUse = true;
alert("you cannot have a number at the end of the name, you must put it at the front");
window.location = "javascript:history.go(0)";
}
}
}
}
if (!inUse) {
if (window.confirm("Create a clock for " + inName + "?")) {
clockProb = window.prompt("What is wrong with this clock?", "It's broken");
clockIdea = window.prompt("Enter some ideas to fix the problem", "Beat it with a hammer");
document.cookie=inName + "clockProb=" + clockProb + ";expires=" + expireDate.toGMTString();
document.cookie=inName + "clockIdea=" + clockIdea + ";expires=" + expireDate.toGMTString();
document.cookie=inName + "clockName=" + inName + ";expires=" + expireDate.toGMTString();
document.cookie=inName + "=clock2;expires=" + expireDate.toGMTString();
alert("the clock for " + inName + " has been created");
window.location = "javascript:history.go(0)";
}
} else {
alert("That name is in use already");
window.location="javascript:history.go(0)";
}
} else {
alert("You didn't enter a name");
}
} else if (status =="in" && place == "del") {
clockName = document.options.clock.options[document.options.clock.selectedIndex].value
length = clockName.length
if (clockName != "pick" && clockName != "end") {
if (confirm("delete " + clockName + "'s clock?")) {
for (i=0; i<thisCookie.length; i++) {
if (thisCookie[i].split("=")[0].substr(0, + length) == clockName) {
document.cookie=thisCookie[i].split("=")[0] + "=null;expires=" + deleteDate.toGMTString();
}
}
alert(clockName + "'s clock has been deleted");
window.location="javascript:history.go(0)";
}
} else {
alert("pick a clock first");
}
}
}
function checkFocus(element, status2) {
if (status2 == "in") {
place = element
status = "in"
} else {
place = "null"
}
}
// end -->
</script>
</head>
<body onLoad="document.options.newClock.focus()">
<br>
<p align="center">
<b>
<font face="Comic Sans MS" size="4">
<span style="letter-spacing: 2pt">
Clock Manager Utilities
</span>
</font>
</b>
<hr>
<br>
<p align="center">
<form name="options" method="post" action="javascript:history.go(0)">
<p align="center">
create a new clock:
<input type="text" name="newClock" size="20" onFocus="checkFocus('new', 'in')" onBlur="checkFocus('new', 'out')">
press 'enter' to create
<p>
<br>
<p align="center">
delete a clock:
<select size="1" name="clock" onFocus="checkFocus('del', 'in')" onBlur="checkFocus('del', 'out')">
<option selected value="pick">
--pick a clock--
</option>
<script language="javascript">
loadClocks();
</script>
<option value="end">
--end, scroll up--
</option>
</select>
press 'enter' to delete
</form>
<hr>
<p align="center">
Use 'F7' and 'F8' to scroll the selection box
<br>
Press 'F2' to return to the main menu
</p>
<p align="center">
<span id="clock" style="position:relative">
</p>
</body>
</html>
***************clock.js****************
function displayTime() {
var today;
var time;
today = new Date();
time = today.toLocaleString()
clock.innerHTML = time;
setTimeout("displayTime()", 500)
}
************display_controls.css*************
body {
color: #FFFFFF;
background-image: url(../../images/zertxtr.gif);
background-attachment: fixed;
font: comic sans ms;
font-weight: bold;
size: 12pt;
}
a:hover {
color: darkred;
font: comic sans ms
font-weight: bold;
size: 14pt;
}
a {
color: #0066CC;
font-weight: bold;
font: comic sans ms
size: 12pt;
}
************scrollBar.css**********
body {
scrollbar-face-color: #000000;
scrollbar-shadow-color: #FFFFFF;
scrollbar-highlight-color: #FFFFFF;
scrollbar-3dlight-color: #000000;
scrollbar-darkshadow-color:#000000;
scrollbar-track-color: #000000;
scrollbar-arrow-color: #FFFFFF;
}
**************************************