function validateIssueVouchers(thisForm, XFA) {
	if (thisForm.voucher_qty.value == "") {
		alert("I am sorry but you must enter a voucher quantity to continue");
		return false;
	}
	if (thisForm.voucher_price.value == "") {
		alert("I am sorry but you must enter a voucher price to continue");
		return false;
	}
	if (thisForm.valid_all.checked == false) {
		var oneCheck = false;
		totalModules = document.issueVouchers.totalModules.value;
		for (i=0;i<totalModules;i++) {
			if (document.issueVouchers.valid_for[i].checked == true) {
				oneCheck = true;
				i = totalModules;
			}
		}
		if (oneCheck  == false) {
			alert("All Vouchers must be valid for at least one Module");
			return false;
		}
	}
	getContentForm(XFA, thisForm);
	return true;
}

function checkAllIssueModules() {
	totalModules = document.issueVouchers.totalModules.value;
	myCheck = document.issueVouchers.valid_all.checked;
	for (i=0;i<totalModules;i++) {
		document.issueVouchers.valid_for[i].checked = myCheck
	}
}

function unCheckAllIssue(thisModule) {
	if (thisModule.checked == false) {
		document.issueVouchers.valid_all.checked = false;
	}
}

function confirmDelete(thisForm) {
	 if (confirm('Are you sure you want to delete this record?')) {
		javascript:getContentForm('admin.clientAction', thisForm);
	}
}

// For the module's page, if the active checkbox gets unchecked,
// the user should realize that this is the same effective action
// as deleting it
function notifyOfDelete(checkbox) {
	if(!checkbox.checked) {
		alert("Be aware that unchecking this checkbox will effectively delete this module -- be sure that's what you intend to do");
	}
}

function validateMe(thisForm) {
	
	if (thisForm.email.value == "") {
		alert("You must enter a valid email address to continue");
		return false;
	}
	if (thisForm.license.value == "") {
		alert("You must enter a username to continue");
		return false;
	}
	if (thisForm.name_first.value == "") {
		alert("You must enter your first name");
		return false;
	}
	if (thisForm.name_last.value == "") {
		alert("You must enter your last name");
		return false;
	}
	if (thisForm.address1.value == "") {
		alert("You must enter your mailing address");
		return false;
	}
	if (thisForm.city.value == "") {
		alert("You must enter your city");
		return false;
	}
	if (thisForm.zip.value == "") {
		alert("You must enter your zip code");
		return false;
	}
	
	

	return true;
}