function utils() {
	return this;
}

utils.popup = function (url, w, h) {
	var win = window.open(url, "_blank", "resizable=yes,location=no,menubar=no,toolbar=no,titlebar=no,scrollbars=no,width=" + w + ",height=" + h);
	if (!win) { alert("Please allow popups on this page."); }
	return win;
}

utils.prototype.enable_form_fields = function (frm_idx, enable) {
	var form = document.forms[frm_idx];
	for(var i = 0; i<form.elements.length; i++) {
		 (form.elements[i].type == 'button' || form.elements[i].tagName.toLowerCase() == 'select') ? form.elements[i].disabled = !enable  :  form.elements[i].readOnly = !enable;
	}
	//form.edit_btn.disabled = true;
	//form.act.disabled = false;
	try { this.get_first_non_hidden_elem(form).focus(); } catch (e) {}
}

var g_utils = new utils();
