function button_click(control, msg) {
	control.value = msg;
	//control.disabled = true;
	/*
	count = control.form.elements.length;
	for (i=0;i < count; i++) {
		control.form.elements[i].disabled = true;
	}
	alert(count);
	*/
	return true;
}

function popup(target_field, base_url, width, height) {
	var url = base_url + '?action=new&popup=1';
	var popup = window.open(url, target_field, 'scrollbars=yes,width='+width+',height='+height+',resizable=yes');
	popup.focus();
}

/*
* Hide a DOM Node
*/
function CoreHideNode(targetId) {
	if (!document.getElementById){
		return false;
	}
	targetObj = document.getElementById(targetId);
	if (targetObj.style.display == "") {
		targetObj.style.display = "none";
		return true;
	}
	return false;
}

/*
* Show a DOM Node
*/
function CoreShowNode(targetId) {
	if (!document.getElementById){
		return false;
	}
	targetObj = document.getElementById(targetId);
	if (targetObj.style.display == "none") {
		targetObj.style.display = "";
		return true;
	}
	return false;
}

/*
Various scripts 
*/

function mailMeNoSpam(user, domain)
{
	document.write('<a href=\"mailto:' + user + '@' + domain + '\">');
	document.write(user + '@' + domain + '</a>'); 
}

function popItUp(url, ref, windowName, width, height)
{
	ref=window.open(url,windowName,'height='+height+',width='+width+"'");
	if (window.focus) {ref.focus()}
	return false;
}

/*
* Show / Hide a DOM Node
*/
function CoreShowHide(targetId) {
	if (!document.getElementById){
		return false;
	}
	targetObj = document.getElementById(targetId);
	if (targetObj.style.display == "none") {
		targetObj.style.display = "";
	} else {
		targetObj.style.display = "none";
	}
}

function jumpFromSelect(obj) {
	location.href = obj[obj.selectedIndex].value;		
}
