
function Validate(oForm){
	requiredRadioElements = new Array( "rdo_age",
		"rdo_profession",
		"rdo_easyAccess",
		"rdo_easyToUnderstand",
		"rdo_clearlyPresented",
		"rdo_informative",
		"rdo_openAndTransparent",
		"rdo_detailed",
		"rdo_comprehensive",
		"rdo_IncoCommitment",
		"rdo_aboriginalCommitment",
		"rdo_productStewardship",
		"rdo_shortcomings",
		"rdo_humanResources",
		"rdo_healthSafety",
		"rdo_ethicalConduct",
		"rdo_communityGiving",
		"rdo_worldwide",
		"rdo_doesRequired",
		"rdo_positive_contribution",
		"rdo_fulfills",
		"rdo_isCommited",
		"rdo_healthWelfare",
		"rdo_strivesToBalance",
		"rdo_reportsOnShortcomings",
		"rdo_expectReport",
		"rdo_areAware",
		"rdo_HaveReadIt");

	//check for other check box
	var ischecked = 0;

	for(var i = 0; i < oForm.elements.length; i++) {
		if(oForm.elements[i].type == "radio") {

			//check the name of the element with the required elements list
			for(var j = 0; j < requiredRadioElements.length; j++) {
				if(oForm.elements[i].name == requiredRadioElements[j]) {
					if(oForm.elements[i].checked) {
						ischecked++;
					}
				}
			} //for(var j = 0; j < requiredTadioElements.length; j++)
			
		} //if(oForm.elements[i].type == "radio")
	}
					
	//if(ischecked < 28){
	//	alert('Please supply an answer to each of the questions.');
	//	return false;		
	//}
	if(ischecked < 1){
		//no question answered -> check textboxes for at least 1 answer
		if(!(oForm.txa_expectReport.value.length>0||oForm.txa_whatElse.value.length>0||oForm.txa_comments.value.length>0)){
	
		alert('Please supply an answer to at least one of the questions.');
		return false;				
		}
	}		
				
	//Validate that the Why text is no longer than 2000 characters
	if (oForm.txa_expectReport.value.length > 2000){
		alert("Your response for why companies should be expected to produce reports is too long. Please shorten it.\n  The maximum character length is 2000 characters.");
		oForm.txa_expectReport.focus();
		return false;
	}
	
	//Validate that the Comments text is no longer than 2000 characters
	if (oForm.txa_whatElse.value.length > 2000){
		alert("Your response for what else you would like to see included in the report is too long. Please shorten it.\n  The maximum character length is 2000 characters..");
		oForm.txa_whatElse.focus();
		return false;
	}
	
	if (oForm.txa_comments.value.length > 2000){
		alert("Your comments are too long. Please shorten them.\n  The maximum character length is 2000 characters..");
		oForm.txa_comments.focus();
		return false;
	}
		
		//everything is good to go!!
	return true;	
}



