function loadOpinionPoll(divToUpdateName)
{
	var url = "publicOpinionPollAction.action";
	neoAjax.updateNoCache(url,divToUpdateName);	
}

var totalQuestions = 10;
var currentQuestions = null;
function showQuestion()
{
	currentQuestions = currentQuestions + 1;
	var currentLabel = "question" + currentQuestions;
	//alert(currentLabel);
	document.getElementById(currentLabel).style.display = "block";
	document.getElementById("removeQuestion").style.display = "block";
	if (currentQuestions >= totalQuestions)
	{
		document.getElementById("addQuestion").style.display = "none";
	}
	else
	{
		document.getElementById("addQuestion").style.display = "block";
	}
	
	document.getElementById("numberOfQuestions").value = currentQuestions;
}

function hideQuestion()
{
	currentQuestions = currentQuestions;
	var currentLabel = "question" + currentQuestions;
	//alert(currentLabel);
	document.getElementById(currentLabel).style.display = "none";
	document.getElementById("addQuestion").style.display = "block";
	if (currentQuestions <= 4)
	{
		document.getElementById("removeQuestion").style.display = "none";
	}
	else
	{
		document.getElementById("removeQuestion").style.display = "block";
	}
	currentQuestions = currentQuestions - 1;
	document.getElementById("numberOfQuestions").value = currentQuestions;
}
function loadQuestions()
{
	currentQuestions = currentQuestions;
	for (var i=1; i <= currentQuestions; i++)
	{
		var currentLabel = "question" + i;
		document.getElementById(currentLabel).style.display = "block";
	}
	if (currentQuestions <= 4)
	{
		document.getElementById("removeQuestion").style.display = "none";
	}
	else
	{
		document.getElementById("removeQuestion").style.display = "block";
	}
	if (currentQuestions >= totalQuestions)
	{
		document.getElementById("addQuestion").style.display = "none";
	}
	else
	{
		document.getElementById("addQuestion").style.display = "block";
	}
}