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 = {
        "poll1365":
        "<table border='0' cellpadding='0' cellspacing='0'>"
        + "<tr><td id='pollTitle1365' colspan='2' class='question'>Did North Korea just detonate a nuclear bomb? </td></tr>"
                    + "<tr><td class='results'>Yes: <span id='pollOptionPercentage1369'>71%</span><br />"
            + "<span id='pollOptionVotes1369' style='display:none;'>22</span></td></tr>"
                    + "<tr><td class='results'>No: <span id='pollOptionPercentage1370'>29%</span><br />"
            + "<span id='pollOptionVotes1370' style='display:none;'>9</span></td></tr>"
                + "</table>",
        "poll1367":
        "<table border='0' cellpadding='0' cellspacing='0'>"
        + "<tr><td id='pollTitle1367' colspan='2' class='question'>Can America's new electronic election system be hacked?</td></tr>"
                    + "<tr><td class='results'>Yes: <span id='pollOptionPercentage1373'>89%</span><br />"
            + "<span id='pollOptionVotes1373' style='display:none;'>75</span></td></tr>"
                    + "<tr><td class='results'>No: <span id='pollOptionPercentage1374'>11%</span><br />"
            + "<span id='pollOptionVotes1374' style='display:none;'>9</span></td></tr>"
                + "</table>",
        "poll1347":
        "<table border='0' cellpadding='0' cellspacing='0'>"
        + "<tr><td id='pollTitle1347' colspan='2' class='question'>Do you think the U.S. needs a national system of digital health-care records?</td></tr>"
                    + "<tr><td class='results'>Yes: <span id='pollOptionPercentage1354'>76%</span><br />"
            + "<span id='pollOptionVotes1354' style='display:none;'>105</span></td></tr>"
                    + "<tr><td class='results'>No: <span id='pollOptionPercentage1355'>24%</span><br />"
            + "<span id='pollOptionVotes1355' style='display:none;'>34</span></td></tr>"
                + "</table>",
        "poll1366":
        "<table border='0' cellpadding='0' cellspacing='0'>"
        + "<tr><td id='pollTitle1366' colspan='2' class='question'>Will the world go to war against N. Korea because of its recent actions?</td></tr>"
                    + "<tr><td class='results'>Yes: <span id='pollOptionPercentage1371'>28%</span><br />"
            + "<span id='pollOptionVotes1371' style='display:none;'>21</span></td></tr>"
                    + "<tr><td class='results'>No: <span id='pollOptionPercentage1372'>72%</span><br />"
            + "<span id='pollOptionVotes1372' style='display:none;'>55</span></td></tr>"
                + "</table>",
        "poll1346":
        "<table border='0' cellpadding='0' cellspacing='0'>"
        + "<tr><td id='pollTitle1346' colspan='2' class='question'>If you absolutely needed it, would you let surgeons operate on you via robotic technology?</td></tr>"
                    + "<tr><td class='results'>Without a doubt: <span id='pollOptionPercentage1351'>52%</span><br />"
            + "<span id='pollOptionVotes1351' style='display:none;'>101</span></td></tr>"
                    + "<tr><td class='results'>With reservations: <span id='pollOptionPercentage1352'>38%</span><br />"
            + "<span id='pollOptionVotes1352' style='display:none;'>73</span></td></tr>"
                    + "<tr><td class='results'>I'd rather die: <span id='pollOptionPercentage1353'>10%</span><br />"
            + "<span id='pollOptionVotes1353' style='display:none;'>19</span></td></tr>"
                + "</table>",
        "dummy_for_ie": "dummy_for_ie"
}