// JScript source code for managing the survey panel
function displaySurveyPage()
{
	// This function checks a cookie to determine if
	// the user has taken a survey in the last 30 days.
	// If not, they are redirected to a survey page.
		
	var allCookies = document.cookie;
	var surveyCookiePresent = allCookies.indexOf("tblSurveyTaken");
	
	if(surveyCookiePresent == -1)
	{
		// Make sure that the user has not already said "No Thanks"
		// during this session.
		var noThanksCookiePresent = allCookies.indexOf("tblSurveyNoThanks");
		if (noThanksCookiePresent == -1)
		{
			var surveyDiv = document.getElementById('takeSurvey');
			surveyDiv.style.display = "block";
		}
	}		
}

function SurveyNoThanks()
{
	// If the user says "No Thanks" to the survey,
	// we will hide the DIV tag and set the cookie.
	
	// Hide the div tag
	var surveyDiv = document.getElementById('takeSurvey');
	surveyDiv.style.display = "none";
	
	// Set a cookie that expires at the end of this session
	document.cookie = 'tblSurveyNoThanks=1;path=/';

}

function HideSurveyDiv()
{
	// Hide the div tag
	var surveyDiv = document.getElementById('takeSurvey');
	surveyDiv.style.display = "none";
}


