//------------------ // Copyright 2007 - PollMonkey.com // Publish Date: 11/19/2008 6:57:29 PM //------------------ //--------- Poll Header Functions ------------------------- var cancelSubmit54036 = false; var cancelAlert54036 = false; var secondaryAlert54036 = false; var primaryAlertText54036 = ''; var secondaryAlertText54036 = ''; var col54036 = 1; var NS54036 = (navigator.appName.toLowerCase() == "netscape" && navigator.appVersion.charAt(0)<5) ? true : false; var bUseCaptcha54036 = false; var useDHTML54036 = true; function di2054036(id, newSrc) { document.images[id].src = newSrc; } function preloadImages54036() { 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 SetCookie54036(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 GetCookie54036(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 CheckForCookie54036() { check = false; if(GetCookie54036('cookietest') != null) { check = true; } return check; } function CheckCookieExpiration54036() { check = GetCookie54036('54036_VoteFrequency'); if(check != null && check != 86400) { SetCookie54036('54036_VoteFrequency', '86400', '86400'); } } SetCookie54036('cookietest','true', '30'); //---------- END COOKIES FUNCTIONS ------------ //--------- Poll Option Functions ----------------- var a = new Array(); function CheckSelected_53757(useButtons, selectedOptionID, optionID) {if (selectedOptionID == optionID) return " checked "; else return ""; } function SCB54036(i, radioVal, optionID, labelText) {return "" + labelText + ""; } a[0] = SCB54036(0,'658170','658170','Orange County'); a[1] = SCB54036(1,'658171','658171','New York City'); a[2] = SCB54036(2,'658172','658172','Atlanta'); a[3] = SCB54036(3,'658173','658173','I love them all'); a[4] = SCB54036(4,'658174','658174','I can\'t stand to watch any of them'); function ClearText_53757() { if (document.Form54036.input_53757_0_1_0_2) document.Form54036.input_53757_0_1_0_2.value = ''; if (document.Form54036.input_53757_0_1_Text_2) document.Form54036.input_53757_0_1_Text_2.value = ''; } function CheckText_53757() { if (document.Form54036.input_53757_0_1_0_2) if (document.Form54036.input_53757_0_1_0_2.value == '') { secondaryAlert54036 = true; secondaryAlertText54036 ='Please enter a response for\nthe choice \'\''; cancelAlert54036 = true; cancelSubmit54036 = true; document.Form54036.input_53757_0_1_0_2.focus(); } if (document.Form54036.input_53757_0_1_Text_2) if (document.Form54036.input_53757_0_1_Text_2.value == '') { secondaryAlert54036 = true; secondaryAlertText54036 ='Please enter a response for\nthe choice \'\''; cancelAlert54036 = true; cancelSubmit54036 = true; document.Form54036.input_53757_0_1_Text_2.focus(); } } function AlertFunction54036(){ cancelSubmit54036 = true; primaryAlertText54036 = "To vote you must select a choice from the poll."; if (document.Form54036.input_53757_0_0_0_2[0].checked) cancelSubmit54036 = false; if (document.Form54036.input_53757_0_0_0_2[1].checked) cancelSubmit54036 = false; if (document.Form54036.input_53757_0_0_0_2[2].checked) cancelSubmit54036 = false; if (document.Form54036.input_53757_0_0_0_2[3].checked) cancelSubmit54036 = false; if (document.Form54036.input_53757_0_0_0_2[4].checked) cancelSubmit54036 = false; if (cancelSubmit54036 == true || secondaryAlert54036 == true) { alert(primaryAlertText54036 ); return false; } } function GetPollOptions54036(){ var optionselected = ''; if (document.Form54036.input_53757_0_0_0_2[0].checked) optionselected = optionselected + '&input_53757_0_0_0_2=' + document.Form54036.input_53757_0_0_0_2[0].value; if (document.Form54036.input_53757_0_0_0_2[1].checked) optionselected = optionselected + '&input_53757_0_0_0_2=' + document.Form54036.input_53757_0_0_0_2[1].value; if (document.Form54036.input_53757_0_0_0_2[2].checked) optionselected = optionselected + '&input_53757_0_0_0_2=' + document.Form54036.input_53757_0_0_0_2[2].value; if (document.Form54036.input_53757_0_0_0_2[3].checked) optionselected = optionselected + '&input_53757_0_0_0_2=' + document.Form54036.input_53757_0_0_0_2[3].value; if (document.Form54036.input_53757_0_0_0_2[4].checked) optionselected = optionselected + '&input_53757_0_0_0_2=' + document.Form54036.input_53757_0_0_0_2[4].value; return optionselected; } //--------- END - Poll Option Functions ----------------- //--------- Voting Functions ----------------- var browserType54036 = navigator.appName.toLowerCase(); var bDhtml54036 = true; var sVisRes54036 = ' '; function DisplayVote54036() { document.write('
'); CheckCookieExpiration54036(); useDHTML54036 = true; voteFrequency54036 = GetCookie54036('54036_VoteFrequency'); if(voteFrequency54036 == null) { DisplayPoll54036(); } else { PollResponses54036(); } } function Vote54036() { var queryParam; // Check to see if user has selected something if(DoneFunction54036()==false) { return false; } else { SetCookie54036('54036_VoteFrequency', '86400', '86400'); //--DYNAMIC SUBMISSION CHECK---- if(bUseCaptcha54036 ==false && bDhtml54036 && totalresponses > 0 && useDHTML54036 ==true) { queryParam = GetPollOptions54036(); queryParam = queryParam + "&returnurl=" + getCurrentURL54036(); queryParam = queryParam + "&qtype_53757=2"; document.getElementById('imgVoteInfo54036').src ='http://www.pollmonkey.com/Pollite/vote.aspx?U=2684954036&UD=39106FAE7A&query=1' + queryParam; PollResponses54036(); } else { document.Form54036.action="http://www.pollmonkey.com/Pollite/vote.aspx?U=2684954036&UD=39106FAE7A"; document.Form54036.submit(); } } } //--------- END - Voting Functions ----------------- function DisplayHeader54036(){ var sHTML = ''; return sHTML; } function DisplayFooter54036(){ var sHTML = ''; sHTML += '
'; return sHTML; } //--------- Begin Writing Display Poll ----------------- function DisplayPoll54036() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader54036(); //------Begin Poll Section---- sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Which \"Real Housewives\" show do you like best?'; sHTML += ''; sHTML += ''; sHTML += '
'; // -------Write out the question options------------ sHTML += ''; for (var i = 0; i < a.length; i++) { if(i%col54036==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(CheckForCookie54036()) { sHTML += ''; } else { sHTML += 'You must have cookies enabled to vote'; } sHTML += '
'; sHTML += '
'; sHTML += '
'; //------ End Poll Section ---------------------------------- sHTML += DisplayFooter54036(); sHTML += '
'; document.getElementById('pDisp54036').innerHTML = sHTML; } //--------- Begin Writing Poll Responses----------------- function PollResponses54036() { var sHTML = ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += DisplayHeader54036(); //-----------Begin Poll Results - RenderPollResults --------- sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += ''; sHTML += 'Which \"Real Housewives\" show do you like best?'; 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 < options54036.length; i++) { if(graphcount>=graphcolor.length) graphcount=0; if(i%col54036==0) { if(i==0) { sHTML += ''; } else if(i==(options54036.length-1)) { sHTML += ''; } else { sHTML += ''; sHTML += ''; } } sHTML += ''; graphcount++; } sHTML += '
'; sHTML += '' + options54036[i][0] + ''; sHTML += '
'; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += ''; sHTML += '
'; sHTML += '
'; sHTML += '
'; sHTML += '' + options54036[i][1] + '%'; sHTML += '
'; sHTML += '
'; //-------------------------------------- End Display Poll Results ----' //----------------------------------- End Poll Questions ---------------------------------- sHTML += ''; sHTML += '
'; sHTML += 'Total Votes: '+ totalresponses +''; sHTML += '
'; sHTML += ''; sHTML += '
'; //------------- End Poll Section --------------- sHTML += DisplayFooter54036(); sHTML += '
'; document.getElementById('pDisp54036').innerHTML = sHTML; var dResult = document.getElementById('pDisp54036'); 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); } } }