// Vovici v5 Client Side Poll API // Copyright 1997-2009 Vovici Corporation. All rights reserved. // Version: 5.0.0 function VoviciPoll(pollId) { this.PollId = pollId; } VoviciPoll.prototype.RenderPoll = function(isPreview) { if (!isPreview && this.GetCookie()) { document.getElementById('ResultsDiv_' + this.PollId).style.display = 'block'; } else { document.getElementById('PollDiv_' + this.PollId).style.display = 'block'; } } VoviciPoll.prototype.SubmitVote = function() { var results = ''; var index = 1; for (;;) { var element = document.getElementById(this.PollId + '_Q1_' + index); if (!element) break; results += (element.checked) ? '1|' : '0|'; index++; } if (results.indexOf('1') != -1) { this.SetCookie(); var url = document.getElementById('PollAction_' + this.PollId).value; var headID = document.getElementsByTagName('head')[0]; var newScript = document.createElement('script'); newScript.type = 'text/javascript'; newScript.src = url + '?p=' + this.PollId + '&v=' + results; headID.appendChild(newScript); } else { alert('Please select an option before voting.'); } }; VoviciPoll.prototype.DisplayResult = function(contents) { var poll = document.getElementById('ResultsDiv_' + this.PollId); poll.innerHTML = contents; document.getElementById('PollDiv_' + this.PollId).style.display = 'none'; document.getElementById('ResultsDiv_' + this.PollId).style.display = 'block'; } VoviciPoll.prototype.ViewResults = function() { document.getElementById('PollDiv_' + this.PollId).style.display = 'none'; document.getElementById('ResultsDiv_' + this.PollId).style.display = 'block'; } VoviciPoll.prototype.SetCookie = function() { var expires = new Date(); expires.setTime(expires.getTime() + (90*24*60*60*1000)); var cookieString = 'PollStatus_' + this.PollId + '='; cookieString += '; expires=' + expires.toGMTString(); document.cookie = cookieString } VoviciPoll.prototype.GetCookie = function() { var cookieString = document.cookie; var cookies = cookieString.split('; '); for (var i = 0; i < cookies.length; i++){ var nameValuePair = cookies[i].split('='); if (nameValuePair[0] == 'PollStatus_' + this.PollId) return true; } return false; } var poll705E3EFD403F2B57 = new VoviciPoll('705E3EFD403F2B57');document.write('');document.write('QUICK\ POLL\ --\ \ As\ a\ visitor\ to\ the\ USESOM\ website,\ you\ are\ most\ interested\ in\ (choose\ all\ that\ apply):Becoming\ a\ Pre-Medical\ StudentBecoming\ a\ 1st\ time\ Basic\ Sciences\ StudentTransferring\ into\ the\ Basic\ Sciences\ ProgramTransferring\ into\ the\ Clinical\ Medicine\ ProgramLearning\ more\ about\ USESOM\'s\ unique\ Educational\ PhilosophyLearning\ more\ about\ the\ Undersea\ and\ Hyperbaric\ ProgramLearning\ more\ about\ the\ Leadership\ and\ FacultyLearning\ more\ about\ Campus\ LifeComparing\ USESOM\ to\ other\ Caribbean\ Medical\ SchoolsNothing,\ I\ landed\ on\ this\ page\ by\ accidentQUICK\ POLL\ --\ \ As\ a\ visitor\ to\ the\ USESOM\ website,\ you\ are\ most\ interested\ in\ (choose\ all\ that\ apply):Becoming\ a\ Pre-Medical\ Student 18.18%Becoming\ a\ 1st\ time\ Basic\ Sciences\ Student 17.17%Transferring\ into\ the\ Basic\ Sciences\ Program 7.07%Transferring\ into\ the\ Clinical\ Medicine\ Program 19.19%Learning\ more\ about\ USESOM\'s\ unique\ Educational\ Philosophy 5.05%Learning\ more\ about\ the\ Undersea\ and\ Hyperbaric\ Program 3.03%Learning\ more\ about\ the\ Leadership\ and\ Faculty 11.11%Learning\ more\ about\ Campus\ Life 8.08%Comparing\ USESOM\ to\ other\ Caribbean\ Medical\ Schools 33.33%Nothing,\ I\ landed\ on\ this\ page\ by\ accident 10.10%');poll705E3EFD403F2B57.RenderPoll(false);