//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 7/23/2008 9:51:46 AM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit50145 = false; var cancelAlert50145 = false; var secondaryAlert50145 = false; var primaryAlertText50145 = ''; var secondaryAlertText50145 = ''; var col50145 = 1; var NS50145 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha50145 = false; var useDHTML50145 = true; function di2050145(id, newSrc) { document.images[id].src = newSrc; } function preloadImages50145() { 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 SetCookie50145(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 GetCookie50145(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 CheckForCookie50145() { check = false; if(GetCookie50145('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration50145() { check = GetCookie50145('50145_VoteFrequency'); if(check != null && check != 99999999) { SetCookie50145('50145_VoteFrequency', '99999999', '99999999'); } } SetCookie50145('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_49889(useButtons, selectedOptionID, optionID) {if (selectedOptionID == optionID) return " checked "; else return ""; } function SCB50145(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB50145(0,'611225','611225','No, it is the same as proselytizing.'); a[1] = SCB50145(1,'611226','611226','Maybe, depends on how it is taught. '); a[2] = SCB50145(2,'611227','611227','Yes, it will help students understand other literature texts better. '); function ClearText_49889() { if (document.Form50145.input_49889_0_1_0_2) document.Form50145.input_49889_0_1_0_2.value = ''; if (document.Form50145.input_49889_0_1_Text_2) document.Form50145.input_49889_0_1_Text_2.value = ''; } function CheckText_49889() { if (document.Form50145.input_49889_0_1_0_2) if (document.Form50145.input_49889_0_1_0_2.value == '') { secondaryAlert50145 = true; secondaryAlertText50145 ='Please enter a response for\nthe choice \'\''; cancelAlert50145 = true; cancelSubmit50145 = true; document.Form50145.input_49889_0_1_0_2.focus(); } if (document.Form50145.input_49889_0_1_Text_2) if (document.Form50145.input_49889_0_1_Text_2.value == '') { secondaryAlert50145 = true; secondaryAlertText50145 ='Please enter a response for\nthe choice \'\''; cancelAlert50145 = true; cancelSubmit50145 = true; document.Form50145.input_49889_0_1_Text_2.focus(); } } function AlertFunction50145(){ cancelSubmit50145 = true; primaryAlertText50145 = "To vote you must select a choice from the poll."; if (document.Form50145.input_49889_0_0_0_2[0].checked) cancelSubmit50145 = false; if (document.Form50145.input_49889_0_0_0_2[1].checked) cancelSubmit50145 = false; if (document.Form50145.input_49889_0_0_0_2[2].checked) cancelSubmit50145 = false; if (cancelSubmit50145 == true || secondaryAlert50145 == true) { alert(primaryAlertText50145 ); return false; } } function GetPollOptions50145(){ var optionselected = ''; if (document.Form50145.input_49889_0_0_0_2[0].checked) optionselected = optionselected + '&input_49889_0_0_0_2=' + document.Form50145.input_49889_0_0_0_2[0].value; if (document.Form50145.input_49889_0_0_0_2[1].checked) optionselected = optionselected + '&input_49889_0_0_0_2=' + document.Form50145.input_49889_0_0_0_2[1].value; if (document.Form50145.input_49889_0_0_0_2[2].checked) optionselected = optionselected + '&input_49889_0_0_0_2=' + document.Form50145.input_49889_0_0_0_2[2].value; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType50145 = navigator.appName.toLowerCase(); var bDhtml50145 = true; var sVisRes50145 = ' '; function DisplayVote50145() { document.write('
'); CheckCookieExpiration50145(); useDHTML50145 = true; voteFrequency50145 = GetCookie50145('50145_VoteFrequency'); if(voteFrequency50145 == null) { DisplayPoll50145(); } else { PollResponses50145(); } } function Vote50145() { var queryParam; // Check to see if user has selected something if(DoneFunction50145()==false) { return false; } else { SetCookie50145('50145_VoteFrequency', '99999999', '99999999'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha50145 ==false && bDhtml50145 && totalresponses > 0 && useDHTML50145 ==true) { queryParam = GetPollOptions50145(); queryParam = queryParam + "&returnurl=" + getCurrentURL50145(); queryParam = queryParam + "&qtype_49889=2"; document.getElementById('imgVoteInfo50145').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=2682150145&UD=39106FAE7A&query=1' + queryParam; PollResponses50145(); } else { document.Form50145.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=2682150145&UD=39106FAE7A"; document.Form50145.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader50145(){ var sHTML = ''; return sHTML; } function DisplayFooter50145(){ var sHTML = ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll50145() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader50145(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should public high schools offer a literature class about the Bible? '; sHTML += ''; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col50145==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(CheckForCookie50145()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter50145(); sHTML += '
'; document.getElementById('pDisp50145').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses50145() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader50145(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should public high schools offer a literature class about the Bible? '; 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'); var graphcount=0; for(var i=0; i < options50145.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col50145==0) { if(i==0) { sHTML += ''; } else if(i==(options50145.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options50145[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options50145[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter50145(); sHTML += '
'; document.getElementById('pDisp50145').innerHTML = sHTML; var dResult = document.getElementById('pDisp50145'); 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); } } }