var ibeUtil = {};
ibeUtil.defaultGroupingSeparator = ".";
ibeUtil.setDefaultGroupingSeparator = function (sep) {
	ibeUtil.defaultGroupingSeparator = sep;
};
ibeUtil.int_to_tt = function (v, s) {
	var val = v + "";
	var sep = s || ibeUtil.defaultGroupingSeparator;
	var ss = "";
	var len = val.length;
	while (len > 3) {
		ss = sep + val.substr(len - 3, 3) + ss;
		val = val.substr(0, len - 3);
		len = val.length;
	}
	ss = val + ss;
	return ss;
};
ibeUtil.tt_to_int = function tt_to_int(v, s) {
	var val = v + "";
	var sep = s || ibeUtil.defaultGroupingSeparator;
	var ss = val.split(sep).join("");
	return parseInt(ss);
};
ibeUtil.read_tt_value = function (el) {
	var rv = xInnerHtml(xGetElementById(el));
	return ibeUtil.tt_to_int(rv);
};
ibeUtil.write_tt_value = function (el, val) {
	xInnerHtml(el, ibeUtil.int_to_tt(val));
};
ibeUtil.popup = function (url, name, width, height) {
	var win = window.open(url, name, "directories=no,location=no,menubar=no," + "scrollbars=yes,status=no,toolbar=no,resizable=yes,screenX=150," + "screenY=150,width=" + width + ",height=" + height);
	win.focus();
};
ibeUtil.isDefined = function (value) {
	return typeof (value) != "undefined";
};
ibeUtil.firstChildElement = function (element) {
	if (ibeUtil.isDefined(element.childNodes)) {
		for (var i = 0; i < element.childNodes.length; i += 1) {
			var child = element.childNodes[i];
			if (child.nodeType == 1) {
				return child;
			}
		}
	}
	return null;
};
ibeUtil.setVisible = function (element, visible) {
	if (ibeUtil.isDefined(element) && ibeUtil.isDefined(element.style)) {
		element.style.display = visible ? "block" : "none";
	}
};
ibeUtil.enableIE6BackgroundImageCache = function() {
	var m = document.uniqueID && document.compatMode && !window.XMLHttpRequest
			&& document.execCommand;
	try {
		if (!!m) {
			m("BackgroundImageCache", false, true); /* = IE6 only */
		}
	} catch (oh) {
	}
};