window.onload = initializer;
	
function initializer()
{
	/*
	var mylistitem = document.getElementById('li-books');
	mylistitem.onmouseover = function()
	{
		var tsubmenu = document.getElementById('submenu-books');
		var tsubmenu2 = document.getElementById('submenu-community');
		var tsubmenu3 = document.getElementById('submenu-downloads');
		
		tsubmenu.style.display = "block";
		tsubmenu2.style.display = "none";
		tsubmenu3.style.display = "none";
	};
	
	mylistitem.onmouseout = function() 
	{
		var submenu = document.getElementById('submenu-books');
		submenu.style.display = "none";
		
		var currentloc = location.href;
		if (currentloc.indexOf("database") >= 0 || currentloc.indexOf("middleware") >= 0 || currentloc.indexOf("application") >= 0 || currentloc.indexOf("servers") >= 0 || currentloc.indexOf("certifications") >= 0)
		{
			submenu.style.display = "block";
		}
	};
	
	var mylistitem2 = document.getElementById('li-community');
	mylistitem2.onmouseover = function()
	{
		var tsubmenu = document.getElementById('submenu-community');
		var tsubmenu2 = document.getElementById('submenu-books');
		var tsubmenu3 = document.getElementById('submenu-downloads');
		tsubmenu.style.display = "block";
		tsubmenu2.style.display = "none";
		tsubmenu3.style.displaly = "none";
	};
	
	mylistitem2.onmouseout = function() 
	{
		var submenu = document.getElementById('submenu-community');
		submenu.style.display = "none";
		
		var currentloc = location.href;
		if (currentloc.indexOf("signup") >= 0 || currentloc.indexOf("searchresults") >= 0 || currentloc.indexOf("usergroups") >= 0 || currentloc.indexOf("newsletters") >= 0 || currentloc.indexOf("events") >= 0)
		{
			submenu.style.display = "block";
		}
	};
	
	var mylistitem3 = document.getElementById('li-downloads');
	mylistitem3.onmouseover = function()
	{
		var tsubmenu = document.getElementById('submenu-downloads');
		var tsubmenu2 = document.getElementById('submenu-books');
		var tsubmenu3 = document.getElementById('submenu-community');
		tsubmenu.style.display = "block";
		tsubmenu2.style.display = "none";
		tsubmenu3.style.displaly = "none";
	};
	
	mylistitem3.onmouseout = function() 
	{
		var submenu = document.getElementById('submenu-downloads');
		submenu.style.display = "none";
		
		var currentloc = location.href;
		if (currentloc.indexOf("downloads") >= 0)
		{
			submenu.style.display = "block";
		}
	};
	*/
	
	var menuBook = document.getElementById('link-book');
	menuBook.onmouseover = function()
	{
		var submenuBook = document.getElementById('submenu-books');
		var submenu2 = document.getElementById('submenu-community');
		var submenu3 = document.getElementById('submenu-downloads');
		submenuBook.style.display = "block";
		submenu2.style.display = "none";
		submenu3.style.display = "none";
		
		submenuBook.onmouseover = function()
		{
			submenuBook.style.display = "block";
		}
		submenuBook.onmouseout = function()
		{
			submenuBook.style.display = "none";
			menuBook.style.backgroundColor = "#000";
			
			var currentloc = location.href;
			if (currentloc.indexOf("database") >= 0 || currentloc.indexOf("middleware") >= 0 || currentloc.indexOf("application") >= 0 || currentloc.indexOf("servers") >= 0 || currentloc.indexOf("certifications") >= 0)
			{
				submenuBook.style.display = "block";
			}
		}
	}
	menuBook.onmouseout = function()
	{
		menuBook.style.backgroundColor = "#000";
		var submenuBook = document.getElementById('submenu-books');
		submenuBook.style.display = "none";
		
		var currentloc = location.href;
		if (currentloc.indexOf("database") >= 0 || currentloc.indexOf("middleware") >= 0 || currentloc.indexOf("application") >= 0 || currentloc.indexOf("servers") >= 0 || currentloc.indexOf("certifications") >= 0)
		{
			submenuBook.style.display = "block";
		}
		if (currentloc.indexOf("signup") >= 0 || currentloc.indexOf("searchresults") >= 0 || currentloc.indexOf("usergroups") >= 0 || currentloc.indexOf("newsletters") >= 0 || currentloc.indexOf("events") >= 0)
		{
			document.getElementById('submenu-community').style.display = "block";
		}
		//if (currentloc.indexOf("downloads") >= 0)
		//{
		//	document.getElementById('submenu-downloads').style.display = "block";
		//}
	}
	
	var menuAuthors = document.getElementById('link-authors');
	menuAuthors.onmouseover = function()
	{
		menuAuthors.style.backgroundColor = "red";
		var submenuAuthors = document.getElementById('submenu-authors');
		submenuAuthors.style.display = "block";
		
		submenuAuthors.onmouseover = function()
		{
			submenuAuthors.style.display = "block";
		}
		submenuAuthors.onmouseout = function()
		{
			submenuAuthors.style.display = "none";
			menuAuthors.style.backgroundColor = "#000";
		}
	}
	menuAuthors.onmouseout = function()
	{
		menuAuthors.style.backgroundColor = "#000";
		var submenuAuthors = document.getElementById('submenu-authors');
		submenuAuthors.style.display = "none";
	}
	
	var menuCommunity = document.getElementById('link-community');
	menuCommunity.onmouseover = function()
	{
		var submenu = document.getElementById('submenu-community');
		var submenu2 = document.getElementById('submenu-books');
		var submenu3 = document.getElementById('submenu-downloads');
		submenu.style.display = "block";
		submenu2.style.display = "none";
		submenu3.style.display = "none";
		
		submenu.onmouseover = function()
		{
			submenu.style.display = "block";
		}
		submenu.onmouseout = function()
		{
			submenu.style.display = "none";
			menuCommunity.style.backgroundColor = "#000";
		
			var currentloc = location.href;
			if (currentloc.indexOf("signup") >= 0 || currentloc.indexOf("searchresults") >= 0 || currentloc.indexOf("usergroups") >= 0 || currentloc.indexOf("newsletters") >= 0 || currentloc.indexOf("events") >= 0)
			{
				submenu.style.display = "block";
			}
		}
	}
	menuCommunity.onmouseout = function()
	{
		menuCommunity.style.backgroundColor = "#000";
		var submenu = document.getElementById('submenu-community');
		submenu.style.display = "none";
		
		var currentloc = location.href;
		if (currentloc.indexOf("signup") >= 0 || currentloc.indexOf("searchresults") >= 0 || currentloc.indexOf("usergroups") >= 0 || currentloc.indexOf("newsletters") >= 0 || currentloc.indexOf("events") >= 0)
		{
			submenu.style.display = "block";
		}
	}
	
	
	var menuDownloads = document.getElementById('link-downloads');
	menuDownloads.onmouseover = function()
	{
		var submenu = document.getElementById('submenu-downloads');
		var submenu2 = document.getElementById('submenu-community');
		var submenu3 = document.getElementById('submenu-books');
		submenu.style.display = "block";
		submenu2.style.display = "none";
		submenu3.style.display = "none";
		
		submenu.onmouseover = function()
		{
			submenu.style.display = "block";
		}
		submenu.onmouseout = function()
		{
			submenu.style.display = "none";
			menuDownloads.style.backgroundColor = "#000";
		
			var currentloc = location.href;
			if (currentloc.indexOf("downloads") >= 0)
			{
				submenu.style.display = "block";
			}
		}
	}
	menuDownloads.onmouseout = function()
	{
		menuDownloads.style.backgroundColor = "#000";
		var submenu = document.getElementById('submenu-downloads');
		submenu.style.display = "none";
		
		var currentloc = location.href;
		if (currentloc.indexOf("downloads") >= 0)
		{
			submenu.style.display = "block";			
		}		
		
		
		
		
	}
	
	var submenuDownloads = document.getElementById('submenu-downloads');
	submenuDownloads.onmouseover = function()
	{
		submenuDownloads.style.display = "block";
	}
	submenuDownloads.onmouseout = function()
	{
		var currentloc = location.href;
		if (currentloc.indexOf("signup") >= 0 || currentloc.indexOf("searchresults") >= 0 || currentloc.indexOf("usergroups") >= 0 || currentloc.indexOf("newsletters") >= 0 || currentloc.indexOf("events") >= 0)
		{
			document.getElementById('submenu-community').style.display = "block";
		}
		if (currentloc.indexOf("database") >= 0 || currentloc.indexOf("middleware") >= 0 || currentloc.indexOf("application") >= 0 || currentloc.indexOf("servers") >= 0 || currentloc.indexOf("certifications") >= 0)
		{
			document.getElementById('submenu-books').style.display = "block";
		}
	}

	
	function getPanel(numberPanel)
	{
		document.getElementById('panel' + numberPanel).style.display = "block";
		for (var i=1; i<=6; i++)
		{
			if (i != numberPanel)
			{
				document.getElementById('tab' + i).style.backgroundColor = "#ddd";

				document.getElementById('panel' + i).style.display = "none";
			}
			else{
				document.getElementById('tab' + i).style.backgroundColor = "#bbb";

			}
		}
	}
	
	var tab1 = document.getElementById('tab1');
	tab1.onclick = function()
	{
		getPanel(1);
	}
	
	var tab2 = document.getElementById('tab2');
	tab2.onclick = function()
	{
		getPanel(2);
	}
	
	var tab3 = document.getElementById('tab3');
	tab3.onclick = function()
	{
		getPanel(3);
	}
	
	var tab4 = document.getElementById('tab4');
	tab4.onclick = function()
	{
		getPanel(4);
	}
	
	var tab5 = document.getElementById('tab5');
	tab5.onclick = function()
	{
		getPanel(5);
	}
	
	var tab6 = document.getElementById('tab6');
	tab6.onclick = function()
	{
		getPanel(6);
	}
	
}
