this.sitemapstyler = function()
{
	var sitemap = document.getElementById("sitemap")
	if(sitemap)
	{
		this.listItem = function(li)
		{
			if(li.getElementsByTagName("ul").length > 0)
			{
				var ul = li.getElementsByTagName("ul")[0];
				
				ul.style.display = "block";//"none";
				var span = document.createElement("span");
				span.className = "collapsed";
				
				span.onclick = function()
				{
					ul.style.display = (ul.style.display == "none") ? "block" : "none";
					this.className = (ul.style.display == "none") ? "collapsed" : "expanded";
				};
				/*
				span.onmouseover = function()
				{
					this.className = (ul.style.display == "none") ? "collapsed2" : "expanded2";
				};

				span.onmouseout = function()
				{
					this.className = (ul.style.display == "none") ? "collapsed" : "expanded";
				};*/

				
				
				
				
				li.appendChild(span);
				
			};
		};
		
		var items = sitemap.getElementsByTagName("li");
		for(var i=0;i<items.length;i++)
		{
			listItem(items[i]);
		};
		
		
	};	
};
window.onload = sitemapstyler;



hex = 100 // Initial color value.
var stop = false;
var direction = 1;

function fadetext()
{ 
	if (stop)
	{
		hex = 0;
		document.getElementById("sample").style.color="rgb("+hex+","+hex+","+hex+")";
		stop = false;
	}
	
	if (hex < 10)
		direction = 1;
	if (hex > 200)
		direction = -1;
	
	hex = hex + (11 * direction);
	document.getElementById("sample").style.color="rgb(255,"+hex+","+hex+")";
	setTimeout("fadetext()",150); 
}

function abort()
{
	stop = true;
}
