--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>Talk Timer</title>
+ <link rel="stylesheet" type="text/css" href="style.css">
+ <meta charset="UTF-8"/>
+
+ <script type="text/javascript">
+ function isInt(value) {
+ return !isNaN(value) && (function(x) { return (x | 0) === x; })(parseFloat(value))
+}
+
+
+ var TO;
+ var starttime = 100;
+ function start() {
+ starttime = document.getElementById('set').value;
+ if(!isInt(starttime)) {
+ document.getElementById('tim').innerHTML = 'X';
+ return;
+ }
+ document.getElementById('tim').innerHTML = starttime;
+ clearInterval(TO);
+ TO = setInterval('update()',60000);
+ }
+
+ function update() {
+ x = document.getElementById('tim').innerHTML;
+ x = x-1;
+ document.getElementById('tim').innerHTML = x;
+
+
+ if(x<= 0) document.getElementById('tim').className='shutup';
+ else if(x <= starttime/10) document.getElementById('tim').className='hurry';
+ else if(x<=starttime/3) document.getElementById('tim').className='warn';
+ else document.getElementById('tim').className='';
+ //if (x==0) {clearInterval(TO);}
+ }
+
+
+
+ </script>
+
+</head>
+<body>
+<div id="tim">
+00</div>
+<div id="setting">
+<input type="text" id="set" onChange="start()" value="10"/>
+<input type="button" value="start" onClick="start()"/>
+</div>
+
+</body></html>