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 = {
        "poll1182":
        "<table border='0' cellpadding='0' cellspacing='0'>"
        + "<tr><td id='pollTitle1182' colspan='2' class='question'>Is it safe to use cellphones and wireless devices on airliners?</td></tr>"
                    + "<tr><td class='results'>Yes: <span id='pollOptionPercentage1183'>22%</span><br />"
            + "<span id='pollOptionVotes1183' style='display:none;'>268</span></td></tr>"
                    + "<tr><td class='results'>No: <span id='pollOptionPercentage1184'>43%</span><br />"
            + "<span id='pollOptionVotes1184' style='display:none;'>515</span></td></tr>"
                    + "<tr><td class='results'>Needs further study: <span id='pollOptionPercentage1185'>35%</span><br />"
            + "<span id='pollOptionVotes1185' style='display:none;'>418</span></td></tr>"
                + "</table>",
        "poll1202":
        "<table border='0' cellpadding='0' cellspacing='0'>"
        + "<tr><td id='pollTitle1202' colspan='2' class='question'>Which aspect of exploration should the space-faring nations emphasize more in the future?</td></tr>"
                    + "<tr><td class='results'>Manned spaceflight missions: <span id='pollOptionPercentage1203'>47%</span><br />"
            + "<span id='pollOptionVotes1203' style='display:none;'>53</span></td></tr>"
                    + "<tr><td class='results'>Unmanned research vehicles: <span id='pollOptionPercentage1204'>53%</span><br />"
            + "<span id='pollOptionVotes1204' style='display:none;'>59</span></td></tr>"
                + "</table>",
        "dummy_for_ie": "dummy_for_ie"
}