function GetXmlHttpObject()
{
	var xmlHttp_polling=null;
		try
		{
			// Firefox, Opera 8.0+, Safari
			xmlHttp_polling=new XMLHttpRequest();
		}
		catch (e)
		{
			// Internet Explorer
			try
			{
				xmlHttp_polling=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				xmlHttp_polling=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
	return xmlHttp_polling;
} //end of GetXmlHttpObject
	
	
function poll_vote_stateTagsChanged() 
{ 
	if (xmlHttp_voting.readyState==4)
	{ 
		var res = xmlHttp_voting.responseText;
		
		if(res != "")
		{
			if(res == 'alreadyvoted')
			{
				//alert('Sorry, you had already voted for this poll!!!');
				//Dialog.confirm("Sorry, you had already voted for this poll!!!", {top: 10, width:250, className: "alphacube", okLabel: "Yes", cancelLabel:"No"});
				openAlert(siteURL+'/page_include/inc_alert_msg.php?msg=Sorry, you have already voted for this vote topic!!!');
			}
			else
			{
				var arr = res.split("##||##");
				var td_id = 'voting_table_'+arr[0];
				document.getElementById(td_id).innerHTML = arr[1];
			}
		}
		
	}
} // end of stateChanged

function cabinet_vote_stateTagsChanged() 
{ 
	if (xmlHttp_voting.readyState==4)
	{ 
		var res = xmlHttp_voting.responseText;
		
		if(res != "")
		{
			if(res == 'alreadyvoted')
			{				
				//alert('Sorry, you had already voted for this poll!!!');
				//Dialog.confirm("Sorry, you had already voted for this poll!!!", {top: 10, width:250, className: "alphacube", okLabel: "Yes", cancelLabel:"No"});
				openAlert(siteURL+'/page_include/inc_alert_msg.php?msg=Sorry, you have already voted for this cabinet!!!');
			}
			else
			{
				var arr = res.split("##||##");
				var td_id = 'voting_table_'+arr[0];
				document.getElementById(td_id).innerHTML = arr[1];
				document.getElementById("voting_opt").style.display = "none";
				document.getElementById("thanks_voting").style.display = "block";				
			}
		}
		
	}
} // end of stateChanged

// -------  Used for Vote Topics voting := PLEASE DONT MAKE ANY CHANGES -------
function poll_stateTagsChanged() 
{ 
	if (xmlHttp_polling.readyState==4)
	{ 
		var res = trim(xmlHttp_polling.responseText);

		if(res != "")
		{
			if(res == 'alreadyvoted')
			{
				alert('Sorry, you had already voted for this !!!');
				//Dialog.confirm("Sorry, you had already voted for this poll!!!", {top: 10, width:250, className: "alphacube", okLabel: "Yes", cancelLabel:"No"});
				//openAlert(siteURL+'/page_include/inc_alert_msg.php?msg=Sorry, you have already voted for this !!!','150');
			}
			else
			{
				var arr = res.split("##||##");
				var td_id = 'voting_table_'+arr[0];
				document.getElementById(td_id).innerHTML = arr[1];
			}
		}
		
	}
} // end of stateChanged
	
	
