
/***********************************************
* Switch Menu 
***********************************************/

if (document.getElementById){ 
document.write('<style type="text/css">\n')
document.write('.listcontent{display: none;}\n')
document.write('</style>\n')
} 


function LoadContent()
{
	var urlquery=location.href.split("?");
//alert (urlquery);
if ( (urlquery[1] == "Books,sub6,naminglist6") || (urlquery[1] == "Plaque,sub5,naminglist5") || (urlquery[1] == "Brick,sub1,naminglist1") || (urlquery[1] == "Tree,sub2,naminglist2") || (urlquery[1] == "Bench,sub3,naminglist3")  )
	var urlterms=urlquery[1].split(",");

//alert (urlterms);
 //alert (urlterms[0]);
//alert (urlterms[1]);
//alert (urlterms[2]); 
//if ((urlterms[0] == "Brick") || (urlterms[0] == "Tree") || (urlterms[0] == "Bench") )
if (  (urlquery[1] == "Books,sub6,naminglist6") || (urlquery[1] == "Plaque,sub5,naminglist5") || (urlquery[1] == "Brick,sub1,naminglist1") || (urlquery[1] == "Tree,sub2,naminglist2") || (urlquery[1] == "Bench,sub3,naminglist3")  )

{     //  alert (urlquery[1]);
	SwitchMenu(urlterms[1], urlterms[2]);
}


}


function SwitchMenu(obj, list){
	
	//alert ("here2");
	
	if(document.getElementById){
		
		
				var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); 
	
	// if (document.getElementById(list).style.backgroundColor=='silver')
		// {
		document.getElementById(list).style.backgroundColor='#ECECFF'; 

	

		change_id_color (list);
  		// } 
		 
		//alert (el.style.display);

		if(el.style.display != "block")
		{ 
			for (var i=0; i<ar.length; i++)
			{
				if (ar[i].className=="listcontent") 
				{
				ar[i].style.display = "none";
				//alert (ar[i].style.display);
				
				}
				if (ar[i].className=="naming") {
					ar[i].style.display = "none";
					//alert (ar[i].style.display);
				}
			}
			el.style.display = "block";
		}
		else
		{
			//el.style.display = "none";
		}
}
	
function change_id_color (list)
{
	
	switch (list) 
	{
		
		
		case "naminglist":
			 
				 document.getElementById("naminglist1").style.backgroundColor='silver';
				 document.getElementById("naminglist2").style.backgroundColor='silver';
				 document.getElementById("naminglist3").style.backgroundColor='silver';
				 document.getElementById("naminglist4").style.backgroundColor='silver';
				 document.getElementById("naminglist5").style.backgroundColor='silver';
				 document.getElementById("naminglist6").style.backgroundColor='silver';

				 document.getElementById("bk1").style.backgroundColor='white';
				  break; 

			 
		
		case "naminglist1":
			 
				document.getElementById("naminglist").style.backgroundColor='silver';
				 document.getElementById("naminglist2").style.backgroundColor='silver';
				 document.getElementById("naminglist3").style.backgroundColor='silver';
				 document.getElementById("naminglist4").style.backgroundColor='silver';
				 document.getElementById("naminglist5").style.backgroundColor='silver';
				 document.getElementById("naminglist6").style.backgroundColor='silver';

				 document.getElementById("bk1").style.backgroundColor='white';
				  break; 

			 
			 
			case "naminglist2":
			 	document.getElementById("naminglist").style.backgroundColor='silver';
				 document.getElementById("naminglist1").style.backgroundColor='silver';
				 document.getElementById("naminglist3").style.backgroundColor='silver';
				 document.getElementById("naminglist4").style.backgroundColor='silver';
				 document.getElementById("naminglist5").style.backgroundColor='silver';
				 document.getElementById("naminglist6").style.backgroundColor='silver';

				 document.getElementById("bk2").style.backgroundColor='white';
 			<!--	document.getElementById("bk3").style.backgroundColor='white'; -->
				  break; 

			 
			 
			 case "naminglist3":
			 	document.getElementById("naminglist").style.backgroundColor='silver';
				 document.getElementById("naminglist1").style.backgroundColor='silver';
				 document.getElementById("naminglist2").style.backgroundColor='silver';
				 document.getElementById("naminglist4").style.backgroundColor='silver';
				 document.getElementById("naminglist5").style.backgroundColor='silver';
				 document.getElementById("naminglist6").style.backgroundColor='silver';

				 document.getElementById("bk4").style.backgroundColor='white';
				<!-- document.getElementById("bk5").style.backgroundColor='white'; -->
				 break; 
			case "naminglist4":
			 	document.getElementById("naminglist").style.backgroundColor='silver';
				 document.getElementById("naminglist1").style.backgroundColor='silver';
				 document.getElementById("naminglist2").style.backgroundColor='silver';
				 document.getElementById("naminglist3").style.backgroundColor='silver';
				 document.getElementById("naminglist5").style.backgroundColor='silver';
				 document.getElementById("naminglist6").style.backgroundColor='silver';

				 document.getElementById("bk6").style.backgroundColor='white';
				 break; 
			case "naminglist5":
			 	document.getElementById("naminglist").style.backgroundColor='silver';
				 document.getElementById("naminglist1").style.backgroundColor='silver';
				 document.getElementById("naminglist2").style.backgroundColor='silver';
				 document.getElementById("naminglist3").style.backgroundColor='silver';
				 document.getElementById("naminglist4").style.backgroundColor='silver';
				 document.getElementById("naminglist6").style.backgroundColor='silver';

				 document.getElementById("bk7").style.backgroundColor='white';
				 break; 

			case "naminglist6":
			 	document.getElementById("naminglist").style.backgroundColor='silver';
				 document.getElementById("naminglist1").style.backgroundColor='silver';
				 document.getElementById("naminglist2").style.backgroundColor='silver';
				 document.getElementById("naminglist3").style.backgroundColor='silver';
				 document.getElementById("naminglist4").style.backgroundColor='silver';
				 document.getElementById("naminglist5").style.backgroundColor='silver';

				 document.getElementById("bk8").style.backgroundColor='white';
				 break; 

			 
	}
	
}

}
 