//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 1/29/2009 4:11:32 PM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit55949 = false; var cancelAlert55949 = false; var secondaryAlert55949 = false; var primaryAlertText55949 = ''; var secondaryAlertText55949 = ''; var col55949 = 1; var NS55949 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha55949 = false; var useDHTML55949 = true; function di2055949(id, newSrc) { document.images[id].src = newSrc; } function preloadImages55949() { if (document.images) { if (typeof(document.WM) == 'undefined'){ document.WM = new Object(); } document.WM.overImages = new Array(); var argLength = preloadImages.arguments.length; for(var arg=0;arg','%3E'); } //-------- END - Poll Header Functions ------------------------------------ //---------- COOKIES FUNCTIONS ------------ function SetCookie55949(name, value, time) { // 1000 milliseconds in a sec var millisecond; millisecond = 1000; time = time * millisecond; // Set expiration of cookie var expDate = new Date(); expDate.setTime(expDate.getTime() + time); document.cookie = name + "=" + escape(value) + ( (expDate) ? ";expires=" + expDate.toGMTString() : ""); } function GetCookie55949(name) { var result = null; var myCookie = " " + document.cookie + ";"; var srchName = " " + name + "="; var start = myCookie.indexOf(srchName); var end; if (start != -1) { start += srchName.length; end = myCookie.indexOf(";", start); result = unescape (myCookie.substring(start, end)); } return result; } function CheckForCookie55949() { check = false; if(GetCookie55949('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration55949() { check = GetCookie55949('55949_VoteFrequency'); if(check != null && check != 99999999) { SetCookie55949('55949_VoteFrequency', '99999999', '99999999'); } } SetCookie55949('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_55668(useButtons, selectedOptionID, optionID) {if (selectedOptionID == optionID) return " checked "; else return ""; } function SCB55949(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB55949(0,'682180','682180','Sure, he is our president.'); a[1] = SCB55949(1,'682181','682181','No, his politics iritate me.'); a[2] = SCB55949(2,'682182','682182','I dont care. I mean, I can name any room in my home what I want.'); function ClearText_55668() { if (document.Form55949.input_55668_0_1_0_2) document.Form55949.input_55668_0_1_0_2.value = ''; if (document.Form55949.input_55668_0_1_Text_2) document.Form55949.input_55668_0_1_Text_2.value = ''; } function CheckText_55668() { if (document.Form55949.input_55668_0_1_0_2) if (document.Form55949.input_55668_0_1_0_2.value == '') { secondaryAlert55949 = true; secondaryAlertText55949 ='Please enter a response for\nthe choice \'\''; cancelAlert55949 = true; cancelSubmit55949 = true; document.Form55949.input_55668_0_1_0_2.focus(); } if (document.Form55949.input_55668_0_1_Text_2) if (document.Form55949.input_55668_0_1_Text_2.value == '') { secondaryAlert55949 = true; secondaryAlertText55949 ='Please enter a response for\nthe choice \'\''; cancelAlert55949 = true; cancelSubmit55949 = true; document.Form55949.input_55668_0_1_Text_2.focus(); } } function AlertFunction55949(){ cancelSubmit55949 = true; primaryAlertText55949 = "To vote you must select a choice from the poll."; if (document.Form55949.input_55668_0_0_0_2[0].checked) cancelSubmit55949 = false; if (document.Form55949.input_55668_0_0_0_2[1].checked) cancelSubmit55949 = false; if (document.Form55949.input_55668_0_0_0_2[2].checked) cancelSubmit55949 = false; if (cancelSubmit55949 == true || secondaryAlert55949 == true) { alert(primaryAlertText55949 ); return false; } } function GetPollOptions55949(){ var optionselected = ''; if (document.Form55949.input_55668_0_0_0_2[0].checked) optionselected = optionselected + '&input_55668_0_0_0_2=' + document.Form55949.input_55668_0_0_0_2[0].value; if (document.Form55949.input_55668_0_0_0_2[1].checked) optionselected = optionselected + '&input_55668_0_0_0_2=' + document.Form55949.input_55668_0_0_0_2[1].value; if (document.Form55949.input_55668_0_0_0_2[2].checked) optionselected = optionselected + '&input_55668_0_0_0_2=' + document.Form55949.input_55668_0_0_0_2[2].value; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType55949 = navigator.appName.toLowerCase(); var bDhtml55949 = true; var sVisRes55949 = ' '; function DisplayVote55949() { document.write('
'); CheckCookieExpiration55949(); useDHTML55949 = true; voteFrequency55949 = GetCookie55949('55949_VoteFrequency'); if(voteFrequency55949 == null) { DisplayPoll55949(); } else { PollResponses55949(); } } function Vote55949() { var queryParam; // Check to see if user has selected something if(DoneFunction55949()==false) { return false; } else { SetCookie55949('55949_VoteFrequency', '99999999', '99999999'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha55949 ==false && bDhtml55949 && totalresponses > 0 && useDHTML55949 ==true) { queryParam = GetPollOptions55949(); queryParam = queryParam + "&returnurl=" + getCurrentURL55949(); queryParam = queryParam + "&qtype_55668=2"; document.getElementById('imgVoteInfo55949').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=7814155949&UD=39106FAE7A&query=1' + queryParam; PollResponses55949(); } else { document.Form55949.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=7814155949&UD=39106FAE7A"; document.Form55949.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader55949(){ var sHTML = ''; sHTML += '
'; sHTML += 'Barack Obama Room'; sHTML += '
'; return sHTML; } function DisplayFooter55949(){ var sHTML = ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll55949() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader55949(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Do you support the naming of the Barack Obama Room at the Anaheim White House?'; sHTML += ''; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col55949==0) { if(i==0) sHTML += ''; else if(i==(a.length-1)) { sHTML += ''; sHTML += ''; } else { sHTML += ''; sHTML += ''; sHTML += ''; } } sHTML += a[i]; } sHTML += '
'; //-------End Poll Questions ------------ sHTML += '
'; if(CheckForCookie55949()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter55949(); sHTML += '
'; document.getElementById('pDisp55949').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses55949() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader55949(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Do you support the naming of the Barack Obama Room at the Anaheim White House?'; sHTML += ''; sHTML += ''; sHTML += '
'; //----------------------------------- Begin Display Poll Results ------------------------------------- sHTML += ''; var graphcolor = new Array(); graphcolor[0] = new Array('ccccff'); graphcolor[1] = new Array('9999cc'); graphcolor[2] = new Array('666666'); var graphcount=0; for(var i=0; i < options55949.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col55949==0) { if(i==0) { sHTML += ''; } else if(i==(options55949.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options55949[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options55949[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter55949(); sHTML += '
'; document.getElementById('pDisp55949').innerHTML = sHTML; var dResult = document.getElementById('pDisp55949'); dResult.innerHTML = sHTML; var scripts = dResult.getElementsByTagName('script'); for(var i = 0; i < scripts.length; i++) { if(scripts[i].type == 'text/javascript') { eval(scripts[i].innerHTML); } } }