var postImage = new Image(); function showResults(choice) { var a74118 = 120;var a74119 = 125;var a74120 = 163;var a74121 = 278; eval('a' + choice + '++'); // add the choice made by the user to the totals we already have var total = a74118 + a74119 + a74120 + a74121; var a74118_percentage_g = Math.round((a74118/total)*100);var a74119_percentage_g = Math.round((a74119/total)*100);var a74120_percentage_g = Math.round((a74120/total)*100);var a74121_percentage_g = Math.round((a74121/total)*100); var a74118_percentage_d = Math.round((a74118/total)*1000)/10;var a74119_percentage_d = Math.round((a74119/total)*1000)/10;var a74120_percentage_d = Math.round((a74120/total)*1000)/10;var a74121_percentage_d = Math.round((a74121/total)*1000)/10; var results = ""; results += "
Arboretum
 " + a74118_percentage_d + "%
";results += "
Mountainlair Plaza
 " + a74119_percentage_d + "%
";results += "
Milan Puskar Stadium
 " + a74120_percentage_d + "%
";results += "
Woodburn Circle
 " + a74121_percentage_d + "%
"; var answersContainer = document.getElementById('answers_container'); answersContainer.innerHTML = results; } function postData() { var pollName = 'prespoll1'; var poll = document.getElementById('poll_form'); var url = 'http://simpleforms.scripts.wvu.edu/poll_post.php?dir=htdocs&fname=' + pollName; var choiceMade = false; var choice = ''; if (poll && poll.elements) { for (i=0; i < poll.elements.length; ++i) { var element = poll.elements[i]; if (element.checked) { url = url + '&' + element.name + '=' + element.value; choice = element.value; choiceMade = true; } } } if (choiceMade == true) { postImage.src = url; showResults(choice); } else { alert("You must choose an option before submitting the poll."); } } document.write('
');document.write('

Talk to Us

');document.write('

What is your favorite outdoor spot on campus?

');document.write('
');document.write('
');document.write('
');document.write('');document.write('
');document.write('
');document.write('
');