	
	function onLoad()
	{
		startList(document.getElementById('menu'));
		// resizeContent();
	}
	
	window.onload = onLoad;
	
	// startList(menuElementName)
	// source: http://www.alistapart.com/articles/dropdowns/
	
	function startList(navRoot) 
	{		
		if (document.all && document.getElementById) 
		{				
			for (var i=0; i<navRoot.childNodes.length; i++) 
			{
				var node = navRoot.childNodes[i];
				if (node.nodeName == "LI") 
				{
					node.onmouseover = function() 
					{
						this.className += " over";
					 }
					 node.onmouseout = function() 
					 {
						 this.className = this.className.replace(" over", "");
					 }
				 }				 
				 if (node.childNodes.length) startList(node);
			}
		}
	}	
	
	// resizeContent() : called onLoad, resize content to fill the window
	
	function resizeContent()
	{		
		if (document.body.scrollHeight > document.body.offsetHeight) return;		
	
		// get elements
		var ew = document.getElementById("wrapper")
		var ec = document.getElementById("content");		
		
		// resize content element
		ec.style.height = 'auto';
		
		// get body height
		var bh = document.body.scrollHeight - 38;	
		
		// for ie, remove 16 pixels if scrolbars are shown
		if (document.all) 
		{
			bh = document.body.offsetHeight - 22;
			if (document.body.offsetWidth < 770) bh -= 16;
		}	
		
		// get element heights 
		var wh = ew.offsetHeight;
		var ch = ec.offsetHeight;		
			
		// get difference
		var dif = parseInt(bh - wh);		
		
		// add difference to content if needed
		if (dif > 0) document.getElementById("content").style.height = ch + dif + "px";	
	}
	
	// resize content on window resize
	window.onresize = resizeContent;
