var fLanguage = window.location.hostname.match(".*.ru")?"ru":"en";

function clearDivChilds(divID) {
	var childsCount = $(divID).childNodes.length;
	for (var i=0;i<childsCount;i++) {
		$(divID).removeChild($(divID).childNodes[0]);
	}
}

function removeElement(ID) {
	var elem = document.getElementById(ID);
	if (elem) {
		elem.parentNode.removeChild(elem);
	}
}

function fromUnicodeHTMLtoUTF(str) {
	function repF(code,c1) {
		return String.fromCharCode(c1);
	}

	var re = /&#(\d+);/g;
	return str.replace(re, repF);
}