var survey_question = new Array(59);

survey_question[0] = "Is anti-virus software important?";
survey_question[1] = "Is updating  software important?";
survey_question[2] = "Is backing up important files important? ";
survey_question[3] = "Do irresponsible gambling vendors use crimeware?";
survey_question[4] = "Have you been the victim of identity theft?";
survey_question[5] = "Has your computer ever crashed because of a virus?";
survey_question[6] = "Does installing multiple anti-virus programs cause conflicts?";
survey_question[7] = "Is having an anti-spyware program  necessary?";
survey_question[8] = "Do you use the same password for many different accounts?";
survey_question[9] = "Are a large percentage of viruses spread by email?";
survey_question[10] = "Do you know what rogue security software is?";
survey_question[11] = "How often do you do a full system scan?";
survey_question[12] = "Do you use an anti-virus program?";
survey_question[13] = "Do you use crimware detection programs?";
survey_question[14] = "Have you experinced online identity theft?";
survey_question[15] = "Do you conduct online banking?";
survey_question[16] = "Do you use the latest version of Microsoft Internet Explorer?";
survey_question[17] = "Do you have Microsoft Automatic Updates swicthed on?";
survey_question[18] = "Do you find the GamBlock&reg; website easy to understand?";
survey_question[19] = "Do you find the GamBlock&reg; download process easy to understand?";



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 < 21; 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);
    }
}

