function updatePoll(pollId) {
    var vote = getCookie("SpectrumPollVote") || "";
    var hasVoted = vote.indexOf("p" + pollId + "p") > -1;
    var voteOver = pollVote["poll" + pollId] == null;
    $("pollHolder" + pollId).innerHTML = ((hasVoted || voteOver) ? pollResult : pollVote)["poll" + pollId];
}

function docRefresh() {
 window.location.reload( true);
}

function submitPollResult(pollOptionId) {

var params = 'pollOptionId=' + pollOptionId;
new  Ajax.Request('polldata', {parameters: params,
onComplete: docRefresh,
evalScripts: true });

}





pollVote = {
                                        "dummy_for_ie": "dummy_for_ie"
}


pollResult = {
        "poll1206":
        "<table border='0' cellpadding='0' cellspacing='0'>"
        + "<tr><td id='pollTitle1206' colspan='2' class='question'>Have we learned from the Chernobyl accident?</td></tr>"
                    + "<tr><td class='results'>Yes: <span id='pollOptionPercentage1212'>46%</span><br />"
            + "<span id='pollOptionVotes1212' style='display:none;'>25</span></td></tr>"
                    + "<tr><td class='results'>No: <span id='pollOptionPercentage1213'>54%</span><br />"
            + "<span id='pollOptionVotes1213' style='display:none;'>29</span></td></tr>"
                + "</table>",
        "poll1204":
        "<table border='0' cellpadding='0' cellspacing='0'>"
        + "<tr><td id='pollTitle1204' colspan='2' class='question'>Are you considering using VoIP for your phone needs?</td></tr>"
                    + "<tr><td class='results'>Yes: <span id='pollOptionPercentage1207'>80%</span><br />"
            + "<span id='pollOptionVotes1207' style='display:none;'>74</span></td></tr>"
                    + "<tr><td class='results'>No: <span id='pollOptionPercentage1208'>20%</span><br />"
            + "<span id='pollOptionVotes1208' style='display:none;'>18</span></td></tr>"
                + "</table>",
        "poll1203":
        "<table border='0' cellpadding='0' cellspacing='0'>"
        + "<tr><td id='pollTitle1203' colspan='2' class='question'>To increase fuel efficiency, which technology will prove more successful for the auto industry, diesel or hybrid?</td></tr>"
                    + "<tr><td class='results'>Diesel: <span id='pollOptionPercentage1205'>23%</span><br />"
            + "<span id='pollOptionVotes1205' style='display:none;'>100</span></td></tr>"
                    + "<tr><td class='results'>Hybrid: <span id='pollOptionPercentage1206'>77%</span><br />"
            + "<span id='pollOptionVotes1206' style='display:none;'>334</span></td></tr>"
                + "</table>",
        "poll1205":
        "<table border='0' cellpadding='0' cellspacing='0'>"
        + "<tr><td id='pollTitle1205' colspan='2' class='question'>In your opinion, how harmful is active sonar to marine mammals?</td></tr>"
                    + "<tr><td class='results'>Very: <span id='pollOptionPercentage1209'>58%</span><br />"
            + "<span id='pollOptionVotes1209' style='display:none;'>30</span></td></tr>"
                    + "<tr><td class='results'>Somewhat: <span id='pollOptionPercentage1210'>27%</span><br />"
            + "<span id='pollOptionVotes1210' style='display:none;'>14</span></td></tr>"
                    + "<tr><td class='results'>Not very: <span id='pollOptionPercentage1211'>15%</span><br />"
            + "<span id='pollOptionVotes1211' style='display:none;'>8</span></td></tr>"
                + "</table>",
        "dummy_for_ie": "dummy_for_ie"
}