// cms.js
// various functionalities required by published cms pages
// aith, 20070719

// display the element with the specified id and hide all other identified elements
function cms_ViewElementExclusively(elementId, elementIdList)
{
var element;
if (elementId && elementIdList)
{
	for (var i = 0; i < elementIdList.length; i++)
	{
		element = document.getElementById(elementIdList[i]);
		if (element) element.style.display = "none";
	}
	element = document.getElementById(elementId );
	if (element) element.style.display = "block";
}
return false;
}

// open the popup window used for archive content pages
function cms_OpenArchivePopup(url, windowName)
{
window.open(url, windowName, "width=650,height=500,left=100,top=100,resizable=yes,menubar=no,scrollbars=yes,status=no,toolbar=yes");
return false;
}

// set the source of the specified image element
function cms_SetImage(imageId, imageUrl)
{
var image = document.getElementById(imageId);
if (image) image.src = imageUrl;
}

