var survey_question = new Array(59);

survey_question[0] = "Do you find yourself gambling more frequently than you used to?";
survey_question[1] = "Has anyone ever suggested that you have a problem with gambling?";
survey_question[2] = "Did you ever gamble more than you intended to (time or money)? ";
survey_question[3] = "Do you have a fantasy that gambling is going to make you rich or famous?";
survey_question[4] = "Do you believe you have superior knowledge when you place a bet?";
survey_question[5] = "Do you lose time from work/university/school due to gambling?";
survey_question[6] = "Do you have intense interest in point spreads or odds?";
survey_question[7] = "Do you make frequent calls to sports phones, lotteries or contact internet sites for gambling information?";
survey_question[8] = "Have you ever bet with a bookmaker or used credit cards to gamble or gambled on internet sites?";
survey_question[9] = "Have your work habits or grades dropped because of gambling?";
survey_question[10] = "Have you ever done anything illegal to finance your gambling?";
survey_question[11] = "Is gambling language or references part of your vocabulary?";
survey_question[12] = "Do you prefer to socialize with friends who gamble?";
survey_question[13] = "Does anyone in your family have an addiction?";
survey_question[14] = "Have you ever borrowed money to finance gambling?";
survey_question[15] = "Has anyone ever paid your gambling debts for you?";
survey_question[16] = "Does gambling give you a \"rush\" or \"high\"?";
survey_question[17] = "Do you find yourself craving another gambling experience?";
survey_question[18] = "Do you find yourself \"chasing\" your losses?";
survey_question[19] = "Have you ever tried to stop or control your gambling?";
survey_question[20] = "Have you lied about your gambling to family and/or friends?";
survey_question[21] = "Do you wake up at night to gamble on the internet?";
survey_question[22] = "Do you seek online help?";
survey_question[23] = "Do you attend face to face meetings?";
survey_question[24] = "Are you female?";
survey_question[25] = "Are you male?";
survey_question[26] = "Are you under twenty years old?";
survey_question[27] = "Are you between twenty and twenty five years old?";
survey_question[28] = "Are you between twenty six and forty years old?";
survey_question[29] = "Are you between forty one and sixty years old?";
survey_question[30] = "Are you over sixty one years old?";
survey_question[31] = "Did you start gambling when you were under twenty years old?";
survey_question[32] = "Did you start gambling when you were between twenty and twenty-five years old?";
survey_question[33] = "Did you start gambling when you were between twenty six and forty years old?";
survey_question[34] = "Did you start gambling when you were between forty one and sixty years old?";
survey_question[35] = "Did you start gambling when you were over sixty one years old?";
survey_question[36] = "Have you ever self-excluded yourself from a casino or gambling venue?";
survey_question[37] = "Have you ever tried to remove your name from self-exclusion at a casino or gambling venue?";		  
survey_question[38] = "Have you ever gambled to avoid dealing with issues or people at home?";
survey_question[39] = "Have you ever gambled to avoid dealing with issues or people at work/university/school?";
survey_question[40] = "I use an anti-virus program.";
survey_question[41] = "I use crimware detection programs.";
survey_question[42] = "I have experinced identity theft online.";
survey_question[43] = "I am aware that irresponsible gambling vendors use crimeware.";
survey_question[44] = "I use the latest version of Microsoft Internet Explorer.";
survey_question[45] = "I have Microsoft Automatic Updates swicthed on.";
survey_question[46] = "I use GamBlock&reg; at work/university/school.";
survey_question[47] = "I use GamBlock&reg; at home.";
survey_question[48] = "I find the GamBlock&reg; website easy to understand.";
survey_question[49] = "I find the GamBlock&reg; download process easy to understand.";
survey_question[50] = "I use (or intend to use) GamBlock&reg; for my employee/s.";
survey_question[51] = "I use (or intend to use) GamBlock&reg; for my self.";
survey_question[52] = "I use (or intend to use) GamBlock&reg; for my partner.";
survey_question[53] = "I use (or intend to use) GamBlock&reg; for my child.";
survey_question[54] = "I use (or intend to use) GamBlock&reg; for my parents.";
survey_question[55] = "I use (or intend to use) GamBlock&reg; for a reason not listed above.";
survey_question[56] = "I already use GamBlock&reg;.";
survey_question[57] = "I have used GamBlock&reg; for over a year.";
survey_question[58] = "I have used GamBlock&reg; for over two years.";
survey_question[59] = "Does GamBlock&reg; help with offline gambling?";

function question(number)
	{
		return survey_question[parseInt(number)-1]
	
	}

function SwapChkButtons(chkObj)
{
	ChkObj_Name=chkObj.name;
	var Column_NumberStr = Right(ChkObj_Name, 1);
	var Column_NumberInt = parseInt(Column_NumberStr);
	var LeftStr = Left(ChkObj_Name, 7);
	var qNo = Left(Right(ChkObj_Name, 5),3);


	for(Traverse_XorY_ChkBoxes = 1; Traverse_XorY_ChkBoxes < 4; Traverse_XorY_ChkBoxes++ )
		{
			if (Column_NumberInt != Traverse_XorY_ChkBoxes)
				{
					document.getElementById(LeftStr + Traverse_XorY_ChkBoxes).checked = false;
				}
		}
	

	if (Column_NumberInt == 1)
		{
			document.getElementById(qNo).value = "Yes";
		}
	else if (Column_NumberInt == 2)
		{
			document.getElementById(qNo).value = "No";
		}		
	else if (Column_NumberInt == 3)
		{
			document.getElementById(qNo).value = "Don't Know";
		}	

}

function AddQA()
{
	TempQA = "";
	Qprefix = "q0"

	for(TraverseQA = 1; TraverseQA < 61; TraverseQA++ )
		{
			if (TraverseQA > 9)

				{	
					
					Qprefix = "q";
				}

			TempQA = TempQA + "<p>" + survey_question[TraverseQA - 1] + "</p><p>" +  document.getElementById(Qprefix + TraverseQA).value + "</p><p>&nbsp;</p>" ;

		}

	return TempQA;
}


 
function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}
 
function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}
