var serverSideFile = '/moduller/anket/ajax-poller-cast-vote-php.php?l=2&'; var voteLeftImage = 'https://images.bynogame.com/moduller/anket/images/graph_left_1.gif'; var voteRightImage = 'https://images.bynogame.com/moduller/anket/images/graph_right_1.gif'; var voteCenterImage = 'https://images.bynogame.com/moduller/anket/images/graph_middle_1.gif'; var graphMaxWidth = 130; // It will actually be a little wider than this because of the rounded image at the left and right var graphMinWidth = 15; // Minimum size of graph var pollScrollSpeed = 4; // Lower = faster var useCookiesToRememberCastedVotes = false; // Use cookie to remember casted votes var txt_totalVotes = 'Toplam Oy: '; var ajaxObjects = new Array(); var pollVotes = new Array(); var pollVoteCounted = new Array(); var totalVotes = new Array(); /* Preload images */ var preloadedImages = new Array(); preloadedImages[0] = new Image(); preloadedImages[0].src = voteLeftImage; preloadedImages[1] = new Image(); preloadedImages[1].src = voteRightImage; preloadedImages[2] = new Image(); preloadedImages[2].src = voteCenterImage; /* These cookie functions are downloaded from http://www.mach5.com/support/analyzer/manual/html/General/CookiesJavaScript.htm */ function Poller_Get_Cookie(name) { var start = document.cookie.indexOf(name+"="); var len = start+name.length+1; if ((!start) && (name != document.cookie.substring(0,name.length))) return null; if (start == -1) return null; var end = document.cookie.indexOf(";",len); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(len,end)); } // This function has been slightly modified function Poller_Set_Cookie(name,value,expires,path,domain,secure) { expires = expires * 60*60*24*1000; var today = new Date(); var expires_date = new Date( today.getTime() + (expires) ); var cookieString = name + "=" +escape(value) + ( (expires) ? ";expires=" + expires_date.toGMTString() : "") + ( (path) ? ";path=" + path : "") + ( (domain) ? ";domain=" + domain : "") + ( (secure) ? ";secure" : ""); document.cookie = cookieString; } function showVoteResults(pollId,ajaxIndex) { document.getElementById('poller_waitMessage' + pollId).style.display='none'; var xml = ajaxObjects[ajaxIndex].response; xml = xml.replace(/\n/gi,''); var reg = new RegExp("^.*?(.*?)<.*$","gi"); var pollerTitle = xml.replace(reg,'$1'); var resultDiv = document.getElementById('poller_results' + pollId); /* var titleP = document.createElement('P'); titleP.className='result_pollerTitle'; titleP.innerHTML = pollerTitle; resultDiv.appendChild(titleP); */ var options = xml.split(/