function validate(form) {
	var errStr = "";
	var lastElement = "";
	var hypStr = "";


	if (form.att_height.selectedIndex == 0){
		errStr = errStr + "Unspecified height\n";
		lastElement = form.att_height;
	}
	if (form.att_weight.selectedIndex == 0){
		errStr = errStr +  "Unspecified weight\n";
		lastElement = form.att_weight;
	}
	if ((!form.qty[0].checked)&&(!form.qty[1].checked)&&(!form.qty[2].checked)){
		errStr  = errStr +  "Please select a quantity\n";
	}
	if ((!form.att_anorexia[1].checked)&&(!form.att_anorexia[0].checked)){
		errStr  = errStr +  "Have you ever had an eating disorder?\n";
	}
	if ((!form.att_malabsorption[1].checked)&&(!form.att_malabsorption[0].checked)){
		errStr  = errStr +  "Do you suffer from any Malabsorption Syndrome?\n";
	}
	if ((!form.att_breastfeed[1].checked)&&(!form.att_breastfeed[0].checked)){
		errStr  = errStr +  "Do you intend to breastfeed?\n";
	}
	if ((!form.att_cyclosporine[1].checked)&&(!form.att_cyclosporine[0].checked)){
		errStr  = errStr +  "Do you intend take cyclosporine?\n";
	}
	if ((!form.att_cholestasis[1].checked)&&(!form.att_cholestasis[0].checked)){
		errStr  = errStr +  "Do you suffer from cholestasis?\n";
	}
	if ((!form.att_hypothyroidism[1].checked)&&(!form.att_hypothyroidism[0].checked)){
		errStr  = errStr +  "Do you suffer from hypothyroidism?\n";
	} else if (form.att_hypothyroidism[1].checked){
		hypStr  = "Weight gain may be a symptom of hypothyroidism. We are still able to supply you with Xenical, but please ensure that your regular physician arranges for your thyroid levels to be checked regularly.\n\nClick OK to continue\n";
	}
	if(errStr.length > 0) {
		alert("You need to correct these form fields:\n\n" + errStr);
		lastElement.focus();
		return false;
	}
	if (hypStr.length>0){
		if (confirm(hypStr)){
			return true;
		}
		return false;
	}
	return true;
}

