﻿var Survey = new Object();

Survey.DisplayDiv = '';

Survey.SubmitSurvey = function()
{
    for(i=0; i<document.Form1.elements.length; i++){
        if(String(document.Form1.elements[i].name).substring(0,6) == 'answer'){
            if(document.Form1.elements[i].checked){
                //alert(document.Form1.elements[i].value);
                AjaxService.UpdateAnswerVoteCount(document.Form1.elements[i].value);
            }
        }
    }
    
    try
    {
        Survey.DisplayThanks();
    }
    catch(err)
    {}
}

Survey.DisplayThanks = function()
{
    document.getElementById('survey_form').style.display = 'none';
    document.getElementById('send_button').style.display = 'none';
    document.getElementById('thanks_display').style.display = 'block';
}
