// JavaScript Document
function vote(){
var xmlHttp;
var sel;
	try{
	 xmlHttp = new XMLHttpRequest(); 
	}catch(e){
	 try{
	    xmlHttp = new ActiveXObject("Mxml2.XMLHTTP");
		}catch(e){
		 try{
		  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		 }catch(e){
		  alert("Your browser does not support Ajax");
		  return false;
		 }
		}
	}
	
	  xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
      	 alert('Your Vote Recorded');
        }
      }

	
    if(document.getElementById("valone").checked==true){
	 sel=document.getElementById("valone").value;
	}if(document.getElementById("valtwo").checked==true){
	sel=document.getElementById("valtwo").value;
	}if(document.getElementById("valthree").checked==true){
	sel=document.getElementById("valthree").value;
	}
xmlHttp.open("GET","http://www.heraldmalaysia.com/vote.php?result="+sel,true);
xmlHttp.send(null);
 }
