//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 9/23/2008 4:23:51 PM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit52214 = false; var cancelAlert52214 = false; var secondaryAlert52214 = false; var primaryAlertText52214 = ''; var secondaryAlertText52214 = ''; var col52214 = 1; var NS52214 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha52214 = false; var useDHTML52214 = true; function di2052214(id, newSrc) { document.images[id].src = newSrc; } function preloadImages52214() { 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 SetCookie52214(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 GetCookie52214(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 CheckForCookie52214() { check = false; if(GetCookie52214('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration52214() { check = GetCookie52214('52214_VoteFrequency'); if(check != null && check != 99999999) { SetCookie52214('52214_VoteFrequency', '99999999', '99999999'); } } SetCookie52214('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_51936(useButtons, selectedOptionID, optionID) {if (selectedOptionID == optionID) return " checked "; else return ""; } function SCB52214(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB52214(0,'634565','634565','Yes -- Hands-on learning is best and animals are anesthetized.'); a[1] = SCB52214(1,'634566','634566','No -- There\'s no reason to use live animals.'); function ClearText_51936() { if (document.Form52214.input_51936_0_1_0_2) document.Form52214.input_51936_0_1_0_2.value = ''; if (document.Form52214.input_51936_0_1_Text_2) document.Form52214.input_51936_0_1_Text_2.value = ''; } function CheckText_51936() { if (document.Form52214.input_51936_0_1_0_2) if (document.Form52214.input_51936_0_1_0_2.value == '') { secondaryAlert52214 = true; secondaryAlertText52214 ='Please enter a response for\nthe choice \'\''; cancelAlert52214 = true; cancelSubmit52214 = true; document.Form52214.input_51936_0_1_0_2.focus(); } if (document.Form52214.input_51936_0_1_Text_2) if (document.Form52214.input_51936_0_1_Text_2.value == '') { secondaryAlert52214 = true; secondaryAlertText52214 ='Please enter a response for\nthe choice \'\''; cancelAlert52214 = true; cancelSubmit52214 = true; document.Form52214.input_51936_0_1_Text_2.focus(); } } function AlertFunction52214(){ cancelSubmit52214 = true; primaryAlertText52214 = "To vote you must select a choice from the poll."; if (document.Form52214.input_51936_0_0_0_2[0].checked) cancelSubmit52214 = false; if (document.Form52214.input_51936_0_0_0_2[1].checked) cancelSubmit52214 = false; if (cancelSubmit52214 == true || secondaryAlert52214 == true) { alert(primaryAlertText52214 ); return false; } } function GetPollOptions52214(){ var optionselected = ''; if (document.Form52214.input_51936_0_0_0_2[0].checked) optionselected = optionselected + '&input_51936_0_0_0_2=' + document.Form52214.input_51936_0_0_0_2[0].value; if (document.Form52214.input_51936_0_0_0_2[1].checked) optionselected = optionselected + '&input_51936_0_0_0_2=' + document.Form52214.input_51936_0_0_0_2[1].value; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType52214 = navigator.appName.toLowerCase(); var bDhtml52214 = true; var sVisRes52214 = ' '; function DisplayVote52214() { document.write('
'); CheckCookieExpiration52214(); useDHTML52214 = true; voteFrequency52214 = GetCookie52214('52214_VoteFrequency'); if(voteFrequency52214 == null) { DisplayPoll52214(); } else { PollResponses52214(); } } function Vote52214() { var queryParam; // Check to see if user has selected something if(DoneFunction52214()==false) { return false; } else { SetCookie52214('52214_VoteFrequency', '99999999', '99999999'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha52214 ==false && bDhtml52214 && totalresponses > 0 && useDHTML52214 ==true) { queryParam = GetPollOptions52214(); queryParam = queryParam + "&returnurl=" + getCurrentURL52214(); queryParam = queryParam + "&qtype_51936=2"; document.getElementById('imgVoteInfo52214').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=7772652214&UD=39106FAE7A&query=1' + queryParam; PollResponses52214(); } else { document.Form52214.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=7772652214&UD=39106FAE7A"; document.Form52214.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader52214(){ var sHTML = ''; sHTML += '
'; sHTML += 'UCI animal studies'; sHTML += '
'; return sHTML; } function DisplayFooter52214(){ var sHTML = ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Powered by PollMonkey'; sHTML += ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll52214() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader52214(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should UCI students learn biology by experimenting with live rats and frogs?'; sHTML += ''; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col52214==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(CheckForCookie52214()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter52214(); sHTML += '
'; document.getElementById('pDisp52214').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses52214() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader52214(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Should UCI students learn biology by experimenting with live rats and frogs?'; sHTML += ''; sHTML += ''; sHTML += '
'; //----------------------------------- Begin Display Poll Results ------------------------------------- sHTML += ''; var graphcolor = new Array(); graphcolor[0] = new Array('ccccff'); graphcolor[1] = new Array('9999cc'); var graphcount=0; for(var i=0; i < options52214.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col52214==0) { if(i==0) { sHTML += ''; } else if(i==(options52214.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options52214[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options52214[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter52214(); sHTML += '
'; document.getElementById('pDisp52214').innerHTML = sHTML; var dResult = document.getElementById('pDisp52214'); 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); } } }