//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 9/9/2008 9:35:09 AM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit51809 = false; var cancelAlert51809 = false; var secondaryAlert51809 = false; var primaryAlertText51809 = ''; var secondaryAlertText51809 = ''; var col51809 = 3; var NS51809 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha51809 = false; var useDHTML51809 = true; function di2051809(id, newSrc) { document.images[id].src = newSrc; } function preloadImages51809() { 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 SetCookie51809(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 GetCookie51809(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 CheckForCookie51809() { check = false; if(GetCookie51809('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration51809() { check = GetCookie51809('51809_VoteFrequency'); if(check != null && check != 99999999) { SetCookie51809('51809_VoteFrequency', '99999999', '99999999'); } } SetCookie51809('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_51531(useButtons, selectedOptionID, optionID) {if (selectedOptionID == optionID) return " checked "; else return ""; } function SCB51809(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB51809(0,'629831','629831','Yes - it comes down to property rights, and the owner has struck a reasonable balance.'); a[1] = SCB51809(1,'629832','629832','No - the interests of the entire community trump the rights of one property owner.'); function ClearText_51531() { if (document.Form51809.input_51531_0_1_0_2) document.Form51809.input_51531_0_1_0_2.value = ''; if (document.Form51809.input_51531_0_1_Text_2) document.Form51809.input_51531_0_1_Text_2.value = ''; } function CheckText_51531() { if (document.Form51809.input_51531_0_1_0_2) if (document.Form51809.input_51531_0_1_0_2.value == '') { secondaryAlert51809 = true; secondaryAlertText51809 ='Please enter a response for\nthe choice \'\''; cancelAlert51809 = true; cancelSubmit51809 = true; document.Form51809.input_51531_0_1_0_2.focus(); } if (document.Form51809.input_51531_0_1_Text_2) if (document.Form51809.input_51531_0_1_Text_2.value == '') { secondaryAlert51809 = true; secondaryAlertText51809 ='Please enter a response for\nthe choice \'\''; cancelAlert51809 = true; cancelSubmit51809 = true; document.Form51809.input_51531_0_1_Text_2.focus(); } } function AlertFunction51809(){ cancelSubmit51809 = true; primaryAlertText51809 = "To vote you must select a choice from the poll."; if (document.Form51809.input_51531_0_0_0_2[0].checked) cancelSubmit51809 = false; if (document.Form51809.input_51531_0_0_0_2[1].checked) cancelSubmit51809 = false; if (cancelSubmit51809 == true || secondaryAlert51809 == true) { alert(primaryAlertText51809 ); return false; } } function GetPollOptions51809(){ var optionselected = ''; if (document.Form51809.input_51531_0_0_0_2[0].checked) optionselected = optionselected + '&input_51531_0_0_0_2=' + document.Form51809.input_51531_0_0_0_2[0].value; if (document.Form51809.input_51531_0_0_0_2[1].checked) optionselected = optionselected + '&input_51531_0_0_0_2=' + document.Form51809.input_51531_0_0_0_2[1].value; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType51809 = navigator.appName.toLowerCase(); var bDhtml51809 = true; var sVisRes51809 = ' '; function DisplayVote51809() { document.write('
'); CheckCookieExpiration51809(); useDHTML51809 = true; voteFrequency51809 = GetCookie51809('51809_VoteFrequency'); if(voteFrequency51809 == null) { DisplayPoll51809(); } else { PollResponses51809(); } } function Vote51809() { var queryParam; // Check to see if user has selected something if(DoneFunction51809()==false) { return false; } else { SetCookie51809('51809_VoteFrequency', '99999999', '99999999'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha51809 ==false && bDhtml51809 && totalresponses > 0 && useDHTML51809 ==true) { queryParam = GetPollOptions51809(); queryParam = queryParam + "&returnurl=" + getCurrentURL51809(); queryParam = queryParam + "&qtype_51531=2"; document.getElementById('imgVoteInfo51809').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=5394751809&UD=39106FAE7A&query=1' + queryParam; PollResponses51809(); } else { document.Form51809.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=5394751809&UD=39106FAE7A"; document.Form51809.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader51809(){ var sHTML = ''; return sHTML; } function DisplayFooter51809(){ var sHTML = ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll51809() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader51809(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should Newport Beach allow construction of a house that will partially block views at a popular park?'; sHTML += ''; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col51809==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(CheckForCookie51809()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter51809(); sHTML += '
'; document.getElementById('pDisp51809').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses51809() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader51809(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should Newport Beach allow construction of a house that will partially block views at a popular park?'; sHTML += ''; sHTML += ''; sHTML += '
'; //----------------------------------- Begin Display Poll Results ------------------------------------- sHTML += ''; var graphcolor = new Array(); graphcolor[0] = new Array('ccccff'); graphcolor[1] = new Array('9999cc'); var graphcount=0; for(var i=0; i < options51809.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col51809==0) { if(i==0) { sHTML += ''; } else if(i==(options51809.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options51809[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options51809[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter51809(); sHTML += '
'; document.getElementById('pDisp51809').innerHTML = sHTML; var dResult = document.getElementById('pDisp51809'); 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); } } }