function onm(el) {
	var elt = document.getElementById(el.id+'link');
	if (el.className == 'menuitem_on') {
		el.className = 'menuitem';
		elt.className = 'menutext';
	} else {
		el.className = 'menuitem_on';
		elt.className = 'menutext_on';
	}
}
function gourl(url) {
	document.location.href = url;
}
function OnDelete(url, msg) {
	if (confirm(msg)) gourl(url);
}
function el(id) {
	return document.getElementById(id);
}
function loadEmails(ajaxURL, ajaxTarget) {
	if (!confirm('Are you sure? Current list will be dropped.')) return false;
	if (document.getElementById) {
		var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
	}
	if (x) {
		x.onreadystatechange = function() {
			if (x.readyState == 4 && x.status == 200) {
				ajaxTarget.value = x.responseText;
				alert('Done');
			}
		}
	}
	x.open("GET", 'group.php?event=loademails&url='+ajaxURL, true);
	x.send(null);
	ajaxTarget.value = 'Wait a minute... Retreiving URL';
}
function checkSubmit(varFormName){
	if(window.event.keyCode==13){
		document.getElementById(varFormName).submit();
	}
}

function openPopUp(varURL, varWindowName, varWidth, varHeight) {
	varWidth = varWidth||400;
	varHeight = varHeight||90;
	window.open(varURL, varWindowName, "height=" + varHeight + ",width=" + varWidth + ",resizable=0,status=no,toolbar=no,menubar=no,location=no,scrollbars=no")
}

function showHideFieldPassword(param) {
	if (param.value == '1') {
		document.getElementById('fieldPassword').style.display = 'block';
	} else {
		document.getElementById('fieldPassword').style.display = 'none';
	}
}
