<!--
function valdrop() {
var failed = false;

	if(document.apply.submitted) return false;
	selectObj = MM_findObj('NumberofClients');
	if (selectObj.selectedIndex == 0) {
		return ValidateDropDowns('Cover', 'Cover', 'Cover_Length', 'Cover length', 'Waiver_Basis', 'Waiver of premium', 'Title_1', 'Title', 'Sex_1', 'Gender', 'Smoker_1', 'Smoker', 'Contact_Time', 'Contact time');
		/*
		if((document.apply.Cover.selectedIndex == 0)
			|| (document.apply.Cover_Length.selectedIndex == 0)
			|| (document.apply.Waiver_Basis.selectedIndex == 0)
			|| (document.apply.Title_1.selectedIndex == 0)
			|| (document.apply.Sex_1.selectedIndex == 0)
			|| (document.apply.Smoker_1.selectedIndex == 0)
			|| (document.apply.Contact_Time.selectedIndex == 0))
		{
			failed = true;
			alert('You must make a selection from each drop down list.');
		}
		*/
	} else {
		return ValidateDropDowns('Cover', 'Cover', 'Cover_Length', 'Cover length', 'Waiver_Basis', 'Waiver of premium', 'Title_1', 'Title 1', 'Title_2', 'Title 2', 'Sex_1', 'Gender 1', 'Sex_2', 'Gender 2', 'Smoker_1', 'Smoker 1', 'Smoker_2', 'Smoker 2', 'Contact_Time', 'Contact time');
		/*if((document.apply.Cover.selectedIndex == 0)
			|| (document.apply.Cover_Length.selectedIndex == 0)
			|| (document.apply.Waiver_Basis.selectedIndex == 0)
			|| (document.apply.Title_1.selectedIndex == 0)
			|| (document.apply.Title_2.selectedIndex == 0)
			|| (document.apply.Sex_1.selectedIndex == 0)
			|| (document.apply.Sex_2.selectedIndex == 0)
			|| (document.apply.Smoker_1.selectedIndex == 0)
			|| (document.apply.Smoker_2.selectedIndex == 0)
			|| (document.apply.Contact_Time.selectedIndex == 0))
		{
			failed = true;
			alert('You must make a selection from each drop down list.');
		}*/
	}
	
	if(failed)
		return false;
	else
		return true;
}

function ValidateDropDowns() {
	var args = ValidateDropDowns.arguments;
	msg = "";
	for (i=0; i<(args.length-1); i+=2) { 
		name=args[i+1]; 
		obj=MM_findObj(args[i]);
		if (!IsOptionSelected(obj)) {
			msg += '- You must select ' + name + '.\n';
		}
	}
	if (msg) {
		alert('The following error(s) occurred:\n' + msg);
		return false;
	} else {
		return true;
	}
}
function IsOptionSelected(obj) {
	if (obj.selectedIndex == 0) {
		return false;
	} else {
		return true;
	}
}
//-->