
	
	function loadPoll(pollid,sitecode)
	{
		var cookie_value = GetCookie('poll');
		
		if(pollid && cookie_value)
		{
			var voted_list_array = cookie_value.split('~');
			var thisPollID = pollid;
			var pollwrapper = document.getElementById('poll_container');
			
			var xmlHttp; 
			var scriptname = "/onsetfeature/pollcap.php?station=" + sitecode;
			
			for(x=0;x<voted_list_array.length;x++)
			{
				if(voted_list_array[x] == thisPollID)
				{
					scriptname += "&action=results";
					break;
				}
			}
			try {
				xmlHttp = new XMLHttpRequest();
			}
			catch(e) {
				try {
					xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch (e) {
					try {
						xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch (e) {
						alert("not supported");
					} 
				}
			}
			xmlHttp.onreadystatechange=function() {
				if(xmlHttp.readyState == 4) {
					//alert(xmlHttp.responseText);
					pollwrapper.innerHTML = xmlHttp.responseText;
				}
			}
			xmlHttp.open("GET",scriptname, true);
			xmlHttp.send(null);
		}
	}
