// Congress Registration Form

var WS = 0;
var GR = 0;
function workStudy(item) {			
		if (!WS) { alert('Please read the details on the Work Study program when selecting this option!'); }
		WS = 1;
}
function groupRate(item) {	
		if (!GR) { alert('We will followup with you by email to collect\nthe details concerning your group participants.'); }
		GR = 1;	
}

function isReg(form1) {
// bypass all validation if View Cart button is clicked
 if(form1.add.value != 1) {
	return true;
 } else {
		
		var CL = form1.CEL.value;
		var CS = form1.CES.value;		
		
	if (CL != '' && CS == '') { alert('Please include CE State with your CE license number.'); form1.CES.focus(); return false; }
	if (CL == '' && CS != '') { alert('Please include CE License with your CE State.'); form1.CEL.focus(); return false; }
	if (CL != '' && CS != '') { form1.CE.checked = true; }
	
	if (form1.CE.checked == true) {		
		if(CL == '' || CS == '') {
			alert('Please provide the required Information for your CE Certificate.');
			return false;
		}
		form1.multiitem13.value = "CE Certificate|15|||Number:" + CL + "|State:" + CS	
	}
/*	ONLY IF FIELD EXIST FOR "ALREADY REGISTERED"
	if (form1.badge_name.value == '' && form1.multiitem2[6].checked == false) {		
		alert('Please provide the preferred name on your Badge');
		form1.badge_name.focus();
		return false;
	} else if (form1.multiitem2[6].checked == false){ 
		form1.multiitem14.value = "Preferred name on your badge||0||" + form1.badge_name.value;	
	} else if (form1.multiitem2[6].checked == true){ 
		form1.multiitem14.value = "";	
	}
*/

// ONLY IF FIELD DOES NOT EXIST FOR "ALREADY REGISTERED";
if (form1.badge_name.value == ''  && document.refForm.multiitem2[2].checked==false) {		
		alert('Please provide the preferred name on your Badge');
		form1.badge_name.focus();
		return false;
} else {
		form1.multiitem14.value = "Preferred name on your badge||0||" + form1.badge_name.value;		
} 	
//--

	return confirm("Is all the information correct?\n Hit OK to submit or CANCEL to make changes."); 
 }
}	


//-------------------------------------------------------------
// confirmation on contactus page submit	
function sendForm() {
	return confirm("Is all the information correct?\n Hit OK to submit or CANCEL to make changes.");
}

//-----------------------------------------------------------
