var flagCaptcha = false; var flagFields = true; var message = 'Please fill in all mandatory fields ! \n'; var bustcachevar=1; //bust potential caching of external pages after initial request? (1=yes, 0=no) var bustcacheparameter=""; function createRequestObject(){ try { xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { alert('Sorry, but your browser doesn\'t support XMLHttpRequest.'); }; return xmlhttp; }; function ajaxpage(url, containerid, requesttype){ var page_request = createRequestObject(); if (requesttype=='get'){ if (bustcachevar) bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime() page_request.open('GET', url+bustcacheparameter, true) page_request.send(null) } else if (requesttype=='post') { page_request.open('POST', url, true); page_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); page_request.setRequestHeader("Content-length", poststr.length); page_request.setRequestHeader("Connection", "close"); page_request.send(poststr); }; page_request.onreadystatechange=function(){ loadpage(page_request, containerid) } } function loadpage(page_request, containerid){ if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)) { document.getElementById(containerid).innerHTML=page_request.responseText; }; } function submitVote137(element, id) { var selectedAnswers = ''; var answersCount = document.PollFrm137.answers137.length; for (i=0; i< answersCount; i++) { if (document.PollFrm137.answers137[i].checked) { if(element=="radio") selectedAnswers = document.PollFrm137.answers137[i].value; else if(element=="checkbox") selectedAnswers = selectedAnswers + "-" + document.PollFrm137.answers137[i].value; } } if (selectedAnswers=='') { } else { ajaxpage('poll.php?ac=vote&id='+id+'&answers='+selectedAnswers,'poll_'+id,'get'); }; }; function SelectFormElement137(el,id) { if(el=="radio"){ document.PollFrm137.answers137[id].checked = "checked"; } else if(el=="checkbox"){ document.PollFrm137.answers137[id].checked = !document.PollFrm137.answers137[id].checked; } } loadPoll = '
'; document.writeln(loadPoll);