function clearAllMessages() {
	clearError();
	clearWarning();
	clearInfo();
}

function displayWarning(sHTML) {	_displayContainer("warningContainer",sHTML); }
function clearWarning() {	_clearContainer("warningContainer"); }

function displayInfo(sHTML) {	_displayContainer("alertContainer",sHTML); }
function clearInfo() {	_clearContainer("alertContainer"); }

function clearError() {	_clearContainer("errorContainer"); }
function displayError(sectionID,sHTML) {
	//separate from validateSection() so errors can be forced
	var container,containerText;
	if (sectionID == "") { //show error in main error container only
		_displayContainer("errorContainer",sHTML)
		
		//close out info container if it's open so any previous success message doesn't confuse the users
		clearInfo();
	} else {
		var oRow = document.getElementById("errorRow_"+ sectionID);
		var containerText = document.getElementById("errors_"+sectionID);
	
		containerText.innerHTML = sHTML;
		oRow.style.display="";
	
		var oContainer = document.getElementById("titleLeft_"+sectionID);
		if (oContainer)	{ 
			var isNumberSection = oContainer.src.indexOf('titleLeft_number') > 0;
			if (isNumberSection) {
				oContainer.srcbk = (oContainer.srcbk == "" ? oContainer.src : oContainer.srcbk);
				oContainer.src='/_ckcommon/images/titleBar/titleLeft_numberError.jpg'
			} else {
				oContainer.src='/_ckcommon/images/titleBar/titleLeft_error.jpg'
			}
		}
	}
}

function _displayContainer(containerCode,sHTML) {
	var oContainer = document.getElementById(containerCode);
	if (oContainer) {
		if (oSpan = document.getElementById(containerCode + "Text")) oSpan.innerHTML = sHTML;
		oContainer.style.display="block";
		window.scrollTo(0,0);
	}
}
function _clearContainer(containerCode) {
	var oContainer = document.getElementById(containerCode);
	if (oContainer) {
		if (oSpan = document.getElementById(containerCode + "Text")) oSpan.innerHTML = '';
		oContainer.style.display="none";
	}
}
