function ExpandDiv(theDivName)
{
	var theDiv = document.getElementById(theDivName);
	if (!theDiv)
		return;
	theDiv.style.display = "block";

	var thePic = document.getElementById(theDivName + "Img");
	if (thePic)
		thePic.src = "images/bluedrop.gif";
}

function CollapseDiv(theDivName)
{
	var theDiv = document.getElementById(theDivName);
	if (!theDiv)
		return;
	theDiv.style.display = "none";

	var thePic = document.getElementById(theDivName + "Img");
	if (thePic)
		thePic.src = "images/blueup.gif";
}

function ToggleDiv(theDivName)
{
	var theDiv = document.getElementById(theDivName);
	if (!theDiv)
		return;
	if (theDiv.style.display.toUpperCase() == "BLOCK")
		CollapseDiv(theDivName);
	else
		ExpandDiv(theDivName);
}

function AlterAllDivs(displayStyle)
{
	if (null == allDivs || typeof(allDivs) == "undefined")
		return;		

	for (i=0; i < allDivs.length; i++)
		{
		if (0 == allDivs[i].id.indexOf("divExpCollAsst_")) 
			if (displayStyle == "block")
				ExpandDiv(allDivs[i].id);
			else
				CollapseDiv(allDivs[i].id);
		}
}

function ToggleAllDivs()
{
	if (fExpanded)
	{
		AlterAllDivs("none");

		if (null != imgShowAll && typeof(imgShowAll) != "undefined")
			imgShowAll.src = "/global/images/default.aspx?AssetID=ZA790050031033"
	}
	else
	{
		AlterAllDivs("block");

		if (null != imgShowAll && typeof(imgShowAll) != "undefined")
			imgShowAll.src = "/global/images/default.aspx?AssetID=ZA790050021033"
	}

	fExpanded = !fExpanded;
}

function ToggleAll()
{
	ToggleAllDivs();
}

//var allDivs = document.body.getElementsByTagName("DIV");
//var allImages = document.body.getElementsByTagName("IMG");
//var fExpanded = false;
//var imgShowAll = allImages["picHeader"];


function openWindow(url, example) {
  var popupWin;
  if (typeof(popupWin) != "object") 
	popupWin = window.open(url, example, "width=452,height=572,top=0,left=0,alwaysRaised=yes,toolbar=0,directories=0,menubar=0,status=1,resizable=yes,location=0,scrollbars=1,copyhistory=0");
  else {
    if (!popupWin.closed) 
      popupWin.location.href = url;
    else 
	  popupWin = window.open(url, example, "width=452,height=572,top=0,left=0,alwaysRaised=yes,toolbar=0,directories=0,menubar=0,status=1,resizable=yes,location=0,scrollbars=1,copyhistory=0");
 }	  
   
   popupWin.focus();
}
