document.getElementById('divErrors').style.display='none';
document.getElementById('divSuccess').style.display='block';

var previousInnerHTML = new String();

function AddErrorMsg(msg)
{
	// previousInnerHTML = previousInnerHTML.concat("<li>" + msg + "</li>");    
	previousInnerHTML = msg;
	
} 

 // ----------------------------------------------------------------------



function validateContactForm(theForm) {				

previousInnerHTML='';
	if (!theForm.q1[0].checked && !theForm.q1[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}

	if (!theForm.q2[0].checked && !theForm.q2[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}

	if (!theForm.q3[0].checked && !theForm.q3[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}

	if (!theForm.q4[0].checked && !theForm.q4[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}

	if (!theForm.q5[0].checked && !theForm.q5[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}

	if (!theForm.q6[0].checked && !theForm.q6[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}

	if (!theForm.q7[0].checked && !theForm.q7[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}

	if (!theForm.q8[0].checked && !theForm.q8[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}

	if (!theForm.q9[0].checked && !theForm.q9[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}


	if (!theForm.q10[0].checked && !theForm.q10[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}

	if (!theForm.q11[0].checked && !theForm.q11[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}

	if (!theForm.q12[0].checked && !theForm.q12[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}

	if (!theForm.q13[0].checked && !theForm.q13[1].checked) {			
		AddErrorMsg("All questions must be answered");
	}







		if (previousInnerHTML!='')
		{
			
			document.getElementById('divErrors').innerHTML = '<p>Please note: ' + previousInnerHTML + '</p>' ;
			document.getElementById('divErrors').style.display='block';

			return false;
		}
		else
		{
			return true;
		}

}