//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 2/10/2009 7:49:12 AM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit56362 = false; var cancelAlert56362 = false; var secondaryAlert56362 = false; var primaryAlertText56362 = ''; var secondaryAlertText56362 = ''; var col56362 = 1; var NS56362 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha56362 = false; var useDHTML56362 = true; function di2056362(id, newSrc) { document.images[id].src = newSrc; } function preloadImages56362() { 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 SetCookie56362(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 GetCookie56362(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 CheckForCookie56362() { check = false; if(GetCookie56362('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration56362() { check = GetCookie56362('56362_VoteFrequency'); if(check != null && check != 99999999) { SetCookie56362('56362_VoteFrequency', '99999999', '99999999'); } } SetCookie56362('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_56081(useButtons, selectedOptionID, optionID) {if (selectedOptionID == optionID) return " checked "; else return ""; } function SCB56362(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB56362(0,'687149','687149','Yes, so long as the campus sells enough tickets to cover the cost.'); a[1] = SCB56362(1,'687150','687150','In this economy? No way.'); a[2] = SCB56362(2,'687151','687151','I don\'t care. It\'s a free country and it won\'t cause me any grief.'); function ClearText_56081() { if (document.Form56362.input_56081_0_1_0_2) document.Form56362.input_56081_0_1_0_2.value = ''; if (document.Form56362.input_56081_0_1_Text_2) document.Form56362.input_56081_0_1_Text_2.value = ''; } function CheckText_56081() { if (document.Form56362.input_56081_0_1_0_2) if (document.Form56362.input_56081_0_1_0_2.value == '') { secondaryAlert56362 = true; secondaryAlertText56362 ='Please enter a response for\nthe choice \'\''; cancelAlert56362 = true; cancelSubmit56362 = true; document.Form56362.input_56081_0_1_0_2.focus(); } if (document.Form56362.input_56081_0_1_Text_2) if (document.Form56362.input_56081_0_1_Text_2.value == '') { secondaryAlert56362 = true; secondaryAlertText56362 ='Please enter a response for\nthe choice \'\''; cancelAlert56362 = true; cancelSubmit56362 = true; document.Form56362.input_56081_0_1_Text_2.focus(); } } function AlertFunction56362(){ cancelSubmit56362 = true; primaryAlertText56362 = "To vote you must select a choice from the poll."; if (document.Form56362.input_56081_0_0_0_2[0].checked) cancelSubmit56362 = false; if (document.Form56362.input_56081_0_0_0_2[1].checked) cancelSubmit56362 = false; if (document.Form56362.input_56081_0_0_0_2[2].checked) cancelSubmit56362 = false; if (cancelSubmit56362 == true || secondaryAlert56362 == true) { alert(primaryAlertText56362 ); return false; } } function GetPollOptions56362(){ var optionselected = ''; if (document.Form56362.input_56081_0_0_0_2[0].checked) optionselected = optionselected + '&input_56081_0_0_0_2=' + document.Form56362.input_56081_0_0_0_2[0].value; if (document.Form56362.input_56081_0_0_0_2[1].checked) optionselected = optionselected + '&input_56081_0_0_0_2=' + document.Form56362.input_56081_0_0_0_2[1].value; if (document.Form56362.input_56081_0_0_0_2[2].checked) optionselected = optionselected + '&input_56081_0_0_0_2=' + document.Form56362.input_56081_0_0_0_2[2].value; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType56362 = navigator.appName.toLowerCase(); var bDhtml56362 = true; var sVisRes56362 = ' '; function DisplayVote56362() { document.write('
'); CheckCookieExpiration56362(); useDHTML56362 = true; voteFrequency56362 = GetCookie56362('56362_VoteFrequency'); if(voteFrequency56362 == null) { DisplayPoll56362(); } else { PollResponses56362(); } } function Vote56362() { var queryParam; // Check to see if user has selected something if(DoneFunction56362()==false) { return false; } else { SetCookie56362('56362_VoteFrequency', '99999999', '99999999'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha56362 ==false && bDhtml56362 && totalresponses > 0 && useDHTML56362 ==true) { queryParam = GetPollOptions56362(); queryParam = queryParam + "&returnurl=" + getCurrentURL56362(); queryParam = queryParam + "&qtype_56081=2"; document.getElementById('imgVoteInfo56362').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=536956362&UD=39106FAE7A&query=1' + queryParam; PollResponses56362(); } else { document.Form56362.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=536956362&UD=39106FAE7A"; document.Form56362.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader56362(){ var sHTML = ''; return sHTML; } function DisplayFooter56362(){ var sHTML = ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll56362() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader56362(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should Chapman University pay Colin Powell $150,000 to speak on campus?
'; sHTML += '
'; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col56362==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(CheckForCookie56362()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter56362(); sHTML += '
'; document.getElementById('pDisp56362').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses56362() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader56362(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should Chapman University pay Colin Powell $150,000 to speak on campus?
'; 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 < options56362.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col56362==0) { if(i==0) { sHTML += ''; } else if(i==(options56362.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options56362[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options56362[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter56362(); sHTML += '
'; document.getElementById('pDisp56362').innerHTML = sHTML; var dResult = document.getElementById('pDisp56362'); 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); } } }