// JavaScript Document
// author: rel
function countdown_quiz_time(answer_time) {
    var countdown_layer     = window.document.getElementById("quiz-timer");
    var answer_void_input   = window.document.getElementById("question_answer_void");

    if(answer_time > 0) {
        countdown_layer.innerHTML = parseInt(answer_time);
        window.setTimeout('countdown_quiz_time('+(answer_time-1)+')',1000);
    } else if (countdown_layer) {
        countdown_layer.innerHTML = "no";
        answer_void_input.value = "true";
        document.forms['f_quiz'].submit();
    }
}