/*startList = function() 
{
	if (document.all&&document.getElementById) 
	{
		navRoot = document.getElementById('navigation');
		for (i=0; i<navRoot.childNodes.length; i++) 
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=='LI') 
			{
				node.onmouseover=function() 
				{
					this.className+=' over';
				}
				node.onmouseout=function() 
				{
					this.className=this.className.replace(' over', '');
				}
			}
		}
	}
}*/

function doorhighlight(id)
{
	var listitem = document.getElementById(id);
	listitem.className = 'over';
}

function doorunhighlight(id)
{
	var listitem = document.getElementById(id);
	listitem.className = '';
}

function doorswap(src)
{
	var map = document.getElementById('doors');
	map.src = src;
}

startList = function()
{
	if (document.images)
	{
		pre1= new Image(760,103); 
		pre1.src="images/image_1.jpg"; 
	
		pre2= new Image(760,103); 
		pre2.src="images/image_2.jpg"; 
	
		pre3= new Image(760,103); 
		pre3.src="images/image_3.jpg"; 

		pre4= new Image(760,103); 
		pre4.src="images/image_4.jpg"; 

		pre5= new Image(760,103); 
		pre5.src="images/image_5.jpg"; 
		
		pre6= new Image(760,103); 
		pre6.src="images/image_6.jpg"; 
		
		pre7= new Image(760,103); 
		pre7.src="images/image_7.jpg"; 
	}
	
	var navUL = document.getElementById('navigation');
	
	var navigationChildren = navUL.childNodes;
	for(var i = 0; i < navigationChildren.length; i++)
	{
		if(navigationChildren[i].nodeName == 'LI')
		{
			navigationChildren[i].onmouseover = function()
			{
				this.className = 'over';
			}
			
			navigationChildren[i].onmouseout = function()
			{
				this.className = '';
			}		
			
			var listItemChildren = navigationChildren[i].childNodes;
			for(var j = 0; j < listItemChildren.length; j++)
			{
				if(listItemChildren[j].nodeName == 'A')
				{
					if(window.location.href.indexOf(listItemChildren[j].href) != -1)
					{
						navigationChildren[i].id = 'currentNavLink';
					}
				}
			}
			//
		}
	}
}

window.onload=startList;
