// Avi
function popup( obj, L, T )
{ 
	with( obj.style ) 
	{
		display = "block";
		left = L;
		top = T; 
	}
}

function unpop( obj ) 
    { 
        obj.style.display = "none"; 
    }
    
 //CG   
function toggleListItem(toggleElem,targetElemID) 
{
	var rootElem = document.getElementById("levelz");
	if (rootElem) {
		var arrChildDivs = rootElem.getElementsByTagName("div");
		var arrChildLinks = rootElem.getElementsByTagName("a");
		var targetElem = document.getElementById(targetElemID);
		var toggleClassName = "";
		var targetClassName = "";
		if (targetElem && toggleElem) {
			//get class names of relevant selected elements
			toggleClassName = toggleElem.className;
			targetClassName = targetElem.className;
		} else
			//set default class names (for initial page load)
			toggleClassName = "toggle"; //must match what's in the HTML and CSS
			targetClassName = "detail"; //must match what's in the HTML and CSS
		}
		//extract only the first class name if multiple ones are specified
		if (toggleClassName.indexOf(" ") > 0) {
			toggleClassName = toggleClassName.substring(0,toggleClassName.indexOf(" "));
		}
		if (targetClassName.indexOf(" ") > 0) {
			targetClassName = targetClassName.substring(0,targetClassName.indexOf(" "));
		}
		//toggle off any content container that was previously on
		for (i=0; i<arrChildDivs.length; i++)
		
		{
			if (arrChildDivs[i].className.indexOf(targetClassName) >= 0) {
				arrChildDivs[i].style.display = "none"; 
			}
		}
		//toggle on any content link that was previously off
		for (i=0; i<arrChildLinks.length; i++){
			if (arrChildLinks[i].className == toggleClassName) {
				arrChildLinks[i].style.display = "block"; 
			}
		
		if (targetElem && toggleElem) {
			//toggle on the currently selected content and toggle off the link
			targetElem.style.display = "block"; //IE generates error for "table"
			toggleElem.style.display = "none";
		}

	}	
	    setheight();	
}
