// JavaScript Document
function fadeWhite()
{
	$(document).ready(function(){    
			$('#fadePanel').fadeOut('slow');		
	});	
}

function validatePoll(str)
{
	if(str == "")
	{
		setTimeout('document.getElementById(\'noVote\').style.visibility = \'visible\'', 1000);
		return false;
	}
	
	setTimeout('document.getElementById(\'noVote\').style.visibility = \'hidden\'', 1000);
}

function vote(str, pollID)
{	
	if (str == "")
	{
		document.getElementById("poll").innerHTML = "";
		return;
	} 
	
	try
	{
		xmlhttp = new XMLHttpRequest();
	}
	catch(e)
	{// code for IE6, IE5
		try
		{
		  	xmlhttp = new ActiveXObject("Msxml2.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 && xmlhttp.status == 200)
		{
			document.getElementById("poll").innerHTML = xmlhttp.responseText;
		}
	}
	
	timestamp = new Date().getTime();
	xmlhttp.open("GET","vote.php?choice="+str+"&fix="+timestamp+"&pollID="+pollID,true);
	xmlhttp.send();
}
			
			
			
			
			
			
