//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 6/29/2009 4:01:20 PM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit60199 = false; var cancelAlert60199 = false; var secondaryAlert60199 = false; var primaryAlertText60199 = ''; var secondaryAlertText60199 = ''; var col60199 = 1; var NS60199 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha60199 = false; var useDHTML60199 = true; function di2060199(id, newSrc) { document.images[id].src = newSrc; } function preloadImages60199() { 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 SetCookie60199(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 GetCookie60199(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 CheckForCookie60199() { check = false; if(GetCookie60199('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration60199() { check = GetCookie60199('60199_VoteFrequency'); if(check != null && check != 99999999) { SetCookie60199('60199_VoteFrequency', '99999999', '99999999'); } } SetCookie60199('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_59918(useButtons, selectedOptionID, optionID) {if (selectedOptionID == optionID) return " checked "; else return ""; } function SCB60199(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB60199(0,'734206','734206','Done just what he did, locked up the magazines in his office.'); a[1] = SCB60199(1,'734207','734207','Let the students have their say by allowing the magazines to be distributed.'); a[2] = SCB60199(2,'734208','734208','Allowed the students to rip out any disputed pages.'); a[3] = SCB60199(3,'734209','734209','Picked a panel of parents and let them decide.'); function ClearText_59918() { if (document.Form60199.input_59918_0_1_0_2) document.Form60199.input_59918_0_1_0_2.value = ''; if (document.Form60199.input_59918_0_1_Text_2) document.Form60199.input_59918_0_1_Text_2.value = ''; } function CheckText_59918() { if (document.Form60199.input_59918_0_1_0_2) if (document.Form60199.input_59918_0_1_0_2.value == '') { secondaryAlert60199 = true; secondaryAlertText60199 ='Please enter a response for\nthe choice \'\''; cancelAlert60199 = true; cancelSubmit60199 = true; document.Form60199.input_59918_0_1_0_2.focus(); } if (document.Form60199.input_59918_0_1_Text_2) if (document.Form60199.input_59918_0_1_Text_2.value == '') { secondaryAlert60199 = true; secondaryAlertText60199 ='Please enter a response for\nthe choice \'\''; cancelAlert60199 = true; cancelSubmit60199 = true; document.Form60199.input_59918_0_1_Text_2.focus(); } } function AlertFunction60199(){ cancelSubmit60199 = true; primaryAlertText60199 = "To vote you must select a choice from the poll."; if (document.Form60199.input_59918_0_0_0_2[0].checked) cancelSubmit60199 = false; if (document.Form60199.input_59918_0_0_0_2[1].checked) cancelSubmit60199 = false; if (document.Form60199.input_59918_0_0_0_2[2].checked) cancelSubmit60199 = false; if (document.Form60199.input_59918_0_0_0_2[3].checked) cancelSubmit60199 = false; if (cancelSubmit60199 == true || secondaryAlert60199 == true) { alert(primaryAlertText60199 ); return false; } } function GetPollOptions60199(){ var optionselected = ''; if (document.Form60199.input_59918_0_0_0_2[0].checked) optionselected = optionselected + '&input_59918_0_0_0_2=' + document.Form60199.input_59918_0_0_0_2[0].value; if (document.Form60199.input_59918_0_0_0_2[1].checked) optionselected = optionselected + '&input_59918_0_0_0_2=' + document.Form60199.input_59918_0_0_0_2[1].value; if (document.Form60199.input_59918_0_0_0_2[2].checked) optionselected = optionselected + '&input_59918_0_0_0_2=' + document.Form60199.input_59918_0_0_0_2[2].value; if (document.Form60199.input_59918_0_0_0_2[3].checked) optionselected = optionselected + '&input_59918_0_0_0_2=' + document.Form60199.input_59918_0_0_0_2[3].value; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType60199 = navigator.appName.toLowerCase(); var bDhtml60199 = true; var sVisRes60199 = ' '; function DisplayVote60199() { document.write('
'); CheckCookieExpiration60199(); useDHTML60199 = true; voteFrequency60199 = GetCookie60199('60199_VoteFrequency'); if(voteFrequency60199 == null) { DisplayPoll60199(); } else { PollResponses60199(); } } function Vote60199() { var queryParam; // Check to see if user has selected something if(DoneFunction60199()==false) { return false; } else { SetCookie60199('60199_VoteFrequency', '99999999', '99999999'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha60199 ==false && bDhtml60199 && totalresponses > 0 && useDHTML60199 ==true) { queryParam = GetPollOptions60199(); queryParam = queryParam + "&returnurl=" + getCurrentURL60199(); queryParam = queryParam + "&qtype_59918=2"; document.getElementById('imgVoteInfo60199').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=167360199&UD=39106FAE7A&query=1' + queryParam; PollResponses60199(); } else { document.Form60199.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=167360199&UD=39106FAE7A"; document.Form60199.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader60199(){ var sHTML = ''; return sHTML; } function DisplayFooter60199(){ var sHTML = ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll60199() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader60199(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'The Orange High principal should have:'; sHTML += ''; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col60199==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(CheckForCookie60199()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter60199(); sHTML += '
'; document.getElementById('pDisp60199').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses60199() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader60199(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'The Orange High principal should have:'; 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 < options60199.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col60199==0) { if(i==0) { sHTML += ''; } else if(i==(options60199.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options60199[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options60199[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter60199(); sHTML += '
'; document.getElementById('pDisp60199').innerHTML = sHTML; var dResult = document.getElementById('pDisp60199'); 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); } } }