function isCreateEditor (strBasePath, strName, strValue) {
	objectEditor = new FCKeditor(strName);
	objectEditor.ToolbarSet = 'is_edit';
	objectEditor.BasePath = strBasePath;
	objectEditor.Value = strValue;
	objectEditor.Width = '100%';
	objectEditor.Height = '200';
	return objectEditor.CreateHtml();
}

function getByClass (searchClass, node, tag) {
	var classElements = new Array();

	if (tag==undefined) tag="*";

	if (!node) node = document;

	var els = node.getElementsByTagName(tag); // use "*" for all elements
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");

	for (i = 0,j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

function HasClassName (objElement, strClass) {
	if (objElement.className) {
		var arrList = objElement.className.split(' ');
		var strClassUpper = strClass.toUpperCase();
	
		for (var i = 0; i < arrList.length; i++) {
			if (arrList[i].toUpperCase() == strClassUpper) {
				return true;
			}
		}
	
	}
	return false;
}

function AddClassName (objElement, strClass, blnMayAlreadyExist) {
	if (objElement instanceof Array) {
		for (var i in objElement) {
			AddClassName (objElement[i], strClass, blnMayAlreadyExist);
		}
	} else {
		if (objElement.className) {
			var arrList = objElement.className.split(' ');
			if (blnMayAlreadyExist) {
				var strClassUpper = strClass.toUpperCase();
				for (var i = 0; i < arrList.length; i++) {
					if (arrList[i].toUpperCase() == strClassUpper) {
						arrList.splice(i, 1);
						i--;
					}
				}
			}
			arrList[arrList.length] = strClass;
			objElement.className = arrList.join(' ');
		} else {
			objElement.className = strClass;
		}
	}
}

function RemoveClassName (objElement, strClass) {
	if (objElement instanceof Array) {
		for (var i in objElement) {
			RemoveClassName (objElement[i], strClass);
		}
	} else {
		if (objElement.className) {
			var arrList = objElement.className.split(' ');
			var strClassUpper = strClass.toUpperCase();
			for (var i = 0; i < arrList.length; i++) {
				if (arrList[i].toUpperCase() == strClassUpper) {
					arrList.splice(i, 1);
					i--;
				}
			}
			objElement.className = arrList.join(' ');
		}
	}
}

function ReplaceClassName (objElement, strClassFrom, strClassTo) {
	RemoveClassName (objElement, strClassFrom);
	AddClassName (objElement, strClassTo);
}