var L_ExitConfirm_Message = "Exitting now will cancel any unsaved changes.  Continue?";

function OnClickExit() {
	return confirm(L_ExitConfirm_Message)
}

function confirmDeleteProperty() {
	return confirm ('Are you sure you want to delete your selection(s)?');
}

function confirmDelete () {
	frm = document.forms[0];
	// loop through all elements
	
	for (i=0; i<frm.length; i++) {
		//Look for our checkboxes only\n" +
		if (frm.elements[i].name.indexOf ('CheckThis') !=-1) {
			// If any are checked then confirm alert, otherwise nothing happens
			if(frm.elements[i].checked) {
				//return confirm ('Are you sure you want to delete your selection(s)?');
			}
		}
	}
	return false;
}


function select_deselectAll (chkVal, idVal) {
	var frm = document.forms[0];
	// loop through all elements
	if (idVal.indexOf ('CheckThis') != -1) {
		return;
	}
	for (i=0; i<frm.length; i++) {
		if (frm.elements[i].id.indexOf ('CheckAll') != -1 || frm.elements[i].id.indexOf ('CheckThis') != -1) {
			if (!frm.elements[i].disabled) {
				if(chkVal == true) {
					frm.elements[i].checked = true;
				} else {
					frm.elements[i].checked = false;
				}
			}
		// Work here with the Item Template's multiple checkboxes
		/*
		} else if (idVal.indexOf('CheckThis') != -1) {
			// Check if any of the checkboxes are not checked, and then uncheck top select all checkbox
			if(frm.elements[i].checked == false) {
				frm.elements[1].checked = false; // Check if any of the checkboxes are not checked, and then uncheck top select all checkbox
			}
		*/
		}
	}
}
