
function getXMLHTTP() {
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				req = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
	}
	
	
	
	
	
	function show_poll_result(strURL)
	{
		//alert(strURL);
		var req = getXMLHTTP();
		//req=false;
		if (req) 
		{
			//req.onreadystatechange = processReqChange;
			req.onreadystatechange = function() {
				
				if(req.readyState==1){
					
					document.getElementById('poll_table').innerHTML="<img src='images/loading.gif'>";	
					
					
				}
				else if (req.readyState == 4) 
				{
					// only if "OK"
					if (req.status == 200) 
					{						
						//document.getElementById('citytr').style.visibility='visible';
						document.getElementById('poll_table').innerHTML=req.responseText;						
						
					} else 
					{
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
						
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);	
		}
	}
	
	function getCheckedValue()
	{
		var radioGrp = document.poll_form.poll_ans;
		
		for (var i = 0; i< radioGrp.length; i++) 
		{
    		if (radioGrp[i].checked)
			{
        		return radioGrp [i].value;
    		}
		} 	
	}
