
function loadVoteList()
{
	var sOpr = 'loadVoteList';
	
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
	} 
	var url="../php/voteResults.php";
	url=url+"?Opr="+sOpr;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChangedLoadVoteList;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChangedLoadVoteList() 
{
	if (xmlHttp.readyState==2)
	{
		/*document.getElementById("lblStatusMsg").innerHTML="Processing.....";*/
	}
	
	if (xmlHttp.readyState==4)
	{
			/*document.getElementById("lblStatusMsg").innerHTML="&nbsp;";*/
			if (xmlHttp.responseText == '')
			{
				/*document.getElementById("lblStatusMsg").innerHTML = "Center not found";*/
			}
			else
			{
					var resText=xmlHttp.responseText;
					document.getElementById("report").innerHTML=resText;	
					
			}	
	}
}	


function loadVoteListCountry()
{
	var sOpr = 'loadVoteListCountry';
	
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
	} 
	var url="../php/voteResults.php";
	url=url+"?Opr="+sOpr;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChangedLoadVoteListCountry;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChangedLoadVoteListCountry() 
{
	if (xmlHttp.readyState==2)
	{
		/*document.getElementById("lblStatusMsg").innerHTML="Processing.....";*/
	}
	
	if (xmlHttp.readyState==4)
	{
			/*document.getElementById("lblStatusMsg").innerHTML="&nbsp;";*/
			if (xmlHttp.responseText == '')
			{
				/*document.getElementById("lblStatusMsg").innerHTML = "Center not found";*/
			}
			else
			{
					var resText=xmlHttp.responseText;
					document.getElementById("report").innerHTML=resText;	
					
			}	
	}
}	



function loadVoteListAll()
{
	var sOpr = 'loadVoteListAll';
	
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
	} 
	var url="../php/voteResults.php";
	url=url+"?Opr="+sOpr;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChangedLoadVoteListAll;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChangedLoadVoteListAll() 
{
	if (xmlHttp.readyState==2)
	{
		/*document.getElementById("lblStatusMsg").innerHTML="Processing.....";*/
	}
	
	if (xmlHttp.readyState==4)
	{
			/*document.getElementById("lblStatusMsg").innerHTML="&nbsp;";*/
			if (xmlHttp.responseText == '')
			{
				/*document.getElementById("lblStatusMsg").innerHTML = "Center not found";*/
			}
			else
			{
					var resText=xmlHttp.responseText;
					document.getElementById("report").innerHTML=resText;	
					
			}	
	}
}	


