function valbutton(thisradio) {
	myOption = -1;
	for (i=thisradio.length-1; i > -1; i--) {
		if (thisradio[i].checked) {
			myOption = i; i = -1;
		}
	}
	if (myOption == -1) {
		// radio button doesn't exist
		return false;
	}
	else {
		return true;
	}
}

function valallbuttons(thisform) {
	var isvalid = true;
	var stralert = "Answers to all multiple choice questions on this survey are required.\r\n";
	stralert += "Please provide answers to the following questions:\r\n\r\n";
	if(valbutton(thisform.MajorityPurchases) == false){
		isvalid = false;
		stralert +=	"The majority of your purchase consists of which brand?\r\n";
	}
	if(valbutton(thisform.ProfesionalRep) == false){
		isvalid = false;
		stralert +=	"The courtesy/professionalism of the Customer Service Representative?\r\n";
	}
	if(valbutton(thisform.KnowledgeRep) == false){
		isvalid = false;
		stralert +=	"The knowledge of the Customer Service Representative?\r\n";
	}
	if(valbutton(thisform.TimelinessRep) == false){
		isvalid = false;
		stralert +=	"The timeliness of the service provided by the Customer Service Representative?\r\n";
	}
	if(valbutton(thisform.ProdAvail) == false){
		isvalid = false;
		stralert +=	"Product Availability\r\n";
	}
	if(valbutton(thisform.ProdQual) == false){
		isvalid = false;
		stralert +=	"Product Quality\r\n";
	}
	if(valbutton(thisform.Shipping) == false){
		isvalid = false;
		stralert +=	"Shipping\r\n";
	}
	if(valbutton(thisform.ARCreditRep) == false){
		isvalid = false;
		stralert +=	"Accounts Receivable Credit Representative\r\n";
	}
	if(valbutton(thisform.OSRep) == false){
		isvalid = false;
		stralert +=	"Outside Sales Representative\r\n";
	}
	if(valbutton(thisform.DJOInsuranceRep) == false){
		isvalid = false;
		stralert +=	"DJO Insurance Representative\r\n";
	}
	if(valbutton(thisform.OverallService) == false){
		isvalid = false;
		stralert +=	"Your Overall Service Experience\r\n";
	}
	if(valbutton(thisform.RecommendProducts) == false){
		isvalid = false;
		stralert +=	"Based on your experience with DJO would you recommend our products to a colleague?\r\n";
	}
	if(valbutton(thisform.CompareService) == false){
		isvalid = false;
		stralert +=	"Compared to our competitors, is our overall service ...?\r\n";
	}	
	if(isvalid == false){
		alert(stralert);
		return false;
	}								
	else {
		return true;
	}				
}
