function CountDown() {
    var count = 3, tmID,infobox = document.getElementById("start"),o = document.getElementById("atari"),kekka = document.getElementById("info");
    function countDown() {
	if (--count == 0) {
	    kekka.innerHTML = "おわり!おまえのまけぇ！！！";
	} else {
	    kekka.innerHTML = count + "秒前";
	    tmID = setTimeout(countDown, 1000);
	}
    }
    function startCountDown() {
	tmID = setTimeout(countDown, 1000);
	infobox.removeEventListener("click", startCountDown, false);
	o.addEventListener("click", stopCountDown, false);
    }
    function stopCountDown() {
	clearTimeout(tmID);
	kekka.innerHTML = "べいちゃんだよ"
	o.innerHTML = "正解！！かわいいでしょ！！！";
	o.removeEventListener("click", stopCountDown, false);
    }
    infobox.addEventListener("click", startCountDown, false);
};

document.addEventListener("DOMContentLoaded", CountDown, false);
