//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 3/17/2008 4:33:31 PM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit46500 = false; var cancelAlert46500 = false; var secondaryAlert46500 = false; var primaryAlertText46500 = ''; var secondaryAlertText46500 = ''; var col46500 = 1; var NS46500 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha46500 = false; var useDHTML46500 = true; function di2046500(id, newSrc) { document.images[id].src = newSrc; } function preloadImages46500() { 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 SetCookie46500(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 GetCookie46500(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 CheckForCookie46500() { check = false; if(GetCookie46500('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration46500() { check = GetCookie46500('46500_VoteFrequency'); if(check != null && check != 259200) { SetCookie46500('46500_VoteFrequency', '259200', '259200'); } } SetCookie46500('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_46260(useButtons, selectedOptionID, optionID) {if (selectedOptionID == optionID) return "http://www.pollmonkey.com/images/Buttons/Button1/RadioOn_CCCC99.gif"; else return "http://www.pollmonkey.com/images/Buttons/Button1/RadioOff_CCCC99.gif"; } function SCB46500(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB46500(0,'566778','566778','Yes'); a[1] = SCB46500(1,'566779','566779','No'); function ClearText_46260() { if (document.Form46500.input_46260_0_1_0_2) document.Form46500.input_46260_0_1_0_2.value = ''; if (document.Form46500.input_46260_0_1_Text_2) document.Form46500.input_46260_0_1_Text_2.value = ''; } function CheckText_46260() { if (document.Form46500.input_46260_0_1_0_2) if (document.Form46500.input_46260_0_1_0_2.value == '') { secondaryAlert46500 = true; secondaryAlertText46500 ='Please enter a response for\nthe choice \'\''; cancelAlert46500 = true; cancelSubmit46500 = true; document.Form46500.input_46260_0_1_0_2.focus(); } if (document.Form46500.input_46260_0_1_Text_2) if (document.Form46500.input_46260_0_1_Text_2.value == '') { secondaryAlert46500 = true; secondaryAlertText46500 ='Please enter a response for\nthe choice \'\''; cancelAlert46500 = true; cancelSubmit46500 = true; document.Form46500.input_46260_0_1_Text_2.focus(); } } function AlertFunction46500(){ cancelSubmit46500 = true; primaryAlertText46500 = "To vote you must select a choice from the poll."; if (document.Form46500.input_46260_0_0_0_2.value == '566778') cancelSubmit46500 = false; if (document.Form46500.input_46260_0_0_0_2.value == '566779') cancelSubmit46500 = false; if (cancelSubmit46500 == true || secondaryAlert46500 == true) { alert(primaryAlertText46500 ); return false; } } function GetPollOptions46500(){ var optionselected = ''; if (document.Form46500.input_46260_0_0_0_2.value == '566778') optionselected = optionselected + '&input_46260_0_0_0_2=566778'; if (document.Form46500.input_46260_0_0_0_2.value == '566779') optionselected = optionselected + '&input_46260_0_0_0_2=566779'; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType46500 = navigator.appName.toLowerCase(); var bDhtml46500 = true; var sVisRes46500 = ' '; function DisplayVote46500() { document.write('
'); CheckCookieExpiration46500(); useDHTML46500 = true; voteFrequency46500 = GetCookie46500('46500_VoteFrequency'); if(voteFrequency46500 == null) { DisplayPoll46500(); } else { PollResponses46500(); } } function Vote46500() { var queryParam; // Check to see if user has selected something if(DoneFunction46500()==false) { return; } else { SetCookie46500('46500_VoteFrequency', '259200', '259200'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha46500 ==false && bDhtml46500 && totalresponses > 0 && useDHTML46500 ==true) { queryParam = GetPollOptions46500(); queryParam = queryParam + "&returnurl=" + getCurrentURL46500(); queryParam = queryParam + "&qtype_46260=2"; document.getElementById('imgVoteInfo46500').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=8628646500&UD=39106FAE7A&query=1' + queryParam; PollResponses46500(); } else { document.Form46500.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=8628646500&UD=39106FAE7A"; document.Form46500.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader46500(){ var sHTML = ''; sHTML += '
'; sHTML += 'Lights, camera, alcohol?'; sHTML += '
'; return sHTML; } function DisplayFooter46500(){ var sHTML = ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Powered by PollMonkey'; sHTML += ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll46500() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader46500(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should Anaheim city officials approve a Disney-area theater\'s request to serve beer and wine?'; sHTML += ''; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col46500==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(CheckForCookie46500()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'View Results
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter46500(); sHTML += '
'; document.getElementById('pDisp46500').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses46500() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader46500(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should Anaheim city officials approve a Disney-area theater\'s request to serve beer and wine?'; sHTML += ''; sHTML += ''; sHTML += '
'; //----------------------------------- Begin Display Poll Results ------------------------------------- sHTML += ''; var graphcolor = new Array(); graphcolor[0] = new Array('996600'); graphcolor[1] = new Array('ffffff'); var graphcount=0; for(var i=0; i < options46500.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col46500==0) { if(i==0) { sHTML += ''; } else if(i==(options46500.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options46500[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options46500[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter46500(); sHTML += '
'; document.getElementById('pDisp46500').innerHTML = sHTML; var dResult = document.getElementById('pDisp46500'); 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); } } }