// JavaScript Document

function checkKey()
{
	var key = window.event.keyCode;
	if (window.event.shiftKey)
	{
		if (key == 65 || key == 97)
		{
			ShowAll();
		}
		else if (key == 67 || key == 99)
		{
			CloseAll();
		}
	}
}

function ShowAll()
{
	for(var i = 0; i < document.all.length; i++)
	{
	   if (document.all(i).className == "collapsed")
	   {
		document.all(i).className = "expanded" ;
	   }
	}
}

function CloseAll()
{
	for(var i = 0; i < document.all.length; i++)
	{
	   if (document.all(i).className == "expanded")
	   {
		document.all(i).className = "collapsed" ;
	   }
	}
}

function outliner()
{
    var child = document.all[event.srcElement.getAttribute("child",false)];
    if (null != child){
		if(child.className == "collapsed")
		{
			child.className = "expanded";
			return;
		}
		if(child.className == "expanded")
		{
			child.className = "collapsed";
			return;
		}
    }
}
