<html>
<body onload="startTime()">
<div id="txt">
</div>
<script>
function startTime() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
// add a zero in front of numbers<10
m = checkTime(m);
s = checkTime(s);
document.getElementById("txt").innerHTML = h + ":" + m + ":" + s;
var t = setTimeout(function () { startTime() }, 500);
if (h == 15 && m == 30) {
showModalPopUp();
}
}
function checkTime(i) {
if (i < 10) {
i = "0" + i;
}
return i;
}
var popUpObj;
function showModalPopUp() {
popUpObj = window.open("PopUp.htm",
"ModalPopUp",
"toolbar=no," +
"scrollbars=no," +
"location=no," +
"statusbar=no," +
"menubar=no," +
"resizable=0," +
"width=100," +
"height=100," +
"left = 490," +
"top=300"
);
popUpObj.focus();
LoadModalDiv();
}
</script>
</body>
</html>