//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 1/8/2009 6:45:17 AM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit55335 = false; var cancelAlert55335 = false; var secondaryAlert55335 = false; var primaryAlertText55335 = ''; var secondaryAlertText55335 = ''; var col55335 = 1; var NS55335 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha55335 = false; var useDHTML55335 = true; function di2055335(id, newSrc) { document.images[id].src = newSrc; } function preloadImages55335() { 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 SetCookie55335(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 GetCookie55335(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 CheckForCookie55335() { check = false; if(GetCookie55335('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration55335() { check = GetCookie55335('55335_VoteFrequency'); if(check != null && check != 99999999) { SetCookie55335('55335_VoteFrequency', '99999999', '99999999'); } } SetCookie55335('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_55054(useButtons, selectedOptionID, optionID) {if (selectedOptionID == optionID) return " checked "; else return ""; } function SCB55335(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB55335(0,'675536','675536','Trustees reinstate superintendent'); a[1] = SCB55335(1,'675537','675537','Trustees explain, in detail, why they placed superintendent on leave'); a[2] = SCB55335(2,'675538','675538','Parents recall enough of the trustees to change board majority'); a[3] = SCB55335(3,'675539','675539','Trustees and community shift focus to budget cut issues'); function ClearText_55054() { if (document.Form55335.input_55054_0_1_0_2) document.Form55335.input_55054_0_1_0_2.value = ''; if (document.Form55335.input_55054_0_1_Text_2) document.Form55335.input_55054_0_1_Text_2.value = ''; } function CheckText_55054() { if (document.Form55335.input_55054_0_1_0_2) if (document.Form55335.input_55054_0_1_0_2.value == '') { secondaryAlert55335 = true; secondaryAlertText55335 ='Please enter a response for\nthe choice \'\''; cancelAlert55335 = true; cancelSubmit55335 = true; document.Form55335.input_55054_0_1_0_2.focus(); } if (document.Form55335.input_55054_0_1_Text_2) if (document.Form55335.input_55054_0_1_Text_2.value == '') { secondaryAlert55335 = true; secondaryAlertText55335 ='Please enter a response for\nthe choice \'\''; cancelAlert55335 = true; cancelSubmit55335 = true; document.Form55335.input_55054_0_1_Text_2.focus(); } } function AlertFunction55335(){ cancelSubmit55335 = true; primaryAlertText55335 = "To vote you must select a choice from the poll."; if (document.Form55335.input_55054_0_0_0_2[0].checked) cancelSubmit55335 = false; if (document.Form55335.input_55054_0_0_0_2[1].checked) cancelSubmit55335 = false; if (document.Form55335.input_55054_0_0_0_2[2].checked) cancelSubmit55335 = false; if (document.Form55335.input_55054_0_0_0_2[3].checked) cancelSubmit55335 = false; if (cancelSubmit55335 == true || secondaryAlert55335 == true) { alert(primaryAlertText55335 ); return false; } } function GetPollOptions55335(){ var optionselected = ''; if (document.Form55335.input_55054_0_0_0_2[0].checked) optionselected = optionselected + '&input_55054_0_0_0_2=' + document.Form55335.input_55054_0_0_0_2[0].value; if (document.Form55335.input_55054_0_0_0_2[1].checked) optionselected = optionselected + '&input_55054_0_0_0_2=' + document.Form55335.input_55054_0_0_0_2[1].value; if (document.Form55335.input_55054_0_0_0_2[2].checked) optionselected = optionselected + '&input_55054_0_0_0_2=' + document.Form55335.input_55054_0_0_0_2[2].value; if (document.Form55335.input_55054_0_0_0_2[3].checked) optionselected = optionselected + '&input_55054_0_0_0_2=' + document.Form55335.input_55054_0_0_0_2[3].value; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType55335 = navigator.appName.toLowerCase(); var bDhtml55335 = true; var sVisRes55335 = ' '; function DisplayVote55335() { document.write('
'); CheckCookieExpiration55335(); useDHTML55335 = true; voteFrequency55335 = GetCookie55335('55335_VoteFrequency'); if(voteFrequency55335 == null) { DisplayPoll55335(); } else { PollResponses55335(); } } function Vote55335() { var queryParam; // Check to see if user has selected something if(DoneFunction55335()==false) { return false; } else { SetCookie55335('55335_VoteFrequency', '99999999', '99999999'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha55335 ==false && bDhtml55335 && totalresponses > 0 && useDHTML55335 ==true) { queryParam = GetPollOptions55335(); queryParam = queryParam + "&returnurl=" + getCurrentURL55335(); queryParam = queryParam + "&qtype_55054=2"; document.getElementById('imgVoteInfo55335').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=6661655335&UD=39106FAE7A&query=1' + queryParam; PollResponses55335(); } else { document.Form55335.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=6661655335&UD=39106FAE7A"; document.Form55335.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader55335(){ var sHTML = ''; sHTML += '
'; sHTML += 'Capistrano superintendent'; sHTML += '
'; return sHTML; } function DisplayFooter55335(){ var sHTML = ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll55335() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader55335(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'What\'s the best strategy for easing political tensions in Capistrano Unified?'; sHTML += ''; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col55335==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(CheckForCookie55335()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter55335(); sHTML += '
'; document.getElementById('pDisp55335').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses55335() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader55335(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'What\'s the best strategy for easing political tensions in Capistrano Unified?'; 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 < options55335.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col55335==0) { if(i==0) { sHTML += ''; } else if(i==(options55335.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options55335[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options55335[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter55335(); sHTML += '
'; document.getElementById('pDisp55335').innerHTML = sHTML; var dResult = document.getElementById('pDisp55335'); 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); } } }