function mi(txt) { window.status = txt; return true; }
function mo() { window.status = ''; }

function cfm(msg) { return confirm('Are you sure you want to ' + msg + '?'); }

function new_win_full(href, name) {
	window.open(href, name, 'resizable=yes,toolbar=yes,menubar=yes,location=yes,status=yes,scrollbars=yes');
	w = window.open('', name);
	if(w) w.focus();
}


function new_win_view(href, name) {
	window.open(href, name, 'resizable=yes,toolbar=yes,menubar=yes,status=yes,scrollbars=yes');
	w = window.open('', name);
	//if(w) w.focus();
}

function new_win(href, name, w, h) {
	window.open(href, name, 'width=' + w + ',height=' + h + ',scrollbars=yes');
	w = window.open('', name);
	if(w) w.focus();
}

function new_win_cfm(msg, href, name, w, h) {
	if(cfm(msg)) new_win(href, name, w, h);
}

function enable_input(ctrl,i) {
	elem = document.main_form.elements[i];
	if(ctrl.checked) {
		elem.onfocus = null;
		elem.value = elem.defaultValue;
		elem.focus();
	}
	else {
		elem.onfocus = elem.blur;
		elem.defaultValue = elem.value;
		elem.value = '';
	}
}

