//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 3/27/2008 12:48:48 PM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit46360 = false; var cancelAlert46360 = false; var secondaryAlert46360 = false; var primaryAlertText46360 = ''; var secondaryAlertText46360 = ''; var col46360 = 1; var NS46360 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha46360 = false; var useDHTML46360 = true; function di2046360(id, newSrc) { document.images[id].src = newSrc; } function preloadImages46360() { 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 SetCookie46360(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 GetCookie46360(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 CheckForCookie46360() { check = false; if(GetCookie46360('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration46360() { check = GetCookie46360('46360_VoteFrequency'); if(check != null && check != 259200) { SetCookie46360('46360_VoteFrequency', '259200', '259200'); } } SetCookie46360('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_46120(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 SCB46360(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB46360(0,'564349','564349','Yes.'); a[1] = SCB46360(1,'564350','564350','No.'); function ClearText_46120() { if (document.Form46360.input_46120_0_1_0_2) document.Form46360.input_46120_0_1_0_2.value = ''; if (document.Form46360.input_46120_0_1_Text_2) document.Form46360.input_46120_0_1_Text_2.value = ''; } function CheckText_46120() { if (document.Form46360.input_46120_0_1_0_2) if (document.Form46360.input_46120_0_1_0_2.value == '') { secondaryAlert46360 = true; secondaryAlertText46360 ='Please enter a response for\nthe choice \'\''; cancelAlert46360 = true; cancelSubmit46360 = true; document.Form46360.input_46120_0_1_0_2.focus(); } if (document.Form46360.input_46120_0_1_Text_2) if (document.Form46360.input_46120_0_1_Text_2.value == '') { secondaryAlert46360 = true; secondaryAlertText46360 ='Please enter a response for\nthe choice \'\''; cancelAlert46360 = true; cancelSubmit46360 = true; document.Form46360.input_46120_0_1_Text_2.focus(); } } function AlertFunction46360(){ cancelSubmit46360 = true; primaryAlertText46360 = "To vote you must select a choice from the poll."; if (document.Form46360.input_46120_0_0_0_2.value == '564349') cancelSubmit46360 = false; if (document.Form46360.input_46120_0_0_0_2.value == '564350') cancelSubmit46360 = false; if (cancelSubmit46360 == true || secondaryAlert46360 == true) { alert(primaryAlertText46360 ); return false; } } function GetPollOptions46360(){ var optionselected = ''; if (document.Form46360.input_46120_0_0_0_2.value == '564349') optionselected = optionselected + '&input_46120_0_0_0_2=564349'; if (document.Form46360.input_46120_0_0_0_2.value == '564350') optionselected = optionselected + '&input_46120_0_0_0_2=564350'; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType46360 = navigator.appName.toLowerCase(); var bDhtml46360 = true; var sVisRes46360 = ' '; function DisplayVote46360() { document.write('
'); CheckCookieExpiration46360(); useDHTML46360 = true; voteFrequency46360 = GetCookie46360('46360_VoteFrequency'); if(voteFrequency46360 == null) { DisplayPoll46360(); } else { PollResponses46360(); } } function Vote46360() { var queryParam; // Check to see if user has selected something if(DoneFunction46360()==false) { return; } else { SetCookie46360('46360_VoteFrequency', '259200', '259200'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha46360 ==false && bDhtml46360 && totalresponses > 0 && useDHTML46360 ==true) { queryParam = GetPollOptions46360(); queryParam = queryParam + "&returnurl=" + getCurrentURL46360(); queryParam = queryParam + "&qtype_46120=2"; document.getElementById('imgVoteInfo46360').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=9938146360&UD=39106FAE7A&query=1' + queryParam; PollResponses46360(); } else { document.Form46360.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=9938146360&UD=39106FAE7A"; document.Form46360.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader46360(){ var sHTML = ''; sHTML += '
'; sHTML += 'Theo Lacy future'; sHTML += '
'; return sHTML; } function DisplayFooter46360(){ var sHTML = ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Powered by PollMonkey'; sHTML += ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll46360() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader46360(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'In order to secure $100 million in state funds for a jail expansion, should county officials allow 292 state prison inmates to be housed at Theo Lacy, and, once they are paroled, be released in the City of Orange?'; sHTML += ''; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col46360==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(CheckForCookie46360()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'View Results
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter46360(); sHTML += '
'; document.getElementById('pDisp46360').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses46360() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader46360(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'In order to secure $100 million in state funds for a jail expansion, should county officials allow 292 state prison inmates to be housed at Theo Lacy, and, once they are paroled, be released in the City of Orange?'; 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 < options46360.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col46360==0) { if(i==0) { sHTML += ''; } else if(i==(options46360.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options46360[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options46360[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter46360(); sHTML += '
'; document.getElementById('pDisp46360').innerHTML = sHTML; var dResult = document.getElementById('pDisp46360'); 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); } } }