<!--
function confirmDelete(d) {
	var type = d;
	type == 'c'? type='class': type='user';
	var agree = confirm("Are you sure you want to delete this " + type + "?\nThis cannot be undone!");
	if (agree) {
		return true;
	} else {
		return false;
	}
}

function noCopy(t) {
	var type;
	switch (t) {
		case 'c':
			type = "Calligraphy © G. Matsuda";
			break;
		case 'i':
			type = "Images © Rockland Aikido";
			break;
		case 'a':
			type = "Image © Aikido Association of America";
			break;
		case 'k':
			type = "Photo © Walther Von Krenner";
			break;
		default:
			type = "Images are not available for copying.";
			break;
	}
	alert(type);
	return false;
}

function checkUserValue() {
	var u = document.editUsers.user_name;
	var p = document.editUsers.passwd;
	var p2 = document.editUsers.passwd2;

	if (u.value == "") {
		u.focus();
		alert('You must enter a User Name!');
		return false;
	} else if (p.value == "") {
		p.focus();
		alert('You must enter a Password!');
		return false;
	} else if (p2.value != p.value) {
		p2.focus();
		p2.value = "";
		alert('The passwords must match exactly!');
		return false;
	} else {
		return true;
	}
}

function fillForm(obj) {
		var i = obj.selectedIndex;
		// returns the index of the selected option, ie: 0,1,2...
		var v = obj.value; //returns the value of the selected option
		//obj.options[i].text	// returns the text nested in the selected 
		window.location.href='admin.php?action=editUsers&userID=' + v;
}

// these functions are for the Message Boards
/*function deletePost(id,redir) {
	if (id > 0) {
		window.location = "transact-post.php?action=delete&post=" +
			id + "&r=" + redir;

	} else {
		history.back();
	}
}*/
function deleteMessage(typ) {
	if (typ == 'message') {
		typ += "?\nThis will also delete all replies!";
	} else {
		typ += "?";
	}
		var msg = "Are you sure you want to delete this " + typ;
		var dele = confirm(msg);
		return dele;

}
function openHelpWindow() {
	var screenTop = 25;
	var screenLeft = 25;
	var screenSize = "width=400,height=400,";
	var windowFeatures = screenSize + "top=";
		windowFeatures += screenTop + ",left=" + screenLeft;
		windowFeatures += ",resizable=yes,scrollbars=yes";
	window.open('welcome.htm','_new',windowFeatures);
}

function setFocus() {
	document.getElementById("loginName").focus();
}

// This script is for Admin Messages

function showMsg(i) {
	//var indicator = i;
	var divID = "div" + i;
	var btnID = "btn" + i;
	var button = document.getElementById(btnID);
	var division = document.getElementById(divID);
	
	if (button.value == "SHOW MESSAGE") {
		button.value = "HIDE MESSAGE";
		division.style.visibility = "visible";
	} else {
		button.value = "SHOW MESSAGE";
		division.style.visibility = "hidden"
	}	
}

-->
