//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 7/23/2008 1:16:42 PM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit50123 = false; var cancelAlert50123 = false; var secondaryAlert50123 = false; var primaryAlertText50123 = ''; var secondaryAlertText50123 = ''; var col50123 = 1; var NS50123 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha50123 = false; var useDHTML50123 = true; function di2050123(id, newSrc) { document.images[id].src = newSrc; } function preloadImages50123() { 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 SetCookie50123(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 GetCookie50123(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 CheckForCookie50123() { check = false; if(GetCookie50123('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration50123() { check = GetCookie50123('50123_VoteFrequency'); if(check != null && check != 99999999) { SetCookie50123('50123_VoteFrequency', '99999999', '99999999'); } } SetCookie50123('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_49867(useButtons, selectedOptionID, optionID) {if (selectedOptionID == optionID) return " checked "; else return ""; } function SCB50123(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB50123(0,'610988','610988','There\'s nothing wrong with it. Leave it alone!'); a[1] = SCB50123(1,'610989','610989','Change the policy and allow qualified drivers to weave in and out where they wish.'); a[2] = SCB50123(2,'610990','610990','I avoid the 55 if at all possible.'); function ClearText_49867() { if (document.Form50123.input_49867_0_1_0_2) document.Form50123.input_49867_0_1_0_2.value = ''; if (document.Form50123.input_49867_0_1_Text_2) document.Form50123.input_49867_0_1_Text_2.value = ''; } function CheckText_49867() { if (document.Form50123.input_49867_0_1_0_2) if (document.Form50123.input_49867_0_1_0_2.value == '') { secondaryAlert50123 = true; secondaryAlertText50123 ='Please enter a response for\nthe choice \'\''; cancelAlert50123 = true; cancelSubmit50123 = true; document.Form50123.input_49867_0_1_0_2.focus(); } if (document.Form50123.input_49867_0_1_Text_2) if (document.Form50123.input_49867_0_1_Text_2.value == '') { secondaryAlert50123 = true; secondaryAlertText50123 ='Please enter a response for\nthe choice \'\''; cancelAlert50123 = true; cancelSubmit50123 = true; document.Form50123.input_49867_0_1_Text_2.focus(); } } function AlertFunction50123(){ cancelSubmit50123 = true; primaryAlertText50123 = "To vote you must select a choice from the poll."; if (document.Form50123.input_49867_0_0_0_2[0].checked) cancelSubmit50123 = false; if (document.Form50123.input_49867_0_0_0_2[1].checked) cancelSubmit50123 = false; if (document.Form50123.input_49867_0_0_0_2[2].checked) cancelSubmit50123 = false; if (cancelSubmit50123 == true || secondaryAlert50123 == true) { alert(primaryAlertText50123 ); return false; } } function GetPollOptions50123(){ var optionselected = ''; if (document.Form50123.input_49867_0_0_0_2[0].checked) optionselected = optionselected + '&input_49867_0_0_0_2=' + document.Form50123.input_49867_0_0_0_2[0].value; if (document.Form50123.input_49867_0_0_0_2[1].checked) optionselected = optionselected + '&input_49867_0_0_0_2=' + document.Form50123.input_49867_0_0_0_2[1].value; if (document.Form50123.input_49867_0_0_0_2[2].checked) optionselected = optionselected + '&input_49867_0_0_0_2=' + document.Form50123.input_49867_0_0_0_2[2].value; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType50123 = navigator.appName.toLowerCase(); var bDhtml50123 = true; var sVisRes50123 = ' '; function DisplayVote50123() { document.write('
'); CheckCookieExpiration50123(); useDHTML50123 = true; voteFrequency50123 = GetCookie50123('50123_VoteFrequency'); if(voteFrequency50123 == null) { DisplayPoll50123(); } else { PollResponses50123(); } } function Vote50123() { var queryParam; // Check to see if user has selected something if(DoneFunction50123()==false) { return false; } else { SetCookie50123('50123_VoteFrequency', '99999999', '99999999'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha50123 ==false && bDhtml50123 && totalresponses > 0 && useDHTML50123 ==true) { queryParam = GetPollOptions50123(); queryParam = queryParam + "&returnurl=" + getCurrentURL50123(); queryParam = queryParam + "&qtype_49867=2"; document.getElementById('imgVoteInfo50123').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=3525950123&UD=39106FAE7A&query=1' + queryParam; PollResponses50123(); } else { document.Form50123.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=3525950123&UD=39106FAE7A"; document.Form50123.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader50123(){ var sHTML = ''; sHTML += '
'; sHTML += '55 Freeway car pool lanes'; sHTML += '
'; return sHTML; } function DisplayFooter50123(){ var sHTML = ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll50123() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader50123(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'What do you think of the current car pool policy on the 55?'; sHTML += ''; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col50123==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(CheckForCookie50123()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter50123(); sHTML += '
'; document.getElementById('pDisp50123').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses50123() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader50123(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'What do you think of the current car pool policy on the 55?'; 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 < options50123.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col50123==0) { if(i==0) { sHTML += ''; } else if(i==(options50123.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options50123[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options50123[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter50123(); sHTML += '
'; document.getElementById('pDisp50123').innerHTML = sHTML; var dResult = document.getElementById('pDisp50123'); 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); } } }