function setClassName(id, className) {
 	document.getElementById(id).className = className;
}

function disableControl(c) {
	if (c.className.search('disabled') == -1)
		c.className = c.className + ' disabled';
	c.disabled = true;
}

function enableControl(c) {
	c.className = c.className.replace('disabled', '');
	c.disabled = false;
}

var PopupWindow = null;

function popup(href, windowname, width, height) {
//	alert (PopupWindow);
	
	if (PopupWindow != null) {
		PopupWindow.close();
		PopupWindow = null;
	}
	PopupWindow = window.open(href, windowname, 'width='+width+',height='+height/*+',top='+top+',left='+left*/);
//	alert (PopupWindow);
	return false;
}