//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 8/27/2008 2:44:19 PM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit51345 = false; var cancelAlert51345 = false; var secondaryAlert51345 = false; var primaryAlertText51345 = ''; var secondaryAlertText51345 = ''; var col51345 = 1; var NS51345 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha51345 = false; var useDHTML51345 = true; function di2051345(id, newSrc) { document.images[id].src = newSrc; } function preloadImages51345() { 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 SetCookie51345(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 GetCookie51345(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 CheckForCookie51345() { check = false; if(GetCookie51345('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration51345() { check = GetCookie51345('51345_VoteFrequency'); if(check != null && check != 99999999) { SetCookie51345('51345_VoteFrequency', '99999999', '99999999'); } } SetCookie51345('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_51089(useButtons, selectedOptionID, optionID) {if (selectedOptionID == optionID) return " checked "; else return ""; } function SCB51345(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB51345(0,'624329','624329','No -- The impact isn\'t that great'); a[1] = SCB51345(1,'624330','624330','No -- What could they do? Money is tight.'); a[2] = SCB51345(2,'624331','624331','Yes -- The impact merits action'); a[3] = SCB51345(3,'624332','624332','Yes -- They have a responsibility to the local cities'); function ClearText_51089() { if (document.Form51345.input_51089_0_1_0_2) document.Form51345.input_51089_0_1_0_2.value = ''; if (document.Form51345.input_51089_0_1_Text_2) document.Form51345.input_51089_0_1_Text_2.value = ''; } function CheckText_51089() { if (document.Form51345.input_51089_0_1_0_2) if (document.Form51345.input_51089_0_1_0_2.value == '') { secondaryAlert51345 = true; secondaryAlertText51345 ='Please enter a response for\nthe choice \'\''; cancelAlert51345 = true; cancelSubmit51345 = true; document.Form51345.input_51089_0_1_0_2.focus(); } if (document.Form51345.input_51089_0_1_Text_2) if (document.Form51345.input_51089_0_1_Text_2.value == '') { secondaryAlert51345 = true; secondaryAlertText51345 ='Please enter a response for\nthe choice \'\''; cancelAlert51345 = true; cancelSubmit51345 = true; document.Form51345.input_51089_0_1_Text_2.focus(); } } function AlertFunction51345(){ cancelSubmit51345 = true; primaryAlertText51345 = "To vote you must select a choice from the poll."; if (document.Form51345.input_51089_0_0_0_2[0].checked) cancelSubmit51345 = false; if (document.Form51345.input_51089_0_0_0_2[1].checked) cancelSubmit51345 = false; if (document.Form51345.input_51089_0_0_0_2[2].checked) cancelSubmit51345 = false; if (document.Form51345.input_51089_0_0_0_2[3].checked) cancelSubmit51345 = false; if (cancelSubmit51345 == true || secondaryAlert51345 == true) { alert(primaryAlertText51345 ); return false; } } function GetPollOptions51345(){ var optionselected = ''; if (document.Form51345.input_51089_0_0_0_2[0].checked) optionselected = optionselected + '&input_51089_0_0_0_2=' + document.Form51345.input_51089_0_0_0_2[0].value; if (document.Form51345.input_51089_0_0_0_2[1].checked) optionselected = optionselected + '&input_51089_0_0_0_2=' + document.Form51345.input_51089_0_0_0_2[1].value; if (document.Form51345.input_51089_0_0_0_2[2].checked) optionselected = optionselected + '&input_51089_0_0_0_2=' + document.Form51345.input_51089_0_0_0_2[2].value; if (document.Form51345.input_51089_0_0_0_2[3].checked) optionselected = optionselected + '&input_51089_0_0_0_2=' + document.Form51345.input_51089_0_0_0_2[3].value; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType51345 = navigator.appName.toLowerCase(); var bDhtml51345 = true; var sVisRes51345 = ' '; function DisplayVote51345() { document.write('
'); CheckCookieExpiration51345(); useDHTML51345 = true; voteFrequency51345 = GetCookie51345('51345_VoteFrequency'); if(voteFrequency51345 == null) { DisplayPoll51345(); } else { PollResponses51345(); } } function Vote51345() { var queryParam; // Check to see if user has selected something if(DoneFunction51345()==false) { return false; } else { SetCookie51345('51345_VoteFrequency', '99999999', '99999999'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha51345 ==false && bDhtml51345 && totalresponses > 0 && useDHTML51345 ==true) { queryParam = GetPollOptions51345(); queryParam = queryParam + "&returnurl=" + getCurrentURL51345(); queryParam = queryParam + "&qtype_51089=2"; document.getElementById('imgVoteInfo51345').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=5854451345&UD=39106FAE7A&query=1' + queryParam; PollResponses51345(); } else { document.Form51345.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=5854451345&UD=39106FAE7A"; document.Form51345.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader51345(){ var sHTML = ''; sHTML += '
'; sHTML += ''; sHTML += '
'; return sHTML; } function DisplayFooter51345(){ var sHTML = ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll51345() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader51345(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should Capistrano Unified take action to reduce the impact on local streets from its elimination of busing for 5,000 kids?'; sHTML += ''; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col51345==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(CheckForCookie51345()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter51345(); sHTML += '
'; document.getElementById('pDisp51345').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses51345() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader51345(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should Capistrano Unified take action to reduce the impact on local streets from its elimination of busing for 5,000 kids?'; 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'); graphcolor[3] = new Array('333366'); var graphcount=0; for(var i=0; i < options51345.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col51345==0) { if(i==0) { sHTML += ''; } else if(i==(options51345.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options51345[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options51345[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter51345(); sHTML += '
'; document.getElementById('pDisp51345').innerHTML = sHTML; var dResult = document.getElementById('pDisp51345'); 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); } } }